diff options
-rw-r--r-- | Grammar/Grammar | 12 | ||||
-rw-r--r-- | Include/compile.h | 4 | ||||
-rw-r--r-- | Include/graminit.h | 86 | ||||
-rw-r--r-- | Objects/funcobject.c | 9 | ||||
-rw-r--r-- | Python/bltinmodule.c | 47 | ||||
-rw-r--r-- | Python/compile.c | 88 | ||||
-rw-r--r-- | Python/graminit.c | 1252 | ||||
-rw-r--r-- | Python/import.c | 8 |
8 files changed, 740 insertions, 766 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 1094b09..6be7418 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -2,6 +2,9 @@ # Change log: +# 30-Nov-93: +# Removed lambda_input, added lambdef + # 25-Oct-93: # Added lambda_input @@ -77,14 +80,12 @@ # Start symbols for the grammar: # single_input is a single interactive statement; # file_input is a module or sequence of commands read from an input file; -# eval_input is the input for the eval() and input() functions; -# lambda_input is the input for the proposed lambda() function. +# eval_input is the input for the eval() and input() functions. # NB: compound_stmt in single_input is followed by extra NEWLINE! single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE file_input: (NEWLINE | stmt)* ENDMARKER eval_input: testlist NEWLINE* ENDMARKER -lambda_input: varargslist ':' testlist NEWLINE* ENDMARKER funcdef: 'def' NAME parameters ':' suite parameters: '(' [varargslist] ')' @@ -134,7 +135,10 @@ shift_expr: arith_expr (('<<'|'>>') arith_expr)* arith_expr: term (('+'|'-') term)* term: factor (('*'|'/'|'%') factor)* factor: ('+'|'-'|'~') factor | atom trailer* -atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING +atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | lambdef | NAME | NUMBER | STRING +# Note ambiguity in grammar: "lambda x: x[1]" could mean "(lambda x: x)[1]" +# but the parser is eager so interprets it as "lambda x: (x[1])"... +lambdef: 'lambda' [varargslist] ':' test trailer: '(' [testlist] ')' | '[' subscript ']' | '.' NAME subscript: test | [test] ':' [test] exprlist: expr (',' expr)* [','] diff --git a/Include/compile.h b/Include/compile.h index 2b0b29e..a23fea1 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -54,12 +54,10 @@ extern typeobject Codetype; /* Public interface */ struct _node; /* Declare the existence of this type */ -codeobject *_compile PROTO((struct _node *, char *, int)); +codeobject *compile PROTO((struct _node *, char *)); codeobject *newcodeobject PROTO((object *, object *, object *, object *, object *)); -#define compile(n,f) (_compile((n),(f),0)) - #ifdef __cplusplus } #endif diff --git a/Include/graminit.h b/Include/graminit.h index 735838c..da87073 100644 --- a/Include/graminit.h +++ b/Include/graminit.h @@ -1,49 +1,49 @@ #define single_input 256 #define file_input 257 #define eval_input 258 -#define lambda_input 259 -#define funcdef 260 -#define parameters 261 -#define varargslist 262 -#define fpdef 263 -#define fplist 264 -#define stmt 265 -#define simple_stmt 266 -#define small_stmt 267 -#define expr_stmt 268 -#define print_stmt 269 -#define del_stmt 270 -#define pass_stmt 271 -#define flow_stmt 272 -#define break_stmt 273 -#define continue_stmt 274 -#define return_stmt 275 -#define raise_stmt 276 -#define import_stmt 277 -#define global_stmt 278 -#define access_stmt 279 -#define accesstype 280 -#define exec_stmt 281 -#define compound_stmt 282 -#define if_stmt 283 -#define while_stmt 284 -#define for_stmt 285 -#define try_stmt 286 -#define except_clause 287 -#define suite 288 -#define test 289 -#define and_test 290 -#define not_test 291 -#define comparison 292 -#define comp_op 293 -#define expr 294 -#define xor_expr 295 -#define and_expr 296 -#define shift_expr 297 -#define arith_expr 298 -#define term 299 -#define factor 300 -#define atom 301 +#define funcdef 259 +#define parameters 260 +#define varargslist 261 +#define fpdef 262 +#define fplist 263 +#define stmt 264 +#define simple_stmt 265 +#define small_stmt 266 +#define expr_stmt 267 +#define print_stmt 268 +#define del_stmt 269 +#define pass_stmt 270 +#define flow_stmt 271 +#define break_stmt 272 +#define continue_stmt 273 +#define return_stmt 274 +#define raise_stmt 275 +#define import_stmt 276 +#define global_stmt 277 +#define access_stmt 278 +#define accesstype 279 +#define exec_stmt 280 +#define compound_stmt 281 +#define if_stmt 282 +#define while_stmt 283 +#define for_stmt 284 +#define try_stmt 285 +#define except_clause 286 +#define suite 287 +#define test 288 +#define and_test 289 +#define not_test 290 +#define comparison 291 +#define comp_op 292 +#define expr 293 +#define xor_expr 294 +#define and_expr 295 +#define shift_expr 296 +#define arith_expr 297 +#define term 298 +#define factor 299 +#define atom 300 +#define lambdef 301 #define trailer 302 #define subscript 303 #define exprlist 304 diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 4dc0b90..cc4900a 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -100,9 +100,12 @@ func_repr(op) funcobject *op; { char buf[140]; - sprintf(buf, "<function %.100s at %lx>", - getstringvalue(op->func_name), - (long)op); + if (op->func_name == None) + sprintf(buf, "<anonymous function at %lx>", (long)op); + else + sprintf(buf, "<function %.100s at %lx>", + getstringvalue(op->func_name), + (long)op); return newstringobject(buf); } diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 97ed2f4..b63f56d 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -79,23 +79,13 @@ builtin_filter(self, args) if (!getargs(args, "(OO)", &func, &seq)) return NULL; - if (is_stringobject(func)) { - if ((func = exec_eval(func, lambda_input)) == NULL) - return NULL; - } - else { - INCREF(func); - } - if (is_stringobject(seq)) { object *r = filterstring(func, seq); - DECREF(func); return r; } if (is_tupleobject(seq)) { object *r = filtertuple(func, seq); - DECREF(func); return r; } @@ -150,13 +140,11 @@ builtin_filter(self, args) if (setlistslice(result, j, len, NULL) < 0) goto Fail_1; - DECREF(func); return result; Fail_1: DECREF(result); Fail_2: - DECREF(func); return NULL; } @@ -306,10 +294,10 @@ exec_eval(v, start) globals != NULL && !is_dictobject(globals) || locals != NULL && !is_dictobject(locals)) { err_setstr(TypeError, - "eval/lambda arguments must be (string|code)[,dict[,dict]]"); + "eval arguments must be (string|code)[,dict[,dict]]"); return NULL; } - /* XXX The following is only correct for eval(), not for lambda() */ + if (is_codeobject(str)) return eval_code((codeobject *) str, globals, locals, (object *)NULL, (object *)NULL); @@ -318,7 +306,7 @@ exec_eval(v, start) err_setstr(ValueError, "embedded '\\0' in string arg"); return NULL; } - if (start == eval_input || start == lambda_input) { + if (start == eval_input) { while (*s == ' ' || *s == '\t') s++; } @@ -460,14 +448,6 @@ builtin_map(self, args) func = gettupleitem(args, 0); n = gettuplesize(args) - 1; - if (is_stringobject(func)) { - if ((func = exec_eval(func, lambda_input)) == NULL) - return NULL; - } - else { - INCREF(func); - } - if ((seqs = NEW(sequence, n)) == NULL) { err_nomem(); goto Fail_2; @@ -549,13 +529,11 @@ builtin_map(self, args) } if (seqs) DEL(seqs); - DECREF(func); return result; Fail_1: DECREF(result); Fail_2: - DECREF(func); if (seqs) DEL(seqs); return NULL; } @@ -639,14 +617,6 @@ builtin_int(self, v) } static object * -builtin_lambda(self, v) - object *self; - object *v; -{ - return exec_eval(v, lambda_input); -} - -static object * builtin_len(self, v) object *self; object *v; @@ -977,14 +947,6 @@ builtin_reduce(self, args) return NULL; } - if (is_stringobject(func)) { - if ((func = exec_eval(func, lambda_input)) == NULL) - return NULL; - } - else { - INCREF(func); - } - if ((len = (*sqf->sq_length)(seq)) < 0) goto Fail_2; @@ -1025,7 +987,6 @@ builtin_reduce(self, args) } DECREF(args); - DECREF(func); return result; @@ -1035,7 +996,6 @@ Fail_0: Fail_1: DECREF(result); Fail_2: - DECREF(func); return NULL; } @@ -1133,7 +1093,6 @@ static struct methodlist builtin_methods[] = { {"id", builtin_id}, {"input", builtin_input}, {"int", builtin_int}, - {"lambda", builtin_lambda}, {"len", builtin_len}, {"long", builtin_long}, {"map", builtin_map}, diff --git a/Python/compile.c b/Python/compile.c index 9ce3a33..77752a4 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -153,7 +153,7 @@ newcodeobject(code, consts, names, filename, name) if (code == NULL || !is_stringobject(code) || consts == NULL || !is_listobject(consts) || names == NULL || !is_listobject(names) || - name == NULL || !is_stringobject(name)) { + name == NULL || !(is_stringobject(name) || name == None)) { err_badcall(); return NULL; } @@ -194,7 +194,6 @@ struct compiling { int c_nexti; /* index into c_code */ int c_errors; /* counts errors occurred */ int c_infunction; /* set when compiling a function */ - int c_inlambda; /* set when compiling an expression */ int c_loops; /* counts nested loops */ int c_begin; /* begin of current loop, for 'continue' */ int c_block[MAXBLOCKS]; /* stack of block types */ @@ -236,7 +235,7 @@ block_pop(c, type) /* Prototypes */ -static int com_init PROTO((struct compiling *, char *, int)); +static int com_init PROTO((struct compiling *, char *)); static void com_free PROTO((struct compiling *)); static void com_done PROTO((struct compiling *)); static void com_node PROTO((struct compiling *, struct _node *)); @@ -252,10 +251,9 @@ static void com_addopname PROTO((struct compiling *, int, node *)); static void com_list PROTO((struct compiling *, node *, int)); static int -com_init(c, filename, inlambda) +com_init(c, filename) struct compiling *c; char *filename; - int inlambda; { if ((c->c_code = newsizedstringobject((char *)NULL, 1000)) == NULL) goto fail_3; @@ -268,7 +266,6 @@ com_init(c, filename, inlambda) c->c_nexti = 0; c->c_errors = 0; c->c_infunction = 0; - c->c_inlambda = inlambda; c->c_loops = 0; c->c_begin = 0; c->c_nblocks = 0; @@ -662,6 +659,18 @@ com_atom(c, n) } com_addoparg(c, LOAD_CONST, i); break; + case lambdef: + if ((v = (object *) compile(ch, c->c_filename)) == NULL) { + c->c_errors++; + i = 255; + } + else { + i = com_addconst(c, v); + DECREF(v); + } + com_addoparg(c, LOAD_CONST, i); + com_addbyte(c, BUILD_FUNCTION); + break; case NAME: com_addopname(c, LOAD_NAME, ch); break; @@ -1825,7 +1834,7 @@ com_funcdef(c, n) { object *v; REQ(n, funcdef); /* funcdef: 'def' NAME parameters ':' suite */ - v = (object *)_compile(n, c->c_filename, 0); + v = (object *)compile(n, c->c_filename); if (v == NULL) c->c_errors++; else { @@ -1838,25 +1847,6 @@ com_funcdef(c, n) } static void -com_lambda(c, n) - struct compiling *c; - node *n; -{ - object *v; - REQ(n, lambda_input); - v = (object *)_compile(n, c->c_filename, 1); - if (v == NULL) - c->c_errors++; - else { - int i = com_addconst(c, v); - DECREF(v); - com_addoparg(c, LOAD_CONST, i); - com_addbyte(c, BUILD_FUNCTION); - com_addbyte(c, RETURN_VALUE); - } -} - -static void com_bases(c, n) struct compiling *c; node *n; @@ -1891,7 +1881,7 @@ com_classdef(c, n) com_addoparg(c, BUILD_TUPLE, 0); else com_bases(c, CHILD(n, 3)); - v = (object *)_compile(n, c->c_filename, 0); + v = (object *)compile(n, c->c_filename); if (v == NULL) c->c_errors++; else { @@ -2149,13 +2139,25 @@ compile_funcdef(c, n) } static void -compile_lambda(c, n) +compile_lambdef(c, n) struct compiling *c; node *n; { - REQ(n, lambda_input) - com_arglist(c, CHILD(n, 0)); - com_node(c, CHILD(n, 2)); + node *ch; + REQ(n, lambdef); /* lambdef: 'lambda' [parameters] ':' test */ + c->c_name = NULL; + + ch = CHILD(n, 1); + if (TYPE(ch) == COLON) { + com_addoparg(c, UNPACK_ARG, 0); + com_node(c, CHILD(n, 2)); + } + else { + com_addoparg(c, RESERVE_FAST, com_addconst(c, None)); + com_arglist(c, ch); + com_node(c, CHILD(n, 3)); + } + com_addbyte(c, RETURN_VALUE); } @@ -2183,15 +2185,15 @@ compile_node(c, n) com_addbyte(c, RETURN_VALUE); break; - case lambda_input: /* Built-in function lambda() */ - (c->c_inlambda ? compile_lambda : com_lambda)(c, n); - break; - - case eval_input: /* Built-in functions eval() and input() */ + case eval_input: /* Built-in function input() */ com_node(c, CHILD(n, 0)); com_addbyte(c, RETURN_VALUE); break; + case lambdef: /* anonymous function definition */ + compile_lambdef(c, n); + break; + case funcdef: /* A function definition */ compile_funcdef(c, n); break; @@ -2347,24 +2349,28 @@ optimize(c) } codeobject * -_compile(n, filename, inlambda) +compile(n, filename) node *n; char *filename; - int inlambda; { struct compiling sc; codeobject *co; - if (!com_init(&sc, filename, inlambda)) + if (!com_init(&sc, filename)) return NULL; compile_node(&sc, n); com_done(&sc); - if (TYPE(n) == funcdef && sc.c_errors == 0) + if ((TYPE(n) == funcdef || TYPE(n) == lambdef) && sc.c_errors == 0) optimize(&sc); co = NULL; if (sc.c_errors == 0) { object *v, *w; v = newstringobject(sc.c_filename); - w = newstringobject(sc.c_name); + if (sc.c_name) + w = newstringobject(sc.c_name); + else { + INCREF(None); + w = None; + } if (v != NULL && w != NULL) co = newcodeobject(sc.c_code, sc.c_consts, sc.c_names, v, w); diff --git a/Python/graminit.c b/Python/graminit.c index dc6ddc6..1126b9c 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -50,160 +50,138 @@ static arc arcs_3_1[1] = { {12, 2}, }; static arc arcs_3_2[1] = { - {9, 3}, + {13, 3}, }; -static arc arcs_3_3[2] = { - {2, 3}, - {7, 4}, +static arc arcs_3_3[1] = { + {14, 4}, }; static arc arcs_3_4[1] = { - {0, 4}, + {15, 5}, }; -static state states_3[5] = { +static arc arcs_3_5[1] = { + {0, 5}, +}; +static state states_3[6] = { {1, arcs_3_0}, {1, arcs_3_1}, {1, arcs_3_2}, - {2, arcs_3_3}, + {1, arcs_3_3}, {1, arcs_3_4}, + {1, arcs_3_5}, }; static arc arcs_4_0[1] = { - {14, 1}, + {16, 1}, }; -static arc arcs_4_1[1] = { - {15, 2}, +static arc arcs_4_1[2] = { + {17, 2}, + {18, 3}, }; static arc arcs_4_2[1] = { - {16, 3}, + {18, 3}, }; static arc arcs_4_3[1] = { - {12, 4}, -}; -static arc arcs_4_4[1] = { - {17, 5}, -}; -static arc arcs_4_5[1] = { - {0, 5}, + {0, 3}, }; -static state states_4[6] = { +static state states_4[4] = { {1, arcs_4_0}, - {1, arcs_4_1}, + {2, arcs_4_1}, {1, arcs_4_2}, {1, arcs_4_3}, - {1, arcs_4_4}, - {1, arcs_4_5}, }; -static arc arcs_5_0[1] = { - {18, 1}, +static arc arcs_5_0[2] = { + {19, 1}, + {21, 2}, }; static arc arcs_5_1[2] = { - {11, 2}, - {19, 3}, + {20, 3}, + {0, 1}, }; static arc arcs_5_2[1] = { - {19, 3}, + {12, 4}, }; -static arc arcs_5_3[1] = { +static arc arcs_5_3[3] = { + {19, 1}, + {21, 2}, {0, 3}, }; -static state states_5[4] = { - {1, arcs_5_0}, +static arc arcs_5_4[1] = { + {0, 4}, +}; +static state states_5[5] = { + {2, arcs_5_0}, {2, arcs_5_1}, {1, arcs_5_2}, - {1, arcs_5_3}, + {3, arcs_5_3}, + {1, arcs_5_4}, }; static arc arcs_6_0[2] = { - {20, 1}, - {22, 2}, + {12, 1}, + {16, 2}, }; -static arc arcs_6_1[2] = { - {21, 3}, +static arc arcs_6_1[1] = { {0, 1}, }; static arc arcs_6_2[1] = { - {15, 4}, -}; -static arc arcs_6_3[3] = { - {20, 1}, - {22, 2}, - {0, 3}, + {22, 3}, }; -static arc arcs_6_4[1] = { - {0, 4}, +static arc arcs_6_3[1] = { + {18, 1}, }; -static state states_6[5] = { +static state states_6[4] = { {2, arcs_6_0}, - {2, arcs_6_1}, + {1, arcs_6_1}, {1, arcs_6_2}, - {3, arcs_6_3}, - {1, arcs_6_4}, -}; -static arc arcs_7_0[2] = { - {15, 1}, - {18, 2}, -}; -static arc arcs_7_1[1] = { - {0, 1}, + {1, arcs_6_3}, }; -static arc arcs_7_2[1] = { - {23, 3}, -}; -static arc arcs_7_3[1] = { +static arc arcs_7_0[1] = { {19, 1}, }; -static state states_7[4] = { - {2, arcs_7_0}, - {1, arcs_7_1}, - {1, arcs_7_2}, - {1, arcs_7_3}, -}; -static arc arcs_8_0[1] = { - {20, 1}, -}; -static arc arcs_8_1[2] = { - {21, 2}, +static arc arcs_7_1[2] = { + {20, 2}, {0, 1}, }; -static arc arcs_8_2[2] = { - {20, 1}, +static arc arcs_7_2[2] = { + {19, 1}, {0, 2}, }; -static state states_8[3] = { - {1, arcs_8_0}, - {2, arcs_8_1}, - {2, arcs_8_2}, +static state states_7[3] = { + {1, arcs_7_0}, + {2, arcs_7_1}, + {2, arcs_7_2}, }; -static arc arcs_9_0[2] = { +static arc arcs_8_0[2] = { {3, 1}, {4, 1}, }; -static arc arcs_9_1[1] = { +static arc arcs_8_1[1] = { {0, 1}, }; -static state states_9[2] = { - {2, arcs_9_0}, - {1, arcs_9_1}, +static state states_8[2] = { + {2, arcs_8_0}, + {1, arcs_8_1}, }; -static arc arcs_10_0[1] = { - {24, 1}, +static arc arcs_9_0[1] = { + {23, 1}, }; -static arc arcs_10_1[2] = { - {25, 2}, +static arc arcs_9_1[2] = { + {24, 2}, {2, 3}, }; -static arc arcs_10_2[2] = { - {24, 1}, +static arc arcs_9_2[2] = { + {23, 1}, {2, 3}, }; -static arc arcs_10_3[1] = { +static arc arcs_9_3[1] = { {0, 3}, }; -static state states_10[4] = { - {1, arcs_10_0}, - {2, arcs_10_1}, - {2, arcs_10_2}, - {1, arcs_10_3}, +static state states_9[4] = { + {1, arcs_9_0}, + {2, arcs_9_1}, + {2, arcs_9_2}, + {1, arcs_9_3}, }; -static arc arcs_11_0[9] = { +static arc arcs_10_0[9] = { + {25, 1}, {26, 1}, {27, 1}, {28, 1}, @@ -212,77 +190,86 @@ static arc arcs_11_0[9] = { {31, 1}, {32, 1}, {33, 1}, - {34, 1}, }; -static arc arcs_11_1[1] = { +static arc arcs_10_1[1] = { + {0, 1}, +}; +static state states_10[2] = { + {9, arcs_10_0}, + {1, arcs_10_1}, +}; +static arc arcs_11_0[1] = { + {9, 1}, +}; +static arc arcs_11_1[2] = { + {34, 0}, {0, 1}, }; static state states_11[2] = { - {9, arcs_11_0}, - {1, arcs_11_1}, + {1, arcs_11_0}, + {2, arcs_11_1}, }; static arc arcs_12_0[1] = { - {9, 1}, + {35, 1}, }; static arc arcs_12_1[2] = { - {35, 0}, + {36, 2}, {0, 1}, }; -static state states_12[2] = { +static arc arcs_12_2[2] = { + {20, 1}, + {0, 2}, +}; +static state states_12[3] = { {1, arcs_12_0}, {2, arcs_12_1}, + {2, arcs_12_2}, }; static arc arcs_13_0[1] = { - {36, 1}, + {37, 1}, }; -static arc arcs_13_1[2] = { - {37, 2}, - {0, 1}, +static arc arcs_13_1[1] = { + {38, 2}, }; -static arc arcs_13_2[2] = { - {21, 1}, +static arc arcs_13_2[1] = { {0, 2}, }; static state states_13[3] = { {1, arcs_13_0}, - {2, arcs_13_1}, - {2, arcs_13_2}, + {1, arcs_13_1}, + {1, arcs_13_2}, }; static arc arcs_14_0[1] = { - {38, 1}, + {39, 1}, }; static arc arcs_14_1[1] = { - {39, 2}, -}; -static arc arcs_14_2[1] = { - {0, 2}, + {0, 1}, }; -static state states_14[3] = { +static state states_14[2] = { {1, arcs_14_0}, {1, arcs_14_1}, - {1, arcs_14_2}, }; -static arc arcs_15_0[1] = { +static arc arcs_15_0[4] = { {40, 1}, + {41, 1}, + {42, 1}, + {43, 1}, }; static arc arcs_15_1[1] = { {0, 1}, }; static state states_15[2] = { - {1, arcs_15_0}, + {4, arcs_15_0}, {1, arcs_15_1}, }; -static arc arcs_16_0[4] = { - {41, 1}, - {42, 1}, - {43, 1}, +static arc arcs_16_0[1] = { {44, 1}, }; static arc arcs_16_1[1] = { {0, 1}, }; static state states_16[2] = { - {4, arcs_16_0}, + {1, arcs_16_0}, {1, arcs_16_1}, }; static arc arcs_17_0[1] = { @@ -298,221 +285,246 @@ static state states_17[2] = { static arc arcs_18_0[1] = { {46, 1}, }; -static arc arcs_18_1[1] = { +static arc arcs_18_1[2] = { + {9, 2}, {0, 1}, }; -static state states_18[2] = { +static arc arcs_18_2[1] = { + {0, 2}, +}; +static state states_18[3] = { {1, arcs_18_0}, - {1, arcs_18_1}, + {2, arcs_18_1}, + {1, arcs_18_2}, }; static arc arcs_19_0[1] = { {47, 1}, }; -static arc arcs_19_1[2] = { - {9, 2}, - {0, 1}, +static arc arcs_19_1[1] = { + {36, 2}, }; -static arc arcs_19_2[1] = { +static arc arcs_19_2[2] = { + {20, 3}, {0, 2}, }; -static state states_19[3] = { +static arc arcs_19_3[1] = { + {36, 4}, +}; +static arc arcs_19_4[1] = { + {0, 4}, +}; +static state states_19[5] = { {1, arcs_19_0}, - {2, arcs_19_1}, - {1, arcs_19_2}, + {1, arcs_19_1}, + {2, arcs_19_2}, + {1, arcs_19_3}, + {1, arcs_19_4}, }; -static arc arcs_20_0[1] = { +static arc arcs_20_0[2] = { {48, 1}, + {49, 2}, }; static arc arcs_20_1[1] = { - {37, 2}, + {12, 3}, }; -static arc arcs_20_2[2] = { - {21, 3}, - {0, 2}, +static arc arcs_20_2[1] = { + {12, 4}, }; -static arc arcs_20_3[1] = { - {37, 4}, +static arc arcs_20_3[2] = { + {20, 1}, + {0, 3}, }; static arc arcs_20_4[1] = { - {0, 4}, -}; -static state states_20[5] = { - {1, arcs_20_0}, - {1, arcs_20_1}, - {2, arcs_20_2}, - {1, arcs_20_3}, - {1, arcs_20_4}, + {48, 5}, }; -static arc arcs_21_0[2] = { - {49, 1}, - {50, 2}, -}; -static arc arcs_21_1[1] = { - {15, 3}, +static arc arcs_20_5[2] = { + {21, 6}, + {12, 7}, }; -static arc arcs_21_2[1] = { - {15, 4}, +static arc arcs_20_6[1] = { + {0, 6}, }; -static arc arcs_21_3[2] = { - {21, 1}, - {0, 3}, +static arc arcs_20_7[2] = { + {20, 8}, + {0, 7}, }; -static arc arcs_21_4[1] = { - {49, 5}, +static arc arcs_20_8[1] = { + {12, 7}, }; -static arc arcs_21_5[2] = { - {22, 6}, - {15, 7}, +static state states_20[9] = { + {2, arcs_20_0}, + {1, arcs_20_1}, + {1, arcs_20_2}, + {2, arcs_20_3}, + {1, arcs_20_4}, + {2, arcs_20_5}, + {1, arcs_20_6}, + {2, arcs_20_7}, + {1, arcs_20_8}, }; -static arc arcs_21_6[1] = { - {0, 6}, +static arc arcs_21_0[1] = { + {50, 1}, }; -static arc arcs_21_7[2] = { - {21, 8}, - {0, 7}, +static arc arcs_21_1[1] = { + {12, 2}, }; -static arc arcs_21_8[1] = { - {15, 7}, +static arc arcs_21_2[2] = { + {20, 1}, + {0, 2}, }; -static state states_21[9] = { - {2, arcs_21_0}, +static state states_21[3] = { + {1, arcs_21_0}, {1, arcs_21_1}, - {1, arcs_21_2}, - {2, arcs_21_3}, - {1, arcs_21_4}, - {2, arcs_21_5}, - {1, arcs_21_6}, - {2, arcs_21_7}, - {1, arcs_21_8}, + {2, arcs_21_2}, }; static arc arcs_22_0[1] = { {51, 1}, }; -static arc arcs_22_1[1] = { - {15, 2}, -}; -static arc arcs_22_2[2] = { - {21, 1}, - {0, 2}, +static arc arcs_22_1[2] = { + {21, 2}, + {12, 3}, }; -static state states_22[3] = { - {1, arcs_22_0}, - {1, arcs_22_1}, - {2, arcs_22_2}, +static arc arcs_22_2[1] = { + {14, 4}, }; -static arc arcs_23_0[1] = { - {52, 1}, +static arc arcs_22_3[2] = { + {20, 5}, + {14, 4}, }; -static arc arcs_23_1[2] = { - {22, 2}, - {15, 3}, +static arc arcs_22_4[1] = { + {52, 6}, }; -static arc arcs_23_2[1] = { - {12, 4}, +static arc arcs_22_5[1] = { + {12, 3}, }; -static arc arcs_23_3[2] = { - {21, 5}, - {12, 4}, +static arc arcs_22_6[2] = { + {20, 4}, + {0, 6}, }; -static arc arcs_23_4[1] = { - {53, 6}, +static state states_22[7] = { + {1, arcs_22_0}, + {2, arcs_22_1}, + {1, arcs_22_2}, + {2, arcs_22_3}, + {1, arcs_22_4}, + {1, arcs_22_5}, + {2, arcs_22_6}, }; -static arc arcs_23_5[1] = { - {15, 3}, +static arc arcs_23_0[1] = { + {12, 1}, }; -static arc arcs_23_6[2] = { - {21, 4}, - {0, 6}, +static arc arcs_23_1[2] = { + {12, 1}, + {0, 1}, }; -static state states_23[7] = { +static state states_23[2] = { {1, arcs_23_0}, {2, arcs_23_1}, - {1, arcs_23_2}, - {2, arcs_23_3}, - {1, arcs_23_4}, - {1, arcs_23_5}, - {2, arcs_23_6}, }; static arc arcs_24_0[1] = { - {15, 1}, + {53, 1}, }; -static arc arcs_24_1[2] = { - {15, 1}, - {0, 1}, -}; -static state states_24[2] = { - {1, arcs_24_0}, - {2, arcs_24_1}, -}; -static arc arcs_25_0[1] = { - {54, 1}, +static arc arcs_24_1[1] = { + {54, 2}, }; -static arc arcs_25_1[1] = { - {55, 2}, -}; -static arc arcs_25_2[2] = { - {56, 3}, +static arc arcs_24_2[2] = { + {55, 3}, {0, 2}, }; -static arc arcs_25_3[1] = { - {37, 4}, +static arc arcs_24_3[1] = { + {36, 4}, }; -static arc arcs_25_4[2] = { - {21, 5}, +static arc arcs_24_4[2] = { + {20, 5}, {0, 4}, }; -static arc arcs_25_5[1] = { - {37, 6}, +static arc arcs_24_5[1] = { + {36, 6}, }; -static arc arcs_25_6[1] = { +static arc arcs_24_6[1] = { {0, 6}, }; -static state states_25[7] = { - {1, arcs_25_0}, - {1, arcs_25_1}, - {2, arcs_25_2}, - {1, arcs_25_3}, - {2, arcs_25_4}, - {1, arcs_25_5}, - {1, arcs_25_6}, -}; -static arc arcs_26_0[6] = { +static state states_24[7] = { + {1, arcs_24_0}, + {1, arcs_24_1}, + {2, arcs_24_2}, + {1, arcs_24_3}, + {2, arcs_24_4}, + {1, arcs_24_5}, + {1, arcs_24_6}, +}; +static arc arcs_25_0[6] = { + {56, 1}, {57, 1}, {58, 1}, {59, 1}, + {10, 1}, {60, 1}, - {13, 1}, +}; +static arc arcs_25_1[1] = { + {0, 1}, +}; +static state states_25[2] = { + {6, arcs_25_0}, + {1, arcs_25_1}, +}; +static arc arcs_26_0[1] = { {61, 1}, }; static arc arcs_26_1[1] = { - {0, 1}, + {36, 2}, +}; +static arc arcs_26_2[1] = { + {14, 3}, +}; +static arc arcs_26_3[1] = { + {15, 4}, }; -static state states_26[2] = { - {6, arcs_26_0}, +static arc arcs_26_4[3] = { + {62, 1}, + {63, 5}, + {0, 4}, +}; +static arc arcs_26_5[1] = { + {14, 6}, +}; +static arc arcs_26_6[1] = { + {15, 7}, +}; +static arc arcs_26_7[1] = { + {0, 7}, +}; +static state states_26[8] = { + {1, arcs_26_0}, {1, arcs_26_1}, + {1, arcs_26_2}, + {1, arcs_26_3}, + {3, arcs_26_4}, + {1, arcs_26_5}, + {1, arcs_26_6}, + {1, arcs_26_7}, }; static arc arcs_27_0[1] = { - {62, 1}, + {64, 1}, }; static arc arcs_27_1[1] = { - {37, 2}, + {36, 2}, }; static arc arcs_27_2[1] = { - {12, 3}, + {14, 3}, }; static arc arcs_27_3[1] = { - {17, 4}, + {15, 4}, }; -static arc arcs_27_4[3] = { - {63, 1}, - {64, 5}, +static arc arcs_27_4[2] = { + {63, 5}, {0, 4}, }; static arc arcs_27_5[1] = { - {12, 6}, + {14, 6}, }; static arc arcs_27_6[1] = { - {17, 7}, + {15, 7}, }; static arc arcs_27_7[1] = { {0, 7}, @@ -522,7 +534,7 @@ static state states_27[8] = { {1, arcs_27_1}, {1, arcs_27_2}, {1, arcs_27_3}, - {3, arcs_27_4}, + {2, arcs_27_4}, {1, arcs_27_5}, {1, arcs_27_6}, {1, arcs_27_7}, @@ -531,64 +543,73 @@ static arc arcs_28_0[1] = { {65, 1}, }; static arc arcs_28_1[1] = { - {37, 2}, + {38, 2}, }; static arc arcs_28_2[1] = { - {12, 3}, + {55, 3}, }; static arc arcs_28_3[1] = { - {17, 4}, + {9, 4}, }; -static arc arcs_28_4[2] = { - {64, 5}, - {0, 4}, +static arc arcs_28_4[1] = { + {14, 5}, }; static arc arcs_28_5[1] = { - {12, 6}, + {15, 6}, }; -static arc arcs_28_6[1] = { - {17, 7}, +static arc arcs_28_6[2] = { + {63, 7}, + {0, 6}, }; static arc arcs_28_7[1] = { - {0, 7}, + {14, 8}, +}; +static arc arcs_28_8[1] = { + {15, 9}, +}; +static arc arcs_28_9[1] = { + {0, 9}, }; -static state states_28[8] = { +static state states_28[10] = { {1, arcs_28_0}, {1, arcs_28_1}, {1, arcs_28_2}, {1, arcs_28_3}, - {2, arcs_28_4}, + {1, arcs_28_4}, {1, arcs_28_5}, - {1, arcs_28_6}, + {2, arcs_28_6}, {1, arcs_28_7}, + {1, arcs_28_8}, + {1, arcs_28_9}, }; static arc arcs_29_0[1] = { {66, 1}, }; static arc arcs_29_1[1] = { - {39, 2}, + {14, 2}, }; static arc arcs_29_2[1] = { - {56, 3}, + {15, 3}, }; -static arc arcs_29_3[1] = { - {9, 4}, +static arc arcs_29_3[2] = { + {67, 4}, + {68, 5}, }; static arc arcs_29_4[1] = { - {12, 5}, + {14, 6}, }; static arc arcs_29_5[1] = { - {17, 6}, + {14, 7}, }; -static arc arcs_29_6[2] = { - {64, 7}, - {0, 6}, +static arc arcs_29_6[1] = { + {15, 8}, }; static arc arcs_29_7[1] = { - {12, 8}, + {15, 9}, }; -static arc arcs_29_8[1] = { - {17, 9}, +static arc arcs_29_8[2] = { + {67, 4}, + {0, 8}, }; static arc arcs_29_9[1] = { {0, 9}, @@ -597,187 +618,154 @@ static state states_29[10] = { {1, arcs_29_0}, {1, arcs_29_1}, {1, arcs_29_2}, - {1, arcs_29_3}, + {2, arcs_29_3}, {1, arcs_29_4}, {1, arcs_29_5}, - {2, arcs_29_6}, + {1, arcs_29_6}, {1, arcs_29_7}, - {1, arcs_29_8}, + {2, arcs_29_8}, {1, arcs_29_9}, }; static arc arcs_30_0[1] = { - {67, 1}, + {69, 1}, }; -static arc arcs_30_1[1] = { - {12, 2}, +static arc arcs_30_1[2] = { + {36, 2}, + {0, 1}, }; -static arc arcs_30_2[1] = { - {17, 3}, +static arc arcs_30_2[2] = { + {20, 3}, + {0, 2}, }; -static arc arcs_30_3[2] = { - {68, 4}, - {69, 5}, +static arc arcs_30_3[1] = { + {36, 4}, }; static arc arcs_30_4[1] = { - {12, 6}, -}; -static arc arcs_30_5[1] = { - {12, 7}, -}; -static arc arcs_30_6[1] = { - {17, 8}, -}; -static arc arcs_30_7[1] = { - {17, 9}, -}; -static arc arcs_30_8[2] = { - {68, 4}, - {0, 8}, -}; -static arc arcs_30_9[1] = { - {0, 9}, + {0, 4}, }; -static state states_30[10] = { +static state states_30[5] = { {1, arcs_30_0}, - {1, arcs_30_1}, - {1, arcs_30_2}, - {2, arcs_30_3}, + {2, arcs_30_1}, + {2, arcs_30_2}, + {1, arcs_30_3}, {1, arcs_30_4}, - {1, arcs_30_5}, - {1, arcs_30_6}, - {1, arcs_30_7}, - {2, arcs_30_8}, - {1, arcs_30_9}, }; -static arc arcs_31_0[1] = { - {70, 1}, +static arc arcs_31_0[2] = { + {3, 1}, + {2, 2}, }; -static arc arcs_31_1[2] = { - {37, 2}, +static arc arcs_31_1[1] = { {0, 1}, }; -static arc arcs_31_2[2] = { - {21, 3}, - {0, 2}, +static arc arcs_31_2[1] = { + {70, 3}, }; static arc arcs_31_3[1] = { - {37, 4}, + {6, 4}, }; -static arc arcs_31_4[1] = { - {0, 4}, +static arc arcs_31_4[2] = { + {6, 4}, + {71, 1}, }; static state states_31[5] = { - {1, arcs_31_0}, - {2, arcs_31_1}, - {2, arcs_31_2}, + {2, arcs_31_0}, + {1, arcs_31_1}, + {1, arcs_31_2}, {1, arcs_31_3}, - {1, arcs_31_4}, + {2, arcs_31_4}, }; -static arc arcs_32_0[2] = { - {3, 1}, - {2, 2}, +static arc arcs_32_0[1] = { + {72, 1}, }; -static arc arcs_32_1[1] = { +static arc arcs_32_1[2] = { + {73, 0}, {0, 1}, }; -static arc arcs_32_2[1] = { - {71, 3}, -}; -static arc arcs_32_3[1] = { - {6, 4}, -}; -static arc arcs_32_4[2] = { - {6, 4}, - {72, 1}, -}; -static state states_32[5] = { - {2, arcs_32_0}, - {1, arcs_32_1}, - {1, arcs_32_2}, - {1, arcs_32_3}, - {2, arcs_32_4}, +static state states_32[2] = { + {1, arcs_32_0}, + {2, arcs_32_1}, }; static arc arcs_33_0[1] = { - {73, 1}, + {74, 1}, }; static arc arcs_33_1[2] = { - {74, 0}, + {75, 0}, {0, 1}, }; static state states_33[2] = { {1, arcs_33_0}, {2, arcs_33_1}, }; -static arc arcs_34_0[1] = { - {75, 1}, -}; -static arc arcs_34_1[2] = { - {76, 0}, - {0, 1}, -}; -static state states_34[2] = { - {1, arcs_34_0}, - {2, arcs_34_1}, -}; -static arc arcs_35_0[2] = { - {77, 1}, - {78, 2}, +static arc arcs_34_0[2] = { + {76, 1}, + {77, 2}, }; -static arc arcs_35_1[1] = { - {75, 2}, +static arc arcs_34_1[1] = { + {74, 2}, }; -static arc arcs_35_2[1] = { +static arc arcs_34_2[1] = { {0, 2}, }; -static state states_35[3] = { - {2, arcs_35_0}, - {1, arcs_35_1}, - {1, arcs_35_2}, +static state states_34[3] = { + {2, arcs_34_0}, + {1, arcs_34_1}, + {1, arcs_34_2}, }; -static arc arcs_36_0[1] = { - {55, 1}, +static arc arcs_35_0[1] = { + {54, 1}, }; -static arc arcs_36_1[2] = { - {79, 0}, +static arc arcs_35_1[2] = { + {78, 0}, {0, 1}, }; -static state states_36[2] = { - {1, arcs_36_0}, - {2, arcs_36_1}, +static state states_35[2] = { + {1, arcs_35_0}, + {2, arcs_35_1}, }; -static arc arcs_37_0[10] = { +static arc arcs_36_0[10] = { + {79, 1}, {80, 1}, {81, 1}, {82, 1}, {83, 1}, {84, 1}, {85, 1}, - {86, 1}, - {56, 1}, - {77, 2}, - {87, 3}, + {55, 1}, + {76, 2}, + {86, 3}, }; -static arc arcs_37_1[1] = { +static arc arcs_36_1[1] = { {0, 1}, }; -static arc arcs_37_2[1] = { - {56, 1}, +static arc arcs_36_2[1] = { + {55, 1}, }; -static arc arcs_37_3[2] = { - {77, 1}, +static arc arcs_36_3[2] = { + {76, 1}, {0, 3}, }; -static state states_37[4] = { - {10, arcs_37_0}, - {1, arcs_37_1}, - {1, arcs_37_2}, - {2, arcs_37_3}, +static state states_36[4] = { + {10, arcs_36_0}, + {1, arcs_36_1}, + {1, arcs_36_2}, + {2, arcs_36_3}, +}; +static arc arcs_37_0[1] = { + {87, 1}, +}; +static arc arcs_37_1[2] = { + {88, 0}, + {0, 1}, +}; +static state states_37[2] = { + {1, arcs_37_0}, + {2, arcs_37_1}, }; static arc arcs_38_0[1] = { - {88, 1}, + {89, 1}, }; static arc arcs_38_1[2] = { - {89, 0}, + {90, 0}, {0, 1}, }; static state states_38[2] = { @@ -785,10 +773,10 @@ static state states_38[2] = { {2, arcs_38_1}, }; static arc arcs_39_0[1] = { - {90, 1}, + {91, 1}, }; static arc arcs_39_1[2] = { - {91, 0}, + {92, 0}, {0, 1}, }; static state states_39[2] = { @@ -796,22 +784,23 @@ static state states_39[2] = { {2, arcs_39_1}, }; static arc arcs_40_0[1] = { - {92, 1}, + {93, 1}, }; -static arc arcs_40_1[2] = { - {93, 0}, +static arc arcs_40_1[3] = { + {94, 0}, + {95, 0}, {0, 1}, }; static state states_40[2] = { {1, arcs_40_0}, - {2, arcs_40_1}, + {3, arcs_40_1}, }; static arc arcs_41_0[1] = { - {94, 1}, + {96, 1}, }; static arc arcs_41_1[3] = { - {95, 0}, - {96, 0}, + {97, 0}, + {98, 0}, {0, 1}, }; static state states_41[2] = { @@ -819,126 +808,138 @@ static state states_41[2] = { {3, arcs_41_1}, }; static arc arcs_42_0[1] = { - {97, 1}, + {99, 1}, }; -static arc arcs_42_1[3] = { - {98, 0}, - {99, 0}, +static arc arcs_42_1[4] = { + {21, 0}, + {100, 0}, + {101, 0}, {0, 1}, }; static state states_42[2] = { {1, arcs_42_0}, - {3, arcs_42_1}, -}; -static arc arcs_43_0[1] = { - {100, 1}, + {4, arcs_42_1}, }; -static arc arcs_43_1[4] = { - {22, 0}, - {101, 0}, - {102, 0}, - {0, 1}, -}; -static state states_43[2] = { - {1, arcs_43_0}, - {4, arcs_43_1}, -}; -static arc arcs_44_0[4] = { +static arc arcs_43_0[4] = { + {97, 1}, {98, 1}, - {99, 1}, - {103, 1}, - {104, 2}, + {102, 1}, + {103, 2}, }; -static arc arcs_44_1[1] = { - {100, 3}, +static arc arcs_43_1[1] = { + {99, 3}, }; -static arc arcs_44_2[2] = { - {105, 2}, +static arc arcs_43_2[2] = { + {104, 2}, {0, 2}, }; -static arc arcs_44_3[1] = { +static arc arcs_43_3[1] = { {0, 3}, }; -static state states_44[4] = { - {4, arcs_44_0}, - {1, arcs_44_1}, - {2, arcs_44_2}, - {1, arcs_44_3}, +static state states_43[4] = { + {4, arcs_43_0}, + {1, arcs_43_1}, + {2, arcs_43_2}, + {1, arcs_43_3}, }; -static arc arcs_45_0[7] = { - {18, 1}, - {106, 2}, - {108, 3}, - {111, 4}, - {15, 5}, +static arc arcs_44_0[8] = { + {16, 1}, + {105, 2}, + {107, 3}, + {110, 4}, + {111, 5}, + {12, 5}, {112, 5}, {113, 5}, }; -static arc arcs_45_1[2] = { +static arc arcs_44_1[2] = { {9, 6}, - {19, 5}, + {18, 5}, }; -static arc arcs_45_2[2] = { +static arc arcs_44_2[2] = { {9, 7}, - {107, 5}, + {106, 5}, }; -static arc arcs_45_3[2] = { - {109, 8}, - {110, 5}, +static arc arcs_44_3[2] = { + {108, 8}, + {109, 5}, }; -static arc arcs_45_4[1] = { +static arc arcs_44_4[1] = { {9, 9}, }; -static arc arcs_45_5[1] = { +static arc arcs_44_5[1] = { {0, 5}, }; -static arc arcs_45_6[1] = { - {19, 5}, +static arc arcs_44_6[1] = { + {18, 5}, +}; +static arc arcs_44_7[1] = { + {106, 5}, }; -static arc arcs_45_7[1] = { - {107, 5}, +static arc arcs_44_8[1] = { + {109, 5}, }; -static arc arcs_45_8[1] = { +static arc arcs_44_9[1] = { {110, 5}, }; -static arc arcs_45_9[1] = { - {111, 5}, +static state states_44[10] = { + {8, arcs_44_0}, + {2, arcs_44_1}, + {2, arcs_44_2}, + {2, arcs_44_3}, + {1, arcs_44_4}, + {1, arcs_44_5}, + {1, arcs_44_6}, + {1, arcs_44_7}, + {1, arcs_44_8}, + {1, arcs_44_9}, +}; +static arc arcs_45_0[1] = { + {114, 1}, +}; +static arc arcs_45_1[2] = { + {17, 2}, + {14, 3}, }; -static state states_45[10] = { - {7, arcs_45_0}, +static arc arcs_45_2[1] = { + {14, 3}, +}; +static arc arcs_45_3[1] = { + {36, 4}, +}; +static arc arcs_45_4[1] = { + {0, 4}, +}; +static state states_45[5] = { + {1, arcs_45_0}, {2, arcs_45_1}, - {2, arcs_45_2}, - {2, arcs_45_3}, + {1, arcs_45_2}, + {1, arcs_45_3}, {1, arcs_45_4}, - {1, arcs_45_5}, - {1, arcs_45_6}, - {1, arcs_45_7}, - {1, arcs_45_8}, - {1, arcs_45_9}, }; static arc arcs_46_0[3] = { - {18, 1}, - {106, 2}, - {115, 3}, + {16, 1}, + {105, 2}, + {116, 3}, }; static arc arcs_46_1[2] = { {9, 4}, - {19, 5}, + {18, 5}, }; static arc arcs_46_2[1] = { - {114, 6}, + {115, 6}, }; static arc arcs_46_3[1] = { - {15, 5}, + {12, 5}, }; static arc arcs_46_4[1] = { - {19, 5}, + {18, 5}, }; static arc arcs_46_5[1] = { {0, 5}, }; static arc arcs_46_6[1] = { - {107, 5}, + {106, 5}, }; static state states_46[7] = { {3, arcs_46_0}, @@ -950,15 +951,15 @@ static state states_46[7] = { {1, arcs_46_6}, }; static arc arcs_47_0[2] = { - {37, 1}, - {12, 2}, + {36, 1}, + {14, 2}, }; static arc arcs_47_1[2] = { - {12, 2}, + {14, 2}, {0, 1}, }; static arc arcs_47_2[2] = { - {37, 3}, + {36, 3}, {0, 2}, }; static arc arcs_47_3[1] = { @@ -971,14 +972,14 @@ static state states_47[4] = { {1, arcs_47_3}, }; static arc arcs_48_0[1] = { - {55, 1}, + {54, 1}, }; static arc arcs_48_1[2] = { - {21, 2}, + {20, 2}, {0, 1}, }; static arc arcs_48_2[2] = { - {55, 1}, + {54, 1}, {0, 2}, }; static state states_48[3] = { @@ -987,14 +988,14 @@ static state states_48[3] = { {2, arcs_48_2}, }; static arc arcs_49_0[1] = { - {37, 1}, + {36, 1}, }; static arc arcs_49_1[2] = { - {21, 2}, + {20, 2}, {0, 1}, }; static arc arcs_49_2[2] = { - {37, 1}, + {36, 1}, {0, 2}, }; static state states_49[3] = { @@ -1003,20 +1004,20 @@ static state states_49[3] = { {2, arcs_49_2}, }; static arc arcs_50_0[1] = { - {37, 1}, + {36, 1}, }; static arc arcs_50_1[1] = { - {12, 2}, + {14, 2}, }; static arc arcs_50_2[1] = { - {37, 3}, + {36, 3}, }; static arc arcs_50_3[2] = { - {21, 4}, + {20, 4}, {0, 3}, }; static arc arcs_50_4[2] = { - {37, 1}, + {36, 1}, {0, 4}, }; static state states_50[5] = { @@ -1027,29 +1028,29 @@ static state states_50[5] = { {2, arcs_50_4}, }; static arc arcs_51_0[1] = { - {116, 1}, + {117, 1}, }; static arc arcs_51_1[1] = { - {15, 2}, + {12, 2}, }; static arc arcs_51_2[2] = { - {18, 3}, - {12, 4}, + {16, 3}, + {14, 4}, }; static arc arcs_51_3[1] = { {9, 5}, }; static arc arcs_51_4[1] = { - {17, 6}, + {15, 6}, }; static arc arcs_51_5[1] = { - {19, 7}, + {18, 7}, }; static arc arcs_51_6[1] = { {0, 6}, }; static arc arcs_51_7[1] = { - {12, 4}, + {14, 4}, }; static state states_51[8] = { {1, arcs_51_0}, @@ -1063,156 +1064,155 @@ static state states_51[8] = { }; static dfa dfas[52] = { {256, "single_input", 0, 3, states_0, - "\004\300\004\000\120\341\137\100\016\040\000\000\214\224\023"}, + "\004\030\001\000\250\360\057\040\007\020\000\000\106\112\047"}, {257, "file_input", 0, 2, states_1, - "\204\300\004\000\120\341\137\100\016\040\000\000\214\224\023"}, + "\204\030\001\000\250\360\057\040\007\020\000\000\106\112\047"}, {258, "eval_input", 0, 3, states_2, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, - {259, "lambda_input", 0, 5, states_3, - "\000\200\104\000\000\000\000\000\000\000\000\000\000\000\000"}, - {260, "funcdef", 0, 6, states_4, - "\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {261, "parameters", 0, 4, states_5, - "\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000"}, - {262, "varargslist", 0, 5, states_6, - "\000\200\104\000\000\000\000\000\000\000\000\000\000\000\000"}, - {263, "fpdef", 0, 4, states_7, - "\000\200\004\000\000\000\000\000\000\000\000\000\000\000\000"}, - {264, "fplist", 0, 3, states_8, - "\000\200\004\000\000\000\000\000\000\000\000\000\000\000\000"}, - {265, "stmt", 0, 2, states_9, - "\000\300\004\000\120\341\137\100\016\040\000\000\214\224\023"}, - {266, "simple_stmt", 0, 4, states_10, - "\000\200\004\000\120\341\137\000\000\040\000\000\214\224\003"}, - {267, "small_stmt", 0, 2, states_11, - "\000\200\004\000\120\341\137\000\000\040\000\000\214\224\003"}, - {268, "expr_stmt", 0, 2, states_12, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, - {269, "print_stmt", 0, 3, states_13, - "\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, - {270, "del_stmt", 0, 3, states_14, - "\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000"}, - {271, "pass_stmt", 0, 2, states_15, - "\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, - {272, "flow_stmt", 0, 2, states_16, - "\000\000\000\000\000\340\001\000\000\000\000\000\000\000\000"}, - {273, "break_stmt", 0, 2, states_17, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, + {259, "funcdef", 0, 6, states_3, + "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {260, "parameters", 0, 4, states_4, + "\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000"}, + {261, "varargslist", 0, 5, states_5, + "\000\020\041\000\000\000\000\000\000\000\000\000\000\000\000"}, + {262, "fpdef", 0, 4, states_6, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000"}, + {263, "fplist", 0, 3, states_7, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000"}, + {264, "stmt", 0, 2, states_8, + "\000\030\001\000\250\360\057\040\007\020\000\000\106\112\047"}, + {265, "simple_stmt", 0, 4, states_9, + "\000\020\001\000\250\360\057\000\000\020\000\000\106\112\007"}, + {266, "small_stmt", 0, 2, states_10, + "\000\020\001\000\250\360\057\000\000\020\000\000\106\112\007"}, + {267, "expr_stmt", 0, 2, states_11, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, + {268, "print_stmt", 0, 3, states_12, + "\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000"}, + {269, "del_stmt", 0, 3, states_13, + "\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + {270, "pass_stmt", 0, 2, states_14, + "\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"}, + {271, "flow_stmt", 0, 2, states_15, + "\000\000\000\000\000\360\000\000\000\000\000\000\000\000\000"}, + {272, "break_stmt", 0, 2, states_16, + "\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000"}, + {273, "continue_stmt", 0, 2, states_17, "\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"}, - {274, "continue_stmt", 0, 2, states_18, + {274, "return_stmt", 0, 3, states_18, "\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000"}, - {275, "return_stmt", 0, 3, states_19, + {275, "raise_stmt", 0, 5, states_19, "\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000"}, - {276, "raise_stmt", 0, 5, states_20, - "\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"}, - {277, "import_stmt", 0, 9, states_21, - "\000\000\000\000\000\000\006\000\000\000\000\000\000\000\000"}, - {278, "global_stmt", 0, 3, states_22, + {276, "import_stmt", 0, 9, states_20, + "\000\000\000\000\000\000\003\000\000\000\000\000\000\000\000"}, + {277, "global_stmt", 0, 3, states_21, + "\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000"}, + {278, "access_stmt", 0, 7, states_22, "\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000"}, - {279, "access_stmt", 0, 7, states_23, - "\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000"}, - {280, "accesstype", 0, 2, states_24, - "\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {281, "exec_stmt", 0, 7, states_25, - "\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"}, - {282, "compound_stmt", 0, 2, states_26, - "\000\100\000\000\000\000\000\100\016\000\000\000\000\000\020"}, - {283, "if_stmt", 0, 8, states_27, - "\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000"}, - {284, "while_stmt", 0, 8, states_28, + {279, "accesstype", 0, 2, states_23, + "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {280, "exec_stmt", 0, 7, states_24, + "\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000"}, + {281, "compound_stmt", 0, 2, states_25, + "\000\010\000\000\000\000\000\040\007\000\000\000\000\000\040"}, + {282, "if_stmt", 0, 8, states_26, + "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000"}, + {283, "while_stmt", 0, 8, states_27, + "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000"}, + {284, "for_stmt", 0, 10, states_28, "\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000"}, - {285, "for_stmt", 0, 10, states_29, + {285, "try_stmt", 0, 10, states_29, "\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000"}, - {286, "try_stmt", 0, 10, states_30, - "\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000"}, - {287, "except_clause", 0, 5, states_31, - "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000"}, - {288, "suite", 0, 5, states_32, - "\004\200\004\000\120\341\137\000\000\040\000\000\214\224\003"}, - {289, "test", 0, 2, states_33, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, - {290, "and_test", 0, 2, states_34, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, - {291, "not_test", 0, 3, states_35, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, - {292, "comparison", 0, 2, states_36, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {293, "comp_op", 0, 4, states_37, - "\000\000\000\000\000\000\000\001\000\040\377\000\000\000\000"}, - {294, "expr", 0, 2, states_38, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {295, "xor_expr", 0, 2, states_39, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {296, "and_expr", 0, 2, states_40, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {297, "shift_expr", 0, 2, states_41, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {298, "arith_expr", 0, 2, states_42, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {299, "term", 0, 2, states_43, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {300, "factor", 0, 4, states_44, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, - {301, "atom", 0, 10, states_45, - "\000\200\004\000\000\000\000\000\000\000\000\000\000\224\003"}, + {286, "except_clause", 0, 5, states_30, + "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000"}, + {287, "suite", 0, 5, states_31, + "\004\020\001\000\250\360\057\000\000\020\000\000\106\112\007"}, + {288, "test", 0, 2, states_32, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, + {289, "and_test", 0, 2, states_33, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, + {290, "not_test", 0, 3, states_34, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, + {291, "comparison", 0, 2, states_35, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {292, "comp_op", 0, 4, states_36, + "\000\000\000\000\000\000\200\000\000\220\177\000\000\000\000"}, + {293, "expr", 0, 2, states_37, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {294, "xor_expr", 0, 2, states_38, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {295, "and_expr", 0, 2, states_39, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {296, "shift_expr", 0, 2, states_40, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {297, "arith_expr", 0, 2, states_41, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {298, "term", 0, 2, states_42, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {299, "factor", 0, 4, states_43, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, + {300, "atom", 0, 10, states_44, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\112\007"}, + {301, "lambdef", 0, 5, states_45, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004"}, {302, "trailer", 0, 7, states_46, - "\000\000\004\000\000\000\000\000\000\000\000\000\000\004\010"}, + "\000\000\001\000\000\000\000\000\000\000\000\000\000\002\020"}, {303, "subscript", 0, 4, states_47, - "\000\220\004\000\000\000\000\000\000\040\000\000\214\224\003"}, + "\000\120\001\000\000\000\000\000\000\020\000\000\106\112\007"}, {304, "exprlist", 0, 3, states_48, - "\000\200\004\000\000\000\000\000\000\000\000\000\214\224\003"}, + "\000\020\001\000\000\000\000\000\000\000\000\000\106\112\007"}, {305, "testlist", 0, 3, states_49, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, {306, "dictmaker", 0, 5, states_50, - "\000\200\004\000\000\000\000\000\000\040\000\000\214\224\003"}, + "\000\020\001\000\000\000\000\000\000\020\000\000\106\112\007"}, {307, "classdef", 0, 8, states_51, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\040"}, }; -static label labels[117] = { +static label labels[118] = { {0, "EMPTY"}, {256, 0}, {4, 0}, - {266, 0}, - {282, 0}, - {257, 0}, {265, 0}, + {281, 0}, + {257, 0}, + {264, 0}, {0, 0}, {258, 0}, {305, 0}, {259, 0}, - {262, 0}, - {11, 0}, - {260, 0}, {1, "def"}, {1, 0}, - {261, 0}, - {288, 0}, + {260, 0}, + {11, 0}, + {287, 0}, {7, 0}, + {261, 0}, {8, 0}, - {263, 0}, + {262, 0}, {12, 0}, {16, 0}, - {264, 0}, - {267, 0}, + {263, 0}, + {266, 0}, {13, 0}, + {267, 0}, {268, 0}, {269, 0}, {270, 0}, {271, 0}, - {272, 0}, + {276, 0}, {277, 0}, {278, 0}, - {279, 0}, - {281, 0}, + {280, 0}, {22, 0}, {1, "print"}, - {289, 0}, + {288, 0}, {1, "del"}, {304, 0}, {1, "pass"}, + {272, 0}, {273, 0}, {274, 0}, {275, 0}, - {276, 0}, {1, "break"}, {1, "continue"}, {1, "return"}, @@ -1221,14 +1221,14 @@ static label labels[117] = { {1, "from"}, {1, "global"}, {1, "access"}, - {280, 0}, + {279, 0}, {1, "exec"}, - {294, 0}, + {293, 0}, {1, "in"}, + {282, 0}, {283, 0}, {284, 0}, {285, 0}, - {286, 0}, {307, 0}, {1, "if"}, {1, "elif"}, @@ -1236,18 +1236,18 @@ static label labels[117] = { {1, "while"}, {1, "for"}, {1, "try"}, - {287, 0}, + {286, 0}, {1, "finally"}, {1, "except"}, {5, 0}, {6, 0}, - {290, 0}, + {289, 0}, {1, "or"}, - {291, 0}, + {290, 0}, {1, "and"}, {1, "not"}, + {291, 0}, {292, 0}, - {293, 0}, {20, 0}, {21, 0}, {28, 0}, @@ -1256,23 +1256,23 @@ static label labels[117] = { {29, 0}, {29, 0}, {1, "is"}, - {295, 0}, + {294, 0}, {18, 0}, - {296, 0}, + {295, 0}, {33, 0}, - {297, 0}, + {296, 0}, {19, 0}, - {298, 0}, + {297, 0}, {34, 0}, {35, 0}, - {299, 0}, + {298, 0}, {14, 0}, {15, 0}, - {300, 0}, + {299, 0}, {17, 0}, {24, 0}, {32, 0}, - {301, 0}, + {300, 0}, {302, 0}, {9, 0}, {10, 0}, @@ -1280,8 +1280,10 @@ static label labels[117] = { {306, 0}, {27, 0}, {25, 0}, + {301, 0}, {2, 0}, {3, 0}, + {1, "lambda"}, {303, 0}, {23, 0}, {1, "class"}, @@ -1289,6 +1291,6 @@ static label labels[117] = { grammar gram = { 52, dfas, - {117, labels}, + {118, labels}, 256 }; diff --git a/Python/import.c b/Python/import.c index 2fc3995..a8cfe5b 100644 --- a/Python/import.c +++ b/Python/import.c @@ -174,7 +174,8 @@ get_module(m, name, m_ret) case PY_SOURCE: mtime = getmtime(namebuf); - strcat(namebuf, "c"); + len = strlen(namebuf); + strcpy(namebuf + len, "c"); fpc = fopen(namebuf, "rb"); if (fpc != NULL) { magic = rd_long(fpc); @@ -204,6 +205,7 @@ get_module(m, name, m_ret) } fclose(fpc); } + namebuf[len] = '\0'; err = parse_file(fp, namebuf, file_input, &n); if (err != E_DONE) { err_input(err); @@ -215,9 +217,9 @@ get_module(m, name, m_ret) return NULL; if (verbose) fprintf(stderr, - "import %s # from %.*s\n", - name, strlen(namebuf)-1, namebuf); + "import %s # from %s\n", name, namebuf); /* Now write the code object to the ".pyc" file */ + strcpy(namebuf + len, "c"); fpc = fopen(namebuf, "wb"); if (fpc == NULL) { if (verbose) |