summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-08-17 22:55:00 (GMT)
committerThomas Wouters <thomas@python.org>2000-08-17 22:55:00 (GMT)
commit5215225ea1e3200b572775639d567f5e3f489a15 (patch)
tree8202d4aebf513dc8c8a80adf018f13270386e658 /Python
parent1d75a79c009e500923128716a02efbe86135e64e (diff)
downloadcpython-5215225ea1e3200b572775639d567f5e3f489a15.zip
cpython-5215225ea1e3200b572775639d567f5e3f489a15.tar.gz
cpython-5215225ea1e3200b572775639d567f5e3f489a15.tar.bz2
Apply SF patch #101135, adding 'import module as m' and 'from module import
name as n'. By doing some twists and turns, "as" is not a reserved word. There is a slight change in semantics for 'from module import name' (it will now honour the 'global' keyword) but only in cases that are explicitly undocumented.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c113
-rw-r--r--Python/compile.c44
-rw-r--r--Python/graminit.c1324
-rw-r--r--Python/import.c2
4 files changed, 793 insertions, 690 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 40b5738..af28cdc 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -66,7 +66,8 @@ static PyObject *apply_slice(PyObject *, PyObject *, PyObject *);
static int assign_slice(PyObject *, PyObject *,
PyObject *, PyObject *);
static PyObject *cmp_outcome(int, PyObject *, PyObject *);
-static int import_from(PyObject *, PyObject *, PyObject *);
+static PyObject *import_from(PyObject *, PyObject *);
+static int import_all_from(PyObject *, PyObject *);
static PyObject *build_class(PyObject *, PyObject *, PyObject *);
static int exec_statement(PyFrameObject *,
PyObject *, PyObject *, PyObject *);
@@ -1414,20 +1415,28 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals,
if (x != NULL) continue;
break;
- case IMPORT_FROM:
- w = GETNAMEV(oparg);
- v = TOP();
+ case IMPORT_STAR:
+ v = POP();
PyFrame_FastToLocals(f);
if ((x = f->f_locals) == NULL) {
PyErr_SetString(PyExc_SystemError,
"no locals");
break;
}
- err = import_from(x, v, w);
+ err = import_all_from(x, v);
PyFrame_LocalsToFast(f, 0);
+ Py_DECREF(v);
if (err == 0) continue;
break;
+ case IMPORT_FROM:
+ w = GETNAMEV(oparg);
+ v = TOP();
+ x = import_from(v, w);
+ PUSH(x);
+ if (x != NULL) continue;
+ break;
+
case JUMP_FORWARD:
JUMPBY(oparg);
continue;
@@ -2647,43 +2656,51 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
return v;
}
-static int
-import_from(PyObject *locals, PyObject *v, PyObject *name)
+static PyObject *
+import_from(PyObject *v, PyObject *name)
{
PyObject *w, *x;
if (!PyModule_Check(v)) {
PyErr_SetString(PyExc_TypeError,
"import-from requires module object");
+ return NULL;
+ }
+ w = PyModule_GetDict(v); /* TDB: can this not fail ? */
+ x = PyDict_GetItem(w, name);
+ if (x == NULL) {
+ PyErr_Format(PyExc_ImportError,
+ "cannot import name %.230s",
+ PyString_AsString(name));
+ } else
+ Py_INCREF(x);
+ return x;
+}
+
+static int
+import_all_from(PyObject *locals, PyObject *v)
+{
+ int pos = 0, err;
+ PyObject *name, *value;
+ PyObject *w;
+
+ if (!PyModule_Check(v)) {
+ PyErr_SetString(PyExc_TypeError,
+ "import-from requires module object");
return -1;
}
- w = PyModule_GetDict(v);
- if (PyString_AsString(name)[0] == '*') {
- int pos, err;
- PyObject *name, *value;
- pos = 0;
- while (PyDict_Next(w, &pos, &name, &value)) {
- if (!PyString_Check(name) ||
- PyString_AsString(name)[0] == '_')
+ w = PyModule_GetDict(v); /* TBD: can this not fail ? */
+
+ while (PyDict_Next(w, &pos, &name, &value)) {
+ if (!PyString_Check(name) ||
+ PyString_AsString(name)[0] == '_')
continue;
- Py_INCREF(value);
- err = PyDict_SetItem(locals, name, value);
- Py_DECREF(value);
- if (err != 0)
- return -1;
- }
- return 0;
- }
- else {
- x = PyDict_GetItem(w, name);
- if (x == NULL) {
- PyErr_Format(PyExc_ImportError,
- "cannot import name %.230s",
- PyString_AsString(name));
+ Py_INCREF(value);
+ err = PyDict_SetItem(locals, name, value);
+ Py_DECREF(value);
+ if (err != 0)
return -1;
- }
- else
- return PyDict_SetItem(locals, name, x);
}
+ return 0;
}
static PyObject *
@@ -2825,7 +2842,7 @@ find_from_args(PyFrameObject *f, int nexti)
next_instr += nexti;
opcode = (*next_instr++);
- if (opcode != IMPORT_FROM) {
+ if (opcode != IMPORT_FROM && opcode != IMPORT_STAR) {
Py_INCREF(Py_None);
return Py_None;
}
@@ -2833,18 +2850,28 @@ find_from_args(PyFrameObject *f, int nexti)
list = PyList_New(0);
if (list == NULL)
return NULL;
-
- do {
- oparg = (next_instr[1]<<8) + next_instr[0];
- next_instr += 2;
- name = Getnamev(f, oparg);
- if (PyList_Append(list, name) < 0) {
+
+ if (opcode == IMPORT_STAR) {
+ name = PyString_FromString("*");
+ if (!name)
Py_DECREF(list);
- break;
+ else {
+ if (PyList_Append(list, name) < 0)
+ Py_DECREF(list);
+ Py_DECREF(name);
}
- opcode = (*next_instr++);
- } while (opcode == IMPORT_FROM);
-
+ } else {
+ do {
+ oparg = (next_instr[1]<<8) + next_instr[0];
+ next_instr += 2;
+ name = Getnamev(f, oparg);
+ if (PyList_Append(list, name) < 0) {
+ Py_DECREF(list);
+ break;
+ }
+ opcode = (*next_instr++);
+ } while (opcode == IMPORT_FROM);
+ }
return list;
}
diff --git a/Python/compile.c b/Python/compile.c
index 7065647..e18f627 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2096,6 +2096,22 @@ com_raise_stmt(struct compiling *c, node *n)
}
static void
+com_from_import(struct compiling *c, node *n)
+{
+ com_addopname(c, IMPORT_FROM, CHILD(n, 0));
+ com_push(c, 1);
+ if (NCH(n) > 1) {
+ if (strcmp(STR(CHILD(n, 1)), "as") != 0) {
+ com_error(c, PyExc_SyntaxError, "invalid syntax");
+ return;
+ }
+ com_addopname(c, STORE_NAME, CHILD(n, 2));
+ } else
+ com_addopname(c, STORE_NAME, CHILD(n, 0));
+ com_pop(c, 1);
+}
+
+static void
com_import_stmt(struct compiling *c, node *n)
{
int i;
@@ -2107,18 +2123,32 @@ com_import_stmt(struct compiling *c, node *n)
REQ(CHILD(n, 1), dotted_name);
com_addopname(c, IMPORT_NAME, CHILD(n, 1));
com_push(c, 1);
- for (i = 3; i < NCH(n); i += 2)
- com_addopname(c, IMPORT_FROM, CHILD(n, i));
- com_addbyte(c, POP_TOP);
+ if (TYPE(CHILD(n, 3)) == STAR)
+ com_addbyte(c, IMPORT_STAR);
+ else {
+ for (i = 3; i < NCH(n); i += 2)
+ com_from_import(c, CHILD(n, i));
+ com_addbyte(c, POP_TOP);
+ }
com_pop(c, 1);
}
else {
/* 'import' ... */
for (i = 1; i < NCH(n); i += 2) {
- REQ(CHILD(n, i), dotted_name);
- com_addopname(c, IMPORT_NAME, CHILD(n, i));
+ node *subn = CHILD(n, i);
+ REQ(subn, dotted_as_name);
+ com_addopname(c, IMPORT_NAME, CHILD(subn, 0));
com_push(c, 1);
- com_addopname(c, STORE_NAME, CHILD(CHILD(n, i), 0));
+ if (NCH(subn) > 1) {
+ if (strcmp(STR(CHILD(subn, 1)), "as") != 0) {
+ com_error(c, PyExc_SyntaxError,
+ "invalid syntax");
+ return;
+ }
+ com_addopname(c, STORE_NAME, CHILD(subn, 2));
+ } else
+ com_addopname(c, STORE_NAME,
+ CHILD(CHILD(subn, 0),0));
com_pop(c, 1);
}
}
@@ -3295,12 +3325,14 @@ optimize(struct compiling *c)
case IMPORT_FROM:
com_addlocal_o(c, GETNAMEOBJ(oparg));
break;
+ case IMPORT_STAR:
case EXEC_STMT:
c->c_flags &= ~CO_OPTIMIZED;
break;
}
}
+ /* TBD: Is this still necessary ? */
if (PyDict_GetItemString(c->c_locals, "*") != NULL)
c->c_flags &= ~CO_OPTIMIZED;
diff --git a/Python/graminit.c b/Python/graminit.c
index 82b01bc..d5cc2a0 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -363,7 +363,7 @@ static arc arcs_20_1[1] = {
{50, 3},
};
static arc arcs_20_2[1] = {
- {50, 4},
+ {52, 4},
};
static arc arcs_20_3[2] = {
{22, 1},
@@ -374,7 +374,7 @@ static arc arcs_20_4[1] = {
};
static arc arcs_20_5[2] = {
{23, 6},
- {12, 7},
+ {53, 7},
};
static arc arcs_20_6[1] = {
{0, 6},
@@ -384,7 +384,7 @@ static arc arcs_20_7[2] = {
{0, 7},
};
static arc arcs_20_8[1] = {
- {12, 7},
+ {53, 7},
};
static state states_20[9] = {
{2, arcs_20_0},
@@ -401,417 +401,433 @@ static arc arcs_21_0[1] = {
{12, 1},
};
static arc arcs_21_1[2] = {
- {52, 0},
+ {12, 2},
{0, 1},
};
-static state states_21[2] = {
+static arc arcs_21_2[1] = {
+ {12, 3},
+};
+static arc arcs_21_3[1] = {
+ {0, 3},
+};
+static state states_21[4] = {
{1, arcs_21_0},
{2, arcs_21_1},
+ {1, arcs_21_2},
+ {1, arcs_21_3},
};
static arc arcs_22_0[1] = {
- {53, 1},
+ {52, 1},
};
-static arc arcs_22_1[1] = {
+static arc arcs_22_1[2] = {
{12, 2},
+ {0, 1},
};
-static arc arcs_22_2[2] = {
- {22, 1},
- {0, 2},
+static arc arcs_22_2[1] = {
+ {12, 3},
};
-static state states_22[3] = {
+static arc arcs_22_3[1] = {
+ {0, 3},
+};
+static state states_22[4] = {
{1, arcs_22_0},
- {1, arcs_22_1},
- {2, arcs_22_2},
+ {2, arcs_22_1},
+ {1, arcs_22_2},
+ {1, arcs_22_3},
};
static arc arcs_23_0[1] = {
- {54, 1},
+ {12, 1},
+};
+static arc arcs_23_1[2] = {
+ {54, 0},
+ {0, 1},
+};
+static state states_23[2] = {
+ {1, arcs_23_0},
+ {2, arcs_23_1},
+};
+static arc arcs_24_0[1] = {
+ {55, 1},
+};
+static arc arcs_24_1[1] = {
+ {12, 2},
+};
+static arc arcs_24_2[2] = {
+ {22, 1},
+ {0, 2},
+};
+static state states_24[3] = {
+ {1, arcs_24_0},
+ {1, arcs_24_1},
+ {2, arcs_24_2},
+};
+static arc arcs_25_0[1] = {
+ {56, 1},
};
-static arc arcs_23_1[1] = {
- {55, 2},
+static arc arcs_25_1[1] = {
+ {57, 2},
};
-static arc arcs_23_2[2] = {
- {56, 3},
+static arc arcs_25_2[2] = {
+ {58, 3},
{0, 2},
};
-static arc arcs_23_3[1] = {
+static arc arcs_25_3[1] = {
{21, 4},
};
-static arc arcs_23_4[2] = {
+static arc arcs_25_4[2] = {
{22, 5},
{0, 4},
};
-static arc arcs_23_5[1] = {
+static arc arcs_25_5[1] = {
{21, 6},
};
-static arc arcs_23_6[1] = {
+static arc arcs_25_6[1] = {
{0, 6},
};
-static state states_23[7] = {
- {1, arcs_23_0},
- {1, arcs_23_1},
- {2, arcs_23_2},
- {1, arcs_23_3},
- {2, arcs_23_4},
- {1, arcs_23_5},
- {1, arcs_23_6},
+static state states_25[7] = {
+ {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_24_0[1] = {
- {57, 1},
+static arc arcs_26_0[1] = {
+ {59, 1},
};
-static arc arcs_24_1[1] = {
+static arc arcs_26_1[1] = {
{21, 2},
};
-static arc arcs_24_2[2] = {
+static arc arcs_26_2[2] = {
{22, 3},
{0, 2},
};
-static arc arcs_24_3[1] = {
+static arc arcs_26_3[1] = {
{21, 4},
};
-static arc arcs_24_4[1] = {
+static arc arcs_26_4[1] = {
{0, 4},
};
-static state states_24[5] = {
- {1, arcs_24_0},
- {1, arcs_24_1},
- {2, arcs_24_2},
- {1, arcs_24_3},
- {1, arcs_24_4},
+static state states_26[5] = {
+ {1, arcs_26_0},
+ {1, arcs_26_1},
+ {2, arcs_26_2},
+ {1, arcs_26_3},
+ {1, arcs_26_4},
};
-static arc arcs_25_0[6] = {
- {58, 1},
- {59, 1},
+static arc arcs_27_0[6] = {
{60, 1},
{61, 1},
- {10, 1},
{62, 1},
+ {63, 1},
+ {10, 1},
+ {64, 1},
};
-static arc arcs_25_1[1] = {
+static arc arcs_27_1[1] = {
{0, 1},
};
-static state states_25[2] = {
- {6, arcs_25_0},
- {1, arcs_25_1},
+static state states_27[2] = {
+ {6, arcs_27_0},
+ {1, arcs_27_1},
};
-static arc arcs_26_0[1] = {
- {63, 1},
+static arc arcs_28_0[1] = {
+ {65, 1},
};
-static arc arcs_26_1[1] = {
+static arc arcs_28_1[1] = {
{21, 2},
};
-static arc arcs_26_2[1] = {
+static arc arcs_28_2[1] = {
{14, 3},
};
-static arc arcs_26_3[1] = {
+static arc arcs_28_3[1] = {
{15, 4},
};
-static arc arcs_26_4[3] = {
- {64, 1},
- {65, 5},
+static arc arcs_28_4[3] = {
+ {66, 1},
+ {67, 5},
{0, 4},
};
-static arc arcs_26_5[1] = {
+static arc arcs_28_5[1] = {
{14, 6},
};
-static arc arcs_26_6[1] = {
+static arc arcs_28_6[1] = {
{15, 7},
};
-static arc arcs_26_7[1] = {
+static arc arcs_28_7[1] = {
{0, 7},
};
-static state states_26[8] = {
- {1, arcs_26_0},
- {1, arcs_26_1},
- {1, arcs_26_2},
- {1, arcs_26_3},
- {3, arcs_26_4},
- {1, arcs_26_5},
- {1, arcs_26_6},
- {1, arcs_26_7},
+static state states_28[8] = {
+ {1, 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_27_0[1] = {
- {66, 1},
+static arc arcs_29_0[1] = {
+ {68, 1},
};
-static arc arcs_27_1[1] = {
+static arc arcs_29_1[1] = {
{21, 2},
};
-static arc arcs_27_2[1] = {
+static arc arcs_29_2[1] = {
{14, 3},
};
-static arc arcs_27_3[1] = {
+static arc arcs_29_3[1] = {
{15, 4},
};
-static arc arcs_27_4[2] = {
- {65, 5},
+static arc arcs_29_4[2] = {
+ {67, 5},
{0, 4},
};
-static arc arcs_27_5[1] = {
+static arc arcs_29_5[1] = {
{14, 6},
};
-static arc arcs_27_6[1] = {
+static arc arcs_29_6[1] = {
{15, 7},
};
-static arc arcs_27_7[1] = {
+static arc arcs_29_7[1] = {
{0, 7},
};
-static state states_27[8] = {
- {1, arcs_27_0},
- {1, arcs_27_1},
- {1, arcs_27_2},
- {1, arcs_27_3},
- {2, arcs_27_4},
- {1, arcs_27_5},
- {1, arcs_27_6},
- {1, arcs_27_7},
+static state states_29[8] = {
+ {1, arcs_29_0},
+ {1, arcs_29_1},
+ {1, arcs_29_2},
+ {1, arcs_29_3},
+ {2, arcs_29_4},
+ {1, arcs_29_5},
+ {1, arcs_29_6},
+ {1, arcs_29_7},
};
-static arc arcs_28_0[1] = {
- {67, 1},
+static arc arcs_30_0[1] = {
+ {69, 1},
};
-static arc arcs_28_1[1] = {
+static arc arcs_30_1[1] = {
{39, 2},
};
-static arc arcs_28_2[1] = {
- {56, 3},
+static arc arcs_30_2[1] = {
+ {58, 3},
};
-static arc arcs_28_3[1] = {
+static arc arcs_30_3[1] = {
{9, 4},
};
-static arc arcs_28_4[1] = {
+static arc arcs_30_4[1] = {
{14, 5},
};
-static arc arcs_28_5[1] = {
+static arc arcs_30_5[1] = {
{15, 6},
};
-static arc arcs_28_6[2] = {
- {65, 7},
+static arc arcs_30_6[2] = {
+ {67, 7},
{0, 6},
};
-static arc arcs_28_7[1] = {
+static arc arcs_30_7[1] = {
{14, 8},
};
-static arc arcs_28_8[1] = {
+static arc arcs_30_8[1] = {
{15, 9},
};
-static arc arcs_28_9[1] = {
+static arc arcs_30_9[1] = {
{0, 9},
};
-static state states_28[10] = {
- {1, arcs_28_0},
- {1, arcs_28_1},
- {1, arcs_28_2},
- {1, arcs_28_3},
- {1, arcs_28_4},
- {1, arcs_28_5},
- {2, arcs_28_6},
- {1, arcs_28_7},
- {1, arcs_28_8},
- {1, arcs_28_9},
+static state states_30[10] = {
+ {1, arcs_30_0},
+ {1, arcs_30_1},
+ {1, arcs_30_2},
+ {1, arcs_30_3},
+ {1, arcs_30_4},
+ {1, arcs_30_5},
+ {2, arcs_30_6},
+ {1, arcs_30_7},
+ {1, arcs_30_8},
+ {1, arcs_30_9},
};
-static arc arcs_29_0[1] = {
- {68, 1},
+static arc arcs_31_0[1] = {
+ {70, 1},
};
-static arc arcs_29_1[1] = {
+static arc arcs_31_1[1] = {
{14, 2},
};
-static arc arcs_29_2[1] = {
+static arc arcs_31_2[1] = {
{15, 3},
};
-static arc arcs_29_3[2] = {
- {69, 4},
- {70, 5},
+static arc arcs_31_3[2] = {
+ {71, 4},
+ {72, 5},
};
-static arc arcs_29_4[1] = {
+static arc arcs_31_4[1] = {
{14, 6},
};
-static arc arcs_29_5[1] = {
+static arc arcs_31_5[1] = {
{14, 7},
};
-static arc arcs_29_6[1] = {
+static arc arcs_31_6[1] = {
{15, 8},
};
-static arc arcs_29_7[1] = {
+static arc arcs_31_7[1] = {
{15, 9},
};
-static arc arcs_29_8[3] = {
- {69, 4},
- {65, 5},
+static arc arcs_31_8[3] = {
+ {71, 4},
+ {67, 5},
{0, 8},
};
-static arc arcs_29_9[1] = {
+static arc arcs_31_9[1] = {
{0, 9},
};
-static state states_29[10] = {
- {1, arcs_29_0},
- {1, arcs_29_1},
- {1, arcs_29_2},
- {2, arcs_29_3},
- {1, arcs_29_4},
- {1, arcs_29_5},
- {1, arcs_29_6},
- {1, arcs_29_7},
- {3, arcs_29_8},
- {1, arcs_29_9},
-};
-static arc arcs_30_0[1] = {
- {71, 1},
+static state states_31[10] = {
+ {1, arcs_31_0},
+ {1, arcs_31_1},
+ {1, arcs_31_2},
+ {2, arcs_31_3},
+ {1, arcs_31_4},
+ {1, arcs_31_5},
+ {1, arcs_31_6},
+ {1, arcs_31_7},
+ {3, arcs_31_8},
+ {1, arcs_31_9},
+};
+static arc arcs_32_0[1] = {
+ {73, 1},
};
-static arc arcs_30_1[2] = {
+static arc arcs_32_1[2] = {
{21, 2},
{0, 1},
};
-static arc arcs_30_2[2] = {
+static arc arcs_32_2[2] = {
{22, 3},
{0, 2},
};
-static arc arcs_30_3[1] = {
+static arc arcs_32_3[1] = {
{21, 4},
};
-static arc arcs_30_4[1] = {
+static arc arcs_32_4[1] = {
{0, 4},
};
-static state states_30[5] = {
- {1, arcs_30_0},
- {2, arcs_30_1},
- {2, arcs_30_2},
- {1, arcs_30_3},
- {1, arcs_30_4},
+static state states_32[5] = {
+ {1, arcs_32_0},
+ {2, arcs_32_1},
+ {2, arcs_32_2},
+ {1, arcs_32_3},
+ {1, arcs_32_4},
};
-static arc arcs_31_0[2] = {
+static arc arcs_33_0[2] = {
{3, 1},
{2, 2},
};
-static arc arcs_31_1[1] = {
+static arc arcs_33_1[1] = {
{0, 1},
};
-static arc arcs_31_2[1] = {
- {72, 3},
+static arc arcs_33_2[1] = {
+ {74, 3},
};
-static arc arcs_31_3[1] = {
+static arc arcs_33_3[1] = {
{6, 4},
};
-static arc arcs_31_4[2] = {
+static arc arcs_33_4[2] = {
{6, 4},
- {73, 1},
-};
-static state states_31[5] = {
- {2, arcs_31_0},
- {1, arcs_31_1},
- {1, arcs_31_2},
- {1, arcs_31_3},
- {2, arcs_31_4},
-};
-static arc arcs_32_0[2] = {
- {74, 1},
- {76, 2},
-};
-static arc arcs_32_1[2] = {
- {75, 3},
- {0, 1},
-};
-static arc arcs_32_2[1] = {
- {0, 2},
-};
-static arc arcs_32_3[1] = {
- {74, 1},
-};
-static state states_32[4] = {
- {2, arcs_32_0},
- {2, arcs_32_1},
- {1, arcs_32_2},
- {1, arcs_32_3},
-};
-static arc arcs_33_0[1] = {
- {77, 1},
-};
-static arc arcs_33_1[2] = {
- {78, 0},
- {0, 1},
+ {75, 1},
};
-static state states_33[2] = {
- {1, arcs_33_0},
- {2, arcs_33_1},
+static state states_33[5] = {
+ {2, arcs_33_0},
+ {1, arcs_33_1},
+ {1, arcs_33_2},
+ {1, arcs_33_3},
+ {2, arcs_33_4},
};
static arc arcs_34_0[2] = {
- {79, 1},
- {80, 2},
+ {76, 1},
+ {78, 2},
};
-static arc arcs_34_1[1] = {
- {77, 2},
+static arc arcs_34_1[2] = {
+ {77, 3},
+ {0, 1},
};
static arc arcs_34_2[1] = {
{0, 2},
};
-static state states_34[3] = {
+static arc arcs_34_3[1] = {
+ {76, 1},
+};
+static state states_34[4] = {
{2, arcs_34_0},
- {1, arcs_34_1},
+ {2, arcs_34_1},
{1, arcs_34_2},
+ {1, arcs_34_3},
};
static arc arcs_35_0[1] = {
- {55, 1},
+ {79, 1},
};
static arc arcs_35_1[2] = {
- {81, 0},
+ {80, 0},
{0, 1},
};
static state states_35[2] = {
{1, arcs_35_0},
{2, arcs_35_1},
};
-static arc arcs_36_0[10] = {
- {82, 1},
- {83, 1},
- {84, 1},
- {85, 1},
- {86, 1},
- {87, 1},
- {88, 1},
- {56, 1},
- {79, 2},
- {89, 3},
+static arc arcs_36_0[2] = {
+ {81, 1},
+ {82, 2},
};
static arc arcs_36_1[1] = {
- {0, 1},
+ {79, 2},
};
static arc arcs_36_2[1] = {
- {56, 1},
-};
-static arc arcs_36_3[2] = {
- {79, 1},
- {0, 3},
+ {0, 2},
};
-static state states_36[4] = {
- {10, arcs_36_0},
+static state states_36[3] = {
+ {2, arcs_36_0},
{1, arcs_36_1},
{1, arcs_36_2},
- {2, arcs_36_3},
};
static arc arcs_37_0[1] = {
- {90, 1},
+ {57, 1},
};
static arc arcs_37_1[2] = {
- {91, 0},
+ {83, 0},
{0, 1},
};
static state states_37[2] = {
{1, arcs_37_0},
{2, arcs_37_1},
};
-static arc arcs_38_0[1] = {
- {92, 1},
+static arc arcs_38_0[10] = {
+ {84, 1},
+ {85, 1},
+ {86, 1},
+ {87, 1},
+ {88, 1},
+ {89, 1},
+ {90, 1},
+ {58, 1},
+ {81, 2},
+ {91, 3},
};
-static arc arcs_38_1[2] = {
- {93, 0},
+static arc arcs_38_1[1] = {
{0, 1},
};
-static state states_38[2] = {
- {1, arcs_38_0},
- {2, arcs_38_1},
+static arc arcs_38_2[1] = {
+ {58, 1},
+};
+static arc arcs_38_3[2] = {
+ {81, 1},
+ {0, 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_0[1] = {
- {94, 1},
+ {92, 1},
};
static arc arcs_39_1[2] = {
- {95, 0},
+ {93, 0},
{0, 1},
};
static state states_39[2] = {
@@ -819,640 +835,666 @@ static state states_39[2] = {
{2, arcs_39_1},
};
static arc arcs_40_0[1] = {
- {96, 1},
+ {94, 1},
};
-static arc arcs_40_1[3] = {
- {97, 0},
- {98, 0},
+static arc arcs_40_1[2] = {
+ {95, 0},
{0, 1},
};
static state states_40[2] = {
{1, arcs_40_0},
- {3, arcs_40_1},
+ {2, arcs_40_1},
};
static arc arcs_41_0[1] = {
- {99, 1},
+ {96, 1},
};
-static arc arcs_41_1[3] = {
- {100, 0},
- {101, 0},
+static arc arcs_41_1[2] = {
+ {97, 0},
{0, 1},
};
static state states_41[2] = {
{1, arcs_41_0},
- {3, arcs_41_1},
+ {2, arcs_41_1},
};
static arc arcs_42_0[1] = {
- {102, 1},
+ {98, 1},
};
-static arc arcs_42_1[4] = {
- {23, 0},
- {103, 0},
- {104, 0},
+static arc arcs_42_1[3] = {
+ {99, 0},
+ {100, 0},
{0, 1},
};
static state states_42[2] = {
{1, arcs_42_0},
- {4, arcs_42_1},
+ {3, arcs_42_1},
};
-static arc arcs_43_0[4] = {
- {100, 1},
+static arc arcs_43_0[1] = {
{101, 1},
- {105, 1},
- {106, 2},
};
-static arc arcs_43_1[1] = {
- {102, 2},
-};
-static arc arcs_43_2[1] = {
- {0, 2},
+static arc arcs_43_1[3] = {
+ {102, 0},
+ {103, 0},
+ {0, 1},
};
-static state states_43[3] = {
- {4, arcs_43_0},
- {1, arcs_43_1},
- {1, arcs_43_2},
+static state states_43[2] = {
+ {1, arcs_43_0},
+ {3, arcs_43_1},
};
static arc arcs_44_0[1] = {
+ {104, 1},
+};
+static arc arcs_44_1[4] = {
+ {23, 0},
+ {105, 0},
+ {106, 0},
+ {0, 1},
+};
+static state states_44[2] = {
+ {1, arcs_44_0},
+ {4, arcs_44_1},
+};
+static arc arcs_45_0[4] = {
+ {102, 1},
+ {103, 1},
{107, 1},
+ {108, 2},
+};
+static arc arcs_45_1[1] = {
+ {104, 2},
+};
+static arc arcs_45_2[1] = {
+ {0, 2},
+};
+static state states_45[3] = {
+ {4, arcs_45_0},
+ {1, arcs_45_1},
+ {1, arcs_45_2},
+};
+static arc arcs_46_0[1] = {
+ {109, 1},
};
-static arc arcs_44_1[3] = {
- {108, 1},
+static arc arcs_46_1[3] = {
+ {110, 1},
{24, 2},
{0, 1},
};
-static arc arcs_44_2[1] = {
- {102, 3},
+static arc arcs_46_2[1] = {
+ {104, 3},
};
-static arc arcs_44_3[2] = {
+static arc arcs_46_3[2] = {
{24, 2},
{0, 3},
};
-static state states_44[4] = {
- {1, arcs_44_0},
- {3, arcs_44_1},
- {1, arcs_44_2},
- {2, arcs_44_3},
+static state states_46[4] = {
+ {1, arcs_46_0},
+ {3, arcs_46_1},
+ {1, arcs_46_2},
+ {2, arcs_46_3},
};
-static arc arcs_45_0[7] = {
+static arc arcs_47_0[7] = {
{16, 1},
- {109, 2},
- {112, 3},
- {115, 4},
+ {111, 2},
+ {114, 3},
+ {117, 4},
{12, 5},
- {116, 5},
- {117, 6},
+ {118, 5},
+ {119, 6},
};
-static arc arcs_45_1[2] = {
+static arc arcs_47_1[2] = {
{9, 7},
{18, 5},
};
-static arc arcs_45_2[2] = {
- {110, 8},
- {111, 5},
+static arc arcs_47_2[2] = {
+ {112, 8},
+ {113, 5},
};
-static arc arcs_45_3[2] = {
- {113, 9},
- {114, 5},
+static arc arcs_47_3[2] = {
+ {115, 9},
+ {116, 5},
};
-static arc arcs_45_4[1] = {
+static arc arcs_47_4[1] = {
{9, 10},
};
-static arc arcs_45_5[1] = {
+static arc arcs_47_5[1] = {
{0, 5},
};
-static arc arcs_45_6[2] = {
- {117, 6},
+static arc arcs_47_6[2] = {
+ {119, 6},
{0, 6},
};
-static arc arcs_45_7[1] = {
+static arc arcs_47_7[1] = {
{18, 5},
};
-static arc arcs_45_8[1] = {
- {111, 5},
-};
-static arc arcs_45_9[1] = {
- {114, 5},
+static arc arcs_47_8[1] = {
+ {113, 5},
};
-static arc arcs_45_10[1] = {
- {115, 5},
+static arc arcs_47_9[1] = {
+ {116, 5},
};
-static state states_45[11] = {
- {7, arcs_45_0},
- {2, arcs_45_1},
- {2, arcs_45_2},
- {2, arcs_45_3},
- {1, arcs_45_4},
- {1, arcs_45_5},
- {2, arcs_45_6},
- {1, arcs_45_7},
- {1, arcs_45_8},
- {1, arcs_45_9},
- {1, arcs_45_10},
+static arc arcs_47_10[1] = {
+ {117, 5},
};
-static arc arcs_46_0[1] = {
+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] = {
{21, 1},
};
-static arc arcs_46_1[3] = {
- {118, 2},
+static arc arcs_48_1[3] = {
+ {120, 2},
{22, 3},
{0, 1},
};
-static arc arcs_46_2[1] = {
+static arc arcs_48_2[1] = {
{0, 2},
};
-static arc arcs_46_3[2] = {
+static arc arcs_48_3[2] = {
{21, 4},
{0, 3},
};
-static arc arcs_46_4[2] = {
+static arc arcs_48_4[2] = {
{22, 3},
{0, 4},
};
-static state states_46[5] = {
- {1, arcs_46_0},
- {3, arcs_46_1},
- {1, arcs_46_2},
- {2, arcs_46_3},
- {2, arcs_46_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 arc arcs_47_0[1] = {
- {119, 1},
+static arc arcs_49_0[1] = {
+ {121, 1},
};
-static arc arcs_47_1[2] = {
+static arc arcs_49_1[2] = {
{17, 2},
{14, 3},
};
-static arc arcs_47_2[1] = {
+static arc arcs_49_2[1] = {
{14, 3},
};
-static arc arcs_47_3[1] = {
+static arc arcs_49_3[1] = {
{21, 4},
};
-static arc arcs_47_4[1] = {
+static arc arcs_49_4[1] = {
{0, 4},
};
-static state states_47[5] = {
- {1, arcs_47_0},
- {2, arcs_47_1},
- {1, arcs_47_2},
- {1, arcs_47_3},
- {1, arcs_47_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 arc arcs_48_0[3] = {
+static arc arcs_50_0[3] = {
{16, 1},
- {109, 2},
- {52, 3},
+ {111, 2},
+ {54, 3},
};
-static arc arcs_48_1[2] = {
- {120, 4},
+static arc arcs_50_1[2] = {
+ {122, 4},
{18, 5},
};
-static arc arcs_48_2[1] = {
- {121, 6},
+static arc arcs_50_2[1] = {
+ {123, 6},
};
-static arc arcs_48_3[1] = {
+static arc arcs_50_3[1] = {
{12, 5},
};
-static arc arcs_48_4[1] = {
+static arc arcs_50_4[1] = {
{18, 5},
};
-static arc arcs_48_5[1] = {
+static arc arcs_50_5[1] = {
{0, 5},
};
-static arc arcs_48_6[1] = {
- {111, 5},
+static arc arcs_50_6[1] = {
+ {113, 5},
};
-static state states_48[7] = {
- {3, arcs_48_0},
- {2, arcs_48_1},
- {1, arcs_48_2},
- {1, arcs_48_3},
- {1, arcs_48_4},
- {1, arcs_48_5},
- {1, arcs_48_6},
+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 arc arcs_49_0[1] = {
- {122, 1},
+static arc arcs_51_0[1] = {
+ {124, 1},
};
-static arc arcs_49_1[2] = {
+static arc arcs_51_1[2] = {
{22, 2},
{0, 1},
};
-static arc arcs_49_2[2] = {
- {122, 1},
+static arc arcs_51_2[2] = {
+ {124, 1},
{0, 2},
};
-static state states_49[3] = {
- {1, arcs_49_0},
- {2, arcs_49_1},
- {2, arcs_49_2},
+static state states_51[3] = {
+ {1, arcs_51_0},
+ {2, arcs_51_1},
+ {2, arcs_51_2},
};
-static arc arcs_50_0[3] = {
- {52, 1},
+static arc arcs_52_0[3] = {
+ {54, 1},
{21, 2},
{14, 3},
};
-static arc arcs_50_1[1] = {
- {52, 4},
+static arc arcs_52_1[1] = {
+ {54, 4},
};
-static arc arcs_50_2[2] = {
+static arc arcs_52_2[2] = {
{14, 3},
{0, 2},
};
-static arc arcs_50_3[3] = {
+static arc arcs_52_3[3] = {
{21, 5},
- {123, 6},
+ {125, 6},
{0, 3},
};
-static arc arcs_50_4[1] = {
- {52, 6},
+static arc arcs_52_4[1] = {
+ {54, 6},
};
-static arc arcs_50_5[2] = {
- {123, 6},
+static arc arcs_52_5[2] = {
+ {125, 6},
{0, 5},
};
-static arc arcs_50_6[1] = {
+static arc arcs_52_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 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_51_0[1] = {
+static arc arcs_53_0[1] = {
{14, 1},
};
-static arc arcs_51_1[2] = {
+static arc arcs_53_1[2] = {
{21, 2},
{0, 1},
};
-static arc arcs_51_2[1] = {
+static arc arcs_53_2[1] = {
{0, 2},
};
-static state states_51[3] = {
- {1, arcs_51_0},
- {2, arcs_51_1},
- {1, arcs_51_2},
+static state states_53[3] = {
+ {1, arcs_53_0},
+ {2, arcs_53_1},
+ {1, arcs_53_2},
};
-static arc arcs_52_0[1] = {
- {55, 1},
+static arc arcs_54_0[1] = {
+ {57, 1},
};
-static arc arcs_52_1[2] = {
+static arc arcs_54_1[2] = {
{22, 2},
{0, 1},
};
-static arc arcs_52_2[2] = {
- {55, 1},
+static arc arcs_54_2[2] = {
+ {57, 1},
{0, 2},
};
-static state states_52[3] = {
- {1, arcs_52_0},
- {2, arcs_52_1},
- {2, arcs_52_2},
+static state states_54[3] = {
+ {1, arcs_54_0},
+ {2, arcs_54_1},
+ {2, arcs_54_2},
};
-static arc arcs_53_0[1] = {
+static arc arcs_55_0[1] = {
{21, 1},
};
-static arc arcs_53_1[2] = {
+static arc arcs_55_1[2] = {
{22, 2},
{0, 1},
};
-static arc arcs_53_2[2] = {
+static arc arcs_55_2[2] = {
{21, 1},
{0, 2},
};
-static state states_53[3] = {
- {1, arcs_53_0},
- {2, arcs_53_1},
- {2, arcs_53_2},
+static state states_55[3] = {
+ {1, arcs_55_0},
+ {2, arcs_55_1},
+ {2, arcs_55_2},
};
-static arc arcs_54_0[1] = {
+static arc arcs_56_0[1] = {
{21, 1},
};
-static arc arcs_54_1[1] = {
+static arc arcs_56_1[1] = {
{14, 2},
};
-static arc arcs_54_2[1] = {
+static arc arcs_56_2[1] = {
{21, 3},
};
-static arc arcs_54_3[2] = {
+static arc arcs_56_3[2] = {
{22, 4},
{0, 3},
};
-static arc arcs_54_4[2] = {
+static arc arcs_56_4[2] = {
{21, 1},
{0, 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 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 arc arcs_55_0[1] = {
- {124, 1},
+static arc arcs_57_0[1] = {
+ {126, 1},
};
-static arc arcs_55_1[1] = {
+static arc arcs_57_1[1] = {
{12, 2},
};
-static arc arcs_55_2[2] = {
+static arc arcs_57_2[2] = {
{16, 3},
{14, 4},
};
-static arc arcs_55_3[1] = {
+static arc arcs_57_3[1] = {
{9, 5},
};
-static arc arcs_55_4[1] = {
+static arc arcs_57_4[1] = {
{15, 6},
};
-static arc arcs_55_5[1] = {
+static arc arcs_57_5[1] = {
{18, 7},
};
-static arc arcs_55_6[1] = {
+static arc arcs_57_6[1] = {
{0, 6},
};
-static arc arcs_55_7[1] = {
+static arc arcs_57_7[1] = {
{14, 4},
};
-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_56_0[3] = {
- {125, 1},
+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},
{23, 2},
{24, 3},
};
-static arc arcs_56_1[2] = {
+static arc arcs_58_1[2] = {
{22, 4},
{0, 1},
};
-static arc arcs_56_2[1] = {
+static arc arcs_58_2[1] = {
{21, 5},
};
-static arc arcs_56_3[1] = {
+static arc arcs_58_3[1] = {
{21, 6},
};
-static arc arcs_56_4[4] = {
- {125, 1},
+static arc arcs_58_4[4] = {
+ {127, 1},
{23, 2},
{24, 3},
{0, 4},
};
-static arc arcs_56_5[2] = {
+static arc arcs_58_5[2] = {
{22, 7},
{0, 5},
};
-static arc arcs_56_6[1] = {
+static arc arcs_58_6[1] = {
{0, 6},
};
-static arc arcs_56_7[1] = {
+static arc arcs_58_7[1] = {
{24, 3},
};
-static state states_56[8] = {
- {3, arcs_56_0},
- {2, arcs_56_1},
- {1, arcs_56_2},
- {1, arcs_56_3},
- {4, arcs_56_4},
- {2, arcs_56_5},
- {1, arcs_56_6},
- {1, arcs_56_7},
+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 arc arcs_57_0[1] = {
+static arc arcs_59_0[1] = {
{21, 1},
};
-static arc arcs_57_1[2] = {
+static arc arcs_59_1[2] = {
{20, 2},
{0, 1},
};
-static arc arcs_57_2[1] = {
+static arc arcs_59_2[1] = {
{21, 3},
};
-static arc arcs_57_3[1] = {
+static arc arcs_59_3[1] = {
{0, 3},
};
-static state states_57[4] = {
- {1, arcs_57_0},
- {2, arcs_57_1},
- {1, arcs_57_2},
- {1, arcs_57_3},
+static state states_59[4] = {
+ {1, arcs_59_0},
+ {2, arcs_59_1},
+ {1, arcs_59_2},
+ {1, arcs_59_3},
};
-static arc arcs_58_0[2] = {
- {126, 1},
- {127, 1},
+static arc arcs_60_0[2] = {
+ {128, 1},
+ {129, 1},
};
-static arc arcs_58_1[1] = {
+static arc arcs_60_1[1] = {
{0, 1},
};
-static state states_58[2] = {
- {2, arcs_58_0},
- {1, arcs_58_1},
+static state states_60[2] = {
+ {2, arcs_60_0},
+ {1, arcs_60_1},
};
-static arc arcs_59_0[1] = {
- {67, 1},
+static arc arcs_61_0[1] = {
+ {69, 1},
};
-static arc arcs_59_1[1] = {
+static arc arcs_61_1[1] = {
{39, 2},
};
-static arc arcs_59_2[1] = {
- {56, 3},
+static arc arcs_61_2[1] = {
+ {58, 3},
};
-static arc arcs_59_3[1] = {
+static arc arcs_61_3[1] = {
{9, 4},
};
-static arc arcs_59_4[2] = {
- {118, 5},
+static arc arcs_61_4[2] = {
+ {120, 5},
{0, 4},
};
-static arc arcs_59_5[1] = {
+static arc arcs_61_5[1] = {
{0, 5},
};
-static state states_59[6] = {
- {1, arcs_59_0},
- {1, arcs_59_1},
- {1, arcs_59_2},
- {1, arcs_59_3},
- {2, arcs_59_4},
- {1, arcs_59_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 arc arcs_60_0[1] = {
- {63, 1},
+static arc arcs_62_0[1] = {
+ {65, 1},
};
-static arc arcs_60_1[1] = {
+static arc arcs_62_1[1] = {
{21, 2},
};
-static arc arcs_60_2[2] = {
- {118, 3},
+static arc arcs_62_2[2] = {
+ {120, 3},
{0, 2},
};
-static arc arcs_60_3[1] = {
+static arc arcs_62_3[1] = {
{0, 3},
};
-static state states_60[4] = {
- {1, arcs_60_0},
- {1, arcs_60_1},
- {2, arcs_60_2},
- {1, arcs_60_3},
+static state states_62[4] = {
+ {1, arcs_62_0},
+ {1, arcs_62_1},
+ {2, arcs_62_2},
+ {1, arcs_62_3},
};
-static dfa dfas[61] = {
+static dfa dfas[63] = {
{256, "single_input", 0, 3, states_0,
- "\004\030\001\000\140\341\153\202\034\200\000\000\060\042\271\020"},
+ "\004\030\001\000\140\341\213\011\162\000\002\000\300\210\344\102\000"},
{257, "file_input", 0, 2, states_1,
- "\204\030\001\000\140\341\153\202\034\200\000\000\060\042\271\020"},
+ "\204\030\001\000\140\341\213\011\162\000\002\000\300\210\344\102\000"},
{258, "eval_input", 0, 3, states_2,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
+ "\000\020\001\000\000\000\000\000\000\000\002\000\300\210\344\002\000"},
{259, "funcdef", 0, 6, states_3,
- "\000\010\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"},
{260, "parameters", 0, 4, states_4,
- "\000\000\001\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"},
{261, "varargslist", 0, 10, states_5,
- "\000\020\201\001\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"},
{262, "fpdef", 0, 4, states_6,
- "\000\020\001\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"},
{263, "fplist", 0, 3, states_7,
- "\000\020\001\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"},
{264, "stmt", 0, 2, states_8,
- "\000\030\001\000\140\341\153\202\034\200\000\000\060\042\271\020"},
+ "\000\030\001\000\140\341\213\011\162\000\002\000\300\210\344\102\000"},
{265, "simple_stmt", 0, 4, states_9,
- "\000\020\001\000\140\341\153\002\000\200\000\000\060\042\271\000"},
+ "\000\020\001\000\140\341\213\011\000\000\002\000\300\210\344\002\000"},
{266, "small_stmt", 0, 2, states_10,
- "\000\020\001\000\140\341\153\002\000\200\000\000\060\042\271\000"},
+ "\000\020\001\000\140\341\213\011\000\000\002\000\300\210\344\002\000"},
{267, "expr_stmt", 0, 2, states_11,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
+ "\000\020\001\000\000\000\000\000\000\000\002\000\300\210\344\002\000"},
{268, "print_stmt", 0, 3, states_12,
- "\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"},
+ "\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000"},
{269, "del_stmt", 0, 3, states_13,
- "\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"},
+ "\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000"},
{270, "pass_stmt", 0, 2, states_14,
- "\000\000\000\000\000\001\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"},
{271, "flow_stmt", 0, 2, states_15,
- "\000\000\000\000\000\340\001\000\000\000\000\000\000\000\000\000"},
+ "\000\000\000\000\000\340\001\000\000\000\000\000\000\000\000\000\000"},
{272, "break_stmt", 0, 2, states_16,
- "\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"},
+ "\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"},
{273, "continue_stmt", 0, 2, states_17,
- "\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000"},
+ "\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"},
{274, "return_stmt", 0, 3, states_18,
- "\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"},
+ "\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000"},
{275, "raise_stmt", 0, 7, states_19,
- "\000\000\000\000\000\000\001\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"},
{276, "import_stmt", 0, 9, states_20,
- "\000\000\000\000\000\000\012\000\000\000\000\000\000\000\000\000"},
- {277, "dotted_name", 0, 2, states_21,
- "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {278, "global_stmt", 0, 3, states_22,
- "\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"},
- {279, "exec_stmt", 0, 7, states_23,
- "\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000"},
- {280, "assert_stmt", 0, 5, states_24,
- "\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"},
- {281, "compound_stmt", 0, 2, states_25,
- "\000\010\000\000\000\000\000\200\034\000\000\000\000\000\000\020"},
- {282, "if_stmt", 0, 8, states_26,
- "\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"},
- {283, "while_stmt", 0, 8, states_27,
- "\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000"},
- {284, "for_stmt", 0, 10, states_28,
- "\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000"},
- {285, "try_stmt", 0, 10, states_29,
- "\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000"},
- {286, "except_clause", 0, 5, states_30,
- "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000"},
- {287, "suite", 0, 5, states_31,
- "\004\020\001\000\140\341\153\002\000\200\000\000\060\042\271\000"},
- {288, "test", 0, 4, states_32,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
- {289, "and_test", 0, 2, states_33,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\071\000"},
- {290, "not_test", 0, 3, states_34,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\071\000"},
- {291, "comparison", 0, 2, states_35,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {292, "comp_op", 0, 4, states_36,
- "\000\000\000\000\000\000\000\001\000\200\374\003\000\000\000\000"},
- {293, "expr", 0, 2, states_37,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {294, "xor_expr", 0, 2, states_38,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {295, "and_expr", 0, 2, states_39,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {296, "shift_expr", 0, 2, states_40,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {297, "arith_expr", 0, 2, states_41,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {298, "term", 0, 2, states_42,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {299, "factor", 0, 3, states_43,
- "\000\020\001\000\000\000\000\000\000\000\000\000\060\042\071\000"},
- {300, "power", 0, 4, states_44,
- "\000\020\001\000\000\000\000\000\000\000\000\000\000\040\071\000"},
- {301, "atom", 0, 11, states_45,
- "\000\020\001\000\000\000\000\000\000\000\000\000\000\040\071\000"},
- {302, "listmaker", 0, 5, states_46,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
- {303, "lambdef", 0, 5, states_47,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"},
- {304, "trailer", 0, 7, states_48,
- "\000\000\001\000\000\000\020\000\000\000\000\000\000\040\000\000"},
- {305, "subscriptlist", 0, 3, states_49,
- "\000\120\001\000\000\000\020\000\000\200\000\000\060\042\271\000"},
- {306, "subscript", 0, 7, states_50,
- "\000\120\001\000\000\000\020\000\000\200\000\000\060\042\271\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\060\042\071\000"},
- {309, "testlist", 0, 3, states_53,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
- {310, "dictmaker", 0, 5, states_54,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
- {311, "classdef", 0, 8, states_55,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020"},
- {312, "arglist", 0, 8, states_56,
- "\000\020\201\001\000\000\000\000\000\200\000\000\060\042\271\000"},
- {313, "argument", 0, 4, states_57,
- "\000\020\001\000\000\000\000\000\000\200\000\000\060\042\271\000"},
- {314, "list_iter", 0, 2, states_58,
- "\000\000\000\000\000\000\000\200\010\000\000\000\000\000\000\000"},
- {315, "list_for", 0, 6, states_59,
- "\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000"},
- {316, "list_if", 0, 4, states_60,
- "\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"},
-};
-static label labels[128] = {
+ "\000\000\000\000\000\000\012\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\200\000\000\000\000\000\000\000\000\000\000"},
+ {281, "exec_stmt", 0, 7, states_25,
+ "\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"},
+ {282, "assert_stmt", 0, 5, states_26,
+ "\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"},
+ {283, "compound_stmt", 0, 2, states_27,
+ "\000\010\000\000\000\000\000\000\162\000\000\000\000\000\000\100\000"},
+ {284, "if_stmt", 0, 8, states_28,
+ "\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"},
+ {285, "while_stmt", 0, 8, states_29,
+ "\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000"},
+ {286, "for_stmt", 0, 10, states_30,
+ "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000"},
+ {287, "try_stmt", 0, 10, states_31,
+ "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"},
+ {288, "except_clause", 0, 5, states_32,
+ "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000"},
+ {289, "suite", 0, 5, states_33,
+ "\004\020\001\000\140\341\213\011\000\000\002\000\300\210\344\002\000"},
+ {290, "test", 0, 4, states_34,
+ "\000\020\001\000\000\000\000\000\000\000\002\000\300\210\344\002\000"},
+ {291, "and_test", 0, 2, states_35,
+ "\000\020\001\000\000\000\000\000\000\000\002\000\300\210\344\000\000"},
+ {292, "not_test", 0, 3, states_36,
+ "\000\020\001\000\000\000\000\000\000\000\002\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\004\000\000\362\017\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\002\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\100\000\000\000\000\000\000\200\000\000\000"},
+ {307, "subscriptlist", 0, 3, states_51,
+ "\000\120\001\000\000\000\100\000\000\000\002\000\300\210\344\002\000"},
+ {308, "subscript", 0, 7, states_52,
+ "\000\120\001\000\000\000\100\000\000\000\002\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\002\000\300\210\344\002\000"},
+ {312, "dictmaker", 0, 5, states_56,
+ "\000\020\001\000\000\000\000\000\000\000\002\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\002\000\300\210\344\002\000"},
+ {315, "argument", 0, 4, states_59,
+ "\000\020\001\000\000\000\000\000\000\000\002\000\300\210\344\002\000"},
+ {316, "list_iter", 0, 2, states_60,
+ "\000\000\000\000\000\000\000\000\042\000\000\000\000\000\000\000\000"},
+ {317, "list_for", 0, 6, states_61,
+ "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000"},
+ {318, "list_if", 0, 4, states_62,
+ "\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"},
+};
+static label labels[130] = {
{0, "EMPTY"},
{256, 0},
{4, 0},
{265, 0},
- {281, 0},
+ {283, 0},
{257, 0},
{264, 0},
{0, 0},
{258, 0},
- {309, 0},
+ {311, 0},
{259, 0},
{1, "def"},
{1, 0},
{260, 0},
{11, 0},
- {287, 0},
+ {289, 0},
{7, 0},
{261, 0},
{8, 0},
{262, 0},
{22, 0},
- {288, 0},
+ {290, 0},
{12, 0},
{16, 0},
{36, 0},
@@ -1465,12 +1507,12 @@ static label labels[128] = {
{270, 0},
{271, 0},
{276, 0},
- {278, 0},
- {279, 0},
{280, 0},
+ {281, 0},
+ {282, 0},
{1, "print"},
{1, "del"},
- {308, 0},
+ {310, 0},
{1, "pass"},
{272, 0},
{273, 0},
@@ -1481,38 +1523,40 @@ static label labels[128] = {
{1, "return"},
{1, "raise"},
{1, "import"},
- {277, 0},
+ {278, 0},
{1, "from"},
+ {279, 0},
+ {277, 0},
{23, 0},
{1, "global"},
{1, "exec"},
- {293, 0},
+ {295, 0},
{1, "in"},
{1, "assert"},
- {282, 0},
- {283, 0},
{284, 0},
{285, 0},
- {311, 0},
+ {286, 0},
+ {287, 0},
+ {313, 0},
{1, "if"},
{1, "elif"},
{1, "else"},
{1, "while"},
{1, "for"},
{1, "try"},
- {286, 0},
+ {288, 0},
{1, "finally"},
{1, "except"},
{5, 0},
{6, 0},
- {289, 0},
+ {291, 0},
{1, "or"},
- {303, 0},
- {290, 0},
+ {305, 0},
+ {292, 0},
{1, "and"},
{1, "not"},
- {291, 0},
- {292, 0},
+ {293, 0},
+ {294, 0},
{20, 0},
{21, 0},
{28, 0},
@@ -1521,48 +1565,48 @@ static label labels[128] = {
{29, 0},
{29, 0},
{1, "is"},
- {294, 0},
+ {296, 0},
{18, 0},
- {295, 0},
+ {297, 0},
{33, 0},
- {296, 0},
+ {298, 0},
{19, 0},
- {297, 0},
+ {299, 0},
{34, 0},
{35, 0},
- {298, 0},
+ {300, 0},
{14, 0},
{15, 0},
- {299, 0},
+ {301, 0},
{17, 0},
{24, 0},
{32, 0},
- {300, 0},
- {301, 0},
- {304, 0},
- {9, 0},
{302, 0},
+ {303, 0},
+ {306, 0},
+ {9, 0},
+ {304, 0},
{10, 0},
{26, 0},
- {310, 0},
+ {312, 0},
{27, 0},
{25, 0},
{2, 0},
{3, 0},
- {314, 0},
+ {316, 0},
{1, "lambda"},
- {312, 0},
- {305, 0},
- {306, 0},
+ {314, 0},
{307, 0},
+ {308, 0},
+ {309, 0},
{1, "class"},
- {313, 0},
{315, 0},
- {316, 0},
+ {317, 0},
+ {318, 0},
};
grammar _PyParser_Grammar = {
- 61,
+ 63,
dfas,
- {128, labels},
+ {130, labels},
256
};
diff --git a/Python/import.c b/Python/import.c
index 9b30942..00250e9 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 (50811 | ((long)'\r'<<16) | ((long)'\n'<<24))
+#define MAGIC (50815 | ((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