+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>
+
+ * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
+ error recovery, mixing with/without pops and discarding of the
+ lookahead.
+ Exercise YYERROR.
+ Disable the lalr1.cc tests as currently it doesn't support YYERROR.
+
+2003-02-17 Paul Eggert <eggert@twinsun.com>
+
+ * tests/atlocal.in (LDFLAGS, LIBS): New vars.
+ * tests/testsuite.at (AT_COMPILE): Use them.
+ This fixes the testsuite problem reported by Robert Lentz in
+ <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
+
+2003-02-12 Paul Eggert <eggert@twinsun.com>
+
+ * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
+ Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
+ <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
+ * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
+ Check for malloc failure, for consistency with yacc.c.
+ (yytname_size): Remove, for consistency with yacc.c.
+
+ The bug still remains in data/lalr1.cc, as I didn't have time
+ to fix it there.
+
+2003-02-06 Akim Demaille <akim@epita.fr>
+
+ * configure.ac (GXX): Rename as...
+ (CXX): this, to keep the original Autoconf semantics.
+ Require 2.57.
+ * data/lalr1.cc: Fix b4_copyright invocations.
+ If YYDEBUG is not defined, don't depend upon name_ being defined.
+ (location.hh): Include string and iostream.
+ (Position::filename): New member.
+ (Position::Position ()): New.
+ (operator<< (Position)): New.
+ (operator- (Position, int)): New.
+ (Location::first, Location::last): Rename as...
+ (Location::begin, Location::end): these, to mock the conventional
+ iterator names.
+ (operator<< (Location)): New.
+ * tests/atlocal.in (CXX): New.
+ * tests/testsuite.at (AT_COMPILE_CXX): New.
+ * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
+ locations in a more synthetic way.
+ (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
+ lalr1.cc is used.
+ Adjust the C locations to match those from Emacs: first column is
+ column 0.
+ Change all the expected results.
+ Conform to the GCS: simplify the locations when applicable.
+ (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
+ (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
+ these CPP macros with the m4 macros new defined by...
+ (AT_CHECK_PUSHDEFS): this, i.e.:
+ (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
+ (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALSm AT_LEX_PRE_ARGS)
+ New macros.
+ (AT_CHECK_POPDEFS): Undefine them.
+ (AT_CHECK_CALC_LALR1_CC): New.
+ Use it for the first lalr1.cc test.
+
+2003-02-04 Akim Demaille <akim@epita.fr>
+
+ * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
+ Location as is defined.
+
+2003-02-04 Akim Demaille <akim@epita.fr>
+
+ * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
+ name_ being defined.
+
+2003-02-03 Paul Eggert <eggert@twinsun.com>
+
+ * src/gram.h (start_symbol): Remove unused decl.
+
+ Use more-consistent naming conventions for local vars.
+
+ * src/derives.c (derives_compute): Change type of local var from
+ int to rule_number.
+ * src/gram.c (grammar_rules_partial_print): Likewise.
+ * src/print.c (print_core): Likewise.
+ * src/reduce.c (reduce_grammar_tables): Likewise.
+
+ * src/gram.c (grammar_dump): Change name of item_number *
+ local var from r to rp.
+ * src/nullable.c (nullable_compute): Likewise.
+
+ * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
+
+ * src/gram.h (symbol_number_as_item_number): Use sym, not s,
+ for symbol or symbol_number var.
+ * src/reader.c (grammar_start_symbol_set): Likewise.
+ * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
+ Likewise.
+ * src/state.c (transitions_to): Likewise.
+ * src/state.h: Likewise.
+ * src/tables.c (symbol_number_to_vector_number): Likewise.
+
+ * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
+ char * var.
+
+ * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
+ var.
+
+ * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
+ var.
+
+ * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
+ Use str, not s, for char * var. Use ch, not c, for character var.
+ Use size for size var.
+
+ * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
+ char * var.
+ (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
+ uniqstr var.
+ * src/uniqstr.h: Likewise.
+
+ * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
+ get_layoutalgorithm_str, get_decision_str, get_orientation_str,
+ get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
+ get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
+ param to have same name as that of enum, so that we don't use
+ "s" to stand for a non-state.
+
+2003-02-02 Akim Demaille <akim@epita.fr>
+
+ * src/scan-skel.l: Scan more than one inert character per yylex
+ invocation.
+
+2003-02-01 Paul Eggert <eggert@twinsun.com>
+
+ Version 1.875a.
+
+ * po/LINGUAS: Add ms.
+
+2003-01-30 Akim Demaille <akim@epita.fr>
+
+ * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
+
+2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
+
+ * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
+ of $1.
+
+ Changes in response to error report by S. Eken: GLR mode does not
+ handle negative $ indices or $ indices in embedded rules correctly.
+ See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
+
+ * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
+ (b4_rhs_location): Ditto.
+ (yyfill): New function to copy from stack tree into array
+ incrementally.
+ (yyuserAction): Modify to allow incremental move of semantic values
+ to rhs array when in GLR mode.
+ Define YYFILL to use in user-defined actions to fill semantic array
+ as needed.
+ Remove dummy use of yystack, as there is now a guaranteed use.
+ (yydoAction): Modify to allow incremental move of semantic values
+ to rhs array when in GLR mode.
+ (yyresolveAction): Ditto.
+ (yyglrShiftDefer): Update comment.
+ (yyresolveStates): Use X == NULL for pointers, not !X.
+ (yyglrReduce): Ditto.
+ (yydoAction): Ditto
+
+ * tests/glr-regr1.at: Rename to ...
+ * tests/glr-regression.at: Add new regression test for the problems
+ described above (adapted from S. Eken).
+ Update copyright notice.
+ * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
+ * tests/Makefile.am: Ditto.
+
+2003-01-28 Paul Eggert <eggert@twinsun.com>
+
+ * data/lalr1.cc: Do not use @output_header_name@ unless
+ b4_defines_flag is set. This fixes two bugs reported by
+ Tim Van Holder in
+ <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
+ and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
+
+2003-01-21 Paul Eggert <eggert@twinsun.com>
+
+ * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
+ we don't need to worry about yyerrlab1 being reported as an
+ "unused label" by non-GCC C compilers. The downside is that if
+ locations are used then a couple of statements are duplicated each
+ time YYERROR is invoked, but the upside is that the warnings
+ should vanish.
+ (yyerrlab1): Move code to YERROR.
+ (yyerrlab2): Remove. Change uses back to yyerrlab1.
+ This reverts some of the 2002-12-27 change.
+
+2003-01-17 Paul Eggert <eggert@twinsun.com>
+
+ * src/output.c (symbol_printers_output): Fix typo that led
+ to core dump. Problem reported by Antonio Rus in
+ <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
+
+2003-01-13 Akim Demaille <akim@epita.fr>,
+ Quoc Peyrot <chojin@lrde.epita.fr>,
+ Robert Anisko <anisko_r@lrde.epita.fr>
+
+ * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
+ when the stacks contain one element, as the loop would otherwise
+ free the last state, and then use the top state (the one we just
+ popped). This means that the initial elements will not be freed
+ explicitly, as is the case in yacc.c; it is not a problem, as
+ these elements have fake values.
+
+2003-01-11 Paul Eggert <eggert@twinsun.com>
+
+ * NEWS: %expect-violations are now just warnings, reverting
+ to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
+ bootstrapping problem reported by Matthias Klose; see
+ <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
+ * src/conflicts.c (conflicts_print): Likewise.
+ * tests/conflicts.at (%expect not enough, %expect too much,
+ %expect with reduce conflicts): Likewise.
+ * doc/bison.texinfo (Expect Decl): Document this. Also mention
+ that the warning is enabled if the number of conflicts changes
+ (not necessarily increases).
+
+ * src/getargs.c (version): Update copyright year.
+
+2003-01-09 Akim Demaille <akim@epita.fr>
+
+ * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
+
2003-01-08 Paul Eggert <eggert@twinsun.com>
* Makefile.maint (WGETFLAGS):
Fix a bug where error locations were not being recorded correctly.
This problem was originally reported by Paul Hilfinger in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001901.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
* data/yacc.c (yyparse): New local var yylerrsp, to record the
top of the location stack's error locations.
Remove obsolete references to bison.simple and bison.hairy.
Problem mentioned by Aubin Mahe in
- <http://mail.gnu.org/pipermail/help-bison/2002-December/001765.html>.
+ <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
* data/glr.c: Comment fix.
* doc/bison.1: Remove references. Also, mention "yacc".
* config/install-sh: Sync with autotools.
Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
* data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
locations are requested.
(union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
sequences like "@" that are treated specially by src/scan-skel.l.
Instead, just use the file's basename. This fixes the bug
reported by Martin Mokrejs in
- <http://mail.gnu.org/pipermail/bug-bison/2002-December/001945.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2002-12-06 Paul Eggert <eggert@twinsun.com>
* configure.ac (AC_REPLACE_FUNCS): Add strtoul.
* lib/strtoul.c: New file, from gnulib.
This fixes a porting bug reported by Peter Klein in
- <http://mail.gnu.org/pipermail/bug-bison/2002-December/001944.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2002-11-30 Paul Eggert <eggert@twinsun.com>
* data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
to avoid collision with lex macro described by Bruce Lilly in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
* doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
* src/parse-gram.y (print_token_value): Renamed from yyprint.
* data/glr.c (yygetLRActions): Replace `yyindex' with
`yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
This fixes the regression with Sun ONE Studio 7 cc that I reported in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2002-11-18 Akim Demaille <akim@epita.fr>
duplicating xfopen's body.
Fix bugs reported by Nelson H. F. Beebe in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
* tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
"$CC -E foo.h" is allowed, as this doesn't work with the Portland
backslash-newline tests with "#if 0", to make it less likely that
we'll run into compiler bugs. Bring back solitary \ inside
comment, but add a closing comment to work around HP C bug. Don't
- test backslash-newline in C character constant. This should fix
- the input.at bug reported by Nelson H. F. Beebe in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
+ test backslash-newline in C character constant.
2002-11-14 Akim Demaille <akim@epita.fr>
2002-11-13 Paul Eggert <eggert@twinsun.com>
Fix some bugs reported by Albert Chin-A-Young in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
* tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
-o c"; the HP C compiler chatters during compilation.
(yyglrReduce): Return yyok, not 0.
This should avoid the enumerated-type warnings reported
by Nelson H. F. Beebe in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
* lib/bbitset.h (BITSET_INLINE): Remove.
* lib/bitset.h [! BITSET_INLINE]: Remove.
* data/glr.c (inline): Remove #define. It's the user's
responsibility to #define it away, just like 'const'.
This fixes one of the bugs reported by Nelson H. F. Beebe in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
* Makefile.maint (po-check): Scan .l and .y files instead of the
.c and the .h files that they generate. This fixes the bug
reported by Tim Van Holder in:
- <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
+ <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
Look for N_ as well as for _. Try to avoid matching #define for
N_ and _.
* po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
Revamp to fix many (but not all) of the C- and M4-related quoting
problems. Among other things, this fixes the Bison bug reported
by Jan Hubicka when processing the Bash grammar; see:
- <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html>
+ <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
Use new @ escapes consistently. Represent brackets with @{ and @}
rather than @<:@ and @:>@, since this works a bit better with dumb
2002-11-09 Paul Eggert <eggert@twinsun.com>
Fix the test failure due to GCC warnings described in
- <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
* data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
evaluate to 0 if it's impossible for NINF to be in the respective
table.
* data/glr.c (struct yyltype): Define members even when not
doing locations. This is more consistent with yacc.c, and it
works around the following bug reports:
- http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html
- http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html
- and I hope it also fixes this bug report:
- http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html
+ http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
+ http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
* doc/bison.texinfo: Minor spelling and typographical fixes. Use
@acronym consistently. Standardize on "Yacc" instead of "YACC",
2002-10-13 Paul Eggert <eggert@twinsun.com>
Fix problem reported by Henrik Grubbstroem in
- <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
+ <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
"nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
because the Bison parser reads the second action before reducing
the first one.
Include <sys/time.h> when checking for clock_t and struct tms.
Use same include order as source.
This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
- <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
* lib/timevar.c: Update copyright date and clarify comments.
(get_time) [IN_GCC]: Keep the GCC version for reference.
* src/reader.c (grammar_current_rule_check):
Don't worry about the default action if $$ is untyped.
Prevents bogus warnings reported by Jim Gifford in
- <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
* data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
* data/glr.c, data/lalr1.cc, data/yacc.c:
Output token definitions before the first part of user declarations.
Fixes compatibility problem reported by Jim Gifford for kbd in
- <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
+ <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2002-10-11 Paul Eggert <eggert@twinsun.com>
* lib/bitset.h (bitset_reset): Do not assume that bitset_word is
the same width as int. This reapplies a hunk of the 2002-08-12 patch
- <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
+ <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
which was inadvertently undone by the 2002-09-30 patch.
* lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
the same width as int.
2001-11-12 Akim Demaille <akim@epita.fr>
- %expext was not functioning at all.
+ %expect was not functioning at all.
* src/conflicts.c (expected_conflicts): Set to -1.
(conflict_report): Use ngettext.