X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7548fed236e50c5ba9933c373a537f1a1dd15224..0d1c3a04b76293183f5b1a1dcd3ac99e71de66c6:/data/lalr1.cc?ds=inline diff --git a/data/lalr1.cc b/data/lalr1.cc index 670b68e1..14864220 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -21,9 +21,6 @@ m4_divert(-1) ## Default values. ## ## ---------------- ## -# Stack parameters. -m4_define_default([b4_stack_depth_init], [200]) - # 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 initdepth_; 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 YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 + + int yy::]b4_parser_class_name[::parse () { @@ -428,8 +429,11 @@ yy::]b4_parser_class_name[::parse () #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 - << " (line " << rline_[n_] << "), "; + << " (line " << static_cast (rline_[n_]) << "), "; 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; - /* Error raised explicitly by an action. */ + + /*----------------------------------------------------. + | yyerrlab1 -- error raised explicitly by an action. | + `----------------------------------------------------*/ 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[::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[;