/[bison]/bison/src/bison.simple
ViewVC logotype

Diff of /bison/src/bison.simple

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.53.2.4 by akim, Mon Nov 12 09:14:35 2001 UTC revision 1.53.2.5 by akim, Wed Nov 14 14:57:06 2001 UTC
# Line 385  yyparse (YYPARSE_PARAM_ARG) Line 385  yyparse (YYPARSE_PARAM_ARG)
385    
386    if (yyssp >= yyss + yystacksize - 1)    if (yyssp >= yyss + yystacksize - 1)
387      {      {
       /* Give user a chance to reallocate the stack. Use copies of  
          these so that the &'s don't force the real ones into memory.  
          */  
       YYSTYPE *yyvs1 = yyvs;  
       short *yyss1 = yyss;  
 #if YYLSP_NEEDED  
       YYLTYPE *yyls1 = yyls;  
 #endif  
   
388        /* Get the current used size of the three stacks, in elements.  */        /* Get the current used size of the three stacks, in elements.  */
389        int size = yyssp - yyss + 1;        int size = yyssp - yyss + 1;
390    
391  #ifdef yyoverflow  #ifdef yyoverflow
392        /* Each stack pointer address is followed by the size of the        {
393           data in use in that stack, in bytes.  */          /* Give user a chance to reallocate the stack. Use copies of
394  # if YYLSP_NEEDED             these so that the &'s don't force the real ones into
395        /* This used to be a conditional around just the two extra args,             memory.  */
396           but that might be undefined if yyoverflow is a macro.  */          YYSTYPE *yyvs1 = yyvs;
397        yyoverflow ("parser stack overflow",          short *yyss1 = yyss;
                   &yyss1, size * sizeof (*yyssp),  
                   &yyvs1, size * sizeof (*yyvsp),  
                   &yyls1, size * sizeof (*yylsp),  
                   &yystacksize);  
 # else  
       yyoverflow ("parser stack overflow",  
                   &yyss1, size * sizeof (*yyssp),  
                   &yyvs1, size * sizeof (*yyvsp),  
                   &yystacksize);  
 # endif  
398    
399        yyss = yyss1; yyvs = yyvs1;          /* Each stack pointer address is followed by the size of the
400               data in use in that stack, in bytes.  */
401  # if YYLSP_NEEDED  # if YYLSP_NEEDED
402        yyls = yyls1;          YYLTYPE *yyls1 = yyls;
403            /* This used to be a conditional around just the two extra args,
404               but that might be undefined if yyoverflow is a macro.  */
405            yyoverflow ("parser stack overflow",
406                        &yyss1, size * sizeof (*yyssp),
407                        &yyvs1, size * sizeof (*yyvsp),
408                        &yyls1, size * sizeof (*yylsp),
409                        &yystacksize);
410            yyls = yyls1;
411    # else
412            yyoverflow ("parser stack overflow",
413                        &yyss1, size * sizeof (*yyssp),
414                        &yyvs1, size * sizeof (*yyvsp),
415                        &yystacksize);
416  # endif  # endif
417            yyss = yyss1;
418            yyvs = yyvs1;
419          }
420  #else /* no yyoverflow */  #else /* no yyoverflow */
421        /* Extend the stack our own way.  */        /* Extend the stack our own way.  */
422        if (yystacksize >= YYMAXDEPTH)        if (yystacksize >= YYMAXDEPTH)

Legend:
Removed from v.1.53.2.4  
changed lines
  Added in v.1.53.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26