This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
optimising yyparse: replace stack_size with a ptr
[perl5.git] / perly.c
CommitLineData
0de566d7
DM
1/* perly.c
2 *
2eee27d7
SS
3 * Copyright (c) 2004, 2005, 2006, 2007, 2008,
4 * 2009, 2010, 2011 by Larry Wall and others
0de566d7
DM
5 *
6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
8 *
9 * Note that this file was originally generated as an output from
10 * GNU bison version 1.875, but now the code is statically maintained
f05e27e5
DM
11 * and edited; the bits that are dependent on perly.y are now
12 * #included from the files perly.tab and perly.act.
0de566d7
DM
13 *
14 * Here is an important copyright statement from the original, generated
15 * file:
16 *
17 * As a special exception, when this file is copied by Bison into a
18 * Bison output file, you may use that output file without
19 * restriction. This special exception was added by the Free
20 * Software Foundation in version 1.24 of Bison.
bc463c31 21 *
0de566d7
DM
22 */
23
79072805 24#include "EXTERN.h"
864dbfa3 25#define PERL_IN_PERLY_C
79072805 26#include "perl.h"
30d9c59b 27#include "feature.h"
d3d9da4a 28#include "keywords.h"
09bef843 29
3797f23d
DM
30typedef unsigned char yytype_uint8;
31typedef signed char yytype_int8;
32typedef unsigned short int yytype_uint16;
33typedef short int yytype_int16;
0de566d7
DM
34typedef signed char yysigned_char;
35
28ac2b49
Z
36/* YYINITDEPTH -- initial size of the parser's stacks. */
37#define YYINITDEPTH 200
38
599f1ac6
FC
39#ifdef YYDEBUG
40# undef YYDEBUG
41#endif
42#ifdef DEBUGGING
43# define YYDEBUG 1
44#else
45# define YYDEBUG 0
46#endif
47
b3045d9c
FC
48#ifndef YY_NULL
49# define YY_NULL 0
93a17b20 50#endif
09bef843 51
f39ff1f3
DM
52#ifndef YY_NULLPTR
53# define YY_NULLPTR NULL
54#endif
55
f05e27e5
DM
56/* contains all the parser state tables; auto-generated from perly.y */
57#include "perly.tab"
0de566d7
DM
58
59# define YYSIZE_T size_t
60
0de566d7 61#define YYEOF 0
07a06489 62#define YYTERROR 1
0de566d7
DM
63
64#define YYACCEPT goto yyacceptlab
65#define YYABORT goto yyabortlab
66#define YYERROR goto yyerrlab1
67
0de566d7 68/* Enable debugging if requested. */
9388183f 69#ifdef DEBUGGING
0de566d7
DM
70
71# define yydebug (DEBUG_p_TEST)
72
73# define YYFPRINTF PerlIO_printf
74
75# define YYDPRINTF(Args) \
76do { \
77 if (yydebug) \
78 YYFPRINTF Args; \
79} while (0)
80
9388183f 81# define YYDSYMPRINTF(Title, Token, Value) \
0de566d7
DM
82do { \
83 if (yydebug) { \
84 YYFPRINTF (Perl_debug_log, "%s ", Title); \
356f4fed 85 yysymprint (aTHX_ Perl_debug_log, Token, Value); \
0de566d7
DM
86 YYFPRINTF (Perl_debug_log, "\n"); \
87 } \
88} while (0)
89
90/*--------------------------------.
91| Print this symbol on YYOUTPUT. |
92`--------------------------------*/
93
94static void
356f4fed 95yysymprint(pTHX_ PerlIO * const yyoutput, int yytype, const YYSTYPE * const yyvaluep)
0de566d7 96{
dc3bf405 97 PERL_UNUSED_CONTEXT;
0de566d7
DM
98 if (yytype < YYNTOKENS) {
99 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
100# ifdef YYPRINT
101 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
9388183f 102# else
147e3846 103 YYFPRINTF (yyoutput, "0x%" UVxf, (UV)yyvaluep->ival);
0de566d7
DM
104# endif
105 }
106 else
107 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
108
0de566d7
DM
109 YYFPRINTF (yyoutput, ")");
110}
111
112
9388183f 113/* yy_stack_print()
1654d593
DM
114 * print the top 8 items on the parse stack.
115 */
0de566d7
DM
116
117static void
1654d593 118yy_stack_print (pTHX_ const yy_parser *parser)
0de566d7 119{
1654d593 120 const yy_stack_frame *ps, *min;
9388183f 121
2d29f438 122 min = parser->ps - 8 + 1;
22735491
DM
123 if (min <= parser->stack)
124 min = parser->stack + 1;
9388183f
CB
125
126 PerlIO_printf(Perl_debug_log, "\nindex:");
1654d593 127 for (ps = min; ps <= parser->ps; ps++)
00c0e1ee 128 PerlIO_printf(Perl_debug_log, " %8d", (int)(ps - parser->stack));
1654d593 129
9388183f 130 PerlIO_printf(Perl_debug_log, "\nstate:");
1654d593
DM
131 for (ps = min; ps <= parser->ps; ps++)
132 PerlIO_printf(Perl_debug_log, " %8d", ps->state);
133
9388183f 134 PerlIO_printf(Perl_debug_log, "\ntoken:");
1654d593
DM
135 for (ps = min; ps <= parser->ps; ps++)
136 PerlIO_printf(Perl_debug_log, " %8.8s", ps->name);
137
9388183f 138 PerlIO_printf(Perl_debug_log, "\nvalue:");
1654d593
DM
139 for (ps = min; ps <= parser->ps; ps++) {
140 switch (yy_type_tab[yystos[ps->state]]) {
d5c6462e 141 case toketype_opval:
21612876 142 PerlIO_printf(Perl_debug_log, " %8.8s",
1654d593
DM
143 ps->val.opval
144 ? PL_op_name[ps->val.opval->op_type]
670f3923 145 : "(Nullop)"
21612876 146 );
d5c6462e 147 break;
d5c6462e 148 case toketype_ival:
147e3846 149 PerlIO_printf(Perl_debug_log, " %8" IVdf, (IV)ps->val.ival);
d5c6462e
DM
150 break;
151 default:
147e3846 152 PerlIO_printf(Perl_debug_log, " %8" UVxf, (UV)ps->val.ival);
d5c6462e 153 }
21612876 154 }
9388183f 155 PerlIO_printf(Perl_debug_log, "\n\n");
0de566d7
DM
156}
157
1654d593
DM
158# define YY_STACK_PRINT(parser) \
159do { \
160 if (yydebug && DEBUG_v_TEST) \
161 yy_stack_print (aTHX_ parser); \
0de566d7
DM
162} while (0)
163
09bef843 164
0de566d7
DM
165/*------------------------------------------------.
166| Report that the YYRULE is going to be reduced. |
167`------------------------------------------------*/
168
169static void
170yy_reduce_print (pTHX_ int yyrule)
171{
172 int yyi;
df35152e 173 const unsigned int yylineno = yyrline[yyrule];
0de566d7
DM
174 YYFPRINTF (Perl_debug_log, "Reducing stack by rule %d (line %u), ",
175 yyrule - 1, yylineno);
176 /* Print the symbols being reduced, and their result. */
f39ff1f3
DM
177#if PERL_BISON_VERSION >= 30000 /* 3.0+ */
178 for (yyi = 0; yyi < yyr2[yyrule]; yyi++)
179 YYFPRINTF (Perl_debug_log, "%s ",
180 yytname [yystos[(PL_parser->ps)[yyi + 1 - yyr2[yyrule]].state]]);
181#else
0de566d7
DM
182 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
183 YYFPRINTF (Perl_debug_log, "%s ", yytname [yyrhs[yyi]]);
f39ff1f3 184#endif
0de566d7
DM
185 YYFPRINTF (Perl_debug_log, "-> %s\n", yytname [yyr1[yyrule]]);
186}
187
188# define YY_REDUCE_PRINT(Rule) \
189do { \
190 if (yydebug) \
191 yy_reduce_print (aTHX_ Rule); \
192} while (0)
193
194#else /* !DEBUGGING */
195# define YYDPRINTF(Args)
9388183f 196# define YYDSYMPRINTF(Title, Token, Value)
1654d593 197# define YY_STACK_PRINT(parser)
0de566d7
DM
198# define YY_REDUCE_PRINT(Rule)
199#endif /* !DEBUGGING */
200
718a7425
DM
201/* called during cleanup (via SAVEDESTRUCTOR_X) to free any items on the
202 * parse stack, thus avoiding leaks if we die */
203
204static void
22735491 205S_clear_yystack(pTHX_ const yy_parser *parser)
718a7425 206{
1654d593 207 yy_stack_frame *ps = parser->ps;
0934c9d9 208 int i = 0;
718a7425 209
28ac2b49 210 if (!parser->stack)
718a7425 211 return;
1654d593 212
718a7425 213 YYDPRINTF ((Perl_debug_log, "clearing the parse stack\n"));
670f3923 214
8c63ea58
GG
215 for (i=0; i< parser->yylen; i++) {
216 SvREFCNT_dec(ps[-i].compcv);
217 }
0aded6e1 218 ps -= parser->yylen;
670f3923
DM
219
220 /* now free whole the stack, including the just-reduced ops */
221
22735491 222 while (ps > parser->stack) {
503de470 223 LEAVE_SCOPE(ps->savestack_ix);
1654d593
DM
224 if (yy_type_tab[yystos[ps->state]] == toketype_opval
225 && ps->val.opval)
670f3923 226 {
a293d0fd 227 if (ps->compcv && (ps->compcv != PL_compcv)) {
8c63ea58
GG
228 PL_compcv = ps->compcv;
229 PAD_SET_CUR_NOSAVE(CvPADLIST(PL_compcv), 1);
325e1816 230 PL_comppad_name = PadlistNAMES(CvPADLIST(PL_compcv));
718a7425
DM
231 }
232 YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
571a568a 233 op_free(ps->val.opval);
718a7425 234 }
8c63ea58 235 SvREFCNT_dec(ps->compcv);
1654d593 236 ps--;
718a7425 237 }
28ac2b49
Z
238
239 Safefree(parser->stack);
718a7425
DM
240}
241
718a7425 242
0de566d7
DM
243/*----------.
244| yyparse. |
245`----------*/
246
79072805 247int
28ac2b49 248Perl_yyparse (pTHX_ int gramtype)
79072805 249{
d3d9da4a 250 dVAR;
eb578fdb
KW
251 int yystate;
252 int yyn;
0de566d7
DM
253 int yyresult;
254
0de566d7 255 /* Lookahead token as an internal (translated) token number. */
714c8e96 256 int yytoken = 0;
0de566d7 257
eb578fdb
KW
258 yy_parser *parser; /* the parser object */
259 yy_stack_frame *ps; /* current parser stack frame */
a0d0e21e 260
1654d593
DM
261#define YYPOPSTACK parser->ps = --ps
262#define YYPUSHSTACK parser->ps = ++ps
0de566d7 263
acdf0a21 264 /* The variable used to return semantic value and location from the
5912531f 265 action routines: ie $$. */
0de566d7
DM
266 YYSTYPE yyval;
267
0de566d7
DM
268 YYDPRINTF ((Perl_debug_log, "Starting parse\n"));
269
acdf0a21 270 parser = PL_parser;
1654d593 271
28ac2b49
Z
272 ENTER; /* force parser state cleanup/restoration before we return */
273 SAVEPPTR(parser->yylval.pval);
274 SAVEINT(parser->yychar);
275 SAVEINT(parser->yyerrstatus);
28ac2b49
Z
276 SAVEINT(parser->yylen);
277 SAVEVPTR(parser->stack);
0e0707c5 278 SAVEVPTR(parser->stack_max1);
28ac2b49
Z
279 SAVEVPTR(parser->ps);
280
281 /* initialise state for this parse */
282 parser->yychar = gramtype;
283 parser->yyerrstatus = 0;
28ac2b49
Z
284 parser->yylen = 0;
285 Newx(parser->stack, YYINITDEPTH, yy_stack_frame);
0e0707c5 286 parser->stack_max1 = parser->stack + YYINITDEPTH - 1;
28ac2b49
Z
287 ps = parser->ps = parser->stack;
288 ps->state = 0;
e3abe207 289 SAVEDESTRUCTOR_X(S_clear_yystack, parser);
0de566d7 290
0de566d7
DM
291/*------------------------------------------------------------.
292| yynewstate -- Push a new state, which is found in yystate. |
293`------------------------------------------------------------*/
294 yynewstate:
0de566d7 295
1654d593 296 yystate = ps->state;
05a03161 297
670f3923 298 YYDPRINTF ((Perl_debug_log, "Entering state %d\n", yystate));
0de566d7 299
5912531f 300 parser->yylen = 0;
0de566d7 301
1654d593 302 {
1654d593 303 /* grow the stack? We always leave 1 spare slot,
0e0707c5
DM
304 * in case of a '' -> 'foo' reduction.
305 * Note that stack_max1 points to the (top-1)th allocated stack
306 * element to make this check fast */
0de566d7 307
0e0707c5
DM
308 if (ps >= parser->stack_max1) {
309 Size_t pos = ps - parser->stack;
310 Size_t newsize = 2 * (parser->stack_max1 + 2 - parser->stack);
1654d593 311 /* this will croak on insufficient memory */
0e0707c5
DM
312 Renew(parser->stack, newsize, yy_stack_frame);
313 ps = parser->ps = parser->stack + pos;
314 parser->stack_max1 = parser->stack + newsize - 1;
670f3923 315
1654d593
DM
316 YYDPRINTF((Perl_debug_log,
317 "parser stack size increased to %lu frames\n",
0e0707c5 318 (unsigned long int)newsize));
1654d593 319 }
93a17b20 320 }
0de566d7 321
0de566d7
DM
322/* Do appropriate processing given the current state. */
323/* Read a lookahead token if we need one and don't already have one. */
0de566d7
DM
324
325 /* First try to decide what to do without reference to lookahead token. */
326
327 yyn = yypact[yystate];
328 if (yyn == YYPACT_NINF)
329 goto yydefault;
330
331 /* Not known => get a lookahead token if don't already have one. */
332
333 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
5912531f 334 if (parser->yychar == YYEMPTY) {
37b6dcb8 335 YYDPRINTF ((Perl_debug_log, "Reading a token:\n"));
5912531f 336 parser->yychar = yylex();
0de566d7
DM
337 }
338
5912531f
DM
339 if (parser->yychar <= YYEOF) {
340 parser->yychar = yytoken = YYEOF;
0de566d7 341 YYDPRINTF ((Perl_debug_log, "Now at end of input.\n"));
93a17b20 342 }
0de566d7 343 else {
100b2bb8
KW
344 /* perly.tab is shipped based on an ASCII system, so need to index it
345 * with characters translated to ASCII. Although it's not designed for
346 * this purpose, we can use NATIVE_TO_UNI here. It returns its
347 * argument on ASCII platforms, and on EBCDIC translates native to
348 * ascii in the 0-255 range, leaving everything else unchanged. This
349 * jibes with yylex() returning some bare characters in that range, but
350 * all tokens it returns are either 0, or above 255. There could be a
351 * problem if NULs weren't 0, or were ever returned as raw chars by
352 * yylex() */
353 yytoken = YYTRANSLATE (NATIVE_TO_UNI(parser->yychar));
5912531f 354 YYDSYMPRINTF ("Next token is", yytoken, &parser->yylval);
93a17b20 355 }
771df094 356
0de566d7
DM
357 /* If the proper action on seeing token YYTOKEN is to reduce or to
358 detect an error, take that action. */
359 yyn += yytoken;
360 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
361 goto yydefault;
362 yyn = yytable[yyn];
363 if (yyn <= 0) {
364 if (yyn == 0 || yyn == YYTABLE_NINF)
365 goto yyerrlab;
366 yyn = -yyn;
367 goto yyreduce;
368 }
7b57b0ea 369
0de566d7
DM
370 if (yyn == YYFINAL)
371 YYACCEPT;
771df094 372
0de566d7
DM
373 /* Shift the lookahead token. */
374 YYDPRINTF ((Perl_debug_log, "Shifting token %s, ", yytname[yytoken]));
375
376 /* Discard the token being shifted unless it is eof. */
5912531f
DM
377 if (parser->yychar != YYEOF)
378 parser->yychar = YYEMPTY;
0de566d7 379
1654d593
DM
380 YYPUSHSTACK;
381 ps->state = yyn;
5912531f 382 ps->val = parser->yylval;
ec8ec19f 383 ps->compcv = (CV*)SvREFCNT_inc(PL_compcv);
503de470 384 ps->savestack_ix = PL_savestack_ix;
9388183f 385#ifdef DEBUGGING
1654d593 386 ps->name = (const char *)(yytname[yytoken]);
9388183f 387#endif
0de566d7 388
0de566d7
DM
389 /* Count tokens shifted since error; after three, turn off error
390 status. */
5912531f
DM
391 if (parser->yyerrstatus)
392 parser->yyerrstatus--;
0de566d7 393
0de566d7
DM
394 goto yynewstate;
395
396
397 /*-----------------------------------------------------------.
398 | yydefault -- do the default action for the current state. |
399 `-----------------------------------------------------------*/
400 yydefault:
401 yyn = yydefact[yystate];
402 if (yyn == 0)
403 goto yyerrlab;
404 goto yyreduce;
405
406
407 /*-----------------------------.
408 | yyreduce -- Do a reduction. |
409 `-----------------------------*/
410 yyreduce:
411 /* yyn is the number of a rule to reduce with. */
5912531f 412 parser->yylen = yyr2[yyn];
0de566d7
DM
413
414 /* If YYLEN is nonzero, implement the default value of the action:
a0288114 415 "$$ = $1".
0de566d7
DM
416
417 Otherwise, the following line sets YYVAL to garbage.
418 This behavior is undocumented and Bison
419 users should not rely upon it. Assigning to YYVAL
420 unconditionally makes the parser a bit smaller, and it avoids a
421 GCC warning that YYVAL may be used uninitialized. */
5912531f 422 yyval = ps[1-parser->yylen].val;
0de566d7 423
1654d593 424 YY_STACK_PRINT(parser);
0de566d7 425 YY_REDUCE_PRINT (yyn);
718a7425 426
0de566d7
DM
427 switch (yyn) {
428
f05e27e5
DM
429/* contains all the rule actions; auto-generated from perly.y */
430#include "perly.act"
431
93a17b20 432 }
0de566d7 433
670f3923
DM
434 {
435 int i;
5912531f 436 for (i=0; i< parser->yylen; i++) {
8c63ea58 437 SvREFCNT_dec(ps[-i].compcv);
670f3923
DM
438 }
439 }
440
5912531f 441 parser->ps = ps -= (parser->yylen-1);
0de566d7 442
05a03161
DM
443 /* Now shift the result of the reduction. Determine what state
444 that goes to, based on the state we popped back to and the rule
445 number reduced by. */
446
1654d593 447 ps->val = yyval;
ec8ec19f 448 ps->compcv = (CV*)SvREFCNT_inc(PL_compcv);
503de470 449 ps->savestack_ix = PL_savestack_ix;
9388183f 450#ifdef DEBUGGING
1654d593 451 ps->name = (const char *)(yytname [yyr1[yyn]]);
9388183f 452#endif
0de566d7
DM
453
454 yyn = yyr1[yyn];
455
1654d593
DM
456 yystate = yypgoto[yyn - YYNTOKENS] + ps[-1].state;
457 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == ps[-1].state)
0de566d7 458 yystate = yytable[yystate];
93a17b20 459 else
0de566d7 460 yystate = yydefgoto[yyn - YYNTOKENS];
1654d593 461 ps->state = yystate;
05a03161 462
0de566d7
DM
463 goto yynewstate;
464
465
466 /*------------------------------------.
467 | yyerrlab -- here on detecting error |
468 `------------------------------------*/
469 yyerrlab:
470 /* If not already recovering from an error, report this error. */
5912531f 471 if (!parser->yyerrstatus) {
07a06489 472 yyerror ("syntax error");
93a17b20 473 }
0de566d7
DM
474
475
5912531f 476 if (parser->yyerrstatus == 3) {
0de566d7
DM
477 /* If just tried and failed to reuse lookahead token after an
478 error, discard it. */
479
480 /* Return failure if at end of input. */
5912531f 481 if (parser->yychar == YYEOF) {
0de566d7 482 /* Pop the error token. */
8c63ea58 483 SvREFCNT_dec(ps->compcv);
0de566d7
DM
484 YYPOPSTACK;
485 /* Pop the rest of the stack. */
22735491 486 while (ps > parser->stack) {
1654d593 487 YYDSYMPRINTF ("Error: popping", yystos[ps->state], &ps->val);
503de470 488 LEAVE_SCOPE(ps->savestack_ix);
1654d593
DM
489 if (yy_type_tab[yystos[ps->state]] == toketype_opval
490 && ps->val.opval)
670f3923 491 {
0539ab63 492 YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
8c63ea58
GG
493 if (ps->compcv != PL_compcv) {
494 PL_compcv = ps->compcv;
495 PAD_SET_CUR_NOSAVE(CvPADLIST(PL_compcv), 1);
718a7425 496 }
1654d593 497 op_free(ps->val.opval);
0539ab63 498 }
8c63ea58 499 SvREFCNT_dec(ps->compcv);
0de566d7
DM
500 YYPOPSTACK;
501 }
502 YYABORT;
503 }
504
5912531f
DM
505 YYDSYMPRINTF ("Error: discarding", yytoken, &parser->yylval);
506 parser->yychar = YYEMPTY;
0de566d7 507
93a17b20 508 }
0de566d7
DM
509
510 /* Else will try to reuse lookahead token after shifting the error
511 token. */
512 goto yyerrlab1;
513
514
515 /*----------------------------------------------------.
516 | yyerrlab1 -- error raised explicitly by an action. |
517 `----------------------------------------------------*/
518 yyerrlab1:
5912531f 519 parser->yyerrstatus = 3; /* Each real token shifted decrements this. */
0de566d7
DM
520
521 for (;;) {
522 yyn = yypact[yystate];
523 if (yyn != YYPACT_NINF) {
524 yyn += YYTERROR;
525 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) {
526 yyn = yytable[yyn];
527 if (0 < yyn)
528 break;
529 }
530 }
531
532 /* Pop the current state because it cannot handle the error token. */
22735491 533 if (ps == parser->stack)
0de566d7
DM
534 YYABORT;
535
1654d593 536 YYDSYMPRINTF ("Error: popping", yystos[ps->state], &ps->val);
503de470 537 LEAVE_SCOPE(ps->savestack_ix);
1654d593 538 if (yy_type_tab[yystos[ps->state]] == toketype_opval && ps->val.opval) {
0539ab63 539 YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
8c63ea58
GG
540 if (ps->compcv != PL_compcv) {
541 PL_compcv = ps->compcv;
542 PAD_SET_CUR_NOSAVE(CvPADLIST(PL_compcv), 1);
718a7425 543 }
1654d593 544 op_free(ps->val.opval);
0539ab63 545 }
8c63ea58 546 SvREFCNT_dec(ps->compcv);
1654d593
DM
547 YYPOPSTACK;
548 yystate = ps->state;
0de566d7 549
1654d593 550 YY_STACK_PRINT(parser);
93a17b20 551 }
0de566d7
DM
552
553 if (yyn == YYFINAL)
554 YYACCEPT;
555
556 YYDPRINTF ((Perl_debug_log, "Shifting error token, "));
557
1654d593
DM
558 YYPUSHSTACK;
559 ps->state = yyn;
5912531f 560 ps->val = parser->yylval;
ec8ec19f 561 ps->compcv = (CV*)SvREFCNT_inc(PL_compcv);
503de470 562 ps->savestack_ix = PL_savestack_ix;
9388183f 563#ifdef DEBUGGING
1654d593 564 ps->name ="<err>";
9388183f 565#endif
0de566d7 566
0de566d7
DM
567 goto yynewstate;
568
569
570 /*-------------------------------------.
571 | yyacceptlab -- YYACCEPT comes here. |
572 `-------------------------------------*/
573 yyacceptlab:
574 yyresult = 0;
8c63ea58
GG
575 for (ps=parser->ps; ps > parser->stack; ps--) {
576 SvREFCNT_dec(ps->compcv);
577 }
22735491 578 parser->ps = parser->stack; /* disable cleanup */
0de566d7
DM
579 goto yyreturn;
580
581 /*-----------------------------------.
582 | yyabortlab -- YYABORT comes here. |
583 `-----------------------------------*/
584 yyabortlab:
585 yyresult = 1;
586 goto yyreturn;
587
0de566d7 588 yyreturn:
e3abe207 589 LEAVE; /* force parser stack cleanup before we return */
0de566d7 590 return yyresult;
e1f15930 591}
66610fdd
RGS
592
593/*
14d04a33 594 * ex: set ts=8 sts=4 sw=4 et:
37442d52 595 */