summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-12-28 06:47:50 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-12-28 06:47:50 +0000
commitc150536b5efadf71fcb4187cad7258be7268e157 (patch)
treeaeb17f5e0ecc6cc8ccdecb2b64e3f46a0a3af85c /Python
parentf6657e67b3cf89649d14d9012b3964a3490d45b0 (diff)
downloadcpython-git-c150536b5efadf71fcb4187cad7258be7268e157.tar.gz
PEP 3107 - Function Annotations thanks to Tony Lownds
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c139
-rw-r--r--Python/ast.c303
-rw-r--r--Python/ceval.c28
-rw-r--r--Python/compile.c141
-rw-r--r--Python/graminit.c2665
-rw-r--r--Python/symtable.c73
6 files changed, 1927 insertions, 1422 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 2839c0b996..4cf686f51c 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -34,6 +34,7 @@ static char *FunctionDef_fields[]={
"args",
"body",
"decorators",
+ "returns",
};
static PyTypeObject *ClassDef_type;
static char *ClassDef_fields[]={
@@ -333,11 +334,24 @@ static PyObject* ast2obj_arguments(void*);
static char *arguments_fields[]={
"args",
"vararg",
+ "varargannotation",
"kwonlyargs",
"kwarg",
+ "kwargannotation",
"defaults",
"kw_defaults",
};
+static PyTypeObject *arg_type;
+static PyObject* ast2obj_arg(void*);
+static PyTypeObject *SimpleArg_type;
+static char *SimpleArg_fields[]={
+ "arg",
+ "annotation",
+};
+static PyTypeObject *NestedArgs_type;
+static char *NestedArgs_fields[]={
+ "args",
+};
static PyTypeObject *keyword_type;
static PyObject* ast2obj_keyword(void*);
static char *keyword_fields[]={
@@ -454,7 +468,7 @@ static int init_types(void)
if (!stmt_type) return 0;
if (!add_attributes(stmt_type, stmt_attributes, 2)) return 0;
FunctionDef_type = make_type("FunctionDef", stmt_type,
- FunctionDef_fields, 4);
+ FunctionDef_fields, 5);
if (!FunctionDef_type) return 0;
ClassDef_type = make_type("ClassDef", stmt_type, ClassDef_fields, 3);
if (!ClassDef_type) return 0;
@@ -710,8 +724,16 @@ static int init_types(void)
excepthandler_type = make_type("excepthandler", AST_type,
excepthandler_fields, 5);
if (!excepthandler_type) return 0;
- arguments_type = make_type("arguments", AST_type, arguments_fields, 6);
+ arguments_type = make_type("arguments", AST_type, arguments_fields, 8);
if (!arguments_type) return 0;
+ arg_type = make_type("arg", AST_type, NULL, 0);
+ if (!arg_type) return 0;
+ if (!add_attributes(arg_type, NULL, 0)) return 0;
+ SimpleArg_type = make_type("SimpleArg", arg_type, SimpleArg_fields, 2);
+ if (!SimpleArg_type) return 0;
+ NestedArgs_type = make_type("NestedArgs", arg_type, NestedArgs_fields,
+ 1);
+ if (!NestedArgs_type) return 0;
keyword_type = make_type("keyword", AST_type, keyword_fields, 2);
if (!keyword_type) return 0;
alias_type = make_type("alias", AST_type, alias_fields, 2);
@@ -783,7 +805,8 @@ Suite(asdl_seq * body, PyArena *arena)
stmt_ty
FunctionDef(identifier name, arguments_ty args, asdl_seq * body, asdl_seq *
- decorators, int lineno, int col_offset, PyArena *arena)
+ decorators, expr_ty returns, int lineno, int col_offset, PyArena
+ *arena)
{
stmt_ty p;
if (!name) {
@@ -806,6 +829,7 @@ FunctionDef(identifier name, arguments_ty args, asdl_seq * body, asdl_seq *
p->v.FunctionDef.args = args;
p->v.FunctionDef.body = body;
p->v.FunctionDef.decorators = decorators;
+ p->v.FunctionDef.returns = returns;
p->lineno = lineno;
p->col_offset = col_offset;
return p;
@@ -1830,8 +1854,9 @@ excepthandler(expr_ty type, expr_ty name, asdl_seq * body, int lineno, int
}
arguments_ty
-arguments(asdl_seq * args, identifier vararg, asdl_seq * kwonlyargs, identifier
- kwarg, asdl_seq * defaults, asdl_seq * kw_defaults, PyArena *arena)
+arguments(asdl_seq * args, identifier vararg, expr_ty varargannotation,
+ asdl_seq * kwonlyargs, identifier kwarg, expr_ty kwargannotation,
+ asdl_seq * defaults, asdl_seq * kw_defaults, PyArena *arena)
{
arguments_ty p;
p = (arguments_ty)PyArena_Malloc(arena, sizeof(*p));
@@ -1841,13 +1866,49 @@ arguments(asdl_seq * args, identifier vararg, asdl_seq * kwonlyargs, identifier
}
p->args = args;
p->vararg = vararg;
+ p->varargannotation = varargannotation;
p->kwonlyargs = kwonlyargs;
p->kwarg = kwarg;
+ p->kwargannotation = kwargannotation;
p->defaults = defaults;
p->kw_defaults = kw_defaults;
return p;
}
+arg_ty
+SimpleArg(identifier arg, expr_ty annotation, PyArena *arena)
+{
+ arg_ty p;
+ if (!arg) {
+ PyErr_SetString(PyExc_ValueError,
+ "field arg is required for SimpleArg");
+ return NULL;
+ }
+ p = (arg_ty)PyArena_Malloc(arena, sizeof(*p));
+ if (!p) {
+ PyErr_NoMemory();
+ return NULL;
+ }
+ p->kind = SimpleArg_kind;
+ p->v.SimpleArg.arg = arg;
+ p->v.SimpleArg.annotation = annotation;
+ return p;
+}
+
+arg_ty
+NestedArgs(asdl_seq * args, PyArena *arena)
+{
+ arg_ty p;
+ p = (arg_ty)PyArena_Malloc(arena, sizeof(*p));
+ if (!p) {
+ PyErr_NoMemory();
+ return NULL;
+ }
+ p->kind = NestedArgs_kind;
+ p->v.NestedArgs.args = args;
+ return p;
+}
+
keyword_ty
keyword(identifier arg, expr_ty value, PyArena *arena)
{
@@ -1981,6 +2042,11 @@ ast2obj_stmt(void* _o)
if (PyObject_SetAttrString(result, "decorators", value) == -1)
goto failed;
Py_DECREF(value);
+ value = ast2obj_expr(o->v.FunctionDef.returns);
+ if (!value) goto failed;
+ if (PyObject_SetAttrString(result, "returns", value) == -1)
+ goto failed;
+ Py_DECREF(value);
break;
case ClassDef_kind:
result = PyType_GenericNew(ClassDef_type, NULL, NULL);
@@ -2901,7 +2967,7 @@ ast2obj_arguments(void* _o)
result = PyType_GenericNew(arguments_type, NULL, NULL);
if (!result) return NULL;
- value = ast2obj_list(o->args, ast2obj_expr);
+ value = ast2obj_list(o->args, ast2obj_arg);
if (!value) goto failed;
if (PyObject_SetAttrString(result, "args", value) == -1)
goto failed;
@@ -2911,7 +2977,12 @@ ast2obj_arguments(void* _o)
if (PyObject_SetAttrString(result, "vararg", value) == -1)
goto failed;
Py_DECREF(value);
- value = ast2obj_list(o->kwonlyargs, ast2obj_expr);
+ value = ast2obj_expr(o->varargannotation);
+ if (!value) goto failed;
+ if (PyObject_SetAttrString(result, "varargannotation", value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_list(o->kwonlyargs, ast2obj_arg);
if (!value) goto failed;
if (PyObject_SetAttrString(result, "kwonlyargs", value) == -1)
goto failed;
@@ -2921,6 +2992,11 @@ ast2obj_arguments(void* _o)
if (PyObject_SetAttrString(result, "kwarg", value) == -1)
goto failed;
Py_DECREF(value);
+ value = ast2obj_expr(o->kwargannotation);
+ if (!value) goto failed;
+ if (PyObject_SetAttrString(result, "kwargannotation", value) == -1)
+ goto failed;
+ Py_DECREF(value);
value = ast2obj_list(o->defaults, ast2obj_expr);
if (!value) goto failed;
if (PyObject_SetAttrString(result, "defaults", value) == -1)
@@ -2939,6 +3015,48 @@ failed:
}
PyObject*
+ast2obj_arg(void* _o)
+{
+ arg_ty o = (arg_ty)_o;
+ PyObject *result = NULL, *value = NULL;
+ if (!o) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ switch (o->kind) {
+ case SimpleArg_kind:
+ result = PyType_GenericNew(SimpleArg_type, NULL, NULL);
+ if (!result) goto failed;
+ value = ast2obj_identifier(o->v.SimpleArg.arg);
+ if (!value) goto failed;
+ if (PyObject_SetAttrString(result, "arg", value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_expr(o->v.SimpleArg.annotation);
+ if (!value) goto failed;
+ if (PyObject_SetAttrString(result, "annotation", value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ break;
+ case NestedArgs_kind:
+ result = PyType_GenericNew(NestedArgs_type, NULL, NULL);
+ if (!result) goto failed;
+ value = ast2obj_list(o->v.NestedArgs.args, ast2obj_arg);
+ if (!value) goto failed;
+ if (PyObject_SetAttrString(result, "args", value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ break;
+ }
+ return result;
+failed:
+ Py_XDECREF(value);
+ Py_XDECREF(result);
+ return NULL;
+}
+
+PyObject*
ast2obj_keyword(void* _o)
{
keyword_ty o = (keyword_ty)_o;
@@ -3008,7 +3126,7 @@ init_ast(void)
if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return;
if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
return;
- if (PyModule_AddStringConstant(m, "__version__", "51773") < 0)
+ if (PyModule_AddStringConstant(m, "__version__", "52491") < 0)
return;
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return;
if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)
@@ -3146,6 +3264,11 @@ init_ast(void)
(PyObject*)excepthandler_type) < 0) return;
if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) <
0) return;
+ if (PyDict_SetItemString(d, "arg", (PyObject*)arg_type) < 0) return;
+ if (PyDict_SetItemString(d, "SimpleArg", (PyObject*)SimpleArg_type) <
+ 0) return;
+ if (PyDict_SetItemString(d, "NestedArgs", (PyObject*)NestedArgs_type) <
+ 0) return;
if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
return;
if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return;
diff --git a/Python/ast.c b/Python/ast.c
index 411c42ffd9..5ccd6f530d 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -388,14 +388,14 @@ set_context(expr_ty e, expr_context_ty ctx, const node *n)
expr_name = "list comprehension";
break;
case Dict_kind:
- case Set_kind:
+ case Set_kind:
case Num_kind:
case Str_kind:
expr_name = "literal";
break;
- case Ellipsis_kind:
- expr_name = "Ellipsis";
- break;
+ case Ellipsis_kind:
+ expr_name = "Ellipsis";
+ break;
case Compare_kind:
expr_name = "comparison";
break;
@@ -553,59 +553,74 @@ seq_for_testlist(struct compiling *c, const node *n)
return seq;
}
-static expr_ty
+static arg_ty
+compiler_simple_arg(struct compiling *c, const node *n)
+{
+ identifier name;
+ expr_ty annotation = NULL;
+ node *ch;
+
+ assert(TYPE(n) == tname || TYPE(n) == vname);
+ ch = CHILD(n, 0);
+ if (!strcmp(STR(ch), "None")) {
+ ast_error(ch, "assignment to None");
+ return NULL;
+ }
+ name = NEW_IDENTIFIER(ch);
+ if (!name)
+ return NULL;
+
+ if (NCH(n) == 3 && TYPE(CHILD(n, 1)) == COLON) {
+ annotation = ast_for_expr(c, CHILD(n, 2));
+ if (!annotation)
+ return NULL;
+ }
+
+ return SimpleArg(name, annotation, c->c_arena);
+}
+
+static arg_ty
compiler_complex_args(struct compiling *c, const node *n)
{
int i, len = (NCH(n) + 1) / 2;
- expr_ty result;
+ arg_ty arg;
asdl_seq *args = asdl_seq_new(len, c->c_arena);
if (!args)
return NULL;
- /* fpdef: NAME | '(' fplist ')'
- fplist: fpdef (',' fpdef)* [',']
- */
- REQ(n, fplist);
+ assert(TYPE(n) == tfplist || TYPE(n) == vfplist);
for (i = 0; i < len; i++) {
- const node *fpdef_node = CHILD(n, 2*i);
- const node *child;
- expr_ty arg;
-set_name:
- /* fpdef_node is either a NAME or an fplist */
- child = CHILD(fpdef_node, 0);
- if (TYPE(child) == NAME) {
- if (!strcmp(STR(child), "None")) {
- ast_error(child, "assignment to None");
- return NULL;
- }
- arg = Name(NEW_IDENTIFIER(child), Store, LINENO(child),
- child->n_col_offset, c->c_arena);
- }
- else {
- assert(TYPE(fpdef_node) == fpdef);
- /* fpdef_node[0] is not a name, so it must be a '(', get CHILD[1] */
- child = CHILD(fpdef_node, 1);
- assert(TYPE(child) == fplist);
- /* NCH == 1 means we have (x), we need to elide the extra parens */
- if (NCH(child) == 1) {
- fpdef_node = CHILD(child, 0);
- assert(TYPE(fpdef_node) == fpdef);
- goto set_name;
- }
- arg = compiler_complex_args(c, child);
+ const node *child = CHILD(n, 2*i);
+ /* def foo(((x), y)): -- x is not nested complex, special case. */
+ while (NCH(child) == 3 && NCH(CHILD(child, 1)) == 1)
+ child = CHILD(CHILD(child, 1), 0);
+
+ /* child either holds a tname or '(', a tfplist, ')' */
+ switch (TYPE(CHILD(child, 0))) {
+ case tname:
+ case vname:
+ arg = compiler_simple_arg(c, CHILD(child, 0));
+ break;
+ case LPAR:
+ arg = compiler_complex_args(c, CHILD(child, 1));
+ break;
+ default:
+ PyErr_Format(PyExc_SystemError,
+ "unexpected node in args: %d @ %d",
+ TYPE(CHILD(child, 0)), i);
+ arg = NULL;
}
+ if (!arg)
+ return NULL;
asdl_seq_SET(args, i, arg);
}
- result = Tuple(args, Store, LINENO(n), n->n_col_offset, c->c_arena);
- if (!set_context(result, Store, n))
- return NULL;
- return result;
+ return NestedArgs(args, c->c_arena);
}
/* returns -1 if failed to handle keyword only arguments
returns new position to keep processing if successful
- (',' NAME ['=' test])*
+ (',' tname ['=' test])*
^^^
start pointing here
*/
@@ -614,7 +629,8 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
asdl_seq *kwonlyargs, asdl_seq *kwdefaults)
{
node *ch;
- expr_ty name;
+ expr_ty expression, annotation;
+ arg_ty arg;
int i = start;
int j = 0; /* index for kwdefaults and kwonlyargs */
assert(kwonlyargs != NULL);
@@ -622,9 +638,10 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
while (i < NCH(n)) {
ch = CHILD(n, i);
switch (TYPE(ch)) {
- case NAME:
+ case vname:
+ case tname:
if (i + 1 < NCH(n) && TYPE(CHILD(n, i + 1)) == EQUAL) {
- expr_ty expression = ast_for_expr(c, CHILD(n, i + 2));
+ expression = ast_for_expr(c, CHILD(n, i + 2));
if (!expression) {
ast_error(ch, "assignment to None");
goto error;
@@ -635,18 +652,28 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
else { /* setting NULL if no default value exists */
asdl_seq_SET(kwdefaults, j, NULL);
}
+ if (NCH(ch) == 3) {
+ /* ch is NAME ':' test */
+ annotation = ast_for_expr(c, CHILD(ch, 2));
+ if (!annotation) {
+ ast_error(ch, "expected expression");
+ goto error;
+ }
+ }
+ else {
+ annotation = NULL;
+ }
+ ch = CHILD(ch, 0);
if (!strcmp(STR(ch), "None")) {
ast_error(ch, "assignment to None");
goto error;
}
- name = Name(NEW_IDENTIFIER(ch),
- Param, LINENO(ch), ch->n_col_offset,
- c->c_arena);
- if (!name) {
+ arg = SimpleArg(NEW_IDENTIFIER(ch), annotation, c->c_arena);
+ if (!arg) {
ast_error(ch, "expecting name");
goto error;
}
- asdl_seq_SET(kwonlyargs, j++, name);
+ asdl_seq_SET(kwonlyargs, j++, arg);
i += 2; /* the name and the comma */
break;
case DOUBLESTAR:
@@ -666,29 +693,41 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
static arguments_ty
ast_for_arguments(struct compiling *c, const node *n)
{
- /* parameters: '(' [varargslist] ')'
- varargslist: (fpdef ['=' test] ',')*
- ('*' [NAME] (',' fpdef ['=' test])* [',' '**' NAME] | '**' NAME)
- | fpdef ['=' test] (',' fpdef ['=' test])* [',']
+ /* This function handles both typedargslist (function definition)
+ and varargslist (lambda definition).
+
+ parameters: '(' [typedargslist] ')'
+ typedargslist: ((tfpdef ['=' test] ',')*
+ ('*' [tname] (',' tname ['=' test])* [',' '**' tname]
+ | '**' tname)
+ | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])
+ varargslist: ((vfpdef ['=' test] ',')*
+ ('*' [vname] (',' vname ['=' test])* [',' '**' vname]
+ | '**' vname)
+ | vfpdef ['=' test] (',' vfpdef ['=' test])* [','])
*/
int i, j, k, nposargs = 0, nkwonlyargs = 0;
int nposdefaults = 0, found_default = 0;
asdl_seq *posargs, *posdefaults, *kwonlyargs, *kwdefaults;
identifier vararg = NULL, kwarg = NULL;
+ arg_ty arg;
+ expr_ty varargannotation = NULL, kwargannotation = NULL;
node *ch;
if (TYPE(n) == parameters) {
if (NCH(n) == 2) /* () as argument list */
- return arguments(NULL, NULL, NULL, NULL, NULL, NULL, c->c_arena);
+ return arguments(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, c->c_arena);
n = CHILD(n, 1);
}
- REQ(n, varargslist);
+ assert(TYPE(n) == typedargslist || TYPE(n) == varargslist);
/* first count the number of positional args & defaults */
for (i = 0; i < NCH(n); i++) {
ch = CHILD(n, i);
if (TYPE(ch) == STAR) {
- if (TYPE(CHILD(n, i+1)) == NAME) {
+ if (TYPE(CHILD(n, i+1)) == tname
+ || TYPE(CHILD(n, i+1)) == vname) {
/* skip NAME of vararg */
/* so that following can count only keyword only args */
i += 2;
@@ -698,7 +737,7 @@ ast_for_arguments(struct compiling *c, const node *n)
}
break;
}
- if (TYPE(ch) == fpdef) nposargs++;
+ if (TYPE(ch) == vfpdef || TYPE(ch) == tfpdef) nposargs++;
if (TYPE(ch) == EQUAL) nposdefaults++;
}
/* count the number of keyword only args &
@@ -706,35 +745,39 @@ ast_for_arguments(struct compiling *c, const node *n)
for ( ; i < NCH(n); ++i) {
ch = CHILD(n, i);
if (TYPE(ch) == DOUBLESTAR) break;
- if (TYPE(ch) == NAME) nkwonlyargs++;
+ if (TYPE(ch) == tname || TYPE(ch) == vname) nkwonlyargs++;
}
posargs = (nposargs ? asdl_seq_new(nposargs, c->c_arena) : NULL);
if (!posargs && nposargs)
- return NULL; /* Don't need to goto error; no objects allocated */
+ goto error;
kwonlyargs = (nkwonlyargs ?
asdl_seq_new(nkwonlyargs, c->c_arena) : NULL);
if (!kwonlyargs && nkwonlyargs)
- return NULL; /* Don't need to goto error; no objects allocated */
+ goto error;
posdefaults = (nposdefaults ?
asdl_seq_new(nposdefaults, c->c_arena) : NULL);
if (!posdefaults && nposdefaults)
- return NULL; /* Don't need to goto error; no objects allocated */
+ goto error;
/* The length of kwonlyargs and kwdefaults are same
since we set NULL as default for keyword only argument w/o default
- we have sequence data structure, but no dictionary */
- kwdefaults = (nkwonlyargs ?
+ kwdefaults = (nkwonlyargs ?
asdl_seq_new(nkwonlyargs, c->c_arena) : NULL);
if (!kwdefaults && nkwonlyargs)
- return NULL; /* Don't need to goto error; no objects allocated */
+ goto error;
if (nposargs + nkwonlyargs > 255) {
- ast_error(n, "more than 255 arguments");
- return NULL;
+ ast_error(n, "more than 255 arguments");
+ return NULL;
}
- /* fpdef: NAME | '(' fplist ')'
- fplist: fpdef (',' fpdef)* [',']
+ /* tname: NAME [':' test]
+ tfpdef: tname | '(' tfplist ')'
+ tfplist: tfpdef (',' tfpdef)* [',']
+ vname: NAME
+ vfpdef: NAME | '(' vfplist ')'
+ vfplist: vfpdef (',' vfpdef)* [',']
*/
i = 0;
j = 0; /* index for defaults */
@@ -742,8 +785,8 @@ ast_for_arguments(struct compiling *c, const node *n)
while (i < NCH(n)) {
ch = CHILD(n, i);
switch (TYPE(ch)) {
- case fpdef:
- handle_fpdef:
+ case tfpdef:
+ case vfpdef:
/* XXX Need to worry about checking if TYPE(CHILD(n, i+1)) is
anything other than EQUAL or a comma? */
/* XXX Should NCH(n) check be made a separate check? */
@@ -753,7 +796,6 @@ ast_for_arguments(struct compiling *c, const node *n)
goto error;
assert(posdefaults != NULL);
asdl_seq_SET(posdefaults, j++, expression);
-
i += 2;
found_default = 1;
}
@@ -762,59 +804,47 @@ ast_for_arguments(struct compiling *c, const node *n)
"non-default argument follows default argument");
goto error;
}
- if (NCH(ch) == 3) {
- ch = CHILD(ch, 1);
- /* def foo((x)): is not complex, special case. */
- if (NCH(ch) != 1) {
- /* We have complex arguments, setup for unpacking. */
- asdl_seq_SET(posargs, k++,
- compiler_complex_args(c, ch));
- } else {
- /* def foo((x)): setup for checking NAME below. */
- /* Loop because there can be many parens and tuple
- unpacking mixed in. */
- ch = CHILD(ch, 0);
- assert(TYPE(ch) == fpdef);
- goto handle_fpdef;
- }
- }
- if (TYPE(CHILD(ch, 0)) == NAME) {
- expr_ty name;
- if (!strcmp(STR(CHILD(ch, 0)), "None")) {
- ast_error(CHILD(ch, 0), "assignment to None");
- goto error;
- }
- name = Name(NEW_IDENTIFIER(CHILD(ch, 0)),
- Param, LINENO(ch), ch->n_col_offset,
- c->c_arena);
- if (!name)
- goto error;
- asdl_seq_SET(posargs, k++, name);
+ /* def foo((x)): is not complex, special case. */
+ while (NCH(ch) == 3 && NCH(CHILD(ch, 1)) == 1)
+ ch = CHILD(CHILD(ch, 1), 0);
+
+ if (NCH(ch) != 1)
+ arg = compiler_complex_args(c, CHILD(ch, 1));
+ else
+ arg = compiler_simple_arg(c, CHILD(ch, 0));
+ if (!arg)
+ goto error;
+ asdl_seq_SET(posargs, k++, arg);
- }
i += 2; /* the name and the comma */
break;
case STAR:
if (i+1 >= NCH(n)) {
ast_error(CHILD(n, i), "no name for vararg");
- goto error;
- }
- if (!strcmp(STR(CHILD(n, i+1)), "None")) {
- ast_error(CHILD(n, i+1), "assignment to None");
- goto error;
+ goto error;
}
- if (TYPE(CHILD(n, i+1)) == COMMA) {
- int res = 0;
+ ch = CHILD(n, i+1); /* tname or COMMA */
+ if (TYPE(ch) == COMMA) {
+ int res = 0;
i += 2; /* now follows keyword only arguments */
res = handle_keywordonly_args(c, n, i,
kwonlyargs, kwdefaults);
if (res == -1) goto error;
i = res; /* res has new position to process */
}
+ else if (!strcmp(STR(CHILD(ch, 0)), "None")) {
+ ast_error(CHILD(ch, 0), "assignment to None");
+ goto error;
+ }
else {
- vararg = NEW_IDENTIFIER(CHILD(n, i+1));
+ vararg = NEW_IDENTIFIER(CHILD(ch, 0));
+ if (NCH(ch) > 1) {
+ /* there is an annotation on the vararg */
+ varargannotation = ast_for_expr(c, CHILD(ch, 2));
+ }
i += 3;
- if (i < NCH(n) && TYPE(CHILD(n, i)) == NAME) {
+ if (i < NCH(n) && (TYPE(CHILD(n, i)) == tname
+ || TYPE(CHILD(n, i)) == vname)) {
int res = 0;
res = handle_keywordonly_args(c, n, i,
kwonlyargs, kwdefaults);
@@ -824,11 +854,17 @@ ast_for_arguments(struct compiling *c, const node *n)
}
break;
case DOUBLESTAR:
- if (!strcmp(STR(CHILD(n, i+1)), "None")) {
- ast_error(CHILD(n, i+1), "assignment to None");
+ ch = CHILD(n, i+1); /* tname */
+ assert(TYPE(ch) == tname || TYPE(ch) == vname);
+ if (!strcmp(STR(CHILD(ch, 0)), "None")) {
+ ast_error(CHILD(ch, 0), "assignment to None");
goto error;
}
- kwarg = NEW_IDENTIFIER(CHILD(n, i+1));
+ kwarg = NEW_IDENTIFIER(CHILD(ch, 0));
+ if (NCH(ch) > 1) {
+ /* there is an annotation on the kwarg */
+ kwargannotation = ast_for_expr(c, CHILD(ch, 2));
+ }
i += 3;
break;
default:
@@ -838,8 +874,8 @@ ast_for_arguments(struct compiling *c, const node *n)
goto error;
}
}
- return arguments(posargs, vararg, kwonlyargs, kwarg,
- posdefaults, kwdefaults, c->c_arena);
+ return arguments(posargs, vararg, varargannotation, kwonlyargs, kwarg,
+ kwargannotation, posdefaults, kwdefaults, c->c_arena);
error:
Py_XDECREF(vararg);
Py_XDECREF(kwarg);
@@ -938,11 +974,12 @@ ast_for_decorators(struct compiling *c, const node *n)
static stmt_ty
ast_for_funcdef(struct compiling *c, const node *n)
{
- /* funcdef: 'def' [decorators] NAME parameters ':' suite */
+ /* funcdef: 'def' [decorators] NAME parameters ['->' test] ':' suite */
identifier name;
arguments_ty args;
asdl_seq *body;
asdl_seq *decorator_seq = NULL;
+ expr_ty returns = NULL;
int name_i;
REQ(n, funcdef);
@@ -967,11 +1004,17 @@ ast_for_funcdef(struct compiling *c, const node *n)
args = ast_for_arguments(c, CHILD(n, name_i + 1));
if (!args)
return NULL;
+ if (TYPE(CHILD(n, name_i+2)) == RARROW) {
+ returns = ast_for_expr(c, CHILD(n, name_i + 3));
+ if (!returns)
+ return NULL;
+ name_i += 2;
+ }
body = ast_for_suite(c, CHILD(n, name_i + 3));
if (!body)
return NULL;
- return FunctionDef(name, args, body, decorator_seq, LINENO(n),
+ return FunctionDef(name, args, body, decorator_seq, returns, LINENO(n),
n->n_col_offset, c->c_arena);
}
@@ -983,7 +1026,8 @@ ast_for_lambdef(struct compiling *c, const node *n)
expr_ty expression;
if (NCH(n) == 3) {
- args = arguments(NULL, NULL, NULL, NULL, NULL, NULL, c->c_arena);
+ args = arguments(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, c->c_arena);
if (!args)
return NULL;
expression = ast_for_expr(c, CHILD(n, 2));
@@ -1361,9 +1405,8 @@ ast_for_atom(struct compiling *c, const node *n)
PyArena_AddPyObject(c->c_arena, pynum);
return Num(pynum, LINENO(n), n->n_col_offset, c->c_arena);
}
- case DOT:
- /* Ellipsis */
- return Ellipsis(LINENO(n), n->n_col_offset, c->c_arena);
+ case DOT: /* Ellipsis */
+ return Ellipsis(LINENO(n), n->n_col_offset, c->c_arena);
case LPAR: /* some parenthesized expressions */
ch = CHILD(n, 1);
@@ -1394,13 +1437,13 @@ ast_for_atom(struct compiling *c, const node *n)
else
return ast_for_listcomp(c, ch);
case LBRACE: {
- /* dictsetmaker: test ':' test (',' test ':' test)* [','] |
- * test (',' test)* [','] */
- int i, size;
- asdl_seq *keys, *values;
-
- ch = CHILD(n, 1);
- if (NCH(ch) == 1 || (NCH(ch) > 0 && STR(CHILD(ch, 1))[0] == ',')) {
+ /* dictsetmaker: test ':' test (',' test ':' test)* [','] |
+ * test (',' test)* [','] */
+ int i, size;
+ asdl_seq *keys, *values;
+
+ ch = CHILD(n, 1);
+ if (NCH(ch) == 1 || (NCH(ch) > 0 && STR(CHILD(ch, 1))[0] == ',')) {
/* it's a set */
size = (NCH(ch) + 1) / 2; /* +1 in case no trailing comma */
keys = asdl_seq_new(size, c->c_arena);
@@ -3046,10 +3089,10 @@ ast_for_stmt(struct compiling *c, const node *n)
n = CHILD(n, 0);
}
if (TYPE(n) == small_stmt) {
- REQ(n, small_stmt);
- n = CHILD(n, 0);
- /* small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt
- | flow_stmt | import_stmt | global_stmt | assert_stmt
+ REQ(n, small_stmt);
+ n = CHILD(n, 0);
+ /* small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt
+ | flow_stmt | import_stmt | global_stmt | assert_stmt
*/
switch (TYPE(n)) {
case expr_stmt:
diff --git a/Python/ceval.c b/Python/ceval.c
index 82aa66855f..f5ebb8eded 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2293,10 +2293,37 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
{
int posdefaults = oparg & 0xff;
int kwdefaults = (oparg>>8) & 0xff;
+ int num_annotations = (oparg >> 16) & 0x7fff;
v = POP(); /* code object */
x = PyFunction_New(v, f->f_globals);
Py_DECREF(v);
+
+ if (x != NULL && num_annotations > 0) {
+ Py_ssize_t name_ix;
+ u = POP(); /* names of args with annotations */
+ v = PyDict_New();
+ if (v == NULL) {
+ Py_DECREF(x);
+ x = NULL;
+ break;
+ }
+ name_ix = PyTuple_Size(u);
+ assert(num_annotations == name_ix+1);
+ while (name_ix > 0) {
+ --name_ix;
+ t = PyTuple_GET_ITEM(u, name_ix);
+ w = POP();
+ /* XXX(nnorwitz): check for errors */
+ PyDict_SetItem(v, t, w);
+ Py_DECREF(w);
+ }
+
+ err = PyFunction_SetAnnotations(x, v);
+ Py_DECREF(v);
+ Py_DECREF(u);
+ }
+
/* XXX Maybe this should be a separate opcode? */
if (x != NULL && posdefaults > 0) {
v = PyTuple_New(posdefaults);
@@ -2322,6 +2349,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
while (--kwdefaults >= 0) {
w = POP(); /* default value */
u = POP(); /* kw only arg name */
+ /* XXX(nnorwitz): check for errors */
PyDict_SetItem(v, u, w);
}
err = PyFunction_SetKwDefaults(x, v);
diff --git a/Python/compile.c b/Python/compile.c
index bdafd922f4..d2374a93f5 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -832,7 +832,7 @@ opcode_stack_effect(int opcode, int oparg)
case RAISE_VARARGS:
return -oparg;
-#define NARGS(o) (((o) % 256) + 2*((o) / 256))
+#define NARGS(o) (((o) % 256) + 2*(((o) / 256) % 256))
case CALL_FUNCTION:
return -NARGS(oparg);
case CALL_FUNCTION_VAR:
@@ -841,7 +841,7 @@ opcode_stack_effect(int opcode, int oparg)
case CALL_FUNCTION_VAR_KW:
return -NARGS(oparg)-2;
case MAKE_FUNCTION:
- return -NARGS(oparg);
+ return -NARGS(oparg) - ((oparg >> 16) & 0xffff);
#undef NARGS
case BUILD_SLICE:
if (oparg == 3)
@@ -1267,14 +1267,37 @@ compiler_decorators(struct compiler *c, asdl_seq* decos)
}
static int
+compiler_unpack_nested(struct compiler *c, asdl_seq *args) {
+ int i, len;
+ len = asdl_seq_LEN(args);
+ ADDOP_I(c, UNPACK_SEQUENCE, len);
+ for (i = 0; i < len; i++) {
+ arg_ty elt = (arg_ty)asdl_seq_GET(args, i);
+ switch (elt->kind) {
+ case SimpleArg_kind:
+ if (!compiler_nameop(c, elt->v.SimpleArg.arg, Store))
+ return 0;
+ break;
+ case NestedArgs_kind:
+ if (!compiler_unpack_nested(c, elt->v.NestedArgs.args))
+ return 0;
+ break;
+ default:
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static int
compiler_arguments(struct compiler *c, arguments_ty args)
{
int i;
int n = asdl_seq_LEN(args->args);
- /* Correctly handle nested argument lists */
+
for (i = 0; i < n; i++) {
- expr_ty arg = (expr_ty)asdl_seq_GET(args->args, i);
- if (arg->kind == Tuple_kind) {
+ arg_ty arg = (arg_ty)asdl_seq_GET(args->args, i);
+ if (arg->kind == NestedArgs_kind) {
PyObject *id = PyString_FromFormat(".%d", i);
if (id == NULL) {
return 0;
@@ -1284,7 +1307,8 @@ compiler_arguments(struct compiler *c, arguments_ty args)
return 0;
}
Py_DECREF(id);
- VISIT(c, expr, arg);
+ if (!compiler_unpack_nested(c, arg->v.NestedArgs.args))
+ return 0;
}
}
return 1;
@@ -1296,10 +1320,10 @@ compiler_visit_kwonlydefaults(struct compiler *c, asdl_seq *kwonlyargs,
{
int i, default_count = 0;
for (i = 0; i < asdl_seq_LEN(kwonlyargs); i++) {
- expr_ty arg = asdl_seq_GET(kwonlyargs, i);
+ arg_ty arg = asdl_seq_GET(kwonlyargs, i);
expr_ty default_ = asdl_seq_GET(kw_defaults, i);
if (default_) {
- ADDOP_O(c, LOAD_CONST, arg->v.Name.id, consts);
+ ADDOP_O(c, LOAD_CONST, arg->v.SimpleArg.arg, consts);
if (!compiler_visit_expr(c, default_)) {
return -1;
}
@@ -1310,14 +1334,112 @@ compiler_visit_kwonlydefaults(struct compiler *c, asdl_seq *kwonlyargs,
}
static int
+compiler_visit_argannotation(struct compiler *c, identifier id,
+ expr_ty annotation, PyObject *names)
+{
+ if (annotation) {
+ VISIT(c, expr, annotation);
+ if (PyList_Append(names, id))
+ return -1;
+ }
+ return 0;
+}
+
+static int
+compiler_visit_argannotations(struct compiler *c, asdl_seq* args,
+ PyObject *names)
+{
+ int i, error;
+ for (i = 0; i < asdl_seq_LEN(args); i++) {
+ arg_ty arg = (arg_ty)asdl_seq_GET(args, i);
+ if (arg->kind == NestedArgs_kind)
+ error = compiler_visit_argannotations(
+ c,
+ arg->v.NestedArgs.args,
+ names);
+ else
+ error = compiler_visit_argannotation(
+ c,
+ arg->v.SimpleArg.arg,
+ arg->v.SimpleArg.annotation,
+ names);
+ if (error)
+ return error;
+ }
+ return 0;
+}
+
+static int
+compiler_visit_annotations(struct compiler *c, arguments_ty args,
+ expr_ty returns)
+{
+ /* push arg annotations and a list of the argument names. return the #
+ of items pushed. this is out-of-order wrt the source code. */
+ static identifier return_str;
+ PyObject *names;
+ int len;
+ names = PyList_New(0);
+ if (!names)
+ return -1;
+
+ if (compiler_visit_argannotations(c, args->args, names))
+ goto error;
+ if (args->varargannotation &&
+ compiler_visit_argannotation(c, args->vararg,
+ args->varargannotation, names))
+ goto error;
+ if (compiler_visit_argannotations(c, args->kwonlyargs, names))
+ goto error;
+ if (args->kwargannotation &&
+ compiler_visit_argannotation(c, args->kwarg,
+ args->kwargannotation, names))
+ goto error;
+
+ if (!return_str) {
+ return_str = PyString_InternFromString("return");
+ if (!return_str)
+ goto error;
+ }
+ if (compiler_visit_argannotation(c, return_str, returns, names)) {
+ goto error;
+ }
+
+ len = PyList_GET_SIZE(names);
+ if (len) {
+ /* convert names to a tuple and place on stack */
+ PyObject *elt;
+ int i;
+ PyObject *s = PyTuple_New(len);
+ if (!s)
+ goto error;
+ for (i = 0; i < len; i++) {
+ elt = PyList_GET_ITEM(names, i);
+ Py_INCREF(elt);
+ PyTuple_SET_ITEM(s, i, elt);
+ }
+ ADDOP_O(c, LOAD_CONST, s, consts);
+ Py_DECREF(s);
+ len++; /* include the just-pushed tuple */
+ }
+ Py_DECREF(names);
+ return len;
+
+error:
+ Py_DECREF(names);
+ return -1;
+}
+
+static int
compiler_function(struct compiler *c, stmt_ty s)
{
PyCodeObject *co;
PyObject *first_const = Py_None;
arguments_ty args = s->v.FunctionDef.args;
+ expr_ty returns = s->v.FunctionDef.returns;
asdl_seq* decos = s->v.FunctionDef.decorators;
stmt_ty st;
int i, n, docstring, kw_default_count = 0, arglength;
+ int num_annotations;
assert(s->kind == FunctionDef_kind);
@@ -1332,6 +1454,7 @@ compiler_function(struct compiler *c, stmt_ty s)
}
if (args->defaults)
VISIT_SEQ(c, expr, args->defaults);
+ num_annotations = compiler_visit_annotations(c, args, returns);
if (!compiler_enter_scope(c, s->v.FunctionDef.name, (void *)s,
s->lineno))
@@ -1364,9 +1487,11 @@ compiler_function(struct compiler *c, stmt_ty s)
arglength = asdl_seq_LEN(args->defaults);
arglength |= kw_default_count << 8;
+ arglength |= num_annotations << 16;
compiler_make_closure(c, co, arglength);
Py_DECREF(co);
+ /* decorators */
for (i = 0; i < asdl_seq_LEN(decos); i++) {
ADDOP_I(c, CALL_FUNCTION, 1);
}
diff --git a/Python/graminit.c b/Python/graminit.c
index 0e94db4dc9..93ee69a87e 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -99,29 +99,38 @@ static arc arcs_5_2[1] = {
static arc arcs_5_3[1] = {
{20, 4},
};
-static arc arcs_5_4[1] = {
+static arc arcs_5_4[2] = {
{21, 5},
+ {23, 6},
};
static arc arcs_5_5[1] = {
- {22, 6},
+ {22, 7},
};
static arc arcs_5_6[1] = {
- {0, 6},
+ {24, 8},
+};
+static arc arcs_5_7[1] = {
+ {23, 6},
};
-static state states_5[7] = {
+static arc arcs_5_8[1] = {
+ {0, 8},
+};
+static state states_5[9] = {
{2, arcs_5_0},
{1, arcs_5_1},
{1, arcs_5_2},
{1, arcs_5_3},
- {1, arcs_5_4},
+ {2, arcs_5_4},
{1, arcs_5_5},
{1, arcs_5_6},
+ {1, arcs_5_7},
+ {1, arcs_5_8},
};
static arc arcs_6_0[1] = {
{13, 1},
};
static arc arcs_6_1[2] = {
- {23, 2},
+ {25, 2},
{15, 3},
};
static arc arcs_6_2[1] = {
@@ -137,54 +146,54 @@ static state states_6[4] = {
{1, arcs_6_3},
};
static arc arcs_7_0[3] = {
- {24, 1},
- {28, 2},
- {29, 3},
+ {26, 1},
+ {29, 2},
+ {31, 3},
};
static arc arcs_7_1[3] = {
- {25, 4},
- {27, 5},
+ {27, 4},
+ {28, 5},
{0, 1},
};
static arc arcs_7_2[3] = {
- {19, 6},
- {27, 7},
+ {30, 6},
+ {28, 7},
{0, 2},
};
static arc arcs_7_3[1] = {
- {19, 8},
+ {30, 8},
};
static arc arcs_7_4[1] = {
- {26, 9},
+ {22, 9},
};
static arc arcs_7_5[4] = {
- {24, 1},
- {28, 2},
- {29, 3},
+ {26, 1},
+ {29, 2},
+ {31, 3},
{0, 5},
};
static arc arcs_7_6[2] = {
- {27, 7},
+ {28, 7},
{0, 6},
};
static arc arcs_7_7[2] = {
- {19, 10},
- {29, 3},
+ {30, 10},
+ {31, 3},
};
static arc arcs_7_8[1] = {
{0, 8},
};
static arc arcs_7_9[2] = {
- {27, 5},
+ {28, 5},
{0, 9},
};
static arc arcs_7_10[3] = {
- {27, 7},
- {25, 11},
+ {28, 7},
+ {27, 11},
{0, 10},
};
static arc arcs_7_11[1] = {
- {26, 6},
+ {22, 6},
};
static state states_7[12] = {
{3, arcs_7_0},
@@ -200,261 +209,330 @@ static state states_7[12] = {
{3, arcs_7_10},
{1, arcs_7_11},
};
-static arc arcs_8_0[2] = {
+static arc arcs_8_0[1] = {
{19, 1},
- {13, 2},
};
-static arc arcs_8_1[1] = {
+static arc arcs_8_1[2] = {
+ {23, 2},
{0, 1},
};
static arc arcs_8_2[1] = {
- {30, 3},
+ {22, 3},
};
static arc arcs_8_3[1] = {
- {15, 1},
+ {0, 3},
};
static state states_8[4] = {
- {2, arcs_8_0},
- {1, arcs_8_1},
+ {1, arcs_8_0},
+ {2, arcs_8_1},
{1, arcs_8_2},
{1, arcs_8_3},
};
-static arc arcs_9_0[1] = {
- {24, 1},
+static arc arcs_9_0[2] = {
+ {30, 1},
+ {13, 2},
};
-static arc arcs_9_1[2] = {
- {27, 2},
+static arc arcs_9_1[1] = {
{0, 1},
};
-static arc arcs_9_2[2] = {
- {24, 1},
- {0, 2},
+static arc arcs_9_2[1] = {
+ {32, 3},
};
-static state states_9[3] = {
- {1, arcs_9_0},
- {2, arcs_9_1},
- {2, arcs_9_2},
+static arc arcs_9_3[1] = {
+ {15, 1},
};
-static arc arcs_10_0[2] = {
- {3, 1},
- {4, 1},
+static state states_9[4] = {
+ {2, arcs_9_0},
+ {1, arcs_9_1},
+ {1, arcs_9_2},
+ {1, arcs_9_3},
+};
+static arc arcs_10_0[1] = {
+ {26, 1},
};
-static arc arcs_10_1[1] = {
+static arc arcs_10_1[2] = {
+ {28, 2},
{0, 1},
};
-static state states_10[2] = {
- {2, arcs_10_0},
- {1, arcs_10_1},
+static arc arcs_10_2[2] = {
+ {26, 1},
+ {0, 2},
};
-static arc arcs_11_0[1] = {
- {31, 1},
+static state states_10[3] = {
+ {1, arcs_10_0},
+ {2, arcs_10_1},
+ {2, arcs_10_2},
};
-static arc arcs_11_1[2] = {
- {32, 2},
- {2, 3},
+static arc arcs_11_0[3] = {
+ {34, 1},
+ {29, 2},
+ {31, 3},
};
-static arc arcs_11_2[2] = {
- {31, 1},
- {2, 3},
+static arc arcs_11_1[3] = {
+ {27, 4},
+ {28, 5},
+ {0, 1},
+};
+static arc arcs_11_2[3] = {
+ {35, 6},
+ {28, 7},
+ {0, 2},
};
static arc arcs_11_3[1] = {
- {0, 3},
+ {35, 8},
};
-static state states_11[4] = {
- {1, arcs_11_0},
- {2, arcs_11_1},
- {2, arcs_11_2},
- {1, arcs_11_3},
+static arc arcs_11_4[1] = {
+ {22, 9},
};
-static arc arcs_12_0[8] = {
- {33, 1},
+static arc arcs_11_5[4] = {
{34, 1},
- {35, 1},
- {36, 1},
- {37, 1},
- {38, 1},
- {39, 1},
- {40, 1},
+ {29, 2},
+ {31, 3},
+ {0, 5},
};
-static arc arcs_12_1[1] = {
- {0, 1},
+static arc arcs_11_6[2] = {
+ {28, 7},
+ {0, 6},
};
-static state states_12[2] = {
- {8, arcs_12_0},
- {1, arcs_12_1},
+static arc arcs_11_7[2] = {
+ {35, 10},
+ {31, 3},
};
-static arc arcs_13_0[1] = {
- {9, 1},
+static arc arcs_11_8[1] = {
+ {0, 8},
};
-static arc arcs_13_1[3] = {
- {41, 2},
- {25, 3},
- {0, 1},
+static arc arcs_11_9[2] = {
+ {28, 5},
+ {0, 9},
};
-static arc arcs_13_2[2] = {
- {42, 4},
- {9, 4},
+static arc arcs_11_10[3] = {
+ {28, 7},
+ {27, 11},
+ {0, 10},
};
-static arc arcs_13_3[2] = {
- {42, 5},
- {9, 5},
+static arc arcs_11_11[1] = {
+ {22, 6},
};
-static arc arcs_13_4[1] = {
- {0, 4},
+static state states_11[12] = {
+ {3, arcs_11_0},
+ {3, arcs_11_1},
+ {3, arcs_11_2},
+ {1, arcs_11_3},
+ {1, arcs_11_4},
+ {4, arcs_11_5},
+ {2, arcs_11_6},
+ {2, arcs_11_7},
+ {1, arcs_11_8},
+ {2, arcs_11_9},
+ {3, arcs_11_10},
+ {1, arcs_11_11},
+};
+static arc arcs_12_0[1] = {
+ {19, 1},
};
-static arc arcs_13_5[2] = {
- {25, 3},
- {0, 5},
+static arc arcs_12_1[1] = {
+ {0, 1},
};
-static state states_13[6] = {
- {1, arcs_13_0},
- {3, arcs_13_1},
- {2, arcs_13_2},
- {2, arcs_13_3},
- {1, arcs_13_4},
- {2, arcs_13_5},
+static state states_12[2] = {
+ {1, arcs_12_0},
+ {1, arcs_12_1},
};
-static arc arcs_14_0[12] = {
- {43, 1},
- {44, 1},
- {45, 1},
- {46, 1},
- {47, 1},
- {48, 1},
- {49, 1},
- {50, 1},
- {51, 1},
- {52, 1},
- {53, 1},
- {54, 1},
+static arc arcs_13_0[2] = {
+ {35, 1},
+ {13, 2},
};
-static arc arcs_14_1[1] = {
+static arc arcs_13_1[1] = {
{0, 1},
};
-static state states_14[2] = {
- {12, arcs_14_0},
- {1, arcs_14_1},
-};
-static arc arcs_15_0[1] = {
- {55, 1},
+static arc arcs_13_2[1] = {
+ {36, 3},
};
-static arc arcs_15_1[3] = {
- {26, 2},
- {56, 3},
- {0, 1},
+static arc arcs_13_3[1] = {
+ {15, 1},
};
-static arc arcs_15_2[2] = {
- {27, 4},
- {0, 2},
+static state states_13[4] = {
+ {2, arcs_13_0},
+ {1, arcs_13_1},
+ {1, arcs_13_2},
+ {1, arcs_13_3},
};
-static arc arcs_15_3[1] = {
- {26, 5},
+static arc arcs_14_0[1] = {
+ {34, 1},
};
-static arc arcs_15_4[2] = {
- {26, 2},
- {0, 4},
+static arc arcs_14_1[2] = {
+ {28, 2},
+ {0, 1},
};
-static arc arcs_15_5[2] = {
- {27, 6},
- {0, 5},
+static arc arcs_14_2[2] = {
+ {34, 1},
+ {0, 2},
};
-static arc arcs_15_6[1] = {
- {26, 7},
+static state states_14[3] = {
+ {1, arcs_14_0},
+ {2, arcs_14_1},
+ {2, arcs_14_2},
};
-static arc arcs_15_7[2] = {
- {27, 8},
- {0, 7},
+static arc arcs_15_0[2] = {
+ {3, 1},
+ {4, 1},
};
-static arc arcs_15_8[2] = {
- {26, 7},
- {0, 8},
+static arc arcs_15_1[1] = {
+ {0, 1},
};
-static state states_15[9] = {
- {1, arcs_15_0},
- {3, arcs_15_1},
- {2, arcs_15_2},
- {1, arcs_15_3},
- {2, arcs_15_4},
- {2, arcs_15_5},
- {1, arcs_15_6},
- {2, arcs_15_7},
- {2, arcs_15_8},
+static state states_15[2] = {
+ {2, arcs_15_0},
+ {1, arcs_15_1},
};
static arc arcs_16_0[1] = {
- {57, 1},
+ {37, 1},
+};
+static arc arcs_16_1[2] = {
+ {38, 2},
+ {2, 3},
};
-static arc arcs_16_1[1] = {
- {58, 2},
+static arc arcs_16_2[2] = {
+ {37, 1},
+ {2, 3},
};
-static arc arcs_16_2[1] = {
- {0, 2},
+static arc arcs_16_3[1] = {
+ {0, 3},
};
-static state states_16[3] = {
+static state states_16[4] = {
{1, arcs_16_0},
- {1, arcs_16_1},
- {1, arcs_16_2},
+ {2, arcs_16_1},
+ {2, arcs_16_2},
+ {1, arcs_16_3},
};
-static arc arcs_17_0[1] = {
- {59, 1},
+static arc arcs_17_0[8] = {
+ {39, 1},
+ {40, 1},
+ {41, 1},
+ {42, 1},
+ {43, 1},
+ {44, 1},
+ {45, 1},
+ {46, 1},
};
static arc arcs_17_1[1] = {
{0, 1},
};
static state states_17[2] = {
- {1, arcs_17_0},
+ {8, arcs_17_0},
{1, arcs_17_1},
};
-static arc arcs_18_0[5] = {
- {60, 1},
- {61, 1},
- {62, 1},
- {63, 1},
- {64, 1},
+static arc arcs_18_0[1] = {
+ {9, 1},
};
-static arc arcs_18_1[1] = {
+static arc arcs_18_1[3] = {
+ {47, 2},
+ {27, 3},
{0, 1},
};
-static state states_18[2] = {
- {5, arcs_18_0},
- {1, arcs_18_1},
+static arc arcs_18_2[2] = {
+ {48, 4},
+ {9, 4},
};
-static arc arcs_19_0[1] = {
- {65, 1},
+static arc arcs_18_3[2] = {
+ {48, 5},
+ {9, 5},
+};
+static arc arcs_18_4[1] = {
+ {0, 4},
+};
+static arc arcs_18_5[2] = {
+ {27, 3},
+ {0, 5},
+};
+static state states_18[6] = {
+ {1, arcs_18_0},
+ {3, arcs_18_1},
+ {2, arcs_18_2},
+ {2, arcs_18_3},
+ {1, arcs_18_4},
+ {2, arcs_18_5},
+};
+static arc arcs_19_0[12] = {
+ {49, 1},
+ {50, 1},
+ {51, 1},
+ {52, 1},
+ {53, 1},
+ {54, 1},
+ {55, 1},
+ {56, 1},
+ {57, 1},
+ {58, 1},
+ {59, 1},
+ {60, 1},
};
static arc arcs_19_1[1] = {
{0, 1},
};
static state states_19[2] = {
- {1, arcs_19_0},
+ {12, arcs_19_0},
{1, arcs_19_1},
};
static arc arcs_20_0[1] = {
- {66, 1},
+ {61, 1},
};
-static arc arcs_20_1[1] = {
+static arc arcs_20_1[3] = {
+ {22, 2},
+ {62, 3},
{0, 1},
};
-static state states_20[2] = {
+static arc arcs_20_2[2] = {
+ {28, 4},
+ {0, 2},
+};
+static arc arcs_20_3[1] = {
+ {22, 5},
+};
+static arc arcs_20_4[2] = {
+ {22, 2},
+ {0, 4},
+};
+static arc arcs_20_5[2] = {
+ {28, 6},
+ {0, 5},
+};
+static arc arcs_20_6[1] = {
+ {22, 7},
+};
+static arc arcs_20_7[2] = {
+ {28, 8},
+ {0, 7},
+};
+static arc arcs_20_8[2] = {
+ {22, 7},
+ {0, 8},
+};
+static state states_20[9] = {
{1, arcs_20_0},
- {1, arcs_20_1},
+ {3, arcs_20_1},
+ {2, arcs_20_2},
+ {1, arcs_20_3},
+ {2, arcs_20_4},
+ {2, arcs_20_5},
+ {1, arcs_20_6},
+ {2, arcs_20_7},
+ {2, arcs_20_8},
};
static arc arcs_21_0[1] = {
- {67, 1},
+ {63, 1},
};
-static arc arcs_21_1[2] = {
- {9, 2},
- {0, 1},
+static arc arcs_21_1[1] = {
+ {64, 2},
};
static arc arcs_21_2[1] = {
{0, 2},
};
static state states_21[3] = {
{1, arcs_21_0},
- {2, arcs_21_1},
+ {1, arcs_21_1},
{1, arcs_21_2},
};
static arc arcs_22_0[1] = {
- {42, 1},
+ {65, 1},
};
static arc arcs_22_1[1] = {
{0, 1},
@@ -463,662 +541,646 @@ static state states_22[2] = {
{1, arcs_22_0},
{1, arcs_22_1},
};
-static arc arcs_23_0[1] = {
+static arc arcs_23_0[5] = {
+ {66, 1},
+ {67, 1},
{68, 1},
+ {69, 1},
+ {70, 1},
};
-static arc arcs_23_1[2] = {
- {26, 2},
+static arc arcs_23_1[1] = {
{0, 1},
};
-static arc arcs_23_2[2] = {
- {27, 3},
- {0, 2},
-};
-static arc arcs_23_3[1] = {
- {26, 4},
+static state states_23[2] = {
+ {5, arcs_23_0},
+ {1, arcs_23_1},
};
-static arc arcs_23_4[2] = {
- {27, 5},
- {0, 4},
-};
-static arc arcs_23_5[1] = {
- {26, 6},
-};
-static arc arcs_23_6[1] = {
- {0, 6},
-};
-static state states_23[7] = {
- {1, arcs_23_0},
- {2, arcs_23_1},
- {2, arcs_23_2},
- {1, arcs_23_3},
- {2, arcs_23_4},
- {1, arcs_23_5},
- {1, arcs_23_6},
-};
-static arc arcs_24_0[2] = {
- {69, 1},
- {70, 1},
+static arc arcs_24_0[1] = {
+ {71, 1},
};
static arc arcs_24_1[1] = {
{0, 1},
};
static state states_24[2] = {
- {2, arcs_24_0},
+ {1, arcs_24_0},
{1, arcs_24_1},
};
static arc arcs_25_0[1] = {
- {71, 1},
+ {72, 1},
};
static arc arcs_25_1[1] = {
- {72, 2},
-};
-static arc arcs_25_2[1] = {
- {0, 2},
+ {0, 1},
};
-static state states_25[3] = {
+static state states_25[2] = {
{1, arcs_25_0},
{1, arcs_25_1},
- {1, arcs_25_2},
};
static arc arcs_26_0[1] = {
{73, 1},
};
static arc arcs_26_1[2] = {
- {74, 2},
- {12, 3},
-};
-static arc arcs_26_2[3] = {
- {74, 2},
- {12, 3},
- {71, 4},
-};
-static arc arcs_26_3[1] = {
- {71, 4},
-};
-static arc arcs_26_4[3] = {
- {28, 5},
- {13, 6},
- {75, 5},
-};
-static arc arcs_26_5[1] = {
- {0, 5},
-};
-static arc arcs_26_6[1] = {
- {75, 7},
+ {9, 2},
+ {0, 1},
};
-static arc arcs_26_7[1] = {
- {15, 5},
+static arc arcs_26_2[1] = {
+ {0, 2},
};
-static state states_26[8] = {
+static state states_26[3] = {
{1, arcs_26_0},
{2, arcs_26_1},
- {3, arcs_26_2},
- {1, arcs_26_3},
- {3, arcs_26_4},
- {1, arcs_26_5},
- {1, arcs_26_6},
- {1, arcs_26_7},
+ {1, arcs_26_2},
};
static arc arcs_27_0[1] = {
- {19, 1},
+ {48, 1},
};
-static arc arcs_27_1[2] = {
- {77, 2},
+static arc arcs_27_1[1] = {
{0, 1},
};
-static arc arcs_27_2[1] = {
- {19, 3},
-};
-static arc arcs_27_3[1] = {
- {0, 3},
-};
-static state states_27[4] = {
+static state states_27[2] = {
{1, arcs_27_0},
- {2, arcs_27_1},
- {1, arcs_27_2},
- {1, arcs_27_3},
+ {1, arcs_27_1},
};
static arc arcs_28_0[1] = {
- {12, 1},
+ {74, 1},
};
static arc arcs_28_1[2] = {
- {77, 2},
+ {22, 2},
{0, 1},
};
-static arc arcs_28_2[1] = {
- {19, 3},
+static arc arcs_28_2[2] = {
+ {28, 3},
+ {0, 2},
};
static arc arcs_28_3[1] = {
- {0, 3},
+ {22, 4},
};
-static state states_28[4] = {
+static arc arcs_28_4[2] = {
+ {28, 5},
+ {0, 4},
+};
+static arc arcs_28_5[1] = {
+ {22, 6},
+};
+static arc arcs_28_6[1] = {
+ {0, 6},
+};
+static state states_28[7] = {
{1, arcs_28_0},
{2, arcs_28_1},
- {1, arcs_28_2},
+ {2, arcs_28_2},
{1, arcs_28_3},
+ {2, arcs_28_4},
+ {1, arcs_28_5},
+ {1, arcs_28_6},
};
-static arc arcs_29_0[1] = {
+static arc arcs_29_0[2] = {
+ {75, 1},
{76, 1},
};
-static arc arcs_29_1[2] = {
- {27, 2},
+static arc arcs_29_1[1] = {
{0, 1},
};
-static arc arcs_29_2[2] = {
- {76, 1},
- {0, 2},
-};
-static state states_29[3] = {
- {1, arcs_29_0},
- {2, arcs_29_1},
- {2, arcs_29_2},
+static state states_29[2] = {
+ {2, arcs_29_0},
+ {1, arcs_29_1},
};
static arc arcs_30_0[1] = {
- {78, 1},
+ {77, 1},
};
-static arc arcs_30_1[2] = {
- {27, 0},
- {0, 1},
+static arc arcs_30_1[1] = {
+ {78, 2},
+};
+static arc arcs_30_2[1] = {
+ {0, 2},
};
-static state states_30[2] = {
+static state states_30[3] = {
{1, arcs_30_0},
- {2, arcs_30_1},
+ {1, arcs_30_1},
+ {1, arcs_30_2},
};
static arc arcs_31_0[1] = {
- {19, 1},
+ {79, 1},
};
static arc arcs_31_1[2] = {
- {74, 0},
- {0, 1},
+ {80, 2},
+ {12, 3},
+};
+static arc arcs_31_2[3] = {
+ {80, 2},
+ {12, 3},
+ {77, 4},
+};
+static arc arcs_31_3[1] = {
+ {77, 4},
+};
+static arc arcs_31_4[3] = {
+ {29, 5},
+ {13, 6},
+ {81, 5},
+};
+static arc arcs_31_5[1] = {
+ {0, 5},
+};
+static arc arcs_31_6[1] = {
+ {81, 7},
+};
+static arc arcs_31_7[1] = {
+ {15, 5},
};
-static state states_31[2] = {
+static state states_31[8] = {
{1, arcs_31_0},
{2, arcs_31_1},
+ {3, arcs_31_2},
+ {1, arcs_31_3},
+ {3, arcs_31_4},
+ {1, arcs_31_5},
+ {1, arcs_31_6},
+ {1, arcs_31_7},
};
static arc arcs_32_0[1] = {
- {79, 1},
+ {19, 1},
};
-static arc arcs_32_1[1] = {
- {19, 2},
+static arc arcs_32_1[2] = {
+ {83, 2},
+ {0, 1},
};
-static arc arcs_32_2[2] = {
- {27, 1},
- {0, 2},
+static arc arcs_32_2[1] = {
+ {19, 3},
};
-static state states_32[3] = {
+static arc arcs_32_3[1] = {
+ {0, 3},
+};
+static state states_32[4] = {
{1, arcs_32_0},
- {1, arcs_32_1},
- {2, arcs_32_2},
+ {2, arcs_32_1},
+ {1, arcs_32_2},
+ {1, arcs_32_3},
};
static arc arcs_33_0[1] = {
- {80, 1},
+ {12, 1},
};
-static arc arcs_33_1[1] = {
- {26, 2},
+static arc arcs_33_1[2] = {
+ {83, 2},
+ {0, 1},
};
-static arc arcs_33_2[2] = {
- {27, 3},
- {0, 2},
+static arc arcs_33_2[1] = {
+ {19, 3},
};
static arc arcs_33_3[1] = {
- {26, 4},
-};
-static arc arcs_33_4[1] = {
- {0, 4},
+ {0, 3},
};
-static state states_33[5] = {
+static state states_33[4] = {
{1, arcs_33_0},
- {1, arcs_33_1},
- {2, arcs_33_2},
+ {2, arcs_33_1},
+ {1, arcs_33_2},
{1, arcs_33_3},
- {1, arcs_33_4},
};
-static arc arcs_34_0[7] = {
- {81, 1},
+static arc arcs_34_0[1] = {
{82, 1},
- {83, 1},
- {84, 1},
- {85, 1},
- {17, 1},
- {86, 1},
};
-static arc arcs_34_1[1] = {
+static arc arcs_34_1[2] = {
+ {28, 2},
{0, 1},
};
-static state states_34[2] = {
- {7, arcs_34_0},
- {1, arcs_34_1},
-};
-static arc arcs_35_0[1] = {
- {87, 1},
-};
-static arc arcs_35_1[1] = {
- {26, 2},
-};
-static arc arcs_35_2[1] = {
- {21, 3},
-};
-static arc arcs_35_3[1] = {
- {22, 4},
-};
-static arc arcs_35_4[3] = {
- {88, 1},
- {89, 5},
- {0, 4},
+static arc arcs_34_2[2] = {
+ {82, 1},
+ {0, 2},
};
-static arc arcs_35_5[1] = {
- {21, 6},
+static state states_34[3] = {
+ {1, arcs_34_0},
+ {2, arcs_34_1},
+ {2, arcs_34_2},
};
-static arc arcs_35_6[1] = {
- {22, 7},
+static arc arcs_35_0[1] = {
+ {84, 1},
};
-static arc arcs_35_7[1] = {
- {0, 7},
+static arc arcs_35_1[2] = {
+ {28, 0},
+ {0, 1},
};
-static state states_35[8] = {
+static state states_35[2] = {
{1, arcs_35_0},
- {1, arcs_35_1},
- {1, arcs_35_2},
- {1, arcs_35_3},
- {3, arcs_35_4},
- {1, arcs_35_5},
- {1, arcs_35_6},
- {1, arcs_35_7},
+ {2, arcs_35_1},
};
static arc arcs_36_0[1] = {
- {90, 1},
-};
-static arc arcs_36_1[1] = {
- {26, 2},
-};
-static arc arcs_36_2[1] = {
- {21, 3},
-};
-static arc arcs_36_3[1] = {
- {22, 4},
-};
-static arc arcs_36_4[2] = {
- {89, 5},
- {0, 4},
-};
-static arc arcs_36_5[1] = {
- {21, 6},
-};
-static arc arcs_36_6[1] = {
- {22, 7},
+ {19, 1},
};
-static arc arcs_36_7[1] = {
- {0, 7},
+static arc arcs_36_1[2] = {
+ {80, 0},
+ {0, 1},
};
-static state states_36[8] = {
+static state states_36[2] = {
{1, arcs_36_0},
- {1, arcs_36_1},
- {1, arcs_36_2},
- {1, arcs_36_3},
- {2, arcs_36_4},
- {1, arcs_36_5},
- {1, arcs_36_6},
- {1, arcs_36_7},
+ {2, arcs_36_1},
};
static arc arcs_37_0[1] = {
- {91, 1},
+ {85, 1},
};
static arc arcs_37_1[1] = {
- {58, 2},
-};
-static arc arcs_37_2[1] = {
- {92, 3},
-};
-static arc arcs_37_3[1] = {
- {9, 4},
-};
-static arc arcs_37_4[1] = {
- {21, 5},
-};
-static arc arcs_37_5[1] = {
- {22, 6},
-};
-static arc arcs_37_6[2] = {
- {89, 7},
- {0, 6},
-};
-static arc arcs_37_7[1] = {
- {21, 8},
-};
-static arc arcs_37_8[1] = {
- {22, 9},
+ {19, 2},
};
-static arc arcs_37_9[1] = {
- {0, 9},
+static arc arcs_37_2[2] = {
+ {28, 1},
+ {0, 2},
};
-static state states_37[10] = {
+static state states_37[3] = {
{1, arcs_37_0},
{1, arcs_37_1},
- {1, arcs_37_2},
- {1, arcs_37_3},
- {1, arcs_37_4},
- {1, arcs_37_5},
- {2, arcs_37_6},
- {1, arcs_37_7},
- {1, arcs_37_8},
- {1, arcs_37_9},
+ {2, arcs_37_2},
};
static arc arcs_38_0[1] = {
- {93, 1},
+ {86, 1},
};
static arc arcs_38_1[1] = {
- {21, 2},
+ {22, 2},
};
-static arc arcs_38_2[1] = {
- {22, 3},
+static arc arcs_38_2[2] = {
+ {28, 3},
+ {0, 2},
};
-static arc arcs_38_3[2] = {
- {94, 4},
- {95, 5},
+static arc arcs_38_3[1] = {
+ {22, 4},
};
static arc arcs_38_4[1] = {
- {21, 6},
-};
-static arc arcs_38_5[1] = {
- {21, 7},
-};
-static arc arcs_38_6[1] = {
- {22, 8},
-};
-static arc arcs_38_7[1] = {
- {22, 9},
-};
-static arc arcs_38_8[4] = {
- {94, 4},
- {89, 10},
- {95, 5},
- {0, 8},
-};
-static arc arcs_38_9[1] = {
- {0, 9},
-};
-static arc arcs_38_10[1] = {
- {21, 11},
-};
-static arc arcs_38_11[1] = {
- {22, 12},
-};
-static arc arcs_38_12[2] = {
- {95, 5},
- {0, 12},
+ {0, 4},
};
-static state states_38[13] = {
+static state states_38[5] = {
{1, arcs_38_0},
{1, arcs_38_1},
- {1, arcs_38_2},
- {2, arcs_38_3},
+ {2, arcs_38_2},
+ {1, arcs_38_3},
{1, arcs_38_4},
- {1, arcs_38_5},
- {1, arcs_38_6},
- {1, arcs_38_7},
- {4, arcs_38_8},
- {1, arcs_38_9},
- {1, arcs_38_10},
- {1, arcs_38_11},
- {2, arcs_38_12},
-};
-static arc arcs_39_0[1] = {
- {96, 1},
};
-static arc arcs_39_1[1] = {
- {26, 2},
-};
-static arc arcs_39_2[2] = {
- {97, 3},
- {21, 4},
-};
-static arc arcs_39_3[1] = {
- {21, 4},
-};
-static arc arcs_39_4[1] = {
- {22, 5},
+static arc arcs_39_0[7] = {
+ {87, 1},
+ {88, 1},
+ {89, 1},
+ {90, 1},
+ {91, 1},
+ {17, 1},
+ {92, 1},
};
-static arc arcs_39_5[1] = {
- {0, 5},
+static arc arcs_39_1[1] = {
+ {0, 1},
};
-static state states_39[6] = {
- {1, arcs_39_0},
+static state states_39[2] = {
+ {7, arcs_39_0},
{1, arcs_39_1},
- {2, arcs_39_2},
- {1, arcs_39_3},
- {1, arcs_39_4},
- {1, arcs_39_5},
};
static arc arcs_40_0[1] = {
- {77, 1},
+ {93, 1},
};
static arc arcs_40_1[1] = {
- {98, 2},
+ {22, 2},
};
static arc arcs_40_2[1] = {
- {0, 2},
+ {23, 3},
+};
+static arc arcs_40_3[1] = {
+ {24, 4},
+};
+static arc arcs_40_4[3] = {
+ {94, 1},
+ {95, 5},
+ {0, 4},
};
-static state states_40[3] = {
+static arc arcs_40_5[1] = {
+ {23, 6},
+};
+static arc arcs_40_6[1] = {
+ {24, 7},
+};
+static arc arcs_40_7[1] = {
+ {0, 7},
+};
+static state states_40[8] = {
{1, arcs_40_0},
{1, arcs_40_1},
{1, arcs_40_2},
+ {1, arcs_40_3},
+ {3, arcs_40_4},
+ {1, arcs_40_5},
+ {1, arcs_40_6},
+ {1, arcs_40_7},
};
static arc arcs_41_0[1] = {
- {99, 1},
+ {96, 1},
};
-static arc arcs_41_1[2] = {
- {26, 2},
- {0, 1},
+static arc arcs_41_1[1] = {
+ {22, 2},
};
-static arc arcs_41_2[2] = {
- {27, 3},
- {0, 2},
+static arc arcs_41_2[1] = {
+ {23, 3},
};
static arc arcs_41_3[1] = {
- {26, 4},
+ {24, 4},
};
-static arc arcs_41_4[1] = {
+static arc arcs_41_4[2] = {
+ {95, 5},
{0, 4},
};
-static state states_41[5] = {
+static arc arcs_41_5[1] = {
+ {23, 6},
+};
+static arc arcs_41_6[1] = {
+ {24, 7},
+};
+static arc arcs_41_7[1] = {
+ {0, 7},
+};
+static state states_41[8] = {
{1, arcs_41_0},
- {2, arcs_41_1},
- {2, arcs_41_2},
+ {1, arcs_41_1},
+ {1, arcs_41_2},
{1, arcs_41_3},
- {1, arcs_41_4},
+ {2, arcs_41_4},
+ {1, arcs_41_5},
+ {1, arcs_41_6},
+ {1, arcs_41_7},
};
-static arc arcs_42_0[2] = {
- {3, 1},
- {2, 2},
+static arc arcs_42_0[1] = {
+ {97, 1},
};
static arc arcs_42_1[1] = {
- {0, 1},
+ {64, 2},
};
static arc arcs_42_2[1] = {
- {100, 3},
+ {98, 3},
};
static arc arcs_42_3[1] = {
- {6, 4},
+ {9, 4},
};
-static arc arcs_42_4[2] = {
- {6, 4},
- {101, 1},
+static arc arcs_42_4[1] = {
+ {23, 5},
+};
+static arc arcs_42_5[1] = {
+ {24, 6},
+};
+static arc arcs_42_6[2] = {
+ {95, 7},
+ {0, 6},
+};
+static arc arcs_42_7[1] = {
+ {23, 8},
+};
+static arc arcs_42_8[1] = {
+ {24, 9},
+};
+static arc arcs_42_9[1] = {
+ {0, 9},
};
-static state states_42[5] = {
- {2, arcs_42_0},
+static state states_42[10] = {
+ {1, arcs_42_0},
{1, arcs_42_1},
{1, arcs_42_2},
{1, arcs_42_3},
- {2, arcs_42_4},
+ {1, arcs_42_4},
+ {1, arcs_42_5},
+ {2, arcs_42_6},
+ {1, arcs_42_7},
+ {1, arcs_42_8},
+ {1, arcs_42_9},
};
static arc arcs_43_0[1] = {
- {103, 1},
+ {99, 1},
};
-static arc arcs_43_1[2] = {
- {27, 2},
- {0, 1},
+static arc arcs_43_1[1] = {
+ {23, 2},
};
static arc arcs_43_2[1] = {
- {103, 3},
+ {24, 3},
};
static arc arcs_43_3[2] = {
- {27, 4},
- {0, 3},
+ {100, 4},
+ {101, 5},
};
-static arc arcs_43_4[2] = {
- {103, 3},
- {0, 4},
+static arc arcs_43_4[1] = {
+ {23, 6},
+};
+static arc arcs_43_5[1] = {
+ {23, 7},
+};
+static arc arcs_43_6[1] = {
+ {24, 8},
+};
+static arc arcs_43_7[1] = {
+ {24, 9},
+};
+static arc arcs_43_8[4] = {
+ {100, 4},
+ {95, 10},
+ {101, 5},
+ {0, 8},
+};
+static arc arcs_43_9[1] = {
+ {0, 9},
+};
+static arc arcs_43_10[1] = {
+ {23, 11},
+};
+static arc arcs_43_11[1] = {
+ {24, 12},
+};
+static arc arcs_43_12[2] = {
+ {101, 5},
+ {0, 12},
};
-static state states_43[5] = {
+static state states_43[13] = {
{1, arcs_43_0},
- {2, arcs_43_1},
+ {1, arcs_43_1},
{1, arcs_43_2},
{2, arcs_43_3},
- {2, arcs_43_4},
-};
-static arc arcs_44_0[2] = {
- {104, 1},
- {105, 1},
+ {1, arcs_43_4},
+ {1, arcs_43_5},
+ {1, arcs_43_6},
+ {1, arcs_43_7},
+ {4, arcs_43_8},
+ {1, arcs_43_9},
+ {1, arcs_43_10},
+ {1, arcs_43_11},
+ {2, arcs_43_12},
+};
+static arc arcs_44_0[1] = {
+ {102, 1},
};
static arc arcs_44_1[1] = {
- {0, 1},
+ {22, 2},
+};
+static arc arcs_44_2[2] = {
+ {103, 3},
+ {23, 4},
+};
+static arc arcs_44_3[1] = {
+ {23, 4},
};
-static state states_44[2] = {
- {2, arcs_44_0},
+static arc arcs_44_4[1] = {
+ {24, 5},
+};
+static arc arcs_44_5[1] = {
+ {0, 5},
+};
+static state states_44[6] = {
+ {1, arcs_44_0},
{1, arcs_44_1},
+ {2, arcs_44_2},
+ {1, arcs_44_3},
+ {1, arcs_44_4},
+ {1, arcs_44_5},
};
static arc arcs_45_0[1] = {
- {106, 1},
+ {83, 1},
};
-static arc arcs_45_1[2] = {
- {23, 2},
- {21, 3},
+static arc arcs_45_1[1] = {
+ {104, 2},
};
static arc arcs_45_2[1] = {
- {21, 3},
-};
-static arc arcs_45_3[1] = {
- {103, 4},
-};
-static arc arcs_45_4[1] = {
- {0, 4},
+ {0, 2},
};
-static state states_45[5] = {
+static state states_45[3] = {
{1, arcs_45_0},
- {2, arcs_45_1},
+ {1, arcs_45_1},
{1, arcs_45_2},
- {1, arcs_45_3},
- {1, arcs_45_4},
};
-static arc arcs_46_0[2] = {
- {104, 1},
- {107, 2},
+static arc arcs_46_0[1] = {
+ {105, 1},
};
static arc arcs_46_1[2] = {
- {87, 3},
+ {22, 2},
{0, 1},
};
-static arc arcs_46_2[1] = {
+static arc arcs_46_2[2] = {
+ {28, 3},
{0, 2},
};
static arc arcs_46_3[1] = {
- {104, 4},
+ {22, 4},
};
static arc arcs_46_4[1] = {
- {89, 5},
-};
-static arc arcs_46_5[1] = {
- {26, 2},
+ {0, 4},
};
-static state states_46[6] = {
- {2, arcs_46_0},
+static state states_46[5] = {
+ {1, arcs_46_0},
{2, arcs_46_1},
- {1, arcs_46_2},
+ {2, arcs_46_2},
{1, arcs_46_3},
{1, arcs_46_4},
- {1, arcs_46_5},
};
-static arc arcs_47_0[1] = {
- {108, 1},
+static arc arcs_47_0[2] = {
+ {3, 1},
+ {2, 2},
};
-static arc arcs_47_1[2] = {
- {109, 0},
+static arc arcs_47_1[1] = {
{0, 1},
};
-static state states_47[2] = {
- {1, arcs_47_0},
- {2, arcs_47_1},
+static arc arcs_47_2[1] = {
+ {106, 3},
+};
+static arc arcs_47_3[1] = {
+ {6, 4},
+};
+static arc arcs_47_4[2] = {
+ {6, 4},
+ {107, 1},
+};
+static state states_47[5] = {
+ {2, arcs_47_0},
+ {1, arcs_47_1},
+ {1, arcs_47_2},
+ {1, arcs_47_3},
+ {2, arcs_47_4},
};
static arc arcs_48_0[1] = {
- {110, 1},
+ {109, 1},
};
static arc arcs_48_1[2] = {
- {111, 0},
+ {28, 2},
{0, 1},
};
-static state states_48[2] = {
+static arc arcs_48_2[1] = {
+ {109, 3},
+};
+static arc arcs_48_3[2] = {
+ {28, 4},
+ {0, 3},
+};
+static arc arcs_48_4[2] = {
+ {109, 3},
+ {0, 4},
+};
+static state states_48[5] = {
{1, arcs_48_0},
{2, arcs_48_1},
+ {1, arcs_48_2},
+ {2, arcs_48_3},
+ {2, arcs_48_4},
};
static arc arcs_49_0[2] = {
- {112, 1},
- {113, 2},
+ {110, 1},
+ {111, 1},
};
static arc arcs_49_1[1] = {
- {110, 2},
-};
-static arc arcs_49_2[1] = {
- {0, 2},
+ {0, 1},
};
-static state states_49[3] = {
+static state states_49[2] = {
{2, arcs_49_0},
{1, arcs_49_1},
- {1, arcs_49_2},
};
static arc arcs_50_0[1] = {
- {98, 1},
+ {112, 1},
};
static arc arcs_50_1[2] = {
- {114, 0},
- {0, 1},
+ {33, 2},
+ {23, 3},
};
-static state states_50[2] = {
+static arc arcs_50_2[1] = {
+ {23, 3},
+};
+static arc arcs_50_3[1] = {
+ {109, 4},
+};
+static arc arcs_50_4[1] = {
+ {0, 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_51_0[9] = {
- {115, 1},
- {116, 1},
- {117, 1},
- {118, 1},
- {119, 1},
- {120, 1},
- {92, 1},
- {112, 2},
- {121, 3},
+static arc arcs_51_0[2] = {
+ {110, 1},
+ {113, 2},
};
-static arc arcs_51_1[1] = {
+static arc arcs_51_1[2] = {
+ {93, 3},
{0, 1},
};
static arc arcs_51_2[1] = {
- {92, 1},
+ {0, 2},
};
-static arc arcs_51_3[2] = {
- {112, 1},
- {0, 3},
+static arc arcs_51_3[1] = {
+ {110, 4},
+};
+static arc arcs_51_4[1] = {
+ {95, 5},
+};
+static arc arcs_51_5[1] = {
+ {22, 2},
};
-static state states_51[4] = {
- {9, arcs_51_0},
- {1, arcs_51_1},
+static state states_51[6] = {
+ {2, arcs_51_0},
+ {2, arcs_51_1},
{1, arcs_51_2},
- {2, arcs_51_3},
+ {1, arcs_51_3},
+ {1, arcs_51_4},
+ {1, arcs_51_5},
};
static arc arcs_52_0[1] = {
- {122, 1},
+ {114, 1},
};
static arc arcs_52_1[2] = {
- {123, 0},
+ {115, 0},
{0, 1},
};
static state states_52[2] = {
@@ -1126,856 +1188,947 @@ static state states_52[2] = {
{2, arcs_52_1},
};
static arc arcs_53_0[1] = {
- {124, 1},
+ {116, 1},
};
static arc arcs_53_1[2] = {
- {125, 0},
+ {117, 0},
{0, 1},
};
static state states_53[2] = {
{1, arcs_53_0},
{2, arcs_53_1},
};
-static arc arcs_54_0[1] = {
- {126, 1},
+static arc arcs_54_0[2] = {
+ {118, 1},
+ {119, 2},
};
-static arc arcs_54_1[2] = {
- {127, 0},
- {0, 1},
+static arc arcs_54_1[1] = {
+ {116, 2},
};
-static state states_54[2] = {
- {1, arcs_54_0},
- {2, arcs_54_1},
+static arc arcs_54_2[1] = {
+ {0, 2},
+};
+static state states_54[3] = {
+ {2, arcs_54_0},
+ {1, arcs_54_1},
+ {1, arcs_54_2},
};
static arc arcs_55_0[1] = {
- {128, 1},
+ {104, 1},
};
-static arc arcs_55_1[3] = {
- {129, 0},
- {56, 0},
+static arc arcs_55_1[2] = {
+ {120, 0},
{0, 1},
};
static state states_55[2] = {
{1, arcs_55_0},
- {3, arcs_55_1},
+ {2, arcs_55_1},
};
-static arc arcs_56_0[1] = {
- {130, 1},
+static arc arcs_56_0[9] = {
+ {121, 1},
+ {122, 1},
+ {123, 1},
+ {124, 1},
+ {125, 1},
+ {126, 1},
+ {98, 1},
+ {118, 2},
+ {127, 3},
};
-static arc arcs_56_1[3] = {
- {131, 0},
- {132, 0},
+static arc arcs_56_1[1] = {
{0, 1},
};
-static state states_56[2] = {
- {1, arcs_56_0},
- {3, arcs_56_1},
+static arc arcs_56_2[1] = {
+ {98, 1},
+};
+static arc arcs_56_3[2] = {
+ {118, 1},
+ {0, 3},
+};
+static state states_56[4] = {
+ {9, arcs_56_0},
+ {1, arcs_56_1},
+ {1, arcs_56_2},
+ {2, arcs_56_3},
};
static arc arcs_57_0[1] = {
- {133, 1},
+ {128, 1},
};
-static arc arcs_57_1[5] = {
- {28, 0},
- {134, 0},
- {135, 0},
- {136, 0},
+static arc arcs_57_1[2] = {
+ {129, 0},
{0, 1},
};
static state states_57[2] = {
{1, arcs_57_0},
- {5, arcs_57_1},
+ {2, arcs_57_1},
+};
+static arc arcs_58_0[1] = {
+ {130, 1},
+};
+static arc arcs_58_1[2] = {
+ {131, 0},
+ {0, 1},
};
-static arc arcs_58_0[4] = {
- {131, 1},
+static state states_58[2] = {
+ {1, arcs_58_0},
+ {2, arcs_58_1},
+};
+static arc arcs_59_0[1] = {
{132, 1},
+};
+static arc arcs_59_1[2] = {
+ {133, 0},
+ {0, 1},
+};
+static state states_59[2] = {
+ {1, arcs_59_0},
+ {2, arcs_59_1},
+};
+static arc arcs_60_0[1] = {
+ {134, 1},
+};
+static arc arcs_60_1[3] = {
+ {135, 0},
+ {62, 0},
+ {0, 1},
+};
+static state states_60[2] = {
+ {1, arcs_60_0},
+ {3, arcs_60_1},
+};
+static arc arcs_61_0[1] = {
+ {136, 1},
+};
+static arc arcs_61_1[3] = {
+ {137, 0},
+ {138, 0},
+ {0, 1},
+};
+static state states_61[2] = {
+ {1, arcs_61_0},
+ {3, arcs_61_1},
+};
+static arc arcs_62_0[1] = {
+ {139, 1},
+};
+static arc arcs_62_1[5] = {
+ {29, 0},
+ {140, 0},
+ {141, 0},
+ {142, 0},
+ {0, 1},
+};
+static state states_62[2] = {
+ {1, arcs_62_0},
+ {5, arcs_62_1},
+};
+static arc arcs_63_0[4] = {
{137, 1},
- {138, 2},
+ {138, 1},
+ {143, 1},
+ {144, 2},
};
-static arc arcs_58_1[1] = {
- {133, 2},
+static arc arcs_63_1[1] = {
+ {139, 2},
};
-static arc arcs_58_2[1] = {
+static arc arcs_63_2[1] = {
{0, 2},
};
-static state states_58[3] = {
- {4, arcs_58_0},
- {1, arcs_58_1},
- {1, arcs_58_2},
+static state states_63[3] = {
+ {4, arcs_63_0},
+ {1, arcs_63_1},
+ {1, arcs_63_2},
};
-static arc arcs_59_0[1] = {
- {139, 1},
+static arc arcs_64_0[1] = {
+ {145, 1},
};
-static arc arcs_59_1[3] = {
- {140, 1},
- {29, 2},
+static arc arcs_64_1[3] = {
+ {146, 1},
+ {31, 2},
{0, 1},
};
-static arc arcs_59_2[1] = {
- {133, 3},
+static arc arcs_64_2[1] = {
+ {139, 3},
};
-static arc arcs_59_3[1] = {
+static arc arcs_64_3[1] = {
{0, 3},
};
-static state states_59[4] = {
- {1, arcs_59_0},
- {3, arcs_59_1},
- {1, arcs_59_2},
- {1, arcs_59_3},
+static state states_64[4] = {
+ {1, arcs_64_0},
+ {3, arcs_64_1},
+ {1, arcs_64_2},
+ {1, arcs_64_3},
};
-static arc arcs_60_0[7] = {
+static arc arcs_65_0[7] = {
{13, 1},
- {142, 2},
- {145, 3},
+ {148, 2},
+ {151, 3},
{19, 4},
- {148, 4},
- {149, 5},
- {74, 6},
+ {154, 4},
+ {155, 5},
+ {80, 6},
};
-static arc arcs_60_1[3] = {
- {42, 7},
- {141, 7},
+static arc arcs_65_1[3] = {
+ {48, 7},
+ {147, 7},
{15, 4},
};
-static arc arcs_60_2[2] = {
- {143, 8},
- {144, 4},
+static arc arcs_65_2[2] = {
+ {149, 8},
+ {150, 4},
};
-static arc arcs_60_3[2] = {
- {146, 9},
- {147, 4},
+static arc arcs_65_3[2] = {
+ {152, 9},
+ {153, 4},
};
-static arc arcs_60_4[1] = {
+static arc arcs_65_4[1] = {
{0, 4},
};
-static arc arcs_60_5[2] = {
- {149, 5},
+static arc arcs_65_5[2] = {
+ {155, 5},
{0, 5},
};
-static arc arcs_60_6[1] = {
- {74, 10},
+static arc arcs_65_6[1] = {
+ {80, 10},
};
-static arc arcs_60_7[1] = {
+static arc arcs_65_7[1] = {
{15, 4},
};
-static arc arcs_60_8[1] = {
- {144, 4},
-};
-static arc arcs_60_9[1] = {
- {147, 4},
+static arc arcs_65_8[1] = {
+ {150, 4},
};
-static arc arcs_60_10[1] = {
- {74, 4},
+static arc arcs_65_9[1] = {
+ {153, 4},
};
-static state states_60[11] = {
- {7, arcs_60_0},
- {3, arcs_60_1},
- {2, arcs_60_2},
- {2, arcs_60_3},
- {1, arcs_60_4},
- {2, arcs_60_5},
- {1, arcs_60_6},
- {1, arcs_60_7},
- {1, arcs_60_8},
- {1, arcs_60_9},
- {1, arcs_60_10},
+static arc arcs_65_10[1] = {
+ {80, 4},
};
-static arc arcs_61_0[1] = {
- {26, 1},
-};
-static arc arcs_61_1[3] = {
- {150, 2},
- {27, 3},
+static state states_65[11] = {
+ {7, arcs_65_0},
+ {3, arcs_65_1},
+ {2, arcs_65_2},
+ {2, arcs_65_3},
+ {1, arcs_65_4},
+ {2, arcs_65_5},
+ {1, arcs_65_6},
+ {1, arcs_65_7},
+ {1, arcs_65_8},
+ {1, arcs_65_9},
+ {1, arcs_65_10},
+};
+static arc arcs_66_0[1] = {
+ {22, 1},
+};
+static arc arcs_66_1[3] = {
+ {156, 2},
+ {28, 3},
{0, 1},
};
-static arc arcs_61_2[1] = {
+static arc arcs_66_2[1] = {
{0, 2},
};
-static arc arcs_61_3[2] = {
- {26, 4},
+static arc arcs_66_3[2] = {
+ {22, 4},
{0, 3},
};
-static arc arcs_61_4[2] = {
- {27, 3},
+static arc arcs_66_4[2] = {
+ {28, 3},
{0, 4},
};
-static state states_61[5] = {
- {1, arcs_61_0},
- {3, arcs_61_1},
- {1, arcs_61_2},
- {2, arcs_61_3},
- {2, arcs_61_4},
+static state states_66[5] = {
+ {1, arcs_66_0},
+ {3, arcs_66_1},
+ {1, arcs_66_2},
+ {2, arcs_66_3},
+ {2, arcs_66_4},
};
-static arc arcs_62_0[1] = {
- {26, 1},
+static arc arcs_67_0[1] = {
+ {22, 1},
};
-static arc arcs_62_1[3] = {
- {151, 2},
- {27, 3},
+static arc arcs_67_1[3] = {
+ {157, 2},
+ {28, 3},
{0, 1},
};
-static arc arcs_62_2[1] = {
+static arc arcs_67_2[1] = {
{0, 2},
};
-static arc arcs_62_3[2] = {
- {26, 4},
+static arc arcs_67_3[2] = {
+ {22, 4},
{0, 3},
};
-static arc arcs_62_4[2] = {
- {27, 3},
+static arc arcs_67_4[2] = {
+ {28, 3},
{0, 4},
};
-static state states_62[5] = {
- {1, arcs_62_0},
- {3, arcs_62_1},
- {1, arcs_62_2},
- {2, arcs_62_3},
- {2, arcs_62_4},
+static state states_67[5] = {
+ {1, arcs_67_0},
+ {3, arcs_67_1},
+ {1, arcs_67_2},
+ {2, arcs_67_3},
+ {2, arcs_67_4},
};
-static arc arcs_63_0[1] = {
- {106, 1},
+static arc arcs_68_0[1] = {
+ {112, 1},
};
-static arc arcs_63_1[2] = {
- {23, 2},
- {21, 3},
+static arc arcs_68_1[2] = {
+ {33, 2},
+ {23, 3},
};
-static arc arcs_63_2[1] = {
- {21, 3},
+static arc arcs_68_2[1] = {
+ {23, 3},
};
-static arc arcs_63_3[1] = {
- {26, 4},
+static arc arcs_68_3[1] = {
+ {22, 4},
};
-static arc arcs_63_4[1] = {
+static arc arcs_68_4[1] = {
{0, 4},
};
-static state states_63[5] = {
- {1, arcs_63_0},
- {2, arcs_63_1},
- {1, arcs_63_2},
- {1, arcs_63_3},
- {1, arcs_63_4},
+static state states_68[5] = {
+ {1, arcs_68_0},
+ {2, arcs_68_1},
+ {1, arcs_68_2},
+ {1, arcs_68_3},
+ {1, arcs_68_4},
};
-static arc arcs_64_0[3] = {
+static arc arcs_69_0[3] = {
{13, 1},
- {142, 2},
- {74, 3},
+ {148, 2},
+ {80, 3},
};
-static arc arcs_64_1[2] = {
+static arc arcs_69_1[2] = {
{14, 4},
{15, 5},
};
-static arc arcs_64_2[1] = {
- {152, 6},
+static arc arcs_69_2[1] = {
+ {158, 6},
};
-static arc arcs_64_3[1] = {
+static arc arcs_69_3[1] = {
{19, 5},
};
-static arc arcs_64_4[1] = {
+static arc arcs_69_4[1] = {
{15, 5},
};
-static arc arcs_64_5[1] = {
+static arc arcs_69_5[1] = {
{0, 5},
};
-static arc arcs_64_6[1] = {
- {144, 5},
+static arc arcs_69_6[1] = {
+ {150, 5},
};
-static state states_64[7] = {
- {3, arcs_64_0},
- {2, arcs_64_1},
- {1, arcs_64_2},
- {1, arcs_64_3},
- {1, arcs_64_4},
- {1, arcs_64_5},
- {1, arcs_64_6},
+static state states_69[7] = {
+ {3, arcs_69_0},
+ {2, arcs_69_1},
+ {1, arcs_69_2},
+ {1, arcs_69_3},
+ {1, arcs_69_4},
+ {1, arcs_69_5},
+ {1, arcs_69_6},
};
-static arc arcs_65_0[1] = {
- {153, 1},
+static arc arcs_70_0[1] = {
+ {159, 1},
};
-static arc arcs_65_1[2] = {
- {27, 2},
+static arc arcs_70_1[2] = {
+ {28, 2},
{0, 1},
};
-static arc arcs_65_2[2] = {
- {153, 1},
+static arc arcs_70_2[2] = {
+ {159, 1},
{0, 2},
};
-static state states_65[3] = {
- {1, arcs_65_0},
- {2, arcs_65_1},
- {2, arcs_65_2},
+static state states_70[3] = {
+ {1, arcs_70_0},
+ {2, arcs_70_1},
+ {2, arcs_70_2},
};
-static arc arcs_66_0[2] = {
- {26, 1},
- {21, 2},
+static arc arcs_71_0[2] = {
+ {22, 1},
+ {23, 2},
};
-static arc arcs_66_1[2] = {
- {21, 2},
+static arc arcs_71_1[2] = {
+ {23, 2},
{0, 1},
};
-static arc arcs_66_2[3] = {
- {26, 3},
- {154, 4},
+static arc arcs_71_2[3] = {
+ {22, 3},
+ {160, 4},
{0, 2},
};
-static arc arcs_66_3[2] = {
- {154, 4},
+static arc arcs_71_3[2] = {
+ {160, 4},
{0, 3},
};
-static arc arcs_66_4[1] = {
+static arc arcs_71_4[1] = {
{0, 4},
};
-static state states_66[5] = {
- {2, arcs_66_0},
- {2, arcs_66_1},
- {3, arcs_66_2},
- {2, arcs_66_3},
- {1, arcs_66_4},
+static state states_71[5] = {
+ {2, arcs_71_0},
+ {2, arcs_71_1},
+ {3, arcs_71_2},
+ {2, arcs_71_3},
+ {1, arcs_71_4},
};
-static arc arcs_67_0[1] = {
- {21, 1},
+static arc arcs_72_0[1] = {
+ {23, 1},
};
-static arc arcs_67_1[2] = {
- {26, 2},
+static arc arcs_72_1[2] = {
+ {22, 2},
{0, 1},
};
-static arc arcs_67_2[1] = {
+static arc arcs_72_2[1] = {
{0, 2},
};
-static state states_67[3] = {
- {1, arcs_67_0},
- {2, arcs_67_1},
- {1, arcs_67_2},
+static state states_72[3] = {
+ {1, arcs_72_0},
+ {2, arcs_72_1},
+ {1, arcs_72_2},
};
-static arc arcs_68_0[1] = {
- {98, 1},
+static arc arcs_73_0[1] = {
+ {104, 1},
};
-static arc arcs_68_1[2] = {
- {27, 2},
+static arc arcs_73_1[2] = {
+ {28, 2},
{0, 1},
};
-static arc arcs_68_2[2] = {
- {98, 1},
+static arc arcs_73_2[2] = {
+ {104, 1},
{0, 2},
};
-static state states_68[3] = {
- {1, arcs_68_0},
- {2, arcs_68_1},
- {2, arcs_68_2},
+static state states_73[3] = {
+ {1, arcs_73_0},
+ {2, arcs_73_1},
+ {2, arcs_73_2},
};
-static arc arcs_69_0[1] = {
- {26, 1},
+static arc arcs_74_0[1] = {
+ {22, 1},
};
-static arc arcs_69_1[2] = {
- {27, 2},
+static arc arcs_74_1[2] = {
+ {28, 2},
{0, 1},
};
-static arc arcs_69_2[2] = {
- {26, 1},
+static arc arcs_74_2[2] = {
+ {22, 1},
{0, 2},
};
-static state states_69[3] = {
- {1, arcs_69_0},
- {2, arcs_69_1},
- {2, arcs_69_2},
+static state states_74[3] = {
+ {1, arcs_74_0},
+ {2, arcs_74_1},
+ {2, arcs_74_2},
};
-static arc arcs_70_0[1] = {
- {26, 1},
+static arc arcs_75_0[1] = {
+ {22, 1},
};
-static arc arcs_70_1[3] = {
- {21, 2},
- {27, 3},
+static arc arcs_75_1[3] = {
+ {23, 2},
+ {28, 3},
{0, 1},
};
-static arc arcs_70_2[1] = {
- {26, 4},
+static arc arcs_75_2[1] = {
+ {22, 4},
};
-static arc arcs_70_3[2] = {
- {26, 5},
+static arc arcs_75_3[2] = {
+ {22, 5},
{0, 3},
};
-static arc arcs_70_4[2] = {
- {27, 6},
+static arc arcs_75_4[2] = {
+ {28, 6},
{0, 4},
};
-static arc arcs_70_5[2] = {
- {27, 3},
+static arc arcs_75_5[2] = {
+ {28, 3},
{0, 5},
};
-static arc arcs_70_6[2] = {
- {26, 7},
+static arc arcs_75_6[2] = {
+ {22, 7},
{0, 6},
};
-static arc arcs_70_7[1] = {
- {21, 2},
+static arc arcs_75_7[1] = {
+ {23, 2},
};
-static state states_70[8] = {
- {1, arcs_70_0},
- {3, arcs_70_1},
- {1, arcs_70_2},
- {2, arcs_70_3},
- {2, arcs_70_4},
- {2, arcs_70_5},
- {2, arcs_70_6},
- {1, arcs_70_7},
-};
-static arc arcs_71_0[1] = {
- {155, 1},
-};
-static arc arcs_71_1[1] = {
+static state states_75[8] = {
+ {1, arcs_75_0},
+ {3, arcs_75_1},
+ {1, arcs_75_2},
+ {2, arcs_75_3},
+ {2, arcs_75_4},
+ {2, arcs_75_5},
+ {2, arcs_75_6},
+ {1, arcs_75_7},
+};
+static arc arcs_76_0[1] = {
+ {161, 1},
+};
+static arc arcs_76_1[1] = {
{19, 2},
};
-static arc arcs_71_2[2] = {
+static arc arcs_76_2[2] = {
{13, 3},
- {21, 4},
+ {23, 4},
};
-static arc arcs_71_3[2] = {
+static arc arcs_76_3[2] = {
{9, 5},
{15, 6},
};
-static arc arcs_71_4[1] = {
- {22, 7},
+static arc arcs_76_4[1] = {
+ {24, 7},
};
-static arc arcs_71_5[1] = {
+static arc arcs_76_5[1] = {
{15, 6},
};
-static arc arcs_71_6[1] = {
- {21, 4},
+static arc arcs_76_6[1] = {
+ {23, 4},
};
-static arc arcs_71_7[1] = {
+static arc arcs_76_7[1] = {
{0, 7},
};
-static state states_71[8] = {
- {1, arcs_71_0},
- {1, arcs_71_1},
- {2, arcs_71_2},
- {2, arcs_71_3},
- {1, arcs_71_4},
- {1, arcs_71_5},
- {1, arcs_71_6},
- {1, arcs_71_7},
-};
-static arc arcs_72_0[3] = {
- {156, 1},
- {28, 2},
- {29, 3},
+static state states_76[8] = {
+ {1, arcs_76_0},
+ {1, arcs_76_1},
+ {2, arcs_76_2},
+ {2, arcs_76_3},
+ {1, arcs_76_4},
+ {1, arcs_76_5},
+ {1, arcs_76_6},
+ {1, arcs_76_7},
+};
+static arc arcs_77_0[3] = {
+ {162, 1},
+ {29, 2},
+ {31, 3},
};
-static arc arcs_72_1[2] = {
- {27, 4},
+static arc arcs_77_1[2] = {
+ {28, 4},
{0, 1},
};
-static arc arcs_72_2[1] = {
- {26, 5},
+static arc arcs_77_2[1] = {
+ {22, 5},
};
-static arc arcs_72_3[1] = {
- {26, 6},
+static arc arcs_77_3[1] = {
+ {22, 6},
};
-static arc arcs_72_4[4] = {
- {156, 1},
- {28, 2},
- {29, 3},
+static arc arcs_77_4[4] = {
+ {162, 1},
+ {29, 2},
+ {31, 3},
{0, 4},
};
-static arc arcs_72_5[2] = {
- {27, 7},
+static arc arcs_77_5[2] = {
+ {28, 7},
{0, 5},
};
-static arc arcs_72_6[1] = {
+static arc arcs_77_6[1] = {
{0, 6},
};
-static arc arcs_72_7[1] = {
- {29, 3},
+static arc arcs_77_7[1] = {
+ {31, 3},
};
-static state states_72[8] = {
- {3, arcs_72_0},
- {2, arcs_72_1},
- {1, arcs_72_2},
- {1, arcs_72_3},
- {4, arcs_72_4},
- {2, arcs_72_5},
- {1, arcs_72_6},
- {1, arcs_72_7},
+static state states_77[8] = {
+ {3, arcs_77_0},
+ {2, arcs_77_1},
+ {1, arcs_77_2},
+ {1, arcs_77_3},
+ {4, arcs_77_4},
+ {2, arcs_77_5},
+ {1, arcs_77_6},
+ {1, arcs_77_7},
};
-static arc arcs_73_0[1] = {
- {26, 1},
+static arc arcs_78_0[1] = {
+ {22, 1},
};
-static arc arcs_73_1[3] = {
- {151, 2},
- {25, 3},
+static arc arcs_78_1[3] = {
+ {157, 2},
+ {27, 3},
{0, 1},
};
-static arc arcs_73_2[1] = {
+static arc arcs_78_2[1] = {
{0, 2},
};
-static arc arcs_73_3[1] = {
- {26, 2},
+static arc arcs_78_3[1] = {
+ {22, 2},
};
-static state states_73[4] = {
- {1, arcs_73_0},
- {3, arcs_73_1},
- {1, arcs_73_2},
- {1, arcs_73_3},
+static state states_78[4] = {
+ {1, arcs_78_0},
+ {3, arcs_78_1},
+ {1, arcs_78_2},
+ {1, arcs_78_3},
};
-static arc arcs_74_0[2] = {
- {150, 1},
- {158, 1},
+static arc arcs_79_0[2] = {
+ {156, 1},
+ {164, 1},
};
-static arc arcs_74_1[1] = {
+static arc arcs_79_1[1] = {
{0, 1},
};
-static state states_74[2] = {
- {2, arcs_74_0},
- {1, arcs_74_1},
+static state states_79[2] = {
+ {2, arcs_79_0},
+ {1, arcs_79_1},
};
-static arc arcs_75_0[1] = {
- {91, 1},
+static arc arcs_80_0[1] = {
+ {97, 1},
};
-static arc arcs_75_1[1] = {
- {58, 2},
+static arc arcs_80_1[1] = {
+ {64, 2},
};
-static arc arcs_75_2[1] = {
- {92, 3},
+static arc arcs_80_2[1] = {
+ {98, 3},
};
-static arc arcs_75_3[1] = {
- {102, 4},
+static arc arcs_80_3[1] = {
+ {108, 4},
};
-static arc arcs_75_4[2] = {
- {157, 5},
+static arc arcs_80_4[2] = {
+ {163, 5},
{0, 4},
};
-static arc arcs_75_5[1] = {
+static arc arcs_80_5[1] = {
{0, 5},
};
-static state states_75[6] = {
- {1, arcs_75_0},
- {1, arcs_75_1},
- {1, arcs_75_2},
- {1, arcs_75_3},
- {2, arcs_75_4},
- {1, arcs_75_5},
+static state states_80[6] = {
+ {1, arcs_80_0},
+ {1, arcs_80_1},
+ {1, arcs_80_2},
+ {1, arcs_80_3},
+ {2, arcs_80_4},
+ {1, arcs_80_5},
};
-static arc arcs_76_0[1] = {
- {87, 1},
+static arc arcs_81_0[1] = {
+ {93, 1},
};
-static arc arcs_76_1[1] = {
- {103, 2},
+static arc arcs_81_1[1] = {
+ {109, 2},
};
-static arc arcs_76_2[2] = {
- {157, 3},
+static arc arcs_81_2[2] = {
+ {163, 3},
{0, 2},
};
-static arc arcs_76_3[1] = {
+static arc arcs_81_3[1] = {
{0, 3},
};
-static state states_76[4] = {
- {1, arcs_76_0},
- {1, arcs_76_1},
- {2, arcs_76_2},
- {1, arcs_76_3},
+static state states_81[4] = {
+ {1, arcs_81_0},
+ {1, arcs_81_1},
+ {2, arcs_81_2},
+ {1, arcs_81_3},
};
-static arc arcs_77_0[2] = {
- {151, 1},
- {160, 1},
+static arc arcs_82_0[2] = {
+ {157, 1},
+ {166, 1},
};
-static arc arcs_77_1[1] = {
+static arc arcs_82_1[1] = {
{0, 1},
};
-static state states_77[2] = {
- {2, arcs_77_0},
- {1, arcs_77_1},
+static state states_82[2] = {
+ {2, arcs_82_0},
+ {1, arcs_82_1},
};
-static arc arcs_78_0[1] = {
- {91, 1},
+static arc arcs_83_0[1] = {
+ {97, 1},
};
-static arc arcs_78_1[1] = {
- {58, 2},
+static arc arcs_83_1[1] = {
+ {64, 2},
};
-static arc arcs_78_2[1] = {
- {92, 3},
+static arc arcs_83_2[1] = {
+ {98, 3},
};
-static arc arcs_78_3[1] = {
- {104, 4},
+static arc arcs_83_3[1] = {
+ {110, 4},
};
-static arc arcs_78_4[2] = {
- {159, 5},
+static arc arcs_83_4[2] = {
+ {165, 5},
{0, 4},
};
-static arc arcs_78_5[1] = {
+static arc arcs_83_5[1] = {
{0, 5},
};
-static state states_78[6] = {
- {1, arcs_78_0},
- {1, arcs_78_1},
- {1, arcs_78_2},
- {1, arcs_78_3},
- {2, arcs_78_4},
- {1, arcs_78_5},
+static state states_83[6] = {
+ {1, arcs_83_0},
+ {1, arcs_83_1},
+ {1, arcs_83_2},
+ {1, arcs_83_3},
+ {2, arcs_83_4},
+ {1, arcs_83_5},
};
-static arc arcs_79_0[1] = {
- {87, 1},
+static arc arcs_84_0[1] = {
+ {93, 1},
};
-static arc arcs_79_1[1] = {
- {103, 2},
+static arc arcs_84_1[1] = {
+ {109, 2},
};
-static arc arcs_79_2[2] = {
- {159, 3},
+static arc arcs_84_2[2] = {
+ {165, 3},
{0, 2},
};
-static arc arcs_79_3[1] = {
+static arc arcs_84_3[1] = {
{0, 3},
};
-static state states_79[4] = {
- {1, arcs_79_0},
- {1, arcs_79_1},
- {2, arcs_79_2},
- {1, arcs_79_3},
+static state states_84[4] = {
+ {1, arcs_84_0},
+ {1, arcs_84_1},
+ {2, arcs_84_2},
+ {1, arcs_84_3},
};
-static arc arcs_80_0[1] = {
- {26, 1},
+static arc arcs_85_0[1] = {
+ {22, 1},
};
-static arc arcs_80_1[2] = {
- {27, 0},
+static arc arcs_85_1[2] = {
+ {28, 0},
{0, 1},
};
-static state states_80[2] = {
- {1, arcs_80_0},
- {2, arcs_80_1},
+static state states_85[2] = {
+ {1, arcs_85_0},
+ {2, arcs_85_1},
};
-static arc arcs_81_0[1] = {
+static arc arcs_86_0[1] = {
{19, 1},
};
-static arc arcs_81_1[1] = {
+static arc arcs_86_1[1] = {
{0, 1},
};
-static state states_81[2] = {
- {1, arcs_81_0},
- {1, arcs_81_1},
+static state states_86[2] = {
+ {1, arcs_86_0},
+ {1, arcs_86_1},
};
-static arc arcs_82_0[1] = {
- {163, 1},
+static arc arcs_87_0[1] = {
+ {169, 1},
};
-static arc arcs_82_1[2] = {
+static arc arcs_87_1[2] = {
{9, 2},
{0, 1},
};
-static arc arcs_82_2[1] = {
+static arc arcs_87_2[1] = {
{0, 2},
};
-static state states_82[3] = {
- {1, arcs_82_0},
- {2, arcs_82_1},
- {1, arcs_82_2},
+static state states_87[3] = {
+ {1, arcs_87_0},
+ {2, arcs_87_1},
+ {1, arcs_87_2},
};
-static dfa dfas[83] = {
+static dfa dfas[88] = {
{256, "single_input", 0, 3, states_0,
- "\004\050\014\000\000\000\200\012\236\206\201\054\001\004\001\000\030\102\062\010\010"},
+ "\004\050\014\000\000\000\000\240\202\247\141\040\113\000\101\000\000\206\220\014\002\002"},
{257, "file_input", 0, 2, states_1,
- "\204\050\014\000\000\000\200\012\236\206\201\054\001\004\001\000\030\102\062\010\010"},
+ "\204\050\014\000\000\000\000\240\202\247\141\040\113\000\101\000\000\206\220\014\002\002"},
{258, "eval_input", 0, 3, states_2,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
{259, "decorator", 0, 7, states_3,
- "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
{260, "decorators", 0, 2, states_4,
- "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {261, "funcdef", 0, 7, states_5,
- "\000\010\004\000\000\000\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\000\000\000\000"},
+ {261, "funcdef", 0, 9, states_5,
+ "\000\010\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
{262, "parameters", 0, 4, states_6,
- "\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {263, "varargslist", 0, 12, states_7,
- "\000\040\010\060\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {264, "fpdef", 0, 4, states_8,
- "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {265, "fplist", 0, 3, states_9,
- "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {266, "stmt", 0, 2, states_10,
- "\000\050\014\000\000\000\200\012\236\206\201\054\001\004\001\000\030\102\062\010\010"},
- {267, "simple_stmt", 0, 4, states_11,
- "\000\040\010\000\000\000\200\012\236\206\001\000\000\004\001\000\030\102\062\000\010"},
- {268, "small_stmt", 0, 2, states_12,
- "\000\040\010\000\000\000\200\012\236\206\001\000\000\004\001\000\030\102\062\000\010"},
- {269, "expr_stmt", 0, 6, states_13,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {270, "augassign", 0, 2, states_14,
- "\000\000\000\000\000\370\177\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {271, "print_stmt", 0, 9, states_15,
- "\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {272, "del_stmt", 0, 3, states_16,
- "\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {273, "pass_stmt", 0, 2, states_17,
- "\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {274, "flow_stmt", 0, 2, states_18,
- "\000\000\000\000\000\000\000\000\036\000\000\000\000\000\000\000\000\000\000\000\010"},
- {275, "break_stmt", 0, 2, states_19,
- "\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000"},
- {276, "continue_stmt", 0, 2, states_20,
- "\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000"},
- {277, "return_stmt", 0, 3, states_21,
- "\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000"},
- {278, "yield_stmt", 0, 2, states_22,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010"},
- {279, "raise_stmt", 0, 7, states_23,
- "\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000"},
- {280, "import_stmt", 0, 2, states_24,
- "\000\000\000\000\000\000\000\000\200\002\000\000\000\000\000\000\000\000\000\000\000"},
- {281, "import_name", 0, 3, states_25,
- "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000"},
- {282, "import_from", 0, 8, states_26,
- "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000"},
- {283, "import_as_name", 0, 4, states_27,
- "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {284, "dotted_as_name", 0, 4, states_28,
- "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {285, "import_as_names", 0, 3, states_29,
- "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {286, "dotted_as_names", 0, 2, states_30,
- "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {287, "dotted_name", 0, 2, states_31,
- "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {288, "global_stmt", 0, 3, states_32,
- "\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000"},
- {289, "assert_stmt", 0, 5, states_33,
- "\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000"},
- {290, "compound_stmt", 0, 2, states_34,
- "\000\010\004\000\000\000\000\000\000\000\200\054\001\000\000\000\000\000\000\010\000"},
- {291, "if_stmt", 0, 8, states_35,
- "\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"},
- {292, "while_stmt", 0, 8, states_36,
- "\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000"},
- {293, "for_stmt", 0, 10, states_37,
- "\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"},
- {294, "try_stmt", 0, 13, states_38,
- "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"},
- {295, "with_stmt", 0, 6, states_39,
- "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"},
- {296, "with_var", 0, 3, states_40,
- "\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"},
- {297, "except_clause", 0, 5, states_41,
- "\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000"},
- {298, "suite", 0, 5, states_42,
- "\004\040\010\000\000\000\200\012\236\206\001\000\000\004\001\000\030\102\062\000\010"},
- {299, "testlist_safe", 0, 5, states_43,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {300, "old_test", 0, 2, states_44,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {301, "old_lambdef", 0, 5, states_45,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000"},
- {302, "test", 0, 6, states_46,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {303, "or_test", 0, 2, states_47,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\001\000\030\102\062\000\000"},
- {304, "and_test", 0, 2, states_48,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\001\000\030\102\062\000\000"},
- {305, "not_test", 0, 3, states_49,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\001\000\030\102\062\000\000"},
- {306, "comparison", 0, 2, states_50,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {307, "comp_op", 0, 4, states_51,
- "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\371\003\000\000\000\000\000"},
- {308, "expr", 0, 2, states_52,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {309, "xor_expr", 0, 2, states_53,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {310, "and_expr", 0, 2, states_54,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {311, "shift_expr", 0, 2, states_55,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {312, "arith_expr", 0, 2, states_56,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {313, "term", 0, 2, states_57,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {314, "factor", 0, 3, states_58,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {315, "power", 0, 4, states_59,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\000\100\062\000\000"},
- {316, "atom", 0, 11, states_60,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\000\100\062\000\000"},
- {317, "listmaker", 0, 5, states_61,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {318, "testlist_gexp", 0, 5, states_62,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {319, "lambdef", 0, 5, states_63,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000"},
- {320, "trailer", 0, 7, states_64,
- "\000\040\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\100\000\000\000"},
- {321, "subscriptlist", 0, 3, states_65,
- "\000\040\050\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {322, "subscript", 0, 5, states_66,
- "\000\040\050\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {323, "sliceop", 0, 3, states_67,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {324, "exprlist", 0, 3, states_68,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\000\000\000\030\102\062\000\000"},
- {325, "testlist", 0, 3, states_69,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {326, "dictsetmaker", 0, 8, states_70,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {327, "classdef", 0, 8, states_71,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010\000"},
- {328, "arglist", 0, 8, states_72,
- "\000\040\010\060\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {329, "argument", 0, 4, states_73,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {330, "list_iter", 0, 2, states_74,
- "\000\000\000\000\000\000\000\000\000\000\200\010\000\000\000\000\000\000\000\000\000"},
- {331, "list_for", 0, 6, states_75,
- "\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"},
- {332, "list_if", 0, 4, states_76,
- "\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"},
- {333, "gen_iter", 0, 2, states_77,
- "\000\000\000\000\000\000\000\000\000\000\200\010\000\000\000\000\000\000\000\000\000"},
- {334, "gen_for", 0, 6, states_78,
- "\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"},
- {335, "gen_if", 0, 4, states_79,
- "\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"},
- {336, "testlist1", 0, 2, states_80,
- "\000\040\010\000\000\000\000\000\000\004\000\000\000\004\001\000\030\102\062\000\000"},
- {337, "encoding_decl", 0, 2, states_81,
- "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {338, "yield_expr", 0, 3, states_82,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010"},
-};
-static label labels[164] = {
+ "\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {263, "typedargslist", 0, 12, states_7,
+ "\000\040\010\240\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {264, "tname", 0, 4, states_8,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {265, "tfpdef", 0, 4, states_9,
+ "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {266, "tfplist", 0, 3, states_10,
+ "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {267, "varargslist", 0, 12, states_11,
+ "\000\040\010\240\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {268, "vname", 0, 2, states_12,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {269, "vfpdef", 0, 4, states_13,
+ "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {270, "vfplist", 0, 3, states_14,
+ "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {271, "stmt", 0, 2, states_15,
+ "\000\050\014\000\000\000\000\240\202\247\141\040\113\000\101\000\000\206\220\014\002\002"},
+ {272, "simple_stmt", 0, 4, states_16,
+ "\000\040\010\000\000\000\000\240\202\247\141\000\000\000\101\000\000\206\220\014\000\002"},
+ {273, "small_stmt", 0, 2, states_17,
+ "\000\040\010\000\000\000\000\240\202\247\141\000\000\000\101\000\000\206\220\014\000\002"},
+ {274, "expr_stmt", 0, 6, states_18,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {275, "augassign", 0, 2, states_19,
+ "\000\000\000\000\000\000\376\037\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {276, "print_stmt", 0, 9, states_20,
+ "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {277, "del_stmt", 0, 3, states_21,
+ "\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {278, "pass_stmt", 0, 2, states_22,
+ "\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {279, "flow_stmt", 0, 2, states_23,
+ "\000\000\000\000\000\000\000\000\200\007\000\000\000\000\000\000\000\000\000\000\000\002"},
+ {280, "break_stmt", 0, 2, states_24,
+ "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {281, "continue_stmt", 0, 2, states_25,
+ "\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {282, "return_stmt", 0, 3, states_26,
+ "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {283, "yield_stmt", 0, 2, states_27,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002"},
+ {284, "raise_stmt", 0, 7, states_28,
+ "\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {285, "import_stmt", 0, 2, states_29,
+ "\000\000\000\000\000\000\000\000\000\240\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {286, "import_name", 0, 3, states_30,
+ "\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {287, "import_from", 0, 8, states_31,
+ "\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {288, "import_as_name", 0, 4, states_32,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {289, "dotted_as_name", 0, 4, states_33,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {290, "import_as_names", 0, 3, states_34,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {291, "dotted_as_names", 0, 2, states_35,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {292, "dotted_name", 0, 2, states_36,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {293, "global_stmt", 0, 3, states_37,
+ "\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"},
+ {294, "assert_stmt", 0, 5, states_38,
+ "\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"},
+ {295, "compound_stmt", 0, 2, states_39,
+ "\000\010\004\000\000\000\000\000\000\000\000\040\113\000\000\000\000\000\000\000\002\000"},
+ {296, "if_stmt", 0, 8, states_40,
+ "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"},
+ {297, "while_stmt", 0, 8, states_41,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"},
+ {298, "for_stmt", 0, 10, states_42,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"},
+ {299, "try_stmt", 0, 13, states_43,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"},
+ {300, "with_stmt", 0, 6, states_44,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000"},
+ {301, "with_var", 0, 3, states_45,
+ "\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000"},
+ {302, "except_clause", 0, 5, states_46,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"},
+ {303, "suite", 0, 5, states_47,
+ "\004\040\010\000\000\000\000\240\202\247\141\000\000\000\101\000\000\206\220\014\000\002"},
+ {304, "testlist_safe", 0, 5, states_48,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {305, "old_test", 0, 2, states_49,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {306, "old_lambdef", 0, 5, states_50,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"},
+ {307, "test", 0, 6, states_51,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {308, "or_test", 0, 2, states_52,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\100\000\000\206\220\014\000\000"},
+ {309, "and_test", 0, 2, states_53,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\100\000\000\206\220\014\000\000"},
+ {310, "not_test", 0, 3, states_54,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\100\000\000\206\220\014\000\000"},
+ {311, "comparison", 0, 2, states_55,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {312, "comp_op", 0, 4, states_56,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\004\000\100\376\000\000\000\000\000\000"},
+ {313, "expr", 0, 2, states_57,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {314, "xor_expr", 0, 2, states_58,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {315, "and_expr", 0, 2, states_59,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {316, "shift_expr", 0, 2, states_60,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {317, "arith_expr", 0, 2, states_61,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {318, "term", 0, 2, states_62,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {319, "factor", 0, 3, states_63,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {320, "power", 0, 4, states_64,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\220\014\000\000"},
+ {321, "atom", 0, 11, states_65,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\220\014\000\000"},
+ {322, "listmaker", 0, 5, states_66,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {323, "testlist_gexp", 0, 5, states_67,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {324, "lambdef", 0, 5, states_68,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"},
+ {325, "trailer", 0, 7, states_69,
+ "\000\040\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\020\000\000\000"},
+ {326, "subscriptlist", 0, 3, states_70,
+ "\000\040\210\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {327, "subscript", 0, 5, states_71,
+ "\000\040\210\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {328, "sliceop", 0, 3, states_72,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {329, "exprlist", 0, 3, states_73,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\000\000\000\206\220\014\000\000"},
+ {330, "testlist", 0, 3, states_74,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {331, "dictsetmaker", 0, 8, states_75,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {332, "classdef", 0, 8, states_76,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000"},
+ {333, "arglist", 0, 8, states_77,
+ "\000\040\010\240\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {334, "argument", 0, 4, states_78,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {335, "list_iter", 0, 2, states_79,
+ "\000\000\000\000\000\000\000\000\000\000\000\040\002\000\000\000\000\000\000\000\000\000"},
+ {336, "list_for", 0, 6, states_80,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"},
+ {337, "list_if", 0, 4, states_81,
+ "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"},
+ {338, "gen_iter", 0, 2, states_82,
+ "\000\000\000\000\000\000\000\000\000\000\000\040\002\000\000\000\000\000\000\000\000\000"},
+ {339, "gen_for", 0, 6, states_83,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"},
+ {340, "gen_if", 0, 4, states_84,
+ "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"},
+ {341, "testlist1", 0, 2, states_85,
+ "\000\040\010\000\000\000\000\000\000\000\001\000\000\000\101\000\000\206\220\014\000\000"},
+ {342, "encoding_decl", 0, 2, states_86,
+ "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {343, "yield_expr", 0, 3, states_87,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002"},
+};
+static label labels[170] = {
{0, "EMPTY"},
{256, 0},
{4, 0},
- {267, 0},
- {290, 0},
+ {272, 0},
+ {295, 0},
{257, 0},
- {266, 0},
+ {271, 0},
{0, 0},
{258, 0},
- {325, 0},
+ {330, 0},
{259, 0},
{50, 0},
- {287, 0},
+ {292, 0},
{7, 0},
- {328, 0},
+ {333, 0},
{8, 0},
{260, 0},
{261, 0},
{1, "def"},
{1, 0},
{262, 0},
+ {51, 0},
+ {307, 0},
{11, 0},
- {298, 0},
+ {303, 0},
{263, 0},
- {264, 0},
+ {265, 0},
{22, 0},
- {302, 0},
{12, 0},
{16, 0},
+ {264, 0},
{36, 0},
- {265, 0},
- {268, 0},
- {13, 0},
+ {266, 0},
+ {267, 0},
{269, 0},
- {271, 0},
- {272, 0},
+ {268, 0},
+ {270, 0},
{273, 0},
+ {13, 0},
{274, 0},
- {280, 0},
- {288, 0},
- {289, 0},
- {270, 0},
- {338, 0},
+ {276, 0},
+ {277, 0},
+ {278, 0},
+ {279, 0},
+ {285, 0},
+ {293, 0},
+ {294, 0},
+ {275, 0},
+ {343, 0},
{37, 0},
{38, 0},
{39, 0},
@@ -1991,35 +2144,35 @@ static label labels[164] = {
{1, "print"},
{35, 0},
{1, "del"},
- {324, 0},
+ {329, 0},
{1, "pass"},
- {275, 0},
- {276, 0},
- {277, 0},
- {279, 0},
- {278, 0},
+ {280, 0},
+ {281, 0},
+ {282, 0},
+ {284, 0},
+ {283, 0},
{1, "break"},
{1, "continue"},
{1, "return"},
{1, "raise"},
- {281, 0},
- {282, 0},
- {1, "import"},
{286, 0},
+ {287, 0},
+ {1, "import"},
+ {291, 0},
{1, "from"},
{23, 0},
- {285, 0},
- {283, 0},
+ {290, 0},
+ {288, 0},
{1, "as"},
- {284, 0},
+ {289, 0},
{1, "global"},
{1, "assert"},
- {291, 0},
- {292, 0},
- {293, 0},
- {294, 0},
- {295, 0},
- {327, 0},
+ {296, 0},
+ {297, 0},
+ {298, 0},
+ {299, 0},
+ {300, 0},
+ {332, 0},
{1, "if"},
{1, "elif"},
{1, "else"},
@@ -2027,27 +2180,27 @@ static label labels[164] = {
{1, "for"},
{1, "in"},
{1, "try"},
- {297, 0},
+ {302, 0},
{1, "finally"},
{1, "with"},
- {296, 0},
- {308, 0},
+ {301, 0},
+ {313, 0},
{1, "except"},
{5, 0},
{6, 0},
- {299, 0},
- {300, 0},
- {303, 0},
- {301, 0},
- {1, "lambda"},
- {319, 0},
{304, 0},
- {1, "or"},
{305, 0},
+ {308, 0},
+ {306, 0},
+ {1, "lambda"},
+ {324, 0},
+ {309, 0},
+ {1, "or"},
+ {310, 0},
{1, "and"},
{1, "not"},
- {306, 0},
- {307, 0},
+ {311, 0},
+ {312, 0},
{20, 0},
{21, 0},
{28, 0},
@@ -2055,52 +2208,52 @@ static label labels[164] = {
{30, 0},
{29, 0},
{1, "is"},
- {309, 0},
+ {314, 0},
{18, 0},
- {310, 0},
+ {315, 0},
{33, 0},
- {311, 0},
+ {316, 0},
{19, 0},
- {312, 0},
+ {317, 0},
{34, 0},
- {313, 0},
+ {318, 0},
{14, 0},
{15, 0},
- {314, 0},
+ {319, 0},
{17, 0},
{24, 0},
{48, 0},
{32, 0},
- {315, 0},
- {316, 0},
{320, 0},
- {318, 0},
+ {321, 0},
+ {325, 0},
+ {323, 0},
{9, 0},
- {317, 0},
+ {322, 0},
{10, 0},
{26, 0},
- {326, 0},
+ {331, 0},
{27, 0},
{2, 0},
{3, 0},
- {331, 0},
- {334, 0},
- {321, 0},
- {322, 0},
- {323, 0},
+ {336, 0},
+ {339, 0},
+ {326, 0},
+ {327, 0},
+ {328, 0},
{1, "class"},
- {329, 0},
- {330, 0},
- {332, 0},
- {333, 0},
+ {334, 0},
{335, 0},
- {336, 0},
{337, 0},
+ {338, 0},
+ {340, 0},
+ {341, 0},
+ {342, 0},
{1, "yield"},
};
grammar _PyParser_Grammar = {
- 83,
+ 88,
dfas,
- {164, labels},
+ {170, labels},
256
};
diff --git a/Python/symtable.c b/Python/symtable.c
index b0ebed408b..708e18cafd 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -172,9 +172,12 @@ static int symtable_visit_alias(struct symtable *st, alias_ty);
static int symtable_visit_comprehension(struct symtable *st, comprehension_ty);
static int symtable_visit_keyword(struct symtable *st, keyword_ty);
static int symtable_visit_slice(struct symtable *st, slice_ty);
-static int symtable_visit_params(struct symtable *st, asdl_seq *args, int top);
-static int symtable_visit_params_nested(struct symtable *st, asdl_seq *args);
+static int symtable_visit_params(struct symtable *st, asdl_seq *args, int top,
+ int annotations);
+static int symtable_visit_params_nested(struct symtable *st, asdl_seq *args,
+ int annotations);
static int symtable_implicit_arg(struct symtable *st, int pos);
+static int symtable_visit_annotations(struct symtable *st, stmt_ty s);
static identifier top = NULL, lambda = NULL, genexpr = NULL;
@@ -935,6 +938,8 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
if (s->v.FunctionDef.args->kw_defaults)
VISIT_KWONLYDEFAULTS(st,
s->v.FunctionDef.args->kw_defaults);
+ if (!symtable_visit_annotations(st, s))
+ return 0;
if (s->v.FunctionDef.decorators)
VISIT_SEQ(st, expr, s->v.FunctionDef.decorators);
if (!symtable_enter_block(st, s->v.FunctionDef.name,
@@ -1219,22 +1224,29 @@ symtable_implicit_arg(struct symtable *st, int pos)
}
static int
-symtable_visit_params(struct symtable *st, asdl_seq *args, int toplevel)
+symtable_visit_params(struct symtable *st, asdl_seq *args, int toplevel,
+ int annotations)
{
int i;
+
+ if (!args)
+ return -1;
/* go through all the toplevel arguments first */
for (i = 0; i < asdl_seq_LEN(args); i++) {
- expr_ty arg = (expr_ty)asdl_seq_GET(args, i);
- if (arg->kind == Name_kind) {
- assert(arg->v.Name.ctx == Param ||
- (arg->v.Name.ctx == Store && !toplevel));
- if (!symtable_add_def(st, arg->v.Name.id, DEF_PARAM))
- return 0;
+ arg_ty arg = (arg_ty)asdl_seq_GET(args, i);
+ if (arg->kind == SimpleArg_kind) {
+ if (!annotations) {
+ if (!symtable_add_def(st,
+ arg->v.SimpleArg.arg,
+ DEF_PARAM))
+ return 0;
+ }
+ else if (arg->v.SimpleArg.annotation)
+ VISIT(st, expr, arg->v.SimpleArg.annotation);
}
- else if (arg->kind == Tuple_kind) {
- assert(arg->v.Tuple.ctx == Store);
- if (toplevel) {
+ else if (arg->kind == NestedArgs_kind) {
+ if (toplevel && !annotations) {
if (!symtable_implicit_arg(st, i))
return 0;
}
@@ -1249,7 +1261,7 @@ symtable_visit_params(struct symtable *st, asdl_seq *args, int toplevel)
}
if (!toplevel) {
- if (!symtable_visit_params_nested(st, args))
+ if (!symtable_visit_params_nested(st, args, annotations))
return 0;
}
@@ -1257,16 +1269,37 @@ symtable_visit_params(struct symtable *st, asdl_seq *args, int toplevel)
}
static int
-symtable_visit_params_nested(struct symtable *st, asdl_seq *args)
+symtable_visit_params_nested(struct symtable *st, asdl_seq *args,
+ int annotations)
{
int i;
for (i = 0; i < asdl_seq_LEN(args); i++) {
- expr_ty arg = (expr_ty)asdl_seq_GET(args, i);
- if (arg->kind == Tuple_kind &&
- !symtable_visit_params(st, arg->v.Tuple.elts, 0))
+ arg_ty arg = (arg_ty)asdl_seq_GET(args, i);
+ if (arg->kind == NestedArgs_kind &&
+ !symtable_visit_params(st, arg->v.NestedArgs.args, 0,
+ annotations))
return 0;
}
+
+ return 1;
+}
+
+
+static int
+symtable_visit_annotations(struct symtable *st, stmt_ty s)
+{
+ arguments_ty a = s->v.FunctionDef.args;
+ if (a->args && !symtable_visit_params(st, a->args, 1, 1))
+ return 0;
+ if (a->varargannotation)
+ VISIT(st, expr, a->varargannotation);
+ if (a->kwargannotation)
+ VISIT(st, expr, a->kwargannotation);
+ if (a->kwonlyargs && !symtable_visit_params(st, a->kwonlyargs, 1, 1))
+ return 0;
+ if (s->v.FunctionDef.returns)
+ VISIT(st, expr, s->v.FunctionDef.returns);
return 1;
}
@@ -1276,9 +1309,9 @@ symtable_visit_arguments(struct symtable *st, arguments_ty a)
/* skip default arguments inside function block
XXX should ast be different?
*/
- if (a->args && !symtable_visit_params(st, a->args, 1))
+ if (a->args && !symtable_visit_params(st, a->args, 1, 0))
return 0;
- if (a->kwonlyargs && !symtable_visit_params(st, a->kwonlyargs, 1))
+ if (a->kwonlyargs && !symtable_visit_params(st, a->kwonlyargs, 1, 0))
return 0;
if (a->vararg) {
if (!symtable_add_def(st, a->vararg, DEF_PARAM))
@@ -1290,7 +1323,7 @@ symtable_visit_arguments(struct symtable *st, arguments_ty a)
return 0;
st->st_cur->ste_varkeywords = 1;
}
- if (a->args && !symtable_visit_params_nested(st, a->args))
+ if (a->args && !symtable_visit_params_nested(st, a->args, 0))
return 0;
return 1;
}