/[bison]/bison/data/lalr1.cc
ViewVC logotype

Diff of /bison/data/lalr1.cc

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

revision 1.38 by akim, Mon Aug 25 08:29:25 2003 UTC revision 1.39 by akim, Mon Aug 25 08:39:34 2003 UTC
# Line 264  namespace yy Line 264  namespace yy
264      static const ]b4_int_type_for([b4_stos])[ stos_[];      static const ]b4_int_type_for([b4_stos])[ stos_[];
265      static const ]b4_int_type_for([b4_toknum])[ token_number_[];      static const ]b4_int_type_for([b4_toknum])[ token_number_[];
266      virtual void reduce_print_ (int yyrule);      virtual void reduce_print_ (int yyrule);
267        virtual void stack_print_ ();
268  #endif  #endif
269    
270      /* Even more tables.  */      /* Even more tables.  */
# Line 328  do {                                   \ Line 329  do {                                   \
329    if (debug_)                           \    if (debug_)                           \
330      reduce_print_ (Rule);               \      reduce_print_ (Rule);               \
331  } while (0)  } while (0)
332    # define YY_STACK_PRINT()               \
333    do {                                    \
334      if (debug_)                           \
335        stack_print_ ();                    \
336    } while (0)
337  #else /* !YYDEBUG */  #else /* !YYDEBUG */
338  # define YYCDEBUG    if (0) cdebug_  # define YYCDEBUG    if (0) cdebug_
339  # define YY_REDUCE_PRINT(Rule)  # define YY_REDUCE_PRINT(Rule)
340    # define YY_STACK_PRINT()
341  #endif /* !YYDEBUG */  #endif /* !YYDEBUG */
342    
343  #define YYACCEPT        goto yyacceptlab  #define YYACCEPT        goto yyacceptlab
# Line 497  b4_syncline([@oline@], [@ofile@])[ Line 504  b4_syncline([@oline@], [@ofile@])[
504    semantic_stack_.pop (len_);    semantic_stack_.pop (len_);
505    location_stack_.pop (len_);    location_stack_.pop (len_);
506    
507  #if YYDEBUG    YY_STACK_PRINT ();
   if (debug_)  
     {  
       YYCDEBUG << "state stack now";  
       for (StateStack::ConstIterator i = state_stack_.begin ();  
            i != state_stack_.end (); ++i)  
         YYCDEBUG << ' ' << *i;  
       YYCDEBUG << std::endl;  
     }  
 #endif  
508    
509    semantic_stack_.push (yyval);    semantic_stack_.push (yyval);
510    location_stack_.push (yyloc);    location_stack_.push (yyloc);
# Line 663  yyerrlab1: Line 661  yyerrlab1:
661        semantic_stack_.pop ();        semantic_stack_.pop ();
662        location_stack_.pop ();        location_stack_.pop ();
663        state_ = state_stack_[0];        state_ = state_stack_[0];
664          YY_STACK_PRINT ();
 #if YYDEBUG  
       if (debug_)  
         {  
           YYCDEBUG << "Error: state stack now";  
           for (StateStack::ConstIterator i = state_stack_.begin ();  
                i != state_stack_.end (); ++i)  
             YYCDEBUG << ' ' << *i;  
           YYCDEBUG << std::endl;  
         }  
 #endif  
665      }      }
666    
667    if (n_ == final_)    if (n_ == final_)
# Line 821  yy::]b4_parser_class_name[::rline_[] = Line 809  yy::]b4_parser_class_name[::rline_[] =
809    ]b4_rline[    ]b4_rline[
810  };  };
811    
812    /** Print the state stack from its BOTTOM up to its TOP (included).  */
813    
814    void
815    yy::]b4_parser_class_name[::stack_print_ ()
816    {
817      cdebug_ << "state stack now";
818      for (StateStack::ConstIterator i = state_stack_.begin ();
819           i != state_stack_.end (); ++i)
820        cdebug_ << ' ' << *i;
821      cdebug_ << std::endl;
822    }
823    
824  /** Report that the YYRULE is going to be reduced.  */  /** Report that the YYRULE is going to be reduced.  */
825    
826  void  void

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

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