diff --git a/Makefile.in b/Makefile.in index f04cb13..100a984 100644 --- a/Makefile.in +++ b/Makefile.in @@ -64,12 +64,12 @@ clean: cd awka; $(MAKE) clean cd lib; $(MAKE) clean cd test; $(MAKE) clean + cd benchmark; $(MAKE) clean distclean: clean rm -f config.h Makefile lib/Makefile awka/Makefile test/Makefile benchmark/Makefile \ config.status config.log config.cache rm -f defines.out maxint.out - rm -f benchmark/*.c benchmark/core benchmark/*.o benchmark/x* benchmark/*.out configure: configure.in awka.ac.m4 autoconf diff --git a/awka/awka.c b/awka/awka.c index 3a8f6bb..285771d 100644 --- a/awka/awka.c +++ b/awka/awka.c @@ -149,7 +149,7 @@ isarray(char *var) ----------------------------------------------------------------------------- */ -static char* tmpfile_prefix(const char *pattern){ +static char* tmpfile_prefix(const char *pattern) { char tmp_file[512]; strcpy(tmp_file, pattern); int fd = mkstemp(tmp_file); @@ -158,7 +158,7 @@ static char* tmpfile_prefix(const char *pattern){ return file_path; } -static int awka_output_file(int awka_tmp, char *uoutfile, char **c_file, char **outfile){ +static int awka_output_file(int awka_tmp, char *uoutfile, char **c_file, char **outfile) { char *outfile_prefix = NULL; char *outfile_suffix; @@ -194,7 +194,7 @@ static int awka_output_file(int awka_tmp, char *uoutfile, char **c_file, char ** return 1; } -static char* awka_build_compile_command(char *c_file, char *outfile){ +static char* awka_build_compile_command(char *c_file, char *outfile) { char *cmd; int incd_len=0, libd_len=0, libf_len=0; @@ -235,7 +235,7 @@ static char* awka_build_compile_command(char *c_file, char *outfile){ return cmd; } -static int awka_do_compile(char *c_file, char *outfile){ +static int awka_do_compile(char *c_file, char *outfile) { char *cmd; cmd = awka_build_compile_command(c_file, outfile); @@ -258,7 +258,7 @@ static int awka_do_compile(char *c_file, char *outfile){ return 1; } -static int awka_do_exec(char *outfile){ +static int awka_do_exec(char *outfile) { int len = strlen(outfile); for (int i=0; iname) ; - stp->type = ST_LENGTH ; + stp->type = ST_NONE; + //stp->type = ST_LENGTH ; stp->stval.bip = bi_funct ; for (p = bi_funct + 1; p->name; p++) { stp = insert(p->name) ; - stp->type = ST_BUILTIN ; + if (strcmp(p->name, "length") == 0) + stp->type = ST_LENGTH ; + else + stp->type = ST_BUILTIN ; stp->stval.bip = p ; } @@ -781,3 +789,10 @@ bi_isarray(sp) { return sp ; } + +CELL * +bi_typeof(sp) + register CELL *sp ; +{ + return sp ; +} diff --git a/awka/bi_funct.h b/awka/bi_funct.h index 032064a..83597af 100644 --- a/awka/bi_funct.h +++ b/awka/bi_funct.h @@ -126,7 +126,8 @@ CELL *PROTO( bi_alength, (CELL *) ) ; CELL *PROTO( bi_argcount, (CELL *) ) ; CELL *PROTO( bi_argval, (CELL *) ) ; -CELL *PROTO( bi_isarray, (CELL *) ) ; +CELL *PROTO( bi_isarray, (CELL *) ) ; +CELL *PROTO( bi_typeof, (CELL *) ) ; char bi_funct_find(char *) ; diff --git a/awka/code.h b/awka/code.h index d046e48..bda0010 100644 --- a/awka/code.h +++ b/awka/code.h @@ -290,25 +290,26 @@ void PROTO(dump_code, (void)) ; #define _TOUPPER 173 #define _TRIM 174 #define _TRUNC 175 +#define _TYPEOF 176 -#define _XOR 176 // was 150 -#define _FSIZE 177 -#define _FSEEK 178 -#define _FTELL 179 +#define _XOR 177 // was 150 +#define _FSIZE 178 +#define _FSEEK 179 +#define _FTELL 180 #define CODE_MIN 0 #define CODE_MAX 100 #define BI_MIN 101 // # define BI_MAX 149 // TODO: use 153 ? Is original 149 a bug? -#define BI_MAX 176 +#define BI_MAX 177 -#define _FUNCTION 180 // was 154 -#define _BEGIN 181 -#define _MAIN 182 -#define _END 183 -#define END_CODE 184 +#define _FUNCTION 181 // was 154 +#define _BEGIN 182 +#define _MAIN 183 +#define _END 184 +#define END_CODE 185 #endif /* CODE_H */ diff --git a/awka/da.c b/awka/da.c index ca11c64..f8a13dd 100644 --- a/awka/da.c +++ b/awka/da.c @@ -53,7 +53,7 @@ int cfunc_allc = 0; static struct sc { - char op ; + char op ; char *name ; } simple_code[] = @@ -250,7 +250,7 @@ fixbackslashes(char *str, int which) r = q - 1; do { *(q--) = *(r--); - } while(r >= p); + } while (r >= p); *(p++) = '\\'; } p++; @@ -421,7 +421,7 @@ awka_insertop(int op, char *cval, char *carg, int minst, char *file, int line) progcode[prog_no].line = line; progcode[prog_no].file = file; progcode[prog_no].val = val; - progcode[prog_no].arg = arg; + progcode[prog_no].arg = arg; progcode[prog_no].endloop = 0; progcode[prog_no].foreverloop = 0; progcode[prog_no].doloop = FALSE; @@ -464,11 +464,11 @@ awka_insertop(int op, char *cval, char *carg, int minst, char *file, int line) { if (!strncmp(val, "repl", 4)) { - progcode[prog_no].arg = fixbackslashes(progcode[prog_no].arg, _PUSHS); + progcode[prog_no].arg = fixbackslashes(progcode[prog_no].arg, _PUSHS); /* double_backslashes(progcode[prog_no].arg); */ } else - progcode[prog_no].arg = fixbackslashes(progcode[prog_no].arg, op); + progcode[prog_no].arg = fixbackslashes(progcode[prog_no].arg, op); } prog_no++; } @@ -512,29 +512,29 @@ da(start, fp) sprintf(tmp1, "0x%lx", (long) cp->ptr); /* sprintf(tmp2, "/%s/", re_uncompile(cp->ptr)); */ sprintf(tmp2, "%s", re_uncompile(cp->ptr)); - if (dump) fprintf(stderr,"%d:\tpushc\t\t%s\t%d\n",minst,tmp2,line); + if (dump) fprintf(stderr,"%d:\tpushc \t\t%s\t%d\n",minst,tmp2,line); awka_insertop(_PUSHC, tmp1, tmp2, minst, file, line); break ; case C_SPACE: - if (dump) fprintf(stderr,"%d:\tpushc\t\tspace split\t%d\n",minst,line); + if (dump) fprintf(stderr,"%d:\tpushc \t\tspace split\t%d\n",minst,line); awka_insertop(_PUSHC, "space", "split", minst, file, line); break ; case C_SNULL: - if (dump) fprintf(stderr,"%d:\tpushc\t\tnull split\t%d\n",minst,line); + if (dump) fprintf(stderr,"%d:\tpushc \t\tnull split\t%d\n",minst,line); awka_insertop(_PUSHC, "null", "split", minst, file, line); break ; case C_REPL: sprintf(tmp2, "%s", repl_uncompile(cp)); - if (dump) fprintf(stderr,"%d:\tpushc\t\trepl %s\t%d\n",minst,tmp2,line); + if (dump) fprintf(stderr,"%d:\tpushc \t\trepl %s\t%d\n",minst,tmp2,line); awka_insertop(_PUSHC, "repl", tmp2, minst, file, line); break ; case C_REPLV: sprintf(tmp2, "%s", repl_uncompile(cp)); - if (dump) fprintf(stderr,"%d:\tpushc\t\treplv %s\t%d\n",minst,tmp2,line); + if (dump) fprintf(stderr,"%d:\tpushc \t\treplv %s\t%d\n",minst,tmp2,line); awka_insertop(_PUSHC, "replv", tmp2, minst, file, line); break ; @@ -549,14 +549,14 @@ da(start, fp) to be converted to a string to be printed to the C output. Does anyone know a means of safely ensuring the correct precision is carried through? */ - sprintf(tmp1, "%.25g", *(double *) p++->ptr); - if (dump) fprintf(stderr,"%d:\tpushd\t\t%s\t%d\n",minst,tmp1,line); + sprintf(tmp1, "%.25g", *(double *) p++->ptr); + if (dump) fprintf(stderr,"%d:\tpushd \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(_PUSHD, tmp1, NULL, minst, file, line); break ; case _PUSHS: { STRING *sval = (STRING *) p++->ptr ; - if (dump) fprintf(stderr,"%d:\tpushs\t\t%s\t%d\n",minst,sval->str,line); + if (dump) fprintf(stderr,"%d:\tpushs \t\t%s\t%d\n",minst,sval->str,line); awka_insertop(_PUSHS, sval->str, NULL, minst, file, line); break ; } @@ -564,7 +564,7 @@ da(start, fp) case _MATCH0: sprintf(tmp1, "0x%lx", (long) p->ptr); sprintf(tmp2, "/%s/", re_uncompile(p->ptr)); - if (dump) fprintf(stderr,"%d:\tmatch0\t\t%s\t%d\n",minst,tmp2,line); + if (dump) fprintf(stderr,"%d:\tmatch0 \t\t%s\t%d\n",minst,tmp2,line); awka_insertop(op, tmp1, tmp2, minst, file, line); p++ ; break; @@ -572,26 +572,32 @@ da(start, fp) case _MATCH1: sprintf(tmp1, "0x%lx", (long) p->ptr); sprintf(tmp2, "/%s/", re_uncompile(p->ptr)); - if (dump) fprintf(stderr,"%d:\tmatch1\t\t%s\t%d\n",minst,tmp2,line); + if (dump) fprintf(stderr,"%d:\tmatch1 \t\t%s\t%d\n",minst,tmp2,line); awka_insertop(op, tmp1, tmp2, minst, file, line); p++ ; break ; case _PUSHA: - if (dump) fprintf(stderr,"%d:\tpusha\t\t%s\t%d\n",minst,reverse_find(ST_VAR, &p++->ptr),line); - awka_insertop(op, reverse_find(ST_VAR, &p++->ptr), NULL, minst, file, line); + tmp = reverse_find(ST_VAR, &p->ptr); + /* hack: allow array as a var w*/ + if (strcmp(tmp, "unknown") == 0) { + tmp = reverse_find(ST_ARRAY, &p->ptr); + } + p++; + if (dump) fprintf(stderr,"%d:\tpusha \t\t%s\t%d\n",minst,tmp,line); + awka_insertop(op, tmp, NULL, minst, file, line); break ; case _PUSHI: cp = (CELL *) p++->ptr ; if (cp == field) { - if (dump) fprintf(stderr,"%d:\tpushi\t\t$0\t%d\n",minst,line); + if (dump) fprintf(stderr,"%d:\tpushi \t\t$0\t%d\n",minst,line); awka_insertop(op, "$0", NULL, minst, file, line); } else if (cp == &fs_shadow) { - if (dump) fprintf(stderr,"%d:\tpushi\t\t@fs_shadow\t%d\n",minst,line); + if (dump) fprintf(stderr,"%d:\tpushi \t\t@fs_shadow\t%d\n",minst,line); awka_insertop(op, "@fs_shadow", NULL, minst, file, line); } else @@ -601,38 +607,42 @@ da(start, fp) name = reverse_find(ST_FIELD, &cp) ; else name = reverse_find(ST_VAR, &cp) ; - if (dump) fprintf(stderr,"%d:\tpushi\t\t%s\t%d\n",minst,name,line); + if (strcmp(name, "unknown") == 0) { + name = reverse_find(ST_ARRAY, &cp) ; + } + + if (dump) fprintf(stderr,"%d:\tpushi \t\t%s\t%d\n",minst,name,line); awka_insertop(op, name, NULL, minst, file, line); } break ; case L_PUSHA: sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\tl_pusha\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tl_pusha \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case L_PUSHI: sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\tl_pushi\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tl_pushi \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case LAE_PUSHI: sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\tlae_pushi\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tlae_pushi \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case LAE_PUSHA: sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\tlae_pusha\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tlae_pusha \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case LA_PUSHA: sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\tla_pusha\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tla_pusha \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; @@ -641,13 +651,13 @@ da(start, fp) if (cp >= NF && cp <= LAST_PFIELD) { tmp = reverse_find(ST_FIELD, &cp); - if (dump) fprintf(stderr,"%d:\tf_pusha\t\t%s\t%d\n",minst,tmp,line); + if (dump) fprintf(stderr,"%d:\tf_pusha \t\t%s\t%d\n",minst,tmp,line); awka_insertop(op, tmp, NULL, minst, file, line); } else { sprintf(tmp1, "$%d", field_addr_to_index(cp)) ; - if (dump) fprintf(stderr,"%d:\tf_pusha\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tf_pusha \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); } break ; @@ -655,137 +665,137 @@ da(start, fp) case F_PUSHI: p++ ; sprintf(tmp1, "$%d", p++->op); - if (dump) fprintf(stderr,"%d:\tf_pushi\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tf_pushi \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case AE_PUSHA: tmp = reverse_find(ST_ARRAY, &p++->ptr); - if (dump) fprintf(stderr,"%d:\tae_pusha\t\t%s\t%d\n",minst,tmp,line); + if (dump) fprintf(stderr,"%d:\tae_pusha \t\t%s\t%d\n",minst,tmp,line); awka_insertop(op, tmp, NULL, minst, file, line); break ; case AE_PUSHI: tmp = reverse_find(ST_ARRAY, &p++->ptr); - if (dump) fprintf(stderr,"%d:\tae_pushi\t\t%s\t%d\n",minst,tmp,line); + if (dump) fprintf(stderr,"%d:\tae_pushi \t\t%s\t%d\n",minst,tmp,line); awka_insertop(op, tmp, NULL, minst, file, line); break ; case A_PUSHA: tmp = reverse_find(ST_ARRAY, &p++->ptr); - if (dump) fprintf(stderr,"%d:\ta_pusha\t\t%s\t%d\n",minst,tmp,line); + if (dump) fprintf(stderr,"%d:\ta_pusha \t\t%s\t%d\n",minst,tmp,line); awka_insertop(op, tmp, NULL, minst, file, line); break ; case _PUSHINT: sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\tpushint\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tpushint \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case _BUILTIN: - if (dump) fprintf(stderr,"%d:\tbuiltin\t\t%s\t%d\n",minst,find_bi_name((PF_CP) p++->ptr),line); + if (dump) fprintf(stderr,"%d:\tbuiltin \t\t%s\t%d\n",minst,find_bi_name((PF_CP) p++->ptr),line); awka_insertop(op, find_bi_name((PF_CP) p++->ptr), NULL, minst, file, line); break ; case _PRINT: - if (dump) fprintf(stderr,"%d:\t%s\t\t\t%d\n",minst,((PF_CP) p++->ptr == bi_printf ? "printf" : "print"),line); + if (dump) fprintf(stderr,"%d:\t%-10s\t\t\t%d\n",minst,((PF_CP) p++->ptr == bi_printf ? "printf" : "print"),line); awka_insertop((PF_CP) p++->ptr == bi_printf ? _PRINTF : _PRINT, NULL, NULL, minst, file, line); break ; case _JMP: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tjmp\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tjmp \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _GOTO: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tgoto\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tgoto \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _BREAK: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tbreak\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tbreak \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _ELSE: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\telse\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\telse \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _COLON: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tcolon\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tcolon \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _QMARK: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tqmark\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tqmark \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _JNZ: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tjnz\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tjnz \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _JZ: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tjz\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tjz \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _LJZ: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tljz\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tljz \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case _LJNZ: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tljnz\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tljnz \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case SET_ALOOP: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\tset_aloop\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\tset_aloop \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case ALOOP: sprintf(tmp1, "%d", (int) ((p - start) + p->op)); - if (dump) fprintf(stderr,"%d:\taloop\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\taloop \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p++ ; break ; case A_CAT : sprintf(tmp1, "%d", p++->op); - if (dump) fprintf(stderr,"%d:\ta_cat\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\ta_cat \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); break ; case _CALL: sprintf(tmp1, "%d", p[1].op); - if (dump) fprintf(stderr,"%d:\tcall\t\t%s\t%d\n",minst,((FBLOCK *) p->ptr)->name,line); + if (dump) fprintf(stderr,"%d:\tcall \t\t%s\t%d\n",minst,((FBLOCK *) p->ptr)->name,line); awka_insertop(op, ((FBLOCK *) p->ptr)->name, tmp1, minst, file, line); for (i=0; iptr)->name)) @@ -810,7 +820,7 @@ da(start, fp) (int) (p - start + p[1].op), (int) (p - start + p[2].op), (int) (p - start + p[3].op)); - if (dump) fprintf(stderr,"%d:\trange\t\t%s\t%d\n",minst,tmp1,line); + if (dump) fprintf(stderr,"%d:\trange \t\t%s\t%d\n",minst,tmp1,line); awka_insertop(op, tmp1, NULL, minst, file, line); p += 4; break ; @@ -820,16 +830,17 @@ da(start, fp) struct sc *q = simple_code ; int k = (p - 1)->op ; - while (q->op != _HALT && q->op != k) q++ ; + while (q->op != _HALT && q->op != k) + q++ ; if (q->op == FE_PUSHA) { - if (dump) fprintf(stderr,"%d:\tfe_pusha\t\t\t%d\n",minst,line); + if (dump) fprintf(stderr,"%d:\tfe_pusha \t\t\t%d\n",minst,line); awka_insertop(_FE_PUSHA, NULL, NULL, minst, file, line); } else { - if (dump) fprintf(stderr,"%d:\t%s\t\t\t%d\n",minst,q->name,line); + if (dump) fprintf(stderr,"%d:\t%-10s\t\t\t%d\n",minst,q->name,line); awka_insertop(q->op, NULL, NULL, minst, file, line); } } @@ -862,10 +873,11 @@ find_bi_name(p) { BI_REC *q ; int i ; - static char *tmp = "alength", *tmp2 = "asort"; + static char *tmp = "alength", *tmp2 = "asort", *tmp3 = "length"; if (p == bi_alength) return tmp; if (p == bi_asort) return tmp2; + if (p == bi_length) return tmp3; for (q = bi_funct; q->name; q++) { diff --git a/awka/error.c b/awka/error.c index 025904f..980bdb6 100644 --- a/awka/error.c +++ b/awka/error.c @@ -40,6 +40,7 @@ static void PROTO( rt_where, (void) ) ; static void PROTO( missing, (int, char *, int) ) ; static char *PROTO( type_to_str, (int) ) ; +extern char *awk_input_files ; #ifdef NO_VFPRINTF #define vfprintf simple_vfprintf @@ -100,6 +101,7 @@ PIPE, "|" , DOLLAR, "$" , FIELD, "$" , COPROCESS, "|&" , +LENGTH, string_buff, 0, (char *) 0 } ; /* if paren_cnt >0 and we see one of these, we are missing a ')' */ @@ -147,7 +149,7 @@ void yyerror(s) if ( s ) { if ( paren_cnt ) - for( ip = missing_rparen ; *ip ; ip++) + for ( ip = missing_rparen ; *ip ; ip++) if ( *ip == current_token ) { missing(')', s, token_lineno) ; paren_cnt = 0 ; @@ -155,14 +157,14 @@ void yyerror(s) } if ( brace_cnt ) - for( ip = missing_rbrace ; *ip ; ip++) + for ( ip = missing_rbrace ; *ip ; ip++) if ( *ip == current_token ) { missing('}', s, token_lineno) ; brace_cnt = 0 ; goto done ; } - yylval.ival = s[0]; + yylval.ival = s[0] ; compile_error("syntax error at or near %s", s) ; } @@ -217,53 +219,55 @@ char * char_repeat( int n, char c ) { char * dest = malloc(n+1) ; - + memset(dest, c, n) ; dest[n] = '\0' ; - + return dest ; } char * -get_source_line() +get_source_line() { FILE *fp = NULL ; static int bufferLength = 254 ; char *buffer = malloc( bufferLength + 1) ; register int linecount = token_lineno - 1 ; - buffer[0] = '\0' ; - - if ( !pfile_name ) + /* defaul, includes inline scriptt, that gets overwritten */ + strcpy(buffer, awk_input_files) ; + strcpy(buffer + strlen(awk_input_files), "\n") ; + + if ( !pfile_name ) return (buffer) ; - - if (!(fp = fopen(pfile_name, "r"))) + + if (!(fp = fopen(pfile_name, "r"))) return (buffer) ; - while(fgets(buffer, bufferLength, fp)) { + while (fgets(buffer, bufferLength, fp)) { if ( !linecount-- ) break ; } - + fclose(fp) ; - + return (buffer) ; } void -update_source_pos(char *src) +update_source_pos(char *src) { - char *p = NULL, *end = NULL ; + char *p = NULL, *end = NULL ; char c = (char) yylval.ival ; - int len = strlen(src) ; + int len = strlen(src) ; end = (src + len - 1) ; - if(line_pos >= len) + if (line_pos >= len) return ; - + p = src ; - while(p < end) { + while (p < end) { if (*p == '\t') *p = ' ' ; // so tab treated as one char if (*p++ == c && p > (src + line_pos)) { line_pos = (int) (p - src) ; @@ -274,7 +278,7 @@ update_source_pos(char *src) void compile_error VA_ALIST(char *, format) va_list args ; - char *s0, *s1, *sc, *fill ; + char *s0, *s1, *sc, *fill ; char *lnstr = malloc( 40 ) ; /* with multiple program files put program name in @@ -286,7 +290,7 @@ void compile_error VA_ALIST(char *, format) /* progna: filename: line n: */ sprintf(lnstr, "%s: %s%sline %d: ", progname, s0, s1, token_lineno) ; - + sc = get_source_line() ; update_source_pos(sc) ; @@ -295,15 +299,15 @@ void compile_error VA_ALIST(char *, format) /* point to the above line of the source code */ fill = char_repeat((int) line_pos-1,' ') ; fprintf(stderr, "%s%s^ " , lnstr, fill) ; - + VA_START(args, char *, format) ; vfprintf(stderr, format, args) ; va_end(args) ; - + fprintf(stderr, "\n") ; - + free(sc) ; - free(lnstr) ; + free(lnstr) ; if ( ++compile_error_count == MAX_COMPILE_ERRORS ) exit(2) ; } @@ -359,7 +363,7 @@ void rt_overflow(s, size) void unexpected_char( void ) { - char *s0, *s1, *sc, *fill ; + char *s0, *s1, *sc, *fill ; int c = yylval.ival ; char *lnstr = malloc( 20 ) ; @@ -367,16 +371,20 @@ unexpected_char( void ) { s0 = pfile_name ; s1 = ": " ; } else s0 = s1 = "" ; - sprintf(lnstr, "line %d: ",token_lineno) ; + sprintf(lnstr, "%s: %s%sline %d: ",progname, s0, s1, token_lineno) ; sc = get_source_line() ; - fprintf(stderr, "%s: %s%s%s%s", progname, s0, s1, lnstr, sc) ; - free(sc) ; + if (sc) + fprintf(stderr, "%s%s", lnstr, sc) ; /* point to error location then show the error message */ fill = char_repeat((int) line_pos-1,' ') ; - fprintf(stderr, "%s: %s%s%s%s^ ", progname, s0, s1, lnstr, fill) ; + if (sc) + fprintf(stderr, "%s%s^ ", lnstr, fill) ; + else + fprintf(stderr, "%s ", lnstr) ; + free(sc) ; free(fill) ; free(lnstr) ; @@ -390,7 +398,7 @@ static char *type_to_str( type ) int type ; { char *retval ; - switch( type ) + switch ( type ) { case ST_VAR : retval = "variable" ; break ; case ST_ARRAY : retval = "array" ; break ; @@ -398,6 +406,7 @@ static char *type_to_str( type ) case ST_LOCAL_VAR : retval = "local variable" ; break ; case ST_LOCAL_ARRAY : retval = "local array" ; break ; case ST_BUILTIN : retval = "builtin function (used as a variable)" ; break ; + case ST_LENGTH : retval = "length function" ; break ; default : bozo("type_to_str") ; } @@ -451,7 +460,7 @@ int simple_vfprintf( fp, format, argp) *t = *q++ ; t[1] = 0 ; - switch( *t ) + switch ( *t ) { case 'c' : case 'd' : diff --git a/awka/fcall.c b/awka/fcall.c index b7c6dd6..4e705e8 100644 --- a/awka/fcall.c +++ b/awka/fcall.c @@ -150,11 +150,15 @@ call_arg_check(callee, entry_list, start, line_no) } else /* type known */ { - if (callee->typev[q->arg_num] == ST_LOCAL_NONE) - callee->typev[q->arg_num] = q->type ; - else if (q->type != callee->typev[q->arg_num]) - compile_error("type error in arg(%d) in call to %s", + if (q->arg_num > 0) + { + if (callee->typev[q->arg_num] == ST_LOCAL_NONE) + callee->typev[q->arg_num] = q->type ; + else if (q->type != callee->typev[q->arg_num]) + compile_error("type error in arg(%d) in call to %s.", q->arg_num + 1, callee->name) ; + } + /* else length (with no parametersi) */ ZFREE(q) ; check_progress = 1 ; diff --git a/awka/field.c b/awka/field.c index be0b757..3360527 100644 --- a/awka/field.c +++ b/awka/field.c @@ -185,7 +185,9 @@ build_field0() cp_limit = cp + FBANK_SZ ; } /* add the separator */ - q = ofs->str ; while( *q ) *p++ = *q++ ; + q = ofs->str ; + while ( *q ) + *p++ = *q++ ; } /* tack tail on the end */ memcpy(p, tail->str, tail->len) ; diff --git a/awka/init.c b/awka/init.c index 253bdff..001f26c 100644 --- a/awka/init.c +++ b/awka/init.c @@ -41,28 +41,33 @@ #include "bi_vars.h" #include "field.h" -static void PROTO(process_cmdline, (int, char **)) ; +static void PROTO(_process_cmdline, (int, char **)) ; static void PROTO(set_ARGV, (int, char **, int)) ; -static void PROTO(bad_option, (char *)) ; -static void PROTO(no_program, (void)) ; +static void PROTO(_bad_option, (char *)) ; +static void PROTO(_no_program, (void)) ; extern void PROTO(print_version, (void)) ; -extern int PROTO(is_cmdline_assign, (char *)) ; +extern int PROTO(is_cmdline_assign, (char *)) ; -extern int awka_main; -extern char *awka_main_func; +extern int awka_main ; +extern char *awka_main_func ; +extern char *int_argv ; -char *progname, *uoutfile = NULL ; -extern char *int_argv; +static char *quote_escape(char *) ; + +PFILE dummy ; /* starts linked list of filenames */ + +char *progname, *uoutfile = NULL ; short interactive_flag = 0 ; -char awka_exe = FALSE, awka_comp = FALSE; -char awka_tmp = FALSE; -char awka_comp_debug = FALSE, awka_comp_static = FALSE; -int exe_argc = 0; -char **exe_argv = NULL; -char **incfile = NULL, **incdir = NULL, **libfile = NULL, **libdir = NULL; -int incf_allc = 0, incf_used = 0, incd_allc = 0, incd_used = 0, libf_allc = 0, libf_used = 0, libd_allc = 0, libd_used = 0; -int dump = 0, warning_msg = 0; +char awka_exe = FALSE, awka_comp = FALSE ; +char awka_tmp = FALSE ; +char awka_comp_debug = FALSE, awka_comp_static = FALSE ; +int exe_argc = 0 ; +char **exe_argv = NULL ; +char **incfile = NULL, **incdir = NULL, **libfile = NULL, **libdir = NULL ; +int incf_allc = 0, incf_used = 0, incd_allc = 0, incd_used = 0, libf_allc = 0, libf_used = 0, libd_allc = 0, libd_used = 0 ; +int dump = 0, warning_msg = 0 ; +char *awk_input_files = NULL ; /* used for version reporting */ #ifndef SET_PROGNAME #define SET_PROGNAME() \ @@ -82,7 +87,7 @@ int argc ; char **argv ; kw_init() ; /* load the keywords */ field_init() ; - process_cmdline(argc, argv) ; + _process_cmdline(argc, argv) ; code_init() ; } @@ -94,41 +99,375 @@ short posix_space_flag ; int dump_RE ; /* if on dump compiled REs */ #endif +static void +_process_help_message() +{ + fprintf(stderr,"\nusage: awka [-c fn] [-X] [-x -t] [-w flags] [-f filename] program_string [--] [exe-args]\n") ; + fprintf(stderr," awka [-h] [-v]\n\n") ; + fprintf(stderr," -f AWK Program file(s)\n") ; + fprintf(stderr," -c fn Awka will generate a 'fn' function rather\n") ; + fprintf(stderr," than a main function\n") ; + fprintf(stderr," -x Translates, compiles and executes the program,\n") ; +#ifdef __CYGWIN32__ + fprintf(stderr," and will produce the awka-app.exe file\n") ; +#else + fprintf(stderr," and will produce the awka-app.out file\n") ; +#endif + fprintf(stderr," in the current directory.\n") ; + fprintf(stderr," -t If -x is specified, the temporary C and executable\n") ; + fprintf(stderr," files will be deleted following execution.\n") ; + fprintf(stderr," -X Translates, compiles (not execute) the program, and leaves\n") ; +#ifdef __CYGWIN32__ + fprintf(stderr," the 'awka-app.exe' executable file in the current directory.\n") ; +#else + fprintf(stderr," the 'awka-app.out' executable file in the current directory.\n") ; +#endif + fprintf(stderr," -o fil If -x used, this will create an executable called 'fil'\n") ; +#ifdef __CYGWIN32__ + fprintf(stderr," instead of the default 'awka_out.exe'\n") ; +#else + fprintf(stderr," instead of the default 'awka.out'\n") ; + fprintf(stderr,"\n") ; + fprintf(stderr," -I dir Compiler include directory.\n") ; + fprintf(stderr," -i fil Compiler include file.\n") ; + fprintf(stderr," -L dir Compiler link library directory.\n") ; + fprintf(stderr," -l fil Compiler link library file.\n") ; + fprintf(stderr," -s Statically link libawka (default is dynamic)\n") ; + //fprintf(stderr," -D Dump extra information then exit\n") ; + fprintf(stderr,"\n") ; +#endif + fprintf(stderr," -- If -x specified, all arguments after this point\n") ; + fprintf(stderr," will be passed to the compiled executable.\n") ; + fprintf(stderr," -a str The executable command-line arguments in 'str' will\n") ; + fprintf(stderr," be hard-coded in the translated C output.\n") ; + fprintf(stderr," -w flg Prints various warnings to stderr, useful in debugging\n") ; + fprintf(stderr," large, complex programs. The argument can contain the\n") ; + fprintf(stderr," following characters:-\n") ; + fprintf(stderr," 'a' print a list of all global variables & their usage\n") ; + fprintf(stderr," 'b' warn about variables set but not referenced.\n") ; + fprintf(stderr," 'c' warn about variables referenced but not set.\n") ; + fprintf(stderr," 'd' report global vars used in any function.\n") ; + fprintf(stderr," 'e' report global vars used in just one function.\n") ; + fprintf(stderr," 'f' require global variables to be listed in a VDECL comment\n") ; + fprintf(stderr," 'g' warn about assignments used as truth expressions\n") ; + fprintf(stderr," -v Prints version information\n\n") ; + exit(0) ; +} + + +static void +_bad_option( + char *s) +{ + errmsg(0, "not an option: %s", s) ; + exit(EXIT_ERR_BAD) ; +} static void -bad_option(s) - char *s ; +_no_program() { - errmsg(0, "not an option: %s", s) ; exit(2) ; + exit(EXIT_ERR_NO) ; +} + +static void +_add_input_filename( + char *fn) +{ + if (!*awk_input_files) + sprintf(awk_input_files, "%s", fn) ; + else + sprintf(awk_input_files, "%s %s", awk_input_files, fn) ; +} + +static void +_add_pfile( + char *fn) +{ + register PFILE *pf, *tpf ; + + pf = (PFILE *) ZMALLOC(PFILE) ; + pf->fname = fn ; + pf->link = (PFILE *) 0 ; + + tpf = &dummy ; + while (tpf->link) { + tpf = tpf->link ; + } + tpf->link = pf ; +} + +static void +_process_scan_init( + char *awk_input_files, + char *awk_input_text) +{ + char *p = NULL ; + + /* scan each file and inline awk text */ + pfile_list = dummy.link ; + + if (*awk_input_text) + { /* process any inline scripts */ + + /* add tp filename list for awka version reporting */ + _add_input_filename(p = quote_escape(awk_input_text)) ; + free(p) ; + scan_init(awk_input_text) ; + + } else { + /* files only */ + pfile_name = NULL ; + scan_init((char *) 0) ; + } } +/* + * _process_cmdline_dsh + * + * handles choices once a - has been identified + * + * cases with no break exit the program + * + */ static void -no_program() +_process_cmdline_dash( + int *argc, char **argv, + int *i, int *j, int *nextarg, + char *optarg, + char *awk_input_text) { - exit(0) ; + char *p = NULL ; + + switch (argv[*i][*j]) + { + case 'v': + print_version() ; + + case 'f': + /* first file goes in pfile_name ; any more go + on a list */ + optarg = argv[++(*i)] ; + if (!pfile_name) + pfile_name = optarg ; + + /* process the files after all names are collected */ + _add_input_filename(optarg) ; + _add_pfile(optarg) ; + break ; + + case 'c': + awka_main = 1 ; + awka_exe = awka_comp = awka_tmp = FALSE ; + + if (argv[*i+1][0] == '-') + { + fprintf(stderr,"Command Line Error: Expecting function-name after -c argument.\n") ; + exit(EXIT_ERR_c) ; + } + + awka_main_func = argv[*i+1] ; + break ; + + case 'w': /* warning messages */ + if (argv[++(*i)][0] == '-') + { + fprintf(stderr,"Command Line Error: Expecting message flags 'abcdefg' after -w argument.\n") ; + exit(EXIT_ERR_w) ; + } + + for (p=argv[*i]; *p; p++) + { + switch (*p) + { + case 'a': + warning_msg |= MSG_LIST; break ; + case 'b': + warning_msg |= MSG_SETnREF; break ; + case 'c': + warning_msg |= MSG_REFnSET; break ; + case 'd': + warning_msg |= MSG_GLOBinFUNC; break ; + case 'e': + warning_msg |= MSG_GLOBoinFUNC; break ; + case 'f': + warning_msg |= MSG_VARDECLARE; break ; + case 'g': + warning_msg |= MSG_ASGNasTRUTH; break ; + } + } + break ; + + case 'i': /* include file */ + if (!incf_allc) + { + incf_allc = 8 ; + incfile = (char **) malloc( incf_allc * sizeof(char *) ) ; + } + else if (incf_used == incf_allc) + { + incf_allc *= 2 ; + incfile = (char **) realloc( incfile, incf_allc * sizeof(char *) ) ; + } + + incfile[incf_used] = (char *) malloc( strlen(argv[++(*i)])+1 ) ; + strcpy(incfile[incf_used++], argv[*i]) ; + break ; + + case 'I': /* include directory */ + if (!incd_allc) + { + incd_allc = 8 ; + incdir = (char **) malloc( incd_allc * sizeof(char *) ) ; + } + else if (incd_used == incd_allc) + { + incd_allc *= 2 ; + incdir = (char **) realloc( incdir, incd_allc * sizeof(char *) ) ; + } + + incdir[incd_used] = (char *) malloc( strlen(argv[++(*i)])+1 ) ; + strcpy(incdir[incd_used++], argv[*i]) ; + break ; + + case 'l': /* library */ + if (!libf_allc) + { + libf_allc = 8 ; + libfile = (char **) malloc( libf_allc * sizeof(char *) ) ; + } + else if (libf_used == libf_allc) + { + libf_allc *= 2 ; + libfile = (char **) realloc( libfile, libf_allc * sizeof(char *) ) ; + } + + libfile[libf_used] = (char *) malloc( strlen(argv[++(*i)])+1 ) ; + strcpy(libfile[libf_used++], argv[*i]) ; + break ; + + case 'L': /* library directory */ + if (!libd_allc) + { + libd_allc = 8 ; + libdir = (char **) malloc( libd_allc * sizeof(char *) ) ; + } + else if (libd_used == libd_allc) + { + libd_allc *= 2 ; + libdir = (char **) realloc( libdir, libd_allc * sizeof(char *) ) ; + } + + libdir[libd_used] = (char *) malloc( strlen(argv[++(*i)])+1 ) ; + strcpy(libdir[libd_used++], argv[*i]) ; + break ; + + case 's': // -s | -static + awka_comp_static = TRUE ; + break ; + + case 'X': + awka_comp = TRUE ; + awka_exe = FALSE ; + awka_main = FALSE ; + break ; + + case 'x': + awka_comp = FALSE ; + awka_exe = TRUE ; + awka_main = FALSE ; + break ; + + case 't': + awka_tmp = TRUE ; + break ; + + case 'D': + dump = TRUE ; + break ; + + case 'a': + if (++(*i) >= *argc) + { + fprintf(stderr,"Command Line Error: Expecting filename after -a argument.\n") ; + exit(EXIT_ERR_a) ; + } + + int_argv = (char *) malloc(strlen(argv[*i])+1) ; + strcpy(int_argv, argv[*i]) ; + break ; + + case 'o': + if (++(*i) >= *argc) + { + fprintf(stderr,"Command Line Error: Expecting filename after -o argument.\n") ; + exit(EXIT_ERR_o) ; + } + + uoutfile = (char *) malloc(strlen(argv[*i])+1) ; + strcpy(uoutfile, argv[*i]) ; + break ; + + case 'u': + case 'h': + _process_help_message() ; + + default: + _bad_option(argv[*i]) ; + + } /* switch */ + + *nextarg = ++(*i) ; } static void -process_cmdline(argc, argv) +_process_cmdline(argc, argv) int argc ; char **argv ; { int i, j, nextarg ; - char *optarg, *p ; - PFILE dummy ; /* starts linked list of filenames */ - PFILE *tail = &dummy ; + char *optarg, *p, *tptr, *awk_input_text ; + dummy.link = (PFILE *) 0 ; - for (i = 1; i < argc && argv[i][0] == '-'; i = nextarg) + awk_input_files = (char *) malloc(2048) ; + awk_input_files[0] = '\0' ; + awk_input_text = (char *) malloc(1024) ; + awk_input_text[0] = '\0' ; + + for (i = 1; i < argc ; i = nextarg) { - if (argv[i][1] == 0) /* - alone */ + if (argv[i][0] == '-' && argv[i][1] == 0) /* - alone (read from stdin) */ { - if (!pfile_name) no_program() ; - break ; /* the for loop */ + //if (!pfile_name) _no_program() ; + _add_input_filename(argv[i]) ; + _add_pfile(argv[i]) ; + + nextarg = ++i ; + continue ; + } + if (argv[i][0] != '-') /* inline script */ + { + /* if ends in ".awk" then is missing the -f */ + if (strcmp(argv[i] + strlen(argv[i]) - 4, ".awk") == 0) + { + errmsg(0, "expected a quoted inline script, or -f %s.", argv[i]) ; + exit(EXIT_ERR_NOf) ; + } + + if (!*awk_input_text) + sprintf(awk_input_text, "%s", argv[i]) ; + else + sprintf(awk_input_text, "%s %s", awk_input_text, argv[i]) ; + + nextarg = i + 1 ; + if (i >= argc) + goto no_more_opts ; + + continue ; } /* safe to look at argv[i][2] */ - j = 1; - if (argv[i][j] == '-' && argv[i][0] == '-') j++; + j = 1 ; + if (argv[i][j] == '-' && argv[i][0] == '-') j++ ; if (argv[i][j+1] == 0) { @@ -140,13 +479,13 @@ process_cmdline(argc, argv) if (strchr("IiLlaocfxwt-", argv[i][j])) { errmsg(0, "option %s lacks argument", argv[i]) ; - exit(2) ; + exit(EXIT_ERR_MISS) ; } - bad_option(argv[i]) ; + _bad_option(argv[i]) ; } else if (strchr("-DxtXs", argv[i][j])) { - nextarg = i + 1; + nextarg = i + 1 ; } else { @@ -158,282 +497,53 @@ process_cmdline(argc, argv) { if (!awka_exe) { - fprintf(stderr,"Need a \"-x\" argument for \"--\" to make any sense.\n"); - exit(0); + fprintf(stderr,"Need a \"-x\" argument for \"--\" to make any sense.\n") ; + exit(EXIT_ERR_NOx) ; } - if (pfile_name) - scan_init((char *) 0); - else - { - if (i == 0) no_program() ; - scan_init(argv[i-1]) ; - } - goto exe_opts; + if (i == 0) _no_program() ; + + goto exe_opts ; } else /* argument glued to option mb */ { if (argv[i][j-1] == '-') { optarg = &argv[i][j] ; + nextarg = i + 1 ; + if (argv[i][j] != 'h' && argv[i][j] != 'v' && argv[i][j] != 'u') - j++; + j++ ; } else { optarg = &argv[i][j] ; + nextarg = i + 1 ; } } - switch (argv[i][j]) - { - case 'v': - print_version() ; - break ; - - case 'f': - /* first file goes in pfile_name ; any more go - on a list */ - if (!pfile_name) pfile_name = optarg ; - else - { - tail = tail->link = ZMALLOC(PFILE) ; - tail->fname = optarg ; - } - break ; - - case 'c': - awka_main = 1; - awka_exe = awka_comp = awka_tmp = FALSE; - if (argv[i+1][0] == '-') - { - fprintf(stderr,"Command Line Error: Expecting function-name after -c argument.\n"); - exit(1); - } - awka_main_func = argv[i+1]; - break; - - case 'w': /* warning messages */ - if (argv[i+1][0] == '-') - { - fprintf(stderr,"Command Line Error: Expecting message flags 'abcdefg' after -w argument.\n"); - exit(1); - } - for (p=argv[i+1]; *p; p++) - { - switch (*p) { - case 'a': - warning_msg |= MSG_LIST; break; - case 'b': - warning_msg |= MSG_SETnREF; break; - case 'c': - warning_msg |= MSG_REFnSET; break; - case 'd': - warning_msg |= MSG_GLOBinFUNC; break; - case 'e': - warning_msg |= MSG_GLOBoinFUNC; break; - case 'f': - warning_msg |= MSG_VARDECLARE; break; - case 'g': - warning_msg |= MSG_ASGNasTRUTH; break; - } - } - break; - - case 'i': /* include file */ - if (!incf_allc) - { - incf_allc = 8; - incfile = (char **) malloc( incf_allc * sizeof(char *) ); - } - else if (incf_used == incf_allc) - { - incf_allc *= 2; - incfile = (char **) realloc( incfile, incf_allc * sizeof(char *) ); - } - - incfile[incf_used] = (char *) malloc( strlen(argv[++i])+1 ); - strcpy(incfile[incf_used++], argv[i]); - break; - - case 'I': /* include directory */ - if (!incd_allc) - { - incd_allc = 8; - incdir = (char **) malloc( incd_allc * sizeof(char *) ); - } - else if (incd_used == incd_allc) - { - incd_allc *= 2; - incdir = (char **) realloc( incdir, incd_allc * sizeof(char *) ); - } - - incdir[incd_used] = (char *) malloc( strlen(argv[++i])+1 ); - strcpy(incdir[incd_used++], argv[i]); - break; - - case 'l': /* library */ - if (!libf_allc) - { - libf_allc = 8; - libfile = (char **) malloc( libf_allc * sizeof(char *) ); - } - else if (libf_used == libf_allc) - { - libf_allc *= 2; - libfile = (char **) realloc( libfile, libf_allc * sizeof(char *) ); - } - - libfile[libf_used] = (char *) malloc( strlen(argv[++i])+1 ); - strcpy(libfile[libf_used++], argv[i]); - break; - - case 'L': /* library directory */ - if (!libd_allc) - { - libd_allc = 8; - libdir = (char **) malloc( libd_allc * sizeof(char *) ); - } - else if (libd_used == libd_allc) - { - libd_allc *= 2; - libdir = (char **) realloc( libdir, libd_allc * sizeof(char *) ); - } - - libdir[libd_used] = (char *) malloc( strlen(argv[++i])+1 ); - strcpy(libdir[libd_used++], argv[i]); - break; - - case 's': // -s | -static - awka_comp_static = TRUE; - break; - - case 'X': - awka_comp = TRUE; - awka_exe = FALSE; - awka_main = FALSE; - break; - - case 'x': - awka_comp = FALSE; - awka_exe = TRUE; - awka_main = FALSE; - break; - - case 't': - awka_tmp = TRUE; - break; - - case 'D': - dump = TRUE; - break; + _process_cmdline_dash( &argc, argv, &i, &j, &nextarg, + optarg, awk_input_text) ; - case 'a': - if (++i >= argc) - { - fprintf(stderr,"Command Line Error: Expecting filename after -a argument.\n"); - exit(1); - } - int_argv = (char *) malloc(strlen(argv[i])+1); - strcpy(int_argv, argv[i]); - break; - - case 'o': - if (++i >= argc) - { - fprintf(stderr,"Command Line Error: Expecting filename after -o argument.\n"); - exit(1); - } - uoutfile = (char *) malloc(strlen(argv[i])+1); - strcpy(uoutfile, argv[i]); - break; - - case 'u': - case 'h': - fprintf(stderr,"\nusage: awka [-c fn] [-X] [-x -t] [-w flags] [-f filename] program_string [--] [exe-args]\n"); - fprintf(stderr," awka [-h] [-v]\n\n"); - fprintf(stderr," -f AWK Program file(s)\n"); - fprintf(stderr," -c fn Awka will generate a 'fn' function rather\n"); - fprintf(stderr," than a main function\n"); - fprintf(stderr," -x Translates, compiles and executes the program,\n"); -#ifdef __CYGWIN32__ - fprintf(stderr," and will produce the awka-app.exe file\n"); -#else - fprintf(stderr," and will produce the awka-app.out file\n"); -#endif - fprintf(stderr," in the current directory.\n"); - fprintf(stderr," -t If -x is specified, the temporary C and executable\n"); - fprintf(stderr," files will be deleted following execution.\n"); - fprintf(stderr," -X Translates, compiles (not execute) the program, and leaves\n"); -#ifdef __CYGWIN32__ - fprintf(stderr," the 'awka-app.exe' executable file in the current directory.\n"); -#else - fprintf(stderr," the 'awka-app.out' executable file in the current directory.\n"); -#endif - fprintf(stderr," -o fil If -x used, this will create an executable called 'fil'\n"); -#ifdef __CYGWIN32__ - fprintf(stderr," instead of the default 'awka_out.exe'\n"); -#else - fprintf(stderr," instead of the default 'awka.out'\n"); - fprintf(stderr,"\n"); - fprintf(stderr," -I dir Compiler include directory.\n"); - fprintf(stderr," -i fil Compiler include file.\n"); - fprintf(stderr," -L dir Compiler link library directory.\n"); - fprintf(stderr," -l fil Compiler link library file.\n"); - fprintf(stderr," -s Statically link libawka (default is dynamic)\n"); - //fprintf(stderr," -D Dump extra information then exit\n"); - fprintf(stderr,"\n"); -#endif - fprintf(stderr," -- If -x specified, all arguments after this point\n"); - fprintf(stderr," will be passed to the compiled executable.\n"); - fprintf(stderr," -a str The executable command-line arguments in 'str' will\n"); - fprintf(stderr," be hard-coded in the translated C output.\n"); - fprintf(stderr," -w flg Prints various warnings to stderr, useful in debugging\n"); - fprintf(stderr," large, complex programs. The argument can contain the\n"); - fprintf(stderr," following characters:-\n"); - fprintf(stderr," 'a' print a list of all global variables & their usage\n"); - fprintf(stderr," 'b' warn about variables set but not referenced.\n"); - fprintf(stderr," 'c' warn about variables referenced but not set.\n"); - fprintf(stderr," 'd' report global vars used in any function.\n"); - fprintf(stderr," 'e' report global vars used in just one function.\n"); - fprintf(stderr," 'f' require global variables to be listed in a VDECL comment\n"); - fprintf(stderr," 'g' warn about assignments used as truth expressions\n"); - fprintf(stderr," -v Prints version information\n\n"); - exit(0); - - default: - bad_option(argv[i]) ; - } } no_more_opts: - - tail->link = (PFILE *) 0 ; - pfile_list = dummy.link ; - - if (pfile_name) - scan_init((char *) 0) ; - else /* program on command line */ - { - if (i == argc) no_program() ; - scan_init(argv[i]) ; -/* #endif */ - } - i++; + _process_scan_init(awk_input_files, awk_input_text) ; + i++ ; exe_opts: /* if (i < argc-1 && !strcmp(argv[i+1], "--")) */ if (i < argc-1 && !strcmp(argv[i], "--")) { /* i += 2; */ - i++; - exe_argc = argc - i; - exe_argv = (char **) malloc(exe_argc * sizeof(char *)); + i++ ; + exe_argc = argc - i ; + exe_argv = (char **) malloc(exe_argc * sizeof(char *)) ; for (j=0; ilink ; diff --git a/awka/parse.c b/awka/parse.c index 9be2659..016af13 100644 --- a/awka/parse.c +++ b/awka/parse.c @@ -47,7 +47,7 @@ static int scope ; static FBLOCK *active_funct ; /* when scope is SCOPE_FUNCT */ -#define code_address(x) if( is_local(x) ) \ +#define code_address(x) if ( is_local(x) ) \ code2op(L_PUSHA, (x)->offset) ;\ else code2(_PUSHA, (x)->stval.cp) @@ -169,53 +169,54 @@ extern int YYPARSE_DECL(); #define FUNCT_ID 310 #define BUILTIN 311 #define LENGTH 312 -#define PRINT 313 -#define PRINTF 314 -#define SPLIT 315 -#define MATCH_FUNC 316 -#define SUB 317 -#define GSUB 318 -#define GENSUB 319 -#define ALENGTH_FUNC 320 -#define ASORT_FUNC 321 -#define DO 322 -#define WHILE 323 -#define FOR 324 -#define BREAK 325 -#define CONTINUE 326 -#define IF 327 -#define ELSE 328 -#define DELETE 329 -#define a_BEGIN 330 -#define a_END 331 -#define EXIT 332 -#define ABORT 333 -#define NEXT 334 -#define NEXTFILE 335 -#define RETURN 336 -#define FUNCTION 337 +#define LENGTH0 313 +#define PRINT 314 +#define PRINTF 315 +#define SPLIT 316 +#define MATCH_FUNC 317 +#define SUB 318 +#define GSUB 319 +#define GENSUB 320 +#define ALENGTH_FUNC 321 +#define ASORT_FUNC 322 +#define DO 323 +#define WHILE 324 +#define FOR 325 +#define BREAK 326 +#define CONTINUE 327 +#define IF 328 +#define ELSE 329 +#define DELETE 330 +#define a_BEGIN 331 +#define a_END 332 +#define EXIT 333 +#define ABORT 334 +#define NEXT 335 +#define NEXTFILE 336 +#define RETURN 337 +#define FUNCTION 338 #define YYERRCODE 256 typedef short YYINT; static const YYINT yylhs[] = { -1, - 0, 0, 38, 38, 38, 39, 42, 39, 43, 39, - 44, 39, 45, 46, 39, 1, 1, 2, 2, 3, + 0, 0, 39, 39, 39, 40, 43, 40, 44, 40, + 45, 40, 46, 47, 40, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 47, 47, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 48, 13, 49, - 13, 50, 51, 13, 14, 14, 15, 15, 15, 15, + 48, 48, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 49, 13, 50, + 13, 51, 52, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 10, 10, 26, 26, 27, - 27, 8, 8, 5, 4, 28, 28, 6, 6, 6, - 7, 7, 52, 52, 52, 17, 4, 53, 4, 54, - 4, 16, 4, 4, 18, 18, 19, 19, 55, 55, - 13, 13, 10, 15, 15, 4, 4, 20, 4, 11, - 11, 11, 11, 11, 15, 13, 13, 13, 13, 13, - 13, 13, 15, 22, 56, 56, 15, 15, 15, 15, - 15, 23, 4, 4, 4, 4, 21, 21, 15, 15, - 15, 15, 15, 15, 15, 57, 12, 12, 9, 9, - 15, 30, 15, 29, 29, 24, 24, 25, 25, 40, - 31, 32, 32, 36, 36, 37, 37, 41, 15, 33, - 33, 34, 34, 34, 35, 35, + 27, 28, 8, 8, 8, 5, 4, 29, 29, 6, + 6, 6, 7, 7, 53, 53, 53, 17, 4, 54, + 4, 55, 4, 16, 4, 4, 18, 18, 19, 19, + 56, 56, 13, 13, 10, 15, 15, 4, 4, 20, + 4, 11, 11, 11, 11, 11, 15, 13, 13, 13, + 13, 13, 13, 13, 15, 22, 57, 57, 15, 15, + 15, 15, 15, 23, 4, 4, 4, 4, 21, 21, + 15, 15, 15, 15, 15, 15, 15, 58, 12, 12, + 9, 9, 15, 31, 15, 30, 30, 24, 24, 25, + 25, 41, 32, 33, 33, 37, 37, 38, 38, 42, + 15, 34, 34, 35, 35, 35, 36, 36, }; static const YYINT yylen[] = { 2, 1, 2, 1, 1, 2, 1, 0, 3, 0, 3, @@ -226,837 +227,858 @@ static const YYINT yylen[] = { 2, 4, 0, 0, 7, 1, 2, 1, 1, 1, 3, 1, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 2, 2, 2, 2, 1, 5, 0, 1, 1, - 3, 5, 1, 0, 5, 1, 1, 1, 3, 2, - 3, 3, 0, 2, 2, 4, 2, 1, 4, 1, - 7, 4, 2, 4, 3, 4, 1, 2, 1, 2, - 3, 5, 5, 5, 6, 7, 3, 6, 2, 1, - 2, 6, 2, 3, 1, 3, 3, 3, 3, 3, - 3, 3, 2, 5, 1, 3, 4, 5, 7, 8, - 6, 1, 2, 3, 2, 3, 2, 3, 1, 2, - 2, 3, 4, 3, 4, 1, 1, 1, 2, 3, - 8, 1, 6, 1, 1, 1, 3, 1, 3, 2, - 4, 2, 2, 0, 1, 1, 3, 1, 3, 2, - 2, 1, 3, 3, 2, 2, + 3, 1, 5, 5, 1, 0, 5, 1, 1, 1, + 3, 2, 3, 3, 0, 2, 2, 4, 2, 1, + 4, 1, 7, 4, 2, 4, 3, 4, 1, 2, + 1, 2, 3, 5, 5, 5, 6, 7, 3, 6, + 2, 1, 2, 6, 2, 3, 1, 3, 3, 3, + 3, 3, 3, 3, 2, 5, 1, 3, 4, 5, + 7, 8, 6, 1, 2, 3, 2, 3, 2, 3, + 1, 2, 2, 3, 4, 3, 4, 1, 1, 1, + 2, 3, 8, 1, 6, 1, 1, 1, 3, 1, + 3, 2, 4, 2, 2, 0, 1, 1, 3, 1, + 3, 2, 2, 1, 3, 3, 2, 2, }; static const YYINT yydefred[] = { 0, - 178, 0, 156, 0, 0, 0, 0, 0, 120, 0, - 57, 58, 61, 0, 84, 84, 83, 0, 0, 164, - 165, 162, 0, 84, 7, 9, 0, 0, 6, 71, + 180, 0, 158, 0, 0, 0, 0, 0, 122, 0, + 57, 58, 61, 0, 86, 86, 86, 85, 0, 0, + 166, 167, 164, 0, 86, 7, 9, 0, 0, 6, + 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 3, 4, 0, 0, 0, 31, 32, + 88, 89, 102, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 22, 0, 20, 0, 0, 0, + 0, 0, 28, 86, 24, 0, 0, 0, 86, 0, + 0, 0, 0, 0, 0, 86, 73, 75, 0, 125, + 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 174, 175, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 3, 4, 0, 0, 0, 31, 32, 86, - 87, 100, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 22, 0, 20, 0, 0, 0, 0, - 0, 28, 84, 24, 0, 0, 0, 84, 0, 0, - 0, 0, 0, 0, 84, 73, 75, 0, 123, 0, - 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 172, 173, 2, 0, 0, 0, 0, 0, + 0, 0, 74, 13, 52, 48, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 74, 13, 52, 48, 50, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 137, 135, 0, 0, + 172, 0, 5, 161, 159, 160, 0, 17, 25, 0, + 0, 26, 27, 0, 0, 0, 145, 0, 147, 29, + 30, 0, 149, 0, 16, 21, 23, 105, 0, 109, + 0, 0, 121, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 126, 0, 60, 0, 0, 181, + 0, 0, 0, 0, 0, 0, 0, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 135, 133, 0, 0, 170, 0, - 5, 159, 157, 158, 0, 17, 25, 0, 0, 26, - 27, 0, 0, 0, 143, 0, 145, 29, 30, 0, - 147, 0, 16, 21, 23, 103, 0, 107, 0, 0, - 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 124, 0, 60, 0, 0, 179, 0, 0, - 0, 0, 0, 0, 8, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 113, 0, 41, + 42, 43, 44, 45, 46, 18, 12, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 111, 0, 41, 42, 43, 44, - 45, 46, 18, 12, 19, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 176, 0, 0, - 160, 0, 105, 0, 0, 0, 0, 117, 144, 146, - 148, 98, 0, 108, 109, 0, 0, 0, 0, 0, - 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 180, 0, 0, 181, 0, 0, 0, 137, - 0, 0, 0, 0, 0, 155, 153, 136, 0, 0, - 171, 0, 102, 0, 106, 96, 0, 99, 110, 104, - 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 112, 0, 184, 186, 183, 185, 0, 134, - 0, 0, 138, 0, 53, 0, 0, 177, 0, 0, - 0, 0, 0, 85, 0, 0, 0, 82, 113, 77, - 122, 115, 0, 141, 0, 15, 0, 0, 166, 163, - 0, 118, 0, 0, 0, 139, 0, 0, 0, 116, - 101, 140, 167, 0, 168, 161, 0, 169, + 178, 0, 0, 162, 0, 107, 0, 0, 0, 0, + 119, 146, 148, 150, 100, 0, 110, 111, 0, 0, + 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 182, 0, 0, 183, 0, + 0, 0, 0, 0, 139, 0, 0, 0, 0, 0, + 157, 155, 138, 0, 0, 173, 0, 104, 0, 108, + 98, 0, 101, 112, 106, 92, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 114, 0, 186, + 188, 185, 187, 0, 84, 136, 0, 0, 140, 0, + 53, 0, 0, 179, 0, 0, 0, 0, 0, 87, + 0, 0, 0, 83, 115, 77, 124, 117, 0, 143, + 0, 15, 0, 0, 168, 165, 0, 120, 0, 0, + 0, 141, 0, 0, 0, 118, 103, 142, 169, 0, + 170, 163, 0, 171, }; -static const YYINT yydgoto[] = { 28, - 64, 234, 65, 66, 94, 269, 90, 30, 31, 32, - 33, 155, 270, 35, 36, 68, 69, 70, 180, 71, - 72, 37, 246, 360, 376, 271, 272, 73, 38, 39, - 40, 41, 198, 199, 286, 249, 250, 42, 43, 44, - 45, 101, 102, 134, 221, 334, 74, 223, 224, 222, - 357, 315, 263, 75, 267, 146, 46, +static const YYINT yydgoto[] = { 29, + 65, 237, 66, 67, 95, 272, 91, 31, 32, 33, + 34, 157, 273, 36, 37, 69, 70, 71, 182, 72, + 73, 38, 249, 366, 382, 274, 275, 292, 74, 39, + 40, 41, 42, 200, 201, 289, 252, 253, 43, 44, + 45, 46, 103, 104, 136, 224, 340, 75, 226, 227, + 225, 363, 320, 266, 76, 270, 148, 47, }; -static const YYINT yysindex[] = { 83, - 0, 354, 0, 2652, 2652, 2652, -57, 2550, 0, 2686, - 0, 0, 0, -272, 0, 0, 0, -262, -260, 0, - 0, 0, -258, 0, 0, 0, -270, 83, 0, 0, - 2652, -143, 2390, 2981, 2652, 339, -252, -254, -247, -228, - -225, 0, 0, 0, -228, -103, -159, 0, 0, 0, - 0, 0, -222, -217, -150, -150, -213, -224, 2061, 2061, - -150, -150, 2061, 0, 192, 0, 2931, 435, 435, 2158, - 435, 0, 0, 0, 435, 2686, -272, 0, -203, -148, - -148, -148, -132, 0, 0, 0, 0, 0, 0, -233, - 2543, 1, 0, -164, -188, -166, 2686, 2686, -204, -151, - -228, -228, 0, 0, 0, -193, 2686, 2686, 2686, 2686, - 2686, 2686, 2686, 2686, 2686, 2686, 2686, 2686, 2686, 2686, - 0, 0, 0, 0, 0, -154, 2686, 2686, 2686, 2686, - 2686, 2686, 2686, -58, 339, 2652, 2652, 2652, 2652, 2652, - -116, -97, 2652, 2686, 0, 0, 2686, 2686, 0, -111, - 0, 0, 0, 0, -92, 0, 0, 2686, 2193, 0, - 0, 2686, -150, 2931, 0, 2931, 0, 0, 0, 2931, - 0, -150, 0, 0, 0, 0, -119, 0, 2943, 2584, - 0, 2720, -112, 2835, -20, -86, -56, -6, -38, 5, - 2686, -12, 0, 2686, 0, 2686, -27, 0, 2754, 2686, - 3003, 3025, -10, -16, 0, 0, 3071, 3071, 3071, 3071, - 3071, 3071, 3071, 3071, 3071, 3071, 3071, 3071, 3071, 3071, - 2686, 2686, 2686, 2686, 0, -59, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 186, 186, -148, -148, -148, - -57, -57, -193, 2847, 3071, 33, 35, 0, 6, 39, - 0, 2863, 0, -256, 2959, 2875, 75, 0, 0, 0, - 0, 0, 435, 0, 0, 2891, 435, 2618, -197, 3071, - 0, 80, 46, 2686, 2686, 2686, 2686, 2686, 3071, 47, - 3071, -80, 0, -249, 185, 0, 56, 55, 2686, 0, - -219, 3071, 3059, 2969, 429, 0, 0, 0, 2686, 2686, - 0, 59, 0, 60, 0, 0, 2686, 0, 0, 0, - 0, -212, 2686, 2686, -150, 2686, 2686, -29, 65, -24, - 71, -9, 0, 50, 0, 0, 0, 0, 0, 0, - -208, 66, 0, -58, 0, 2517, 3047, 0, 77, -2, - -12, 3071, 3071, 0, 3071, 2903, 50, 0, 0, 0, - 0, 0, 68, 0, 78, 0, 2686, -57, 0, 0, - 2686, 0, -150, -150, 88, 0, 3071, 93, 2545, 0, - 0, 0, 0, 2652, 0, 0, 267, 0, +static const YYINT yysindex[] = { 89, + 0, 382, 0, 2733, 2733, 2733, -111, 2628, 0, 2768, + 0, 0, 0, -279, 0, 0, 0, 0, -276, -265, + 0, 0, 0, -252, 0, 0, 0, -273, 89, 0, + 0, 2733, 95, 58, 3067, 2733, 285, -240, -248, -224, + -202, -219, 0, 0, 0, -202, 202, -218, 0, 0, + 0, 0, 0, -210, -196, -213, -213, -186, -245, 128, + 128, -213, -213, 128, 0, 218, 0, 3017, 464, 464, + 2177, 464, 0, 0, 0, 464, 2768, -279, 0, -199, + -207, -207, -207, -206, 0, 0, 0, 0, 0, 0, + -236, -11, 2539, 0, -158, -178, -150, -149, 2768, 2768, + -161, -115, -202, -202, 0, 0, 0, -103, 2768, 2768, + 2768, 2768, 2768, 2768, 2768, 2768, 2768, 2768, 2768, 2768, + 2768, 2768, 0, 0, 0, 0, 0, -109, 2768, 2768, + 2768, 2768, 2768, 2768, 2768, -101, 285, 2733, 2733, 2733, + 2733, 2733, -83, -60, 2733, 2768, 0, 0, 2768, 2768, + 0, -91, 0, 0, 0, 0, -57, 0, 0, 2768, + 2212, 0, 0, 2768, -213, 3017, 0, 3017, 0, 0, + 0, 3017, 0, -213, 0, 0, 0, 0, -85, 0, + 3029, 2663, 0, 2803, -72, 2921, -9, -47, -20, 29, + 8, 51, 2768, 37, 0, 2768, 0, 2768, 13, 0, + 2838, 2768, 2768, 3089, 3111, 16, 25, 0, 0, 3157, + 3157, 3157, 3157, 3157, 3157, 3157, 3157, 3157, 3157, 3157, + 3157, 3157, 3157, 2768, 2768, 2768, 2768, 0, -106, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 294, 294, + -207, -207, -207, -111, -111, -103, 2933, 3157, 59, 69, + 0, 34, 74, 0, 2949, 0, -266, 3045, 2961, 81, + 0, 0, 0, 0, 0, 464, 0, 0, 2977, 464, + 2698, -135, 3157, 0, 84, 56, 2768, 2768, 2768, 2768, + 2768, 3157, 64, 3157, -125, 0, -239, 2567, 0, 57, + 3157, 71, 73, 2768, 0, -232, 3157, 3145, 2583, 376, + 0, 0, 0, 2768, 2768, 0, 77, 0, 78, 0, + 0, 2768, 0, 0, 0, 0, -226, 2768, 2768, -213, + 2768, 2768, -71, 94, -18, 99, 10, 0, 82, 0, + 0, 0, 0, 0, 0, 0, -217, 96, 0, -101, + 0, 2595, 3133, 0, 108, 26, 37, 3157, 3157, 0, + 3157, 2989, 82, 0, 0, 0, 0, 0, 105, 0, + 110, 0, 2768, -111, 0, 0, 2768, 0, -213, -213, + 119, 0, 3157, 120, 2623, 0, 0, 0, 0, 2733, + 0, 0, 192, 0, }; static const YYINT yyrindex[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 702, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1899, 14, 42, 1962, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1710, 0, 0, 0, 0, + 0, 0, 0, 1951, -28, 21, 2015, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 639, 0, 765, 1143, - 1206, 1269, 0, 513, 0, 0, 0, 576, 0, 0, - 2300, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1332, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 671, 0, 799, + 1183, 1247, 1311, 0, 543, 0, 0, 0, 607, 0, + 0, 2321, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2025, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 828, 0, 0, 0, 0, 0, - 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 273, 0, 0, 0, - 0, -7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2788, 0, 0, 103, - 0, 0, 0, 0, 0, 0, -199, 171, 359, 440, - 2363, 2376, 2389, 2409, 2422, 2435, 2455, 2468, 2481, 2501, - 0, 0, 0, 0, 0, -46, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1773, 1836, 1395, 1458, 1521, - 1584, 1647, 891, 0, -202, 0, 0, 0, 0, 104, - 0, 0, 0, 2123, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 70, 76, - 0, -230, 0, 0, 103, 0, 103, 0, -192, 0, - -190, 0, 0, 2252, 0, 0, 0, 0, 0, 0, - 0, 53, 0, 278, 151, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 121, 0, 0, 0, 0, 863, 0, 0, 0, + 0, 0, 0, 0, 163, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 300, 0, + 0, 0, 0, -37, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2873, 0, + 0, 133, 0, 0, 0, 0, 0, 0, 0, -190, + 305, 387, 469, 2385, 2398, 2411, 2431, 2444, 2457, 2477, + 2490, 2503, 2523, 0, 0, 0, 0, 0, 193, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1823, 1887, + 1439, 1503, 1567, 1631, 1695, 927, 0, -216, 0, 0, + 0, 0, 138, 0, 0, 0, 2142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1080, 0, 0, 0, 0, 954, 0, + 0, 9, -156, 0, -244, 0, 0, 133, 0, 133, + 0, -215, 0, -198, 0, 0, 2272, 0, 0, 0, + 139, 0, 0, 0, 0, 0, -10, 0, 76, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 29, 72, 74, 0, 92, 0, 1017, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2514, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1119, 0, + 0, 0, 0, 991, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 88, 35, 49, 0, + 6, 0, 1055, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2536, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, }; static const YYINT yygindex[] = { 0, - 19, 85, 0, -51, 10, 0, 119, 0, 0, 8, - -4, -220, 48, 0, 4, 0, 0, 0, 0, 0, - 0, 0, -141, 0, 0, -195, -185, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, - 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, + 53, 92, 0, -52, 41, 0, 180, 0, 0, -2, + -4, -214, 52, 0, 4, 0, 0, 0, 0, 0, + 0, 0, -139, 0, 0, -195, -179, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 426, 0, + 0, 0, 0, 0, 0, 0, 0, 147, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, }; -#define YYTABLESIZE 3357 -static const YYINT yytable[] = { 79, - 79, 79, 87, 79, 287, 91, 247, 80, 81, 82, - 282, 89, 144, 174, 86, 325, 176, 177, 29, 181, - 296, 297, 304, 183, 95, 96, 79, 93, 79, 79, - 79, 191, 2, 100, 106, 79, 79, 103, 135, 104, - 97, 154, 98, 93, 99, 332, 29, 34, 147, 67, - 93, 145, 191, 153, 326, 148, 353, 92, 149, 34, - 34, 34, 142, 151, 34, 34, 34, 34, 313, 314, - 192, 91, 92, 79, 91, 34, 34, 150, 187, 319, - 158, 321, 182, 163, 333, 159, 185, 186, 318, 162, - 320, 341, 322, 188, 189, 354, 121, 190, 196, 48, - 49, 142, 156, 203, 34, 143, 164, 166, 48, 49, - 170, 92, 67, 91, 197, 67, 67, 179, 67, 205, - 206, 340, 67, 184, 107, 108, 109, 110, 111, 112, - 113, 79, 79, 79, 79, 79, 200, 368, 79, 236, - 237, 238, 239, 240, 201, 202, 243, 331, 141, 142, - 143, 204, 233, 225, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 8, 9, - 83, 241, 257, 157, 226, 227, 228, 229, 230, 231, - 232, 160, 161, 324, 316, 165, 167, 168, 169, 171, - 242, 244, 152, 175, 245, 245, 248, 8, 9, 83, - 48, 49, 2, 251, 84, 252, 255, 85, 262, 256, - 273, 308, 47, 47, 47, 310, 275, 47, 47, 47, - 47, 128, 129, 130, 131, 132, 133, 266, 47, 47, - 47, 47, 47, 47, 347, 316, 154, 154, 279, 349, - 316, 281, 274, 8, 9, 83, 285, 193, 153, 153, - 84, 78, 78, 85, 351, 316, 276, 47, 78, 78, - 235, 363, 316, 91, 277, 194, 280, 278, 292, 293, - 294, 295, 11, 11, 11, 123, 283, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 89, 89, 258, - 259, 291, 260, 290, 89, 89, 261, 299, 157, 300, - 33, 33, 33, 302, 195, 33, 33, 33, 33, 301, - 67, 14, 14, 14, 67, 92, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 93, 93, - 94, 94, 95, 95, 80, 80, 245, 307, 1, 80, - 80, 80, 80, 2, 316, 33, 336, 337, 317, 352, - 81, 81, 233, 154, 323, 81, 81, 81, 81, 329, - 342, 343, 330, 345, 346, 153, 338, 339, 348, 79, - 3, 4, 5, 355, 350, 365, 6, 377, 84, 80, - 362, 366, 7, 8, 9, 10, 312, 11, 12, 13, - 14, 372, 15, 16, 17, 81, 373, 18, 19, 20, - 21, 22, 23, 24, 367, 174, 78, 175, 369, 51, - 51, 51, 25, 26, 51, 51, 51, 51, 356, 27, - 105, 0, 0, 0, 0, 51, 51, 51, 51, 35, - 35, 35, 0, 0, 35, 35, 35, 35, 0, 0, - 0, 344, 0, 0, 0, 0, 35, 172, 0, 327, - 48, 49, 2, 173, 51, 0, 0, 0, 0, 123, - 235, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 0, 0, 0, 35, 0, 138, 139, 140, 3, - 4, 5, 141, 142, 143, 6, 0, 0, 328, 370, - 371, 7, 8, 9, 10, 0, 11, 12, 13, 14, - 0, 15, 16, 17, 50, 51, 18, 19, 20, 21, - 22, 23, 24, 52, 53, 54, 55, 56, 57, 0, - 58, 0, 0, 59, 60, 61, 62, 63, 97, 0, - 0, 97, 97, 97, 97, 0, 49, 49, 49, 0, - 0, 49, 49, 49, 49, 0, 0, 0, 0, 0, - 0, 0, 49, 49, 49, 136, 137, 138, 139, 140, - 97, 97, 97, 141, 142, 143, 97, 0, 0, 0, - 378, 0, 97, 97, 97, 97, 0, 97, 97, 97, - 97, 49, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 0, 97, 0, 0, 97, 97, 97, 97, 97, 47, - 0, 0, 48, 49, 2, 0, 0, 36, 36, 36, - 0, 0, 36, 36, 36, 36, 0, 136, 137, 138, - 139, 140, 0, 0, 36, 141, 142, 143, 0, 0, +#define YYTABLESIZE 3443 +static const YYINT yytable[] = { 80, + 80, 80, 88, 80, 87, 92, 290, 81, 82, 83, + 250, 90, 309, 176, 79, 79, 178, 179, 285, 183, + 94, 79, 79, 185, 146, 330, 99, 80, 193, 301, + 302, 80, 338, 94, 105, 108, 106, 100, 193, 137, + 49, 50, 156, 158, 155, 49, 50, 359, 144, 94, + 101, 35, 30, 68, 149, 96, 97, 98, 2, 79, + 94, 93, 165, 147, 331, 102, 93, 194, 34, 34, + 34, 339, 92, 34, 34, 34, 34, 347, 150, 189, + 35, 30, 324, 152, 326, 34, 360, 144, 94, 143, + 144, 145, 160, 151, 8, 9, 84, 323, 153, 325, + 123, 327, 80, 80, 198, 93, 161, 80, 80, 80, + 80, 166, 168, 34, 184, 172, 164, 68, 187, 188, + 68, 68, 181, 68, 199, 190, 191, 68, 186, 192, + 318, 319, 346, 80, 80, 80, 80, 80, 329, 321, + 80, 239, 240, 241, 242, 243, 206, 80, 246, 374, + 204, 205, 202, 203, 337, 208, 209, 49, 50, 2, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 130, 131, 132, 133, 134, 135, + 229, 230, 231, 232, 233, 234, 235, 207, 236, 8, + 9, 84, 353, 321, 159, 145, 85, 247, 228, 86, + 248, 248, 162, 163, 244, 260, 167, 169, 170, 171, + 173, 255, 258, 313, 177, 259, 251, 315, 51, 51, + 51, 78, 78, 51, 51, 51, 51, 245, 78, 78, + 11, 11, 11, 269, 51, 51, 51, 51, 254, 156, + 156, 155, 155, 265, 282, 355, 321, 284, 14, 14, + 14, 276, 288, 277, 291, 278, 116, 117, 118, 119, + 120, 121, 122, 51, 81, 81, 92, 95, 95, 81, + 81, 81, 81, 357, 321, 297, 298, 299, 300, 33, + 33, 33, 238, 195, 33, 33, 33, 33, 123, 369, + 321, 279, 195, 96, 96, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 97, 97, 81, + 280, 261, 262, 281, 263, 283, 286, 68, 264, 295, + 159, 68, 93, 304, 33, 116, 117, 118, 119, 120, + 121, 122, 296, 305, 49, 49, 49, 306, 307, 49, + 49, 49, 49, 312, 1, 248, 91, 91, 321, 2, + 49, 49, 49, 91, 91, 342, 343, 123, 322, 156, + 334, 155, 109, 110, 111, 112, 113, 114, 115, 348, + 349, 328, 351, 352, 335, 80, 3, 4, 5, 49, + 336, 358, 6, 383, 344, 345, 49, 50, 7, 8, + 9, 10, 236, 11, 12, 13, 14, 354, 15, 16, + 17, 18, 356, 361, 19, 20, 21, 22, 23, 24, + 25, 368, 371, 372, 373, 3, 4, 5, 375, 26, + 27, 6, 378, 379, 176, 86, 28, 7, 8, 9, + 10, 362, 11, 12, 13, 14, 78, 15, 16, 17, + 18, 177, 82, 19, 20, 21, 22, 23, 24, 25, + 317, 47, 47, 47, 107, 0, 47, 47, 47, 47, + 0, 0, 0, 0, 0, 0, 350, 47, 47, 47, + 47, 47, 47, 174, 0, 0, 49, 50, 2, 175, + 138, 139, 140, 141, 142, 0, 238, 0, 143, 144, + 145, 0, 0, 0, 0, 384, 47, 154, 0, 0, + 0, 0, 8, 9, 84, 3, 4, 5, 0, 85, + 0, 6, 86, 0, 0, 376, 377, 7, 8, 9, + 10, 0, 11, 12, 13, 14, 0, 15, 16, 17, + 18, 51, 52, 19, 20, 21, 22, 23, 24, 25, + 53, 54, 55, 56, 57, 58, 0, 59, 0, 0, + 60, 61, 62, 63, 64, 99, 0, 0, 99, 99, + 99, 99, 0, 35, 35, 35, 0, 0, 35, 35, + 35, 35, 0, 138, 139, 140, 141, 142, 0, 0, + 35, 143, 144, 145, 140, 141, 142, 99, 99, 99, + 143, 144, 145, 99, 0, 0, 0, 0, 0, 99, + 99, 99, 99, 0, 99, 99, 99, 99, 35, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 0, 99, + 0, 0, 99, 99, 99, 99, 99, 48, 0, 0, + 49, 50, 2, 0, 0, 36, 36, 36, 0, 0, + 36, 36, 36, 36, 128, 129, 130, 131, 132, 133, + 134, 135, 36, 0, 0, 0, 0, 0, 0, 3, + 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 7, 8, 9, 10, 0, 11, 12, 13, 14, + 36, 15, 16, 17, 18, 51, 52, 19, 20, 21, + 22, 23, 24, 25, 53, 54, 55, 56, 57, 58, + 0, 59, 0, 0, 60, 61, 62, 63, 64, 174, + 0, 0, 49, 50, 2, 0, 0, 37, 37, 37, + 0, 0, 37, 37, 37, 37, 0, 0, 0, 0, + 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 7, 8, 9, 10, 0, 11, 12, - 13, 14, 36, 15, 16, 17, 50, 51, 18, 19, - 20, 21, 22, 23, 24, 52, 53, 54, 55, 56, - 57, 0, 58, 0, 0, 59, 60, 61, 62, 63, - 172, 0, 0, 48, 49, 2, 0, 0, 37, 37, - 37, 0, 0, 37, 37, 37, 37, 126, 127, 128, - 129, 130, 131, 132, 133, 37, 0, 0, 0, 0, - 0, 0, 3, 4, 5, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 7, 8, 9, 10, 0, 11, - 12, 13, 14, 37, 15, 16, 17, 50, 51, 18, - 19, 20, 21, 22, 23, 24, 52, 53, 54, 55, - 56, 57, 0, 58, 0, 0, 59, 60, 61, 62, - 63, 76, 76, 76, 0, 84, 76, 76, 76, 76, + 13, 14, 37, 15, 16, 17, 18, 51, 52, 19, + 20, 21, 22, 23, 24, 25, 53, 54, 55, 56, + 57, 58, 0, 59, 0, 0, 60, 61, 62, 63, + 64, 76, 76, 76, 0, 86, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 0, 76, 76, 76, 76, 76, 76, 76, 0, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 0, 76, 76, 76, 0, 0, 76, 76, 76, - 76, 76, 76, 76, 121, 121, 121, 0, 84, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 0, 121, 121, 121, 121, 121, 121, 121, - 0, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 0, 121, 121, 121, 0, 0, - 121, 121, 121, 121, 121, 121, 121, 59, 59, 59, - 0, 84, 59, 59, 59, 59, 59, 59, 59, 59, + 76, 0, 76, 76, 76, 76, 0, 0, 76, 76, + 76, 76, 76, 76, 76, 123, 123, 123, 0, 86, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 0, 123, 123, 123, 123, 123, 123, + 123, 0, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 0, 123, 123, 123, 123, + 0, 0, 123, 123, 123, 123, 123, 123, 123, 59, + 59, 59, 0, 86, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 0, 59, 59, 59, 59, - 59, 59, 59, 0, 59, 59, 59, 59, 0, 59, 59, 59, 59, 59, 59, 59, 59, 0, 59, 59, - 59, 0, 0, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 0, 84, 59, 59, 59, 59, 76, - 76, 76, 76, 76, 76, 76, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 0, 59, - 59, 59, 59, 59, 59, 59, 0, 0, 59, 59, - 59, 0, 59, 59, 59, 59, 59, 59, 59, 59, - 0, 59, 59, 59, 0, 0, 59, 59, 59, 59, - 59, 59, 59, 125, 125, 125, 0, 0, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 0, 125, 125, 125, 125, 125, 125, 125, 0, - 125, 125, 125, 125, 0, 125, 125, 125, 125, 125, - 125, 125, 125, 0, 125, 125, 125, 0, 0, 125, - 125, 125, 125, 125, 125, 125, 150, 150, 150, 0, - 0, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 0, 150, 150, 150, 150, 150, - 150, 150, 0, 0, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 0, 150, 150, 150, - 0, 0, 150, 150, 150, 150, 150, 150, 150, 67, - 67, 67, 0, 0, 67, 67, 67, 67, 67, 67, + 59, 59, 59, 59, 59, 0, 59, 59, 59, 59, + 0, 59, 59, 59, 59, 59, 59, 59, 59, 0, + 59, 59, 59, 59, 0, 0, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 0, 86, 59, 59, + 59, 59, 76, 76, 76, 76, 76, 76, 76, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 0, 59, 59, 59, 59, 59, 59, 59, 0, + 0, 59, 59, 59, 0, 59, 59, 59, 59, 59, + 59, 59, 59, 0, 59, 59, 59, 59, 0, 0, + 59, 59, 59, 59, 59, 59, 59, 127, 127, 127, + 0, 0, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 0, 127, 127, 127, 127, + 127, 127, 127, 0, 127, 127, 127, 127, 0, 127, + 127, 127, 127, 127, 127, 127, 127, 0, 127, 127, + 127, 127, 0, 0, 127, 127, 127, 127, 127, 127, + 127, 152, 152, 152, 0, 0, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 0, + 152, 152, 152, 152, 152, 152, 152, 0, 0, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 0, 152, 152, 152, 152, 0, 0, 152, 152, + 152, 152, 152, 152, 152, 67, 67, 67, 0, 0, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, - 67, 67, 67, 67, 67, 0, 67, 67, 67, 0, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, - 67, 67, 67, 0, 0, 67, 67, 67, 67, 67, - 67, 67, 82, 82, 82, 0, 0, 82, 82, 82, - 82, 77, 77, 77, 77, 77, 77, 77, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 0, 82, 82, 82, 82, 82, 82, 82, 0, 0, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 0, 82, 82, 82, 0, 0, 82, 82, - 82, 82, 82, 82, 82, 114, 114, 114, 0, 0, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 0, 114, 114, 114, 114, 114, 114, - 114, 0, 114, 114, 114, 114, 0, 114, 114, 114, - 114, 114, 114, 114, 114, 0, 114, 114, 114, 0, - 0, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 0, 0, 114, 114, 114, 114, 113, 113, 113, - 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 0, 114, 114, 114, - 114, 114, 114, 114, 0, 0, 114, 114, 114, 0, - 114, 114, 114, 114, 114, 114, 114, 114, 0, 114, - 114, 114, 0, 0, 114, 114, 114, 114, 114, 114, - 114, 69, 69, 69, 0, 0, 69, 69, 69, 69, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 0, 67, 67, 67, 67, 67, 67, + 67, 0, 67, 67, 67, 0, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, + 0, 0, 67, 67, 67, 67, 67, 67, 67, 83, + 83, 83, 0, 0, 83, 83, 83, 83, 77, 77, + 77, 77, 77, 77, 77, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 0, 83, 83, + 83, 83, 83, 83, 83, 0, 0, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 0, + 83, 83, 83, 83, 0, 0, 83, 83, 83, 83, + 83, 83, 83, 116, 116, 116, 0, 0, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 0, 116, 116, 116, 116, 116, 116, 116, 0, + 116, 116, 116, 116, 0, 116, 116, 116, 116, 116, + 116, 116, 116, 0, 116, 116, 116, 116, 0, 0, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 0, 0, 116, 116, 116, 116, 115, 115, 115, 115, + 115, 115, 115, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 0, 116, 116, 116, 116, + 116, 116, 116, 0, 0, 116, 116, 116, 0, 116, + 116, 116, 116, 116, 116, 116, 116, 0, 116, 116, + 116, 116, 0, 0, 116, 116, 116, 116, 116, 116, + 116, 69, 69, 69, 0, 0, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 0, 69, 69, 69, 69, 69, 69, 69, 0, 69, 0, 0, 0, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 0, 69, 69, 69, 0, 0, 69, 69, 69, - 69, 69, 69, 69, 70, 70, 70, 0, 0, 70, + 69, 0, 69, 69, 69, 69, 0, 0, 69, 69, + 69, 69, 69, 69, 69, 70, 70, 70, 0, 0, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 0, 70, 70, 70, 70, 70, 70, 70, - 0, 70, 0, 0, 0, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 0, 70, 70, 70, 0, 0, - 70, 70, 70, 70, 70, 70, 70, 68, 68, 68, - 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 70, 70, 70, 0, 70, 70, 70, 70, 70, 70, + 70, 0, 70, 0, 0, 0, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 0, 70, 70, 70, 70, + 0, 0, 70, 70, 70, 70, 70, 70, 70, 68, + 68, 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, - 68, 68, 68, 0, 68, 0, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, - 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, - 151, 151, 151, 0, 0, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 0, 151, - 151, 151, 151, 151, 151, 151, 0, 151, 0, 0, - 0, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 0, 151, 151, 151, 0, 0, 151, 151, 151, 151, - 151, 151, 151, 64, 64, 64, 0, 0, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 68, 68, 68, 68, 68, 0, 68, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, + 68, 68, 68, 68, 0, 0, 68, 68, 68, 68, + 68, 68, 68, 153, 153, 153, 0, 0, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 0, 153, 153, 153, 153, 153, 153, 153, 0, + 153, 0, 0, 0, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 0, 153, 153, 153, 153, 0, 0, + 153, 153, 153, 153, 153, 153, 153, 64, 64, 64, + 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 0, 64, 64, 64, 64, 64, 64, 64, 0, - 64, 0, 0, 0, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 0, 64, 64, 64, 0, 0, 64, - 64, 64, 64, 64, 64, 64, 65, 65, 65, 0, - 0, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 64, 64, 64, 64, 64, 0, 64, 64, 64, 64, + 64, 64, 64, 0, 64, 0, 0, 0, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 0, 64, 64, + 64, 64, 0, 0, 64, 64, 64, 64, 64, 64, + 64, 65, 65, 65, 0, 0, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 0, 65, 65, 65, 65, 65, - 65, 65, 0, 65, 0, 0, 0, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 0, 65, 65, 65, - 0, 0, 65, 65, 65, 65, 65, 65, 65, 66, - 66, 66, 0, 0, 66, 66, 66, 66, 66, 66, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 0, + 65, 65, 65, 65, 65, 65, 65, 0, 65, 0, + 0, 0, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 0, 65, 65, 65, 65, 0, 0, 65, 65, + 65, 65, 65, 65, 65, 66, 66, 66, 0, 0, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 0, 66, 66, - 66, 66, 66, 66, 66, 0, 66, 0, 0, 0, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 0, - 66, 66, 66, 0, 0, 66, 66, 66, 66, 66, - 66, 66, 154, 154, 154, 0, 0, 154, 154, 154, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 0, 66, 66, 66, 66, 66, 66, + 66, 0, 66, 0, 0, 0, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 0, 66, 66, 66, 66, + 0, 0, 66, 66, 66, 66, 66, 66, 66, 156, + 156, 156, 0, 0, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 0, 156, 156, + 156, 156, 156, 156, 156, 0, 156, 156, 156, 156, + 156, 0, 0, 0, 156, 156, 156, 156, 0, 0, + 156, 0, 156, 156, 0, 0, 156, 156, 156, 156, + 156, 156, 156, 154, 154, 154, 0, 0, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 0, 154, 154, 154, 154, 154, 154, 154, 0, 154, - 154, 154, 154, 154, 0, 0, 0, 154, 154, 154, - 154, 0, 0, 154, 0, 154, 0, 0, 154, 154, - 154, 154, 154, 154, 154, 152, 152, 152, 0, 0, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 0, 152, 152, 152, 152, 152, 152, - 152, 0, 152, 152, 152, 152, 152, 0, 0, 0, - 152, 152, 152, 152, 0, 0, 152, 0, 152, 0, - 0, 152, 152, 152, 152, 152, 152, 152, 149, 149, - 149, 0, 0, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 0, 149, 149, 149, - 149, 149, 149, 149, 0, 0, 149, 149, 149, 149, - 0, 0, 0, 149, 149, 149, 149, 0, 0, 149, - 0, 149, 0, 0, 149, 149, 149, 149, 149, 149, - 149, 62, 62, 62, 0, 0, 62, 62, 62, 62, + 154, 0, 154, 154, 154, 154, 154, 154, 154, 0, + 154, 154, 154, 154, 154, 0, 0, 0, 154, 154, + 154, 154, 0, 0, 154, 0, 154, 154, 0, 0, + 154, 154, 154, 154, 154, 154, 154, 151, 151, 151, + 0, 0, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 0, 151, 151, 151, 151, + 151, 151, 151, 0, 0, 151, 151, 151, 151, 0, + 0, 0, 151, 151, 151, 151, 0, 0, 151, 0, + 151, 151, 0, 0, 151, 151, 151, 151, 151, 151, + 151, 62, 62, 62, 0, 0, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 0, 62, 62, 62, 0, 0, 0, 62, 0, 62, 0, 0, 0, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 0, 62, 62, 62, 0, 0, 62, 62, 62, - 62, 62, 62, 62, 63, 63, 63, 0, 0, 63, + 62, 0, 62, 62, 62, 62, 0, 0, 62, 62, + 62, 62, 62, 62, 62, 63, 63, 63, 0, 0, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 0, 63, 63, 63, 0, 0, 0, 63, - 0, 63, 0, 0, 0, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 0, 63, 63, 63, 0, 0, - 63, 63, 63, 63, 63, 63, 63, 125, 125, 125, - 0, 0, 125, 125, 125, 125, 0, 0, 0, 0, - 0, 0, 0, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 0, 125, 125, 125, 125, - 125, 125, 125, 0, 0, 125, 125, 125, 0, 125, - 125, 125, 125, 125, 125, 125, 125, 0, 125, 125, - 125, 0, 0, 125, 125, 125, 125, 125, 125, 125, - 55, 55, 55, 0, 0, 55, 55, 55, 55, 0, - 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, - 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, - 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 0, 55, 55, 55, 0, 0, 55, 55, 55, 55, - 55, 55, 55, 56, 56, 56, 0, 0, 56, 56, - 56, 56, 0, 0, 0, 0, 0, 0, 0, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 0, 56, 0, 0, 0, 0, 0, 56, 48, - 49, 0, 0, 0, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 0, 56, 56, 56, 0, 0, 56, - 56, 56, 56, 56, 56, 56, 0, 0, 3, 4, - 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 7, 8, 9, 10, 0, 11, 12, 13, 14, 0, - 15, 16, 17, 0, 0, 18, 19, 20, 21, 22, - 23, 24, 59, 0, 0, 84, 0, 0, 0, 0, - 76, 76, 76, 76, 76, 76, 76, 59, 0, 59, - 59, 0, 59, 59, 59, 59, 59, 59, 59, 0, - 59, 59, 59, 59, 59, 59, 59, 178, 0, 59, - 59, 59, 0, 59, 59, 59, 0, 59, 59, 59, - 59, 0, 59, 59, 59, 0, 0, 59, 59, 59, - 59, 59, 59, 59, 0, 3, 4, 5, 0, 0, - 0, 6, 253, 0, 0, 0, 0, 7, 8, 9, - 10, 0, 11, 12, 13, 14, 0, 15, 16, 17, - 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, - 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 7, 8, 9, 10, 0, 11, 12, 13, - 254, 0, 15, 16, 17, 0, 0, 18, 19, 20, - 21, 22, 23, 24, 84, 0, 0, 0, 0, 76, + 63, 63, 63, 0, 63, 63, 63, 0, 0, 0, + 63, 0, 63, 0, 0, 0, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 0, 63, 63, 63, 63, + 0, 0, 63, 63, 63, 63, 63, 63, 63, 127, + 127, 127, 0, 0, 127, 127, 127, 127, 0, 0, + 0, 0, 0, 0, 0, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 0, 127, 127, + 127, 127, 127, 127, 127, 0, 0, 127, 127, 127, + 0, 127, 127, 127, 127, 127, 127, 127, 127, 0, + 127, 127, 127, 127, 0, 0, 127, 127, 127, 127, + 127, 127, 127, 55, 55, 55, 0, 0, 55, 55, + 55, 55, 0, 0, 0, 0, 0, 0, 0, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 0, 55, 0, 0, 0, 0, 0, 55, 0, + 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 0, 55, 55, 55, 55, 0, 0, + 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, + 0, 0, 56, 56, 56, 56, 0, 0, 0, 0, + 0, 0, 0, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 0, 56, 0, 0, 0, + 0, 0, 56, 0, 0, 0, 0, 0, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 0, 56, 56, + 56, 56, 0, 0, 56, 56, 56, 56, 56, 56, + 56, 59, 0, 0, 86, 0, 0, 0, 0, 76, + 76, 76, 76, 76, 76, 76, 59, 0, 59, 59, + 0, 59, 59, 59, 59, 59, 59, 59, 0, 59, + 59, 59, 59, 59, 59, 59, 180, 0, 59, 59, + 59, 0, 59, 59, 59, 0, 59, 59, 59, 59, + 0, 59, 59, 59, 59, 0, 0, 59, 59, 59, + 59, 59, 59, 59, 3, 4, 5, 0, 0, 0, + 6, 256, 0, 0, 0, 0, 7, 8, 9, 10, + 0, 11, 12, 13, 14, 0, 15, 16, 17, 18, + 0, 0, 19, 20, 21, 22, 23, 24, 25, 3, + 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 7, 8, 9, 10, 0, 11, 12, 13, 257, + 0, 15, 16, 17, 18, 0, 0, 19, 20, 21, + 22, 23, 24, 25, 86, 0, 0, 0, 0, 76, 76, 76, 76, 76, 76, 76, 59, 0, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 0, 59, 59, 59, 59, 59, 59, 59, 0, 0, 59, 59, 59, 0, 59, 59, 59, 0, 59, 59, 59, 59, - 0, 59, 59, 59, 125, 0, 59, 59, 59, 59, - 59, 59, 59, 0, 125, 0, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 0, 125, 125, 125, - 125, 125, 125, 125, 0, 0, 125, 125, 125, 0, - 125, 125, 125, 0, 125, 125, 125, 125, 0, 125, - 125, 125, 0, 0, 125, 125, 125, 125, 125, 125, - 125, 38, 38, 38, 0, 0, 38, 38, 38, 38, - 0, 0, 0, 0, 39, 39, 39, 0, 38, 39, - 39, 39, 39, 0, 0, 0, 0, 40, 40, 40, - 0, 39, 40, 40, 40, 40, 0, 114, 115, 116, - 117, 118, 119, 120, 40, 0, 38, 126, 126, 126, - 0, 0, 126, 126, 126, 126, 0, 0, 0, 39, - 127, 127, 127, 0, 126, 127, 127, 127, 127, 121, - 0, 0, 40, 128, 128, 128, 0, 127, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 126, 129, 129, 129, 0, 0, 129, 129, - 129, 129, 0, 0, 0, 127, 130, 130, 130, 0, - 129, 130, 130, 130, 130, 0, 0, 0, 128, 131, - 131, 131, 0, 130, 131, 131, 131, 131, 0, 0, - 0, 0, 0, 0, 0, 0, 131, 0, 129, 132, - 132, 132, 0, 0, 132, 132, 132, 132, 0, 0, - 0, 130, 54, 54, 54, 0, 132, 54, 54, 54, - 54, 358, 0, 0, 131, 0, 0, 0, 0, 54, - 0, 123, 0, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 0, 132, 0, 0, 0, 0, 374, - 114, 115, 116, 117, 118, 119, 120, 54, 0, 123, - 359, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 0, 0, 0, 0, 0, 0, 3, 4, 5, - 0, 0, 121, 6, 0, 0, 193, 0, 375, 7, - 8, 9, 76, 0, 11, 12, 13, 77, 88, 15, - 78, 17, 0, 0, 18, 19, 20, 21, 22, 23, - 24, 3, 4, 5, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 7, 8, 9, 10, 265, 11, 12, - 13, 14, 0, 15, 16, 17, 0, 0, 18, 19, - 20, 21, 22, 23, 24, 3, 4, 5, 0, 0, + 0, 59, 59, 59, 59, 127, 0, 59, 59, 59, + 59, 59, 59, 59, 0, 127, 0, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 0, 127, 127, + 127, 127, 127, 127, 127, 0, 0, 127, 127, 127, + 0, 127, 127, 127, 0, 127, 127, 127, 127, 0, + 127, 127, 127, 127, 0, 0, 127, 127, 127, 127, + 127, 127, 127, 38, 38, 38, 0, 0, 38, 38, + 38, 38, 0, 0, 0, 0, 39, 39, 39, 0, + 38, 39, 39, 39, 39, 0, 0, 0, 0, 40, + 40, 40, 0, 39, 40, 40, 40, 40, 0, 0, + 0, 0, 0, 0, 0, 0, 40, 0, 38, 128, + 128, 128, 0, 0, 128, 128, 128, 128, 0, 0, + 0, 39, 129, 129, 129, 0, 128, 129, 129, 129, + 129, 0, 0, 0, 40, 130, 130, 130, 0, 129, + 130, 130, 130, 130, 0, 0, 0, 0, 0, 0, + 0, 0, 130, 0, 128, 131, 131, 131, 0, 0, + 131, 131, 131, 131, 0, 0, 0, 129, 132, 132, + 132, 0, 131, 132, 132, 132, 132, 0, 0, 0, + 130, 133, 133, 133, 0, 132, 133, 133, 133, 133, + 0, 0, 0, 0, 0, 0, 0, 0, 133, 0, + 131, 134, 134, 134, 0, 0, 134, 134, 134, 134, + 0, 0, 0, 132, 54, 54, 54, 0, 134, 54, + 54, 54, 54, 196, 0, 0, 133, 0, 0, 0, + 0, 54, 0, 125, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 0, 134, 0, 0, 0, + 0, 332, 0, 0, 0, 0, 0, 0, 0, 54, + 0, 125, 197, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 0, 0, 0, 0, 0, 0, 364, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 125, + 333, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 0, 0, 0, 0, 0, 0, 380, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 125, 365, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 0, + 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, + 0, 6, 0, 0, 0, 0, 381, 7, 8, 9, + 77, 0, 11, 12, 13, 78, 89, 15, 79, 17, + 18, 0, 0, 19, 20, 21, 22, 23, 24, 25, + 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 7, 8, 9, 10, 268, 11, 12, 13, + 14, 0, 15, 16, 17, 18, 0, 0, 19, 20, + 21, 22, 23, 24, 25, 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 7, 8, 9, - 10, 311, 11, 12, 13, 14, 0, 15, 16, 17, - 0, 0, 18, 19, 20, 21, 22, 23, 24, 3, - 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 7, 8, 9, 76, 0, 11, 12, 13, 77, - 0, 15, 78, 17, 0, 0, 18, 19, 20, 21, - 22, 23, 24, 3, 4, 5, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 7, 8, 9, 10, 0, - 11, 12, 13, 14, 0, 15, 16, 17, 0, 0, - 18, 19, 20, 21, 22, 23, 24, 3, 4, 5, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 7, - 8, 9, 268, 0, 11, 12, 13, 14, 0, 15, - 16, 17, 0, 0, 18, 19, 20, 21, 22, 23, - 24, 3, 4, 5, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 7, 8, 9, 10, 0, 11, 12, - 13, 284, 0, 15, 16, 17, 0, 0, 18, 19, - 20, 21, 22, 23, 24, 182, 182, 182, 0, 0, - 0, 182, 0, 0, 0, 0, 0, 182, 182, 182, - 182, 0, 182, 182, 182, 182, 0, 182, 182, 182, - 0, 0, 182, 182, 182, 182, 182, 182, 182, 123, - 0, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 123, 0, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 0, 0, 0, 0, 123, 195, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 123, - 298, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 0, 0, 0, 0, 123, 303, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 123, 306, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 48, - 49, 0, 0, 0, 309, 0, 0, 0, 0, 0, - 0, 0, 264, 0, 0, 123, 364, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 123, 305, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, - 0, 0, 0, 123, 0, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 122, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 123, 0, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 288, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 289, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, - 0, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 361, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 123, 0, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 123, 335, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 123, 0, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, + 10, 316, 11, 12, 13, 14, 0, 15, 16, 17, + 18, 0, 0, 19, 20, 21, 22, 23, 24, 25, + 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 7, 8, 9, 77, 0, 11, 12, 13, + 78, 0, 15, 79, 17, 18, 0, 0, 19, 20, + 21, 22, 23, 24, 25, 3, 4, 5, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 7, 8, 9, + 10, 0, 11, 12, 13, 14, 0, 15, 16, 17, + 18, 0, 0, 19, 20, 21, 22, 23, 24, 25, + 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 7, 8, 9, 271, 0, 11, 12, 13, + 14, 0, 15, 16, 17, 18, 0, 0, 19, 20, + 21, 22, 23, 24, 25, 3, 4, 5, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 7, 8, 9, + 10, 0, 11, 12, 13, 287, 0, 15, 16, 17, + 18, 0, 0, 19, 20, 21, 22, 23, 24, 25, + 184, 184, 184, 0, 0, 0, 184, 0, 0, 0, + 0, 0, 184, 184, 184, 184, 0, 184, 184, 184, + 184, 0, 184, 184, 184, 184, 0, 0, 184, 184, + 184, 184, 184, 184, 184, 125, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 125, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 0, + 0, 0, 0, 125, 197, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 125, 303, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 0, 0, 0, + 0, 125, 308, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 125, 311, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 49, 50, 0, 0, 0, + 314, 0, 0, 0, 0, 0, 0, 0, 267, 0, + 0, 125, 370, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 125, 310, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 0, 0, 0, 0, 125, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 124, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 125, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 293, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 125, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 294, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 125, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 367, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 125, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 125, + 341, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 125, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, }; static const YYINT yycheck[] = { 4, - 5, 6, 7, 8, 200, 10, 148, 4, 5, 6, - 196, 8, 265, 65, 7, 265, 68, 69, 0, 71, - 241, 242, 279, 75, 15, 16, 31, 300, 259, 260, - 35, 265, 261, 24, 31, 266, 267, 308, 35, 310, - 303, 46, 303, 300, 303, 265, 28, 0, 303, 2, - 300, 304, 265, 46, 304, 303, 265, 10, 40, 259, - 260, 261, 265, 45, 264, 265, 266, 267, 266, 267, - 304, 76, 265, 304, 265, 28, 276, 303, 83, 275, - 303, 277, 73, 308, 304, 303, 77, 78, 274, 303, - 276, 304, 278, 84, 85, 304, 300, 88, 263, 259, - 260, 304, 262, 308, 304, 299, 59, 60, 259, 260, - 63, 304, 65, 304, 303, 68, 69, 70, 71, 101, - 102, 307, 75, 76, 268, 269, 270, 271, 272, 273, - 274, 136, 137, 138, 139, 140, 303, 358, 143, 136, - 137, 138, 139, 140, 97, 98, 143, 289, 297, 298, - 299, 303, 134, 308, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 301, 302, - 303, 288, 163, 47, 127, 128, 129, 130, 131, 132, - 133, 55, 56, 264, 265, 59, 60, 61, 62, 63, - 288, 144, 296, 67, 147, 148, 308, 301, 302, 303, - 259, 260, 261, 296, 308, 158, 159, 311, 328, 162, - 323, 263, 259, 260, 261, 267, 303, 264, 265, 266, - 267, 281, 282, 283, 284, 285, 286, 180, 275, 276, - 277, 278, 279, 280, 264, 265, 241, 242, 191, 264, - 265, 194, 263, 301, 302, 303, 199, 304, 241, 242, - 308, 259, 260, 311, 264, 265, 263, 304, 266, 267, - 134, 264, 265, 268, 303, 265, 279, 263, 221, 222, - 223, 224, 259, 260, 261, 275, 304, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 259, 260, 163, - 164, 308, 166, 304, 266, 267, 170, 265, 172, 265, - 259, 260, 261, 265, 304, 264, 265, 266, 267, 304, - 263, 259, 260, 261, 267, 268, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 259, 260, - 259, 260, 259, 260, 259, 260, 289, 263, 256, 264, - 265, 266, 267, 261, 265, 304, 299, 300, 303, 300, - 259, 260, 334, 358, 308, 264, 265, 266, 267, 304, - 313, 314, 308, 316, 317, 358, 308, 308, 304, 374, - 288, 289, 290, 308, 304, 308, 294, 374, 263, 304, - 304, 304, 300, 301, 302, 303, 268, 305, 306, 307, - 308, 304, 310, 311, 312, 304, 304, 315, 316, 317, - 318, 319, 320, 321, 357, 304, 304, 304, 361, 259, - 260, 261, 330, 331, 264, 265, 266, 267, 334, 337, - 28, -1, -1, -1, -1, 275, 276, 277, 278, 259, - 260, 261, -1, -1, 264, 265, 266, 267, -1, -1, - -1, 315, -1, -1, -1, -1, 276, 256, -1, 265, - 259, 260, 261, 262, 304, -1, -1, -1, -1, 275, - 334, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, -1, -1, -1, 304, -1, 291, 292, 293, 288, - 289, 290, 297, 298, 299, 294, -1, -1, 304, 363, - 364, 300, 301, 302, 303, -1, 305, 306, 307, 308, - -1, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, -1, - 329, -1, -1, 332, 333, 334, 335, 336, 256, -1, - -1, 259, 260, 261, 262, -1, 259, 260, 261, -1, - -1, 264, 265, 266, 267, -1, -1, -1, -1, -1, - -1, -1, 275, 276, 277, 289, 290, 291, 292, 293, - 288, 289, 290, 297, 298, 299, 294, -1, -1, -1, - 304, -1, 300, 301, 302, 303, -1, 305, 306, 307, - 308, 304, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - -1, 329, -1, -1, 332, 333, 334, 335, 336, 256, + 5, 6, 7, 8, 7, 10, 202, 4, 5, 6, + 150, 8, 279, 66, 259, 260, 69, 70, 198, 72, + 300, 266, 267, 76, 265, 265, 303, 32, 265, 244, + 245, 36, 265, 300, 308, 32, 310, 303, 265, 36, + 259, 260, 47, 262, 47, 259, 260, 265, 265, 265, + 303, 0, 0, 2, 303, 15, 16, 17, 261, 304, + 300, 10, 308, 304, 304, 25, 265, 304, 259, 260, + 261, 304, 77, 264, 265, 266, 267, 304, 303, 84, + 29, 29, 278, 303, 280, 276, 304, 304, 304, 297, + 298, 299, 303, 41, 301, 302, 303, 277, 46, 279, + 300, 281, 259, 260, 263, 304, 303, 264, 265, 266, + 267, 60, 61, 304, 74, 64, 303, 66, 78, 79, + 69, 70, 71, 72, 303, 85, 86, 76, 77, 89, + 266, 267, 312, 138, 139, 140, 141, 142, 264, 265, + 145, 138, 139, 140, 141, 142, 308, 304, 145, 364, + 99, 100, 303, 303, 294, 103, 104, 259, 260, 261, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 281, 282, 283, 284, 285, 286, + 129, 130, 131, 132, 133, 134, 135, 303, 136, 301, + 302, 303, 264, 265, 48, 299, 308, 146, 308, 311, + 149, 150, 56, 57, 288, 165, 60, 61, 62, 63, + 64, 160, 161, 266, 68, 164, 308, 270, 259, 260, + 261, 259, 260, 264, 265, 266, 267, 288, 266, 267, + 259, 260, 261, 182, 275, 276, 277, 278, 296, 244, + 245, 244, 245, 329, 193, 264, 265, 196, 259, 260, + 261, 324, 201, 263, 203, 303, 268, 269, 270, 271, + 272, 273, 274, 304, 259, 260, 271, 259, 260, 264, + 265, 266, 267, 264, 265, 224, 225, 226, 227, 259, + 260, 261, 136, 304, 264, 265, 266, 267, 300, 264, + 265, 263, 304, 259, 260, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 259, 260, 304, + 303, 165, 166, 263, 168, 279, 304, 266, 172, 304, + 174, 270, 271, 265, 304, 268, 269, 270, 271, 272, + 273, 274, 308, 265, 259, 260, 261, 304, 265, 264, + 265, 266, 267, 263, 256, 294, 259, 260, 265, 261, + 275, 276, 277, 266, 267, 304, 305, 300, 303, 364, + 304, 364, 268, 269, 270, 271, 272, 273, 274, 318, + 319, 308, 321, 322, 304, 380, 288, 289, 290, 304, + 308, 300, 294, 380, 308, 308, 259, 260, 300, 301, + 302, 303, 340, 305, 306, 307, 308, 304, 310, 311, + 312, 313, 304, 308, 316, 317, 318, 319, 320, 321, + 322, 304, 308, 304, 363, 288, 289, 290, 367, 331, + 332, 294, 304, 304, 304, 263, 338, 300, 301, 302, + 303, 340, 305, 306, 307, 308, 304, 310, 311, 312, + 313, 304, 304, 316, 317, 318, 319, 320, 321, 322, + 271, 259, 260, 261, 29, -1, 264, 265, 266, 267, + -1, -1, -1, -1, -1, -1, 320, 275, 276, 277, + 278, 279, 280, 256, -1, -1, 259, 260, 261, 262, + 289, 290, 291, 292, 293, -1, 340, -1, 297, 298, + 299, -1, -1, -1, -1, 304, 304, 296, -1, -1, + -1, -1, 301, 302, 303, 288, 289, 290, -1, 308, + -1, 294, 311, -1, -1, 369, 370, 300, 301, 302, + 303, -1, 305, 306, 307, 308, -1, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, -1, 330, -1, -1, + 333, 334, 335, 336, 337, 256, -1, -1, 259, 260, + 261, 262, -1, 259, 260, 261, -1, -1, 264, 265, + 266, 267, -1, 289, 290, 291, 292, 293, -1, -1, + 276, 297, 298, 299, 291, 292, 293, 288, 289, 290, + 297, 298, 299, 294, -1, -1, -1, -1, -1, 300, + 301, 302, 303, -1, 305, 306, 307, 308, 304, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, -1, 330, + -1, -1, 333, 334, 335, 336, 337, 256, -1, -1, + 259, 260, 261, -1, -1, 259, 260, 261, -1, -1, + 264, 265, 266, 267, 279, 280, 281, 282, 283, 284, + 285, 286, 276, -1, -1, -1, -1, -1, -1, 288, + 289, 290, -1, -1, -1, 294, -1, -1, -1, -1, + -1, 300, 301, 302, 303, -1, 305, 306, 307, 308, + 304, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + -1, 330, -1, -1, 333, 334, 335, 336, 337, 256, -1, -1, 259, 260, 261, -1, -1, 259, 260, 261, - -1, -1, 264, 265, 266, 267, -1, 289, 290, 291, - 292, 293, -1, -1, 276, 297, 298, 299, -1, -1, + -1, -1, 264, 265, 266, 267, -1, -1, -1, -1, + -1, -1, -1, -1, 276, -1, -1, -1, -1, -1, -1, 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, -1, -1, 300, 301, 302, 303, -1, 305, 306, 307, 308, 304, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 327, -1, 329, -1, -1, 332, 333, 334, 335, 336, - 256, -1, -1, 259, 260, 261, -1, -1, 259, 260, - 261, -1, -1, 264, 265, 266, 267, 279, 280, 281, - 282, 283, 284, 285, 286, 276, -1, -1, -1, -1, - -1, -1, 288, 289, 290, -1, -1, -1, 294, -1, - -1, -1, -1, -1, 300, 301, 302, 303, -1, 305, - 306, 307, 308, 304, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, -1, 329, -1, -1, 332, 333, 334, 335, - 336, 259, 260, 261, -1, 263, 264, 265, 266, 267, + 327, 328, -1, 330, -1, -1, 333, 334, 335, 336, + 337, 259, 260, 261, -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, -1, 310, 311, 312, -1, -1, 315, 316, 317, - 318, 319, 320, 321, 259, 260, 261, -1, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, -1, 288, 289, 290, 291, 292, 293, 294, - -1, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, -1, 310, 311, 312, -1, -1, - 315, 316, 317, 318, 319, 320, 321, 259, 260, 261, - -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 259, 260, 261, -1, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, + 294, -1, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, -1, 310, 311, 312, 313, + -1, -1, 316, 317, 318, 319, 320, 321, 322, 259, + 260, 261, -1, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, + 290, 291, 292, 293, 294, -1, 296, 297, 298, 299, + -1, 301, 302, 303, 304, 305, 306, 307, 308, -1, + 310, 311, 312, 313, -1, -1, 316, 317, 318, 319, + 320, 321, 322, 259, 260, 261, -1, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, + -1, 297, 298, 299, -1, 301, 302, 303, 304, 305, + 306, 307, 308, -1, 310, 311, 312, 313, -1, -1, + 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, + -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, 296, 297, 298, 299, -1, 301, 302, 303, 304, 305, 306, 307, 308, -1, 310, 311, - 312, -1, -1, 315, 316, 317, 318, 319, 320, 321, - 259, 260, 261, -1, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, - 289, 290, 291, 292, 293, 294, -1, -1, 297, 298, - 299, -1, 301, 302, 303, 304, 305, 306, 307, 308, - -1, 310, 311, 312, -1, -1, 315, 316, 317, 318, - 319, 320, 321, 259, 260, 261, -1, -1, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, - 296, 297, 298, 299, -1, 301, 302, 303, 304, 305, - 306, 307, 308, -1, 310, 311, 312, -1, -1, 315, - 316, 317, 318, 319, 320, 321, 259, 260, 261, -1, - -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, - 293, 294, -1, -1, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, -1, 310, 311, 312, - -1, -1, 315, 316, 317, 318, 319, 320, 321, 259, + 312, 313, -1, -1, 316, 317, 318, 319, 320, 321, + 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, + 288, 289, 290, 291, 292, 293, 294, -1, -1, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, + 294, -1, 296, 297, 298, -1, 300, 301, 302, 303, + 304, 305, 306, 307, 308, -1, 310, 311, 312, 313, + -1, -1, 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, - 290, 291, 292, 293, 294, -1, 296, 297, 298, -1, + 290, 291, 292, 293, 294, -1, -1, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, -1, - 310, 311, 312, -1, -1, 315, 316, 317, 318, 319, - 320, 321, 259, 260, 261, -1, -1, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - -1, 288, 289, 290, 291, 292, 293, 294, -1, -1, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, -1, 310, 311, 312, -1, -1, 315, 316, - 317, 318, 319, 320, 321, 259, 260, 261, -1, -1, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, - 294, -1, 296, 297, 298, 299, -1, 301, 302, 303, - 304, 305, 306, 307, 308, -1, 310, 311, 312, -1, - -1, 315, 316, 317, 318, 319, 320, 321, 259, 260, - 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, - 291, 292, 293, 294, -1, -1, 297, 298, 299, -1, - 301, 302, 303, 304, 305, 306, 307, 308, -1, 310, - 311, 312, -1, -1, 315, 316, 317, 318, 319, 320, - 321, 259, 260, 261, -1, -1, 264, 265, 266, 267, - 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, - 288, 289, 290, 291, 292, 293, 294, -1, 296, -1, - -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, - 308, -1, 310, 311, 312, -1, -1, 315, 316, 317, - 318, 319, 320, 321, 259, 260, 261, -1, -1, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, -1, 288, 289, 290, 291, 292, 293, 294, - -1, 296, -1, -1, -1, 300, 301, 302, 303, 304, - 305, 306, 307, 308, -1, 310, 311, 312, -1, -1, - 315, 316, 317, 318, 319, 320, 321, 259, 260, 261, + 310, 311, 312, 313, -1, -1, 316, 317, 318, 319, + 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, + 296, 297, 298, 299, -1, 301, 302, 303, 304, 305, + 306, 307, 308, -1, 310, 311, 312, 313, -1, -1, + 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, - 292, 293, 294, -1, 296, -1, -1, -1, 300, 301, + 292, 293, 294, -1, -1, 297, 298, 299, -1, 301, 302, 303, 304, 305, 306, 307, 308, -1, 310, 311, - 312, -1, -1, 315, 316, 317, 318, 319, 320, 321, - 259, 260, 261, -1, -1, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, - 289, 290, 291, 292, 293, 294, -1, 296, -1, -1, - -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, - -1, 310, 311, 312, -1, -1, 315, 316, 317, 318, - 319, 320, 321, 259, 260, 261, -1, -1, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, - 296, -1, -1, -1, 300, 301, 302, 303, 304, 305, - 306, 307, 308, -1, 310, 311, 312, -1, -1, 315, - 316, 317, 318, 319, 320, 321, 259, 260, 261, -1, - -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, - 293, 294, -1, 296, -1, -1, -1, 300, 301, 302, - 303, 304, 305, 306, 307, 308, -1, 310, 311, 312, - -1, -1, 315, 316, 317, 318, 319, 320, 321, 259, + 312, 313, -1, -1, 316, 317, 318, 319, 320, 321, + 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, + 288, 289, 290, 291, 292, 293, 294, -1, 296, -1, + -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, + 294, -1, 296, -1, -1, -1, 300, 301, 302, 303, + 304, 305, 306, 307, 308, -1, 310, 311, 312, 313, + -1, -1, 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, 296, -1, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, -1, - 310, 311, 312, -1, -1, 315, 316, 317, 318, 319, - 320, 321, 259, 260, 261, -1, -1, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - -1, 288, 289, 290, 291, 292, 293, 294, -1, 296, - 297, 298, 299, 300, -1, -1, -1, 304, 305, 306, - 307, -1, -1, 310, -1, 312, -1, -1, 315, 316, - 317, 318, 319, 320, 321, 259, 260, 261, -1, -1, + 310, 311, 312, 313, -1, -1, 316, 317, 318, 319, + 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, + 296, -1, -1, -1, 300, 301, 302, 303, 304, 305, + 306, 307, 308, -1, 310, 311, 312, 313, -1, -1, + 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, + -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, + 292, 293, 294, -1, 296, -1, -1, -1, 300, 301, + 302, 303, 304, 305, 306, 307, 308, -1, 310, 311, + 312, 313, -1, -1, 316, 317, 318, 319, 320, 321, + 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, + 288, 289, 290, 291, 292, 293, 294, -1, 296, -1, + -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, - 294, -1, 296, 297, 298, 299, 300, -1, -1, -1, - 304, 305, 306, 307, -1, -1, 310, -1, 312, -1, - -1, 315, 316, 317, 318, 319, 320, 321, 259, 260, - 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, - 291, 292, 293, 294, -1, -1, 297, 298, 299, 300, - -1, -1, -1, 304, 305, 306, 307, -1, -1, 310, - -1, 312, -1, -1, 315, 316, 317, 318, 319, 320, - 321, 259, 260, 261, -1, -1, 264, 265, 266, 267, + 294, -1, 296, -1, -1, -1, 300, 301, 302, 303, + 304, 305, 306, 307, 308, -1, 310, 311, 312, 313, + -1, -1, 316, 317, 318, 319, 320, 321, 322, 259, + 260, 261, -1, -1, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, + 290, 291, 292, 293, 294, -1, 296, 297, 298, 299, + 300, -1, -1, -1, 304, 305, 306, 307, -1, -1, + 310, -1, 312, 313, -1, -1, 316, 317, 318, 319, + 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, + 296, 297, 298, 299, 300, -1, -1, -1, 304, 305, + 306, 307, -1, -1, 310, -1, 312, 313, -1, -1, + 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, + -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, + 292, 293, 294, -1, -1, 297, 298, 299, 300, -1, + -1, -1, 304, 305, 306, 307, -1, -1, 310, -1, + 312, 313, -1, -1, 316, 317, 318, 319, 320, 321, + 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, -1, -1, -1, 294, -1, 296, -1, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, - 308, -1, 310, 311, 312, -1, -1, 315, 316, 317, - 318, 319, 320, 321, 259, 260, 261, -1, -1, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, -1, 288, 289, 290, -1, -1, -1, 294, - -1, 296, -1, -1, -1, 300, 301, 302, 303, 304, - 305, 306, 307, 308, -1, 310, 311, 312, -1, -1, - 315, 316, 317, 318, 319, 320, 321, 259, 260, 261, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, -1, 288, 289, 290, -1, -1, -1, + 294, -1, 296, -1, -1, -1, 300, 301, 302, 303, + 304, 305, 306, 307, 308, -1, 310, 311, 312, 313, + -1, -1, 316, 317, 318, 319, 320, 321, 322, 259, + 260, 261, -1, -1, 264, 265, 266, 267, -1, -1, + -1, -1, -1, -1, -1, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, + 290, 291, 292, 293, 294, -1, -1, 297, 298, 299, + -1, 301, 302, 303, 304, 305, 306, 307, 308, -1, + 310, 311, 312, 313, -1, -1, 316, 317, 318, 319, + 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, + 266, 267, -1, -1, -1, -1, -1, -1, -1, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, -1, 288, -1, -1, -1, -1, -1, 294, -1, + -1, -1, -1, -1, 300, 301, 302, 303, 304, 305, + 306, 307, 308, -1, 310, 311, 312, 313, -1, -1, + 316, 317, 318, 319, 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, 266, 267, -1, -1, -1, -1, -1, -1, -1, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, - 292, 293, 294, -1, -1, 297, 298, 299, -1, 301, + 282, 283, 284, 285, 286, -1, 288, -1, -1, -1, + -1, -1, 294, -1, -1, -1, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, -1, 310, 311, - 312, -1, -1, 315, 316, 317, 318, 319, 320, 321, - 259, 260, 261, -1, -1, 264, 265, 266, 267, -1, - -1, -1, -1, -1, -1, -1, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, - -1, -1, -1, -1, -1, 294, -1, -1, -1, -1, - -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, - -1, 310, 311, 312, -1, -1, 315, 316, 317, 318, - 319, 320, 321, 259, 260, 261, -1, -1, 264, 265, - 266, 267, -1, -1, -1, -1, -1, -1, -1, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, -1, 288, -1, -1, -1, -1, -1, 294, 259, - 260, -1, -1, -1, 300, 301, 302, 303, 304, 305, - 306, 307, 308, -1, 310, 311, 312, -1, -1, 315, - 316, 317, 318, 319, 320, 321, -1, -1, 288, 289, - 290, -1, -1, -1, 294, -1, -1, -1, -1, -1, - 300, 301, 302, 303, -1, 305, 306, 307, 308, -1, - 310, 311, 312, -1, -1, 315, 316, 317, 318, 319, - 320, 321, 260, -1, -1, 263, -1, -1, -1, -1, - 268, 269, 270, 271, 272, 273, 274, 275, -1, 277, - 278, -1, 280, 281, 282, 283, 284, 285, 286, -1, - 288, 289, 290, 291, 292, 293, 294, 260, -1, 297, - 298, 299, -1, 301, 302, 303, -1, 305, 306, 307, - 308, -1, 310, 311, 312, -1, -1, 315, 316, 317, - 318, 319, 320, 321, -1, 288, 289, 290, -1, -1, - -1, 294, 260, -1, -1, -1, -1, 300, 301, 302, - 303, -1, 305, 306, 307, 308, -1, 310, 311, 312, - -1, -1, 315, 316, 317, 318, 319, 320, 321, -1, - 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, - -1, -1, 300, 301, 302, 303, -1, 305, 306, 307, - 308, -1, 310, 311, 312, -1, -1, 315, 316, 317, - 318, 319, 320, 321, 263, -1, -1, -1, -1, 268, + 312, 313, -1, -1, 316, 317, 318, 319, 320, 321, + 322, 260, -1, -1, 263, -1, -1, -1, -1, 268, + 269, 270, 271, 272, 273, 274, 275, -1, 277, 278, + -1, 280, 281, 282, 283, 284, 285, 286, -1, 288, + 289, 290, 291, 292, 293, 294, 260, -1, 297, 298, + 299, -1, 301, 302, 303, -1, 305, 306, 307, 308, + -1, 310, 311, 312, 313, -1, -1, 316, 317, 318, + 319, 320, 321, 322, 288, 289, 290, -1, -1, -1, + 294, 260, -1, -1, -1, -1, 300, 301, 302, 303, + -1, 305, 306, 307, 308, -1, 310, 311, 312, 313, + -1, -1, 316, 317, 318, 319, 320, 321, 322, 288, + 289, 290, -1, -1, -1, 294, -1, -1, -1, -1, + -1, 300, 301, 302, 303, -1, 305, 306, 307, 308, + -1, 310, 311, 312, 313, -1, -1, 316, 317, 318, + 319, 320, 321, 322, 263, -1, -1, -1, -1, 268, 269, 270, 271, 272, 273, 274, 275, -1, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, 291, 292, 293, 294, -1, -1, 297, 298, 299, -1, 301, 302, 303, -1, 305, 306, 307, 308, - -1, 310, 311, 312, 265, -1, 315, 316, 317, 318, - 319, 320, 321, -1, 275, -1, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, -1, 288, 289, 290, - 291, 292, 293, 294, -1, -1, 297, 298, 299, -1, - 301, 302, 303, -1, 305, 306, 307, 308, -1, 310, - 311, 312, -1, -1, 315, 316, 317, 318, 319, 320, - 321, 259, 260, 261, -1, -1, 264, 265, 266, 267, - -1, -1, -1, -1, 259, 260, 261, -1, 276, 264, - 265, 266, 267, -1, -1, -1, -1, 259, 260, 261, - -1, 276, 264, 265, 266, 267, -1, 268, 269, 270, - 271, 272, 273, 274, 276, -1, 304, 259, 260, 261, - -1, -1, 264, 265, 266, 267, -1, -1, -1, 304, - 259, 260, 261, -1, 276, 264, 265, 266, 267, 300, - -1, -1, 304, 259, 260, 261, -1, 276, 264, 265, - 266, 267, -1, -1, -1, -1, -1, -1, -1, -1, - 276, -1, 304, 259, 260, 261, -1, -1, 264, 265, - 266, 267, -1, -1, -1, 304, 259, 260, 261, -1, - 276, 264, 265, 266, 267, -1, -1, -1, 304, 259, + -1, 310, 311, 312, 313, 265, -1, 316, 317, 318, + 319, 320, 321, 322, -1, 275, -1, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, -1, 288, 289, + 290, 291, 292, 293, 294, -1, -1, 297, 298, 299, + -1, 301, 302, 303, -1, 305, 306, 307, 308, -1, + 310, 311, 312, 313, -1, -1, 316, 317, 318, 319, + 320, 321, 322, 259, 260, 261, -1, -1, 264, 265, + 266, 267, -1, -1, -1, -1, 259, 260, 261, -1, + 276, 264, 265, 266, 267, -1, -1, -1, -1, 259, 260, 261, -1, 276, 264, 265, 266, 267, -1, -1, -1, -1, -1, -1, -1, -1, 276, -1, 304, 259, 260, 261, -1, -1, 264, 265, 266, 267, -1, -1, -1, 304, 259, 260, 261, -1, 276, 264, 265, 266, - 267, 265, -1, -1, 304, -1, -1, -1, -1, 276, - -1, 275, -1, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, -1, 304, -1, -1, -1, -1, 265, - 268, 269, 270, 271, 272, 273, 274, 304, -1, 275, + 267, -1, -1, -1, 304, 259, 260, 261, -1, 276, + 264, 265, 266, 267, -1, -1, -1, -1, -1, -1, + -1, -1, 276, -1, 304, 259, 260, 261, -1, -1, + 264, 265, 266, 267, -1, -1, -1, 304, 259, 260, + 261, -1, 276, 264, 265, 266, 267, -1, -1, -1, + 304, 259, 260, 261, -1, 276, 264, 265, 266, 267, + -1, -1, -1, -1, -1, -1, -1, -1, 276, -1, + 304, 259, 260, 261, -1, -1, 264, 265, 266, 267, + -1, -1, -1, 304, 259, 260, 261, -1, 276, 264, + 265, 266, 267, 265, -1, -1, 304, -1, -1, -1, + -1, 276, -1, 275, -1, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, -1, 304, -1, -1, -1, + -1, 265, -1, -1, -1, -1, -1, -1, -1, 304, + -1, 275, 304, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, -1, -1, -1, -1, -1, -1, 265, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 275, 304, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, -1, -1, -1, -1, -1, -1, 288, 289, 290, - -1, -1, 300, 294, -1, -1, 304, -1, 304, 300, - 301, 302, 303, -1, 305, 306, 307, 308, 309, 310, - 311, 312, -1, -1, 315, 316, 317, 318, 319, 320, - 321, 288, 289, 290, -1, -1, -1, 294, -1, -1, - -1, -1, -1, 300, 301, 302, 303, 304, 305, 306, - 307, 308, -1, 310, 311, 312, -1, -1, 315, 316, - 317, 318, 319, 320, 321, 288, 289, 290, -1, -1, + 286, -1, -1, -1, -1, -1, -1, 265, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 275, 304, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, + -1, -1, -1, -1, -1, 288, 289, 290, -1, -1, + -1, 294, -1, -1, -1, -1, 304, 300, 301, 302, + 303, -1, 305, 306, 307, 308, 309, 310, 311, 312, + 313, -1, -1, 316, 317, 318, 319, 320, 321, 322, + 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, + -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, -1, 310, 311, 312, - -1, -1, 315, 316, 317, 318, 319, 320, 321, 288, - 289, 290, -1, -1, -1, 294, -1, -1, -1, -1, - -1, 300, 301, 302, 303, -1, 305, 306, 307, 308, - -1, 310, 311, 312, -1, -1, 315, 316, 317, 318, - 319, 320, 321, 288, 289, 290, -1, -1, -1, 294, - -1, -1, -1, -1, -1, 300, 301, 302, 303, -1, - 305, 306, 307, 308, -1, 310, 311, 312, -1, -1, - 315, 316, 317, 318, 319, 320, 321, 288, 289, 290, - -1, -1, -1, 294, -1, -1, -1, -1, -1, 300, - 301, 302, 303, -1, 305, 306, 307, 308, -1, 310, - 311, 312, -1, -1, 315, 316, 317, 318, 319, 320, - 321, 288, 289, 290, -1, -1, -1, 294, -1, -1, - -1, -1, -1, 300, 301, 302, 303, -1, 305, 306, - 307, 308, -1, 310, 311, 312, -1, -1, 315, 316, - 317, 318, 319, 320, 321, 288, 289, 290, -1, -1, + 313, -1, -1, 316, 317, 318, 319, 320, 321, 322, + 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, + -1, -1, 300, 301, 302, 303, -1, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, -1, -1, 300, 301, 302, 303, -1, 305, 306, 307, 308, -1, 310, 311, 312, - -1, -1, 315, 316, 317, 318, 319, 320, 321, 275, - -1, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, 275, -1, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, -1, -1, -1, -1, 275, 304, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 275, - 304, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, -1, -1, -1, -1, 275, 304, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 275, 304, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 259, - 260, -1, -1, -1, 304, -1, -1, -1, -1, -1, - -1, -1, 260, -1, -1, 275, 304, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 275, 260, 277, + 313, -1, -1, 316, 317, 318, 319, 320, 321, 322, + 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, + -1, -1, 300, 301, 302, 303, -1, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 288, 289, 290, -1, -1, + -1, 294, -1, -1, -1, -1, -1, 300, 301, 302, + 303, -1, 305, 306, 307, 308, -1, 310, 311, 312, + 313, -1, -1, 316, 317, 318, 319, 320, 321, 322, + 288, 289, 290, -1, -1, -1, 294, -1, -1, -1, + -1, -1, 300, 301, 302, 303, -1, 305, 306, 307, + 308, -1, 310, 311, 312, 313, -1, -1, 316, 317, + 318, 319, 320, 321, 322, 275, -1, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 275, -1, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, -1, - -1, -1, -1, 275, -1, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 265, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 275, -1, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 265, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 275, -1, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 265, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 275, + -1, -1, -1, 275, 304, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 275, 304, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, -1, -1, -1, + -1, 275, 304, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 275, 304, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 259, 260, -1, -1, -1, + 304, -1, -1, -1, -1, -1, -1, -1, 260, -1, + -1, 275, 304, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 275, 260, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, -1, -1, -1, -1, 275, -1, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 265, -1, -1, -1, -1, -1, -1, -1, -1, -1, 275, -1, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 275, -1, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, + 284, 285, 286, 265, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 275, -1, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 265, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 275, -1, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 265, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 275, -1, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 275, -1, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, }; -#define YYFINAL 28 +#define YYFINAL 29 #ifndef YYDEBUG #define YYDEBUG 0 #endif -#define YYMAXTOKEN 337 -#define YYUNDFTOKEN 397 +#define YYMAXTOKEN 338 +#define YYUNDFTOKEN 399 #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a)) #if YYDEBUG static const char *const yyname[] = { @@ -1073,12 +1095,12 @@ static const char *const yyname[] = { "COLON","OR","AND","IN","MATCH","EQ","NEQ","LT","LTE","GT","GTE","CAT", "GETLINE","PLUS","MINUS","MUL","DIV","MOD","NOT","UMINUS","IO_IN","PIPE", "COPROCESS","POW","INC_or_DEC","DOLLAR","FIELD","LPAREN","RPAREN","DOUBLE", -"STRING_","RE","ID","D_ID","FUNCT_ID","BUILTIN","LENGTH","PRINT","PRINTF", -"SPLIT","MATCH_FUNC","SUB","GSUB","GENSUB","ALENGTH_FUNC","ASORT_FUNC","DO", -"WHILE","FOR","BREAK","CONTINUE","IF","ELSE","DELETE","a_BEGIN","a_END","EXIT", -"ABORT","NEXT","NEXTFILE","RETURN","FUNCTION",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +"STRING_","RE","ID","D_ID","FUNCT_ID","BUILTIN","LENGTH","LENGTH0","PRINT", +"PRINTF","SPLIT","MATCH_FUNC","SUB","GSUB","GENSUB","ALENGTH_FUNC","ASORT_FUNC", +"DO","WHILE","FOR","BREAK","CONTINUE","IF","ELSE","DELETE","a_BEGIN","a_END", +"EXIT","ABORT","NEXT","NEXTFILE","RETURN","FUNCTION",0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,"illegal-symbol", +0,0,0,0,0,0,0,"illegal-symbol", }; static const char *const yyrule[] = { "$accept : program", @@ -1163,8 +1185,10 @@ static const char *const yyrule[] = { "arglist : args", "args : expr", "args : args COMMA expr", +"len_arg : expr", "builtin : BUILTIN mark LPAREN arglist RPAREN", -"builtin : LENGTH", +"builtin : LENGTH mark LPAREN len_arg RPAREN", +"builtin : LENGTH0", "mark :", "statement : print mark pr_args pr_direction separator", "print : PRINT", @@ -1305,11 +1329,12 @@ typedef struct { } YYSTACKDATA; /* variables for the parser stack */ static YYSTACKDATA yystack; -#line 1219 "parse.y" +#line 1229 "parse.y" /* resize the code for a user function */ -static void resize_fblock( fbp ) +static void +resize_fblock( fbp ) FBLOCK *fbp ; { CODEBLOCK *p = ZMALLOC(CODEBLOCK) ; @@ -1330,7 +1355,8 @@ static void resize_fblock( fbp ) or F_PUSH to F_PUSHI */ -static void field_A2I() +static void +field_A2I() { CELL *cp ; if ( code_ptr[-1].op == FE_PUSHA && @@ -1364,10 +1390,11 @@ static void field_A2I() /* we've seen an ID in a context where it should be a VAR, check that's consistent with previous usage */ -static void check_var( p ) +static void +check_var( p ) register SYMTAB *p ; { - switch(p->type) + switch (p->type) { case ST_NONE : /* new id */ st_none: @@ -1389,17 +1416,18 @@ static void check_var( p ) goto st_none; default : - type_error(p) ; + //type_error(p) ; break ; } } /* we've seen an ID in a context where it should be an ARRAY, check that's consistent with previous usage */ -static void check_array(p) +static void +check_array(p) register SYMTAB *p ; { - switch(p->type) + switch (p->type) { case ST_NONE : /* a new array */ st_none: @@ -1420,11 +1448,13 @@ static void check_array(p) if (is_ext_builtin(p->name)) goto st_none; - default : type_error(p) ; break ; + default : + type_error(p) ; break ; } } -static void code_array(p) +static void +code_array(p) register SYMTAB *p ; { if ( is_local(p) ) code2op(LA_PUSHA, p->offset) ; @@ -1434,7 +1464,8 @@ static void code_array(p) /* we've seen an ID as an argument to a user defined function */ -static void code_call_id( p, ip ) +static void +code_call_id( p, ip ) register CA_REC *p ; register SYMTAB *ip ; { static CELL dummy ; @@ -1443,7 +1474,7 @@ static void code_call_id( p, ip ) /* This always get set now. So that fcall:relocate_arglist works. */ - switch( ip->type ) + switch ( ip->type ) { case ST_VAR : p->type = CA_EXPR ; @@ -1492,7 +1523,8 @@ static void code_call_id( p, ip ) /* an RE by itself was coded as _MATCH0 , change to push as an expression */ -static void RE_as_arg() +static void +RE_as_arg() { CELL *cp = ZMALLOC(CELL) ; code_ptr -= 2 ; @@ -1505,7 +1537,7 @@ static void RE_as_arg() static void switch_code_to_main() { - switch(scope) + switch (scope) { case SCOPE_BEGIN : *begin_code_p = active_code ; @@ -1543,7 +1575,7 @@ parse() dump_code() ; } -#line 1547 "y.tab.c" +#line 1579 "y.tab.c" #if YYDEBUG #include /* needed for printf */ @@ -1779,7 +1811,7 @@ case 13: #line 185 "parse.y" { INST *p1 = CDP(yystack.l_mark[-1].start) ; - int len ; + int len ; code_push(p1, code_ptr - p1, scope, active_funct) ; code_ptr = p1 ; @@ -1787,9 +1819,9 @@ case 13: code2op(_RANGE, 1) ; code_ptr += 3 ; len = code_pop(code_ptr) ; - code_ptr += len ; + code_ptr += len ; code1(_STOP) ; - p1 = CDP(yystack.l_mark[-1].start) ; + p1 = CDP(yystack.l_mark[-1].start) ; p1[2].op = code_ptr - (p1+1) ; } break; @@ -1852,13 +1884,13 @@ break; case 28: #line 252 "parse.y" { if ( scope != SCOPE_FUNCT ) - compile_error("return outside function body") ; + compile_error("return outside function body.") ; } break; case 29: #line 256 "parse.y" { if ( scope != SCOPE_MAIN && scope != SCOPE_FUNCT ) - compile_error( "improper use of next" ) ; + compile_error( "improper use of next." ) ; yyval.start = code_offset ; code1(_NEXT) ; } @@ -1866,7 +1898,7 @@ break; case 30: #line 262 "parse.y" { if ( scope != SCOPE_MAIN && scope != SCOPE_FUNCT ) - compile_error( "improper use of nextfile" ) ; + compile_error( "improper use of nextfile." ) ; yyval.start = code_offset ; code1(_NEXTFILE) ; } @@ -2090,10 +2122,10 @@ case 77: BI_REC *p = yystack.l_mark[-4].bip ; yyval.start = yystack.l_mark[-3].start; if (strcmp(p->name, "argval")) - compile_error("builtin function '%s' used as an lvalue", p->name); + compile_error("builtin function '%s' used as an lvalue.", p->name); if ( (int)p->min_args > yystack.l_mark[-1].ival || (int)p->max_args < yystack.l_mark[-1].ival ) compile_error( - "wrong number of arguments in call to %s" , + "wrong number of arguments in call to %s." , p->name ) ; if ( p->min_args != p->max_args ) /* variable args */ { code1(_PUSHINT) ; code1(yystack.l_mark[-1].ival) ; } @@ -2113,111 +2145,123 @@ case 81: { yyval.ival = yystack.l_mark[-2].ival + 1 ; } break; case 82: -#line 436 "parse.y" +#line 435 "parse.y" + { yyval.ival = 1 ; } +break; +case 83: +#line 440 "parse.y" { - BI_REC *p = yystack.l_mark[-4].bip ; + BI_REC *p = yystack.l_mark[-4].bip ; yyval.start = yystack.l_mark[-3].start ; if ( (int)p->min_args > yystack.l_mark[-1].ival || (int)p->max_args < yystack.l_mark[-1].ival ) compile_error( - "wrong number of arguments in call to %s" , + "wrong number of arguments in call to %s." , p->name ) ; if ( p->min_args != p->max_args ) /* variable args */ { code1(_PUSHINT) ; code1(yystack.l_mark[-1].ival) ; } code2(_BUILTIN , p->fp) ; } break; -case 83: -#line 448 "parse.y" +case 84: +#line 452 "parse.y" + { + yyval.start = yystack.l_mark[-3].start ; + code1(_PUSHINT) ; code1(1) ; + code2(_BUILTIN, bi_length) ; + } +break; +case 85: +#line 458 "parse.y" { - yyval.start = code_offset ; - code1(_PUSHINT) ; code1(0) ; - code2(_BUILTIN, yystack.l_mark[0].bip->fp) ; - } + yyval.start = code_offset ; + code1(_PUSHINT) ; code1(0) ; + code2(_BUILTIN, bi_length) ; + } break; -case 84: -#line 457 "parse.y" +case 86: +#line 467 "parse.y" { yyval.start = code_offset ; } break; -case 85: -#line 461 "parse.y" +case 87: +#line 471 "parse.y" { code2(_PRINT, yystack.l_mark[-4].fp) ; if ( yystack.l_mark[-4].fp == bi_printf && yystack.l_mark[-2].ival == 0 ) - compile_error("no arguments in call to printf") ; + compile_error("no arguments in call to printf.") ; print_flag = 0 ; yyval.start = yystack.l_mark[-3].start ; } break; -case 86: -#line 469 "parse.y" +case 88: +#line 479 "parse.y" { yyval.fp = bi_print ; print_flag = 1 ;} break; -case 87: -#line 470 "parse.y" +case 89: +#line 480 "parse.y" { yyval.fp = bi_printf ; print_flag = 1 ; } break; -case 88: -#line 473 "parse.y" +case 90: +#line 483 "parse.y" { code2op(_PUSHINT, yystack.l_mark[0].ival) ; } break; -case 89: -#line 475 "parse.y" +case 91: +#line 485 "parse.y" { yyval.ival = yystack.l_mark[-1].arg2p->cnt ; zfree(yystack.l_mark[-1].arg2p,sizeof(ARG2_REC)) ; code2op(_PUSHINT, yyval.ival) ; } break; -case 90: -#line 479 "parse.y" +case 92: +#line 489 "parse.y" { yyval.ival=0 ; code2op(_PUSHINT, 0) ; } break; -case 91: -#line 483 "parse.y" +case 93: +#line 493 "parse.y" { yyval.arg2p = (ARG2_REC*) zmalloc(sizeof(ARG2_REC)) ; yyval.arg2p->start = yystack.l_mark[-2].start ; yyval.arg2p->cnt = 2 ; } break; -case 92: -#line 488 "parse.y" +case 94: +#line 498 "parse.y" { yyval.arg2p = yystack.l_mark[-2].arg2p ; yyval.arg2p->cnt++ ; } break; -case 94: -#line 493 "parse.y" +case 96: +#line 503 "parse.y" { code2op(_PUSHINT, yystack.l_mark[-1].ival) ; } break; -case 95: -#line 495 "parse.y" +case 97: +#line 505 "parse.y" { code2op(_PUSHINT, yystack.l_mark[-1].ival) ; } break; -case 96: -#line 502 "parse.y" +case 98: +#line 512 "parse.y" { yyval.start = yystack.l_mark[-1].start ; eat_nl() ; code_jmp(_JZ, (INST*)0) ; } break; -case 97: -#line 507 "parse.y" +case 99: +#line 517 "parse.y" { patch_jmp( code_ptr ) ; } break; -case 98: -#line 510 "parse.y" +case 100: +#line 520 "parse.y" { eat_nl() ; code_jmp(_ELSE, (INST*)0) ; } break; -case 99: -#line 515 "parse.y" +case 101: +#line 525 "parse.y" { patch_jmp(code_ptr) ; patch_jmp(CDP(yystack.l_mark[0].start)) ; } break; -case 100: -#line 523 "parse.y" +case 102: +#line 533 "parse.y" { eat_nl() ; BC_new() ; } break; -case 101: -#line 528 "parse.y" +case 103: +#line 538 "parse.y" { yyval.start = yystack.l_mark[-5].start ; code_jmp(_JNZ, CDP(yystack.l_mark[-5].start)) ; BC_clear(code_ptr, CDP(yystack.l_mark[-2].start)) ; } break; -case 102: -#line 534 "parse.y" +case 104: +#line 544 "parse.y" { eat_nl() ; BC_new() ; yyval.start = yystack.l_mark[-1].start ; @@ -2235,8 +2279,8 @@ case 102: } } break; -case 103: -#line 554 "parse.y" +case 105: +#line 564 "parse.y" { int saved_offset ; int len ; @@ -2252,15 +2296,15 @@ case 103: code_jmp(_JNZ, CDP(yystack.l_mark[0].start)) ; BC_clear(code_ptr, CDP(saved_offset)) ; } - else /* while(1) */ + else /* while (1) */ { code_jmp(_JMP, p1) ; BC_clear(code_ptr, CDP(yystack.l_mark[0].start)) ; } } break; -case 104: -#line 580 "parse.y" +case 106: +#line 590 "parse.y" { int cont_offset = code_offset ; unsigned len = code_pop(code_ptr) ; @@ -2276,27 +2320,27 @@ case 104: code_ptr += len ; code_jmp(_JNZ, CDP(yystack.l_mark[0].start)) ; } - else /* for(;;) */ + else /* for (;;) */ code_jmp(_JMP, p4) ; BC_clear(code_ptr, CDP(cont_offset)) ; } break; -case 105: -#line 603 "parse.y" +case 107: +#line 613 "parse.y" { yyval.start = code_offset ; } break; -case 106: -#line 605 "parse.y" +case 108: +#line 615 "parse.y" { yyval.start = yystack.l_mark[-1].start ; code1(_POP) ; } break; -case 107: -#line 608 "parse.y" +case 109: +#line 618 "parse.y" { yyval.start = code_offset ; } break; -case 108: -#line 610 "parse.y" +case 110: +#line 620 "parse.y" { if ( code_ptr - 2 == CDP(yystack.l_mark[-1].start) && code_ptr[-2].op == _PUSHD && @@ -2312,14 +2356,14 @@ case 108: } } break; -case 109: -#line 627 "parse.y" +case 111: +#line 637 "parse.y" { eat_nl() ; BC_new() ; code_push((INST*)0,0, scope, active_funct) ; } break; -case 110: -#line 631 "parse.y" +case 112: +#line 641 "parse.y" { INST *p1 = CDP(yystack.l_mark[-1].start) ; eat_nl() ; BC_new() ; @@ -2328,15 +2372,15 @@ case 110: code_ptr -= code_ptr - p1 ; } break; -case 111: -#line 644 "parse.y" +case 113: +#line 654 "parse.y" { check_array(yystack.l_mark[0].stp) ; code_array(yystack.l_mark[0].stp) ; code1(A_TEST) ; } break; -case 112: -#line 649 "parse.y" +case 114: +#line 659 "parse.y" { yyval.start = yystack.l_mark[-3].arg2p->start ; code2op(A_CAT, yystack.l_mark[-3].arg2p->cnt) ; zfree(yystack.l_mark[-3].arg2p, sizeof(ARG2_REC)) ; @@ -2346,40 +2390,40 @@ case 112: code1(A_TEST) ; } break; -case 113: -#line 660 "parse.y" +case 115: +#line 670 "parse.y" { if ( yystack.l_mark[-1].ival > 1 ) { code2op(A_CAT, yystack.l_mark[-1].ival) ; } check_array(yystack.l_mark[-4].stp) ; - if( is_local(yystack.l_mark[-4].stp) ) + if ( is_local(yystack.l_mark[-4].stp) ) { code2op(LAE_PUSHA, yystack.l_mark[-4].stp->offset) ; } else code2(AE_PUSHA, yystack.l_mark[-4].stp->stval.array) ; yyval.start = yystack.l_mark[-3].start ; } break; -case 114: -#line 673 "parse.y" +case 116: +#line 683 "parse.y" { if ( yystack.l_mark[-1].ival > 1 ) { code2op(A_CAT, yystack.l_mark[-1].ival) ; } check_array(yystack.l_mark[-4].stp) ; - if( is_local(yystack.l_mark[-4].stp) ) + if ( is_local(yystack.l_mark[-4].stp) ) { code2op(LAE_PUSHI, yystack.l_mark[-4].stp->offset) ; } else code2(AE_PUSHI, yystack.l_mark[-4].stp->stval.array) ; yyval.start = yystack.l_mark[-3].start ; } break; -case 115: -#line 685 "parse.y" +case 117: +#line 695 "parse.y" { if ( yystack.l_mark[-2].ival > 1 ) { code2op(A_CAT,yystack.l_mark[-2].ival) ; } check_array(yystack.l_mark[-5].stp) ; - if( is_local(yystack.l_mark[-5].stp) ) + if ( is_local(yystack.l_mark[-5].stp) ) { code2op(LAE_PUSHA, yystack.l_mark[-5].stp->offset) ; } else code2(AE_PUSHA, yystack.l_mark[-5].stp->stval.array) ; if ( yystack.l_mark[0].ival == '+' ) code1(_POST_INC) ; @@ -2388,8 +2432,8 @@ case 115: yyval.start = yystack.l_mark[-4].start ; } break; -case 116: -#line 702 "parse.y" +case 118: +#line 712 "parse.y" { yyval.start = yystack.l_mark[-4].start ; if ( yystack.l_mark[-2].ival > 1 ) { code2op(A_CAT, yystack.l_mark[-2].ival) ; } @@ -2398,8 +2442,8 @@ case 116: code1(A_DEL) ; } break; -case 117: -#line 710 "parse.y" +case 119: +#line 720 "parse.y" { yyval.start = code_offset ; check_array(yystack.l_mark[-1].stp) ; @@ -2407,8 +2451,8 @@ case 117: code1(DEL_A) ; } break; -case 118: -#line 721 "parse.y" +case 120: +#line 731 "parse.y" { eat_nl() ; BC_new() ; yyval.start = code_offset ; @@ -2420,8 +2464,8 @@ case 118: code2(SET_ALOOP, (INST*)0) ; } break; -case 119: -#line 735 "parse.y" +case 121: +#line 745 "parse.y" { INST *p2 = CDP(yystack.l_mark[0].start) ; @@ -2431,12 +2475,12 @@ case 119: code1(POP_AL) ; } break; -case 120: -#line 752 "parse.y" +case 122: +#line 762 "parse.y" { yyval.start = code_offset ; code2(F_PUSHA, yystack.l_mark[0].cp) ; } break; -case 121: -#line 754 "parse.y" +case 123: +#line 764 "parse.y" { check_var(yystack.l_mark[0].stp) ; yyval.start = code_offset ; @@ -2447,14 +2491,14 @@ case 121: CODE_FE_PUSHA() ; } break; -case 122: -#line 764 "parse.y" +case 124: +#line 774 "parse.y" { if ( yystack.l_mark[-1].ival > 1 ) { code2op(A_CAT, yystack.l_mark[-1].ival) ; } check_array(yystack.l_mark[-4].stp) ; - if( is_local(yystack.l_mark[-4].stp) ) + if ( is_local(yystack.l_mark[-4].stp) ) { code2op(LAE_PUSHI, yystack.l_mark[-4].stp->offset) ; } else code2(AE_PUSHI, yystack.l_mark[-4].stp->stval.array) ; @@ -2463,65 +2507,65 @@ case 122: yyval.start = yystack.l_mark[-3].start ; } break; -case 123: -#line 778 "parse.y" +case 125: +#line 788 "parse.y" { yyval.start = yystack.l_mark[0].start ; CODE_FE_PUSHA() ; } break; -case 124: -#line 782 "parse.y" +case 126: +#line 792 "parse.y" { yyval.start = yystack.l_mark[-1].start ; } break; -case 125: -#line 786 "parse.y" +case 127: +#line 796 "parse.y" { field_A2I() ; } break; -case 126: -#line 789 "parse.y" +case 128: +#line 799 "parse.y" { code1(F_ASSIGN) ; } break; -case 127: -#line 790 "parse.y" +case 129: +#line 800 "parse.y" { code1(F_ADD_ASG) ; } break; -case 128: -#line 791 "parse.y" +case 130: +#line 801 "parse.y" { code1(F_SUB_ASG) ; } break; -case 129: -#line 792 "parse.y" +case 131: +#line 802 "parse.y" { code1(F_MUL_ASG) ; } break; -case 130: -#line 793 "parse.y" +case 132: +#line 803 "parse.y" { code1(F_DIV_ASG) ; } break; -case 131: -#line 794 "parse.y" +case 133: +#line 804 "parse.y" { code1(F_MOD_ASG) ; } break; -case 132: -#line 795 "parse.y" +case 134: +#line 805 "parse.y" { code1(F_POW_ASG) ; } break; -case 133: -#line 802 "parse.y" +case 135: +#line 812 "parse.y" { code2(_BUILTIN, bi_split) ; } break; -case 134: -#line 806 "parse.y" +case 136: +#line 816 "parse.y" { yyval.start = yystack.l_mark[-2].start ; check_array(yystack.l_mark[0].stp) ; code_array(yystack.l_mark[0].stp) ; } break; -case 135: -#line 813 "parse.y" +case 137: +#line 823 "parse.y" { code2(_PUSHI, &fs_shadow) ; } break; -case 136: -#line 815 "parse.y" +case 138: +#line 825 "parse.y" { if ( CDP(yystack.l_mark[-1].start) == code_ptr - 2 ) { @@ -2540,16 +2584,16 @@ case 136: } } break; -case 137: -#line 839 "parse.y" +case 139: +#line 849 "parse.y" { check_array(yystack.l_mark[-1].stp) ; code_array(yystack.l_mark[-1].stp) ; code2(_BUILTIN, bi_alength) ; } break; -case 138: -#line 849 "parse.y" +case 140: +#line 859 "parse.y" { yyval.start = yystack.l_mark[-3].start ; check_array(yystack.l_mark[-1].stp) ; @@ -2558,8 +2602,8 @@ case 138: code2(_BUILTIN, bi_asort) ; } break; -case 139: -#line 857 "parse.y" +case 141: +#line 867 "parse.y" { yyval.start = yystack.l_mark[-5].start ; check_array(yystack.l_mark[-1].stp) ; @@ -2570,8 +2614,8 @@ case 139: code2(_BUILTIN, bi_asort) ; } break; -case 140: -#line 871 "parse.y" +case 142: +#line 881 "parse.y" { yyval.start = yystack.l_mark[-5].start ; check_array(yystack.l_mark[-1].stp); code_array(yystack.l_mark[-1].stp); @@ -2579,15 +2623,15 @@ case 140: code2(_BUILTIN, bi_match) ; } break; -case 141: -#line 878 "parse.y" +case 143: +#line 888 "parse.y" { yyval.start = yystack.l_mark[-3].start ; code1(_PUSHINT); code1(2); code2(_BUILTIN, bi_match) ; } break; -case 142: -#line 893 "parse.y" +case 144: +#line 903 "parse.y" { INST *p1 = CDP(yystack.l_mark[0].start) ; @@ -2607,35 +2651,35 @@ case 142: } } break; -case 143: -#line 916 "parse.y" +case 145: +#line 926 "parse.y" { yyval.start = code_offset ; code1(_EXIT0) ; } break; -case 144: -#line 919 "parse.y" +case 146: +#line 929 "parse.y" { yyval.start = yystack.l_mark[-1].start ; code1(_EXIT) ; } break; -case 145: -#line 921 "parse.y" +case 147: +#line 931 "parse.y" { yyval.start = code_offset ; code1(_ABORT0) ; } break; -case 146: -#line 924 "parse.y" +case 148: +#line 934 "parse.y" { yyval.start = yystack.l_mark[-1].start ; code1(_ABORT) ; } break; -case 147: -#line 927 "parse.y" +case 149: +#line 937 "parse.y" { yyval.start = code_offset ; code1(_RET0) ; } break; -case 148: -#line 930 "parse.y" +case 150: +#line 940 "parse.y" { yyval.start = yystack.l_mark[-1].start ; code1(_RET) ; } break; -case 149: -#line 936 "parse.y" +case 151: +#line 946 "parse.y" { yyval.start = code_offset ; code2(F_PUSHA, &field[0]) ; code1(_PUSHINT) ; code1(0) ; @@ -2643,65 +2687,65 @@ case 149: getline_flag = 0 ; } break; -case 150: -#line 943 "parse.y" +case 152: +#line 953 "parse.y" { yyval.start = yystack.l_mark[0].start ; code1(_PUSHINT) ; code1(0) ; code2(_BUILTIN, bi_getline) ; getline_flag = 0 ; } break; -case 151: -#line 949 "parse.y" +case 153: +#line 959 "parse.y" { code1(_PUSHINT) ; code1(F_IN) ; code2(_BUILTIN, bi_getline) ; /* getline_flag already off in yylex() */ } break; -case 152: -#line 954 "parse.y" +case 154: +#line 964 "parse.y" { code2(F_PUSHA, &field[0]) ; code1(_PUSHINT) ; code1(COP_IN) ; code2(_BUILTIN, bi_getline) ; } break; -case 153: -#line 959 "parse.y" +case 155: +#line 969 "parse.y" { code1(_PUSHINT) ; code1(COP_IN) ; code2(_BUILTIN, bi_getline) ; } break; -case 154: -#line 964 "parse.y" +case 156: +#line 974 "parse.y" { code2(F_PUSHA, &field[0]) ; code1(_PUSHINT) ; code1(PIPE_IN) ; code2(_BUILTIN, bi_getline) ; } break; -case 155: -#line 969 "parse.y" +case 157: +#line 979 "parse.y" { code1(_PUSHINT) ; code1(PIPE_IN) ; code2(_BUILTIN, bi_getline) ; } break; -case 156: -#line 975 "parse.y" +case 158: +#line 985 "parse.y" { getline_flag = 1 ; } break; -case 159: -#line 980 "parse.y" +case 161: +#line 990 "parse.y" { yyval.start = code_offset ; code2(F_PUSHA, field+0) ; } break; -case 160: -#line 984 "parse.y" +case 162: +#line 994 "parse.y" { yyval.start = yystack.l_mark[-1].start ; } break; -case 161: -#line 992 "parse.y" +case 163: +#line 1002 "parse.y" { INST *p5 = CDP(yystack.l_mark[-3].start) ; INST *p8 = CDP(yystack.l_mark[0].start) ; @@ -2719,12 +2763,12 @@ case 161: yyval.start = yystack.l_mark[-5].start ; } break; -case 162: -#line 1010 "parse.y" +case 164: +#line 1020 "parse.y" { yyval.fp = bi_gensub ; } break; -case 163: -#line 1014 "parse.y" +case 165: +#line 1024 "parse.y" { INST *p5 = CDP(yystack.l_mark[-1].start) ; INST *p6 = CDP(yystack.l_mark[0].start) ; @@ -2742,44 +2786,44 @@ case 163: yyval.start = yystack.l_mark[-3].start ; } break; -case 164: -#line 1032 "parse.y" +case 166: +#line 1042 "parse.y" { yyval.fp = bi_sub ; } break; -case 165: -#line 1033 "parse.y" +case 167: +#line 1043 "parse.y" { yyval.fp = bi_gsub ; } break; -case 166: -#line 1038 "parse.y" +case 168: +#line 1048 "parse.y" { yyval.start = code_offset ; code2(F_PUSHA, &field[0]) ; } break; -case 167: -#line 1043 "parse.y" +case 169: +#line 1053 "parse.y" { yyval.start = yystack.l_mark[-1].start ; } break; -case 168: -#line 1047 "parse.y" +case 170: +#line 1057 "parse.y" { yyval.start = code_offset ; code2(F_PUSHA, &field[0]) ; } break; -case 169: -#line 1051 "parse.y" +case 171: +#line 1061 "parse.y" { yyval.start = yystack.l_mark[-1].start ; } break; -case 170: -#line 1059 "parse.y" +case 172: +#line 1069 "parse.y" { resize_fblock(yystack.l_mark[-1].fbp) ; restore_ids() ; switch_code_to_main() ; } break; -case 171: -#line 1068 "parse.y" +case 173: +#line 1078 "parse.y" { eat_nl() ; scope = SCOPE_FUNCT ; @@ -2798,8 +2842,8 @@ case 171: code_warn = code_limit - CODEWARN ; } break; -case 172: -#line 1088 "parse.y" +case 174: +#line 1098 "parse.y" { FBLOCK *fbp ; if ( yystack.l_mark[0].stp->type == ST_NONE ) @@ -2822,20 +2866,20 @@ case 172: yyval.fbp = fbp ; } break; -case 173: -#line 1111 "parse.y" +case 175: +#line 1121 "parse.y" { yyval.fbp = yystack.l_mark[0].fbp ; if ( yystack.l_mark[0].fbp->code ) - compile_error("redefinition of %s" , yystack.l_mark[0].fbp->name) ; + compile_error("redefinition of %s." , yystack.l_mark[0].fbp->name) ; } break; -case 174: -#line 1118 "parse.y" +case 176: +#line 1128 "parse.y" { yyval.ival = 0 ; } break; -case 176: -#line 1123 "parse.y" +case 178: +#line 1133 "parse.y" { yystack.l_mark[0].stp = save_id(yystack.l_mark[0].stp->name) ; yystack.l_mark[0].stp->type = ST_LOCAL_NONE ; @@ -2843,11 +2887,11 @@ case 176: yyval.ival = 1 ; } break; -case 177: -#line 1130 "parse.y" +case 179: +#line 1140 "parse.y" { if ( is_local(yystack.l_mark[0].stp) ) - compile_error("%s is duplicated in argument list", + compile_error("%s is duplicated in argument list.", yystack.l_mark[0].stp->name) ; else { yystack.l_mark[0].stp = save_id(yystack.l_mark[0].stp->name) ; @@ -2857,8 +2901,8 @@ case 177: } } break; -case 178: -#line 1144 "parse.y" +case 180: +#line 1154 "parse.y" { /* we may have to recover from a bungled function definition */ /* can have local ids, before code scope @@ -2868,8 +2912,8 @@ case 178: switch_code_to_main() ; } break; -case 179: -#line 1157 "parse.y" +case 181: +#line 1167 "parse.y" { yyval.start = yystack.l_mark[-1].start ; code2(_CALL, yystack.l_mark[-2].fbp) ; @@ -2880,23 +2924,23 @@ case 179: yystack.l_mark[0].ca_p, token_lineno) ; } break; -case 180: -#line 1169 "parse.y" +case 182: +#line 1179 "parse.y" { yyval.ca_p = (CA_REC *) 0 ; } break; -case 181: -#line 1171 "parse.y" +case 183: +#line 1181 "parse.y" { yyval.ca_p = yystack.l_mark[0].ca_p ; yyval.ca_p->link = yystack.l_mark[-1].ca_p ; yyval.ca_p->arg_num = yystack.l_mark[-1].ca_p ? yystack.l_mark[-1].ca_p->arg_num+1 : 0 ; } break; -case 182: -#line 1186 "parse.y" +case 184: +#line 1196 "parse.y" { yyval.ca_p = (CA_REC *) 0 ; } break; -case 183: -#line 1188 "parse.y" +case 185: +#line 1198 "parse.y" { yyval.ca_p = ZMALLOC(CA_REC) ; yyval.ca_p->link = yystack.l_mark[-2].ca_p ; yyval.ca_p->type = CA_EXPR ; @@ -2904,8 +2948,8 @@ case 183: yyval.ca_p->call_offset = code_offset ; } break; -case 184: -#line 1195 "parse.y" +case 186: +#line 1205 "parse.y" { yyval.ca_p = ZMALLOC(CA_REC) ; yyval.ca_p->link = yystack.l_mark[-2].ca_p ; yyval.ca_p->arg_num = yystack.l_mark[-2].ca_p ? yystack.l_mark[-2].ca_p->arg_num+1 : 0 ; @@ -2913,20 +2957,20 @@ case 184: code_call_id(yyval.ca_p, yystack.l_mark[-1].stp) ; } break; -case 185: -#line 1204 "parse.y" +case 187: +#line 1214 "parse.y" { yyval.ca_p = ZMALLOC(CA_REC) ; yyval.ca_p->type = CA_EXPR ; yyval.ca_p->call_offset = code_offset ; } break; -case 186: -#line 1210 "parse.y" +case 188: +#line 1220 "parse.y" { yyval.ca_p = ZMALLOC(CA_REC) ; code_call_id(yyval.ca_p, yystack.l_mark[-1].stp) ; } break; -#line 2930 "y.tab.c" +#line 2974 "y.tab.c" } yystack.s_mark -= yym; yystate = *yystack.s_mark; diff --git a/awka/parse.h b/awka/parse.h index b4149d8..e995f41 100644 --- a/awka/parse.h +++ b/awka/parse.h @@ -54,31 +54,32 @@ #define FUNCT_ID 310 #define BUILTIN 311 #define LENGTH 312 -#define PRINT 313 -#define PRINTF 314 -#define SPLIT 315 -#define MATCH_FUNC 316 -#define SUB 317 -#define GSUB 318 -#define GENSUB 319 -#define ALENGTH_FUNC 320 -#define ASORT_FUNC 321 -#define DO 322 -#define WHILE 323 -#define FOR 324 -#define BREAK 325 -#define CONTINUE 326 -#define IF 327 -#define ELSE 328 -#define DELETE 329 -#define a_BEGIN 330 -#define a_END 331 -#define EXIT 332 -#define ABORT 333 -#define NEXT 334 -#define NEXTFILE 335 -#define RETURN 336 -#define FUNCTION 337 +#define LENGTH0 313 +#define PRINT 314 +#define PRINTF 315 +#define SPLIT 316 +#define MATCH_FUNC 317 +#define SUB 318 +#define GSUB 319 +#define GENSUB 320 +#define ALENGTH_FUNC 321 +#define ASORT_FUNC 322 +#define DO 323 +#define WHILE 324 +#define FOR 325 +#define BREAK 326 +#define CONTINUE 327 +#define IF 328 +#define ELSE 329 +#define DELETE 330 +#define a_BEGIN 331 +#define a_END 332 +#define EXIT 333 +#define ABORT 334 +#define NEXT 335 +#define NEXTFILE 336 +#define RETURN 337 +#define FUNCTION 338 #ifdef YYSTYPE #undef YYSTYPE_IS_DECLARED #define YYSTYPE_IS_DECLARED 1 diff --git a/awka/parse.y b/awka/parse.y index b696820..0fa9ed9 100644 --- a/awka/parse.y +++ b/awka/parse.y @@ -57,7 +57,7 @@ static int scope ; static FBLOCK *active_funct ; /* when scope is SCOPE_FUNCT */ -#define code_address(x) if( is_local(x) ) \ +#define code_address(x) if ( is_local(x) ) \ code2op(L_PUSHA, (x)->offset) ;\ else code2(_PUSHA, (x)->stval.cp) @@ -118,7 +118,7 @@ PTR ptr ; %token DOUBLE STRING_ RE %token ID D_ID %token FUNCT_ID -%token BUILTIN LENGTH +%token BUILTIN LENGTH LENGTH0 %token FIELD %token PRINT PRINTF SPLIT MATCH_FUNC SUB GSUB GENSUB ALENGTH_FUNC ASORT_FUNC @@ -139,7 +139,7 @@ PTR ptr ; %type array_loop_front %type return_statement %type split_front re_arg sub_back gensub_back -%type arglist args +%type arglist args len_arg %type print sub_or_gsub gensub %type funct_start funct_head %type call_args ca_front ca_back @@ -184,7 +184,7 @@ PA_block : block | expr COMMA { INST *p1 = CDP($1) ; - int len ; + int len ; code_push(p1, code_ptr - p1, scope, active_funct) ; code_ptr = p1 ; @@ -192,9 +192,9 @@ PA_block : block code2op(_RANGE, 1) ; code_ptr += 3 ; len = code_pop(code_ptr) ; - code_ptr += len ; + code_ptr += len ; code1(_STOP) ; - p1 = CDP($1) ; + p1 = CDP($1) ; p1[2].op = code_ptr - (p1+1) ; } expr @@ -250,17 +250,17 @@ statement : block code2(_GOTO, 0) ; } | return_statement { if ( scope != SCOPE_FUNCT ) - compile_error("return outside function body") ; + compile_error("return outside function body.") ; } | NEXT separator { if ( scope != SCOPE_MAIN && scope != SCOPE_FUNCT ) - compile_error( "improper use of next" ) ; + compile_error( "improper use of next." ) ; $$ = code_offset ; code1(_NEXT) ; } | NEXTFILE separator { if ( scope != SCOPE_MAIN && scope != SCOPE_FUNCT ) - compile_error( "improper use of nextfile" ) ; + compile_error( "improper use of nextfile." ) ; $$ = code_offset ; code1(_NEXTFILE) ; } @@ -407,10 +407,10 @@ lvalue : ID BI_REC *p = $1 ; $$ = $2; if (strcmp(p->name, "argval")) - compile_error("builtin function '%s' used as an lvalue", p->name); + compile_error("builtin function '%s' used as an lvalue.", p->name); if ( (int)p->min_args > $4 || (int)p->max_args < $4 ) compile_error( - "wrong number of arguments in call to %s" , + "wrong number of arguments in call to %s." , p->name ) ; if ( p->min_args != p->max_args ) /* variable args */ { code1(_PUSHINT) ; code1($4) ; } @@ -431,25 +431,35 @@ args : expr %prec LPAREN { $$ = $1 + 1 ; } ; +len_arg : expr %prec LPAREN + { $$ = 1 ; } + ; + builtin : BUILTIN mark LPAREN arglist RPAREN { - BI_REC *p = $1 ; + BI_REC *p = $1 ; $$ = $2 ; if ( (int)p->min_args > $4 || (int)p->max_args < $4 ) compile_error( - "wrong number of arguments in call to %s" , + "wrong number of arguments in call to %s." , p->name ) ; if ( p->min_args != p->max_args ) /* variable args */ { code1(_PUSHINT) ; code1($4) ; } code2(_BUILTIN , p->fp) ; } - | LENGTH /* this is an irritation */ - { - $$ = code_offset ; - code1(_PUSHINT) ; code1(0) ; - code2(_BUILTIN, $1->fp) ; - } + | LENGTH mark LPAREN len_arg RPAREN + { + $$ = $2 ; + code1(_PUSHINT) ; code1(1) ; + code2(_BUILTIN, bi_length) ; + } + | LENGTH0 /* this is an irritation (diverted here from scan.c) */ + { + $$ = code_offset ; + code1(_PUSHINT) ; code1(0) ; + code2(_BUILTIN, bi_length) ; + } ; /* an empty production to store the code_ptr */ @@ -460,7 +470,7 @@ mark : /* empty */ statement : print mark pr_args pr_direction separator { code2(_PRINT, $1) ; if ( $1 == bi_printf && $3 == 0 ) - compile_error("no arguments in call to printf") ; + compile_error("no arguments in call to printf.") ; print_flag = 0 ; $$ = $2 ; } @@ -566,7 +576,7 @@ statement : while_front statement code_jmp(_JNZ, CDP($2)) ; BC_clear(code_ptr, CDP(saved_offset)) ; } - else /* while(1) */ + else /* while (1) */ { code_jmp(_JMP, p1) ; BC_clear(code_ptr, CDP($2)) ; @@ -592,7 +602,7 @@ statement : for1 for2 for3 statement code_ptr += len ; code_jmp(_JNZ, CDP($4)) ; } - else /* for(;;) */ + else /* for (;;) */ code_jmp(_JMP, p4) ; BC_clear(code_ptr, CDP(cont_offset)) ; @@ -662,7 +672,7 @@ lvalue : ID mark LBOX args RBOX { code2op(A_CAT, $4) ; } check_array($1) ; - if( is_local($1) ) + if ( is_local($1) ) { code2op(LAE_PUSHA, $1->offset) ; } else code2(AE_PUSHA, $1->stval.array) ; $$ = $2 ; @@ -675,7 +685,7 @@ p_expr : ID mark LBOX args RBOX %prec AND { code2op(A_CAT, $4) ; } check_array($1) ; - if( is_local($1) ) + if ( is_local($1) ) { code2op(LAE_PUSHI, $1->offset) ; } else code2(AE_PUSHI, $1->stval.array) ; $$ = $2 ; @@ -687,7 +697,7 @@ p_expr : ID mark LBOX args RBOX %prec AND { code2op(A_CAT,$4) ; } check_array($1) ; - if( is_local($1) ) + if ( is_local($1) ) { code2op(LAE_PUSHA, $1->offset) ; } else code2(AE_PUSHA, $1->stval.array) ; if ( $6 == '+' ) code1(_POST_INC) ; @@ -766,7 +776,7 @@ field : FIELD { code2op(A_CAT, $5) ; } check_array($2) ; - if( is_local($2) ) + if ( is_local($2) ) { code2op(LAE_PUSHI, $2->offset) ; } else code2(AE_PUSHI, $2->stval.array) ; @@ -1111,7 +1121,7 @@ funct_head : FUNCTION ID { $$ = $2 ; if ( $2->code ) - compile_error("redefinition of %s" , $2->name) ; + compile_error("redefinition of %s." , $2->name) ; } ; @@ -1129,7 +1139,7 @@ f_args : ID | f_args COMMA ID { if ( is_local($3) ) - compile_error("%s is duplicated in argument list", + compile_error("%s is duplicated in argument list.", $3->name) ; else { $3 = save_id($3->name) ; @@ -1219,7 +1229,8 @@ ca_back : expr RPAREN /* resize the code for a user function */ -static void resize_fblock( fbp ) +static void +resize_fblock( fbp ) FBLOCK *fbp ; { CODEBLOCK *p = ZMALLOC(CODEBLOCK) ; @@ -1240,7 +1251,8 @@ static void resize_fblock( fbp ) or F_PUSH to F_PUSHI */ -static void field_A2I() +static void +field_A2I() { CELL *cp ; if ( code_ptr[-1].op == FE_PUSHA && @@ -1274,10 +1286,11 @@ static void field_A2I() /* we've seen an ID in a context where it should be a VAR, check that's consistent with previous usage */ -static void check_var( p ) +static void +check_var( p ) register SYMTAB *p ; { - switch(p->type) + switch (p->type) { case ST_NONE : /* new id */ st_none: @@ -1299,17 +1312,18 @@ static void check_var( p ) goto st_none; default : - type_error(p) ; + //type_error(p) ; break ; } } /* we've seen an ID in a context where it should be an ARRAY, check that's consistent with previous usage */ -static void check_array(p) +static void +check_array(p) register SYMTAB *p ; { - switch(p->type) + switch (p->type) { case ST_NONE : /* a new array */ st_none: @@ -1330,11 +1344,13 @@ static void check_array(p) if (is_ext_builtin(p->name)) goto st_none; - default : type_error(p) ; break ; + default : + type_error(p) ; break ; } } -static void code_array(p) +static void +code_array(p) register SYMTAB *p ; { if ( is_local(p) ) code2op(LA_PUSHA, p->offset) ; @@ -1344,7 +1360,8 @@ static void code_array(p) /* we've seen an ID as an argument to a user defined function */ -static void code_call_id( p, ip ) +static void +code_call_id( p, ip ) register CA_REC *p ; register SYMTAB *ip ; { static CELL dummy ; @@ -1353,7 +1370,7 @@ static void code_call_id( p, ip ) /* This always get set now. So that fcall:relocate_arglist works. */ - switch( ip->type ) + switch ( ip->type ) { case ST_VAR : p->type = CA_EXPR ; @@ -1402,7 +1419,8 @@ static void code_call_id( p, ip ) /* an RE by itself was coded as _MATCH0 , change to push as an expression */ -static void RE_as_arg() +static void +RE_as_arg() { CELL *cp = ZMALLOC(CELL) ; code_ptr -= 2 ; @@ -1415,7 +1433,7 @@ static void RE_as_arg() static void switch_code_to_main() { - switch(scope) + switch (scope) { case SCOPE_BEGIN : *begin_code_p = active_code ; diff --git a/awka/scan.c b/awka/scan.c index ea5d3eb..9afbd50 100644 --- a/awka/scan.c +++ b/awka/scan.c @@ -66,28 +66,43 @@ static int PROTO(collect_RE, (void)) ; *----------------------------*/ char *pfile_name ; -STRING *program_string; +STRING *program_string = (STRING *) 0 ; PFILE *pfile_list ; static unsigned char *buffer ; unsigned char *buffp = NULL ; /* unsigned so it works with 8 bit chars */ -static int program_fd ; -static int eof_flag ; +static int program_fd = 0 ; +static int eof_flag = 0 ; -extern char **vardeclare; -extern int vdec_no, vdec_allc; +extern char **vardeclare ; +extern int vdec_no, vdec_allc ; -int _true_re = 0; +int _true_re = 0 ; /* position used for error reporting */ int line_pos = 0 ; -void PROTO(init_extbi, (void)); - +void PROTO(init_extbi, (void)) ; + +/* + * +------------------+------------+------------+----------------+-----------------------------------+ + * | Inout Type | program_fd | pfile_name | cmdine_program | eof_flag (1) | + * +------------------+------------+------------+----------------+-----------------------------------+ + * | | | | | | + * | inline script | -1 | |