]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
* data/lalr1.cc: When displaying a line number, be sure to make it
[bison.git] / data / lalr1.cc
index 670b68e1765aeb9a221c3b078c59859e79298bd8..148642203e3212137314e6c1edd443b6753728e9 100644 (file)
@@ -21,9 +21,6 @@ m4_divert(-1)
 ## Default values.  ##
 ## ---------------- ##
 
 ## Default values.  ##
 ## ---------------- ##
 
-# Stack parameters.
-m4_define_default([b4_stack_depth_init],  [200])
-
 # Default Parser class name.
 m4_define_default([b4_parser_class_name], [Parser])
 
 # Default Parser class name.
 m4_define_default([b4_parser_class_name], [Parser])
 
@@ -248,7 +245,6 @@ namespace yy
     static const int terror_;
     static const int errcode_;
     static const int ntokens_;
     static const int terror_;
     static const int errcode_;
     static const int ntokens_;
-    static const int initdepth_;
     static const unsigned user_token_number_max_;
     static const TokenNumberType undef_token_;
 
     static const unsigned user_token_number_max_;
     static const TokenNumberType undef_token_;
 
@@ -296,6 +292,11 @@ m4_if(b4_defines_flag, 0, [], [#include @output_header_name@])[
 # define YYCDEBUG    if (0) cdebug_
 #endif /* !YYDEBUG */
 
 # define YYCDEBUG    if (0) cdebug_
 #endif /* !YYDEBUG */
 
+#define YYACCEPT       goto yyacceptlab
+#define YYABORT                goto yyabortlab
+#define YYERROR                goto yyerrlab1
+
+
 int
 yy::]b4_parser_class_name[::parse ()
 {
 int
 yy::]b4_parser_class_name[::parse ()
 {
@@ -428,8 +429,11 @@ yy::]b4_parser_class_name[::parse ()
 #if YYDEBUG
   if (debug_)
     {
 #if YYDEBUG
   if (debug_)
     {
+      // Short files will use "unsigned char" for line numbers,
+      // in which case they will be output as character litterals
+      // by "<<".
       YYCDEBUG << "Reducing via rule " << n_ - 1
       YYCDEBUG << "Reducing via rule " << n_ - 1
-            << " (line " << rline_[n_] << "), ";
+               << " (line " << static_cast <unsigned> (rline_[n_]) << "), ";
       for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
           0 <= rhs_[i]; ++i)
        YYCDEBUG << name_[rhs_[i]] << ' ';
       for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
           0 <= rhs_[i]; ++i)
        YYCDEBUG << name_[rhs_[i]] << ' ';
@@ -515,7 +519,10 @@ b4_syncline([@oline@], [@ofile@])[
     }
   goto yyerrlab1;
 
     }
   goto yyerrlab1;
 
-  /* Error raised explicitly by an action.  */
+
+  /*----------------------------------------------------.
+  | yyerrlab1 -- error raised explicitly by an action.  |
+  `----------------------------------------------------*/
  yyerrlab1:
   if (errstatus == 3)
     {
  yyerrlab1:
   if (errstatus == 3)
     {
@@ -762,7 +769,6 @@ const int yy::]b4_parser_class_name[::final_ = ]b4_final_state_number[;
 const int yy::]b4_parser_class_name[::terror_ = 1;
 const int yy::]b4_parser_class_name[::errcode_ = 256;
 const int yy::]b4_parser_class_name[::ntokens_ = ]b4_tokens_number[;
 const int yy::]b4_parser_class_name[::terror_ = 1;
 const int yy::]b4_parser_class_name[::errcode_ = 256;
 const int yy::]b4_parser_class_name[::ntokens_ = ]b4_tokens_number[;
-const int yy::]b4_parser_class_name[::initdepth_ = ]b4_stack_depth_init[;
 
 const unsigned yy::]b4_parser_class_name[::user_token_number_max_ = ]b4_user_token_number_max[;
 const yy::]b4_parser_class_name[::TokenNumberType yy::]b4_parser_class_name[::undef_token_ = ]b4_undef_token_number[;
 
 const unsigned yy::]b4_parser_class_name[::user_token_number_max_ = ]b4_user_token_number_max[;
 const yy::]b4_parser_class_name[::TokenNumberType yy::]b4_parser_class_name[::undef_token_ = ]b4_undef_token_number[;