* data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):

Remove, useless.
(YYABORT, YYACCEPT, YYERROR): New.
* tests/calc.at: Renable the lalr1.cc test.
This commit is contained in:
Akim Demaille
2003-02-19 14:33:27 +00:00
parent 0b86fc416c
commit 60a777aa24
3 changed files with 17 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
2003-02-19 Akim Demaille <akim@epita.fr>
* data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
Remove, useless.
(YYABORT, YYACCEPT, YYERROR): New.
* tests/calc.at: Renable the lalr1.cc test.
2003-02-19 Akim Demaille <akim@epita.fr> 2003-02-19 Akim Demaille <akim@epita.fr>
* tests/calc.at (AT_CHECK_CALC): Check different scenarios of * tests/calc.at (AT_CHECK_CALC): Check different scenarios of

View 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. # Default Parser class name.
m4_define_default([b4_parser_class_name], [Parser]) m4_define_default([b4_parser_class_name], [Parser])
@@ -248,7 +245,6 @@ namespace yy
static const int terror_; static const int terror_;
static const int errcode_; static const int errcode_;
static const int ntokens_; static const int ntokens_;
static const int initdepth_;
static const unsigned user_token_number_max_; static const unsigned user_token_number_max_;
static const TokenNumberType undef_token_; static const TokenNumberType undef_token_;
@@ -296,6 +292,11 @@ m4_if(b4_defines_flag, 0, [], [#include @output_header_name@])[
# define YYCDEBUG if (0) cdebug_ # define YYCDEBUG if (0) cdebug_
#endif /* !YYDEBUG */ #endif /* !YYDEBUG */
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
int int
yy::]b4_parser_class_name[::parse () yy::]b4_parser_class_name[::parse ()
{ {
@@ -515,7 +516,10 @@ b4_syncline([@oline@], [@ofile@])[
} }
goto yyerrlab1; goto yyerrlab1;
/* Error raised explicitly by an action. */
/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action. |
`----------------------------------------------------*/
yyerrlab1: yyerrlab1:
if (errstatus == 3) if (errstatus == 3)
{ {
@@ -762,7 +766,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[::terror_ = 1;
const int yy::]b4_parser_class_name[::errcode_ = 256; 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[::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 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 yy::]b4_parser_class_name[::TokenNumberType yy::]b4_parser_class_name[::undef_token_ = ]b4_undef_token_number[;

View File

@@ -696,8 +696,7 @@ m4_define([AT_CHECK_CALC_LALR1_CC],
# AT_CHECK_CALC_LALR1_CC() # AT_CHECK_CALC_LALR1_CC()
# FIXME: YYERROR is not supported AT_CHECK_CALC_LALR1_CC([%defines %pure-parser %locations])
# AT_CHECK_CALC_LALR1_CC([%defines %pure-parser %locations])
# AT_CHECK_CALC_LALR1_CC([%defines]) # AT_CHECK_CALC_LALR1_CC([%defines])
# AT_CHECK_CALC_LALR1_CC([%locations]) # AT_CHECK_CALC_LALR1_CC([%locations])