X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perly.c;h=938a5745c563b36a2f4cc4c86911e8224610d479;hb=a9ef352ac26829339bf17aa20568b3bde2fb1dd0;hp=33b4a32ceef657a311b1669ace3a37f6c047372f;hpb=6eb13c3b624098fc688ac86672bc30e26cbf8fd4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perly.c b/perly.c index 33b4a32..938a574 100644 --- a/perly.c +++ b/perly.c @@ -1,1042 +1,2398 @@ -char rcsid[] = "$Header: perly.c,v 3.0.1.7 90/08/13 22:22:22 lwall Locked $\nPatch level: ###\n"; -/* - * Copyright (c) 1989, Larry Wall - * - * You may distribute under the terms of the GNU General Public License - * as specified in the README file that comes with the perl 3.0 kit. - * - * $Log: perly.c,v $ - * Revision 3.0.1.7 90/08/13 22:22:22 lwall - * patch28: defined(@array) and defined(%array) didn't work right - * - * Revision 3.0.1.6 90/08/09 04:55:50 lwall - * patch19: added -x switch to extract script from input trash - * patch19: Added -c switch to do compilation only - * patch19: added numeric interpretation of $] - * patch19: added require operator - * patch19: $0, %ENV, @ARGV were wrong in dumped script - * patch19: . is now explicitly in @INC (and last) - * - * Revision 3.0.1.5 90/03/27 16:20:57 lwall - * patch16: MSDOS support - * patch16: do FILE inside eval blows up - * - * Revision 3.0.1.4 90/02/28 18:06:41 lwall - * patch9: perl can now start up other interpreters scripts - * patch9: nested evals clobbered their longjmp environment - * patch9: eval could mistakenly return undef in array context - * - * Revision 3.0.1.3 89/12/21 20:15:41 lwall - * patch7: ANSI strerror() is now supported - * patch7: errno may now be a macro with an lvalue - * patch7: allowed setuid scripts to have a space after #! - * - * Revision 3.0.1.2 89/11/17 15:34:42 lwall - * patch5: fixed possible confusion about current effective gid - * - * Revision 3.0.1.1 89/11/11 04:50:04 lwall - * patch2: moved yydebug to where its type didn't matter - * - * Revision 3.0 89/10/18 15:22:21 lwall - * 3.0 baseline - * - */ - +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/91"; +#endif +#define YYBYACC 1 +#line 16 "perly.y" #include "EXTERN.h" #include "perl.h" -#include "perly.h" -#include "patchlevel.h" - -#ifdef IAMSUID -#ifndef DOSUID -#define DOSUID -#endif -#endif -#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW -#ifdef DOSUID -#undef DOSUID -#endif -#endif - -static char* moreswitches(); -static char* cddir; -extern char **environ; -static bool minus_c; +#define yydebug PL_yydebug +#define yynerrs PL_yynerrs +#define yyerrflag PL_yyerrflag +#define yychar PL_yychar +#define yyval PL_yyval +#define yylval PL_yylval -main(argc,argv,env) -register int argc; -register char **argv; -register char **env; +#ifdef PERL_OBJECT +static void +Dep(CPerlObj *pPerl) { - register STR *str; - register char *s; - char *index(), *strcpy(), *getenv(); - bool dosearch = FALSE; -#ifdef DOSUID - char *validarg = ""; -#endif - -#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW -#ifdef IAMSUID -#undef IAMSUID - fatal("suidperl is no longer needed since the kernel can now execute\n\ -setuid perl scripts securely.\n"); -#endif -#endif - - origargv = argv; - origargc = argc; - uid = (int)getuid(); - euid = (int)geteuid(); - gid = (int)getgid(); - egid = (int)getegid(); -#ifdef MSDOS - /* - * There is no way we can refer to them from Perl so close them to save - * space. The other alternative would be to provide STDAUX and STDPRN - * filehandles. - */ - (void)fclose(stdaux); - (void)fclose(stdprn); -#endif - if (do_undump) { - origfilename = savestr(argv[0]); - do_undump = 0; - loop_ptr = -1; /* start label stack again */ - goto just_doit; - } - (void)sprintf(index(rcsid,'#'), "%d\n", PATCHLEVEL); - linestr = Str_new(65,80); - str_nset(linestr,"",0); - str = str_make("",0); /* first used for -I flags */ - curstash = defstash = hnew(0); - curstname = str_make("main",4); - stab_xhash(stabent("_main",TRUE)) = defstash; - incstab = hadd(aadd(stabent("INC",TRUE))); - incstab->str_pok |= SP_MULTI; - for (argc--,argv++; argc > 0; argc--,argv++) { - if (argv[0][0] != '-' || !argv[0][1]) - break; -#ifdef DOSUID - if (*validarg) - validarg = " PHOOEY "; - else - validarg = argv[0]; + pPerl->deprecate("\"do\" to call subroutines"); +} +#define dep() Dep(this) +#else +static void +dep(void) +{ + deprecate("\"do\" to call subroutines"); +} #endif - s = argv[0]+1; - reswitch: - switch (*s) { - case 'a': - case 'c': - case 'd': - case 'D': - case 'i': - case 'n': - case 'p': - case 'u': - case 'U': - case 'v': - case 'w': - if (s = moreswitches(s)) - goto reswitch; - break; - case 'e': -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -e allowed in setuid scripts"); -#endif - if (!e_fp) { - e_tmpname = savestr(TMPPATH); - (void)mktemp(e_tmpname); - e_fp = fopen(e_tmpname,"w"); - if (!e_fp) - fatal("Cannot open temporary file"); - } - if (argv[1]) { - fputs(argv[1],e_fp); - argc--,argv++; - } - (void)putc('\n', e_fp); - break; - case 'I': -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -I allowed in setuid scripts"); +#line 30 "perly.y" +#define YYERRCODE 256 +static short yylhs[] = { -1, + 45, 0, 9, 7, 10, 8, 11, 11, 11, 12, + 12, 12, 12, 24, 24, 24, 24, 24, 24, 24, + 15, 15, 15, 14, 14, 42, 42, 13, 13, 13, + 13, 13, 13, 13, 26, 26, 27, 27, 28, 29, + 30, 31, 32, 44, 44, 1, 1, 1, 1, 3, + 38, 38, 46, 4, 5, 6, 39, 40, 40, 41, + 41, 47, 47, 49, 48, 16, 16, 16, 25, 25, + 25, 36, 36, 36, 36, 36, 36, 36, 36, 50, + 36, 37, 37, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, + 33, 34, 34, 34, 2, 2, 43, 23, 18, 19, + 20, 21, 22, 35, 35, 35, 35, +}; +static short yylen[] = { 2, + 0, 2, 4, 0, 4, 0, 0, 2, 2, 2, + 1, 2, 3, 1, 1, 3, 3, 3, 3, 3, + 0, 2, 6, 7, 7, 0, 2, 8, 8, 10, + 9, 8, 11, 3, 0, 1, 0, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 1, 1, 4, + 1, 0, 5, 0, 0, 0, 1, 0, 1, 1, + 1, 3, 2, 0, 7, 3, 3, 1, 2, 3, + 1, 3, 5, 6, 3, 3, 5, 2, 4, 0, + 5, 1, 1, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 5, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, + 2, 4, 3, 4, 1, 5, 1, 4, 5, 4, + 1, 1, 1, 5, 6, 5, 6, 5, 4, 5, + 1, 1, 3, 4, 3, 2, 2, 4, 5, 4, + 5, 4, 5, 1, 2, 2, 1, 2, 2, 2, + 1, 3, 1, 3, 4, 4, 6, 1, 1, 0, + 1, 0, 1, 2, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 1, 1, 1, 1, +}; +static short yydefred[] = { 1, + 0, 7, 0, 45, 56, 54, 0, 54, 8, 46, + 9, 11, 0, 47, 48, 49, 0, 0, 0, 63, + 64, 14, 4, 158, 0, 0, 131, 0, 153, 0, + 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 165, 166, 0, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, + 0, 0, 121, 123, 0, 0, 0, 0, 159, 51, + 0, 57, 0, 62, 0, 7, 174, 177, 176, 175, + 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, + 4, 4, 0, 0, 0, 0, 0, 148, 0, 0, + 0, 0, 78, 0, 172, 0, 137, 0, 0, 0, + 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 111, 0, 169, 170, 171, 173, 0, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 103, 104, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 50, 59, 0, 0, + 0, 76, 0, 0, 80, 0, 0, 0, 0, 0, + 0, 0, 4, 152, 154, 0, 0, 0, 0, 0, + 0, 0, 113, 0, 135, 0, 0, 110, 27, 0, + 0, 19, 0, 0, 0, 0, 66, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 0, + 0, 0, 0, 0, 133, 0, 0, 61, 60, 53, + 0, 3, 0, 156, 0, 0, 114, 0, 42, 0, + 43, 0, 0, 0, 0, 167, 0, 0, 36, 41, + 0, 0, 0, 155, 164, 79, 0, 138, 0, 140, + 0, 112, 0, 0, 0, 0, 0, 142, 0, 0, + 0, 120, 0, 118, 0, 129, 0, 134, 0, 77, + 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, + 73, 139, 141, 128, 0, 126, 0, 0, 143, 119, + 0, 124, 130, 116, 65, 157, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 127, 125, 74, 7, 28, + 29, 0, 0, 24, 25, 0, 32, 0, 0, 0, + 22, 0, 0, 0, 31, 5, 0, 30, 0, 0, + 33, 0, 23, +}; +static short yydgoto[] = { 1, + 9, 66, 10, 18, 95, 17, 86, 339, 89, 328, + 3, 11, 12, 68, 344, 263, 70, 71, 72, 73, + 74, 75, 76, 269, 78, 270, 259, 261, 264, 272, + 260, 262, 113, 198, 91, 79, 238, 81, 83, 179, + 250, 142, 267, 13, 2, 14, 15, 16, 85, 256, +}; +static short yysindex[] = { 0, + 0, 0, -66, 0, 0, 0, -48, 0, 0, 0, + 0, 0, 645, 0, 0, 0, -232, -227, -27, 0, + 0, 0, 0, 0, -23, -23, 0, -6, 0, 2099, + 0, 0, 13, 20, 24, 25, -34, 2099, 27, 28, + 29, 1021, 965, -23, 1084, 1348, -217, 0, 0, -23, + 2099, 2099, 2099, 2099, 2099, 2099, 1404, 0, 2099, 2099, + 1460, -23, -23, -23, -23, 2099, -206, 0, 335, 3925, + -73, -68, 0, 0, -47, 40, 32, 61, 0, 0, + -39, 0, -157, 0, -145, 0, 0, 0, 0, 0, + 2099, 73, 2099, 825, -39, -157, 0, 0, 0, 0, + 0, 0, 75, 3925, 78, 1519, 965, 0, 825, 0, + -73, 61, 0, 2099, 0, 77, 0, 825, -16, -9, + -51, 2099, 0, 61, 87, 87, 87, -86, -86, 33, + -40, 87, 87, 0, -81, 0, 0, 0, 0, 825, + -39, 0, 2099, 2099, 2099, 2099, 2099, 2099, 2099, 2099, + 2099, 2099, 2099, 2099, 2099, 2099, 2099, 2099, 2099, 2099, + 2099, 2099, 2099, 2099, 0, 0, 30, 2099, 2099, 2099, + 2099, 2099, 2099, 1694, 0, 2099, 0, 0, -49, -118, + 189, 0, 2099, 353, 0, -39, 2099, 2099, 2099, 2099, + 104, 1753, 0, 0, 0, -24, 8, 85, 2099, 61, + 1809, 1865, 0, 23, 0, 2099, 54, 0, 0, -269, + -269, 0, -269, -269, -269, -151, 0, -43, 1121, 825, + 673, 50, 363, 3925, 1233, 3757, 4023, 2308, 266, -82, + 87, 87, 2099, 0, 1928, 2099, 0, 111, 51, 12, + 76, 14, 90, 39, 0, -22, 3925, 0, 0, 0, + 2099, 0, 121, 0, 2099, 2099, 0, -269, 0, 124, + 0, 125, -269, 126, 130, 0, 112, 335, 0, 0, + 131, 136, 2099, 0, 0, 0, -14, 0, 1, 0, + 4, 0, 133, 2099, 55, 2099, 49, 0, 6, 197, + 2099, 0, 89, 0, 94, 0, 100, 0, 144, 0, + 1175, 0, 92, 92, 92, 92, 2099, 92, 2099, 171, + 0, 0, 0, 0, 202, 0, 3963, 108, 0, 0, + 188, 0, 0, 0, 0, 0, 0, -206, -206, -238, + -238, 199, -206, 211, 92, 0, 0, 0, 0, 0, + 0, 92, 241, 0, 0, 92, 0, 1753, -206, 326, + 0, 2099, -206, 256, 0, 0, 259, 0, 92, 92, + 0, -238, 0, +}; +static short yyrindex[] = { 0, + 0, 0, 249, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 184, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2273, 426, 0, + 0, 2909, 2959, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 0, -10, 2776, + 3024, 3069, 0, 0, 2376, 2140, 0, 200, 0, 0, + 0, 0, -44, 0, 0, 0, 0, 0, 0, 0, + 2421, 0, 0, 105, 0, 198, 0, 0, 0, 0, + 0, 0, 0, 3183, 0, 0, 319, 0, 3681, 525, + 586, 2509, 0, 0, 0, 2185, 0, 3731, 3024, 0, + 0, 2421, 0, 2552, 3195, 3260, 3305, -37, 3112, 2657, + 0, 3348, 3384, 0, 0, 0, 0, 0, 0, 3777, + 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, 2707, 0, 0, 0, 0, + 909, 0, 319, 0, 0, 0, 320, 0, 0, 0, + 0, 306, 0, 0, 0, 0, 325, 0, 0, 2788, + 0, 0, 0, 0, 0, 0, 2833, 0, 0, -5, + 22, 0, 68, 69, 70, 702, 0, 0, 2464, 1296, + 1560, 3541, 3584, 3868, 0, 3856, 3820, 3810, 1616, 3620, + 3431, 3479, 0, 0, 0, 0, 0, 2228, 0, 0, + 0, 0, 0, 0, 0, 0, 3899, 0, 0, 0, + 309, 0, 0, 0, 0, 2421, 0, 79, 0, 0, + 0, 0, 330, 0, 0, 0, 0, 84, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 317, 0, + 0, 0, 0, 0, 0, 0, 1982, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 59, 59, 154, + 154, 0, 59, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 340, 59, 909, + 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, + 0, 154, 0, +}; +static short yygindex[] = { 0, + 0, 0, 0, 374, 351, 0, -12, 0, 946, 413, + -83, 0, 0, 0, -311, -13, 4139, 4198, 0, 0, + 0, 0, 0, 372, -8, 0, 0, 246, -131, 43, + 86, 208, -45, -169, 987, 0, 0, 0, 0, 308, + 0, -271, 0, 0, 0, 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 4425 +static short yytable[] = { 69, + 207, 62, 181, 105, 168, 102, 105, 204, 168, 248, + 20, 208, 62, 253, 58, 285, 274, 170, 298, 345, + 105, 105, 172, 202, 80, 105, 311, 148, 149, 82, + 15, 84, 121, 93, 112, 18, 150, 342, 343, 122, + 150, 312, 124, 131, 313, 182, 319, 135, 15, 169, + 363, 275, 97, 18, 171, 105, 340, 341, 26, 98, + 271, 347, 39, 99, 100, 62, 105, 106, 107, 235, + 293, 141, 295, 23, 170, 173, 205, 355, 58, 174, + 39, 358, 112, 23, 187, 188, 189, 190, 191, 192, + 175, 26, 196, 197, 26, 26, 26, 297, 26, 23, + 26, 26, 178, 26, 176, 200, 169, 318, 16, 17, + 20, 180, 183, 112, 193, 203, 201, 26, 194, 38, + 236, 321, 26, 206, 40, 276, 16, 17, 20, 210, + 211, 213, 214, 215, 216, 217, 218, 38, 251, 62, + 168, 310, 15, 292, 284, 150, 149, 282, 150, 26, + 291, 307, 233, 21, 239, 240, 241, 242, 243, 244, + 246, 300, 150, 150, 303, 304, 305, 150, 294, 197, + 306, 308, 150, 258, 211, 332, 211, 168, 268, 316, + 273, 26, 296, 26, 26, 277, 21, 279, 281, 21, + 21, 21, 283, 21, 309, 21, 21, 150, 21, 4, + 5, 6, 325, 7, 8, 299, 154, 155, 19, 150, + 302, 335, 21, 322, 327, 148, 149, 21, 323, 287, + 357, 289, 290, 163, 324, 314, 164, 167, 338, 165, + 166, 167, 337, 87, 105, 105, 105, 105, 88, 346, + 68, 105, 112, 105, 21, 148, 149, 112, 2, 105, + 105, 105, 105, 148, 149, 350, 148, 149, 68, 105, + 105, 101, 105, 105, 105, 105, 105, 105, 105, 348, + 315, 105, 148, 149, 148, 149, 21, 197, 21, 21, + 352, 44, 148, 149, 44, 44, 44, 234, 44, 320, + 44, 44, 68, 44, 336, 258, 359, 148, 149, 360, + 148, 149, 148, 149, 148, 149, 52, 44, 148, 149, + 148, 149, 44, 252, 26, 26, 26, 26, 26, 26, + 58, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 69, 148, 149, 26, 26, 44, + 26, 26, 26, 26, 26, 148, 149, 148, 149, 26, + 26, 26, 26, 26, 26, 163, 168, 26, 164, 162, + 37, 165, 166, 167, 35, 163, 26, 160, 26, 26, + 40, 44, 148, 149, 44, 37, 150, 150, 150, 150, + 35, 21, 96, 150, 77, 150, 148, 149, 150, 212, + 354, 150, 150, 254, 334, 164, 255, 265, 165, 166, + 167, 150, 150, 186, 150, 150, 150, 150, 150, 21, + 21, 21, 21, 21, 21, 157, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 148, + 149, 0, 21, 21, 0, 21, 21, 21, 21, 21, + 0, 0, 0, 168, 21, 21, 21, 21, 21, 21, + 356, 0, 21, 168, 4, 5, 6, 0, 7, 8, + 0, 21, 0, 21, 21, 0, 151, 0, 0, 151, + 0, 68, 68, 68, 68, 150, 0, 0, 68, 0, + 0, 0, 0, 151, 151, 150, 0, 0, 151, 0, + 0, 0, 0, 148, 149, 0, 68, 68, 148, 149, + 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, + 0, 44, 44, 44, 0, 0, 151, 44, 151, 0, + 44, 44, 44, 44, 0, 0, 0, 44, 44, 0, + 44, 44, 44, 44, 44, 0, 0, 0, 0, 44, + 44, 44, 44, 44, 44, 0, 0, 44, 151, 0, + 0, 0, 152, 153, 154, 155, 44, 174, 44, 44, + 174, 174, 174, 0, 174, 158, 174, 174, 158, 174, + 162, 163, 0, 0, 164, 0, 0, 165, 166, 167, + 0, 0, 158, 158, 0, 0, 0, 158, 174, 0, + 0, 4, 5, 6, 0, 7, 8, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, + 0, 0, 0, 147, 0, 158, 0, 158, 175, 0, + 0, 175, 175, 175, 0, 175, 115, 175, 175, 115, + 175, 148, 149, 151, 0, 0, 0, 0, 0, 152, + 153, 154, 155, 115, 115, 0, 0, 158, 115, 175, + 174, 154, 156, 158, 159, 160, 161, 162, 163, 0, + 0, 164, 0, 0, 165, 166, 167, 0, 163, 0, + 0, 164, 0, 0, 165, 166, 167, 52, 115, 0, + 62, 64, 50, 0, 57, 0, 65, 60, 0, 59, + 0, 0, 0, 0, 0, 0, 0, 151, 151, 151, + 151, 0, 0, 58, 151, 0, 151, 0, 63, 0, + 0, 175, 151, 151, 151, 151, 329, 330, 331, 0, + 333, 0, 151, 151, 0, 151, 151, 151, 151, 151, + 151, 151, 0, 0, 151, 61, 0, 151, 151, 151, + 0, 0, 67, 0, 0, 67, 0, 349, 0, 0, + 0, 0, 0, 0, 351, 0, 0, 0, 353, 0, + 67, 0, 0, 168, 0, 0, 0, 23, 0, 0, + 53, 361, 362, 0, 0, 0, 0, 0, 0, 0, + 0, 174, 174, 174, 174, 174, 0, 174, 174, 174, + 0, 0, 0, 174, 67, 150, 158, 158, 158, 158, + 0, 0, 0, 158, 174, 158, 174, 174, 174, 174, + 174, 158, 158, 158, 158, 174, 174, 174, 174, 174, + 174, 158, 158, 174, 158, 158, 158, 158, 158, 158, + 158, 0, 174, 158, 174, 174, 158, 158, 158, 0, + 0, 0, 175, 175, 175, 175, 175, 0, 175, 175, + 175, 0, 0, 0, 175, 0, 0, 115, 115, 115, + 115, 0, 0, 0, 115, 175, 115, 175, 175, 175, + 175, 175, 115, 115, 115, 115, 175, 175, 175, 175, + 175, 175, 115, 115, 175, 115, 115, 115, 115, 115, + 115, 115, 0, 175, 115, 175, 175, 115, 115, 115, + 22, 24, 25, 26, 27, 28, 0, 29, 30, 31, + 0, 0, 0, 32, 0, 168, 33, 34, 35, 36, + 0, 0, 0, 37, 38, 0, 39, 40, 41, 42, + 43, 0, 0, 0, 0, 44, 45, 46, 47, 48, + 49, 44, 0, 51, 44, 44, 44, 150, 44, 0, + 44, 44, 54, 44, 55, 56, 0, 0, 67, 152, + 0, 154, 155, 0, 0, 0, 0, 44, 0, 0, + 0, 0, 44, 67, 67, 67, 67, 162, 163, 0, + 67, 164, 0, 0, 165, 166, 167, 108, 0, 0, + 117, 0, 0, 0, 0, 0, 0, 52, 67, 44, + 62, 64, 50, 0, 57, 0, 65, 60, 0, 59, + 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 177, 0, 63, 114, + 115, 44, 0, 0, 44, 0, 123, 0, 0, 0, + 185, 0, 0, 0, 0, 0, 0, 0, 136, 137, + 138, 139, 0, 52, 0, 61, 62, 64, 50, 0, + 57, 0, 65, 60, 0, 59, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 63, 0, 209, 23, 0, 0, + 53, 0, 0, 199, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 61, 0, 154, 155, 0, 52, 0, 0, 62, + 64, 50, 0, 57, 249, 65, 60, 0, 59, 162, + 163, 257, 0, 164, 0, 0, 165, 166, 167, 0, + 0, 0, 0, 23, 0, 0, 53, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, + 0, 44, 44, 44, 61, 0, 0, 44, 0, 0, + 44, 44, 44, 44, 0, 0, 0, 44, 44, 0, + 44, 44, 44, 44, 44, 0, 0, 0, 0, 44, + 44, 44, 44, 44, 44, 0, 23, 44, 0, 53, + 0, 168, 0, 0, 0, 326, 44, 0, 44, 44, + 0, 110, 25, 26, 27, 28, 88, 29, 30, 31, + 0, 0, 0, 32, 0, 0, 0, 157, 0, 0, + 0, 0, 0, 150, 38, 0, 39, 40, 41, 42, + 43, 0, 0, 0, 0, 44, 45, 46, 47, 48, + 49, 0, 0, 51, 0, 168, 0, 0, 0, 0, + 0, 0, 54, 0, 55, 56, 0, 24, 25, 26, + 27, 28, 0, 29, 30, 31, 0, 0, 0, 32, + 286, 0, 0, 0, 0, 157, 0, 150, 0, 0, + 38, 0, 39, 40, 41, 42, 43, 0, 0, 0, + 0, 44, 45, 46, 47, 48, 49, 0, 0, 51, + 0, 0, 0, 168, 0, 0, 0, 0, 54, 0, + 55, 56, 0, 0, 0, 0, 89, 0, 0, 89, + 116, 25, 26, 27, 28, 0, 29, 30, 31, 0, + 0, 0, 32, 89, 89, 150, 0, 0, 89, 0, + 0, 0, 0, 38, 0, 39, 40, 41, 42, 43, + 0, 0, 0, 0, 44, 45, 46, 47, 48, 49, + 52, 0, 51, 62, 64, 50, 0, 57, 89, 65, + 60, 54, 59, 55, 56, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 120, 152, 153, 154, + 155, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 158, 159, 160, 161, 162, 163, 0, 0, 164, + 0, 0, 165, 166, 167, 0, 52, 0, 61, 62, + 64, 50, 0, 57, 130, 65, 60, 0, 59, 0, + 0, 0, 0, 0, 0, 151, 0, 0, 0, 0, + 0, 152, 153, 154, 155, 0, 0, 63, 0, 0, + 0, 0, 0, 53, 156, 158, 159, 160, 161, 162, + 163, 0, 0, 164, 0, 0, 165, 166, 167, 0, + 0, 0, 52, 0, 61, 62, 64, 50, 0, 57, + 0, 65, 60, 0, 59, 0, 0, 0, 0, 0, + 0, 0, 0, 151, 0, 0, 0, 0, 0, 152, + 153, 154, 155, 63, 0, 0, 0, 0, 0, 53, + 0, 0, 156, 158, 159, 160, 161, 162, 163, 0, + 0, 164, 0, 0, 165, 166, 167, 0, 0, 0, + 61, 52, 134, 0, 62, 64, 50, 0, 57, 195, + 65, 60, 0, 59, 0, 0, 0, 89, 89, 89, + 89, 0, 0, 0, 89, 0, 89, 0, 0, 0, + 0, 0, 63, 89, 0, 53, 0, 0, 0, 0, + 0, 0, 89, 89, 0, 89, 89, 89, 89, 89, + 90, 0, 0, 90, 24, 25, 26, 27, 28, 61, + 29, 30, 31, 0, 0, 0, 32, 90, 90, 0, + 0, 0, 90, 0, 0, 0, 0, 38, 0, 39, + 40, 41, 42, 43, 0, 0, 0, 0, 44, 45, + 46, 47, 48, 49, 53, 0, 51, 0, 0, 0, + 0, 0, 90, 0, 0, 54, 91, 55, 56, 91, + 24, 25, 26, 27, 28, 0, 29, 30, 31, 0, + 0, 0, 32, 91, 91, 0, 0, 0, 91, 0, + 0, 0, 0, 38, 0, 39, 40, 41, 42, 43, + 0, 0, 0, 0, 44, 45, 46, 47, 48, 49, + 0, 0, 51, 0, 0, 0, 0, 0, 91, 0, + 0, 54, 0, 55, 56, 0, 24, 25, 26, 27, + 28, 0, 29, 30, 31, 0, 52, 0, 32, 62, + 64, 50, 0, 57, 245, 65, 60, 0, 59, 38, + 0, 39, 40, 41, 42, 43, 0, 0, 0, 0, + 44, 45, 46, 47, 48, 49, 0, 63, 51, 0, + 0, 0, 0, 0, 0, 0, 0, 54, 0, 55, + 56, 0, 0, 0, 0, 24, 25, 26, 27, 28, + 0, 29, 30, 31, 61, 52, 0, 32, 62, 64, + 50, 0, 57, 0, 65, 60, 0, 59, 38, 0, + 39, 40, 41, 42, 43, 0, 0, 0, 0, 44, + 45, 46, 47, 48, 49, 0, 63, 51, 0, 53, + 0, 0, 0, 0, 0, 0, 54, 0, 55, 56, + 0, 90, 90, 90, 90, 0, 0, 0, 90, 0, + 90, 52, 0, 61, 62, 64, 50, 0, 57, 278, + 65, 60, 0, 59, 0, 0, 90, 90, 0, 90, + 90, 90, 90, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 63, 0, 0, 0, 0, 0, 53, 0, + 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, + 91, 0, 0, 0, 91, 0, 91, 52, 0, 61, + 62, 64, 50, 0, 57, 280, 65, 60, 0, 59, + 0, 0, 91, 91, 0, 91, 91, 91, 91, 91, + 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, + 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 25, 26, 27, 28, 61, 29, 30, 31, 0, + 52, 0, 32, 62, 64, 50, 0, 57, 288, 65, + 60, 0, 59, 38, 0, 39, 40, 41, 42, 43, + 0, 0, 0, 0, 44, 45, 46, 47, 48, 49, + 53, 63, 51, 0, 0, 0, 0, 0, 0, 0, + 0, 54, 0, 55, 56, 0, 0, 0, 22, 24, + 25, 26, 27, 28, 0, 29, 30, 31, 61, 0, + 0, 32, 96, 0, 0, 96, 0, 0, 0, 0, + 0, 0, 38, 0, 39, 40, 41, 42, 43, 96, + 96, 0, 0, 44, 45, 46, 47, 48, 49, 0, + 0, 51, 0, 53, 0, 0, 0, 0, 0, 0, + 54, 0, 55, 56, 0, 24, 25, 26, 27, 28, + 0, 29, 30, 31, 96, 0, 0, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, + 39, 40, 41, 42, 43, 0, 0, 0, 0, 44, + 45, 46, 47, 48, 49, 0, 0, 51, 0, 0, + 0, 0, 0, 0, 0, 0, 54, 0, 55, 56, + 0, 24, 25, 26, 27, 28, 0, 29, 30, 31, + 0, 52, 0, 32, 62, 64, 50, 0, 57, 0, + 65, 60, 0, 59, 38, 0, 39, 40, 41, 42, + 43, 0, 0, 0, 0, 44, 45, 46, 47, 48, + 49, 0, 63, 51, 0, 0, 0, 0, 0, 0, + 0, 0, 54, 0, 55, 56, 0, 0, 0, 0, + 132, 0, 0, 132, 24, 25, 26, 27, 28, 61, + 29, 30, 31, 0, 0, 0, 32, 132, 132, 0, + 0, 0, 132, 0, 0, 0, 0, 38, 0, 39, + 40, 41, 42, 43, 0, 0, 0, 0, 44, 45, + 46, 47, 48, 49, 53, 158, 51, 0, 158, 0, + 132, 0, 132, 0, 0, 54, 0, 55, 56, 0, + 0, 0, 158, 158, 0, 0, 0, 158, 0, 0, + 0, 0, 0, 96, 96, 96, 96, 0, 0, 0, + 96, 0, 132, 0, 0, 0, 0, 0, 75, 0, + 0, 75, 0, 0, 0, 158, 0, 158, 96, 96, + 0, 96, 0, 0, 0, 75, 75, 0, 0, 0, + 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 158, 0, 0, + 0, 0, 0, 144, 0, 0, 144, 0, 75, 0, + 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 144, 144, 0, 0, 0, 144, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 75, 0, 0, 0, 0, 24, 25, 26, 27, 28, + 0, 29, 30, 31, 0, 144, 0, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, + 39, 40, 41, 42, 43, 0, 0, 0, 0, 44, + 45, 46, 47, 48, 49, 144, 0, 51, 168, 0, + 0, 0, 0, 0, 0, 0, 54, 0, 55, 56, + 0, 132, 132, 132, 132, 0, 117, 0, 132, 117, + 132, 0, 0, 0, 0, 0, 132, 132, 132, 132, + 150, 0, 0, 117, 117, 0, 132, 132, 117, 132, + 132, 132, 132, 132, 132, 132, 0, 0, 132, 0, + 0, 132, 132, 132, 0, 0, 158, 158, 158, 158, + 0, 160, 0, 158, 160, 158, 117, 0, 117, 0, + 0, 158, 158, 158, 158, 0, 0, 0, 160, 160, + 0, 158, 158, 160, 158, 158, 158, 158, 158, 158, + 158, 0, 0, 158, 0, 0, 158, 158, 158, 75, + 75, 75, 75, 0, 93, 0, 75, 93, 75, 0, + 0, 0, 0, 160, 75, 75, 75, 75, 0, 0, + 0, 93, 93, 0, 75, 75, 93, 75, 75, 75, + 75, 75, 75, 75, 0, 0, 75, 0, 0, 75, + 75, 75, 0, 160, 144, 144, 144, 144, 0, 161, + 0, 144, 0, 144, 0, 0, 93, 0, 0, 144, + 144, 144, 144, 0, 0, 0, 161, 161, 0, 144, + 144, 161, 144, 144, 144, 144, 144, 144, 144, 0, + 0, 144, 0, 0, 144, 144, 144, 0, 0, 0, + 0, 0, 146, 0, 152, 153, 154, 155, 0, 161, + 0, 161, 0, 0, 0, 0, 0, 0, 0, 146, + 146, 161, 162, 163, 146, 0, 164, 0, 0, 165, + 166, 167, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 146, 0, 146, 0, 0, 117, 117, 117, + 117, 0, 0, 0, 117, 0, 117, 0, 0, 0, + 0, 0, 117, 117, 117, 117, 0, 0, 0, 0, + 0, 0, 117, 117, 146, 117, 117, 117, 117, 117, + 117, 117, 0, 0, 117, 0, 0, 117, 117, 117, + 0, 0, 160, 160, 160, 160, 0, 109, 0, 160, + 109, 160, 0, 0, 0, 0, 0, 160, 160, 160, + 160, 0, 0, 0, 109, 109, 0, 160, 160, 109, + 160, 160, 160, 160, 160, 160, 160, 0, 0, 160, + 0, 0, 160, 160, 160, 93, 93, 93, 93, 0, + 0, 0, 93, 0, 0, 0, 0, 69, 0, 109, + 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 93, 93, 0, 93, 69, 69, 0, 0, 0, 69, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, + 161, 161, 161, 161, 0, 0, 0, 161, 0, 161, + 0, 0, 0, 0, 0, 161, 161, 161, 161, 69, + 0, 0, 0, 0, 0, 161, 161, 0, 161, 161, + 161, 161, 161, 161, 161, 0, 71, 161, 0, 71, + 161, 161, 161, 146, 146, 146, 146, 0, 72, 69, + 146, 0, 146, 71, 71, 0, 0, 0, 146, 146, + 146, 146, 0, 0, 0, 72, 72, 0, 146, 146, + 72, 146, 146, 146, 146, 146, 146, 146, 0, 0, + 146, 0, 0, 146, 146, 146, 0, 0, 71, 0, + 0, 0, 0, 108, 0, 0, 108, 0, 72, 0, + 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 108, 108, 0, 0, 0, 108, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 108, 0, 0, 109, 109, + 109, 109, 0, 0, 0, 109, 0, 109, 0, 0, + 0, 0, 0, 109, 109, 109, 109, 0, 0, 147, + 0, 0, 147, 109, 109, 108, 109, 109, 109, 109, + 109, 109, 109, 0, 0, 109, 147, 147, 109, 109, + 109, 147, 0, 0, 0, 0, 0, 0, 69, 69, + 69, 69, 0, 0, 0, 69, 0, 69, 0, 0, + 0, 0, 0, 69, 69, 69, 69, 0, 0, 160, + 0, 147, 160, 69, 69, 0, 69, 69, 69, 69, + 69, 69, 69, 0, 0, 69, 160, 160, 69, 69, + 69, 160, 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, 71, 71, 71, + 71, 160, 0, 0, 71, 0, 0, 0, 0, 72, + 72, 72, 72, 0, 115, 0, 72, 115, 72, 0, + 0, 0, 71, 71, 72, 72, 72, 72, 0, 0, + 0, 115, 115, 0, 72, 72, 115, 72, 72, 72, + 72, 72, 72, 72, 0, 0, 72, 0, 0, 72, + 72, 72, 0, 0, 108, 108, 108, 108, 0, 122, + 0, 108, 122, 108, 0, 0, 115, 0, 0, 108, + 108, 108, 108, 0, 0, 0, 122, 122, 0, 108, + 108, 122, 108, 108, 108, 108, 108, 108, 108, 0, + 0, 108, 0, 0, 108, 108, 108, 0, 0, 0, + 0, 0, 106, 0, 0, 106, 0, 0, 0, 0, + 0, 122, 0, 0, 0, 0, 0, 0, 0, 106, + 106, 0, 0, 0, 106, 0, 0, 0, 0, 0, + 147, 147, 147, 147, 0, 0, 0, 147, 0, 147, + 0, 0, 0, 0, 0, 147, 147, 147, 147, 0, + 0, 0, 0, 0, 106, 147, 147, 0, 147, 147, + 147, 147, 147, 147, 147, 0, 0, 147, 0, 0, + 147, 147, 147, 145, 0, 0, 145, 0, 0, 0, + 160, 160, 160, 160, 0, 100, 0, 160, 100, 160, + 145, 145, 0, 0, 0, 160, 160, 160, 160, 0, + 0, 0, 100, 100, 0, 160, 160, 100, 160, 160, + 160, 160, 160, 160, 160, 0, 0, 160, 0, 0, + 160, 160, 160, 0, 0, 145, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, + 0, 0, 0, 0, 0, 115, 115, 115, 115, 0, + 101, 0, 115, 101, 115, 0, 0, 0, 0, 0, + 115, 115, 115, 115, 0, 0, 0, 101, 101, 0, + 115, 115, 101, 115, 115, 115, 115, 115, 115, 115, + 0, 0, 115, 0, 0, 115, 115, 115, 0, 0, + 122, 122, 122, 122, 0, 102, 0, 122, 102, 122, + 0, 0, 101, 0, 0, 122, 122, 122, 122, 0, + 0, 0, 102, 102, 0, 122, 122, 102, 122, 122, + 122, 122, 122, 122, 122, 0, 0, 122, 0, 0, + 122, 122, 122, 106, 106, 106, 106, 0, 98, 0, + 106, 98, 106, 0, 0, 0, 0, 102, 106, 106, + 106, 106, 0, 0, 0, 98, 98, 0, 106, 106, + 98, 106, 106, 106, 106, 106, 106, 106, 0, 0, + 106, 0, 0, 0, 99, 0, 0, 99, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 98, 99, 99, 0, 0, 0, 99, 0, 0, 0, + 0, 0, 0, 0, 145, 145, 145, 145, 0, 0, + 0, 145, 0, 0, 0, 0, 100, 100, 100, 100, + 0, 97, 0, 100, 97, 100, 99, 0, 0, 145, + 145, 100, 100, 100, 100, 0, 0, 0, 97, 97, + 0, 100, 100, 97, 100, 100, 100, 100, 100, 100, + 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, + 0, 0, 85, 97, 0, 0, 0, 0, 0, 0, + 0, 101, 101, 101, 101, 0, 85, 85, 101, 0, + 101, 85, 0, 0, 0, 0, 101, 101, 101, 101, + 0, 0, 0, 0, 0, 0, 101, 101, 0, 101, + 101, 101, 101, 101, 101, 101, 0, 0, 0, 0, + 0, 85, 0, 0, 0, 0, 102, 102, 102, 102, + 0, 86, 0, 102, 86, 102, 0, 0, 0, 0, + 0, 102, 102, 102, 102, 0, 0, 0, 86, 86, + 0, 102, 102, 86, 102, 102, 102, 102, 102, 102, + 102, 0, 0, 0, 0, 0, 0, 0, 0, 98, + 98, 98, 98, 0, 87, 0, 98, 87, 98, 0, + 0, 0, 0, 86, 98, 98, 98, 98, 0, 0, + 0, 87, 87, 0, 98, 98, 87, 98, 98, 98, + 98, 98, 98, 98, 0, 99, 99, 99, 99, 0, + 88, 0, 99, 88, 99, 0, 0, 0, 0, 0, + 99, 99, 99, 99, 0, 0, 87, 88, 88, 0, + 99, 99, 88, 99, 99, 99, 99, 99, 99, 99, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 97, 97, 97, 97, 0, 0, 0, 97, + 0, 97, 88, 0, 0, 0, 0, 97, 97, 97, + 97, 149, 0, 0, 149, 0, 0, 97, 97, 0, + 97, 97, 97, 97, 97, 97, 97, 0, 149, 149, + 0, 0, 0, 149, 0, 0, 0, 0, 0, 0, + 85, 85, 85, 85, 0, 0, 0, 85, 0, 85, + 0, 0, 0, 0, 0, 85, 85, 85, 85, 0, + 0, 136, 0, 149, 136, 85, 85, 0, 85, 85, + 85, 85, 85, 85, 85, 0, 0, 0, 136, 136, + 0, 0, 0, 136, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 86, 86, 86, 86, 0, 107, 0, 86, + 107, 86, 0, 136, 0, 0, 0, 86, 86, 86, + 86, 0, 0, 0, 107, 107, 0, 86, 86, 107, + 86, 86, 86, 86, 86, 86, 0, 168, 0, 0, + 92, 0, 0, 92, 0, 87, 87, 87, 87, 0, + 94, 0, 87, 94, 87, 0, 0, 92, 92, 107, + 87, 87, 92, 87, 0, 0, 0, 94, 94, 150, + 87, 87, 94, 87, 87, 87, 87, 87, 87, 0, + 0, 88, 88, 88, 88, 0, 95, 0, 88, 95, + 88, 0, 92, 0, 0, 0, 88, 88, 84, 0, + 0, 84, 94, 95, 95, 0, 88, 88, 95, 88, + 88, 88, 88, 88, 88, 84, 84, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, + 0, 0, 70, 0, 0, 0, 0, 0, 95, 0, + 0, 0, 149, 149, 149, 149, 70, 70, 0, 149, + 84, 149, 0, 0, 0, 0, 0, 149, 149, 0, + 0, 0, 0, 0, 0, 0, 0, 149, 149, 0, + 149, 149, 149, 149, 149, 0, 0, 157, 0, 0, + 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 136, 136, 136, 136, 0, 0, 0, 136, + 0, 136, 0, 0, 0, 168, 0, 136, 136, 0, + 0, 0, 0, 0, 0, 157, 0, 136, 136, 0, + 136, 136, 136, 136, 136, 0, 0, 0, 0, 0, + 0, 0, 0, 152, 153, 154, 155, 150, 107, 107, + 107, 107, 0, 168, 0, 107, 0, 107, 159, 160, + 161, 162, 163, 107, 107, 164, 0, 0, 165, 166, + 167, 0, 0, 107, 107, 0, 107, 107, 107, 107, + 107, 92, 92, 92, 92, 150, 0, 0, 92, 0, + 92, 94, 94, 94, 94, 0, 0, 0, 94, 0, + 94, 0, 0, 0, 0, 0, 92, 92, 0, 92, + 92, 92, 92, 168, 0, 0, 94, 94, 0, 94, + 94, 94, 0, 0, 0, 0, 0, 95, 95, 95, + 95, 0, 0, 0, 95, 0, 95, 0, 0, 84, + 84, 84, 84, 0, 0, 150, 84, 0, 0, 0, + 0, 0, 95, 95, 0, 95, 95, 0, 0, 0, + 0, 0, 0, 0, 84, 84, 0, 0, 94, 0, + 70, 70, 70, 70, 0, 0, 104, 70, 0, 0, + 109, 0, 0, 118, 0, 0, 0, 0, 0, 0, + 125, 126, 127, 128, 129, 70, 70, 132, 133, 0, + 0, 0, 0, 0, 140, 151, 0, 0, 0, 0, + 0, 152, 153, 154, 155, 0, 0, 0, 0, 0, + 0, 0, 90, 90, 156, 158, 159, 160, 161, 162, + 163, 184, 0, 164, 103, 0, 165, 166, 167, 0, + 111, 90, 119, 151, 0, 0, 0, 90, 0, 152, + 153, 154, 155, 0, 0, 0, 0, 0, 0, 90, + 90, 90, 90, 158, 159, 160, 161, 162, 163, 0, + 0, 164, 0, 0, 165, 166, 167, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 0, 111, 0, 0, 0, 0, 152, + 153, 154, 155, 0, 247, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 160, 161, 162, 163, 0, + 0, 164, 0, 0, 165, 166, 167, 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, 237, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 266, 0, + 0, 0, 0, 301, 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, 317, +}; +static short yycheck[] = { 13, + 41, 36, 86, 41, 91, 40, 44, 59, 91, 59, + 59, 93, 36, 183, 59, 59, 41, 91, 41, 331, + 58, 59, 91, 40, 257, 63, 41, 297, 298, 257, + 41, 59, 46, 40, 43, 41, 123, 276, 277, 257, + 123, 41, 51, 57, 41, 91, 41, 61, 59, 123, + 362, 44, 40, 59, 123, 93, 328, 329, 0, 40, + 192, 333, 41, 40, 40, 36, 40, 40, 40, 40, + 59, 278, 59, 123, 91, 123, 122, 349, 123, 40, + 59, 353, 91, 123, 97, 98, 99, 100, 101, 102, + 59, 33, 106, 107, 36, 37, 38, 59, 40, 123, + 42, 43, 260, 45, 44, 114, 123, 59, 41, 41, + 41, 257, 40, 122, 40, 125, 40, 59, 41, 41, + 91, 291, 64, 91, 41, 41, 59, 59, 59, 143, + 144, 145, 146, 147, 148, 149, 150, 59, 257, 36, + 91, 273, 59, 93, 91, 41, 298, 125, 44, 91, + 40, 40, 123, 0, 168, 169, 170, 171, 172, 173, + 174, 41, 58, 59, 41, 41, 41, 63, 93, 183, + 41, 41, 123, 187, 188, 307, 190, 91, 192, 125, + 193, 123, 93, 125, 126, 199, 33, 201, 202, 36, + 37, 38, 206, 40, 59, 42, 43, 93, 45, 266, + 267, 268, 59, 270, 271, 251, 289, 290, 257, 123, + 256, 41, 59, 125, 123, 297, 298, 64, 125, 233, + 352, 235, 236, 306, 125, 93, 309, 314, 41, 312, + 313, 314, 125, 257, 272, 273, 274, 275, 262, 41, + 41, 279, 251, 281, 91, 297, 298, 256, 0, 287, + 288, 289, 290, 297, 298, 339, 297, 298, 59, 297, + 298, 296, 300, 301, 302, 303, 304, 305, 306, 59, + 284, 309, 297, 298, 297, 298, 123, 291, 125, 126, + 40, 33, 297, 298, 36, 37, 38, 258, 40, 93, + 42, 43, 93, 45, 93, 309, 41, 297, 298, 41, + 297, 298, 297, 298, 297, 298, 123, 59, 297, 298, + 297, 298, 64, 125, 256, 257, 258, 259, 260, 261, + 123, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 348, 297, 298, 279, 280, 91, + 282, 283, 284, 285, 286, 297, 298, 297, 298, 291, + 292, 293, 294, 295, 296, 306, 91, 299, 309, 41, + 41, 312, 313, 314, 59, 41, 308, 59, 310, 311, + 41, 123, 297, 298, 126, 59, 272, 273, 274, 275, + 41, 8, 32, 279, 13, 281, 297, 298, 123, 144, + 348, 287, 288, 41, 309, 309, 44, 190, 312, 313, + 314, 297, 298, 96, 300, 301, 302, 303, 304, 256, + 257, 258, 259, 260, 261, 63, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 297, + 298, -1, 279, 280, -1, 282, 283, 284, 285, 286, + -1, -1, -1, 91, 291, 292, 293, 294, 295, 296, + 125, -1, 299, 91, 266, 267, 268, -1, 270, 271, + -1, 308, -1, 310, 311, -1, 41, -1, -1, 44, + -1, 272, 273, 274, 275, 123, -1, -1, 279, -1, + -1, -1, -1, 58, 59, 123, -1, -1, 63, -1, + -1, -1, -1, 297, 298, -1, 297, 298, 297, 298, + -1, -1, -1, -1, 256, 257, 258, 259, 260, 261, + -1, 263, 264, 265, -1, -1, 91, 269, 93, -1, + 272, 273, 274, 275, -1, -1, -1, 279, 280, -1, + 282, 283, 284, 285, 286, -1, -1, -1, -1, 291, + 292, 293, 294, 295, 296, -1, -1, 299, 123, -1, + -1, -1, 287, 288, 289, 290, 308, 33, 310, 311, + 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, + 305, 306, -1, -1, 309, -1, -1, 312, 313, 314, + -1, -1, 58, 59, -1, -1, -1, 63, 64, -1, + -1, 266, 267, 268, -1, 270, 271, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 272, 273, 274, 275, + -1, -1, -1, 279, -1, 91, -1, 93, 33, -1, + -1, 36, 37, 38, -1, 40, 41, 42, 43, 44, + 45, 297, 298, 281, -1, -1, -1, -1, -1, 287, + 288, 289, 290, 58, 59, -1, -1, 123, 63, 64, + 126, 289, 300, 301, 302, 303, 304, 305, 306, -1, + -1, 309, -1, -1, 312, 313, 314, -1, 306, -1, + -1, 309, -1, -1, 312, 313, 314, 33, 93, -1, + 36, 37, 38, -1, 40, -1, 42, 43, -1, 45, + -1, -1, -1, -1, -1, -1, -1, 272, 273, 274, + 275, -1, -1, 59, 279, -1, 281, -1, 64, -1, + -1, 126, 287, 288, 289, 290, 304, 305, 306, -1, + 308, -1, 297, 298, -1, 300, 301, 302, 303, 304, + 305, 306, -1, -1, 309, 91, -1, 312, 313, 314, + -1, -1, 41, -1, -1, 44, -1, 335, -1, -1, + -1, -1, -1, -1, 342, -1, -1, -1, 346, -1, + 59, -1, -1, 91, -1, -1, -1, 123, -1, -1, + 126, 359, 360, -1, -1, -1, -1, -1, -1, -1, + -1, 257, 258, 259, 260, 261, -1, 263, 264, 265, + -1, -1, -1, 269, 93, 123, 272, 273, 274, 275, + -1, -1, -1, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, -1, 308, 309, 310, 311, 312, 313, 314, -1, + -1, -1, 257, 258, 259, 260, 261, -1, 263, 264, + 265, -1, -1, -1, 269, -1, -1, 272, 273, 274, + 275, -1, -1, -1, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, -1, 308, 309, 310, 311, 312, 313, 314, + 256, 257, 258, 259, 260, 261, -1, 263, 264, 265, + -1, -1, -1, 269, -1, 91, 272, 273, 274, 275, + -1, -1, -1, 279, 280, -1, 282, 283, 284, 285, + 286, -1, -1, -1, -1, 291, 292, 293, 294, 295, + 296, 33, -1, 299, 36, 37, 38, 123, 40, -1, + 42, 43, 308, 45, 310, 311, -1, -1, 13, 287, + -1, 289, 290, -1, -1, -1, -1, 59, -1, -1, + -1, -1, 64, 272, 273, 274, 275, 305, 306, -1, + 279, 309, -1, -1, 312, 313, 314, 42, -1, -1, + 45, -1, -1, -1, -1, -1, -1, 33, 297, 91, + 36, 37, 38, -1, 40, -1, 42, 43, -1, 45, + -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 81, -1, 64, 43, + 44, 123, -1, -1, 126, -1, 50, -1, -1, -1, + 95, -1, -1, -1, -1, -1, -1, -1, 62, 63, + 64, 65, -1, 33, -1, 91, 36, 37, 38, -1, + 40, -1, 42, 43, -1, 45, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 64, -1, 141, 123, -1, -1, + 126, -1, -1, 107, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 91, -1, 289, 290, -1, 33, -1, -1, 36, + 37, 38, -1, 40, 179, 42, 43, -1, 45, 305, + 306, 186, -1, 309, -1, -1, 312, 313, 314, -1, + -1, -1, -1, 123, -1, -1, 126, 64, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 256, 257, 258, 259, 260, 261, + -1, 263, 264, 265, 91, -1, -1, 269, -1, -1, + 272, 273, 274, 275, -1, -1, -1, 279, 280, -1, + 282, 283, 284, 285, 286, -1, -1, -1, -1, 291, + 292, 293, 294, 295, 296, -1, 123, 299, -1, 126, + -1, 91, -1, -1, -1, 41, 308, -1, 310, 311, + -1, 257, 258, 259, 260, 261, 262, 263, 264, 265, + -1, -1, -1, 269, -1, -1, -1, 63, -1, -1, + -1, -1, -1, 123, 280, -1, 282, 283, 284, 285, + 286, -1, -1, -1, -1, 291, 292, 293, 294, 295, + 296, -1, -1, 299, -1, 91, -1, -1, -1, -1, + -1, -1, 308, -1, 310, 311, -1, 257, 258, 259, + 260, 261, -1, 263, 264, 265, -1, -1, -1, 269, + 58, -1, -1, -1, -1, 63, -1, 123, -1, -1, + 280, -1, 282, 283, 284, 285, 286, -1, -1, -1, + -1, 291, 292, 293, 294, 295, 296, -1, -1, 299, + -1, -1, -1, 91, -1, -1, -1, -1, 308, -1, + 310, 311, -1, -1, -1, -1, 41, -1, -1, 44, + 257, 258, 259, 260, 261, -1, 263, 264, 265, -1, + -1, -1, 269, 58, 59, 123, -1, -1, 63, -1, + -1, -1, -1, 280, -1, 282, 283, 284, 285, 286, + -1, -1, -1, -1, 291, 292, 293, 294, 295, 296, + 33, -1, 299, 36, 37, 38, -1, 40, 93, 42, + 43, 308, 45, 310, 311, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, 287, 288, 289, + 290, 64, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 301, 302, 303, 304, 305, 306, -1, -1, 309, + -1, -1, 312, 313, 314, -1, 33, -1, 91, 36, + 37, 38, -1, 40, 41, 42, 43, -1, 45, -1, + -1, -1, -1, -1, -1, 281, -1, -1, -1, -1, + -1, 287, 288, 289, 290, -1, -1, 64, -1, -1, + -1, -1, -1, 126, 300, 301, 302, 303, 304, 305, + 306, -1, -1, 309, -1, -1, 312, 313, 314, -1, + -1, -1, 33, -1, 91, 36, 37, 38, -1, 40, + -1, 42, 43, -1, 45, -1, -1, -1, -1, -1, + -1, -1, -1, 281, -1, -1, -1, -1, -1, 287, + 288, 289, 290, 64, -1, -1, -1, -1, -1, 126, + -1, -1, 300, 301, 302, 303, 304, 305, 306, -1, + -1, 309, -1, -1, 312, 313, 314, -1, -1, -1, + 91, 33, 93, -1, 36, 37, 38, -1, 40, 41, + 42, 43, -1, 45, -1, -1, -1, 272, 273, 274, + 275, -1, -1, -1, 279, -1, 281, -1, -1, -1, + -1, -1, 64, 288, -1, 126, -1, -1, -1, -1, + -1, -1, 297, 298, -1, 300, 301, 302, 303, 304, + 41, -1, -1, 44, 257, 258, 259, 260, 261, 91, + 263, 264, 265, -1, -1, -1, 269, 58, 59, -1, + -1, -1, 63, -1, -1, -1, -1, 280, -1, 282, + 283, 284, 285, 286, -1, -1, -1, -1, 291, 292, + 293, 294, 295, 296, 126, -1, 299, -1, -1, -1, + -1, -1, 93, -1, -1, 308, 41, 310, 311, 44, + 257, 258, 259, 260, 261, -1, 263, 264, 265, -1, + -1, -1, 269, 58, 59, -1, -1, -1, 63, -1, + -1, -1, -1, 280, -1, 282, 283, 284, 285, 286, + -1, -1, -1, -1, 291, 292, 293, 294, 295, 296, + -1, -1, 299, -1, -1, -1, -1, -1, 93, -1, + -1, 308, -1, 310, 311, -1, 257, 258, 259, 260, + 261, -1, 263, 264, 265, -1, 33, -1, 269, 36, + 37, 38, -1, 40, 41, 42, 43, -1, 45, 280, + -1, 282, 283, 284, 285, 286, -1, -1, -1, -1, + 291, 292, 293, 294, 295, 296, -1, 64, 299, -1, + -1, -1, -1, -1, -1, -1, -1, 308, -1, 310, + 311, -1, -1, -1, -1, 257, 258, 259, 260, 261, + -1, 263, 264, 265, 91, 33, -1, 269, 36, 37, + 38, -1, 40, -1, 42, 43, -1, 45, 280, -1, + 282, 283, 284, 285, 286, -1, -1, -1, -1, 291, + 292, 293, 294, 295, 296, -1, 64, 299, -1, 126, + -1, -1, -1, -1, -1, -1, 308, -1, 310, 311, + -1, 272, 273, 274, 275, -1, -1, -1, 279, -1, + 281, 33, -1, 91, 36, 37, 38, -1, 40, 41, + 42, 43, -1, 45, -1, -1, 297, 298, -1, 300, + 301, 302, 303, 304, -1, -1, -1, -1, -1, -1, + -1, -1, 64, -1, -1, -1, -1, -1, 126, -1, + -1, -1, -1, -1, -1, -1, -1, 272, 273, 274, + 275, -1, -1, -1, 279, -1, 281, 33, -1, 91, + 36, 37, 38, -1, 40, 41, 42, 43, -1, 45, + -1, -1, 297, 298, -1, 300, 301, 302, 303, 304, + -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, + -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 257, 258, 259, 260, 261, 91, 263, 264, 265, -1, + 33, -1, 269, 36, 37, 38, -1, 40, 41, 42, + 43, -1, 45, 280, -1, 282, 283, 284, 285, 286, + -1, -1, -1, -1, 291, 292, 293, 294, 295, 296, + 126, 64, 299, -1, -1, -1, -1, -1, -1, -1, + -1, 308, -1, 310, 311, -1, -1, -1, 256, 257, + 258, 259, 260, 261, -1, 263, 264, 265, 91, -1, + -1, 269, 41, -1, -1, 44, -1, -1, -1, -1, + -1, -1, 280, -1, 282, 283, 284, 285, 286, 58, + 59, -1, -1, 291, 292, 293, 294, 295, 296, -1, + -1, 299, -1, 126, -1, -1, -1, -1, -1, -1, + 308, -1, 310, 311, -1, 257, 258, 259, 260, 261, + -1, 263, 264, 265, 93, -1, -1, 269, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 280, -1, + 282, 283, 284, 285, 286, -1, -1, -1, -1, 291, + 292, 293, 294, 295, 296, -1, -1, 299, -1, -1, + -1, -1, -1, -1, -1, -1, 308, -1, 310, 311, + -1, 257, 258, 259, 260, 261, -1, 263, 264, 265, + -1, 33, -1, 269, 36, 37, 38, -1, 40, -1, + 42, 43, -1, 45, 280, -1, 282, 283, 284, 285, + 286, -1, -1, -1, -1, 291, 292, 293, 294, 295, + 296, -1, 64, 299, -1, -1, -1, -1, -1, -1, + -1, -1, 308, -1, 310, 311, -1, -1, -1, -1, + 41, -1, -1, 44, 257, 258, 259, 260, 261, 91, + 263, 264, 265, -1, -1, -1, 269, 58, 59, -1, + -1, -1, 63, -1, -1, -1, -1, 280, -1, 282, + 283, 284, 285, 286, -1, -1, -1, -1, 291, 292, + 293, 294, 295, 296, 126, 41, 299, -1, 44, -1, + 91, -1, 93, -1, -1, 308, -1, 310, 311, -1, + -1, -1, 58, 59, -1, -1, -1, 63, -1, -1, + -1, -1, -1, 272, 273, 274, 275, -1, -1, -1, + 279, -1, 123, -1, -1, -1, -1, -1, 41, -1, + -1, 44, -1, -1, -1, 91, -1, 93, 297, 298, + -1, 300, -1, -1, -1, 58, 59, -1, -1, -1, + 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, + -1, -1, -1, 41, -1, -1, 44, -1, 91, -1, + 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 123, -1, -1, -1, -1, 257, 258, 259, 260, 261, + -1, 263, 264, 265, -1, 93, -1, 269, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 280, -1, + 282, 283, 284, 285, 286, -1, -1, -1, -1, 291, + 292, 293, 294, 295, 296, 123, -1, 299, 91, -1, + -1, -1, -1, -1, -1, -1, 308, -1, 310, 311, + -1, 272, 273, 274, 275, -1, 41, -1, 279, 44, + 281, -1, -1, -1, -1, -1, 287, 288, 289, 290, + 123, -1, -1, 58, 59, -1, 297, 298, 63, 300, + 301, 302, 303, 304, 305, 306, -1, -1, 309, -1, + -1, 312, 313, 314, -1, -1, 272, 273, 274, 275, + -1, 41, -1, 279, 44, 281, 91, -1, 93, -1, + -1, 287, 288, 289, 290, -1, -1, -1, 58, 59, + -1, 297, 298, 63, 300, 301, 302, 303, 304, 305, + 306, -1, -1, 309, -1, -1, 312, 313, 314, 272, + 273, 274, 275, -1, 41, -1, 279, 44, 281, -1, + -1, -1, -1, 93, 287, 288, 289, 290, -1, -1, + -1, 58, 59, -1, 297, 298, 63, 300, 301, 302, + 303, 304, 305, 306, -1, -1, 309, -1, -1, 312, + 313, 314, -1, 123, 272, 273, 274, 275, -1, 41, + -1, 279, -1, 281, -1, -1, 93, -1, -1, 287, + 288, 289, 290, -1, -1, -1, 58, 59, -1, 297, + 298, 63, 300, 301, 302, 303, 304, 305, 306, -1, + -1, 309, -1, -1, 312, 313, 314, -1, -1, -1, + -1, -1, 41, -1, 287, 288, 289, 290, -1, 91, + -1, 93, -1, -1, -1, -1, -1, -1, -1, 58, + 59, 304, 305, 306, 63, -1, 309, -1, -1, 312, + 313, 314, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 91, -1, 93, -1, -1, 272, 273, 274, + 275, -1, -1, -1, 279, -1, 281, -1, -1, -1, + -1, -1, 287, 288, 289, 290, -1, -1, -1, -1, + -1, -1, 297, 298, 123, 300, 301, 302, 303, 304, + 305, 306, -1, -1, 309, -1, -1, 312, 313, 314, + -1, -1, 272, 273, 274, 275, -1, 41, -1, 279, + 44, 281, -1, -1, -1, -1, -1, 287, 288, 289, + 290, -1, -1, -1, 58, 59, -1, 297, 298, 63, + 300, 301, 302, 303, 304, 305, 306, -1, -1, 309, + -1, -1, 312, 313, 314, 272, 273, 274, 275, -1, + -1, -1, 279, -1, -1, -1, -1, 41, -1, 93, + 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 297, 298, -1, 300, 58, 59, -1, -1, -1, 63, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, + 272, 273, 274, 275, -1, -1, -1, 279, -1, 281, + -1, -1, -1, -1, -1, 287, 288, 289, 290, 93, + -1, -1, -1, -1, -1, 297, 298, -1, 300, 301, + 302, 303, 304, 305, 306, -1, 41, 309, -1, 44, + 312, 313, 314, 272, 273, 274, 275, -1, 41, 123, + 279, -1, 281, 58, 59, -1, -1, -1, 287, 288, + 289, 290, -1, -1, -1, 58, 59, -1, 297, 298, + 63, 300, 301, 302, 303, 304, 305, 306, -1, -1, + 309, -1, -1, 312, 313, 314, -1, -1, 93, -1, + -1, -1, -1, 41, -1, -1, 44, -1, 91, -1, + 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 93, -1, -1, 272, 273, + 274, 275, -1, -1, -1, 279, -1, 281, -1, -1, + -1, -1, -1, 287, 288, 289, 290, -1, -1, 41, + -1, -1, 44, 297, 298, 123, 300, 301, 302, 303, + 304, 305, 306, -1, -1, 309, 58, 59, 312, 313, + 314, 63, -1, -1, -1, -1, -1, -1, 272, 273, + 274, 275, -1, -1, -1, 279, -1, 281, -1, -1, + -1, -1, -1, 287, 288, 289, 290, -1, -1, 41, + -1, 93, 44, 297, 298, -1, 300, 301, 302, 303, + 304, 305, 306, -1, -1, 309, 58, 59, 312, 313, + 314, 63, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 272, 273, 274, + 275, 93, -1, -1, 279, -1, -1, -1, -1, 272, + 273, 274, 275, -1, 41, -1, 279, 44, 281, -1, + -1, -1, 297, 298, 287, 288, 289, 290, -1, -1, + -1, 58, 59, -1, 297, 298, 63, 300, 301, 302, + 303, 304, 305, 306, -1, -1, 309, -1, -1, 312, + 313, 314, -1, -1, 272, 273, 274, 275, -1, 41, + -1, 279, 44, 281, -1, -1, 93, -1, -1, 287, + 288, 289, 290, -1, -1, -1, 58, 59, -1, 297, + 298, 63, 300, 301, 302, 303, 304, 305, 306, -1, + -1, 309, -1, -1, 312, 313, 314, -1, -1, -1, + -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, + -1, 93, -1, -1, -1, -1, -1, -1, -1, 58, + 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, + 272, 273, 274, 275, -1, -1, -1, 279, -1, 281, + -1, -1, -1, -1, -1, 287, 288, 289, 290, -1, + -1, -1, -1, -1, 93, 297, 298, -1, 300, 301, + 302, 303, 304, 305, 306, -1, -1, 309, -1, -1, + 312, 313, 314, 41, -1, -1, 44, -1, -1, -1, + 272, 273, 274, 275, -1, 41, -1, 279, 44, 281, + 58, 59, -1, -1, -1, 287, 288, 289, 290, -1, + -1, -1, 58, 59, -1, 297, 298, 63, 300, 301, + 302, 303, 304, 305, 306, -1, -1, 309, -1, -1, + 312, 313, 314, -1, -1, 93, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, + -1, -1, -1, -1, -1, 272, 273, 274, 275, -1, + 41, -1, 279, 44, 281, -1, -1, -1, -1, -1, + 287, 288, 289, 290, -1, -1, -1, 58, 59, -1, + 297, 298, 63, 300, 301, 302, 303, 304, 305, 306, + -1, -1, 309, -1, -1, 312, 313, 314, -1, -1, + 272, 273, 274, 275, -1, 41, -1, 279, 44, 281, + -1, -1, 93, -1, -1, 287, 288, 289, 290, -1, + -1, -1, 58, 59, -1, 297, 298, 63, 300, 301, + 302, 303, 304, 305, 306, -1, -1, 309, -1, -1, + 312, 313, 314, 272, 273, 274, 275, -1, 41, -1, + 279, 44, 281, -1, -1, -1, -1, 93, 287, 288, + 289, 290, -1, -1, -1, 58, 59, -1, 297, 298, + 63, 300, 301, 302, 303, 304, 305, 306, -1, -1, + 309, -1, -1, -1, 41, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, 58, 59, -1, -1, -1, 63, -1, -1, -1, + -1, -1, -1, -1, 272, 273, 274, 275, -1, -1, + -1, 279, -1, -1, -1, -1, 272, 273, 274, 275, + -1, 41, -1, 279, 44, 281, 93, -1, -1, 297, + 298, 287, 288, 289, 290, -1, -1, -1, 58, 59, + -1, 297, 298, 63, 300, 301, 302, 303, 304, 305, + 306, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, + -1, -1, 44, 93, -1, -1, -1, -1, -1, -1, + -1, 272, 273, 274, 275, -1, 58, 59, 279, -1, + 281, 63, -1, -1, -1, -1, 287, 288, 289, 290, + -1, -1, -1, -1, -1, -1, 297, 298, -1, 300, + 301, 302, 303, 304, 305, 306, -1, -1, -1, -1, + -1, 93, -1, -1, -1, -1, 272, 273, 274, 275, + -1, 41, -1, 279, 44, 281, -1, -1, -1, -1, + -1, 287, 288, 289, 290, -1, -1, -1, 58, 59, + -1, 297, 298, 63, 300, 301, 302, 303, 304, 305, + 306, -1, -1, -1, -1, -1, -1, -1, -1, 272, + 273, 274, 275, -1, 41, -1, 279, 44, 281, -1, + -1, -1, -1, 93, 287, 288, 289, 290, -1, -1, + -1, 58, 59, -1, 297, 298, 63, 300, 301, 302, + 303, 304, 305, 306, -1, 272, 273, 274, 275, -1, + 41, -1, 279, 44, 281, -1, -1, -1, -1, -1, + 287, 288, 289, 290, -1, -1, 93, 58, 59, -1, + 297, 298, 63, 300, 301, 302, 303, 304, 305, 306, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 272, 273, 274, 275, -1, -1, -1, 279, + -1, 281, 93, -1, -1, -1, -1, 287, 288, 289, + 290, 41, -1, -1, 44, -1, -1, 297, 298, -1, + 300, 301, 302, 303, 304, 305, 306, -1, 58, 59, + -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, + 272, 273, 274, 275, -1, -1, -1, 279, -1, 281, + -1, -1, -1, -1, -1, 287, 288, 289, 290, -1, + -1, 41, -1, 93, 44, 297, 298, -1, 300, 301, + 302, 303, 304, 305, 306, -1, -1, -1, 58, 59, + -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 272, 273, 274, 275, -1, 41, -1, 279, + 44, 281, -1, 93, -1, -1, -1, 287, 288, 289, + 290, -1, -1, -1, 58, 59, -1, 297, 298, 63, + 300, 301, 302, 303, 304, 305, -1, 91, -1, -1, + 41, -1, -1, 44, -1, 272, 273, 274, 275, -1, + 41, -1, 279, 44, 281, -1, -1, 58, 59, 93, + 287, 288, 63, 290, -1, -1, -1, 58, 59, 123, + 297, 298, 63, 300, 301, 302, 303, 304, 305, -1, + -1, 272, 273, 274, 275, -1, 41, -1, 279, 44, + 281, -1, 93, -1, -1, -1, 287, 288, 41, -1, + -1, 44, 93, 58, 59, -1, 297, 298, 63, 300, + 301, 302, 303, 304, 305, 58, 59, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, + -1, -1, 44, -1, -1, -1, -1, -1, 93, -1, + -1, -1, 272, 273, 274, 275, 58, 59, -1, 279, + 93, 281, -1, -1, -1, -1, -1, 287, 288, -1, + -1, -1, -1, -1, -1, -1, -1, 297, 298, -1, + 300, 301, 302, 303, 304, -1, -1, 63, -1, -1, + -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 272, 273, 274, 275, -1, -1, -1, 279, + -1, 281, -1, -1, -1, 91, -1, 287, 288, -1, + -1, -1, -1, -1, -1, 63, -1, 297, 298, -1, + 300, 301, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, 287, 288, 289, 290, 123, 272, 273, + 274, 275, -1, 91, -1, 279, -1, 281, 302, 303, + 304, 305, 306, 287, 288, 309, -1, -1, 312, 313, + 314, -1, -1, 297, 298, -1, 300, 301, 302, 303, + 304, 272, 273, 274, 275, 123, -1, -1, 279, -1, + 281, 272, 273, 274, 275, -1, -1, -1, 279, -1, + 281, -1, -1, -1, -1, -1, 297, 298, -1, 300, + 301, 302, 303, 91, -1, -1, 297, 298, -1, 300, + 301, 302, -1, -1, -1, -1, -1, 272, 273, 274, + 275, -1, -1, -1, 279, -1, 281, -1, -1, 272, + 273, 274, 275, -1, -1, 123, 279, -1, -1, -1, + -1, -1, 297, 298, -1, 300, 301, -1, -1, -1, + -1, -1, -1, -1, 297, 298, -1, -1, 30, -1, + 272, 273, 274, 275, -1, -1, 38, 279, -1, -1, + 42, -1, -1, 45, -1, -1, -1, -1, -1, -1, + 52, 53, 54, 55, 56, 297, 298, 59, 60, -1, + -1, -1, -1, -1, 66, 281, -1, -1, -1, -1, + -1, 287, 288, 289, 290, -1, -1, -1, -1, -1, + -1, -1, 25, 26, 300, 301, 302, 303, 304, 305, + 306, 93, -1, 309, 37, -1, 312, 313, 314, -1, + 43, 44, 45, 281, -1, -1, -1, 50, -1, 287, + 288, 289, 290, -1, -1, -1, -1, -1, -1, 62, + 63, 64, 65, 301, 302, 303, 304, 305, 306, -1, + -1, 309, -1, -1, 312, 313, 314, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, -1, 107, -1, -1, -1, -1, 287, + 288, 289, 290, -1, 176, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 303, 304, 305, 306, -1, + -1, 309, -1, -1, 312, 313, 314, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 167, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 191, -1, + -1, -1, -1, 255, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 286, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 0 #endif - str_cat(str,"-"); - str_cat(str,s); - str_cat(str," "); - if (*++s) { - (void)apush(stab_array(incstab),str_make(s,0)); - } - else if (argv[1]) { - (void)apush(stab_array(incstab),str_make(argv[1],0)); - str_cat(str,argv[1]); - argc--,argv++; - str_cat(str," "); - } - break; - case 'P': -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -P allowed in setuid scripts"); +#define YYMAXTOKEN 314 +#if YYDEBUG +static char *yyname[] = { +"end-of-file",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"WORD","METHOD","FUNCMETH","THING", +"PMFUNC","PRIVATEREF","FUNC0SUB","UNIOPSUB","LSTOPSUB","LABEL","FORMAT","SUB", +"ANONSUB","PACKAGE","USE","WHILE","UNTIL","IF","UNLESS","ELSE","ELSIF", +"CONTINUE","FOR","LOOPEX","DOTDOT","FUNC0","FUNC1","FUNC","UNIOP","LSTOP", +"RELOP","EQOP","MULOP","ADDOP","DOLSHARP","DO","HASHBRACK","NOAMP","LOCAL","MY", +"OROP","ANDOP","NOTOP","ASSIGNOP","OROR","ANDAND","BITOROP","BITANDOP", +"SHIFTOP","MATCHOP","UMINUS","REFGEN","POWOP","PREINC","PREDEC","POSTINC", +"POSTDEC","ARROW", +}; +static char *yyrule[] = { +"$accept : prog", +"$$1 :", +"prog : $$1 lineseq", +"block : '{' remember lineseq '}'", +"remember :", +"mblock : '{' mremember lineseq '}'", +"mremember :", +"lineseq :", +"lineseq : lineseq decl", +"lineseq : lineseq line", +"line : label cond", +"line : loop", +"line : label ';'", +"line : label sideff ';'", +"sideff : error", +"sideff : expr", +"sideff : expr IF expr", +"sideff : expr UNLESS expr", +"sideff : expr WHILE expr", +"sideff : expr UNTIL iexpr", +"sideff : expr FOR expr", +"else :", +"else : ELSE mblock", +"else : ELSIF '(' mexpr ')' mblock else", +"cond : IF '(' remember mexpr ')' mblock else", +"cond : UNLESS '(' remember miexpr ')' mblock else", +"cont :", +"cont : CONTINUE block", +"loop : label WHILE '(' remember mtexpr ')' mblock cont", +"loop : label UNTIL '(' remember miexpr ')' mblock cont", +"loop : label FOR MY remember my_scalar '(' mexpr ')' mblock cont", +"loop : label FOR scalar '(' remember mexpr ')' mblock cont", +"loop : label FOR '(' remember mexpr ')' mblock cont", +"loop : label FOR '(' remember mnexpr ';' mtexpr ';' mnexpr ')' mblock", +"loop : label block cont", +"nexpr :", +"nexpr : sideff", +"texpr :", +"texpr : expr", +"iexpr : expr", +"mexpr : expr", +"mnexpr : nexpr", +"mtexpr : texpr", +"miexpr : iexpr", +"label :", +"label : LABEL", +"decl : format", +"decl : subrout", +"decl : package", +"decl : use", +"format : FORMAT startformsub formname block", +"formname : WORD", +"formname :", +"subrout : SUB startsub subname proto subbody", +"startsub :", +"startanonsub :", +"startformsub :", +"subname : WORD", +"proto :", +"proto : THING", +"subbody : block", +"subbody : ';'", +"package : PACKAGE WORD ';'", +"package : PACKAGE ';'", +"$$2 :", +"use : USE startsub $$2 WORD WORD listexpr ';'", +"expr : expr ANDOP expr", +"expr : expr OROP expr", +"expr : argexpr", +"argexpr : argexpr ','", +"argexpr : argexpr ',' term", +"argexpr : term", +"listop : LSTOP indirob argexpr", +"listop : FUNC '(' indirob expr ')'", +"listop : term ARROW method '(' listexprcom ')'", +"listop : term ARROW method", +"listop : METHOD indirob listexpr", +"listop : FUNCMETH indirob '(' listexprcom ')'", +"listop : LSTOP listexpr", +"listop : FUNC '(' listexprcom ')'", +"$$3 :", +"listop : LSTOPSUB startanonsub block $$3 listexpr", +"method : METHOD", +"method : scalar", +"term : term ASSIGNOP term", +"term : term POWOP term", +"term : term MULOP term", +"term : term ADDOP term", +"term : term SHIFTOP term", +"term : term RELOP term", +"term : term EQOP term", +"term : term BITANDOP term", +"term : term BITOROP term", +"term : term DOTDOT term", +"term : term ANDAND term", +"term : term OROR term", +"term : term '?' term ':' term", +"term : term MATCHOP term", +"term : '-' term", +"term : '+' term", +"term : '!' term", +"term : '~' term", +"term : REFGEN term", +"term : term POSTINC", +"term : term POSTDEC", +"term : PREINC term", +"term : PREDEC term", +"term : local term", +"term : '(' expr ')'", +"term : '(' ')'", +"term : '[' expr ']'", +"term : '[' ']'", +"term : HASHBRACK expr ';' '}'", +"term : HASHBRACK ';' '}'", +"term : ANONSUB startanonsub proto block", +"term : scalar", +"term : star '{' expr ';' '}'", +"term : star", +"term : scalar '[' expr ']'", +"term : term ARROW '[' expr ']'", +"term : term '[' expr ']'", +"term : hsh", +"term : ary", +"term : arylen", +"term : scalar '{' expr ';' '}'", +"term : term ARROW '{' expr ';' '}'", +"term : term '{' expr ';' '}'", +"term : '(' expr ')' '[' expr ']'", +"term : '(' ')' '[' expr ']'", +"term : ary '[' expr ']'", +"term : ary '{' expr ';' '}'", +"term : THING", +"term : amper", +"term : amper '(' ')'", +"term : amper '(' expr ')'", +"term : NOAMP WORD listexpr", +"term : DO term", +"term : DO block", +"term : DO WORD '(' ')'", +"term : DO WORD '(' expr ')'", +"term : DO scalar '(' ')'", +"term : DO scalar '(' expr ')'", +"term : term ARROW '(' ')'", +"term : term ARROW '(' expr ')'", +"term : LOOPEX", +"term : LOOPEX term", +"term : NOTOP argexpr", +"term : UNIOP", +"term : UNIOP block", +"term : UNIOP term", +"term : UNIOPSUB term", +"term : FUNC0", +"term : FUNC0 '(' ')'", +"term : FUNC0SUB", +"term : FUNC1 '(' ')'", +"term : FUNC1 '(' expr ')'", +"term : PMFUNC '(' term ')'", +"term : PMFUNC '(' term ',' term ')'", +"term : WORD", +"term : listop", +"listexpr :", +"listexpr : argexpr", +"listexprcom :", +"listexprcom : expr", +"listexprcom : expr ','", +"local : LOCAL", +"local : MY", +"my_scalar : scalar", +"amper : '&' indirob", +"scalar : '$' indirob", +"ary : '@' indirob", +"hsh : '%' indirob", +"arylen : DOLSHARP indirob", +"star : '*' indirob", +"indirob : WORD", +"indirob : scalar", +"indirob : block", +"indirob : PRIVATEREF", +}; #endif - preprocess = TRUE; - s++; - goto reswitch; - case 's': -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -s allowed in setuid scripts"); +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#ifdef YYSTACKSIZE +#ifndef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE #endif - doswitches = TRUE; - s++; - goto reswitch; - case 'S': - dosearch = TRUE; - s++; - goto reswitch; - case 'x': - doextract = TRUE; - s++; - if (*s) - cddir = savestr(s); - break; - case '-': - argc--,argv++; - goto switch_end; - case 0: - break; - default: - fatal("Unrecognized switch: -%s",s); - } - } - switch_end: - if (e_fp) { - (void)fclose(e_fp); - argc++,argv--; - argv[0] = e_tmpname; - } -#ifndef PRIVLIB -#define PRIVLIB "/usr/local/lib/perl" -#endif - (void)apush(stab_array(incstab),str_make(PRIVLIB,0)); - (void)apush(stab_array(incstab),str_make(".",1)); - - str_set(&str_no,No); - str_set(&str_yes,Yes); - - /* open script */ - - if (argv[0] == Nullch) - argv[0] = "-"; - if (dosearch && !index(argv[0], '/') && (s = getenv("PATH"))) { - char *xfound = Nullch, *xfailed = Nullch; - int len; - - bufend = s + strlen(s); - while (*s) { -#ifndef MSDOS - s = cpytill(tokenbuf,s,bufend,':',&len); #else - for (len = 0; *s && *s != ';'; tokenbuf[len++] = *s++); - tokenbuf[len] = '\0'; -#endif - if (*s) - s++; -#ifndef MSDOS - if (len && tokenbuf[len-1] != '/') +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH #else - if (len && tokenbuf[len-1] != '\\') +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 #endif - (void)strcat(tokenbuf+len,"/"); - (void)strcat(tokenbuf+len,argv[0]); -#ifdef DEBUGGING - if (debug & 1) - fprintf(stderr,"Looking for %s\n",tokenbuf); #endif - if (stat(tokenbuf,&statbuf) < 0) /* not there? */ - continue; - if ((statbuf.st_mode & S_IFMT) == S_IFREG - && cando(S_IREAD,TRUE,&statbuf) && cando(S_IEXEC,TRUE,&statbuf)) { - xfound = tokenbuf; /* bingo! */ - break; - } - if (!xfailed) - xfailed = savestr(tokenbuf); - } - if (!xfound) - fatal("Can't execute %s", xfailed ? xfailed : argv[0] ); - if (xfailed) - Safefree(xfailed); - argv[0] = savestr(xfound); - } - - pidstatary = anew(Nullstab); /* for remembering popen pids, status */ +#line 652 "perly.y" + /* PROGRAM */ +#line 1318 "perly.c" +#define YYABORT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab + +struct ysv { + short* yyss; + YYSTYPE* yyvs; + int oldyydebug; + int oldyynerrs; + int oldyyerrflag; + int oldyychar; + YYSTYPE oldyyval; + YYSTYPE oldyylval; +}; + +void +yydestruct(void *ptr) +{ + struct ysv* ysave = (struct ysv*)ptr; + if (ysave->yyss) Safefree(ysave->yyss); + if (ysave->yyvs) Safefree(ysave->yyvs); + yydebug = ysave->oldyydebug; + yynerrs = ysave->oldyynerrs; + yyerrflag = ysave->oldyyerrflag; + yychar = ysave->oldyychar; + yyval = ysave->oldyyval; + yylval = ysave->oldyylval; + Safefree(ysave); +} - origfilename = savestr(argv[0]); - filename = origfilename; - if (strEQ(filename,"-")) - argv[0] = ""; - if (preprocess) { - str_cat(str,"-I"); - str_cat(str,PRIVLIB); - (void)sprintf(buf, "\ -/bin/sed %s -e '/^[^#]/b' \ - -e '/^#[ ]*include[ ]/b' \ - -e '/^#[ ]*define[ ]/b' \ - -e '/^#[ ]*if[ ]/b' \ - -e '/^#[ ]*ifdef[ ]/b' \ - -e '/^#[ ]*ifndef[ ]/b' \ - -e '/^#[ ]*else/b' \ - -e '/^#[ ]*endif/b' \ - -e 's/^#.*//' \ - %s | %s -C %s %s", - (doextract ? "-e '1,/^#/d\n'" : ""), - argv[0], CPPSTDIN, str_get(str), CPPMINUS); - doextract = FALSE; -#ifdef IAMSUID /* actually, this is caught earlier */ - if (euid != uid && !euid) /* if running suidperl */ -#ifdef SETEUID - (void)seteuid(uid); /* musn't stay setuid root */ -#else -#ifdef SETREUID - (void)setreuid(-1, uid); -#else - setuid(uid); +int +yyparse(void) +{ + register int yym, yyn, yystate; + register short *yyssp; + register YYSTYPE *yyvsp; + short* yyss; + YYSTYPE* yyvs; + unsigned yystacksize = YYSTACKSIZE; + int retval = 0; +#if YYDEBUG + register char *yys; +#ifndef __cplusplus + extern char *getenv(); #endif #endif -#endif /* IAMSUID */ - rsfp = mypopen(buf,"r"); + + struct ysv *ysave; + New(73, ysave, 1, struct ysv); + SAVEDESTRUCTOR(yydestruct, ysave); + ysave->oldyydebug = yydebug; + ysave->oldyynerrs = yynerrs; + ysave->oldyyerrflag = yyerrflag; + ysave->oldyychar = yychar; + ysave->oldyyval = yyval; + ysave->oldyylval = yylval; + +#if YYDEBUG + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; } - else if (!*argv[0]) - rsfp = stdin; - else - rsfp = fopen(argv[0],"r"); - if (rsfp == Nullfp) { -#ifdef DOSUID -#ifndef IAMSUID /* in case script is not readable before setuid */ - if (euid && stat(filename,&statbuf) >= 0 && - statbuf.st_mode & (S_ISUID|S_ISGID)) { - (void)sprintf(buf, "%s/%s", BIN, "suidperl"); - execv(buf, origargv); /* try again */ - fatal("Can't do setuid\n"); - } #endif -#endif - fatal("Can't open perl script \"%s\": %s\n", - filename, strerror(errno)); - } - str_free(str); /* free -I directories */ - - /* do we need to emulate setuid on scripts? */ - - /* This code is for those BSD systems that have setuid #! scripts disabled - * in the kernel because of a security problem. Merely defining DOSUID - * in perl will not fix that problem, but if you have disabled setuid - * scripts in the kernel, this will attempt to emulate setuid and setgid - * on scripts that have those now-otherwise-useless bits set. The setuid - * root version must be called suidperl. If regular perl discovers that - * it has opened a setuid script, it calls suidperl with the same argv - * that it had. If suidperl finds that the script it has just opened - * is NOT setuid root, it sets the effective uid back to the uid. We - * don't just make perl setuid root because that loses the effective - * uid we had before invoking perl, if it was different from the uid. - * - * DOSUID must be defined in both perl and suidperl, and IAMSUID must - * be defined in suidperl only. suidperl must be setuid root. The - * Configure script will set this up for you if you want it. - * - * There is also the possibility of have a script which is running - * set-id due to a C wrapper. We want to do the TAINT checks - * on these set-id scripts, but don't want to have the overhead of - * them in normal perl, and can't use suidperl because it will lose - * the effective uid info, so we have an additional non-setuid root - * version called taintperl that just does the TAINT checks. - */ - -#ifdef DOSUID - if (fstat(fileno(rsfp),&statbuf) < 0) /* normal stat is insecure */ - fatal("Can't stat script \"%s\"",filename); - if (statbuf.st_mode & (S_ISUID|S_ISGID)) { - int len; - -#ifdef IAMSUID -#ifndef SETREUID - /* On this access check to make sure the directories are readable, - * there is actually a small window that the user could use to make - * filename point to an accessible directory. So there is a faint - * chance that someone could execute a setuid script down in a - * non-accessible directory. I don't know what to do about that. - * But I don't think it's too important. The manual lies when - * it says access() is useful in setuid programs. - */ - if (access(filename,1)) /* as a double check */ - fatal("Permission denied"); -#else - /* If we can swap euid and uid, then we can determine access rights - * with a simple stat of the file, and then compare device and - * inode to make sure we did stat() on the same file we opened. - * Then we just have to make sure he or she can execute it. - */ - { - struct stat tmpstatbuf; - - if (setreuid(euid,uid) < 0 || getuid() != euid || geteuid() != uid) - fatal("Can't swap uid and euid"); /* really paranoid */ - if (stat(filename,&tmpstatbuf) < 0) /* testing full pathname here */ - fatal("Permission denied"); - if (tmpstatbuf.st_dev != statbuf.st_dev || - tmpstatbuf.st_ino != statbuf.st_ino) { - (void)fclose(rsfp); - if (rsfp = mypopen("/bin/mail root","w")) { /* heh, heh */ - fprintf(rsfp, -"User %d tried to run dev %d ino %d in place of dev %d ino %d!\n\ -(Filename of set-id script was %s, uid %d gid %d.)\n\nSincerely,\nperl\n", - uid,tmpstatbuf.st_dev, tmpstatbuf.st_ino, - statbuf.st_dev, statbuf.st_ino, - filename, statbuf.st_uid, statbuf.st_gid); - (void)mypclose(rsfp); - } - fatal("Permission denied\n"); - } - if (setreuid(uid,euid) < 0 || getuid() != uid || geteuid() != euid) - fatal("Can't reswap uid and euid"); - if (!cando(S_IEXEC,FALSE,&statbuf)) /* can real uid exec? */ - fatal("Permission denied\n"); - } -#endif /* SETREUID */ -#endif /* IAMSUID */ - - if ((statbuf.st_mode & S_IFMT) != S_IFREG) - fatal("Permission denied"); - if ((statbuf.st_mode >> 6) & S_IWRITE) - fatal("Setuid/gid script is writable by world"); - doswitches = FALSE; /* -s is insecure in suid */ - curcmd->c_line++; - if (fgets(tokenbuf,sizeof tokenbuf, rsfp) == Nullch || - strnNE(tokenbuf,"#!",2) ) /* required even on Sys V */ - fatal("No #! line"); - s = tokenbuf+2; - if (*s == ' ') s++; - while (!isspace(*s)) s++; - if (strnNE(s-4,"perl",4)) /* sanity check */ - fatal("Not a perl script"); - while (*s == ' ' || *s == '\t') s++; - /* - * #! arg must be what we saw above. They can invoke it by - * mentioning suidperl explicitly, but they may not add any strange - * arguments beyond what #! says if they do invoke suidperl that way. - */ - len = strlen(validarg); - if (strEQ(validarg," PHOOEY ") || - strnNE(s,validarg,len) || !isspace(s[len])) - fatal("Args must match #! line"); -#ifndef IAMSUID - if (euid != uid && (statbuf.st_mode & S_ISUID) && - euid == statbuf.st_uid) - if (!do_undump) - fatal("YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!\n\ -FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); -#endif /* IAMSUID */ + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); - if (euid) { /* oops, we're not the setuid root perl */ - (void)fclose(rsfp); -#ifndef IAMSUID - (void)sprintf(buf, "%s/%s", BIN, "suidperl"); - execv(buf, origargv); /* try again */ -#endif - fatal("Can't do setuid\n"); - } - - if (statbuf.st_mode & S_ISGID && statbuf.st_gid != egid) -#ifdef SETEGID - (void)setegid(statbuf.st_gid); -#else -#ifdef SETREGID - (void)setregid((GIDTYPE)-1,statbuf.st_gid); -#else - setgid(statbuf.st_gid); -#endif -#endif - if (statbuf.st_mode & S_ISUID) { - if (statbuf.st_uid != euid) -#ifdef SETEUID - (void)seteuid(statbuf.st_uid); /* all that for this */ -#else -#ifdef SETREUID - (void)setreuid((UIDTYPE)-1,statbuf.st_uid); -#else - setuid(statbuf.st_uid); -#endif -#endif - } - else if (uid) /* oops, mustn't run as root */ -#ifdef SETEUID - (void)seteuid((UIDTYPE)uid); -#else -#ifdef SETREUID - (void)setreuid((UIDTYPE)-1,(UIDTYPE)uid); -#else - setuid((UIDTYPE)uid); -#endif + /* + ** Initialize private stacks (yyparse may be called from an action) + */ + New(73, yyss, yystacksize, short); + New(73, yyvs, yystacksize, YYSTYPE); + ysave->yyss = yyss; + ysave->yyvs = yyvs; + if (!yyvs || !yyss) + goto yyoverflow; + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("yydebug: state %d, reading %d (%s)\n", yystate, + yychar, yys); + } #endif - uid = (int)getuid(); - euid = (int)geteuid(); - gid = (int)getgid(); - egid = (int)getegid(); - if (!cando(S_IEXEC,TRUE,&statbuf)) - fatal("Permission denied\n"); /* they can't do this */ - } -#ifdef IAMSUID - else if (preprocess) - fatal("-P not allowed for setuid/setgid script\n"); - else - fatal("Script is not setuid/setgid in suidperl\n"); -#else -#ifndef TAINT /* we aren't taintperl or suidperl */ - /* script has a wrapper--can't run suidperl or we lose euid */ - else if (euid != uid || egid != gid) { - (void)fclose(rsfp); - (void)sprintf(buf, "%s/%s", BIN, "taintperl"); - execv(buf, origargv); /* try again */ - fatal("Can't run setuid script with taint checks"); - } -#endif /* TAINT */ -#endif /* IAMSUID */ -#else /* !DOSUID */ -#ifndef TAINT /* we aren't taintperl or suidperl */ - if (euid != uid || egid != gid) { /* (suidperl doesn't exist, in fact) */ -#ifndef SETUID_SCRIPTS_ARE_SECURE_NOW - fstat(fileno(rsfp),&statbuf); /* may be either wrapped or real suid */ - if ((euid != uid && euid == statbuf.st_uid && statbuf.st_mode & S_ISUID) - || - (egid != gid && egid == statbuf.st_gid && statbuf.st_mode & S_ISGID) - ) - if (!do_undump) - fatal("YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!\n\ -FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); -#endif /* SETUID_SCRIPTS_ARE_SECURE_NOW */ - /* not set-id, must be wrapped */ - (void)fclose(rsfp); - (void)sprintf(buf, "%s/%s", BIN, "taintperl"); - execv(buf, origargv); /* try again */ - fatal("Can't run setuid script with taint checks"); - } -#endif /* TAINT */ -#endif /* DOSUID */ - -#if !defined(IAMSUID) && !defined(TAINT) - - /* skip forward in input to the real script? */ - - while (doextract) { - if ((s = str_gets(linestr, rsfp, 0)) == Nullch) - fatal("No Perl script found in input\n"); - if (*s == '#' && s[1] == '!' && instr(s,"perl")) { - ungetc('\n',rsfp); /* to keep line count right */ - doextract = FALSE; - if (s = instr(s,"perl -")) { - s += 6; - while (s = moreswitches(s)) ; - } - if (cddir && chdir(cddir) < 0) - fatal("Can't chdir to %s",cddir); - } - } -#endif /* !defined(IAMSUID) && !defined(TAINT) */ - - defstab = stabent("_",TRUE); - - if (perldb) { - debstash = hnew(0); - stab_xhash(stabent("_DB",TRUE)) = debstash; - curstash = debstash; - lineary = stab_xarray(aadd((tmpstab = stabent("line",TRUE)))); - tmpstab->str_pok |= SP_MULTI; - subname = str_make("main",4); - DBstab = stabent("DB",TRUE); - DBstab->str_pok |= SP_MULTI; - DBsub = hadd(tmpstab = stabent("sub",TRUE)); - tmpstab->str_pok |= SP_MULTI; - DBsingle = stab_val((tmpstab = stabent("single",TRUE))); - tmpstab->str_pok |= SP_MULTI; - curstash = defstash; - } - - /* init tokener */ - - bufend = bufptr = str_get(linestr); - - savestack = anew(Nullstab); /* for saving non-local values */ - stack = anew(Nullstab); /* for saving non-local values */ - stack->ary_flags = 0; /* not a real array */ - afill(stack,63); afill(stack,-1); /* preextend stack */ - afill(savestack,63); afill(savestack,-1); - - /* now parse the script */ - - error_count = 0; - if (yyparse() || error_count) { - if (minus_c) - fatal("%s had compilation errors.\n", origfilename); - else { - fatal("Execution of %s aborted due to compilation errors.\n", - origfilename); - } - } - - New(50,loop_stack,128,struct loop); -#ifdef DEBUGGING - if (debug) { - New(51,debname,128,char); - New(52,debdelim,128,char); } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n", + yystate, yytable[yyn]); #endif - curstash = defstash; - - preprocess = FALSE; - if (e_fp) { - e_fp = Nullfp; - (void)UNLINK(e_tmpname); + if (yyssp >= yyss + yystacksize - 1) + { + /* + ** reallocate and recover. Note that pointers + ** have to be reset, or bad things will happen + */ + int yyps_index = (yyssp - yyss); + int yypv_index = (yyvsp - yyvs); + yystacksize += YYSTACKSIZE; + ysave->yyvs = yyvs = + (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE)); + ysave->yyss = yyss = + (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short)); + if (!yyvs || !yyss) + goto yyoverflow; + yyssp = yyss + yyps_index; + yyvsp = yyvs + yypv_index; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; } - - /* initialize everything that won't change if we undump */ - - if (sigstab = stabent("SIG",allstabs)) { - sigstab->str_pok |= SP_MULTI; - (void)hadd(sigstab); + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; } - - magicalize("!#?^~=-%0123456789.+&*()<>,\\/[|`':"); - userinit(); /* in case linked C routines want magical variables */ - - amperstab = stabent("&",allstabs); - leftstab = stabent("`",allstabs); - rightstab = stabent("'",allstabs); - sawampersand = (amperstab || leftstab || rightstab); - if (tmpstab = stabent(":",allstabs)) - str_set(STAB_STR(tmpstab),chopset); - - /* these aren't necessarily magical */ - if (tmpstab = stabent(";",allstabs)) - str_set(STAB_STR(tmpstab),"\034"); - if (tmpstab = stabent("]",allstabs)) { - str = STAB_STR(tmpstab); - str_set(str,rcsid); - strncpy(tokenbuf,rcsid+19,3); - sprintf(tokenbuf+3,"%2.2d",PATCHLEVEL); - str->str_u.str_nval = atof(tokenbuf); - str->str_nok = 1; - } - str_nset(stab_val(stabent("\"", TRUE)), " ", 1); - - stdinstab = stabent("STDIN",TRUE); - stdinstab->str_pok |= SP_MULTI; - stab_io(stdinstab) = stio_new(); - stab_io(stdinstab)->ifp = stdin; - tmpstab = stabent("stdin",TRUE); - stab_io(tmpstab) = stab_io(stdinstab); - tmpstab->str_pok |= SP_MULTI; - - tmpstab = stabent("STDOUT",TRUE); - tmpstab->str_pok |= SP_MULTI; - stab_io(tmpstab) = stio_new(); - stab_io(tmpstab)->ofp = stab_io(tmpstab)->ifp = stdout; - defoutstab = tmpstab; - tmpstab = stabent("stdout",TRUE); - stab_io(tmpstab) = stab_io(defoutstab); - tmpstab->str_pok |= SP_MULTI; - - curoutstab = stabent("STDERR",TRUE); - curoutstab->str_pok |= SP_MULTI; - stab_io(curoutstab) = stio_new(); - stab_io(curoutstab)->ofp = stab_io(curoutstab)->ifp = stderr; - tmpstab = stabent("stderr",TRUE); - stab_io(tmpstab) = stab_io(curoutstab); - tmpstab->str_pok |= SP_MULTI; - curoutstab = defoutstab; /* switch back to STDOUT */ - - statname = Str_new(66,0); /* last filename we did stat on */ - - perldb = FALSE; /* don't try to instrument evals */ - - if (dowarn) { - stab_check('A','Z'); - stab_check('a','z'); - } - - if (do_undump) - abort(); - - just_doit: /* come here if running an undumped a.out */ - argc--,argv++; /* skip name of script */ - if (doswitches) { - for (; argc > 0 && **argv == '-'; argc--,argv++) { - if (argv[0][1] == '-') { - argc--,argv++; - break; - } - str_numset(stab_val(stabent(argv[0]+1,TRUE)),(double)1.0); - } - } -#ifdef TAINT - tainted = 1; + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; #endif - if (tmpstab = stabent("0",allstabs)) - str_set(STAB_STR(tmpstab),origfilename); - if (argvstab = stabent("ARGV",allstabs)) { - argvstab->str_pok |= SP_MULTI; - (void)aadd(argvstab); - aclear(stab_array(argvstab)); - for (; argc > 0; argc--,argv++) { - (void)apush(stab_array(argvstab),str_make(argv[0],0)); - } - } -#ifdef TAINT - (void) stabent("ENV",TRUE); /* must test PATH and IFS */ +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; #endif - if (envstab = stabent("ENV",allstabs)) { - envstab->str_pok |= SP_MULTI; - (void)hadd(envstab); - hclear(stab_hash(envstab)); - if (env != environ) - environ[0] = Nullch; - for (; *env; env++) { - if (!(s = index(*env,'='))) - continue; - *s++ = '\0'; - str = str_make(s--,0); - str_magic(str, envstab, 'E', *env, s - *env); - (void)hstore(stab_hash(envstab), *env, s - *env, str, 0); - *s = '='; - } - } -#ifdef TAINT - tainted = 0; +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + PerlIO_printf(Perl_debug_log, + "yydebug: state %d, error recovery shifting to state %d\n", + *yyssp, yytable[yyn]); #endif - if (tmpstab = stabent("$",allstabs)) - str_numset(STAB_STR(tmpstab),(double)getpid()); - - if (setjmp(top_env)) /* sets goto_targ on longjump */ - loop_ptr = -1; /* start label stack again */ - -#ifdef DEBUGGING - if (debug & 1024) - dump_all(); - if (debug) - fprintf(stderr,"\nEXECUTING...\n\n"); + if (yyssp >= yyss + yystacksize - 1) + { + /* + ** reallocate and recover. Note that pointers + ** have to be reset, or bad things will happen + */ + int yyps_index = (yyssp - yyss); + int yypv_index = (yyvsp - yyvs); + yystacksize += YYSTACKSIZE; + ysave->yyvs = yyvs = (YYSTYPE*)PerlMem_realloc((char*)yyvs, + yystacksize * sizeof(YYSTYPE)); + ysave->yyss = yyss = (short*)PerlMem_realloc((char*)yyss, + yystacksize * sizeof(short)); + if (!yyvs || !yyss) + goto yyoverflow; + yyssp = yyss + yyps_index; + yyvsp = yyvs + yypv_index; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + PerlIO_printf(Perl_debug_log, + "yydebug: error recovery discarding state %d\n", + *yyssp); #endif - - if (minus_c) { - fprintf(stderr,"%s syntax OK\n", origfilename); - exit(0); - } - - /* do it */ - - (void) cmd_exec(main_root,G_SCALAR,-1); - - if (goto_targ) - fatal("Can't find label \"%s\"--aborting",goto_targ); - exit(0); - /* NOTREACHED */ -} - -magicalize(list) -register char *list; -{ - char sym[2]; - - sym[1] = '\0'; - while (*sym = *list++) - magicname(sym, Nullch, 0); -} - -int -magicname(sym,name,namlen) -char *sym; -char *name; -int namlen; -{ - register STAB *stab; - - if (stab = stabent(sym,allstabs)) { - stab_flags(stab) = SF_VMAGIC; - str_magic(stab_val(stab), stab, 0, name, namlen); - } -} - -/* this routine is in perly.c by virtue of being sort of an alternate main() */ - -int -do_eval(str,optype,stash,gimme,arglast) -STR *str; -int optype; -HASH *stash; -int gimme; -int *arglast; -{ - STR **st = stack->ary_array; - int retval; - CMD *myroot; - ARRAY *ar; - int i; - char * VOLATILE oldfile = filename; - CMD * VOLATILE oldcurcmd = curcmd; - VOLATILE int oldtmps_base = tmps_base; - VOLATILE int oldsave = savestack->ary_fill; - SPAT * VOLATILE oldspat = curspat; - static char *last_eval = Nullch; - static CMD *last_root = Nullcmd; - VOLATILE int sp = arglast[0]; - char *specfilename; - - tmps_base = tmps_max; - if (curstash != stash) { - (void)savehptr(&curstash); - curstash = stash; - } - str_set(stab_val(stabent("@",TRUE)),""); - curcmd = &compiling; - if (optype == O_EVAL) { /* normal eval */ - filename = "(eval)"; - curcmd->c_line = 1; - str_sset(linestr,str); - str_cat(linestr,";"); /* be kind to them */ - } - else { - if (last_root && !in_eval) { - Safefree(last_eval); - cmd_free(last_root); - last_root = Nullcmd; - } - specfilename = str_get(str); - filename = savestr(specfilename); /* can't free this easily */ - str_set(linestr,""); - if (optype == O_REQUIRE && - hfetch(stab_hash(incstab), specfilename, strlen(specfilename), 0)) { - filename = oldfile; - tmps_base = oldtmps_base; - st[++sp] = &str_yes; - return sp; - } - else if (*filename == '/') - rsfp = fopen(filename,"r"); - else { - ar = stab_array(incstab); - Safefree(filename); - for (i = 0; i <= ar->ary_fill; i++) { - (void)sprintf(buf,"%s/%s",str_get(afetch(ar,i,TRUE)),filename); - rsfp = fopen(buf,"r"); - if (rsfp) { - char *s = buf; - - if (*s == '.' && s[1] == '/') - s += 2; - filename = savestr(s); - break; - } - } - } - if (!rsfp) { - filename = oldfile; - tmps_base = oldtmps_base; - if (optype == O_REQUIRE) { - sprintf(tokenbuf,"Can't locate %s in @INC", specfilename); - if (instr(tokenbuf,".h ")) - strcat(tokenbuf," (change .h to .ph maybe?)"); - if (instr(tokenbuf,".ph ")) - strcat(tokenbuf," (did you run h2ph?)"); - fatal("%s",tokenbuf); - } - if (gimme != G_ARRAY) - st[++sp] = &str_undef; - return sp; - } - curcmd->c_line = 0; - } - in_eval++; - oldoldbufptr = oldbufptr = bufptr = str_get(linestr); - bufend = bufptr + linestr->str_cur; - if (++loop_ptr >= loop_max) { - loop_max += 128; - Renew(loop_stack, loop_max, struct loop); - } - loop_stack[loop_ptr].loop_label = "_EVAL_"; - loop_stack[loop_ptr].loop_sp = sp; -#ifdef DEBUGGING - if (debug & 4) { - deb("(Pushing label #%d _EVAL_)\n", loop_ptr); + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + PerlIO_printf(Perl_debug_log, + "yydebug: state %d, error recovery discards token %d (%s)\n", + yystate, yychar, yys); + } #endif - if (setjmp(loop_stack[loop_ptr].loop_env)) { - retval = 1; - last_root = Nullcmd; + yychar = (-1); + goto yyloop; } - else { - error_count = 0; - if (rsfp) - retval = yyparse(); - else if (last_root && *bufptr == *last_eval && strEQ(bufptr,last_eval)){ - retval = 0; - eval_root = last_root; /* no point in reparsing */ - } - else if (in_eval == 1) { - if (last_root) { - Safefree(last_eval); - cmd_free(last_root); - } - last_eval = savestr(bufptr); - last_root = Nullcmd; - retval = yyparse(); - if (!retval) - last_root = eval_root; - } - else - retval = yyparse(); - } - myroot = eval_root; /* in case cmd_exec does another eval! */ - if (retval || error_count) { - st = stack->ary_array; - sp = arglast[0]; - if (gimme != G_ARRAY) - st[++sp] = &str_undef; - last_root = Nullcmd; /* can't free on error, for some reason */ - if (rsfp) { - fclose(rsfp); - rsfp = 0; - if (optype == O_REQUIRE) - fatal("%s", str_get(stab_val(stabent("@",TRUE)))); - } - } - else { - sp = cmd_exec(eval_root,gimme,sp); - st = stack->ary_array; - for (i = arglast[0] + 1; i <= sp; i++) - st[i] = str_static(st[i]); - /* if we don't save result, free zaps it */ - if (in_eval != 1 && myroot != last_root) - cmd_free(myroot); - if (optype != O_EVAL) { - if (gimme == G_SCALAR ? str_true(st[sp]) : sp > arglast[0]) { - (void)hstore(stab_hash(incstab), specfilename, - strlen(specfilename), str_make(filename,0), 0 ); - } - else if (optype == O_REQUIRE) - fatal("%s did not return a true value", specfilename); - } - } - in_eval--; -#ifdef DEBUGGING - if (debug & 4) { - char *tmps = loop_stack[loop_ptr].loop_label; - deb("(Popping label #%d %s)\n",loop_ptr, - tmps ? tmps : "" ); - } +yyreduce: +#if YYDEBUG + if (yydebug) + PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n", + yystate, yyn, yyrule[yyn]); #endif - loop_ptr--; - filename = oldfile; - curcmd = oldcurcmd; - tmps_base = oldtmps_base; - curspat = oldspat; - if (savestack->ary_fill > oldsave) /* let them use local() */ - restorelist(oldsave); - return sp; -} - -/* This routine handles any switches that can be given during run */ - -static char * -moreswitches(s) -char *s; + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +#line 99 "perly.y" { - reswitch: - switch (*s) { - case 'a': - minus_a = TRUE; - s++; - return s; - case 'c': - minus_c = TRUE; - s++; - return s; - case 'd': -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -d allowed in setuid scripts"); -#endif - perldb = TRUE; - s++; - return s; - case 'D': -#ifdef DEBUGGING -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -D allowed in setuid scripts"); +#if defined(YYDEBUG) && defined(DEBUGGING) + yydebug = (PL_debug & 1); #endif - debug = atoi(s+1); -#else - warn("Recompile perl with -DDEBUGGING to use -D switch\n"); + PL_expect = XSTATE; + } +break; +case 2: +#line 106 "perly.y" +{ newPROG(yyvsp[0].opval); } +break; +case 3: +#line 110 "perly.y" +{ if (PL_copline > (line_t)yyvsp[-3].ival) + PL_copline = yyvsp[-3].ival; + yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); } +break; +case 4: +#line 116 "perly.y" +{ yyval.ival = block_start(TRUE); } +break; +case 5: +#line 120 "perly.y" +{ if (PL_copline > (line_t)yyvsp[-3].ival) + PL_copline = yyvsp[-3].ival; + yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); } +break; +case 6: +#line 126 "perly.y" +{ yyval.ival = block_start(FALSE); } +break; +case 7: +#line 130 "perly.y" +{ yyval.opval = Nullop; } +break; +case 8: +#line 132 "perly.y" +{ yyval.opval = yyvsp[-1].opval; } +break; +case 9: +#line 134 "perly.y" +{ yyval.opval = append_list(OP_LINESEQ, + (LISTOP*)yyvsp[-1].opval, (LISTOP*)yyvsp[0].opval); + PL_pad_reset_pending = TRUE; + if (yyvsp[-1].opval && yyvsp[0].opval) PL_hints |= HINT_BLOCK_SCOPE; } +break; +case 10: +#line 141 "perly.y" +{ yyval.opval = newSTATEOP(0, yyvsp[-1].pval, yyvsp[0].opval); } +break; +case 12: +#line 144 "perly.y" +{ if (yyvsp[-1].pval != Nullch) { + yyval.opval = newSTATEOP(0, yyvsp[-1].pval, newOP(OP_NULL, 0)); + } + else { + yyval.opval = Nullop; + PL_copline = NOLINE; + } + PL_expect = XSTATE; } +break; +case 13: +#line 153 "perly.y" +{ yyval.opval = newSTATEOP(0, yyvsp[-2].pval, yyvsp[-1].opval); + PL_expect = XSTATE; } +break; +case 14: +#line 158 "perly.y" +{ yyval.opval = Nullop; } +break; +case 15: +#line 160 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 16: +#line 162 "perly.y" +{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[0].opval, yyvsp[-2].opval); } +break; +case 17: +#line 164 "perly.y" +{ yyval.opval = newLOGOP(OP_OR, 0, yyvsp[0].opval, yyvsp[-2].opval); } +break; +case 18: +#line 166 "perly.y" +{ yyval.opval = newLOOPOP(OPf_PARENS, 1, scalar(yyvsp[0].opval), yyvsp[-2].opval); } +break; +case 19: +#line 168 "perly.y" +{ yyval.opval = newLOOPOP(OPf_PARENS, 1, yyvsp[0].opval, yyvsp[-2].opval);} +break; +case 20: +#line 170 "perly.y" +{ yyval.opval = newFOROP(0, Nullch, yyvsp[-1].ival, + Nullop, yyvsp[0].opval, yyvsp[-2].opval, Nullop); } +break; +case 21: +#line 175 "perly.y" +{ yyval.opval = Nullop; } +break; +case 22: +#line 177 "perly.y" +{ yyval.opval = scope(yyvsp[0].opval); } +break; +case 23: +#line 179 "perly.y" +{ PL_copline = yyvsp[-5].ival; + yyval.opval = newSTATEOP(0, Nullch, + newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); + PL_hints |= HINT_BLOCK_SCOPE; } +break; +case 24: +#line 186 "perly.y" +{ PL_copline = yyvsp[-6].ival; + yyval.opval = block_end(yyvsp[-4].ival, + newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); } +break; +case 25: +#line 190 "perly.y" +{ PL_copline = yyvsp[-6].ival; + yyval.opval = block_end(yyvsp[-4].ival, + newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); } +break; +case 26: +#line 196 "perly.y" +{ yyval.opval = Nullop; } +break; +case 27: +#line 198 "perly.y" +{ yyval.opval = scope(yyvsp[0].opval); } +break; +case 28: +#line 202 "perly.y" +{ PL_copline = yyvsp[-6].ival; + yyval.opval = block_end(yyvsp[-4].ival, + newSTATEOP(0, yyvsp[-7].pval, + newWHILEOP(0, 1, (LOOP*)Nullop, + yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); } +break; +case 29: +#line 208 "perly.y" +{ PL_copline = yyvsp[-6].ival; + yyval.opval = block_end(yyvsp[-4].ival, + newSTATEOP(0, yyvsp[-7].pval, + newWHILEOP(0, 1, (LOOP*)Nullop, + yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); } +break; +case 30: +#line 214 "perly.y" +{ yyval.opval = block_end(yyvsp[-6].ival, + newFOROP(0, yyvsp[-9].pval, yyvsp[-8].ival, yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); } +break; +case 31: +#line 217 "perly.y" +{ yyval.opval = block_end(yyvsp[-4].ival, + newFOROP(0, yyvsp[-8].pval, yyvsp[-7].ival, mod(yyvsp[-6].opval, OP_ENTERLOOP), + yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); } +break; +case 32: +#line 221 "perly.y" +{ yyval.opval = block_end(yyvsp[-4].ival, + newFOROP(0, yyvsp[-7].pval, yyvsp[-6].ival, Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); } +break; +case 33: +#line 225 "perly.y" +{ OP *forop = append_elem(OP_LINESEQ, + scalar(yyvsp[-6].opval), + newWHILEOP(0, 1, (LOOP*)Nullop, + yyvsp[-9].ival, scalar(yyvsp[-4].opval), + yyvsp[0].opval, scalar(yyvsp[-2].opval))); + PL_copline = yyvsp[-9].ival; + yyval.opval = block_end(yyvsp[-7].ival, newSTATEOP(0, yyvsp[-10].pval, forop)); } +break; +case 34: +#line 233 "perly.y" +{ yyval.opval = newSTATEOP(0, yyvsp[-2].pval, + newWHILEOP(0, 1, (LOOP*)Nullop, + NOLINE, Nullop, yyvsp[-1].opval, yyvsp[0].opval)); } +break; +case 35: +#line 239 "perly.y" +{ yyval.opval = Nullop; } +break; +case 37: +#line 244 "perly.y" +{ (void)scan_num("1"); yyval.opval = yylval.opval; } +break; +case 39: +#line 249 "perly.y" +{ yyval.opval = invert(scalar(yyvsp[0].opval)); } +break; +case 40: +#line 253 "perly.y" +{ yyval.opval = yyvsp[0].opval; intro_my(); } +break; +case 41: +#line 257 "perly.y" +{ yyval.opval = yyvsp[0].opval; intro_my(); } +break; +case 42: +#line 261 "perly.y" +{ yyval.opval = yyvsp[0].opval; intro_my(); } +break; +case 43: +#line 265 "perly.y" +{ yyval.opval = yyvsp[0].opval; intro_my(); } +break; +case 44: +#line 269 "perly.y" +{ yyval.pval = Nullch; } +break; +case 46: +#line 274 "perly.y" +{ yyval.ival = 0; } +break; +case 47: +#line 276 "perly.y" +{ yyval.ival = 0; } +break; +case 48: +#line 278 "perly.y" +{ yyval.ival = 0; } +break; +case 49: +#line 280 "perly.y" +{ yyval.ival = 0; } +break; +case 50: +#line 284 "perly.y" +{ newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); } +break; +case 51: +#line 287 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 52: +#line 288 "perly.y" +{ yyval.opval = Nullop; } +break; +case 53: +#line 292 "perly.y" +{ newSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); } +break; +case 54: +#line 296 "perly.y" +{ yyval.ival = start_subparse(FALSE, 0); } +break; +case 55: +#line 300 "perly.y" +{ yyval.ival = start_subparse(FALSE, CVf_ANON); } +break; +case 56: +#line 304 "perly.y" +{ yyval.ival = start_subparse(TRUE, 0); } +break; +case 57: +#line 307 "perly.y" +{ STRLEN n_a; char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv,n_a); + if (strEQ(name, "BEGIN") || strEQ(name, "END") + || strEQ(name, "INIT")) + CvSPECIAL_on(PL_compcv); + yyval.opval = yyvsp[0].opval; } +break; +case 58: +#line 315 "perly.y" +{ yyval.opval = Nullop; } +break; +case 60: +#line 319 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 61: +#line 320 "perly.y" +{ yyval.opval = Nullop; PL_expect = XSTATE; } +break; +case 62: +#line 324 "perly.y" +{ package(yyvsp[-1].opval); } +break; +case 63: +#line 326 "perly.y" +{ package(Nullop); } +break; +case 64: +#line 330 "perly.y" +{ CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ } +break; +case 65: +#line 332 "perly.y" +{ utilize(yyvsp[-6].ival, yyvsp[-5].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval); } +break; +case 66: +#line 336 "perly.y" +{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 67: +#line 338 "perly.y" +{ yyval.opval = newLOGOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 69: +#line 343 "perly.y" +{ yyval.opval = yyvsp[-1].opval; } +break; +case 70: +#line 345 "perly.y" +{ yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 72: +#line 350 "perly.y" +{ yyval.opval = convert(yyvsp[-2].ival, OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(yyvsp[-2].ival,yyvsp[-1].opval), yyvsp[0].opval) ); } +break; +case 73: +#line 353 "perly.y" +{ yyval.opval = convert(yyvsp[-4].ival, OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(yyvsp[-4].ival,yyvsp[-2].opval), yyvsp[-1].opval) ); } +break; +case 74: +#line 356 "perly.y" +{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, + prepend_elem(OP_LIST, scalar(yyvsp[-5].opval), yyvsp[-1].opval), + newUNOP(OP_METHOD, 0, yyvsp[-3].opval))); } +break; +case 75: +#line 361 "perly.y" +{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, scalar(yyvsp[-2].opval), + newUNOP(OP_METHOD, 0, yyvsp[0].opval))); } +break; +case 76: +#line 365 "perly.y" +{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, + prepend_elem(OP_LIST, yyvsp[-1].opval, yyvsp[0].opval), + newUNOP(OP_METHOD, 0, yyvsp[-2].opval))); } +break; +case 77: +#line 370 "perly.y" +{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, + prepend_elem(OP_LIST, yyvsp[-3].opval, yyvsp[-1].opval), + newUNOP(OP_METHOD, 0, yyvsp[-4].opval))); } +break; +case 78: +#line 375 "perly.y" +{ yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); } +break; +case 79: +#line 377 "perly.y" +{ yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); } +break; +case 80: +#line 379 "perly.y" +{ yyvsp[0].opval = newANONSUB(yyvsp[-1].ival, 0, yyvsp[0].opval); } +break; +case 81: +#line 381 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, + prepend_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval), yyvsp[-4].opval)); } +break; +case 84: +#line 391 "perly.y" +{ yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[-1].ival, yyvsp[0].opval); } +break; +case 85: +#line 393 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 86: +#line 395 "perly.y" +{ if (yyvsp[-1].ival != OP_REPEAT) + scalar(yyvsp[-2].opval); + yyval.opval = newBINOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, scalar(yyvsp[0].opval)); } +break; +case 87: +#line 399 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 88: +#line 401 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 89: +#line 403 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 90: +#line 405 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 91: +#line 407 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 92: +#line 409 "perly.y" +{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); } +break; +case 93: +#line 411 "perly.y" +{ yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));} +break; +case 94: +#line 413 "perly.y" +{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 95: +#line 415 "perly.y" +{ yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 96: +#line 417 "perly.y" +{ yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 97: +#line 419 "perly.y" +{ yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); } +break; +case 98: +#line 422 "perly.y" +{ yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); } +break; +case 99: +#line 424 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 100: +#line 426 "perly.y" +{ yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); } +break; +case 101: +#line 428 "perly.y" +{ yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));} +break; +case 102: +#line 430 "perly.y" +{ yyval.opval = newUNOP(OP_REFGEN, 0, mod(yyvsp[0].opval,OP_REFGEN)); } +break; +case 103: +#line 432 "perly.y" +{ yyval.opval = newUNOP(OP_POSTINC, 0, + mod(scalar(yyvsp[-1].opval), OP_POSTINC)); } +break; +case 104: +#line 435 "perly.y" +{ yyval.opval = newUNOP(OP_POSTDEC, 0, + mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); } +break; +case 105: +#line 438 "perly.y" +{ yyval.opval = newUNOP(OP_PREINC, 0, + mod(scalar(yyvsp[0].opval), OP_PREINC)); } +break; +case 106: +#line 441 "perly.y" +{ yyval.opval = newUNOP(OP_PREDEC, 0, + mod(scalar(yyvsp[0].opval), OP_PREDEC)); } +break; +case 107: +#line 444 "perly.y" +{ yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); } +break; +case 108: +#line 446 "perly.y" +{ yyval.opval = sawparens(yyvsp[-1].opval); } +break; +case 109: +#line 448 "perly.y" +{ yyval.opval = sawparens(newNULLLIST()); } +break; +case 110: +#line 450 "perly.y" +{ yyval.opval = newANONLIST(yyvsp[-1].opval); } +break; +case 111: +#line 452 "perly.y" +{ yyval.opval = newANONLIST(Nullop); } +break; +case 112: +#line 454 "perly.y" +{ yyval.opval = newANONHASH(yyvsp[-2].opval); } +break; +case 113: +#line 456 "perly.y" +{ yyval.opval = newANONHASH(Nullop); } +break; +case 114: +#line 458 "perly.y" +{ yyval.opval = newANONSUB(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); } +break; +case 115: +#line 460 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 116: +#line 462 "perly.y" +{ yyval.opval = newBINOP(OP_GELEM, 0, yyvsp[-4].opval, scalar(yyvsp[-2].opval)); } +break; +case 117: +#line 464 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 118: +#line 466 "perly.y" +{ yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); } +break; +case 119: +#line 468 "perly.y" +{ yyval.opval = newBINOP(OP_AELEM, 0, + ref(newAVREF(yyvsp[-4].opval),OP_RV2AV), + scalar(yyvsp[-1].opval));} +break; +case 120: +#line 472 "perly.y" +{ assertref(yyvsp[-3].opval); yyval.opval = newBINOP(OP_AELEM, 0, + ref(newAVREF(yyvsp[-3].opval),OP_RV2AV), + scalar(yyvsp[-1].opval));} +break; +case 121: +#line 476 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 122: +#line 478 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 123: +#line 480 "perly.y" +{ yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));} +break; +case 124: +#line 482 "perly.y" +{ yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval)); + PL_expect = XOPERATOR; } +break; +case 125: +#line 485 "perly.y" +{ yyval.opval = newBINOP(OP_HELEM, 0, + ref(newHVREF(yyvsp[-5].opval),OP_RV2HV), + jmaybe(yyvsp[-2].opval)); + PL_expect = XOPERATOR; } +break; +case 126: +#line 490 "perly.y" +{ assertref(yyvsp[-4].opval); yyval.opval = newBINOP(OP_HELEM, 0, + ref(newHVREF(yyvsp[-4].opval),OP_RV2HV), + jmaybe(yyvsp[-2].opval)); + PL_expect = XOPERATOR; } +break; +case 127: +#line 495 "perly.y" +{ yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); } +break; +case 128: +#line 497 "perly.y" +{ yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); } +break; +case 129: +#line 499 "perly.y" +{ yyval.opval = prepend_elem(OP_ASLICE, + newOP(OP_PUSHMARK, 0), + newLISTOP(OP_ASLICE, 0, + list(yyvsp[-1].opval), + ref(yyvsp[-3].opval, OP_ASLICE))); } +break; +case 130: +#line 505 "perly.y" +{ yyval.opval = prepend_elem(OP_HSLICE, + newOP(OP_PUSHMARK, 0), + newLISTOP(OP_HSLICE, 0, + list(yyvsp[-2].opval), + ref(oopsHV(yyvsp[-4].opval), OP_HSLICE))); + PL_expect = XOPERATOR; } +break; +case 131: +#line 512 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 132: +#line 514 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, 0, scalar(yyvsp[0].opval)); } +break; +case 133: +#line 516 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar(yyvsp[-2].opval)); } +break; +case 134: +#line 518 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, yyvsp[-1].opval, scalar(yyvsp[-3].opval))); } +break; +case 135: +#line 521 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); } +break; +case 136: +#line 524 "perly.y" +{ yyval.opval = dofile(yyvsp[0].opval); } +break; +case 137: +#line 526 "perly.y" +{ yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); } +break; +case 138: +#line 528 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, + OPf_SPECIAL|OPf_STACKED, + prepend_elem(OP_LIST, + scalar(newCVREF( + (OPpENTERSUB_AMPER<<8), + scalar(yyvsp[-2].opval) + )),Nullop)); dep();} +break; +case 139: +#line 536 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, + OPf_SPECIAL|OPf_STACKED, + append_elem(OP_LIST, + yyvsp[-1].opval, + scalar(newCVREF( + (OPpENTERSUB_AMPER<<8), + scalar(yyvsp[-3].opval) + )))); dep();} +break; +case 140: +#line 545 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, + prepend_elem(OP_LIST, + scalar(newCVREF(0,scalar(yyvsp[-2].opval))), Nullop)); dep();} +break; +case 141: +#line 549 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, + prepend_elem(OP_LIST, + yyvsp[-1].opval, + scalar(newCVREF(0,scalar(yyvsp[-3].opval))))); dep();} +break; +case 142: +#line 554 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + newCVREF(0, scalar(yyvsp[-3].opval))); } +break; +case 143: +#line 557 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, yyvsp[-1].opval, + newCVREF(0, scalar(yyvsp[-4].opval)))); } +break; +case 144: +#line 561 "perly.y" +{ yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL); + PL_hints |= HINT_BLOCK_SCOPE; } +break; +case 145: +#line 564 "perly.y" +{ yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); } +break; +case 146: +#line 566 "perly.y" +{ yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); } +break; +case 147: +#line 568 "perly.y" +{ yyval.opval = newOP(yyvsp[0].ival, 0); } +break; +case 148: +#line 570 "perly.y" +{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); } +break; +case 149: +#line 572 "perly.y" +{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); } +break; +case 150: +#line 574 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); } +break; +case 151: +#line 577 "perly.y" +{ yyval.opval = newOP(yyvsp[0].ival, 0); } +break; +case 152: +#line 579 "perly.y" +{ yyval.opval = newOP(yyvsp[-2].ival, 0); } +break; +case 153: +#line 581 "perly.y" +{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, + scalar(yyvsp[0].opval)); } +break; +case 154: +#line 584 "perly.y" +{ yyval.opval = newOP(yyvsp[-2].ival, OPf_SPECIAL); } +break; +case 155: +#line 586 "perly.y" +{ yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); } +break; +case 156: +#line 588 "perly.y" +{ yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, Nullop); } +break; +case 157: +#line 590 "perly.y" +{ yyval.opval = pmruntime(yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval); } +break; +case 160: +#line 596 "perly.y" +{ yyval.opval = Nullop; } +break; +case 161: +#line 598 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 162: +#line 602 "perly.y" +{ yyval.opval = Nullop; } +break; +case 163: +#line 604 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +case 164: +#line 606 "perly.y" +{ yyval.opval = yyvsp[-1].opval; } +break; +case 165: +#line 609 "perly.y" +{ yyval.ival = 0; } +break; +case 166: +#line 610 "perly.y" +{ yyval.ival = 1; } +break; +case 167: +#line 614 "perly.y" +{ PL_in_my = 0; yyval.opval = my(yyvsp[0].opval); } +break; +case 168: +#line 618 "perly.y" +{ yyval.opval = newCVREF(yyvsp[-1].ival,yyvsp[0].opval); } +break; +case 169: +#line 622 "perly.y" +{ yyval.opval = newSVREF(yyvsp[0].opval); } +break; +case 170: +#line 626 "perly.y" +{ yyval.opval = newAVREF(yyvsp[0].opval); } +break; +case 171: +#line 630 "perly.y" +{ yyval.opval = newHVREF(yyvsp[0].opval); } +break; +case 172: +#line 634 "perly.y" +{ yyval.opval = newAVREF(yyvsp[0].opval); } +break; +case 173: +#line 638 "perly.y" +{ yyval.opval = newGVREF(0,yyvsp[0].opval); } +break; +case 174: +#line 642 "perly.y" +{ yyval.opval = scalar(yyvsp[0].opval); } +break; +case 175: +#line 644 "perly.y" +{ yyval.opval = scalar(yyvsp[0].opval); } +break; +case 176: +#line 646 "perly.y" +{ yyval.opval = scope(yyvsp[0].opval); } +break; +case 177: +#line 649 "perly.y" +{ yyval.opval = yyvsp[0].opval; } +break; +#line 2329 "perly.c" + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + PerlIO_printf(Perl_debug_log, + "yydebug: after reduction, shifting from state 0 to state %d\n", + YYFINAL); #endif - break; - case 'i': - inplace = savestr(s+1); - for (s = inplace; *s && !isspace(*s); s++) ; - *s = '\0'; - argvoutstab = stabent("ARGVOUT",TRUE); - break; - case 'I': -#ifdef TAINT - if (euid != uid || egid != gid) - fatal("No -I allowed in setuid scripts"); + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", + YYFINAL, yychar, yys); + } #endif - if (*++s) { - (void)apush(stab_array(incstab),str_make(s,0)); - } - else - fatal("No space allowed after -I"); - break; - case 'n': - minus_n = TRUE; - s++; - return s; - case 'p': - minus_p = TRUE; - s++; - return s; - case 'u': - do_undump = TRUE; - s++; - return s; - case 'U': - unsafe = TRUE; - s++; - return s; - case 'v': - fputs(rcsid,stdout); - fputs("\nCopyright (c) 1989, 1990, Larry Wall\n",stdout); -#ifdef MSDOS - fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n", - stdout); + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + PerlIO_printf(Perl_debug_log, + "yydebug: after reduction, shifting from state %d to state %d\n", + *yyssp, yystate); #endif - fputs("\n\ -Perl may be copied only under the terms of the GNU General Public License,\n\ -a copy of which can be found with the Perl 3.0 distribution kit.\n",stdout); - exit(0); - case 'w': - dowarn = TRUE; - s++; - return s; - case ' ': - case '\n': - case '\t': - break; - default: - fatal("Switch meaningless after -x: -%s",s); + if (yyssp >= yyss + yystacksize - 1) + { + /* + ** reallocate and recover. Note that pointers + ** have to be reset, or bad things will happen + */ + int yyps_index = (yyssp - yyss); + int yypv_index = (yyvsp - yyvs); + yystacksize += YYSTACKSIZE; + ysave->yyvs = yyvs = + (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE)); + ysave->yyss = yyss = + (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short)); + if (!yyvs || !yyss) + goto yyoverflow; + yyssp = yyss + yyps_index; + yyvsp = yyvs + yypv_index; } - return Nullch; + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("Out of memory for yacc stack"); +yyabort: + retval = 1; +yyaccept: + return retval; }