50a998e14629425b9f7641ed4530e8ee1397e642
[p5sagit/p5-mst-13.2.git] / perly.c
1 /*    perly.c
2  *
3  *    Copyright (c) 2004, 2005, 2006 Larry Wall and others
4  *
5  *    You may distribute under the terms of either the GNU General Public
6  *    License or the Artistic License, as specified in the README file.
7  * 
8  *    Note that this file was originally generated as an output from
9  *    GNU bison version 1.875, but now the code is statically maintained
10  *    and edited; the bits that are dependent on perly.y/madly.y are now
11  *    #included from the files perly.tab/madly.tab and perly.act/madly.act.
12  *
13  *    Here is an important copyright statement from the original, generated
14  *    file:
15  *
16  *      As a special exception, when this file is copied by Bison into a
17  *      Bison output file, you may use that output file without
18  *      restriction.  This special exception was added by the Free
19  *      Software Foundation in version 1.24 of Bison.
20  *
21  * Note that this file is also #included in madly.c, to allow compilation
22  * of a second parser, Perl_madparse, that is identical to Perl_yyparse,
23  * but which includes the parser tables from madly.{tab,act} rather than
24  * perly.{tab,act}. This is controlled by the PERL_IN_MADLY_C define.
25  */
26
27
28
29 /* allow stack size to grow effectively without limit */
30 #define YYMAXDEPTH 10000000
31
32 #include "EXTERN.h"
33 #define PERL_IN_PERLY_C
34 #include "perl.h"
35
36 typedef unsigned char yytype_uint8;
37 typedef signed char yytype_int8;
38 typedef unsigned short int yytype_uint16;
39 typedef short int yytype_int16;
40 typedef signed char yysigned_char;
41
42 #ifdef DEBUGGING
43 #  define YYDEBUG 1
44 #else
45 #  define YYDEBUG 0
46 #endif
47
48 /* contains all the parser state tables; auto-generated from perly.y/madly.y */
49 #ifdef PERL_IN_MADLY_C
50 #  include "madly.tab"
51 #else
52 #  include "perly.tab"
53 #endif
54
55 # define YYSIZE_T size_t
56
57 #define yyerrok         (yyerrstatus = 0)
58 #define yyclearin       (yychar = YYEMPTY)
59 #define YYEMPTY         (-2)
60 #define YYEOF           0
61
62 #define YYACCEPT        goto yyacceptlab
63 #define YYABORT         goto yyabortlab
64 #define YYERROR         goto yyerrlab1
65
66
67 /* Like YYERROR except do call yyerror.  This remains here temporarily
68    to ease the transition to the new meaning of YYERROR, for GCC.
69    Once GCC version 2 has supplanted version 1, this can go.  */
70
71 #define YYFAIL          goto yyerrlab
72
73 #define YYRECOVERING()  (!!yyerrstatus)
74
75 #define YYBACKUP(Token, Value)                                  \
76 do                                                              \
77     if (yychar == YYEMPTY && yylen == 1) {                      \
78         yychar = (Token);                                       \
79         yylval = (Value);                                       \
80         yytoken = YYTRANSLATE (yychar);                         \
81         YYPOPSTACK;                                             \
82         goto yybackup;                                          \
83     }                                                           \
84     else {                                                      \
85         yyerror ("syntax error: cannot back up");               \
86         YYERROR;                                                \
87     }                                                           \
88 while (0)
89
90 #define YYTERROR        1
91 #define YYERRCODE       256
92
93 /* Enable debugging if requested.  */
94 #ifdef DEBUGGING
95
96 #  define yydebug (DEBUG_p_TEST)
97
98 #  define YYFPRINTF PerlIO_printf
99
100 #  define YYDPRINTF(Args)                       \
101 do {                                            \
102     if (yydebug)                                \
103         YYFPRINTF Args;                         \
104 } while (0)
105
106 #  define YYDSYMPRINTF(Title, Token, Value)                     \
107 do {                                                            \
108     if (yydebug) {                                              \
109         YYFPRINTF (Perl_debug_log, "%s ", Title);               \
110         yysymprint (aTHX_ Perl_debug_log,  Token, Value);       \
111         YYFPRINTF (Perl_debug_log, "\n");                       \
112     }                                                           \
113 } while (0)
114
115 /*--------------------------------.
116 | Print this symbol on YYOUTPUT.  |
117 `--------------------------------*/
118
119 static void
120 yysymprint(pTHX_ PerlIO * const yyoutput, int yytype, const YYSTYPE * const yyvaluep)
121 {
122     if (yytype < YYNTOKENS) {
123         YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
124 #   ifdef YYPRINT
125         YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
126 #   else
127         YYFPRINTF (yyoutput, "0x%"UVxf, (UV)yyvaluep->ival);
128 #   endif
129     }
130     else
131         YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
132
133     YYFPRINTF (yyoutput, ")");
134 }
135
136
137 /*  yy_stack_print()
138  *  print the top 8 items on the parse stack.  The args have the same
139  *  meanings as the local vars in yyparse() of the same name */
140
141 static void
142 yy_stack_print (pTHX_ const short *yyss, const short *yyssp, const YYSTYPE *yyvs, const char**yyns)
143 {
144     int i;
145     int start = 1;
146     int count = (int)(yyssp - yyss);
147
148     if (count > 8) {
149         start = count - 8 + 1;
150         count = 8;
151     }
152
153     PerlIO_printf(Perl_debug_log, "\nindex:");
154     for (i=0; i < count; i++)
155         PerlIO_printf(Perl_debug_log, " %8d", start+i);
156     PerlIO_printf(Perl_debug_log, "\nstate:");
157     for (i=0; i < count; i++)
158         PerlIO_printf(Perl_debug_log, " %8d", yyss[start+i]);
159     PerlIO_printf(Perl_debug_log, "\ntoken:");
160     for (i=0; i < count; i++)
161         PerlIO_printf(Perl_debug_log, " %8.8s", yyns[start+i]);
162     PerlIO_printf(Perl_debug_log, "\nvalue:");
163     for (i=0; i < count; i++) {
164         if (yy_is_opval[yystos[yyss[start+i]]]) {
165             PerlIO_printf(Perl_debug_log, " %8.8s",
166                   yyvs[start+i].opval
167                     ? PL_op_name[yyvs[start+i].opval->op_type]
168                     : "NULL"
169             );
170         }
171         else
172             PerlIO_printf(Perl_debug_log, " %8"UVxf, (UV)yyvs[start+i].ival);
173     }
174     PerlIO_printf(Perl_debug_log, "\n\n");
175 }
176
177 #  define YY_STACK_PRINT(yyss, yyssp, yyvs, yyns)               \
178 do {                                                            \
179     if (yydebug && DEBUG_v_TEST)                                \
180         yy_stack_print (aTHX_ (yyss), (yyssp), (yyvs), (yyns)); \
181 } while (0)
182
183
184 /*------------------------------------------------.
185 | Report that the YYRULE is going to be reduced.  |
186 `------------------------------------------------*/
187
188 static void
189 yy_reduce_print (pTHX_ int yyrule)
190 {
191     int yyi;
192     const unsigned int yylineno = yyrline[yyrule];
193     YYFPRINTF (Perl_debug_log, "Reducing stack by rule %d (line %u), ",
194                           yyrule - 1, yylineno);
195     /* Print the symbols being reduced, and their result.  */
196     for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
197         YYFPRINTF (Perl_debug_log, "%s ", yytname [yyrhs[yyi]]);
198     YYFPRINTF (Perl_debug_log, "-> %s\n", yytname [yyr1[yyrule]]);
199 }
200
201 #  define YY_REDUCE_PRINT(Rule)         \
202 do {                                    \
203     if (yydebug)                        \
204         yy_reduce_print (aTHX_ Rule);           \
205 } while (0)
206
207 #else /* !DEBUGGING */
208 #  define YYDPRINTF(Args)
209 #  define YYDSYMPRINTF(Title, Token, Value)
210 #  define YY_STACK_PRINT(yyss, yyssp, yyvs, yyns)
211 #  define YY_REDUCE_PRINT(Rule)
212 #endif /* !DEBUGGING */
213
214
215 /* YYINITDEPTH -- initial size of the parser's stacks.  */
216 #ifndef YYINITDEPTH
217 # define YYINITDEPTH 200
218 #endif
219
220
221 #if YYERROR_VERBOSE
222 #  ifndef yystrlen
223 #    if defined (__GLIBC__) && defined (_STRING_H)
224 #      define yystrlen strlen
225 #    else
226 /* Return the length of YYSTR.  */
227 static YYSIZE_T
228 yystrlen (const char *yystr)
229 {
230     register const char *yys = yystr;
231
232     while (*yys++ != '\0')
233         continue;
234
235     return yys - yystr - 1;
236 }
237 #    endif
238 #  endif
239
240 #  ifndef yystpcpy
241 #    if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
242 #      define yystpcpy stpcpy
243 #    else
244 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
245    YYDEST.  */
246 static char *
247 yystpcpy (pTHX_ char *yydest, const char *yysrc)
248 {
249     register char *yyd = yydest;
250     register const char *yys = yysrc;
251
252     while ((*yyd++ = *yys++) != '\0')
253         continue;
254
255     return yyd - 1;
256 }
257 #    endif
258 #  endif
259
260 #endif /* !YYERROR_VERBOSE */
261
262 /*----------.
263 | yyparse.  |
264 `----------*/
265
266 int
267 #ifdef PERL_IN_MADLY_C
268 Perl_madparse (pTHX)
269 #else
270 Perl_yyparse (pTHX)
271 #endif
272 {
273     dVAR;
274     int yychar; /* The lookahead symbol.  */
275     YYSTYPE yylval; /* The semantic value of the lookahead symbol.  */
276     int yynerrs; /* Number of syntax errors so far.  */
277     register int yystate;
278     register int yyn;
279     int yyresult;
280
281     /* Number of tokens to shift before error messages enabled.  */
282     int yyerrstatus;
283     /* Lookahead token as an internal (translated) token number.  */
284     int yytoken = 0;
285
286     /* two stacks and their tools:
287           yyss: related to states,
288           yyvs: related to semantic values,
289
290           Refer to the stacks thru separate pointers, to allow yyoverflow
291           to reallocate them elsewhere.  */
292
293     /* The state stack.  */
294     short *yyss;
295     register short *yyssp;
296
297     /* The semantic value stack.  */
298     YYSTYPE *yyvs;
299     register YYSTYPE *yyvsp;
300
301     /* for ease of re-allocation and automatic freeing, have two SVs whose
302       * SvPVX points to the stacks */
303     SV *yyss_sv, *yyvs_sv;
304
305 #ifdef DEBUGGING
306     /* maintain also a stack of token/rule names for debugging with -Dpv */
307     const char **yyns, **yynsp;
308     SV *yyns_sv;
309 #  define YYPOPSTACK   (yyvsp--, yyssp--, yynsp--)
310 #else
311 #  define YYPOPSTACK   (yyvsp--, yyssp--)
312 #endif
313
314
315     YYSIZE_T yystacksize = YYINITDEPTH;
316
317     /* The variables used to return semantic value and location from the
318           action routines.  */
319     YYSTYPE yyval;
320
321
322     /* When reducing, the number of symbols on the RHS of the reduced
323           rule.  */
324     int yylen;
325
326 #ifndef PERL_IN_MADLY_C
327 #  ifdef PERL_MAD
328     if (PL_madskills)
329         return madparse();
330 #  endif
331 #endif
332
333     YYDPRINTF ((Perl_debug_log, "Starting parse\n"));
334
335     ENTER;                      /* force stack free before we return */
336     SAVEVPTR(PL_yycharp);
337     SAVEVPTR(PL_yylvalp);
338     PL_yycharp = &yychar; /* so PL_yyerror() can access it */
339     PL_yylvalp = &yylval; /* so various functions in toke.c can access it */
340
341     yyss_sv = newSV(YYINITDEPTH * sizeof(short));
342     yyvs_sv = newSV(YYINITDEPTH * sizeof(YYSTYPE));
343     SAVEFREESV(yyss_sv);
344     SAVEFREESV(yyvs_sv);
345     yyss = (short *) SvPVX(yyss_sv);
346     yyvs = (YYSTYPE *) SvPVX(yyvs_sv);
347     /* note that elements zero of yyvs and yyns are not used */
348     yyssp = yyss;
349     yyvsp = yyvs;
350 #ifdef DEBUGGING
351     yyns_sv = newSV(YYINITDEPTH * sizeof(char *));
352     SAVEFREESV(yyns_sv);
353     /* XXX This seems strange to cast char * to char ** */
354     yyns = (const char **) SvPVX(yyns_sv);
355     yynsp = yyns;
356 #endif
357
358     yystate = 0;
359     yyerrstatus = 0;
360     yynerrs = 0;
361     yychar = YYEMPTY;           /* Cause a token to be read.  */
362
363     YYDPRINTF ((Perl_debug_log, "Entering state %d\n", yystate));
364
365     goto yysetstate;
366
367 /*------------------------------------------------------------.
368 | yynewstate -- Push a new state, which is found in yystate.  |
369 `------------------------------------------------------------*/
370   yynewstate:
371     /* In all cases, when you get here, the value and location stacks
372           have just been pushed. so pushing a state here evens the stacks.
373           */
374     yyssp++;
375
376   yysetstate:
377     *yyssp = yystate;
378
379     if (yyss + yystacksize - 1 <= yyssp) {
380          /* Get the current used size of the three stacks, in elements.  */
381          const YYSIZE_T yysize = yyssp - yyss + 1;
382
383          /* Extend the stack our own way.  */
384          if (YYMAXDEPTH <= yystacksize)
385                goto yyoverflowlab;
386          yystacksize *= 2;
387          if (YYMAXDEPTH < yystacksize)
388                yystacksize = YYMAXDEPTH;
389
390          SvGROW(yyss_sv, yystacksize * sizeof(short));
391          SvGROW(yyvs_sv, yystacksize * sizeof(YYSTYPE));
392          yyss = (short *) SvPVX(yyss_sv);
393          yyvs = (YYSTYPE *) SvPVX(yyvs_sv);
394 #ifdef DEBUGGING
395          SvGROW(yyns_sv, yystacksize * sizeof(char *));
396          /* XXX This seems strange to cast char * to char ** */
397          yyns = (const char **) SvPVX(yyns_sv);
398          if (! yyns)
399                goto yyoverflowlab;
400          yynsp = yyns + yysize - 1;
401 #endif
402          if (!yyss || ! yyvs)
403                goto yyoverflowlab;
404
405          yyssp = yyss + yysize - 1;
406          yyvsp = yyvs + yysize - 1;
407
408
409          YYDPRINTF ((Perl_debug_log, "Stack size increased to %lu\n",
410                                    (unsigned long int) yystacksize));
411
412          if (yyss + yystacksize - 1 <= yyssp)
413                YYABORT;
414     }
415
416     goto yybackup;
417
418   /*-----------.
419   | yybackup.  |
420   `-----------*/
421   yybackup:
422
423 /* Do appropriate processing given the current state.  */
424 /* Read a lookahead token if we need one and don't already have one.  */
425 /* yyresume: */
426
427     /* First try to decide what to do without reference to lookahead token.  */
428
429     yyn = yypact[yystate];
430     if (yyn == YYPACT_NINF)
431         goto yydefault;
432
433     /* Not known => get a lookahead token if don't already have one.  */
434
435     /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
436     if (yychar == YYEMPTY) {
437         YYDPRINTF ((Perl_debug_log, "Reading a token: "));
438 #ifndef PERL_IN_MADLY_C
439 #  ifdef PERL_MAD
440         yychar = PL_madskills ? madlex() : yylex();
441 #  else
442         yychar = yylex();
443 #  endif
444 #endif
445
446 #  ifdef EBCDIC
447         if (yychar >= 0 && yychar < 255) {
448             yychar = NATIVE_TO_ASCII(yychar);
449         }
450 #  endif
451     }
452
453     if (yychar <= YYEOF) {
454         yychar = yytoken = YYEOF;
455         YYDPRINTF ((Perl_debug_log, "Now at end of input.\n"));
456     }
457     else {
458         yytoken = YYTRANSLATE (yychar);
459         YYDSYMPRINTF ("Next token is", yytoken, &yylval);
460     }
461
462     /* If the proper action on seeing token YYTOKEN is to reduce or to
463           detect an error, take that action.  */
464     yyn += yytoken;
465     if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
466         goto yydefault;
467     yyn = yytable[yyn];
468     if (yyn <= 0) {
469         if (yyn == 0 || yyn == YYTABLE_NINF)
470             goto yyerrlab;
471         yyn = -yyn;
472         goto yyreduce;
473     }
474
475     if (yyn == YYFINAL)
476         YYACCEPT;
477
478     /* Shift the lookahead token.  */
479     YYDPRINTF ((Perl_debug_log, "Shifting token %s, ", yytname[yytoken]));
480
481     /* Discard the token being shifted unless it is eof.  */
482     if (yychar != YYEOF)
483         yychar = YYEMPTY;
484
485     *++yyvsp = yylval;
486 #ifdef DEBUGGING
487     *++yynsp = (const char *)(yytname[yytoken]);
488 #endif
489
490
491     /* Count tokens shifted since error; after three, turn off error
492           status.  */
493     if (yyerrstatus)
494         yyerrstatus--;
495
496     yystate = yyn;
497     YYDPRINTF ((Perl_debug_log, "Entering state %d\n", yystate));
498
499     goto yynewstate;
500
501
502   /*-----------------------------------------------------------.
503   | yydefault -- do the default action for the current state.  |
504   `-----------------------------------------------------------*/
505   yydefault:
506     yyn = yydefact[yystate];
507     if (yyn == 0)
508         goto yyerrlab;
509     goto yyreduce;
510
511
512   /*-----------------------------.
513   | yyreduce -- Do a reduction.  |
514   `-----------------------------*/
515   yyreduce:
516     /* yyn is the number of a rule to reduce with.  */
517     yylen = yyr2[yyn];
518
519     /* If YYLEN is nonzero, implement the default value of the action:
520       "$$ = $1".
521
522       Otherwise, the following line sets YYVAL to garbage.
523       This behavior is undocumented and Bison
524       users should not rely upon it.  Assigning to YYVAL
525       unconditionally makes the parser a bit smaller, and it avoids a
526       GCC warning that YYVAL may be used uninitialized.  */
527     yyval = yyvsp[1-yylen];
528
529
530     YY_REDUCE_PRINT (yyn);
531     switch (yyn) {
532
533 /* contains all the rule actions; auto-generated from perly.y or madly.y */
534
535 #define dep() deprecate("\"do\" to call subroutines")
536 #ifdef PERL_IN_MADLY_C
537 #  include "madly.act"
538 #else
539 #  include "perly.act"
540 #endif
541
542     }
543
544     yyvsp -= yylen;
545     yyssp -= yylen;
546 #ifdef DEBUGGING
547     yynsp -= yylen;
548 #endif
549
550
551     *++yyvsp = yyval;
552 #ifdef DEBUGGING
553     *++yynsp = (const char *)(yytname [yyr1[yyn]]);
554 #endif
555
556     /* Now shift the result of the reduction.  Determine what state
557           that goes to, based on the state we popped back to and the rule
558           number reduced by.  */
559
560     yyn = yyr1[yyn];
561
562     yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
563     if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
564         yystate = yytable[yystate];
565     else
566         yystate = yydefgoto[yyn - YYNTOKENS];
567
568     YYDPRINTF ((Perl_debug_log, "Entering state %d\n", yystate));
569
570 #ifdef DEBUGGING
571     /* tmp push yystate for stack print; this is normally pushed later in
572      * yynewstate */
573     yyssp++;
574     *yyssp = yystate;
575     YY_STACK_PRINT (yyss, yyssp, yyvs, yyns);
576     yyssp--;
577 #endif
578
579     goto yynewstate;
580
581
582   /*------------------------------------.
583   | yyerrlab -- here on detecting error |
584   `------------------------------------*/
585   yyerrlab:
586     /* If not already recovering from an error, report this error.  */
587     if (!yyerrstatus) {
588         ++yynerrs;
589 #if YYERROR_VERBOSE
590         yyn = yypact[yystate];
591
592         if (YYPACT_NINF < yyn && yyn < YYLAST) {
593             YYSIZE_T yysize = 0;
594             const int yytype = YYTRANSLATE (yychar);
595             char *yymsg;
596             int yyx, yycount;
597
598             yycount = 0;
599             /* Start YYX at -YYN if negative to avoid negative indexes in
600                   YYCHECK.  */
601             for (yyx = yyn < 0 ? -yyn : 0;
602                       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
603                 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
604                     yysize += yystrlen (yytname[yyx]) + 15, yycount++;
605             yysize += yystrlen ("syntax error, unexpected ") + 1;
606             yysize += yystrlen (yytname[yytype]);
607             Newx(yymsg, yysize, char *);
608             if (yymsg != 0) {
609                 const char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
610                 yyp = yystpcpy (yyp, yytname[yytype]);
611
612                 if (yycount < 5) {
613                     yycount = 0;
614                     for (yyx = yyn < 0 ? -yyn : 0;
615                               yyx < (int) (sizeof (yytname) / sizeof (char *));
616                               yyx++)
617                     {
618                         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) {
619                             const char *yyq = ! yycount ?
620                                                     ", expecting " : " or ";
621                             yyp = yystpcpy (yyp, yyq);
622                             yyp = yystpcpy (yyp, yytname[yyx]);
623                             yycount++;
624                         }
625                     }
626                 }
627                 yyerror (yymsg);
628                 YYSTACK_FREE (yymsg);
629             }
630             else
631                 yyerror ("syntax error; also virtual memory exhausted");
632         }
633         else
634 #endif /* YYERROR_VERBOSE */
635             yyerror ("syntax error");
636     }
637
638
639     if (yyerrstatus == 3) {
640         /* If just tried and failed to reuse lookahead token after an
641               error, discard it.  */
642
643         /* Return failure if at end of input.  */
644         if (yychar == YYEOF) {
645             /* Pop the error token.  */
646             YYPOPSTACK;
647             /* Pop the rest of the stack.  */
648             while (yyss < yyssp) {
649                 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp);
650                 if (yy_is_opval[yystos[*yyssp]]) {
651                     YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
652                     op_free(yyvsp->opval);
653                 }
654                 YYPOPSTACK;
655             }
656             YYABORT;
657         }
658
659         YYDSYMPRINTF ("Error: discarding", yytoken, &yylval);
660         yychar = YYEMPTY;
661
662     }
663
664     /* Else will try to reuse lookahead token after shifting the error
665           token.  */
666     goto yyerrlab1;
667
668
669   /*----------------------------------------------------.
670   | yyerrlab1 -- error raised explicitly by an action.  |
671   `----------------------------------------------------*/
672   yyerrlab1:
673     yyerrstatus = 3;    /* Each real token shifted decrements this.  */
674
675     for (;;) {
676         yyn = yypact[yystate];
677         if (yyn != YYPACT_NINF) {
678             yyn += YYTERROR;
679             if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) {
680                 yyn = yytable[yyn];
681                 if (0 < yyn)
682                     break;
683             }
684         }
685
686         /* Pop the current state because it cannot handle the error token.  */
687         if (yyssp == yyss)
688             YYABORT;
689
690         YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp);
691         if (yy_is_opval[yystos[*yyssp]]) {
692             YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
693             op_free(yyvsp->opval);
694         }
695         yyvsp--;
696 #ifdef DEBUGGING
697         yynsp--;
698 #endif
699         yystate = *--yyssp;
700
701         YY_STACK_PRINT (yyss, yyssp, yyvs, yyns);
702     }
703
704     if (yyn == YYFINAL)
705         YYACCEPT;
706
707     YYDPRINTF ((Perl_debug_log, "Shifting error token, "));
708
709     *++yyvsp = yylval;
710 #ifdef DEBUGGING
711     *++yynsp ="<err>";
712 #endif
713
714     yystate = yyn;
715     YYDPRINTF ((Perl_debug_log, "Entering state %d\n", yystate));
716
717     goto yynewstate;
718
719
720   /*-------------------------------------.
721   | yyacceptlab -- YYACCEPT comes here.  |
722   `-------------------------------------*/
723   yyacceptlab:
724     yyresult = 0;
725     goto yyreturn;
726
727   /*-----------------------------------.
728   | yyabortlab -- YYABORT comes here.  |
729   `-----------------------------------*/
730   yyabortlab:
731     yyresult = 1;
732     goto yyreturn;
733
734   /*----------------------------------------------.
735   | yyoverflowlab -- parser overflow comes here.  |
736   `----------------------------------------------*/
737   yyoverflowlab:
738     yyerror ("parser stack overflow");
739     yyresult = 2;
740     /* Fall through.  */
741
742   yyreturn:
743
744     LEAVE;                      /* force stack free before we return */
745
746     return yyresult;
747 }
748
749 /*
750  * Local variables:
751  * c-indentation-style: bsd
752  * c-basic-offset: 4
753  * indent-tabs-mode: t
754  * End:
755  *
756  * ex: set ts=8 sts=4 sw=4 noet:
757  */