/[bison]/bison/data/bison.c++
ViewVC logotype

Diff of /bison/data/bison.c++

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

revision 1.31 by hilfinger, Mon May 20 22:56:53 2002 UTC revision 1.32 by akim, Tue May 28 09:53:35 2002 UTC
# Line 272  namespace yy Line 272  namespace yy
272      static const RhsNumberType rhs_[[]];      static const RhsNumberType rhs_[[]];
273      static const b4_uint_type(b4_prhs_max) prhs_[[]];      static const b4_uint_type(b4_prhs_max) prhs_[[]];
274      static const b4_uint_type(b4_rline_max) rline_[[]];      static const b4_uint_type(b4_rline_max) rline_[[]];
275        static const b4_uint_type(b4_stos_max) stos_[[]];
276        static const short token_number_[[]];
277  #endif  #endif
278    
279      /* Even more tables.  */      /* Even more tables.  */
# Line 567  yy::b4_name::parse () Line 569  yy::b4_name::parse ()
569       token.  */       token.  */
570    
571    errstatus = 3;    errstatus = 3;
   goto yyerrhandle;  
572    
573    /* Pop the current state because it cannot handle the error token.  */    for (;;)
574   yyerrdefault:      {
575   yyerrpop:        n_ = pact_[[state_]];
576    if (!state_stack_.height ())        if (n_ != flag_)
577      goto yyabortlab;          {
578    state_ = (state_stack_.pop (), state_stack_[[0]]);            n_ += terror_;
579    semantic_stack_.pop ();            if (0 <= n_ && n_ <= last_ && check_[[n_]] == terror_)
580    location_stack_.pop ();;              {
581                  n_ = table_[[n_]];
582                  if (0 < n_)
583                    break;
584                }
585            }
586    
587          /* Pop the current state because it cannot handle the error token.  */
588          if (!state_stack_.height ())
589            goto yyabortlab;
590    
591  #if YYDEBUG  #if YYDEBUG
592    if (debug_)        if (debug_)
593      {          {
594        YYFPRINTF (stderr, "Error: state stack now");            if (stos_[[state_]] < ntokens_)
595        for (StateStack::ConstIterator i = state_stack_.begin ();              {
596             i != state_stack_.end (); ++i)                YYFPRINTF (stderr, "Error: popping token %d (%s",
597          YYFPRINTF (stderr, " %d", *i);                           token_number_[[stos_[state_]]],
598        YYFPRINTF (stderr, "\n");                           name_[[stos_[state_]]]);
599      }  # ifdef YYPRINT
600                  YYPRINT (stderr, token_number_[[stos_[state_]]],
601                           semantic_stack_.top ());
602    # endif
603                  YYFPRINTF (stderr, ")\n");
604                }
605              else
606                {
607                  YYFPRINTF (stderr, "Error: popping nonterminal (%s)\n",
608                             name_[[stos_[state_]]]);
609                }
610            }
611  #endif  #endif
612    
613   yyerrhandle:        state_ = (state_stack_.pop (), state_stack_[[0]]);
614    n_ = pact_[[state_]];        semantic_stack_.pop ();
615    if (n_ == flag_)        location_stack_.pop ();;
     goto yyerrdefault;  
   
   n_ += terror_;  
   if (n_ < 0 || n_ > last_ || check_[[n_]] != terror_)  
     goto yyerrdefault;  
616    
617    n_ = table_[[n_]];  #if YYDEBUG
618    if (n_ < 0)        if (debug_)
619      {          {
620        if (n_ == flag_)            YYFPRINTF (stderr, "Error: state stack now");
621          goto yyerrpop;            for (StateStack::ConstIterator i = state_stack_.begin ();
622        n_ = -n_;                 i != state_stack_.end (); ++i)
623        goto yyreduce;              YYFPRINTF (stderr, " %d", *i);
624              YYFPRINTF (stderr, "\n");
625            }
626    #endif
627      }      }
   else if (!n_)  
     goto yyerrpop;  
628    
629    if (n_ == final_)    if (n_ == final_)
630      goto yyacceptlab;      goto yyacceptlab;
# Line 686  yy::b4_name::check_[[]] = Line 703  yy::b4_name::check_[[]] =
703    b4_check    b4_check
704  };  };
705    
706    #if YYDEBUG
707    /* STOS_[[STATE-NUM]] -- The (internal number of the) accessing
708       symbol of state STATE-NUM.  */
709    const b4_uint_type(b4_stos_max)
710    yy::b4_name::stos_[[]] =
711    {
712      b4_stos
713    };
714    
715    /* TOKEN_NUMBER_[[YYLEX-NUM]] -- Internal token number corresponding
716       to YYLEX-NUM.  */
717    const short
718    yy::b4_name::token_number_[[]] =
719    {
720      b4_toknum
721    };
722    #endif
723    
724  /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives.  */  /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives.  */
725  const b4_uint_type(b4_r1_max)  const b4_uint_type(b4_r1_max)
726  yy::b4_name::r1_[[]] =  yy::b4_name::r1_[[]] =

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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