Paul Eggert [Fri, 13 Aug 2004 14:28:43 +0000 (14:28 +0000)]
Adjust to latest gnulib.
(gnulib_modules): Add xalloc-die.
Set LC_ALL=C so that file names sort consistently.
Prefer the gnulib copies of gettext.m4, glibc21.m4,
inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
uintmax_t.m4, ulonglong.m4.
(intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
po.m4 since we are now using _gl.m4 instead.
Paul Eggert [Thu, 22 Jul 2004 14:40:21 +0000 (14:40 +0000)]
(_AT_CHECK_PRINTER_AND_DESTRUCTOR,
AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
UNION-FLAG. All callers changed.
(_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
Use type char, not unsigned int, when declaring an array of char;
this lets us remove a cast.
(Printers and Destructors): Add non-%union test cases.
* src/conflicts.h (expected_sr_conflicts): Rename from
expected_conflicts.
(expected_rr_conflicts): Declare.
* src/conflicts.c (expected_sr_conflicts): Rename from
expected_conflicts.
(expected_rr_conflicts): Define.
(conflicts_print): Check r/r conflicts against expected_rr_conflicts
for GLR parsers.
Use expected_sr_conflicts in place of expected_conflicts.
Warn if expected_rr_conflicts used in non-GLR parser.
* doc/bison.texinfo: Add documentation for %expect-rr.
Support %destructor and merge error locations in lalr1.cc.
* data/lalr1.cc (b4_cxx_destruct_def): New macro.
(Parser::stos_): Define unconditionally.
(Parser::destruct_): New method. Generate its body with
b4_yydestruct_generate.
(Parser::error_start_): New attribute.
(Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
token which are discarded.
(Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
error_start_ when erroneous token are discarded.
(Parser::parse) <yyerrlab1>: Compute the location of the error
token so that it covers all the discarded tokens.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
it can be called with `%skeleton "lalr1.cc"', and do that.
Paul Eggert [Wed, 24 Dec 2003 08:17:05 +0000 (08:17 +0000)]
(Torturing the Scanner): Don't use \x0 or \0 in
Bison tokens, as this runs afoul of the 2003-10-07 change that
disallowed NUL bytes in character constants or string literals.
Akim Demaille [Tue, 26 Aug 2003 05:21:41 +0000 (05:21 +0000)]
* data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
(Parser::parse): here.
Adjust: nerrs and errstatus is now replaced by...
(Parser::nerrs_, Parser::errstatus_): New.
Akim Demaille [Mon, 25 Aug 2003 18:47:36 +0000 (18:47 +0000)]
* config/announce-gen, Makefile.cfg: New.
* Makefile.am: Adjust.
* GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
keeping local WGET and WGETFLAGS modifications from Paul Eggert.
Akim Demaille [Mon, 25 Aug 2003 15:16:25 +0000 (15:16 +0000)]
When reducing initial empty rules, Bison parser read an initial
location that is not defined. This results in garbage, and that
affects Bison's own parser. Therefore we need (i) to extend Bison
to support a means to initialize this location, and (ii) to use
this CVS Bison to fix CVS Bison's parser.
* src/reader.h, reader.c (epilogue_augment): Remove, replace
with...
* src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
* src/parse-gram.y: Adjust.
(%initial-action): New.
(%error-verbose): Since we require CVS Bison, there is no reason
not to use it.
* src/scan-gram.l: Adjust.
* src/Makefile.am (YACC): New, to make sure we use our own parser.
* data/yacc.c (yyparse): Use b4_initial_action.
Akim Demaille [Mon, 25 Aug 2003 08:06:17 +0000 (08:06 +0000)]
Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
error recovery loops. This patch is based on
<http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
Also, augment the similarity between lalr1.cc and yacc.c.
Note: the locations of error recovery rules are not correct yet.
* data/lalr1.cc: Comment changes to augment the similarity between
lalr1.cc and yacc.c.
(YYERROR): Goto to yyerrorlab, not yyerrlab1.
(yyerrlab1): Remove, but where it used to be (now the bottom part of
yyerrlab), when hitting EOF, pop the whole stack here instead of
merely falling thru the default error handling mechanism.
(yyerrorlab): New label, with the old contents of YYERROR,
plus the following change: pop the stack of rhs corresponding
to the production that invoked YYERROR. That is how Yacc
behaves (required by POSIX).
* tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
fail.
Akim Demaille [Mon, 25 Aug 2003 07:15:49 +0000 (07:15 +0000)]
Tune local.at so that people can "autom4te -l autotest calc.at -o
calc" for instance, to extract a sub test suite.
* tests/testsuite.at: Move the initialization, Autotest version
requirement, and AT_TESTED invocation into...
* tests/local.at: here.
* tests/testsuite.at: Include it for compatibility with Autoconf
2.57.
* tests/Makefile.am ($(TESTSUITE)): Report that the warning should
be ignore.