diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-09-24 04:29:14 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-09-24 04:29:14 +0000 |
commit | d3b6f988cac8d2811966703f0abfa69a19d8e06a (patch) | |
tree | da11f4f99732b2662341250bdfcf06d11c7004be /perly_c.diff | |
parent | 5f08fbcd6341ee0f8f3c7dfe721098c3bfae1c67 (diff) | |
download | perl-d3b6f988cac8d2811966703f0abfa69a19d8e06a.tar.gz |
move yyglobal decls from perly.c to perlvars.h, regen headers, tweak
perly_c.diff
p4raw-id: //depot/perl@1864
Diffstat (limited to 'perly_c.diff')
-rw-r--r-- | perly_c.diff | 99 |
1 files changed, 56 insertions, 43 deletions
diff --git a/perly_c.diff b/perly_c.diff index aa0555b034..f770e24794 100644 --- a/perly_c.diff +++ b/perly_c.diff @@ -1,21 +1,29 @@ -*** perly.c.orig Tue Jul 28 15:02:41 1998 ---- perly.c Tue Jul 28 15:14:54 1998 +*** perly.c.orig Thu Sep 24 00:32:28 1998 +--- perly.c Thu Sep 24 00:18:13 1998 *************** -*** 7,11 **** ---- 7,19 ---- +*** 7,10 **** +--- 7,27 ---- #include "perl.h" ++ #define yydebug PL_yydebug ++ #define yynerrs PL_yynerrs ++ #define yyerrflag PL_yyerrflag ++ #define yychar PL_yychar ++ #define yyssp PL_yyssp ++ #define yyvsp PL_yyvsp ++ #define yyval PL_yyval ++ #define yylval PL_yylval ++ + #ifdef PERL_OBJECT - static void ++ static void + Dep(CPerlObj *pPerl) + { + pPerl->deprecate("\"do\" to call subroutines"); + } + #define dep() Dep(this) + #else -+ static void + static void dep(void) - { *************** *** 12,86 **** deprecate("\"do\" to call subroutines"); @@ -93,7 +101,7 @@ - #define ARROW 314 #define YYERRCODE 256 short yylhs[] = { -1, ---- 20,26 ---- +--- 29,35 ---- deprecate("\"do\" to call subroutines"); } + #endif @@ -102,9 +110,17 @@ #define YYERRCODE 256 short yylhs[] = { -1, *************** -*** 1345,1365 **** - YYSTYPE yyval; - YYSTYPE yylval; +*** 1337,1365 **** + #endif + #endif +- int yydebug; +- int yynerrs; +- int yyerrflag; +- int yychar; +- short *yyssp; +- YYSTYPE *yyvsp; +- YYSTYPE yyval; +- YYSTYPE yylval; - short yyss[YYSTACKSIZE]; - YYSTYPE yyvs[YYSTACKSIZE]; - #define yystacksize YYSTACKSIZE @@ -124,9 +140,9 @@ if (yys = getenv("YYDEBUG")) { ---- 1285,1349 ---- - YYSTYPE yyval; - YYSTYPE yylval; +--- 1286,1350 ---- + #endif + #endif #line 643 "perly.y" /* PROGRAM */ ! #line 1353 "perly.c" @@ -176,7 +192,7 @@ extern char *getenv(); + #endif + #endif - ++ + struct ysv *ysave; + New(73, ysave, 1, struct ysv); + SAVEDESTRUCTOR(yydestruct, ysave); @@ -186,13 +202,13 @@ + ysave->oldyychar = yychar; + ysave->oldyyval = yyval; + ysave->oldyylval = yylval; -+ + + #if YYDEBUG if (yys = getenv("YYDEBUG")) { *************** *** 1374,1377 **** ---- 1358,1371 ---- +--- 1359,1372 ---- yychar = (-1); + /* @@ -214,33 +230,30 @@ ! printf("yydebug: state %d, reading %d (%s)\n", yystate, yychar, yys); } ---- 1383,1387 ---- +--- 1384,1388 ---- if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", yystate, yychar, yys); } *************** -*** 1399,1403 **** +*** 1399,1408 **** #if YYDEBUG if (yydebug) ! printf("yydebug: state %d, shifting to state %d\n", yystate, yytable[yyn]); #endif ---- 1393,1397 ---- - #if YYDEBUG - if (yydebug) -! PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n", - yystate, yytable[yyn]); - #endif -*************** -*** 1404,1408 **** if (yyssp >= yyss + yystacksize - 1) { ! goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; ---- 1398,1416 ---- +--- 1394,1417 ---- + #if YYDEBUG + if (yydebug) +! PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n", + yystate, yytable[yyn]); + #endif if (yyssp >= yyss + yystacksize - 1) { ! /* @@ -251,9 +264,9 @@ ! int yypv_index = (yyvsp - yyvs); ! yystacksize += YYSTACKSIZE; ! ysave->yyvs = yyvs = -! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE)); +! (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE)); ! ysave->yyss = yyss = -! (short*)realloc((char*)yyss,yystacksize * sizeof(short)); +! (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short)); ! if (!yyvs || !yyss) ! goto yyoverflow; ! yyssp = yyss + yyps_index; @@ -272,7 +285,7 @@ ! goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; ---- 1448,1472 ---- +--- 1449,1473 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -288,9 +301,9 @@ ! int yyps_index = (yyssp - yyss); ! int yypv_index = (yyvsp - yyvs); ! yystacksize += YYSTACKSIZE; -! ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs, +! ysave->yyvs = yyvs = (YYSTYPE*)PerlMem_realloc((char*)yyvs, ! yystacksize * sizeof(YYSTYPE)); -! ysave->yyss = yyss = (short*)realloc((char*)yyss, +! ysave->yyss = yyss = (short*)PerlMem_realloc((char*)yyss, ! yystacksize * sizeof(short)); ! if (!yyvs || !yyss) ! goto yyoverflow; @@ -306,7 +319,7 @@ ! *yyssp); #endif if (yyssp <= yyss) goto yyabort; ---- 1478,1484 ---- +--- 1479,1485 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -322,7 +335,7 @@ ! yystate, yychar, yys); } #endif ---- 1497,1503 ---- +--- 1498,1504 ---- if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; ! PerlIO_printf(Perl_debug_log, @@ -337,7 +350,7 @@ ! printf("yydebug: state %d, reducing by rule %d (%s)\n", yystate, yyn, yyrule[yyn]); #endif ---- 1508,1512 ---- +--- 1509,1513 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n", @@ -350,7 +363,7 @@ ! #line 2270 "y.tab.c" } yyssp -= yym; ---- 2292,2296 ---- +--- 2293,2297 ---- { yyval.opval = yyvsp[0].opval; } break; ! #line 2270 "perly.c" @@ -364,7 +377,7 @@ ! state %d\n", YYFINAL); #endif yystate = YYFINAL; ---- 2302,2308 ---- +--- 2303,2309 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -379,7 +392,7 @@ ! printf("yydebug: state %d, reading %d (%s)\n", YYFINAL, yychar, yys); } ---- 2318,2322 ---- +--- 2319,2323 ---- if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", @@ -397,7 +410,7 @@ ! goto yyoverflow; } *++yyssp = yystate; ---- 2333,2357 ---- +--- 2334,2358 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -414,9 +427,9 @@ ! int yypv_index = (yyvsp - yyvs); ! yystacksize += YYSTACKSIZE; ! ysave->yyvs = yyvs = -! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE)); +! (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE)); ! ysave->yyss = yyss = -! (short*)realloc((char*)yyss,yystacksize * sizeof(short)); +! (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short)); ! if (!yyvs || !yyss) ! goto yyoverflow; ! yyssp = yyss + yyps_index; @@ -433,7 +446,7 @@ yyaccept: ! return (0); } ---- 2359,2366 ---- +--- 2360,2367 ---- goto yyloop; yyoverflow: ! yyerror("Out of memory for yacc stack"); |