muscle: factor the handling of obsolete of obsolete directives.
[bison/ericb.git] / ChangeLog
blob483f6ad6ac2221c49a5b33b01b465310e001973f
1 2009-04-06  Akim Demaille  <demaille@gostai.com>
3         muscle: factor the handling of obsolete of obsolete directives.
4         Suggested by Joel E. Denny.
5         
6         * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
7         New, extracted from...
8         * src/parse-gram.y (prologue_declaration: pure-parser): here.
9         Remove it.
10         (prologue_declaration: "%<flag>"): Use
11         muscle_percent_define_ensure.
12         (%error-verbose, %pure-parser): No longer tokens.
13         * src/scan-gram.l (pure-parser): Return as a %<flag>.
15 2009-04-06  Joel E. Denny  <jdenny@ces.clemson.edu>
17         Fix options documentation.
18         * build-aux/cross-options.pl: As in --help output, write optional
19         arguments as [=ARG] not =[ARG].
20         * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
22 2009-04-04  Joel E. Denny  <jdenny@ces.clemson.edu>
24         Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
25         If the first m4 in $PATH is wrong, it keeps looking.  Moreover, its
26         requirements for a correct m4 are stricter.
27         * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
28         * configure.ac: Update to use AC_PROG_GNU_M4.
29         Reported by Eric Blake.
31 2009-04-03  Joel E. Denny  <jdenny@ces.clemson.edu>
33         Help with updating web manual.
34         * HACKING: Incorporate instructions from gnulib/doc/README.
35         * bootstrap.conf (gnulib_modules): Add gendocs.
37 2009-04-03  Akim Demaille  <demaille@gostai.com>
39         Regen.
40         * src/parse-gram.h, src/parse-gram.c: Regen.
42 2009-04-03  Akim Demaille  <demaille@gostai.com>
44         Factor %FLAG at scan level.
45         * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
46         definitions and associated rules, replaced by....
47         (PERCENT_FLAG): this new token type, and rule.
48         * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
49         Use it for %debug and %error-verbose.
51 2009-04-03  Akim Demaille  <demaille@gostai.com>
53         Regen.
54         * src/parse-gram.h, src/parse-gram.c: Regen.
56 2009-04-03  Akim Demaille  <demaille@gostai.com>
58         Treat %debug as %define debug.
59         * data/bison.m4 (b4_debug_if): New.
60         * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
61         * data/lalr1.java: Use it instead of b4_debug_flag.
62         * src/getargs.h, src/getargs.c (debug_flag): Remove.
63         * src/output.c (prepare): Don't output it.
64         * src/parse-gram.y: Treat %debug as %define debug.
66 2009-04-03  Akim Demaille  <demaille@gostai.com>
68         Treat %error-verbose as %define error_verbose.
69         This allows to pass -Derror_verbose on the command line.  Better
70         yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
71         ERROR_VERBOSE being defined as false or true.
72         * data/bison.m4 (b4_percent_define_if_define): Instead of relying
73         on b4_percent_define_ifdef, for does not check the defined value,
74         but only whether the symbol is defined, rely on
75         b4_percent_define_flag_if, so that a value of "false" is processed
76         as a false.
77         If not defined, define the flag to "false".
78         (b4_error_verbose_if): New.
79         * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
80         b4_error_verbose_flag.
81         * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
82         * src/output.c (prepare): Don't output it.
83         * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
85 2009-04-03  Joel E. Denny  <jdenny@ces.clemson.edu>
87         Fix strange %define locations for default values.
88         Reported by Akim Demaille at
89         <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
90         and discussed again starting at
91         <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
92         * data/bison.m4 (b4_percent_define_default): Leave syncline blank
93         because location information is bogus.
94         Use angle brackets to delimit fake file name because square brackets
95         look like underexpanded m4.  Choose a better fake file name.
96         Use negative line numbers.
97         * src/muscle_tab.c (muscle_percent_define_default): Likewise.
98         * src/location.c (location_print): If line for a boundary is negative,
99         only print that boundary's file name.
100         * src/location.h: Document that.
101         * tests/skeletons.at (%define Boolean variables: invalid skeleton
102         defaults): Update output.
104 2009-04-03  Joel E. Denny  <jdenny@ces.clemson.edu>
106         Pacify ./configure --enable-gcc-warnings.
107         * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
108         in lib won't compile with it.
109         * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
111 2009-03-31  Akim Demaille  <demaille@gostai.com>
113         bootstrap: --help to stdout.
114         * bootstrap (usage): Don't send --help to stderr.
115         Use a here doc instead of a long string.
117 2009-03-31  Akim Demaille  <demaille@gostai.com>
119         bootstrap: README-hacking no longer exists
120         * bootstrap (checkout_only_file): Set to HACKING.
122 2009-03-26  Akim Demaille  <demaille@gostai.com>
124         doc: merge HACKING and README-hacking.
125         Two files is confusing.
126         Reported by Alexandre Duret-Lutz.
128         * README-hacking: Merge into...
129         * HACKING (Working from the repository): here.
131 2009-03-26  Akim Demaille  <demaille@gostai.com>
133         doc: update README-hacking.
134         * README-hacking: We now use git and git submodules.
135         Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
137 2009-03-26  Akim Demaille  <demaille@gostai.com>
139         lalr1.cc: avoid GCC 4.3 warnings.
140         GCC 4.3 now warns about "a || b && c" and asks for explicit
141         parentheses.
142         Reported by Alexandre Duret-Lutz.
143         * data/location.cc: Update copyright years.
144         (Position::operator==): Use parens to make precedence explicit.
145         Compare lines and columns first, as they are more likely to be
146         different, and they are faster to compare.
148 2009-03-26  Akim Demaille  <demaille@gostai.com>
150         gnulib: update.
151         * gnulib: Update to latest.
152         * src/local.mk (AM_CFLAGS): Move to...
153         * Makefile.am: here.
154         * etc/prefix-gnulib-mk (prefix_assignment): Also transform
155         AM_CFLAGS.
157 2009-03-02  Akim Demaille  <demaille@gostai.com>
159         Comment changes.
161 2009-03-02  Akim Demaille  <demaille@gostai.com>
163         Share b4_yytranslate_define.
164         * data/lalr1.cc (b4_yytranslate_define): Move to...
165         * data/c++.m4: here.
167 2009-03-02  Akim Demaille  <demaille@gostai.com>
169         Use locations in the variant example.
170         Yes, this obfuscates the point of this example, variants only.
171         But glr.cc cannot work (yet?) without locations.  This change
172         makes it easier to use this example with glr.cc.
174         * examples/variant.yy (assert): %define it.
175         (locations): Request them.
176         (yylex): Bind the location to the stage.
178 2009-03-02  Akim Demaille  <demaille@gostai.com>
180         Dub make_TOKEN as a public type interface.
181         * data/c++.m4 (b4_symbol_constructor_declare)
182         (b4_symbol_constructor_define): New empty stubs.
183         (b4_public_types_declare, b4_public_types_define): Use them.
184         * data/lalr1.cc (b4_symbol_constructor_declare)
185         (b4_symbol_constructor_declare_)
186         (b4_symbol_constructor_define_, b4_symbol_constructor_define):
187         Move to...
188         * data/variant.hh: here.
189         Remove the "b4_variant_if" parts, as variant.hh is loaded only if
190         needed.
191         * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
192         b4_symbol_constructor_declare, as it is now done by
193         b4_public_types_define and b4_public_types_declare.
195 2009-03-02  Akim Demaille  <demaille@gostai.com>
197         Coding style changes.
198         * data/lalr1.cc (b4_symbol_constructor_declaration_)
199         (b4_symbol_constructor_declarations)
200         (b4_symbol_constructor_definition_)
201         (b4_symbol_constructor_definitions)
202         (b4_yytranslate_definition): Rename as...
203         (b4_symbol_constructor_declare_)
204         (b4_symbol_constructor_declare)
205         (b4_symbol_constructor_define_)
206         (b4_symbol_constructor_define)
207         (b4_yytranslate_define): these.
208         * data/variant.hh (b4_variant_definition): Rename as...
209         (b4_variant_define): this.
211 2009-03-02  Akim Demaille  <demaille@gostai.com>
213         Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
214         * data/bison.m4 (b4_percent_define_if_define): New.
215         * data/c++.m4 (b4_variant_if): Move to...
216         * data/bison.m4: Here, using b4_percent_define_if_define.
217         * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
218         * data/bison.m4: Here, using b4_percent_define_if_define.
220 2009-03-02  Akim Demaille  <demaille@gostai.com>
222         Dub symbol_type_base as a public type.
223         * data/c++.m4 (b4_public_types_declare): Now define
224         symbol_type_base and symbol_type.
225         (b4_public_types_define): New.
226         In both cases, the definitions are taken verbatim from lalr1.cc.
227         * data/lalr1.cc: Adjust.
229 2009-03-02  Akim Demaille  <demaille@gostai.com>
231         b4_public_types_declare.
232         * data/c++.m4 (b4_public_types_declare): New.
233         * data/glr.cc, data/lalr1.cc: Use it.
235 2009-03-02  Akim Demaille  <demaille@gostai.com>
237         b4_semantic_type_declare.
238         * data/c++.m4 (b4_semantic_type_declare): New.
239         Factors and generalizes what was in glr.cc and lalr1.cc.
240         * data/variant.hh (b4_semantic_type_declare): Redefine it for
241         variants.
242         * data/lalr1.cc, data/glr.cc: Use it.
244 2009-02-26  Akim Demaille  <demaille@gostai.com>
246         Upgrade gnulib.
247         * gnulib: Upgrade from master.
248         * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
249         Regen.
251 2009-02-25  Akim Demaille  <demaille@gostai.com>
253         Remove useless arguments.
254         * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
255         relevant.
257 2009-02-25  Akim Demaille  <demaille@gostai.com>
259         Comment changes.
260         * data/lalr1.cc: here.
262 2009-02-25  Akim Demaille  <demaille@gostai.com>
264         Fix glr.cc's debug level handling.
265         * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
266         glr.c which is used.
267         (debug_level, set_debug_level): Adjust.
269 2009-02-25  Akim Demaille  <demaille@gostai.com>
271         Copyright years.
272         * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
274 2009-02-25  Akim Demaille  <demaille@gostai.com>
276         Style changes.
277         * etc/bench.pl.in (generate_grammar_list): Consitently use
278         location_type, not yy::location.
280 2009-02-25  Akim Demaille  <demaille@gostai.com>
282         Comment change.
283         * data/lalr1.cc: here.
285 2009-02-19  Akim Demaille  <demaille@gostai.com>
287         Make yyparser::error public.
288         * data/lalr1.cc: here.
289         There is no good reason to keep it private (and it is convenient
290         to use it from the scanner for instance).  It is already public in
291         glr.cc.
293 2009-02-19  Akim Demaille  <demaille@gostai.com>
295         Comment changes.
296         * data/glr.cc: here.
298 2009-02-19  Akim Demaille  <demaille@gostai.com>
300         Remove trailing blanks.
301         The epilogue has its own ending \n, no need to add another.
303         * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
304         epilogue.
305         * data/glr.cc: dnl when extending the epilogue.
306         Remove stray "private:".
308 2009-02-19  Akim Demaille  <demaille@gostai.com>
310         Use b4_c_modern.
311         * data/c.m4 (b4_c_function_decl): Here.
313 2009-02-19  Akim Demaille  <demaille@gostai.com>
315         Comment changes.
316         * data/lalr1.cc: here.
318 2009-02-19  Akim Demaille  <demaille@gostai.com>
320         Extract variant.hh
321         * data/variant.hh: New, extracted from...
322         * data/lalr1.cc: here.
323         Adjust.
324         * data/local.mk: Adjust.
326 2009-02-19  Akim Demaille  <demaille@gostai.com>
328         Extract stack.hh from lalr1.cc.
329         * data/stack.hh: New.
330         * data/lalr1.cc: Extract from here.
331         * data/local.mk: Adjust.
333 2009-02-03  Joel E. Denny  <jdenny@ces.clemson.edu>
335         Add reminder about uploading public key to keys.gnupg.net.
336         * HACKING (Release Procedure): Here.
338 2009-01-28  Akim Demaille  <demaille@gostai.com>
340         * NEWS: Update information about 2.4.1 and 2.4.2.
342 2008-11-04  Akim Demaille  <demaille@gostai.com>
344         Reformat NEWS.
345         * NEWS: Use more outline-mode markup.
346         Suggested by Jim Meyering.
348 2009-01-08  Akim Demaille  <demaille@gostai.com>
350         Fix grep portability issues.
351         Grep on Solaris does not support -q.
352         Reported by Summum Bonum.
354         * NEWS: Add a stub for 2.4.2.
355         * THANKS: Add Summum Bonum.
356         * tests/atlocal.in (EGREP): New.
357         (CC, CXX, XSLTPROC): Make it possible to override them via
358         envvars.
359         * tests/java.at: Use $EGREP instead of egrep.
360         Use AT_CHECK's ignore instead of grep's -q.
362 2008-12-11  Akim Demaille  <demaille@gostai.com>
364         Pass the token type to yysyntax_error.
365         * data/yacc.c (yysyntax_error): Take the transated token instead
366         of the raw number.
367         Adjust callers.
368         * TODO: Update.
370 2008-12-11  Akim Demaille  <demaille@gostai.com>
372         Formatting changes.
373         * data/glr.c: Formatting changes.
375 2008-12-11  Akim Demaille  <demaille@gostai.com>
377         Propagate i18n changes into glr.c.
378         * TODO: Update.
379         * data/glr.c (yyreportSyntaxError): Use "switch" instead of
380         building the error message format dynamically.
381         * data/lalr1.java: Formatting changes.
383 2008-12-11  Akim Demaille  <demaille@gostai.com>
385         Use testsuite -C.
386         * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
387         Solves problems when top_srcdir is an absolute path.
388         Suggested by Eric Blake.
389         * configure.ac: Require Autoconf 2.62.
391 2008-12-11  Akim Demaille  <demaille@gostai.com>
393         Simplify the i18n of the error messages.
394         * data/lalr1.cc: Comment changes.
395         * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
396         lalr1.cc instead of building dynamically the format string.
398 2008-12-08  Akim Demaille  <demaille@gostai.com>
400         Fix portability issue in the test suite.
401         * tests/local.at (AT_MATCHES_CHECK): New.
402         Based on Perl instead of Sed.  Sed has too many portability
403         pitfalls, not ever Sed is GNU Sed.
404         * tests/actions.at (Fix user actions without a trailing semicolon):
405         Use it.
407 2008-12-08  Akim Demaille  <demaille@gostai.com>
409         Update data/README.
410         * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
412 2008-12-08  Akim Demaille  <demaille@gostai.com>
414         Install autoconf as a submodule to get m4sugar.
415         * .gitmodules: Add submodules/autoconf.
416         * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
417         submodules/autoconf.
419 2008-12-08  Akim Demaille  <demaille@gostai.com>
421         Test token.prefix in all the skeletons.
422         * data/java.m4 (b4_token_enum): Use the token.prefix.
423         * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
424         * tests/calc.at (_AT_DATA_CALC_Y): Use it.
425         Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
426         * tests/java.at: Comment changes.
427         (AT_CHECK_JAVA_MINIMAL): Define the END token.
428         (Java parser class and package names): Add token.prefix check.
430 2008-12-08  Akim Demaille  <demaille@gostai.com>
432         Fix regeneration of atconfig.
433         * tests/local.mk (tests/atconfig): The rule was incorrect, but
434         remove it: now that there is no tests/Makefile.am, the top-level
435         Makefile properly updates atconfig when needed.
437 2008-12-07  Di-an Jan  <dianj@freeshell.org>
439         Implement the FIXME that ends an user action with a semicolon
440         if it seems necessary.
441         * src/scan-code.l (flex rules section): Flag cpp directive from
442         any `#' to the first unescaped end-of-line.  Semicolon is not
443         needed after `;', `{', '}', or cpp directives and is needed after
444         any other token (whitespaces and comments have no effect).
445         * tests/actions.at (Fix user actions without a trailing semicolon):
446         New test.
447         * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
448         to make user actions complete statements.
449         Adjust column numbers in error messages.
450         * tests/regression.at (Fix user actions without a trailing semicolon):
451         Remove.  Covered by new test.
453 2008-12-07  Akim Demaille  <demaille@gostai.com>
455         Update gnulib.
456         * gnulib: Update from master.
458 2008-12-05  Eric Blake  <ebb9@byu.net>
460         Avoid compiler warning.
461         * src/output.c (muscle_insert_item_number_table): Delete unused
462         function.
464 2008-12-02  Eric Blake  <ebb9@byu.net>
466         Build testsuite with newer autoconf.
467         * tests/output.at (m4_expand): Don't override in newer autoconf,
468         where the underlying implementation changed.
469         * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
470         (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
471         (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
472         (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
473         since some of them contain unbalanced ')'.
475 2008-12-01  Akim Demaille  <demaille@gostai.com>
477         Use b4_symbol for printers and destructors everywhere.
478         * data/bison.m4 (b4_symbol_action_location): New.
479         * data/c.m4 (b4_symbol_actions): Remove.
480         Adjust all callers to use by b4_symbol_foreach and the corresponding
481         b4_symbol_printer/destructor macro.
482         * data/glr.cc: Adjust.
483         * data/lalr1.java: Adjust the %destructor sanity check.
484         * src/output.c (symbol_code_props_output): Remove, we no longer
485         need the b4_symbol_printers/destructors tables.
487 2008-12-01  Akim Demaille  <demaille@gostai.com>
489         Use b4_symbol_case_.
490         * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
491         b4_symbol_case_.
493 2008-12-01  Akim Demaille  <demaille@gostai.com>
495         Move b4_symbol based macro to bison.m4.
496         * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
497         (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
498         (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
499         (b4_type_foreach): Move to...
500         * data/bison.m4: Here.
501         * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
502         b4_symbol_value_template instead of b4_symbol_value.
504 2008-12-01  Akim Demaille  <demaille@gostai.com>
506         b4_symbol/type_foreach.
507         * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
508         Use them.
510 2008-12-01  Akim Demaille  <demaille@gostai.com>
512         Use the symbol properties to output the printer/destructor for lalr1.cc.
513         Instead of defining complex list of tuples to define various
514         properties of the symbols, we now prefer to define symbols as
515         "structs" in m4: using the symbol key (its number), and the
516         property name, b4_symbol gives it value.  Use this to handle
517         destructors and printers.
519         * src/output.c (CODE_PROP): New.
520         (prepare_symbol_definitions): Use it to define the printer and
521         destructor related attributes of the symbols.
522         * data/lalr1.cc (b4_symbol_actions): Rename as...
523         (b4_symbol_action): this.
524         Use b4_symbol instead of 6 arguments.
525         (b4_symbol_printer, b4_symbol_destructor): New.
526         Use them instead of b4_symbol_actions.
528 2008-12-01  Akim Demaille  <demaille@gostai.com>
530         Avoid capturing variables too easily.
531         * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
532         v__ and p__ instead of v and p.
534 2008-12-01  Akim Demaille  <demaille@gostai.com>
536         Remove spurious empty line before syncline.
537         * data/bison.m4 (b4_syncline): Don't output an empty line before
538         the output.
540 2008-11-26  Akim Demaille  <demaille@gostai.com>
542         Convert lib/Makefile.am into lib/local.mk.
543         The real problem is rather gnulib.mk, which itself is extracted
544         from a Makefile.am that gnulib expects to the "recursive".  The
545         tool prefix-gnulib-mk converts such a gnulib.mk to be
546         non-recursive.  Also, some AC_SUBST variables need to be adjusted.
548         * etc/prefix-gnulib-mk: New.
549         * bootstrap (slurp): Use it to convert further gnulib.mk.
550         No longer try to avoid re-creation of lib/gnulib.mk as the changes
551         are deeper.
552         * lib/Makefile.am: Rename as...
553         * lib/local.mk: this.
554         Adjust to be prefixed.
555         * Makefile.am, configure.ac: Adjust.
556         * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
558 2008-11-26  Akim Demaille  <demaille@gostai.com>
560         s/_FLAGS/FLAGS/.
561         * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
562         (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
563         Reported by Eric Blake.
565 2008-11-26  Akim Demaille  <demaille@gostai.com>
567         Use b4_parser_tables_define in glr.cc.
568         * data/glr.c: Use b4_parser_tables_define instead of defining the
569         (deterministic integral) tables by hand.
571 2008-11-26  Akim Demaille  <demaille@gostai.com>
573         Use b4_parser_tables_define in Java.
574         * data/java.m4 (b4_typed_parser_table): Rename as...
575         (b4_typed_parser_table_define): this, for consistency.
576         Accept a comment as $4.
577         Move $2 into yy*_.
578         (b4_integral_parser_table): Rename as...
579         (b4_integral_parser_table_define): this.
580         * data/lalr1.java: Adjust all uses.
581         Use b4_parser_tables_define instead of generation by hand.
583 2008-11-26  Akim Demaille  <demaille@gostai.com>
585         Prepare the convergence bw C style and Java table generation.
586         * data/bison.m4 (b4_tables_map, b4_tables_declare)
587         (b4_tables_define): Rename as...
588         (b4_integral_parser_tables_map, b4_parser_tables_declare)
589         (b4_parser_tables_define): these.
590         * data/c.m4 (b4_table_define): Rename as...
591         (b4_integral_parser_table_define): this.
592         * data/lalr1.cc: Adjust.
593         (b4_table_define, b4_table_declare): Rename as...
594         (b4_integral_parser_table_define)
595         (b4_integral_parser_table_declare): these.
596         (yyrline_): Move the comment where it is actually used.
597         * data/yacc.c: Adjust.
598         (yyrline): Use b4_integral_parser_table_define.
600 2008-11-26  Akim Demaille  <demaille@gostai.com>
602         Regen.
603         * src/parse-gram.h, src/parse-gram.c: Regen.
605 2008-11-26  Akim Demaille  <demaille@gostai.com>
607         Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
608         * data/lalr1.cc (b4_tables_map): Move to...
609         * data/bison.m4: here.
610         Update the comment for yytable during the flight.
611         (b4_tables_declare, b4_tables_define): New.
612         * data/lalr1.cc: Use them.
613         * data/c.m4 (b4_table_define): New.
614         * data/yacc.c: Use b4_tables_define instead of output the tables
615         by hand.
616         * tests/regression.at (Web2c Actions): Adjust the expected output,
617         the order of the tables changed.
619 2008-11-26  Akim Demaille  <demaille@gostai.com>
621         Get rid of (yy)rhs and (yy)prhs.
622         These tables are no longer needed in the parsers, and they don't seem to
623         be useful.  They are not documented either.
625         * src/output.c (prepare_rules): Get rid of rhs and prhs.
626         Adjust the computation of (yy)r2.
628 2008-11-26  Akim Demaille  <demaille@gostai.com>
630         Rule length is unsigned.
631         * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
633 2008-11-26  Akim Demaille  <demaille@gostai.com>
635         Get rid of lalr1-split.cc.
636         It was no longer maintainer.
638         * data/lalr1-split.cc: Remove.
639         * etc/bench.pl.in (bench_fusion_parser): Remove.
640         Adjust.
642 2008-11-26  Akim Demaille  <demaille@gostai.com>
644         Use yy* consistently.
645         * data/glr.c: Now that yyrhs no longer exists as a global
646         variable, rename local "rhs" variables into "yyrhs" for
647         consistency.
649 2008-11-25  Akim Demaille  <demaille@gostai.com>
651         Get rid of yyrhs and yyprhs in glr.c.
652         * data/glr.c (yyrhs, yyprhs): Remove.
653         Instead, use the state stack and yystos.
655 2008-11-25  Akim Demaille  <demaille@gostai.com>
657         Flag glr tests.
658         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
659         as an Autotest keyword.
661 2008-11-25  Akim Demaille  <demaille@gostai.com>
663         Prefer TESTSUITE_FLAGS.
664         TESTSUITEFLAGS is barely readable.
666         * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
667         for backward compatibility.
668         Use the former instead of the latter.
670 2008-11-25  Akim Demaille  <demaille@gostai.com>
672         Get rid of yyrhs and yyprhs in larl1.java.
673         * data/lalr1.java (yyrhs_, yyprhs_): Remove.
674         (yy_reduce_print): Rather, use yystos_ and the state stack.
676 2008-11-25  Akim Demaille  <demaille@gostai.com>
678         Formatting changes.
680 2008-11-25  Akim Demaille  <demaille@gostai.com>
682         Get rid of yyrhs and yyprhs in yacc.c.
683         They were used to get the symbol types, given a rule number, when
684         displaying the top of the stack before a reduction.  But the
685         symbol type is available from the state stack.  This has two be
686         benefits: two tables less in the parser (making it smaller), and a
687         more consistent use of the three stacks which will help to fuse
688         them.
690         * data/yacc.c (yyprhs, yyrhs): Remove.
691         (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
692         (yy_reduce_print): Take yyssp as argument.
693         Use it, together with yystos, to get the symbol type.
694         * tests/regression.at (Web2c Report): Remove these tables from the
695         expected output.
697 2008-11-25  Akim Demaille  <demaille@gostai.com>
699         b4_tables_map.
700         The point is to factor the generation of the tables across skeletons.
701         This is language dependant.
703         * data/c.m4 (b4_comment_): New.
704         Should be usable to define how to generate tables independently of
705         the language.
706         (b4_c_comment): New.
707         (b4_comment): Bounce to b4_c_comment.
708         Now support $2 = [PREFIX] for indentation.
709         * data/lalr1.cc (b4_table_declare): Don't output a comment if
710         there is no comment.
711         Indent it properly when there is one.
712         Output the ending semicolon.
713         (b4_table_define): Space changes.
714         Output the ending semicolon.
715         (b4_tables_map): New.
716         Use it twice instead of declaring and defining the (integral)
717         tables by hand.
719 2008-11-25  Akim Demaille  <demaille@gostai.com>
721         b4_table_declare.
722         * data/lalr1.cc (b4_table_declare): New.
723         Use it to declare the tables defined with b4_table_define.
724         (b4_table_define): Declare a third arg to match b4_table_declare
725         signature.
726         Move all the comments around invocations of b4_table_define into
727         the invocations itselves.
728         Move things around to have the order for declarations and
729         definitions.
731 2008-11-25  Akim Demaille  <demaille@gostai.com>
733         Formatting changes.
734         * data/lalr1.java: here.
736 2008-11-25  Akim Demaille  <demaille@gostai.com>
738         b4_args is more general than only C++.
739         * data/lalr1.cc (b4_args, _b4_args): Move to...
740         * data/bison.m4: here.
742 2008-11-21  Di-an Jan  <dianj@freeshell.org>
744         Implement no-XXX arguments for --warnings, --report, --trace.
745         * src/getargs.c (flags_argmatch): Handles no-XXX.
746         Fix typo in doxygen comment.
748 2008-11-21  Akim Demaille  <demaille@gostai.com>
750         Display the changes in cross-options.texi.
751         * build-aux/cross-options.pl ($sep): New, to separate items.
752         * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
753         changes.
755 2008-11-20  Di-an Jan  <dianj@freeshell.org>
757         Improves options in the manual.
758         * doc/bison.texinfo (-g, -x): Add space before argument.
759         (Option Cross Key): Implement FIXME: listing directives also.
760         * build-aux/cross-options.pl:  Read from <STDIN> rather than <>.
761         (Short Option): Special case -d.  Put arguments inside @option.
762         (Bison Directive): Add column, automatically extracted from
763         src/scan-gram.l (actual name passed as the first argument)
764         with special case for %define.
765         * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
766         to build-aux/cross-options.pl.
767         * src/getargs.c (usage): Document limitations of cross-options.pl.
768         * src/scan-gram.l: Likewise.
770 2008-11-18  Joel E. Denny  <jdenny@ces.clemson.edu>
772         Fix unexpanded macros in GLR defines file.
773         Reported by Csaba Raduly at
774         <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
775         * THANKS (Csaba Raduly): Add.
776         * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
777         * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
778         lexer in a separate module that includes the defines file.
779         (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
780         source.
781         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
782         Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
783         (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
784         (AT_DATA_SOURCE_PROLOGUE): New.
785         (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
786         (AT_DATA_SOURCE): New.
787         (AT_FULL_COMPILE): Extend to support an additional source file.
789 2008-11-18  Akim Demaille  <demaille@gostai.com>
791         More TODO.
792         * TODO: More short term issues.
794 2008-11-18  Akim Demaille  <demaille@gostai.com>
796         Regen.
797         * src/parse-gram.h, src/parse-gram.c: Regen.
799 2008-11-18  Akim Demaille  <demaille@gostai.com>
801         Use b4_subtract where possible.
802         * data/lalr1.cc (b4_subtract): Move to...
803         * data/bison.m4: here.
804         * data/glr.c (b4_rhs_data): Use it.
805         * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
807 2008-11-18  Akim Demaille  <demaille@gostai.com>
809         Remove incorrect mode specification.
810         * data/glr.cc: Don't pretend it's C code.
812 2008-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
814         Simplify last patch slightly.
815         * src/getargs.c (getargs): Here.
817 2008-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
819         Fix last warning from --enable-gcc-warnings.
820         * src/getargs.c (getargs): Don't assign const address to non-const
821         pointer.
823 2008-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
825         Don't let maintainer-*-check targets force a version update.
826         * cfg.mk (_is-dist-target): Implement.  maintainer-check* was already
827         handled.
829 2008-11-17  Di-an Jan  <dianj@freeshell.org>
831         * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
832         Align menus.  Adjust word wrapping.  Use node names for menu names.
833         (Examples): Don't abbreviate node names.
834         (LocalWords): Remove abbreviations.
835         (Copying): Make description a sentence.
836         (Java Action Features): Remove period to match the rest of menu.
838 2008-11-17  Di-an Jan  <dianj@freeshell.org>
840         Handles several --enable-gcc-warnings.
841         * src/getargs.c (command_line_location): Set parameters to void.
842         * src/output.c (symbol_type_name_cmp): Make static.
843         (symbols_by_type_name): Set parameters to void.
844         (symbol_definitions_output): Remove unused parameter.  Rename as...
845         (prepare_symbol_definitions): this.
846         (muscles_output): Move symbol_definitions_output to...
847         (output): here as prepare_symbol_definitions.
848         * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
849         (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
851 2008-11-17  Di-an Jan  <dianj@freeshell.org>
853         * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
854         Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
856 2008-11-16  Akim Demaille  <demaille@gostai.com>
858         Add missing $(EXEEXT).
859         * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
860         "src/bison$(EXEEXT)".
861         Reported by Di-an Jan.
863 2008-11-15  Akim Demaille  <demaille@gostai.com>
865         * TODO: Update.
867 2008-11-15  Akim Demaille  <demaille@gostai.com>
869         Formatting changes.
870         * tests/input.at: here.
872 2008-11-15  Akim Demaille  <demaille@gostai.com>
874         Remove duplicate header inclusion.
875         * src/LR0.c: here.
877 2008-11-15  Akim Demaille  <demaille@gostai.com>
879         * src/parse-gram.h, src/parse-gram.c: Regen.
881 2008-11-15  Akim Demaille  <demaille@gostai.com>
883         Support parametric types.
885         There are two issues to handle: first scanning nested angle
886         bracket pairs to support types such as std::pair< std::string,
887         std::list<std::string> > >.
889         Another issue is to address idiosyncracies of C++: do not glue two
890         closing angle brackets together (otherwise it's operator>>), and
891         avoid sticking blindly a TYPE to the opening <, as it can result
892         in '<:' which is a digraph for '['.
894         * src/scan-gram.l (brace_level): Rename as...
895         (nesting): this.
896         (SC_TAG): New.
897         Implement support for complex tags.
898         (tag): Accept
899         , but not <.
900         * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
901         (b4_symbol_variant): Leave space around types as parameters.
902         * examples/variant.yy: Use nested template types and leading ::.
903         * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
904         Rename as...
905         (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
906         * tests/c++.at: Test parametric types.
908 2008-11-15  Akim Demaille  <akim@betelgeuse.gostai.ensta.fr>
910         Test token.prefix.
911         This is not sufficient, but we test at least that the make_SYMBOL
912         interface is not affected by token.prefix.  A more general test
913         will be implemented when the support of token.prefix is generalized
914         to more skeletons.
916         * tests/c++.at: One more variant test, using token.prefix.
918 2008-11-15  Akim Demaille  <akim@betelgeuse.gostai.ensta.fr>
920         Test the make_TOKEN interface.
921         * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
922         Factor the common code in yylex.
923         Use it to test "%define lex_symbol".
925 2008-11-15  Akim Demaille  <akim@betelgeuse.gostai.ensta.fr>
927         Formatting change.
929 2008-11-15  Akim Demaille  <akim@betelgeuse.gostai.ensta.fr>
931         Simplify code for variants bench marks.
932         * etc/bench.pl.in (&generate_grammar_list): Define and use
933         location_type.
934         Factor the common code in yylex.
936 2008-11-15  Akim Demaille  <demaille@gostai.com>
938         Better error message.
939         * bootstrap (find_tool): Fix the error message.
941 2008-11-15  Akim Demaille  <demaille@gostai.com>
943         Update variant.yy to newest interface.
944         * examples/variant.yy: Define lex_symbol.
945         Adjust.
947 2008-11-15  Akim Demaille  <demaille@gostai.com>
949         Don't use locations in variant.yy.
950         * examples/variant.yy: Adjust to not using locations.
952 2008-11-15  Akim Demaille  <demaille@gostai.com>
954         Comment changes.
955         * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
956         comments for the license.
958 2008-11-15  Akim Demaille  <demaille@gostai.com>
960         Remove tests/Makefile.am.
961         * tests/Makefile.am: Rename as...
962         * tests/local.mk: this.
963         * Makefile.am, configure.ac: Adjust.
964         * Makefile.am (DISTCLEANFILES): Define.
965         (maintainer-check, maintainer-xml-check, maintainer-push-check):
966         Remove, we no longer need to bounce to the real targets.
968 2008-11-15  Akim Demaille  <demaille@gostai.com>
970         Comment changes.
972 2008-11-15  Akim Demaille  <demaille@gostai.com>
974         djgpp/local.mk.
975         * Makefile.am (EXTRA_DIST): Move djgpp related part to...
976         * djgpp/local.mk: this new file.
978 2008-11-15  Akim Demaille  <demaille@gostai.com>
980         Remove doc/Makefile.am.
981         * doc/Makefile.am: Rename as...
982         * doc/local.mk: this.
983         Adjust paths
984         * Makefile.am, configure.ac: Adjust.
985         * Makefile.am (MOSTLYCLEANFILES): New.
986         * src/local.mk: Adjust.
988 2008-11-15  Akim Demaille  <demaille@gostai.com>
990         Move sc_tight_scope into maint.mk.
991         It does not work, and I don't know how it was supposed to work: it
992         seems to be looking for sources in the build tree.  I just moved
993         it at a better place, fixing it is still required.
995         * src/local.mk (echo): Remove.
996         (sc_tight_scope): Move to...
997         * maint.mk: here.
999 2008-11-15  Akim Demaille  <demaille@gostai.com>
1001         Regen.
1002         * src/parse-gram.h, src/parse-gram.h: Regen.
1004 2008-11-15  Akim Demaille  <demaille@gostai.com>
1006         Remove src/Makefile.am.
1007         * src/Makefile.am: Rename as...
1008         * src/local.mk: this.
1009         Prefix all the paths with src/.
1010         (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1011         (AM_CPPFLAGS): Find find in builddir/src.
1012         (YACC): Move the flags into...
1013         (AM_YFLAGS): here.
1014         * maint.mk (sc_tight_scope): Disable.
1015         It used to bounce to the version in src/Makefile.am which is now
1016         part of this very Makefile.
1017         * Makefile.am, configure.ac: Adjust.
1018         * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1019         include "..." to find files "here": we are no longer in src/, so
1020         qualify the includes with src/.
1021         * doc/Makefile.am (PREPATH): No longer include the top_builddir
1022         prefix.
1023         (.x.1): Adjust to be able to create src/foo from the top level
1024         Makefile, instead of going bounce to src/Makefile the creation of
1025         foo.
1027 2008-11-15  Akim Demaille  <demaille@gostai.com>
1029         Remove useless variable.
1030         * doc/Makefile.am (srcsrcdir): Remove.
1032 2008-11-15  Akim Demaille  <demaille@gostai.com>
1034         Remove data/Makefile.am.
1035         * data/Makefile.am: Rename as...
1036         * data/local.mk: this.
1037         Adjust paths.
1038         * Makefile.am, configure.ac: Adjust.
1040 2008-11-15  Akim Demaille  <demaille@gostai.com>
1042         Remove etc/Makefile.am.
1043         * etc/Makefile.am: Rename as...
1044         * etc/local.mk: this.
1045         Adjust.
1046         * Makefile.am, configure.ac: Adjust.
1048 2008-11-15  Akim Demaille  <demaille@gostai.com>
1050         Remove examples/local.mk.
1051         examples/calc++/Makefile.am might be interesting to keep as is, since
1052         it is an example in itself.
1054         * examples/Makefile.am: Rename as...
1055         * examples/local.mk: this.
1056         Adjust.
1057         * Makefile.am, configure.ac: Adjust.
1059 2008-11-15  Akim Demaille  <demaille@gostai.com>
1061         Remove build-aux/Makefile.am.
1062         Recursive Makefiles are really way too slow, let's get rid of some of
1063         them.
1065         * build-aux/Makefile.am: Rename as...
1066         * build-aux/local.mk: this.
1067         Adjust paths.
1068         * Makefile.am, configure.ac: Adjust.
1070 2008-11-15  Akim Demaille  <demaille@gostai.com>
1072         Provide convenience constructors for locations and positions.
1073         * data/location.cc (position::position): Accept file, line and
1074         column as arguments with default values.
1075         Always qualify initial line and column literals as unsigned.
1076         (location::location): Provide convenience constructors.
1078 2008-11-15  Akim Demaille  <demaille@gostai.com>
1080         Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1081         token type.
1082         Using template buys us nothing, and makes it uselessly complex to
1083         construct a symbol.  Besides, it could not be generalized to other
1084         languages, while make_FOO would work in C/Java etc.
1086         * data/lalr1.cc (b4_symbol_): New.
1087         (b4_symbol): Use it.
1088         (b4_symbol_constructor_declaration_)
1089         (b4_symbol_constructor_definition_): Instead of generating
1090         specializations of an overloaded template function, just generate
1091         several functions whose names are forged from the token names
1092         without the token.prefix.
1093         (b4_symbol_constructor_declarations): Generate them for all the
1094         symbols, not just by class of symbol type, now that instead of
1095         specializing a function template by the token, we generate a
1096         function named after the token.
1097         (b4_symbol_constructor_specialization_)
1098         (b4_symbol_constructor_specializations): Remove.
1099         * etc/bench.pl.in: Adjust to this new API.
1101 2008-11-13  Akim Demaille  <demaille@gostai.com>
1103         %define token.prefix.
1104         Provide a means to add a prefix to the name of the tokens as
1105         output in the generated files.  Because of name clashes, it is
1106         good to have such a prefix such as TOK_ that protects from names
1107         such as EOF, FILE etc.  But it clutters the grammar itself.
1109         * data/bison.m4 (token.prefix): Empty by default.
1110         * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1111         * data/lalr1.cc (b4_symbol): Ditto.
1113 2008-11-13  Akim Demaille  <demaille@gostai.com>
1115         Compute at M4 time some of the subtractions.
1116         * data/lalr1.cc (b4_subtract): New.
1117         (b4_rhs_data): Use it.
1119 2008-11-13  Akim Demaille  <demaille@gostai.com>
1121         symbol::token.
1122         This allows the user to get the type of a token returned by yylex.
1124         * data/lalr1.cc (symbol::token): New.
1125         (yytoknum_): Define when %define lex_symbol, independently of
1126         %debug.
1127         (yytoken_number_): Move into...
1128         (symbol::token): here, since that's the only use.
1129         The other one is YYPRINT which was not officially supported
1130         by lalr1.cc, and anyway it did not work since YYPRINT uses this
1131         array under a different name (yytoknum).
1133 2008-11-13  Akim Demaille  <demaille@gostai.com>
1135         YYERRCODE.
1136         * TODO (YYERRCODE): Mention the case of $undef.
1138 2008-11-13  Akim Demaille  <demaille@gostai.com>
1140         TODO: YYPRINT.
1141         * TODO (YYPRINT): New.
1143 2008-11-13  Akim Demaille  <demaille@gostai.com>
1145         Comment changes.
1146         * data/lalr1.cc, data/yacc.c: Fix the description of the
1147         yytranslate and yytoknum tables.
1149 2008-11-13  Akim Demaille  <demaille@gostai.com>
1151         Define make_symbol in the header.
1152         To reach good performances these functions should be inlined (yet
1153         this is to measure precisely).  To this end they must be available
1154         to the caller.
1156         * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1157         location_type with the class name.
1158         Since will now be output in the header, declare "inline".
1159         No longer use b4_symbol_constructor_specializations, but
1160         b4_symbol_constructor_definitions in the header.
1161         Don't call it in the *.cc file.
1163 2008-11-13  Akim Demaille  <demaille@gostai.com>
1165         Define yytranslate in the header for lex_symbol.
1166         * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1167         into the header file when using %define lex_symbol.
1168         (yytranslate_): Declare inline.
1170 2008-11-13  Akim Demaille  <demaille@gostai.com>
1172         Define the constructors of symbol_type in
1173         b4_symbol_constructor_definitions.
1174         The constructors are called by the make_symbol functions, which a
1175         forthcoming patch will move elsewhere.  Hence the interest of
1176         putting them together.
1178         The stack_symbol_type does not need to be moved, it is used only
1179         by the parser.
1181         * data/lalr1.cc: Move symbol_type and symbol_base_type
1182         constructors into...
1183         (b4_symbol_constructor_definitions): here.
1184         Adjust.
1186 2008-11-13  Akim Demaille  <demaille@gostai.com>
1188         Make it easier to move the definition of yytranslate_.
1189         Forthcoming changes will make it possible to use yytranslate_
1190         from outside the parser implementation file.
1192         * data/lalr1.cc (b4_yytranslate_definition): New.
1193         Use it.
1195 2008-11-13  Akim Demaille  <demaille@gostai.com>
1197         Remove useless class specification.
1198         * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1199         to refer to the class name to use a type defined by the class for
1200         arguments of member functions.
1202 2008-11-13  Akim Demaille  <demaille@gostai.com>
1204         Finer input type for yytranslate.
1205         This patch is debatable: the tradition expects yylex to return an int
1206         which happens to correspond to token_number (which is an enum).  This
1207         allows for instance to return characters (such as '*' etc.).  But this
1208         goes against the stronger typing I am trying to have with the new
1209         lex interface which return a symbol_type.  So in this case, feed
1210         yytranslate_ with a token_type.
1212         * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1213         expect a token_type.
1215 2008-11-13  Akim Demaille  <demaille@gostai.com>
1217         Honor lex-params in %define lex_symbol mode.
1218         * data/lalr1.cc: Use b4_lex_param.
1220 2008-11-13  Akim Demaille  <demaille@gostai.com>
1222         Simplify names.
1223         * src/output.c (symbol_definitions_output): Rename symbol
1224         attributes type_name and has_type_name as type and has_type.
1225         * data/lalr1.cc: Adjust uses.
1227 2008-11-13  Akim Demaille  <demaille@gostai.com>
1229         Use b4_type_names for the union type.
1230         The union used to compute the size of the variant used to iterate
1231         over the type of all the symbols, with a lot of redundancy.  Now
1232         iterate over the lists of symbols having the same type-name.
1234         * data/lalr1.cc (b4_char_sizeof_): New.
1235         (b4_char_sizeof): Use it.
1236         Adjust to be called with a list of numbers instead of a single
1237         number.
1238         Adjust its caller for new-line issues.
1240 2008-11-13  Akim Demaille  <demaille@gostai.com>
1242         Define the "identifier" of a symbol.
1243         Symbols may have several string representations, for instance if
1244         they have an alias.  What I call its "id" is a string that can be
1245         used as an identifier.  May not exist.
1247         Currently the symbols which have the "tag_is_id" flag set are
1248         those that don't have an alias.  Look harder for the id.
1250         * src/output.c (is_identifier): Move to...
1251         * src/symtab.c (is_identifier): here.
1252         * src/symtab.h, src/symtab.c (symbol_id_get): New.
1253         * src/output.c (symbol_definitions_output): Use it to define "id"
1254         and "has_id".
1255         Remove the definition of "tag_is_id".
1256         * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1257         "tag_is_id" were used to produce code.
1258         We still use "tag" for documentation.
1260 2008-11-11  Akim Demaille  <demaille@gostai.com>
1262         Locations are no longer required by lalr1.cc.
1263         * data/lalr1.cc (_b4_args, b4_args): New.
1264         Adjust all uses of locations to make them optional.
1265         * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1266         (AT_CHECK_NAMESPACE): Check the use of locations.
1267         * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1268         without locations with lalr1.cc.
1269         Test these cases.
1270         * tests/output.at: Check lalr1.cc with and without location
1271         support.
1272         * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1273         Don't use locations.
1275 2008-11-11  Akim Demaille  <demaille@gostai.com>
1277         AT_FULL_COMPILE.
1278         * tests/local.at (AT_FULL_COMPILE): New.
1279         * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1281 2008-11-11  Akim Demaille  <demaille@gostai.com>
1283         Support parens in calc++.
1284         * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1285         * examples/calc++/test (run): Check the expected output.
1286         Adjust callers.
1287         Check parens too.
1289 2008-11-11  Akim Demaille  <demaille@gostai.com>
1291         Simplify lalr1.cc since %defines is mandatory.
1292         * data/lalr1.cc: Remove useless calls to b4_defines_if.
1294 2008-11-11  Akim Demaille  <demaille@gostai.com>
1296         TODO: yyfmt.
1297         * TODO (yysyntax_error): New item.
1299 2008-11-11  Akim Demaille  <demaille@gostai.com>
1301         Prefer M4 to CPP.
1302         * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1303         YYERROR_VERBOSE.
1305 2008-11-11  Akim Demaille  <demaille@gostai.com>
1307         Support i18n of the parse error messages.
1308         * TODO (lalr1.cc/I18n): Remove.
1309         * data/lalr1.cc (yysyntax_error_): Support the translation of the
1310         error messages, as done in yacc.c.
1311         Stay within the yy* pseudo namespace.
1313 2008-11-11  Akim Demaille  <demaille@gostai.com>
1315         More TODO.
1316         * TODO (single stack, yysyntax_error): New.
1318 2008-11-11  Akim Demaille  <demaille@gostai.com>
1320         Make it possible to return a symbol_type from yylex.
1321         * data/lalr1.cc (b4_lex_symbol_if): New.
1322         (parse): When lex_symbol is defined, expected yylex to return the
1323         complete lookahead.
1324         * etc/bench.pl.in (generate_grammar_list): Extend to support this
1325         yylex interface.
1326         (bench_variant_parser): Exercise it.
1328 2008-11-11  Akim Demaille  <demaille@gostai.com>
1330         Remove useless bench case.
1331         * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1332         no longer used.
1334 2008-11-11  Akim Demaille  <demaille@gostai.com>
1336         Improve display of directives.
1337         * etc/bench.pl.in (parse_term): Don't add useless eol.
1339 2008-11-11  Akim Demaille  <demaille@gostai.com>
1341         Use string_cast in the bench.
1342         * etc/bench.pl.in (generate_grammar_list): Define and use
1343         string_cast.
1345 2008-11-11  Akim Demaille  <demaille@gostai.com>
1347         Replace yychar with a Boolean.
1348         * data/lalr1.cc (parse::yychar): Replace by...
1349         (parse::yyempty): this.
1351 2008-11-11  Akim Demaille  <demaille@gostai.com>
1353         Factor the tables.
1354         * TODO: New item.
1356 2008-11-11  Akim Demaille  <demaille@gostai.com>
1358         Let yytranslate handle the eof case.
1359         * data/lalr1.cc (yytranslate_): Handle the EOF case.
1360         Adjust callers.
1361         No longer expect yychar to be equal to yyeof_, rather, test the
1362         lookahead's (translated) kind.
1364 2008-11-11  Akim Demaille  <demaille@gostai.com>
1366         yychar cannot be empty in yyerrlab.
1367         * TODO (yychar == yyempty_): New.
1368         * data/lalr1.cc: Remove the handling of this case.
1369         This eases forthcoming changes related to yychar and yytranslate.
1371 2008-11-11  Akim Demaille  <demaille@gostai.com>
1373         Bench: syntactic sugar for %define/#define.
1374         * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1375         (&bench_push_parser, bench_variant_parser): Use this feature.
1376         (&eat): New.
1377         Use it.
1379 2008-11-11  Akim Demaille  <demaille@gostai.com>
1381         Less memory pressure on the "list" bench.
1382         * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1383         the values, to limit memory pressure.
1385 2008-11-11  Akim Demaille  <demaille@gostai.com>
1387         Introduce make_symbol.
1388         make_symbol provides a means to construct a full symbol (kind,
1389         value, location) in a single shot.  It is meant to be a Symbol
1390         constructor, parameterized by the symbol kind so that overloading
1391         would prevent incorrect kind/value pairs.  Unfortunately
1392         parameterized constructors do not work well in C++ (unless the
1393         parameter also appears as an argument, which is not acceptable),
1394         hence the use of a function instead of a constructor.
1396         * data/lalr1.cc (b4_symbol_constructor_declaration_)
1397         (b4_symbol_constructor_declarations)
1398         (b4_symbol_constructor_specialization_)
1399         (b4_symbol_constructor_specializations)
1400         (b4_symbol_constructor_definition_)
1401         (b4_symbol_constructor_definitions): New.
1402         Use them where appropriate to generate declaration, declaration of
1403         the specializations, and implementations of the templated
1404         overloaded function "make_symbol".
1405         (variant::variant): Always define a default ctor.
1406         Also provide a copy ctor.
1407         (symbol_base_type, symbol_type): New ctor overloads for value-less
1408         symbols.
1409         (symbol_type): Now public, so that functions such as yylex can use
1410         it.
1412 2008-11-11  Akim Demaille  <demaille@gostai.com>
1414         Inform m4 whether a tag is a valid id.
1415         * src/output.c (is_identifier): New.
1416         (symbol_definitions_output): Use it to define tag_is_id.
1417         But maybe this should be done at m4 level?
1419 2008-11-11  Akim Demaille  <demaille@gostai.com>
1421         Test 214 was failing: it greps with a pattern containing [     ]*
1422         which obviously meant to catch spaces and tabs, but contained only
1423         spaces. Tabulations in sources are a nuisance, so to simplify the
1424         matter, get rid of all the tabulations in the Java sources.  The
1425         other skeletons will be treated equally later.
1427         * data/java.m4, data/lalr1.java: Untabify.
1428         * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1429         tabulations are no longer generated.
1431 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
1433         * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1434         * configure.ac: Adjust usage.
1435         * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1436         * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1437         * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1439 2008-11-10  Di-an Jan  <dianj@freeshell.org>
1441         Workaround Java's ``code too large'' problem for parser tables
1442         in most cases, by using one function per initialization.
1443         * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1444         * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1445         yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1446         yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1447         (yytname_): Use b4_typed_parser_table.
1448         * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1449         ``code too large'' error.
1451 2008-11-10  Di-an Jan  <dianj@freeshell.org>
1453         * NEWS: Document them.
1455         General Java skeleton improvements.
1456         * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1457         using gcj < 4.3 in the testsuite, according to comments in
1458         gnulib/m4/javacomp.m4.
1459         * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1460         location_type, position_type): Remove extraneous brackets from
1461         b4_percent_define_default.
1462         (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1463         m4_define and m4_define_default.
1464         * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1465         which marks the end of user code with appropriate syncline, like all
1466         the other skeletons.
1467         (b4_user_post_prologue): Add.  Don't silently drop.
1468         (yylex): Remove.
1469         (parse): Inline yylex.
1470         * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1471         (%{...%}): Fix typo of %code imports.
1472         * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1474         Support annotations on parser class with %define annotations.
1475         * data/lalr1.java (annotations): Add to parser class modifier.
1476         * doc/bison.texinfo (Java Parser Interface): Document
1477         %define annotations.
1478         (Java Declarations Summary): Document %define annotations.
1479         * tests/java.at (Java parser class modifiers): Test annotations.
1481         Do not generate code for %error-verbose unless requested.
1482         * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1483         Make private.  Make conditional on %error-verbose.
1484         (getErrorVerbose, setErrorVerbose): New.
1485         (yytnamerr_): Make conditional on %error-verbose.
1486         (yysyntax_error): Make some code conditional on %error-verbose.
1487         * doc/bison.texinfo (Java Bison Interface): Remove the parts
1488         about %error-verbose having no effect.
1489         (getErrorVerbose, setErrorVerbose): Document.
1491         Move constants for token names to Lexer interface.
1492         * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1493         * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1494         (parse): Qualify EOF to Lexer.EOF.
1495         * doc/bison.texinfo (Java Parser Interface): Move documentation of
1496         EOF and token names to Java Lexer Interface.
1497         * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1499         Make yyerror public.
1500         * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1501         (yyerror): Change to public.  Add Javadoc comments.  Use longer
1502         parameter names.  Make the body rather than the declarator
1503         conditional on %locations.
1504         * doc/bison.texinfo (yyerror): Document.  Don't mark as protected.
1506         Allow user to add code to the constructor with %code init.
1507         * data/java.m4 (b4_init_throws): New, for %define init_throws.
1508         * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1509         Add %code init to the front of the constructor body.
1510         * doc/bison.texinfo (YYParser.YYParser): Document %code init
1511         and %define init_throws.
1512         (Java Declarations Summary): Document %code init and
1513         %define init_throws.
1514         * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1515         (Java constructor init and init_throws): Add tests.
1517 2008-11-10  Akim Demaille  <demaille@gostai.com>
1519         Update TODO.
1520         * TODO (-D): is implemented.
1521         (associativity): Same precedence must have the same associativity.
1522         For instance, how can a * b / c be parsed if * is %left and / is
1523         %right?
1524         (YYERRORCODE, YYFAIL, YYBACKUP): New.
1526 2008-11-10  Akim Demaille  <demaille@gostai.com>
1528         Formatting changes.
1530 2008-11-10  Akim Demaille  <demaille@gostai.com>
1532         More information about the symbols.
1533         * src/output.c (type_names_output): Document all the symbols,
1534         including those that don't have a type-name.
1535         (symbol_definitions_output): Define "is_token" and
1536         "has_type_name".
1537         * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1538         type-name, now that they are defined too in b4_type_names.
1540 2008-11-10  Akim Demaille  <demaille@gostai.com>
1542         Regen.
1544 2008-11-10  Akim Demaille  <demaille@gostai.com>
1546         Make parser::yytranslate static.
1547         Small speedup (1%) on the list grammar.  And makes yytranslate_
1548         available in non member functions.
1550         * data/lalr1.cc (yytranslate_): Does not need to be a instance
1551         function.
1553 2008-11-10  Akim Demaille  <demaille@gostai.com>
1555         Avoid trailing spaces.
1556         * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1557         * data/lalr1.cc: Don't indent before rule and symbol actions, as
1558         they can be empty, and anyway this incorrectly indents the first
1559         action.
1561 2008-11-10  Akim Demaille  <demaille@gostai.com>
1563         Comment changes.
1565 2008-11-10  Akim Demaille  <demaille@gostai.com>
1567         Use "enum" for integral constants.
1568         This is just nicer to read, I observed no speedup.
1570         * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1571         (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1572         (yyuser_token_number_max_, yyundef_token_): Move into...
1573         (yytranslate_): here.
1575 2008-11-10  Akim Demaille  <demaille@gostai.com>
1577         Shortcuts in bench directives.
1578         * etc/bench.pl.in (parse_dirs): New.
1579         Use it.
1580         (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1581         Create the benches in "benches/".
1583 2008-11-10  Akim Demaille  <demaille@gostai.com>
1585         Formatting changes.
1586         * data/lalr1.cc: here.
1588 2008-11-10  Akim Demaille  <demaille@gostai.com>
1590         Adjust verbose message to using emacs.
1591         * etc/bench.pl.in: Inform compilation-mode when we change the
1592         directory.
1593         (generate_grammar_list): Recognize %define "variant" in addition
1594         to %define variant.
1596 2008-11-10  Akim Demaille  <demaille@gostai.com>
1598         Classify symbols by type-name.
1599         * src/uniqstr.h (UNIQSTR_CMP): New.
1600         * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1601         (type_names_output): New.
1602         (muscles_output): Use it.
1603         * data/lalr1.cc (b4_symbol_action_): Remove.
1604         (b4_symbol_case_, b4_type_action_): New.
1605         Adjust uses of b4_symbol_action_ to use b4_type_action_.
1607 2008-11-10  Akim Demaille  <demaille@gostai.com>
1609         Change the handling of the symbols in the skeletons.
1610         Before we were using tables which lines were the symbols and which
1611         columns were things like number, tag, type-name etc.  It is was
1612         difficult to extend: each time a column was added, all the numbers had
1613         to be updated (you asked for colon $2, not for "tag").  Also, it was
1614         hard to filter these tables when only a subset of the symbols (say the
1615         tokens, or the nterms, or the tokens that have and external number
1616         *and* a type-name) was of interest.
1618         Now instead of monolithic tables, we define one macro per cell.  For
1619         instance "b4_symbol(0, tag)" is a macro name which contents is
1620         self-decriptive.  The macro "b4_symbol" provides easier access to
1621         these cells.
1623         * src/output.c (type_names_output): Remove.
1624         (symbol_numbers_output, symbol_definitions_output): New.
1625         (muscles_output): Call them.
1626         (prepare_symbols): Define b4_symbols_number.
1628 2008-11-10  Akim Demaille  <demaille@gostai.com>
1630         --trace=muscles
1631         * src/getargs.h, src/getargs.c (trace_muscle): New.
1632         (trace_types, trace_args): Support it.
1633         * src/output.c (output_skeleton): Use it.
1635 2008-11-10  Akim Demaille  <demaille@gostai.com>
1637         muscles_output.
1638         * src/output.c (muscles_output): New, extracted from...
1639         (output_skeleton): here.
1640         Adjust.
1642 2008-11-10  Akim Demaille  <demaille@gostai.com>
1644         Formatting changes.
1646 2008-11-10  Akim Demaille  <demaille@gostai.com>
1648         Update the variant example.
1649         * examples/variant.yy: Formatting changes.
1650         One stage build.
1652 2008-11-10  Akim Demaille  <demaille@gostai.com>
1654         Support constructor with an argument.
1655         This improves the "list" bench by 2%.
1657         * data/lalr1.cc (variant::build): Add an overloaded version with
1658         an argument.
1659         * tests/c++.at (AT_CHECK_VARIANT): Check it.
1661 2008-11-10  Akim Demaille  <demaille@gostai.com>
1663         Test variants.
1664         * tests/c++.at (AT_CHECK_VARIANTS): New.
1665         Use it with and without %define assert.
1667 2008-11-10  Akim Demaille  <demaille@gostai.com>
1669         Add %precedence support.
1670         Unfortunately it is not possible to reuse the %prec directive.  This
1671         is because to please POSIX, we do not require to end the rules with a
1672         semicolon.  As a result,
1674         foo: bar %prec baz
1676         is ambiguous: either a rule which precedence is that of baz, or a rule,
1677         and then a declaration of the precedence of the token baz.
1679         * doc/bison.texinfo: Document %precedence.
1680         (Precedence Only): New.
1681         * src/assoc.h, src/assoc.c (precedence_assoc): New.
1682         * src/conflicts.c (resolve_sr_conflict): Support it.
1683         * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1684         Parse it.
1685         * tests/calc.at: Use %precedence for NEG.
1686         * tests/conflicts.at (%precedence does not suffice)
1687         (%precedence suffices): New tests.
1689 2008-11-09  Akim Demaille  <demaille@gostai.com>
1691         Make benches in a sub dirs.
1692         * etc/bench.pl.in ($dir): New.
1693         Use it.
1694         Check the use of constructors with an argument.
1695         (bench_variant_parser): Fix.
1697 2008-11-09  Akim Demaille  <demaille@gostai.com>
1699         fix eof condition
1701 2008-11-09  Akim Demaille  <demaille@gostai.com>
1703         Fix --help.
1705 2008-11-09  Akim Demaille  <demaille@gostai.com>
1707         Require the generation of parse-gram.output.
1708         * src/Makefile.am (YACC): Pass --report=all.
1710 2008-11-09  Akim Demaille  <demaille@gostai.com>
1712         Formatting changes.
1714 2008-11-09  Akim Demaille  <demaille@gostai.com>
1716         Update TODO.
1717         * TODO: Remove obsolete items.
1718         Update others.
1720 2008-11-09  Akim Demaille  <demaille@gostai.com>
1722         Enhance bench.pl.
1723         * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1724         (@token, $grammar, $bench): New.
1725         (generate_grammar_variant): Rename as...
1726         (generate_grammar_list): this.
1727         (generate_grammar): Adjust.
1728         (bench_grammar): Rename as...
1729         (bench): this.
1730         Use it in the various bench-marking routines.
1731         (-b, -g): New options.
1733 2008-11-09  Akim Demaille  <demaille@gostai.com>
1735         Use a static hierarchy for symbols in the C++ parser.
1736         * data/lalr1.cc (symbol_base_type, symbol_type)
1737         (stack_symbol_type): Make it a static hierarchy.
1738         Adjust dependencies.
1740 2008-11-09  Akim Demaille  <demaille@gostai.com>
1742         bench.pl -d, --directive.
1743         * etc/bench.pl.in (@directive): New.
1744         (&bench_grammar): Use it.
1745         (&bench_list_grammar): New, to provide access to the "variant"
1746         grammar.
1747         Use it.
1748         (getopts): Support -d, --directive.
1750 2008-11-09  Akim Demaille  <demaille@gostai.com>
1752         Use inline for small operations.
1753         * data/lalr1.cc (symbol_base_type, symbol_type)
1754         (stack_symbol_type): Declare constructor and other operations as
1755         inline.
1756         (yy_destroy_): Inline.
1758 2008-11-09  Akim Demaille  <demaille@gostai.com>
1760         Introduce a hierarchy for symbols.
1761         * data/lalr1.cc (symbol_base_type, symbol_type): New.
1762         (data_type): Rename as...
1763         (stack_symbol_type): this.
1764         Derive from symbol_base_type.
1765         (yy_symbol_value_print_): Merge into...
1766         (yy_symbol_print_): this.
1767         Rename as...
1768         (yy_print_): this.
1769         (yydestruct_): Rename as...
1770         (yy_destroy_): this.
1771         (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1772         (parser::parse): yyla is now of symbol_type.
1773         Use its type member instead of yytoken.
1775 2008-11-09  Akim Demaille  <demaille@gostai.com>
1777         Rename data_type and stack_symbol_type.
1778         * data/lalr1.cc (data_type): Rename as...
1779         (stack_symbol_type): this.
1781 2008-11-09  Akim Demaille  <demaille@gostai.com>
1783         Handle semantic value and location together.
1784         * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1785         yydata.value and yydata.location.
1786         (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1787         (YY_SYMBOL_PRINT): Now take semantic value and location as a
1788         single arg.
1789         Adjust all callers.
1790         (yydestruct_): New overload for a stack symbol.
1792 2008-11-09  Akim Demaille  <demaille@gostai.com>
1794         Push a complete symbol, not connected parts.
1795         * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1796         state, value and location.
1797         Adjust callers.
1799 2008-11-09  Akim Demaille  <demaille@gostai.com>
1801         Agregate yylval and yylloc.
1802         * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1803         (parser::yyla): this.
1805 2008-11-09  Akim Demaille  <demaille@gostai.com>
1807         Rely on the state stack to display reduction traces.
1808         To display rhs symbols before a reduction, we used information
1809         about the rule reduced, which required the tables yyrhs and
1810         yyprhs.  Now use rely only on the state stack to get the same
1811         information.
1813         * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1814         Use them.
1815         (parser::yyrhs_, parser::yyprhs_): Remove.
1816         (parser::yy_reduce_print_): Use the state stack.
1818 2008-11-09  Akim Demaille  <demaille@gostai.com>
1820         Fuse yyval and yyloc into yylhs.
1821         * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1822         yylhs.
1823         (parse): Replace yyval and yyloc with yylhs.value and
1824         yylhs.location.
1825         After a user action, compute yylhs.state earlier.
1826         (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1827         fresh error_token.
1829 2008-11-09  Di-an Jan  <dianj@freeshell.org>
1831         Remove unused variable.
1832         * src/output.c (type_names_output): Remove unused variable sep.
1834 2008-11-09  Paolo Bonzini  <bonzini@gnu.org>
1836         Change tests/output.at quoting.
1837         * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1838         expanding arguments.
1840 2008-11-07  Joel E. Denny  <jdenny@ces.clemson.edu>
1842         Don't add a semicolon to actions for %skeleton or %language.
1843         It breaks Java test cases as reported by Akim Demaille.
1844         * src/scan-code.l: Implement.
1846 2008-11-07  Joel E. Denny  <jdenny@ces.clemson.edu>
1848         Clean up %skeleton and %language priority implementation.
1849         * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1850         remove static qualifier because others will soon need to see it.
1851         (language_prio): Likewise.
1852         (getargs): Use command_line_prio rather than 0.
1853         * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1854         enum fields.
1855         (skeleton_prio): Extern it.
1856         (language_prio): Extern it.
1857         * src/parse-gram.y: Use grammar_prio rather than 1.
1859 2008-11-07  Akim Demaille  <demaille@gostai.com>
1861         Moving push traces into yypush_.
1862         * data/lalr1.cc (yypush_): Now takes a optional trace message.
1863         Adjust all uses.
1865 2008-11-07  Akim Demaille  <demaille@gostai.com>
1867         The single-stack C++ parser is now the standard one.
1868         * data/lalr1.cc: Rename as...
1869         * data/lalr1-split.cc: this.
1870         * data/lalr1-fusion.cc: Rename as...
1871         * data/lalr1.cc: this.
1872         * etc/bench.pl.in: Adjust.
1874 2008-11-07  Akim Demaille  <demaille@gostai.com>
1876         Avoid empty-if warnings.
1877         Reported by Quentin Hocquet.
1879         * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1880         (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1882 2008-11-07  Akim Demaille  <demaille@gostai.com>
1884         Pass command line location to skeleton_arg and language_argmatch.
1885         * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1886         The location argument is now mandatory.
1887         Adjust all dependencies.
1888         (getargs): Use command_line_location.
1890 2008-11-07  Akim Demaille  <demaille@gostai.com>
1892         -D, --define.
1893         * src/getargs.c (usage): Document -D.
1894         Fix help string for --locations.
1895         (command_line_location): New.
1896         (short_options, long_options, getargs): Support -D, --define.
1897         (getargs): Move -d support at the right place.
1898         * doc/bison.texinfo (Bison Options): Update.
1899         * tests/input.at (%define, --define): New.
1901 2008-11-07  Akim Demaille  <demaille@gostai.com>
1903         Initialize the muscle table before parsing the command line.
1904         * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1905         (getargs): Define file_name.
1906         * src/main.c (main): Initialize muscle_tab before calling
1907         getargs.
1908         * src/muscle_tab.c (muscle_init): No longer define file_name, as
1909         its value is not available yet.
1911 2008-11-07  Akim Demaille  <demaille@gostai.com>
1913         Locations without columns for command line arguments.
1914         * src/location.c (location_print): Don't display negative columns.
1915         * src/location.h: Document this.
1917 2008-11-07  Akim Demaille  <demaille@gostai.com>
1919         Fix --help.
1920         * src/getargs.c (usage): Fix help string for -W.
1922 2008-11-07  Akim Demaille  <demaille@gostai.com>
1924         Handle more general types of option arguments.
1925         * build-aux/cross-options.pl: The argument ends at the first
1926         space, not the first non-symbol character.
1927         Use @var for each word appearing the argument description.
1929 2008-11-07  Akim Demaille  <demaille@gostai.com>
1931         Destroy the variants that remain on the stack in case of error.
1932         * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1933         destructor.
1934         Display the value only if yymsg is nonnull.
1935         (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1937 2008-11-07  Akim Demaille  <demaille@gostai.com>
1939         Add "%define assert" to variants.
1940         This is used to help the user catch cases where some value gets
1941         ovewritten by a new one.  This should not happen, as this will
1942         probably leak.
1944         Unfortunately this uncovered a bug in the C++ parser itself: the
1945         lookahead value was not destroyed between two calls to yylex.  For
1946         instance if the previous lookahead was a std::string, and then an int,
1947         then the value of the std::string was correctly taken (i.e., the
1948         lookahead was now an empty string), but std::string structure itself
1949         was not reclaimed.
1951         This is now done in variant::build(other&) (which is used to take the
1952         value of the lookahead): other is not only stolen from its value, it
1953         is also destroyed.  This incurs a new performance penalty of a few
1954         percent, and union becomes faster again.
1956         * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1957         (b4_variant_if): New.
1958         (variant::built): New.
1959         Use it whereever the status of the variant changes.
1960         * etc/bench.pl.in: Check the penalty of %define assert.
1962 2008-11-07  Akim Demaille  <demaille@gostai.com>
1964         Use "%define variant" in bench.pl.
1965         * etc/bench.pl.in: No longer use the pseudo directive %variants,
1966         just use %define variants.
1968 2008-11-07  Akim Demaille  <demaille@gostai.com>
1970         Regen.
1971         * src/parse-gram.h, src/parse-gram.c: Regen.
1973 2008-11-04  Joel E. Denny  <jdenny@ces.clemson.edu>
1975         Fix user actions without a trailing semicolon.
1976         Reported by Sergei Steshenko at
1977         <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1978         * THANKS (Sergei Steshenko): Add.
1979         * src/scan-code.l (SC_RULE_ACTION): Fix it.
1980         * tests/regression.at (Fix user actions without a trailing semicolon):
1981         New test case.
1983 2008-11-04  Akim Demaille  <demaille@gostai.com>
1985         Use b4_copyright_years.
1986         * data/yacc.c (b4_copyright_years): New.
1987         Fix its value according to the comments in the file.
1988         Use it and undefine it.
1990 2008-11-04  Akim Demaille  <demaille@gostai.com>
1992         Formatting changes.
1993         * data/lalr1-fusion.cc, src/parse-gram.y: here.
1995 2008-11-04  Akim Demaille  <demaille@gostai.com>
1997         Formatting changes.
1998         * data/lalr1-fusion.cc: here.
2000 2008-11-04  Akim Demaille  <demaille@gostai.com>
2002         Use strict on bench.pl.
2003         * etc/bench.pl.in (&run, &generate_grammar): New.
2004         Rename the grammar generating functions for consistency.
2005         Change the interface so that the list of benches to run is passed
2006         as (optionless) arguments.
2007         (&compile): Use &run.
2009 2008-11-04  Akim Demaille  <demaille@gostai.com>
2011         Remove spurious initial empty lines.
2012         * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2013         * data/yacc.c: End the @output lines with an @.
2015 2008-11-04  Akim Demaille  <demaille@gostai.com>
2017         Improve the display of sizes.
2018         * etc/bench.p.in: Higher precision.
2019         Sort by decreasing size.
2021 2008-11-04  Akim Demaille  <demaille@gostai.com>
2023         Don't memcpy C++ structures.
2024         * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2025         arguments.
2026         (variant::build): New overload for
2027         copy-construction-that-destroys.
2028         (variant::swap): New.
2029         (parser::yypush_): Use it in variant mode.
2031 2008-11-04  Akim Demaille  <demaille@gostai.com>
2033         Better defaults for bench.pl.
2034         * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2035         default values.
2036         Adjust &verbose uses.
2037         (-q, --quiet): New.
2039 2008-11-04  Akim Demaille  <demaille@gostai.com>
2041         Make variant.yy more complex.
2042         std::list cannot be copied via memcpy, they are more demanding than
2043         std::string.  Use one std::list to strengthen the test.
2045         * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2046         Adjust.
2047         Create a list of strings, instead of a single large string.
2049 2008-11-04  Akim Demaille  <demaille@gostai.com>
2051         bench.pl --bench.
2052         * etc/bench.pl.in (--bench, $bench): New.
2054 2008-11-04  Akim Demaille  <demaille@gostai.com>
2056         Sort methods.
2057         * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2058         Define it after as().
2060 2008-11-04  Akim Demaille  <demaille@gostai.com>
2062         Useless parens.
2063         * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2065 2008-11-04  Akim Demaille  <demaille@gostai.com>
2067         Issue missing synclines after user actions.
2068         * data/c.m4 (b4_case): Issue synclines on the output file.
2070 2008-11-04  Akim Demaille  <demaille@gostai.com>
2072         Remove trailing empty line.
2073         * data/lalr1-fusion.cc: Don't add an empty line after the user's
2074         epilogue.
2076 2008-11-04  Akim Demaille  <demaille@gostai.com>
2078         Fix output of copyright years.
2079         * data/bison.m4 (b4_copyright): Fix the indentation of the
2080         copyright year paragraph.
2081         Use b4_copyright_years when no years are given.
2082         * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2083         (b4_copyright_years): New.
2084         Use it.
2086 2008-11-04  Akim Demaille  <demaille@gostai.com>
2088         Avoid the spurious initial empty line.
2089         * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2090         the end of @output request to suppress the empty line that
2091         results.
2093 2008-11-04  Akim Demaille  <demaille@gostai.com>
2095         Remove parser::rhs_number_type.
2096         * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2097         (yyrhs_): Use b4_table_define.
2099 2008-11-04  Akim Demaille  <demaille@gostai.com>
2101         Fix iteration type.
2102         * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2104 2008-11-04  Akim Demaille  <demaille@gostai.com>
2106         Factor the declaration of the integer tables.
2107         * data/lalr1-fusion.cc (b4_table_define): New.
2108         Use it.
2110 2008-11-03  Akim Demaille  <demaille@gostai.com>
2112         Fix indentation of tables in lalr1.cc
2113         * data/lalr1-fusion.cc: Fix the indentation.
2115 2008-11-03  Akim Demaille  <demaille@gostai.com>
2117         Destroy the lhs symbols after reduction.
2118         * data/lalr1-fusion.cc (parse): After the user action, when in
2119         variant mode, destroy the lhs symbols.
2121 2008-11-03  Akim Demaille  <demaille@gostai.com>
2123         Simplify yysyntax_error_ use.
2124         * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2125         type, but make it unnamed in the declaration when it is not used.
2127 2008-11-03  Akim Demaille  <demaille@gostai.com>
2129         Let yy::variant::build return an lvalue.
2130         * data/lalr1-fusion.cc (variant::build): Return a reference to the
2131         object.
2133 2008-11-03  Akim Demaille  <demaille@gostai.com>
2135         Define yy::variant only when needed.
2136         * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2137         used.
2139 2008-11-03  Akim Demaille  <demaille@gostai.com>
2141         Bench the three-stack lalr1.cc.
2142         * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2143         one-stack one.
2145 2008-11-03  Akim Demaille  <demaille@gostai.com>
2147         Fail on parse error in calc++.
2148         * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2149         status.
2150         * examples/calc++/test ($me, $number, $exit, run): New.
2151         Use them to propagate errors to the exit status.
2153 2008-11-03  Akim Demaille  <demaille@gostai.com>
2155         Don't specify the skeleton twice in the example.
2156         * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2157         file does what is needed.
2159 2008-11-03  Akim Demaille  <demaille@gostai.com>
2161         bench: Improve output.
2162         * etc/bench.pl.in (bench_grammar): Tune the printf format.
2164 2008-11-03  Akim Demaille  <demaille@gostai.com>
2166         bench: check impact of %debug on variants.
2167         * etc/bench.pl.in (variant_grammar): Fix the computation of
2168         $variant.
2169         Generate a grammar file that can work with or without %debug.
2170         Do use the @directive.
2171         (bench_variant_parser): Check impact of %debug.
2172         (@directives): Rename all the occurrences to...
2173         (@directive): this, for consistency.
2175 2008-11-03  Akim Demaille  <demaille@gostai.com>
2177         bench: report the size too.
2178         * etc/bench.pl.in ($iterations): Defaults to -3.
2179         (&bench_grammar): Require hireswallclock.
2180         Compute and display the size of the result.
2181         More comments.
2183 2008-11-03  Akim Demaille  <demaille@gostai.com>
2185         bench: More use of the verbosity level.
2186         * etc/bench.pl.in ($verbose, &verbose): New.
2187         Use them.
2188         More POD documentation.
2190 2008-11-03  Akim Demaille  <demaille@gostai.com>
2192         bench.pl: a command line interface
2193         * etc/bench.pl.in: More doc.
2194         Some fixes in the documentation.
2195         ($cflags, $iterations, &help, &getopt): New.
2196         Use them.
2197         (&variant_grammar): Let the number of stages be 10 times what is
2198         specified.
2200 2008-11-03  Akim Demaille  <demaille@gostai.com>
2202         Bench the use of Boost.Variants.
2203         * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2204         New.
2205         (&compile): Be ready to compile C++ parsers.
2206         (&bench_push_parser): Move debug information to the outermost
2207         level.
2208         * THANKS: Add Michiel De Wilde.
2210 2008-11-03  Akim Demaille  <demaille@gostai.com>
2212         bench.pl: Pass directives as a list instead of as a string.
2213         * etc/bench.pl.in (&directives): New.
2214         (&triangular_grammar, &calc_grammar): Use it to format the Bison
2215         directives.
2216         (&triangular_grammar): Do use the directives (were ignored).
2217         (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2218         directives.
2220 2008-11-03  Akim Demaille  <demaille@gostai.com>
2222         Improve genericity of bench.pl.
2223         * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2224         argument.
2225         (&bench_push_parser): New.
2226         Call it.
2228 2008-11-03  Akim Demaille  <demaille@gostai.com>
2230         Add documentation to bench.pl.
2231         * etc/bench.pl.in: Comment changes.
2233 2008-11-03  Akim Demaille  <demaille@gostai.com>
2235         Fuse the three stacks into a single one.
2237         In order to make it easy to perform benchmarks to ensure that
2238         there are no performance loss, lalr1.cc is forked into
2239         lalr1-fusion.cc.  Eventually, lalr1-fusion.cc will replace
2240         lalr1.cc.
2242         Meanwhile, to make sure that lalr1-fusion.cc is correctly
2243         exercized by the test suite, the user must install a symbolic link
2244         from lalr1.cc to it.
2246         Instead of having three stacks (state, value, location), use a
2247         stack of triples.  This considerably simplifies the code (and it
2248         will be easier not to require locations as currently does the C++
2249         parser), and also gives a 10% speedup according to
2250         etc/bench (probably mainly since memory allocation is done once
2251         instead of three times).
2253         Another motivation is to make it easier to destruct properly
2254         semantic values: now that they are bound to their state (hence
2255         symbol type) it will be easier to call the appropriate destructor.
2257         These changes should probably benefit the C parser too.
2259         * data/lalr1.cc: Copy as...
2260         * data/lalr1-fusion.cc: this new file.
2261         (b4_rhs_value, b4_rhs_location): New definitions overriding those
2262         from c++.m4.
2263         (state_stack_type, semantic_stack_type, location_stack_type)
2264         (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2265         (data_type, stack_type, yystack_): New.
2266         (YYLLOC_DEFAULT, yypush_): Adjust.
2267         (yyerror_range): Now based on data_type, not location_type.
2269 2008-11-03  Akim Demaille  <demaille@gostai.com>
2271         Push the state, value, and location at the same time.
2272         This is needed to prepare a forthcoming patch that fuses the three
2273         stacks into one.
2275         * data/lalr1.cc (parser::yypush_): New.
2276         (parser::yynewstate): Change the semantics: instead of arriving to
2277         this label when value and location have been pushed, but yystate
2278         is to be pushed on the state stack, now the three of them must
2279         have been pushed before.  yystate still must be the new state.
2280         This allows to use yypush_ everywhere instead of individual
2281         handling of the stacks.
2283 2008-11-03  Akim Demaille  <demaille@gostai.com>
2285         Prefer references to pointers.
2286         * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2287         definition to use references instead of pointers.
2288         (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2289         Take the value and location as references.
2290         Adjust callers.
2292 2008-11-03  Akim Demaille  <demaille@gostai.com>
2294         stack::size instead of stack::height.
2295         * data/lalr1.cc (stack::height): Rename as...
2296         (stack::size): this.
2297         Fix the output type.
2298         Comment changes.
2300 2008-11-03  Akim Demaille  <demaille@gostai.com>
2302         Use variants to support objects as semantic values.
2303         This patch was inspired by work by Michiel De Wilde.  But he used
2304         Boost variants which (i) requires Boost on the user side, (ii) is
2305         slow, and (iii) has useless overhead (the parser knows the type of
2306         the semantic value there is no reason to duplicate this
2307         information as Boost.Variants do).
2309         This implementation reserves a buffer large enough to store the
2310         largest objects.  yy::variant implements this buffer.  It was
2311         implemented with Quentin Hocquet.
2313         * src/output.c (type_names_output): New.
2314         (output_skeleton): Invoke it.
2315         * data/c++.m4 (b4_variant_if): New.
2316         (b4_symbol_value): If needed, provide a definition for variants.
2317         * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2318         (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2319         (b4_char_sizeof, yy::variant): New.
2320         (parser::parse): If variants are requested, define
2321         parser::union_type, parser::variant, change the definition of
2322         semantic_type, construct $$ before running the user action instead
2323         of performing a default $$ = $1.
2324         * examples/variant.yy: New.
2325         Based on an example by Michiel De Wilde.
2327 2008-11-03  Akim Demaille  <demaille@gostai.com>
2329         Parameterize the extraction of semantic values.
2330         To make future changes easier, no longer rely on ".TYPE" being the
2331         way to get a semantic value.
2333         * data/c.m4 (b4_symbol_value): New.
2334         Use it.
2335         * data/c++.m4, data/yacc.c: Use it.
2336         * data/glr.c: Use b4_symbol_value.
2337         (b4_rhs_data): New.
2338         Use it.
2340 2008-11-03  Akim Demaille  <demaille@gostai.com>
2342         Prepare easier M4 changes.
2343         * data/lalr1.cc: Use escaped [] instead of literals to prepare
2344         future changes.
2346 2008-11-02  Joel E. Denny  <jdenny@ces.clemson.edu>
2348         Initiate further development.
2349         * NEWS: Create an empty section for new entries.
2350         * gnulib: Update submodule to HEAD.
2352 2008-11-02  Joel E. Denny  <jdenny@ces.clemson.edu>
2354         * NEWS: Version 2.4.
2356 2008-11-02  Joel E. Denny  <jdenny@ces.clemson.edu>
2358         Prepare for next release.
2359         * NEWS: Briefly mention changes since 2.3b.
2360         * README: Say GNU m4 1.4.6, which we've been requiring in release
2361         announcements already, not 1.4.3, which breaks the build.
2363 2008-11-02  Joel E. Denny  <jdenny@ces.clemson.edu>
2365         Say %language is experimental.
2366         We're thinking of extending it's effect on output file naming.  See the
2367         thread at
2368         <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2369         * NEWS: Say it's experimental.
2370         * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2371         recommend it over %skeleton for now.
2372         (Bison Options): Likewise.
2373         (C++ Bison Interface): Use %skeleton not %language.
2374         (Calc++ Parser): Use %skeleton not %language.
2375         * src/getargs.c (usage): Say it's experimental.
2377 2008-11-01  Di-an Jan  <dianj@freeshell.org>
2378             Paolo Bonzini  <bonzini@gnu.org>
2380         Support all Java parser class modifiers.
2381         * data/java.m4 (b4_percent_define_get3): New.
2382         (b4_final_if, b4_strictfp_if): New.
2383         * data/lalr1.java (final, strictfp, extends, implements): Support.
2384         * doc/bison.texinfo (final, strictfp, extends, implements): Add
2385         documentation.
2386         * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2387         (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2388         (AT_CHECK_JAVA_GREP): New.
2389         (Java parser class modifiers): New test.
2390         (Java parser class extends and implements): New test.
2392         Model exception propagation better with throws and lex_throws.
2393         * data/java.m4 (b4_list2): New.
2394         (throws): Change default.
2395         * data/lalr1.java (yyaction): Add throws.
2396         (parse): Add lex_throws in addition to throws.
2397         * doc/bison.texinfo (throws, lex_throws): Add documentation.
2398         * tests/java.at (Java throws specifications): New test.
2400         Improve documentation for Java parsers.
2401         * doc/bison.texinfo (Java Parsers): Add subsections.
2402         Don't quote first argument of %define.
2403         (Java Bison Interface): Document output files.  Move documentation
2404         of parser class and merge into Java Parser Interface.  Document
2405         features that error out.  Document directives with no effect.
2406         Move note about Javadoc higher.
2407         (Java Semantic Values): Explicitly mention stype.
2408         Document that generic types cannot be used.
2409         (Java Location Values): Use @deftypeivar.  Document constructors.
2410         Correct return value for toString.
2411         (Java Parser Interface): List undocumented constants/fields.
2412         Move documentation of fields added by %parse-param closer to list
2413         of members.  Document that token names are added as fields.
2414         Document constructors accurately.  Remove error method.
2415         (Java Scanner Interface): Move note on %pure-parser to Java Bison
2416         Interface.  Describe %code lexer and yylex accutately.
2417         Remove documentation that does not match the code.
2418         (Java Action Features): New.
2419         (Java Differences): Add reference.  Add item on semantic values.
2420         Add note about @{ ... @}.  Clarify %% epilogue placement.
2421         (Java Declarations Summary): New.
2423         Fix Java skeleton.
2424         * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2425         (b4_remove_comma): Quote test argument.
2426         (b4_identification): Remove "bison" field.
2427         * tests/java.at (Java parser class and package names): New test.
2428         (Java %parse-param and %lex-param): New test.
2429         (Java stype, position_class and location_class): New test.
2431 2008-10-31  Di-an Jan  <dianj@freeshell.org>
2433         * data/lalr1.jave: Update copyright years.
2434         (YYParser): Correct name of "generated from" file in Javadoc:
2435         use b4_file_name instead of @ofile@.
2436         (Location constructor): Correct Javadoc parameter name.
2437         (yylloc): Add missing opening m4 quote after b4_location_if.
2438         This removes a stray [ in the Javadoc of Lexer.getStartPos.
2439         (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2440         (YYParser constructor): Correct Javadoc parameter name.
2442 2008-10-30  Joel E. Denny  <jdenny@ces.clemson.edu>
2444         Always put auxiliary code files in the same dir as other output files.
2445         * src/files.c (compute_file_name_parts): When the user specifies
2446         --output but not --file-prefix, extract the directory prefix from the
2447         file prefix not from the grammar file name.  This affects the location
2448         of files like location.hh generated by the C++ skeleton.  The includes
2449         in the other output files require this fix.
2450         * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2451         for expected output files.
2452         (Output files): Add a test for the above.
2454 2008-10-29  Joel E. Denny  <jdenny@ces.clemson.edu>
2456         * gnulib: Update submodule to HEAD.
2458 2008-10-28  Joel E. Denny  <jdenny@ces.clemson.edu>
2460         Update copyright year.
2461         * src/files.c: Here.
2463 2008-10-28  Di-an Jan  <dianj@freeshell.org>  (tiny change)
2465         Don't overwrite the input file.
2466         * src/files.c (output_file_name_check): Fatal error if using input file
2467         for output.
2468         * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2469         argument.
2470         (Conflicting output files): Add test.
2472 2008-10-28  Akim Demaille  <demaille@gostai.com>
2474         Space changes.
2475         * data/lalr1.cc: Formatting changes.
2477 2008-10-28  Akim Demaille  <demaille@gostai.com>
2479         Don't define debugging functions when !YYDEBUG.
2480         * data/lalr1.cc (debug_stream, set_debug_stream)
2481         (debug_level_type, debug_level, set_debug_level): Don't
2482         declare them when YYDEBUG is not defined.
2483         The implementation are already YYDEBUG-aware.
2485 2008-10-28  Akim Demaille  <demaille@gostai.com>
2487         Prefer "continue" for empty loop bodies.
2488         * etc/bench.pl.in: Use "continue" instead of {}.
2490 2008-10-28  Akim Demaille  <demaille@gostai.com>
2492         Space and comments changes.
2493         * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2494         * data/c.m4, data/lalr1.cc: Space changes.
2496 2008-10-28  Akim Demaille  <demaille@gostai.com>
2498         Make gnulib a submodule.
2499         * gnulib: New.
2500         * .gitmodules (gnulib): New.
2502 2008-10-18  Joel E. Denny  <jdenny@ces.clemson.edu>
2504         Fix yyerror_range for user-defined location type in C++.  Reported by
2505         Georg Sauthoff at
2506         <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2507         * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2508         * THANKS (Georg Sauthoff): Add.
2510 2008-10-18  Joel E. Denny  <jdenny@ces.clemson.edu>
2512         Update several administrative files mainly to facilitate releasing.
2513         * HACKING (Administrivia): Make the git-merge-changelog notes more
2514         helpful.
2515         (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2516         (Release Procedure): Update for git and add numerous details that were
2517         previously missing.
2518         * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2519         * maint.mk (announcement): Don't list bison as a bootstrap tool so
2520         that announcements don't claim we bootstrapped with whatever bison
2521         happened to be in PATH.  Add flex as a bootstrap tool.
2522         * Makefile.maint: Remove, previously replaced by maint.mk.
2523         * Makefile.cfg: Remove, and migrate settings to...
2524         * cfg.mk: ... here for the sake of `make announcement'.
2525         * bootstrap.conf (gnulib_modules): Add announce-gen.
2526         * README: Say GNU Bison instead of just Bison.  Suggested by Karl
2527         Berry.
2529 2008-10-08  Di-an Jan  <dianj@freeshell.org>  (tiny change)
2531         Small but important bugfixes for the Java skeleton.
2532         * data/lalr1.java (yyerror): Change Location to b4_location_type.
2533         (yy_symbol_print): Call toString on yyvaluep.
2535 2008-08-29  Akim Demaille  <demaille@gostai.com>
2537         Clarify UPDATED use.
2538         * doc/bison.texinfo: It refers to the last edition of this file,
2539         not to the release date of Bison.
2540         Reported by Joel E. Denny.
2542 2008-08-29  Akim Demaille  <demaille@gostai.com>
2544         * README: Update FAQ pointer.
2545         Reported by Joel E. Denny.
2547 2008-08-27  Eric Blake  <ebb9@byu.net>
2549         Resync m4sugar from autoconf.
2550         * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2551         (m4_init): Adjust to latest m4.git changes.
2552         (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2553         effects.
2554         * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2555         (_m4_list_cmp): Reduce side effects.
2557 2008-08-27  Akim Demaille  <demaille@gostai.com>
2559         Check yyerrok in calc.at.
2560         * tests/calc.at (calc.y): Use yyerrok on "( error )".
2561         (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2562         expected.
2564 2008-08-27  Akim Demaille  <demaille@gostai.com>
2566         Support yyerrok in lalr1.cc.
2567         YYBACKUP is still to import back into lalr1.cc.
2568         * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2570 2008-08-26  Joel E. Denny  <jdenny@ces.clemson.edu>
2572         For maintainer-check*, don't recompile for a $(VERSION) update.
2573         * cfg.mk: New file.
2574         (_is-dist-target): Override the one in GNUmakefile.
2575         * Makefile.am (EXTRA_DIST): Add cfg.mk.
2577 2008-08-26  Joel E. Denny  <jdenny@ces.clemson.edu>
2579         Update for recent change to gnulib.
2580         * src/parse-gram.y: Don't include strverscmp.h.  It comes from
2581         string.h now.
2583 2008-08-15  Eric Blake  <ebb9@byu.net>
2585         Remaining m4sugar merge from autoconf.
2586         * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2587         * data/m4sugar/foreach.m4: New file, copied from autoconf.
2588         * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2589         * src/output.c (output_skeleton): Tell m4 how to find it.
2591         Partial m4sugar merge from autoconf: m4_map.
2592         * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2593         (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2594         (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2595         * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2596         for empty list.
2597         * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2598         Likewise.
2599         (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2600         declares it.
2602 2008-08-07  Joel E. Denny  <jdenny@ces.clemson.edu>
2604         Keep .version and PACKAGE_VERSION in sync.
2605         * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2606         dependency, and add comments justifying this in more detail.  Discussed
2607         starting at
2608         <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2610 2008-08-06  Eric Blake  <ebb9@byu.net>
2612         Partial m4sugar merge from autoconf: m4_shiftn.
2613         * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2614         (m4_shift2, m4_shift3): New macros.
2615         (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2616         * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2617         (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2618         * data/java.m4 (b4_remove_comma): Likewise.
2620         Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2621         * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2622         (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2623         (m4_init): Consolidate wrapped text into single m4_wrap.
2624         * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2625         in wrapped text.
2627 2008-08-05  Eric Blake  <ebb9@byu.net>
2629         Partial m4sugar merge from autoconf: builtins, version.m4.
2630         * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2631         (m4_prepend): Remove, as it is unused and inherently quadratic,
2632         whereas m4_append is linear in newer m4.
2633         (m4_mkstemp): New builtin.
2634         (m4_symbols): Make rename conditional.
2635         (m4_version_prereq): Ensure fatal error if used in bison, which
2636         intentionally lacks version.m4.
2638         Fix comments in m4sugar.
2639         * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2641 2008-08-02  Joel E. Denny  <jdenny@ces.clemson.edu>
2643         Update for recent .gitignore fix in Gnulib.
2644         * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2645         anchored .gitignore entries.
2647 2008-08-02  Joel E. Denny  <jdenny@ces.clemson.edu>
2649         Set gnu or gnits strictness.
2650         * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2651         development and gnits strictness for releases.  Based on Eric Blake's
2652         suggestion at
2653         <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2655 2008-07-31  Paolo Bonzini  <bonzini@gnu.org>
2657         * NEWS: Clarify documentation of %language.
2659 2008-07-31  Paolo Bonzini  <bonzini@gnu.org>
2661         Support usage of git-merge-changelog.
2662         * .gitattributes: New.
2663         * HACKING: Document usage of git-merge-changelog.
2664         * bootstrap: Install git-merge-changelog entries in .git/config
2665         if appropriate.
2667 2008-07-27  Joel E. Denny  <jdenny@ces.clemson.edu>
2669         Remove remaining dependence on CVS Id keyword.
2670         * ChangeLog: For the sake of people still using CVS, don't use dollars
2671         when mentioning Id.
2672         * data/xslt/bison.xsl: Remove Id from header comments, where it was
2673         unusual anyway.
2674         * data/xslt/xml2dot.xsl: Likewise.
2675         * data/xslt/xml2text.xsl: Likewise.
2676         * data/xslt/xml2xhtml.xsl: Likewise.
2677         * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2678         * doc/Makefile.am (neutralize): Remove, no longer needed.
2679         (.x.1): Don't use neutralize.
2680         (edit): Don't substitute for ID.
2681         (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2683 2008-07-27  Joel E. Denny  <jdenny@ces.clemson.edu>
2685         Fix dependence on computed configure variables.
2686         * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2687         $(top_srcdir)/configure.ac so that changes to computed variables, such
2688         as PACKAGE_VERSION, are seen.
2689         * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2691 2008-07-20  Joel E. Denny  <jdenny@ces.clemson.edu>
2693         Update copyright dates for recent changes.
2694         * Makefile.am: Here.
2695         * src/Makefile.am: Here.
2696         * src/reduce.c: Here.
2697         * tests/reduce.at: Here.
2699 2008-07-18  Joel E. Denny  <jdenny@ces.clemson.edu>
2701         Use git-version-gen for version names between releases.
2702         * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2703         * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2704         * .prev-version: New.
2705         * .version.in: Remove.
2706         * ChangeLog: Remove the Id previously used for capturing the CVS
2707         revision.
2708         * GNUmakefile: Remove, now copied from Gnulib.
2709         * Makefile.am: Add code suggested by comments in
2710         build-aux/git-version-gen.
2711         (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib.  Add maint.mk,
2712         .prev-version, and .version.
2713         * NEWS (2.3b+): Rename to...
2714         (?.?): ... this because we're dropping the "+" version naming scheme,
2715         but, in general, we still can't be sure of our next release name.
2716         * bootstrap: Add a quick hack to remove from .gitignore the
2717         GNUmakefile entry that gnulib adds.  We already have a /GNUmakefile
2718         entry.  This should really be fixed in gnulib instead.
2719         * bootstrap.conf (gnulib_modules): Add gnumakefile.
2720         * configure.ac (AC_INIT): Set version name by invoking
2721         build-aux/git-version-gen.
2722         (AC_CONFIG_FILES): Remove .version, now generated by
2723         build-aux/git-version-gen.
2724         * maint.mk: New, copied from coreutils.
2725         * doc/.cvsignore (bison.1): Add.
2726         * doc/.gitignore (/bison.1): Add.
2727         * doc/bison.1: Remove, generated.
2728         * src/.cvsignore (revision.c): Remove.
2729         * src/.gitignore (/revision.c): Remove.
2730         * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2731         (BUILT_SOURCES): Remove revision.c.
2732         (revision.c): Remove.
2733         * src/getargs.c (version): Don't print revision after the VERSION.
2734         * src/revision.h: Remove.
2736 2008-07-16  Joel E. Denny  <jdenny@ces.clemson.edu>
2738         Fix untranslatable composition of sentences.  Reported by Goran
2739         Uddeborg at
2740         <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2741         * THANKS (Goran Uddeborg): Add.
2742         * src/reduce.c (reduce_print): Report the number of nonterminals and
2743         rules useless in the grammar in separate sentences.
2744         * tests/reduce.at (Useless Rules): Update output.
2745         (Reduced Automaton): Likewise.
2746         (Underivable Rules): Likewise.
2747         (Empty Language): Likewise.
2749 2008-07-15  Joel E. Denny  <jdenny@ces.clemson.edu>
2751         Fix some .gitignore and .cvsignore problems.
2752         * bootstrap (insert_sorted_if_absent): Replace all uses with...
2753         (insert_vc_ignore): ... this new function, which prepends `/' to all
2754         .gitignore entries before passing them to insert_sorted_if_absent.
2755         * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2756         .cvsignore files are maintained even though Bison developers run
2757         bootstrap while using Git.
2758         * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2759         unneeded by Bison.
2760         (gnulib): Add.
2761         * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2762         unneeded.  Reported by Eric Blake.
2763         * lib/.gitignore (/*~): Add.
2764         * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2765         * examples/calc++/.gitignore (/calc++.exe): Add.  Reported by Eric
2766         Blake.
2767         * src/.gitignore (/bison.exe): Add.  Reported by Eric Blake.
2769 2008-07-15  Joel E. Denny  <jdenny@ces.clemson.edu>
2771         Improve forward-compatibility with GNU M4.  Reported by Eric Blake at
2772         <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2773         * bootstrap.conf (gnulib_modules): Add unsetenv.
2774         * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2775         * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2776         (/setenv.m4): Add.
2777         * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2778         the first argument because it may become position-dependent, and unset
2779         POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2780         Add comments explaining these issues in more detail.
2782 2008-07-14  Joel E. Denny  <jdenny@ces.clemson.edu>
2784         Add .gitignore everywhere based on .cvsignore.
2785         * .gitignore: New.
2786         * build-aux/.gitignore: New.
2787         * data/.gitignore: New.
2788         * doc/.gitignore: New.
2789         * etc/.gitignore: New.
2790         * examples/.gitignore: New.
2791         * examples/calc++/.gitignore: New.
2792         * lib/.gitignore: New.
2793         * m4/.gitignore: New.
2794         * po/.gitignore: New.
2795         * runtime-po/.gitignore: New.
2796         * src/.gitignore: New.
2797         * tests/.gitignore: New.
2799 2008-05-27  Joel E. Denny  <jdenny@ces.clemson.edu>
2801         * NEWS (2.3b+): New section, empty for now.
2802         * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2804 2008-05-27  Joel E. Denny  <jdenny@ces.clemson.edu>
2806         * NEWS (2.3b): Update release date since there has been a delay in
2807         getting the announcements and tarballs out.
2809 2008-05-23  Joel E. Denny  <jdenny@ces.clemson.edu>
2811         * NEWS: Version 2.3b.
2812         * configure.ac (AC_INIT): Likewise.
2813         (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2815 2008-05-23  Joel E. Denny  <jdenny@ces.clemson.edu>
2817         * HACKING: Don't say don't mention HACKING in the ChangeLog.  We've
2818         been doing it for years.
2819         (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2820         (Release Procedure): Add FIXME about make alpha being unmaintained.
2822 2008-05-13  Joel E. Denny  <jdenny@ces.clemson.edu>
2824         * data/yacc.c: Reformat m4 a little for readability.
2825         * src/lalr.c (build_relations): Correct comment.
2827 2008-05-12  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
2829         DJGPP specific issue.
2830         * djgpp/config.sed: Fixes required to run configure scripts generated
2831         by autoconf 2.62.
2833 2008-05-07  Joel E. Denny  <jdenny@ces.clemson.edu>
2835         * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2836         coordinator@translationproject.org.
2838 2008-05-06  Joel E. Denny  <jdenny@ces.clemson.edu>
2840         * THANKS: Add Eric Blake.
2842 2008-04-23  Eric Blake  <ebb9@byu.net>
2844         Revert prior patch, by working around autoconf regression.
2845         * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2846         ("Output file name: ("): Uncomment test.
2847         ("Output file name: )"): Likewise.
2848         Based on an idea from Noah Misch.
2850 2008-04-21  Joel E. Denny  <jdenny@ces.clemson.edu>
2852         Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2853         2.61.  Reported by Juan Manuel Guerrero at
2854         <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2855         * tests/output.at ("Output file name: ("): Comment out test case for
2856         now.
2857         ("Output file name: )"): Likewise.
2859 2008-04-21  Joel E. Denny  <jdenny@ces.clemson.edu>
2861         * GNUmakefile: Update git-version-gen invocation so make dist
2862         succeeds.
2864 2008-04-21  Joel E. Denny  <jdenny@ces.clemson.edu>
2866         Update to the current gnulib CVS repository, and fix trigraph handling
2867         in Bison.
2868         * bootstrap: Update gnulib CVS repository URL.
2869         (symlink_to_dir): Encapsulate the code that guarantees the destination
2870         directory exists into...
2871         (check_dst_dir): ... this new function, and...
2872         (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2873         fail when copying files into lib/uniwidth/.
2874         * src/output.c (prepare_symbols): When writing yytname muscles, where
2875         symbol names will be encoded in C-string literals, tell quotearg to
2876         escape trigraphs.  This used to be the default in gnulib.
2877         * tests/regression.at (Token definitions): Because of the change in
2878         gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2879         escapes trigraphs in symbol names.  Thus, yytname no longer has
2880         trigraphs unnecessarily doubly escaped.  Update test case output.
2881         Extend test case to be sure Bison's own error messages will no longer
2882         have trigraphs in symbol names unnecessarily escaped once.
2884 2008-04-20  Joel E. Denny  <jdenny@ces.clemson.edu>
2886         Fix make dist infinite loop reported by Juan Manuel Guerrero at
2887         <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2888         * .cvsignore: Add .version.
2889         * .version.in: New.
2890         * bootstrap.conf (gnulib_modules): Add git-version-gen.
2891         * configure.ac (AC_CONFIG_FILES): Add .version.
2892         * build-aux/.cvsignore: Add git-version-gen.
2894 2008-03-08  Joel E. Denny  <jdenny@ces.clemson.edu>
2896         * NEWS (2.3a+): Mention that -g now takes an argument.
2897         * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2898         consistency.  Update the -g and -x entries now that they take
2899         arguments.  Use brackets to indicate optional arguments.
2900         * src/getargs.c (usage): Explain the relationship between arguments of
2901         long and short options more completely.  Document --defines and -d
2902         separately since the former takes an argument but, for POSIX Yacc, the
2903         latter does not.
2904         (short_options): Let -W take an optional argument like --warnings.
2905         (getargs): Sort cases.
2907 2008-02-28  Akim Demaille  <demaille@gostai.com>
2909         * doc/bison.texinfo: Fix a few typos.
2911 2008-02-28  Akim Demaille  <akim@epita.fr>
2913         * doc/bison.texinfo (Bison Options): Document -W.
2914         Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2916 2008-02-28  Akim Demaille  <akim@epita.fr>
2918         * src/getargs.c (short_options): Split and sort for readability.
2919         -g and -x take optional arguments, just like their long options.
2920         * build-aux/cross-options.pl: Use /x to make the regexp easier to
2921         understand.
2922         Fix the handling of $opt which resulted in all the argument to be
2923         considered as optional.
2925 2008-02-22  Joel E. Denny  <jdenny@ces.clemson.edu>
2927         * NEWS (2.3a+): Don't say %language is experimental.  Mention Java and
2928         say its interface is experimental.
2929         * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2930         Java.
2931         (Bison Options): In the -L and --language entry, mention Java.
2932         (Java Bison Interface): Say the interface is experimental.
2933         * src/getargs.c (usage): Mention -L and --language.
2935         * NEWS (2.3a+): Say the push parsing interface is experimental.
2936         * doc/bison.texinfo (Push Decl): Likewise.
2937         (Decl Summary): Likewise in the "%define api.push_pull" entry.
2938         (Push Parser Function): Likewise.
2939         (Pull Parser Function): Likewise.
2940         (Parser Create Function): Likewise.
2941         (Parser Delete Function): Likewise.
2942         (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2943         yypull_parse, and yypush_parse entries.
2945         * NEWS (2.3a+): Mention XML support, and say the schema is
2946         experimental.
2947         * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2948         * src/getargs.c (usage): Say the XML schema is experimental.
2950         * NEWS (2.3a+): Say option instead of flag.
2952 2008-02-21  Wojciech Polak  <polak@gnu.org>
2954         * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2955         text.
2957 2008-02-20  Joel E. Denny  <jdenny@ces.clemson.edu>
2959         Fix impure push parser compile error reported by Bob Rossi at
2960         <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2961         * data/yacc.c: Clean up whitespace in the output a little.
2962         (yypstate_allocated): Define for impure push parsers regardless of
2963         whether the pull interface is also requested.
2964         * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2965         check impure push parsers without the pull interface.
2967         * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2968         yyerror takes arguments specified by %parse-param while yypstate_new
2969         does not.
2970         * doc/bison.texinfo (Parser Create Function): Document that
2971         yypstate_new returns 0 for multiple impure parser instances.
2972         * tests/push.at (Push Parsing: Multiple impure instances): Update
2973         expected stderr output.
2975 2008-02-19  Joel E. Denny  <jdenny@ces.clemson.edu>
2977         * runtime-po/POTFILES.in (push.c): Remove.
2979 2008-02-17  Joel E. Denny  <jdenny@ces.clemson.edu>
2981         * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2982         * data/push.c: Rename to...
2983         * data/yacc.c: ... this, overwriting it.
2984         * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2985         `%push-pull-parser' -> `%define api.push_pull "both"'.
2986         Remove old yacc.c tests, and update push.c tests to yacc.c.
2988 2008-02-17  Joel E. Denny  <jdenny@ces.clemson.edu>
2990         * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2991         `"%code top" blocks' instead of `%code "top" blocks'.
2992         * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2993         Clean up whitespace in the output a little.
2995 2008-02-16  Joel E. Denny  <jdenny@ces.clemson.edu>
2997         Fix documentation problems reported by Tim Josling at
2998         <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2999         * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3000         * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3001         integers.  Explain the effect of literal string aliases on error
3002         messages.  Copy token 0 documentation from the C++ skeleton
3003         documentation.
3005 2008-02-16  Joel E. Denny  <jdenny@ces.clemson.edu>
3007         Accept a token number in a %left, %right, or %nonassoc for POSIX
3008         conformance.  Reported by Tim Josling at
3009         <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3010         * NEWS (2.3a+): Mention.
3011         * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3012         and code numbers are treated by precedence declarations.
3013         * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3014         of symbols.1.
3015         (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3016         of symbol.
3017         (symbol.prec): New, just like symbol but allows INT.
3018         * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3019         longer holds.
3020         * tests/regression.at (Token number in precedence declaration): New
3021         test case.
3023 2008-02-06  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
3025         DJGPP specific issues.
3026         * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3027         be changed.  Copyright timestamp adjusted.
3028         * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3029         be changed.  Copyright timestamp adjusted.
3030         * djgpp/config.site: Copyright timestamp adjusted.
3031         * djgpp/config_h.sed: Copyright timestamp adjusted.
3032         * djgpp/djunpack.bat: Copyright timestamp adjusted.
3033         * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3034         filename translation list.
3035         * djgpp/subpipe.c (init_subpipe): Check the environment variables
3036         TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3037         files shall be created.  Before trying to use the temp dir where the
3038         environment variable points to check that the dir really exists. If
3039         not default to the cwd as temp dir.  Copyright timestamp adjusted.
3040         * djgpp/subpipe.h: Copyright timestamp adjusted.
3041         * djgpp/testsuite.sed: Copyright timestamp adjusted.
3043 2008-01-30  Paul Eggert  <eggert@cs.ucla.edu>
3045         * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3047 2008-01-09  Paul Eggert  <eggert@cs.ucla.edu>
3049         * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3050         Problem reported by Claudio Saavedra in
3051         <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3053 2008-01-05  Wojciech Polak  <polak@gnu.org>
3055         * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3056         document's title with the input grammar file name.
3058 2007-12-22  Joel E. Denny  <jdenny@ces.clemson.edu>
3060         Automate regression testing of the XML/XSLT implementation.  Discussed
3061         starting at
3062         <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3063         * configure.ac (XSLTPROC): New substitution.
3064         * Makefile.am (maintainer-xml-check): New phony target invoking...
3065         * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3066         invoking make maintainer-check with BISON_TEST_XML=1.
3067         * tests/atlocal.in (XSLTPROC): New.
3068         * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3069         not to report reachable memory when Bison is expected to have a
3070         non-zero exit status and (2) to compare XML/XSLT output with --graph
3071         and --report=all output for every working grammar when
3072         BISON_TEST_XML=1.
3073         (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3074         (AT_BISON_CHECK_XML): New.
3075         (AT_QUELL_VALGRIND): New.
3076         * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3077         (AT_CHECK): ... don't redefine this since this was the old way to
3078         quell Valgrind.
3079         * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3080         AT_BISON_CHECK invocations.
3081         * tests/c++.at: Likewise.
3082         * tests/calc.at: Likewise.
3083         * tests/conflicts.at: Likewise.
3084         * tests/cxx-type.at: Likewise.
3085         * tests/existing.at: Likewise.
3086         * tests/glr-regression.at: Likewise.
3087         * tests/headers.at: Likewise.
3088         * tests/input.at: Likewise.
3089         * tests/java.at: Likewise.
3090         * tests/output.at: Likewise.
3091         * tests/push.at: Likewise.
3092         * tests/reduce.at: Likewise.
3093         * tests/regression.at: Likewise.
3094         * tests/sets.at: Likewise.
3095         * tests/skeletons.at: Likewise.
3096         * tests/synclines.at: Likewise.
3097         * tests/torture.at: Likewise.
3098         (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3099         tends to hang xsltproc.
3100         (Big horizontal): Likewise.
3102 2007-12-08  Joel E. Denny  <jdenny@ces.clemson.edu>
3104         In XML output, remove redundant class attribute on symbol element.
3105         * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3106         * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3107         look up a symbol to determine whether it's a nonterminal or terminal.
3108         * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3109         * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3111         Add prec/assoc information to XML output.
3112         * src/gram.c (grammar_rules_print_xml): For each rule that has a
3113         %prec, add a percent_prec attribute.
3114         * src/print-xml.c (print_grammar): For each terminal that has a
3115         precedence or associativity, add a prec or assoc attribute.
3116         (xml_indent): New.
3117         (xml_puts): Use xml_indent.
3118         (xml_printf): Use xml_indent.
3119         * src/print-xml.h (xml_indent): Prototype.
3121         * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3122         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3124 2007-12-08  Joel E. Denny  <jdenny@ces.clemson.edu>
3126         * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3127         (bison:ruleByNumber): ... this for clarity.
3128         * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3129         * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3130         (xsl:template match="reduction"): Update.
3131         (xsl:template match="item"): Update.
3132         (xsl:template match="reduction"): Update.
3134         In the XML output, don't print the list of rules where symbols appear.
3135         Compute it in XSLT instead.  Discussed at
3136         <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3137         * data/xslt/bison.xsl (bison:ruleByLhs): New.
3138         (bison:ruleByRhs): New.
3139         * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3140         bison:ruleByRhs.
3141         (xsl:template match="terminal/rule"): Remove.
3142         (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3143         bison:ruleByRhs.
3144         (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3145         Remove.
3146         * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3147         bison:ruleByRhs and mode="number-link" for rule template.
3148         (xsl:template match="terminal/rule"): Remove.
3149         (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3150         bison:ruleByRhs and mode="number-link" for rule template.
3151         (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3152         Rewrite as...
3153         (xsl:template match="rule" mode="number-link"): ... this.
3154         * src/print-xml.c (print_grammar): Don't print the list of rules.
3156 2007-12-01  Joel E. Denny  <jdenny@ces.clemson.edu>
3158         Don't let --report affect XML output; always print all information.
3159         Discussed at
3160         <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3161         * src/conflicts.c (log_resolution): Implement.
3162         * src/print-xml.c (print_core): Implement.
3163         (print_state): Implement.
3164         (print_xml): Implement.
3166         * NEWS (2.3a+): Fix quotes.
3167         * src/parse-gram.y (prologue_declaration): For consistency with -v,
3168         don't let %verbose clear the list specified by --report.
3170 2007-11-26  Akim Demaille  <akim@epita.fr>
3172         * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3174 2007-11-24  Joel E. Denny  <jdenny@ces.clemson.edu>
3176         In the XML output, list useless and unused symbols and rules with the
3177         useful ones and add a "usefulness" attribute.  Discussed starting at
3178         <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3179         * src/gram.c (grammar_rules_partial_print_xml): Remove.
3180         (grammar_rules_print_xml): Print all rules instead of just those
3181         useful in the grammar, and add a "usefulness" attribute.
3182         * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3183         * src/print-xml.c (print_rules_useless_in_parser): Remove.
3184         (print_grammar): Print all nonterminals instead of just useful ones,
3185         and add a "usefulness" attribute to nonterminals and terminals.
3186         (print_xml): Don't print a separate "reductions" or
3187         "rules-useless-in-parser" element.
3188         * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3189         (reduce_xml): Remove.
3190         (reduce_token_unused_in_grammar): New.
3191         (reduce_nonterminal_useless_in_grammar): New.
3192         * src/reduce.h (reduce_xml): Remove prototype.
3193         (reduce_token_unused_in_grammar): Add prototype.
3194         (reduce_nonterminal_useless_in_grammar): Add prototype.
3195         * data/xslt/xml2text.xsl: Update for XML changes.
3196         * data/xslt/xml2xhtml.xsl: Update for XML changes.
3197         * tests/reduce.at (Useless Terminals): Update output.
3198         (Useless Rules): Update output.
3199         (Reduced Automaton): Update output.
3201         Say "Terminals unused in grammar" instead of "Unused terminals".
3202         * NEWS (2.3a+): Update.
3203         * doc/bison.texinfo (Understanding): Update example output.
3204         * src/reduce.c (reduce_output): Implement.
3205         * data/xslt/xml2text.xsl: Implement.
3206         * data/xslt/xml2xhtml.xsl: Implement.
3208 2007-11-18  Joel E. Denny  <jdenny@ces.clemson.edu>
3210         Accept --report-file=FILE to override the default `.output' filename.
3211         * NEWS (2.3a+): Mention.
3212         * doc/bison.texinfo (Bison Options): Add an entry.
3213         * src/files.c (compute_output_file_names): Don't override
3214         spec_verbose_file if already set.
3215         * src/getargs.c (usage): Document --report-file.
3216         (REPORT_FILE_OPTION): New anonymous enum member.
3217         (long_options): Add entry for it.
3218         (getargs): Add case for it setting spec_verbose_file.
3220         * build-aux/cross-options.pl: Don't record a short option just because
3221         there's an arg.
3222         * doc/.cvsignore: Add yacc.1.
3224 2007-11-14  Akim Demaille  <akim@epita.fr>
3226         * doc/yacc.1.in: New.
3227         * configure.ac, doc/Makefile.am: Adjust.
3228         * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3229         config.h symbol.
3230         Use AC_SUBST for assignments too.
3231         * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3233 2007-11-10  Joel E. Denny  <jdenny@ces.clemson.edu>
3235         * src/gram.c: Remove comments that duplicate comments in gram.h.
3237         When reporting useless rules and nonterminals, say "useless in grammar"
3238         instead of "useless", and say "useless in parser" instead of "never
3239         reduced".  Discussed starting at
3240         <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3241         * NEWS (2.3a+): Mention this change.
3242         * data/xslt/xml2text.xsl: Update output text and expected input XML
3243         element names to match changes below.
3244         * data/xslt/xml2xhtml.xsl: Likewise.
3245         (xsl:template match="bison-xml-report"): Add missing entry in Table of
3246         Contents: "Rules useless in parser due to conflicts".
3247         * doc/bison.texinfo (Decl Summary): Reword a little.
3248         (Understanding): Update example output for changes below.
3249         * src/gram.c: (rule_useful_p): Rename to...
3250         (rule_useful_in_grammar_p): ... this.
3251         (rule_useless_p): Rename to...
3252         (rule_useless_in_grammar_p): ... this.
3253         (rule_never_reduced_p): Rename to...
3254         (rule_useless_in_parser_p): ... this.
3255         (grammar_rules_print): Update for renames.
3256         (grammar_rules_print_xml): Update for renames.
3257         (grammar_rules_never_reduced_report): Rename to...
3258         (grammar_rules_useless_report): ... this since it is used for either
3259         kind of useless rule.
3260         * src/gram.h: Reword comments and update function names in prototypes.
3261         * src/main.c (main): Say "rule useless in parser due to conflicts".
3262         * src/print-xml.c (print_rules_never_reduced): Rename to...
3263         (print_rules_useless_in_parser): ... this, and rename output XML
3264         element "rules-never-reduced" to "rules-useless-in-parser".
3265         (print_xml): Update for rename.
3266         * src/print.c (print_results): Say "Rules useless in parser due to
3267         conflicts".
3268         * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3269         (nonterminals_reduce): Say "nonterminal useless in grammar".
3270         (reduce_output): Say "Nonterminals useless in grammar".
3271         Say "Rules useless in grammar".
3272         (reduce_xml): Rename output XML element "useless" to
3273         "useless-in-grammar".
3274         (reduce_print): Don't report the count of grammatically useless rules
3275         as "rules never reduced" just because %yacc is specified.
3276         In the correct report of this count, say nonterminal(s) and rule(s)
3277         "useless in grammar".
3278         * tests/conflicts.at (S/R in initial): Update expected output.
3279         (Defaulted Conflicted Reduction): Likewise.
3280         (Unreachable States After Conflict Resolution): Likewise.
3281         * tests/existing.at (GNU pic Grammar): Likewise.
3282         * tests/reduce.at (Useless Nonterminals): Likewise.
3283         (Useless Rules): Likewise.
3284         (Reduced Automaton): Likewise.
3285         (Underivable Rules): Likewise.
3286         (Empty Language): Likewise.
3288 2007-11-09  Joel E. Denny  <jdenny@ces.clemson.edu>
3290         * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3291         here document and before the EOF so that BSD's implementation of Bourne
3292         shell doesn't parse the delimiter as part of the here document.
3293         * doc/.cvsignore: Add cross-options.texi.
3294         * src/getargs.c (usage): Add a blank line after the warning categories.
3296 2007-11-08  Paolo Bonzini  <bonzini@gnu.org>
3298         * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3300 2007-11-05  Akim Demaille  <akim@epita.fr>
3302         Remove Id: from bison.1.
3303         * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3304         (perl -0777 -pi -e 's/\.PP\nId): New.
3305         (.x.1): Use it to ignore the version control revision.
3307 2007-11-05  Akim Demaille  <demaille@gostai.com>
3309         * build-aux/Makefile.am: Ship cross-options.pl.
3310         * doc/Makefile.am: Always refer to cross-options.texi with
3311         $(srcdir).
3312         (MAINTAINERCLEANFILES): Add it.
3314 2007-11-04  Akim Demaille  <demaille@gostai.com>
3316         Generate the long/short option cross-table.
3317         * build-aux/cross-options.pl: New.
3318         * doc/Makefile.am (cross-options.texi): New.
3319         * doc/bison.texinfo: Use it.
3321 2007-11-04  Akim Demaille  <demaille@gostai.com>
3323         Generate bison.1 using help2man.
3324         * doc/common.x, doc/bison.x: New.
3325         * doc/Makefile.am (bison.1, .x.1): New.
3326         The code is taken from autoconf-2.61/man/Makefile.am.
3327         * configure.ac: Look for help2man.
3329 2007-11-04  Akim Demaille  <demaille@gostai.com>
3331         Complete --help.
3332         * src/getargs.c (usage): Document -W, make it clear that -d,
3333         -g and -x have optional arguments.
3335 2007-11-04  Akim Demaille  <demaille@gostai.com>
3337         Find sha1sum when named gsha1sum.
3338         * bootstrap (find_tool): New.
3339         ($SHA1SUM): New.
3341 2007-10-28  Joel E. Denny  <jdenny@ces.clemson.edu>
3343         Deprecate %pure-parser and add `%define api.pure'.  Discussed starting
3344         at
3345         <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3346         * NEWS (2.3a+): Mention.
3347         * data/bison.m4 (b4_pure_if): Don't define it here.
3348         * data/c.m4 (b4_identification): Depend on individual skeletons to
3349         define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3350         values of the %define variables api.pure or api.push_pull.  Define
3351         YYPURE, YYPUSH, and YYPULL accordingly.
3352         * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3353         glr.cc has already defined b4_pure_flag.
3354         * data/push.c: Define b4_pure_if based on `%define api.pure'.
3355         Remove YYPUSH and YYPULL since they're back in b4_identification again.
3356         * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3357         * doc/bison.texinfo (Pure Decl): Update.
3358         (Push Decl): Update.
3359         (Decl Summary): Add api.pure to %define entry.
3360         In %pure-parser entry, say it's deprecated and reference %define.
3361         (Pure Calling): Update.
3362         (Error Reporting): Update.
3363         (C++ Scanner Interface): Update.
3364         (How Can I Reset the Parser): Update.
3365         (Table of Symbols): In %pure-parser entry, say it's deprecated and
3366         reference %define.
3367         * src/getargs.c (pure_parser): Remove global variable.
3368         * src/getargs.h (pure_parser): Remove extern.
3369         * src/output.c (prepare): Don't define pure_flag muscle.
3370         * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3371         wrapper around `%define api.pure'.
3372         * tests/calc.at (Simple LALR Calculator): Update.
3373         (Simple GLR Calculator): Update.
3374         * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3375         Update.
3376         (GLR: Resolve ambiguity, pure, locations): Update.
3377         (GLR: Merge conflicting parses, pure, no locations): Update.
3378         (GLR: Merge conflicting parses, pure, locations): Update.
3379         * tests/glr-regression.at (Uninitialized location when reporting
3380         ambiguity): Update
3381         * tests/input.at (Unused %define api.pure): New test case.
3382         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3383         AT_PURE_IF and AT_PURE_AND_LOC_IF.
3384         * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3386 2007-10-28  Joel E. Denny  <jdenny@ces.clemson.edu>
3388         %define push_pull -> %define api.push_pull.  Discussed starting at
3389         <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3390         * data/push.c: Expect the new name.
3391         * data/yacc.c: Likewise.
3392         * doc/bison.texinfo (Push Decl): Update.
3393         (Decl Summary): Update %define entry.
3394         (Push Parser Function): Update.
3395         (Pull Parser Function): Update.
3396         (Parser Create Function): Update.
3397         (Parser Delete Function): Update.
3398         * tests/calc.at (Simple LALR Calculator): Update.
3399         * tests/input.at (%define enum variables): Update.
3400         * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3401         (Push Parsing: Multiple impure instances): Update.
3402         (Push Parsing: Unsupported Skeletons): Update.
3403         * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3404         (Exploding the Stack Size with Malloc): Update.
3406         * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3407         other entries some.
3409 2007-10-27  Joel E. Denny  <jdenny@ces.clemson.edu>
3411         For the XML output's terminal element, rename @number to @token-number,
3412         and add @symbol-number.  In the nonterminal element, rename @number to
3413         @symbol-number.  Discussed starting at
3414         <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3415         * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3416         renames.
3417         (xsl:template match="nonterminal"): Likewise.
3418         * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3419         (xsl:template match="nonterminal"): Likewise.
3420         * src/print-xml.c (print_grammar): Implement.
3422 2007-10-21  Joel E. Denny  <jdenny@ces.clemson.edu>
3424         * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3425         2007-10-11 change, the child elements here are items not rules.
3426         (xsl:template match="item"): New.
3427         (xsl:template match="rule"): Update for new reduced itemset.
3428         (xsl:template match="point"): Remove.
3429         (xsl:template match="empty"): For consistency with --graph, don't
3430         output "/* empty */".
3431         * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3432         line-wrap, don't pass a negative value as first-line-length since this
3433         won't work with the following changes.
3434         (xsl:template name="line-wrap"): Simplify slightly.
3435         (xsl:template name="ws-search"): Eliminate recursion.
3436         * src/print_graph.c (print_core): Don't print a reduction's lookahead
3437         set next to an item whose dot is not at the end of the RHS even if it
3438         happens to be associated with the same rule.
3440 2007-10-19  Joel E. Denny  <jdenny@ces.clemson.edu>
3442         Add %define lr.keep_unreachable_states.
3443         * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3444         * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3445         * src/main.c (main): Implement it.
3446         * tests/conflicts.at (Unreachable States After Conflict Resolution):
3447         Extend to test it, and fix a typo.
3449 2007-10-19  Joel E. Denny  <jdenny@ces.clemson.edu>
3451         * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3452         * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3453         the example .output text.
3454         * tests/regression.at (Extra lookahead sets in report): Improve wording
3455         of comments.
3457 2007-10-17  Wojciech Polak  <polak@gnu.org>
3459         * src/print-xml.c (print_grammar): Renamed
3460         <terminal> and <nonterminal> attributes:
3461         "type" to "number" and "symbol" to "name".
3462         * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3463         Use new attribute names.
3464         (xsl:template match="nonterminal"): Likewise.
3465         * data/xslt/xml2xhtml.xsl: Likewise.
3467 2007-10-17  Joel E. Denny  <jdenny@ces.clemson.edu>
3469         * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3470         (Option Cross Key): Likewise.
3472         * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3473         next to an item whose dot is not at the end of the RHS even if it
3474         happens to be associated with the same rule.
3475         * src/print.c (print_core): Likewise.
3476         * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3477         (Resolved SR Conflicts): Update output.
3478         * tests/regression.at (Extra lookahead sets in report): New test case.
3480 2007-10-11  Wojciech Polak  <polak@gnu.org>
3482         * src/print-xml.c (print_core): Remove item set
3483         redundancy.
3484         * data/xslt/bison.xsl (bison:ruleNumber): New key.
3485         Improve processing time. Suggested by Joel E. Denny.
3486         * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3487         Write xsl:param "required" attribute as comment.
3488         * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3489         (xsl:template match="rule"): Support new reduced itemset.
3490         (xsl:template match="point"): Remove.
3491         * data/xslt/xml2xhtml.xsl: Likewise.
3493 2007-10-09  Joel E. Denny  <jdenny@ces.clemson.edu>
3495         * src/getargs.c (version): Update copyright year.
3497 2007-10-09  Joel E. Denny  <jdenny@ces.clemson.edu>
3499         Make xml2dot.xsl and --graph produce the same output.
3500         * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3501         instead of a `\n'.  That is, don't add escapes yet or they'll be doubly
3502         escaped later.
3503         (xsl:template name="output-node"): Use the new escape template instead
3504         of the string-replace template directly.
3505         (xsl:template name="output-edge"): Likewise.
3506         (xsl:template name="escape"): New, escapes backslashes and newlines in
3507         addition to quotation marks.
3508         * src/graphviz.c (start_graph, output_node, output_edge): Add
3509         whitespace to output for legibility.
3511         Make xml2text.xsl and --report produce the same output, and remove the
3512         XML "conflicts" element since a conflict summary is easily extracted
3513         from the automaton.
3514         * data/xslt/bison.xsl: New.
3515         (xsl:template match="state" mode="bison:count-conflicts): New.
3516         * data/xslt/xml2text.xsl: Import bison.xsl.
3517         (xsl:template match="bison-xml-report"): Instead of styling the
3518         "conflicts" element, style the "automaton" element with mode
3519         "conflicts".  Unlike the former, the latter lists S/R and R/R
3520         conflicts for a state on the same line.
3521         (xsl:template match="conflicts"): Remove.
3522         (xsl:template match="conflict"): Remove.
3523         (xsl:template match="terminal"): Line-wrap the list of rules in which
3524         the terminal is used.
3525         (xsl:template match="nonterminal"): Likewise for nonterminals.
3526         (xsl:template match="automaton" mode="conflicts"): New.
3527         (xsl:template match="state" mode="conflicts"): New.
3528         (xsl:template name="line-wrap"): New.
3529         (xsl:template name="ws-search"): New.
3530         * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3531         (xsl:template match="bison-xml-report"): Instead of styling the
3532         "conflicts" element, style the "automaton" element with mode
3533         "conflicts."
3534         (xsl:template match="conflicts"): Remove.
3535         (xsl:template match="conflict"): Remove.
3536         (xsl:template match="automaton" mode="conflicts"): New.
3537         (xsl:template match="state" mode="conflicts): New.
3538         * src/conflicts.c (conflicts_output_xml): Remove.
3539         * src/conflicts.h (conflicts_output_xml): Remove prototype.
3540         * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3541         * src/print.c (print_grammar): Consistently wrap at the 66th column so
3542         the corresponding XSLT is easier.  Also, never wrap between a word and
3543         the comma that follows it.
3545 2007-10-08  Joel E. Denny  <jdenny@ces.clemson.edu>
3547         Improve C++ namespace support.  Discussed starting at
3548         <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3549         * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3550         b4_namespace_close): New macros that interpret the %define variable
3551         "namespace" so its value can contain "::" to indicate nested
3552         namespaces.
3553         * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3554         the above macros.
3555         * data/lalr1.cc (b4_namespace): Likewise.
3556         * data/location.cc (b4_namespace): Likewise.
3557         * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3558         inside a new table in the general %define entry.  Document `%define
3559         namespace' there as well.  Point the %name-prefix entry to it since it
3560         explains it more completely in the case of C++.
3561         (C++ Bison Interface): Mention `%define namespace' instead of
3562         %name-prefix.
3563         (Table of Symbols): Remove the `%define push_pull' entry.  The %define
3564         entry suffices.
3565         * tests/c++.at (Relative namespace references): New test case.
3566         (Absolute namespace references): New test case.
3567         (Syntactically invalid namespace references): New test case.
3568         * tests/input.at (C++ namespace reference errors): New test case.
3570 2007-10-08  Joel E. Denny  <jdenny@ces.clemson.edu>
3572         Add syncline support and location accessor to internal %define
3573         interfaces.
3574         * data/bison.m4 (b4_percent_define_get_loc): New.
3575         (b4_percent_define_get_syncline): New.
3576         (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3577         (b4_percent_define_default): Record defining location as line 1 rather
3578         than 0 for the sake of synchronizing #line's, and define
3579         b4_percent_define_syncline(VARIABLE).
3580         (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3581         * src/muscle_tab.c (muscle_syncline_grow): New.
3582         (muscle_code_grow): Use muscle_syncline_grow.
3583         (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3584         define b4_percent_define_syncline(VARIABLE).
3585         (muscle_percent_define_get_loc): New.
3586         (muscle_percent_define_get_syncline): New.
3587         (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3588         remove some unused variables.
3589         (muscle_percent_define_default): Record defining location as line 1
3590         rather than 0 for the sake of synchronizing #line's, and define
3591         b4_percent_define_syncline(VARIABLE).
3592         (muscle_percent_define_check_values): Use
3593         muscle_percent_define_get_loc.
3594         * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3595         (muscle_percent_define_get_syncline): Prototype.
3596         * tests/skeletons.at (%define Boolean variables: invalid skeleton
3597         defaults): Update output for location change.
3598         (Complaining during macro argument expansion): Extend to test
3599         b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3601 2007-10-07  Joel E. Denny  <jdenny@ces.clemson.edu>
3603         Fix some error-reporting macro bugs.
3604         * data/bison.m4 (b4_cat): New.
3605         (b4_error, b4_error_at): Use b4_cat to send error directives directly
3606         to stdout so they don't become arguments to other macros.  Update
3607         comments and add examples.
3608         (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3609         add examples.
3610         (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3611         after printing the error directive so that M4 doesn't report subsequent
3612         problems that are induced by this problem.
3613         * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3614         instead of just in them.  Recognize @\n in both places.  Both expand to
3615         the empty string.  Needed by b4_cat.
3616         * tests/skeletons.at (Complaining during macro argument expansion):
3617         New test case.
3618         (Fatal errors make M4 exit immediately): New test case.
3620 2007-10-04  Joel E. Denny  <jdenny@ces.clemson.edu>
3622         Implement --print-datadir.
3623         * src/getargs.c (usage): Mention.
3624         (PRINT_DATADIR_OPTION): New anonymous enum member.
3625         (long_options): Add entry for it.
3626         (getargs): Add case for it calling compute_pkgdatadir.
3627         * src/output.c (output_skeleton): Encapsulate data directory
3628         computation from here...
3629         (prepare): ... and from here...
3630         (compute_pkgdatadir): ... into this new function.
3631         * src/output.h (compute_pkgdatadir): Prototype.
3633 2007-09-29  Joel E. Denny  <jdenny@ces.clemson.edu>
3635         * src/print-xml.c (escape_bufs): New static global variable
3636         replacing...
3637         (xml_escape_n): ... the static local variable buf here.
3638         (print_xml): Free memory for escape_bufs.
3639         * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3641 2007-09-25  Joel E. Denny  <jdenny@ces.clemson.edu>
3643         Replace `%push-parser' and `%push-pull-parser' with
3644         `%define push_pull "push"' and `%define push_pull "both"'.
3645         `%define push_pull "pull"' is the default.
3646         * doc/bison.texinfo (Push Decl, Push Parser Function,
3647         Pull Parser Function, Parser Create Function, Parser Delete Function):
3648         Update declarations.
3649         (Decl Summary, Table of Symbols): Replace %push-parser and
3650         %push-pull-parser entries with a %define push_pull entry.
3651         * data/bison.m4 (b4_percent_define_check_values): New macro.
3652         (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3653         definitions...
3654         * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3655         definitions...
3656         * data/push.c: ... to here and compute them from the value of the
3657         %define variable push_pull.
3658         * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3659         parsing requests here...
3660         * data/yacc.c: ... hack this to switch to push.c any time
3661         b4_use_push_pull_flag or the %define variable push_pull is set.  This
3662         will go away when we mv push.c yacc.c.
3663         * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3664         push parsing is not supported since unused %define variables are
3665         reported anyway.
3666         * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3667         * src/muscle_tab.h (muscle_percent_define_check_values): Update
3668         comments for consistency with b4_percent_define_check_values.
3669         * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3670         muscles.
3671         * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3672         Remove.
3673         (prologue_declaration): Remove %push-parser and %push-pull-parser
3674         rules.
3675         * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3676         * tests/calc.at: Update declarations.
3677         * tests/input.at (%define enum variables): New test case.
3678         * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3679         declaration.
3680         (Push Parsing: Multiple impure instances): Update declaration.
3681         (Push Parsing: Unsupported Skeletons): New test case.
3682         * tests/torture.at (Exploding the Stack Size with Alloca): Update
3683         declaration.
3684         (Exploding the Stack Size with Malloc): Update declaration.
3686 2007-09-24  Wojciech Polak  <polak@gnu.org>
3688         Add XSLT transformations.
3690         * data/xslt/xml2dot.xsl: Transform XML into DOT.
3691         * data/xslt/xml2text.xsl: Transform XML into plain text.
3692         * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3693         * data/Makefile.am (xsltdir): New variable.
3694         (dist_xslt_DATA): Add xslt/*.xsl files.
3696 2007-09-23  Paul Eggert  <eggert@cs.ucla.edu>
3698         * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3699         Problem reported by Wojciech Polak.
3700         * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3701         (xml_printf): Undo change I made on 21 September; that is,
3702         indent 2 spaces, not 1.
3704 2007-09-23  Joel E. Denny  <jdenny@ces.clemson.edu>
3706         Pacify ./configure --enable-gcc-warnings.
3707         * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3708         `char const *' instead of `char *'.
3709         * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3710         local variable `sep'.
3712 2007-09-21  Paul Eggert  <eggert@cs.ucla.edu>
3714         * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3715         elsewhere.
3716         * src/print-xml.c: Prefer "const" after types; that's more consistent.
3717         (xml_printf): Indent just 1 space for level.
3718         (e_char, xlate_char): Remove.
3719         (xml_escape_string): Rewrite to avoid undefined behavior (used
3720         storage that was freed from the stack).
3721         (xml_escape_n): Don't bother checking for subscript error.
3723 2007-09-21  Wojciech Polak  <polak@gnu.org>
3725         Add Bison XML Automaton Report.
3727         Add support for an -x option to generate an XML report.
3728         It is not documented yet.
3729         * src/print-xml.c: New file.
3730         * src/print-xml.h: Likewise.
3731         * lib/timevar.def (TV_XML): New var.
3732         * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3733         * src/conflicts.c: Include print-xml.h.
3734         (solved_conflicts_xml_obstack): New var.
3735         (log_resolution, conflicts_solve, conflicts_free):
3736         Add support for XML report.
3737         (conflicts_output_val): New function.
3738         * src/conflicts.h (conflicts_output_val): New decl.
3739         * src/files.c (spec_xml_file): New var.
3740         (compute_output_file_names, output_file_names_free): Add XML support.
3741         * src/files.h (spec_xml_file): New decl.
3742         * src/getargs.c (xml_flag): New var.
3743         (usage, short_options, long_options, getargs): Add XML support.
3744         * src/getargs.h (xml_flag): New decl.
3745         * src/gram.c: Include print-xml.h.
3746         (rule_lhs_print_xml, rule_rhs_print_xml):
3747         (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3748         New functions.
3749         * src/gram.h: Declare external ones.
3750         * src/main.c: Include print-xml.h.
3751         (main): Add XML support.
3752         * src/reduce.c: Include print-xml.h.
3753         (reduce_xml): New function.
3754         * src/reduce.h: Declare it.
3755         * src/state.c: Include print-xml.h.
3756         (state_new): Add XML support.
3757         (state_rule_lookahead_tokens_print_xml): New function.
3758         * src/state.h: Declare it.
3759         (struct state): New member solved_conflicts_xml.
3760         * src/symtab.c (symbol_class_get_string): New function.
3761         * src/symtab.h: Declare it.
3763 2007-09-21  Paul Eggert  <eggert@cs.ucla.edu>
3765         * GNUmakefile: Switch to coreutils's version.
3766         * bootstrap: Likewise.
3767         * Makefile.cfg: Adjust to new GNUmakefile.
3768         * README-hacking: Likewise.
3770         Import from gnulib:
3772         2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
3773                     Bruno Haible  <bruno@clisp.org>
3775         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3776         and is a script that invokes bison. Tighten the code. Add comments.
3778 2007-08-28  Joel E. Denny  <jdenny@ces.clemson.edu>
3780         Spell "boolean" as "Boolean".  Reported by Akim Demaille.
3781         * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3782         * doc/bison.texinfo (Decl Summary): Fix.
3783         * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3784         * tests/input.at (Boolean %define variables): Update output.
3785         * tests/skeletons.at (%define boolean variables: invalid skeleton
3786         defaults): Rename to...
3787         (%define Boolean variables: invalid skeleton defaults): ... this and
3788         update output.
3790 2007-08-17  Joel E. Denny  <jdenny@ces.clemson.edu>
3792         In impure push mode, don't allow more than one yypstate to be allocated
3793         since multiple impure parsers would corrupt yynerrs.
3794         * data/push.c (yypstate_allocated): New static global variable
3795         initialized to 0.
3796         (yypull_parse): If yypstate_new returns 0, don't report it as memory
3797         exhaustion if yypstate_allocated is 1, but still return 2.
3798         (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3799         already 1.  Otherwise, set it to 1.
3800         (yypstate_delete): Set it to 0.
3801         * tests/push.at (Push Parsing: Multiple impure instances): New test
3802         case.
3804 2007-08-17  Bob Rossi  <bob@brasko.net>
3806         * doc/bison.texinfo (Push Decl): Document the push parser.
3807         (Table of Symbols): Ditto.
3808         (Pure Decl): Ditto.
3809         (Decl Summary): Ditto.
3810         (Multiple Parsers, Push Parser Function, Pull Parser Function,
3811         Parser Create Function, Parser Delete Function):
3812         Add new push parser symbols.
3813         (Table of Symbols): Document push-parser, push-pull-parser,
3814         yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3816 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3818         Update to GPLv3.
3819         * doc/gpl-3.0.texi: New file.
3820         * doc/gpl.texi: Remove.
3821         * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3822         * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3823         * README-hacking, TODO, bootstrap, bootstrap.conf:
3824         * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3825         * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3826         * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3827         * data/lalr1.cc, data/lalr1.java, data/location.cc:
3828         * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3829         * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3830         * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3831         * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3832         * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3833         * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3834         * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3835         * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3836         * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3837         * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3838         * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3839         * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3840         * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3841         * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3842         * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3843         * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3844         * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3845         * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3846         * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3847         * src/complain.c, src/complain.h, src/conflicts.c:
3848         * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3849         * src/files.h, src/flex-scanner.h, src/getargs.c:
3850         * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3851         * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3852         * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3853         * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3854         * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3855         * src/print.c, src/print.h, src/print_graph.c:
3856         * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3857         * src/reduce.h, src/relation.c, src/relation.h:
3858         * src/revision.h, src/scan-code.h, src/scan-code.l:
3859         * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3860         * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3861         * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3862         * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3863         * tests/Makefile.am, tests/actions.at, tests/c++.at:
3864         * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3865         * tests/existing.at, tests/glr-regression.at:
3866         * tests/headers.at, tests/input.at, tests/java.at:
3867         * tests/local.at, tests/output.at, tests/push.at:
3868         * tests/reduce.at, tests/regression.at, tests/sets.at:
3869         * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3870         * tests/torture.at:
3871         Update to GPLv3.
3873 2007-08-11  Joel E. Denny  <jdenny@ces.clemson.edu>
3875         Get rid of broken %no-parser, -n, and --no-parser implementation and
3876         documentation.
3877         * TODO: Don't mention them.
3878         * doc/bison.1: Likewise.
3879         * doc/bison.texinfo (Decl Summary): Likewise.
3880         (Bison Options): Likewise.
3881         (Option Cross Key): Likewise.
3882         * src/getargs.c (no_parser_flag): Remove global variable.
3883         (usage): Don't print description of -n and --no-parser.
3884         (long_options): Remove --no-parser entry here.
3885         (getargs): Remove -n case in the switch here.
3886         * src/getargs.h (no_parser_flag): Remove extern.
3887         * tests/regression.at (Web2c Actions): Remove comment that mentions
3888         --no-parser.
3890 2007-08-11  Joel E. Denny  <jdenny@ces.clemson.edu>
3892         * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3893         name user variables starting with `yy'.  Just pass NULL instead of a
3894         dummy local &yylval to yypush_parse.
3895         * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3896         starting with `yy'.
3898 2007-08-03  Joel E. Denny  <jdenny@ces.clemson.edu>
3900         * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3901         true since it's then always used regardless of whether yyoverflow is
3902         defined.  Reported by Christian Burger at
3903         <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3904         * THANKS: Add Christian Burger.
3906         * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3907         node names: say "Decl Summary" not "Bison Declaration Summary".
3909 2007-07-28  Joel E. Denny  <jdenny@ces.clemson.edu>
3911         * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3912         determine whether this function has already complained about an invalid
3913         value for a %define boolean variable, don't check whether Bison has
3914         ever examined the value.  As written, the check was a tautology.
3915         Instead, record and check for this complaint using a separate muscle.
3917 2007-07-27  Joel E. Denny  <jdenny@ces.clemson.edu>
3919         Fix push parsing memory leak reported by Brandon Lucia at
3920         <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3921         * THANKS: Add Brandon Lucia.
3922         * data/push.c (yypstate_delete): Free the stack if it was reallocated
3923         but the parse never completed and thus freed it.
3924         * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3925         * tests/testsuite.at: Include push.at.
3926         * test/push.at: New.
3927         (Push Parsing: Memory Leak for Early Deletion): New test case.
3929 2007-07-17  Joel E. Denny  <jdenny@ces.clemson.edu>
3931         Improve handling of multiple S/R conflicts in the same state and of S/R
3932         conflicts involving multiple reductions.
3933         * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3934         set for a state here or Bison will abort if it is reassigned on a
3935         later conflicted reduction in the same state.
3936         Similarly, don't finalize and assign the solved conflicts report here
3937         or it will be lost if it is reassigned on a later conflicted reduction
3938         in the same state.
3939         (set_conflicts): Instead, assign them both here after all S/R conflicts
3940         in the state have been fully examined.
3941         * src/print.c (shift_set): Rename to...
3942         (no_reduce_set): ... this.
3943         (print_reductions): Update for rename, and add %nonassoc error action
3944         tokens to no_reduce_set so that, when printing the first remaining
3945         reduction on an error action token, the reduction is enclosed in
3946         brackets.
3947         (print_results): Update for rename.
3948         * tests/conflicts.at (Solved conflicts report for multiple reductions
3949         in a state): New test case.
3950         (%nonassoc error actions for multiple reductions in a state): New test
3951         case.
3953         * src/main.c (main): Don't depend on C99 features.
3955 2007-07-16  Joel E. Denny  <jdenny@ces.clemson.edu>
3957         * build-aux/.cvsignore: Add compile.
3958         * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3959         uniwidth.
3961 2007-07-10  Joel E. Denny  <jdenny@ces.clemson.edu>
3963         * bootstrap (slurp): Create target directories that don't exist.
3964         Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3966 2007-07-09  Joel E. Denny  <jdenny@ces.clemson.edu>
3968         * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3969         than item number.
3970         * closure.c (closure): Likewise.
3971         * state.h (reductions): Comment sorting of rules.
3972         (state): Comment sorting of items.
3974 2007-07-02  Joel E. Denny  <jdenny@ces.clemson.edu>
3976         Fix C++ test cases after recent Gnulib changes.  Discussed starting at
3977         <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3978         * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3979         definition in order to avoid Gnulib headers since we don't use config.h
3980         here.
3981         * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3982         rather than AT_DATA so that config.h is included.
3984 2007-07-01  Joel E. Denny  <jdenny@ces.clemson.edu>
3986         * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3987         instead of fprintf.  Guard these functions with #if YYDEBUG instead of
3988         #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3989         and so that YYFPRINTF is guaranteed to be defined here.
3991 2007-05-29  Joel E. Denny  <jdenny@ces.clemson.edu>
3993         * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3994         with...
3995         (muscle_percent_define_check_values): ... this more helpful function.
3996         Again, it's not used yet, but it will be.
3997         * src/muscle_tab.h: Likewise.
3999         Improve some comments in parser table construction.
4000         * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4001         (generate_states): Don't mention ruleset, which is internal to closure.
4002         * src/closure.c (closure): Explain sorting of core and itemset, which
4003         is required for this function to behave correctly.
4004         * src/closure.h (closure): Mention sorting.
4006 2007-05-28  Joel E. Denny  <jdenny@ces.clemson.edu>
4008         * src/lalr.c (state_lookahead_tokens_count): For code readability,
4009         move the check for disabled transitions to an aver since conflict
4010         resolution hasn't happened yet.
4012         * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4013         labels a state as inconsistent just because it has error transitions.
4014         The original form of this check appeared in revision 1.1 of lalr.c,
4015         which was committed on 1991-12-21.  Now (at least), changing the
4016         consistency label on such a state appears to have no useful effect in
4017         any of the places it is examined, which I enumerate below.  The key
4018         point to understanding each item in this enumeration is that a state
4019         with an error transition is labelled consistent in the first place only
4020         if it has no rules, so the check cannot matter for states that have
4021         rules.  (1) Labelling a state as inconsistent will cause set_conflicts
4022         to try to identify its conflicts, and a state must have *rules* to have
4023         conflicts.  (2) Labelling a state as inconsistent will affect how
4024         action_row sets the default *rule* for the state.  (3) Labelling a
4025         state as inconsistent will cause build_relations to add lookback edges
4026         to *rules* in that state.
4027         * src/state.h (struct state): Word the comment for member consistent
4028         more carefully.
4030 2007-05-27  Joel E. Denny  <jdenny@ces.clemson.edu>
4032         Don't depend on C99 features.
4033         * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4034         * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4035         * src/reader.c (check_and_convert_grammar): Fix for-loop.
4036         * src/state.c (state_mark_reachable_states): Fix for-loop.
4037         (state_remove_unreachable_states): Fix for-loop.
4039         Don't widen struct state with member reachable just to temporarily
4040         record reachability.  Instead, use a local bitset.
4041         * src/state.h (struct state): Remove member.
4042         * src/state.c (state_new): Don't initialize it.
4043         (state_mark_reachable_states): Rename to...
4044         (state_record_reachable_states): ... this, and use bitset.
4045         (state_remove_unreachable_states): Use bitset.
4047 2007-05-26  Joel E. Denny  <jdenny@ces.clemson.edu>
4049         * src/Makefile.am (yacc): Quote target action commands properly so
4050         that the yacc script isn't corrupt.  Reported by Hans Aberg at
4051         <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4053         * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4054         the case of pure parsers.  Reported by Frans Englich at
4055         <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4056         * THANKS: Add Frans Englich.
4058         * NEWS (2.3a+): In the %code entry, reference section `Bison
4059         Declaration Summary' from the manual now since the %code summary has
4060         moved there.
4061         * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4062         in the rules section must be terminated by semicolons.
4064 2007-05-20  Joel E. Denny  <jdenny@ces.clemson.edu>
4066         Extend the front-end API for %define variables to more completely
4067         mirror the back-end.  This will be useful in the future.
4068         * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4069         Update comments to mention the new front-end counterparts of these
4070         macros.
4071         * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4072         for muscle_string_decode and muscle_location_decode.
4073         (muscle_string_decode): New static function.
4074         (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4075         (muscle_percent_define_get, muscle_percent_define_ifdef): New
4076         functions.
4077         (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4078         muscle_percent_define_get to mimic the b4_percent_define_flag_if
4079         implementation more closely.
4080         (muscle_percent_define_invalid_value): New function.
4081         * src/muscle_tab.h (muscle_percent_define_get,
4082         muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4083         Prototype.
4085 2007-05-07  Joel E. Denny  <jdenny@ces.clemson.edu>
4087         * NEWS (2.3a+): Mention yesterday's state-removal change.
4088         (2.3a): Remove the %language entry, which was added after 2.3a.
4089         * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4090         src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4091         src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4092         tests/existing.at: Update copyright date.
4094 2007-05-06  Joel E. Denny  <jdenny@ces.clemson.edu>
4096         If conflict resolution makes states unreachable, remove those states,
4097         report rules that are then unused, and don't report conflicts in those
4098         states.
4099         * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4100         New global function.
4101         * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4102         function.
4103         * src/main.c (main): After conflict resolution, remove the unreachable
4104         states and update all data structures that reference states by number.
4105         * src/state.c (state_new): Initialize each state's reachable member to
4106         false.
4107         (state_mark_reachable_states): New static function.
4108         (state_remove_unreachable_states): New global function.
4109         * src/state.h (struct state): Add member bool reachable.
4110         (state_remove_unreachable_states): Prototype.
4111         * tests/conflicts.at (Unreachable States After Conflict Resolution):
4112         New test case.
4113         * tests/existing.at (GNU pic Grammar): Update test case output now that
4114         an unused rule is discovered.
4116 2007-05-06  Joel E. Denny  <jdenny@ces.clemson.edu>
4118         Minor code cleanup in parser table construction.
4119         * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4120         (new_itemsets, save_reductions): Update for rename to nitemset.
4121         * src/closure.c (nritemset): Rename to...
4122         (nitemset): ... this since the "r" appears to meaningless and isn't
4123         used in the comments.
4124         (closure): Update for rename.
4125         * src/closure.h (nritemset): Update extern to...
4126         (nitemset): ... this.
4127         * src/lalr.c (LA): Fix a typo in comments.
4128         * src/print.c (print_core): Update for rename to nitemset.
4129         * src/print_graph.c (print_graph): Likewise.
4130         * src/state.h: Fix some typos in header comments.
4132 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
4134         * THANKS: Use ASCII for Sebastien Fricker's name.  Bison source
4135         still sticks to ASCII.  Sorry!
4137         * README-hacking: New file, taken mostly from coreutils, with changes
4138         for Bison.  Contains much of the contents of:
4139         * README-cvs: Remove.
4140         * bootstrap: Sync from gnulib.
4141         * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4142         * lib/.cvsignore: Add wchar.h, wctype.h.  Remove exit.h.
4144 2007-03-10  Joel E. Denny  <jdenny@ces.clemson.edu>
4146         * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4147         Setzer.
4148         (Java Differences): Fix some typos.
4149         * THANKS: Add Sebastian Setzer.
4151 2007-03-07  Paolo Bonzini  <bonzini@gnu.org>
4153         * data/java.m4 (b4_single_class_if): Remove.
4154         (b4_abstract_if): Look at "%define abstract".
4155         (b4_lexer_if): New.
4156         (b4_union_name): Rename...
4157         (b4_yystype): ... to this.  Map to "%define stype".
4158         (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4159         b4_maybe_throws): Fix quoting.
4160         (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4161         * data/lalr1.java (Lexer interface): Always define.
4162         (Lexer interface within parser class): Remove.
4163         (YYLexer class): New, used when "%code lexer" is present.
4164         (constructor): When "%code lexer" is used, pass %lex-param
4165         to the lexer constructor.
4166         (yylex, yyparse): Remove %lex-param from method invocations
4167         (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4169         * doc/bison.texinfo (Java Bison Interface): Mention "%define
4170         abstract".  Rename "%define union_name" to "%define stype".
4171         Rename method names according to previous patch.
4172         (Java Scanner Interface): Describe "%code lexer" instead of
4173         "%pure-parser" and "%define single_class".
4174         (Java Differences): Mention "%code lexer".
4176         * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4177         Include scanner here, using macros from tests/local.at.
4178         (AT_DATA_CALC_Y): Remove final argument.
4179         (_AT_CHECK_JAVA_CALC): Likewise.
4180         (AT_CHECK_JAVA_CALC): Likewise.  Test all four combinations
4181         of %locations and %error-verbose.
4182         (main): Test with and without %lex-param.
4183         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4184         (AT_BISON_OPTION_POPDEFS): Pop it.
4186 2007-03-07  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
4188         DJGPP spefic issue.  Inhibit the use of disallowed characters for
4189         file name genertion on Win98, WinXP, etc.  These are |<>":?*\
4190         and concern testsuite case 46.
4191         * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4192         * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4193         * djgpp/config.bat: Inhibit the use of disallowed characters.
4195 2007-03-02  Joel E. Denny  <jdenny@ces.clemson.edu>
4197         Miscellaneous %define and %code cleanup.
4198         * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4199         values are interpreted.
4200         * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4201         documentation a little more.
4202         * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4203         muscle_percent_define_insert, muscle_percent_code_grow): New
4204         functions/macros.
4205         * src/muscle_tab.h (muscle_percent_define_insert,
4206         muscle_percent_code_grow): Prototype.
4207         * src/parse-gram.y (prologue_declaration): Use
4208         muscle_percent_define_insert and muscle_percent_code_grow when parsing
4209         %define and %code directives.
4211         Make it easy to share %define boolean variables between the front-end
4212         and back-end.  Though not used yet, this will be useful in the future.
4213         * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4214         Bison uses of names rather than just skeleton uses of names.
4215         (b4_percent_define_get, b4_percent_define_ifdef): Rename
4216         b4_percent_define_skeleton_variables(VARIABLE) to
4217         b4_percent_define_bison_variables(VARIABLE).
4218         (b4_percent_code_get, b4_percent_code_ifdef): Rename
4219         b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4220         b4_percent_code_bison_qualifiers(QUALIFIER).
4221         (b4_check_user_names_wrap): Update for renames.
4222         * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4223         muscle_percent_define_default): New functions mimicking
4224         b4_percent_define_flag_if and b4_percent_define_default.
4226         For %define variables, report locations for invalid values and
4227         redefinitions.
4228         * data/bison.m4 (b4_percent_define_flag_if): Read
4229         b4_percent_define_loc(VARIABLE) to report the location of an invalid
4230         value for VARIABLE.
4231         (b4_percent_define_default): Save a special location in
4232         b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4233         must later be reported as invalid.
4234         * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4235         functions.
4236         (muscle_percent_define_insert): Record the location of VARIABLE in
4237         muscle percent_define_loc(VARIABLE), and use it to report the previous
4238         location for a redefinition.
4239         (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4240         (muscle_percent_define_default): Update like b4_percent_define_default.
4241         (muscle_grow_user_name_list): Rename to...
4242         (muscle_user_name_list_grow): ... this for consistency and use
4243         muscle_location_grow.
4244         * src/muscle_tab.h (muscle_location_grow): Prototype.
4245         * tests/input.at (%define errors): Update expected output.
4246         * tests/skeletons.at (%define boolean variables: invalid skeleton
4247         defaults): New test case.
4249 2007-02-28  Joel E. Denny  <jdenny@ces.clemson.edu>
4251         * src/print.c (lookahead_set, state_default_rule): Remove.
4252         (print_reductions): Replace state_default_rule invocation with
4253         equivalent use of yydefact, which was computed in token_actions in
4254         tables.c.
4255         (print_results): Don't allocate lookahead_set.
4257 2007-02-27  Paolo Bonzini  <bonzini@gnu.org>
4259         * data/lalr1.java: Prefix all private members with yy.
4261 2007-02-24  Joel E. Denny  <jdenny@ces.clemson.edu>
4263         Use YYFPRINTF instead of fprintf where appropriate.  Reported by
4264         Sebastien Fricker at
4265         <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4266         * THANKS: Add Sebastien Fricker.
4267         * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4268         * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4269         accept a variable number of arguments.
4271 2007-02-19  Joel E. Denny  <jdenny@ces.clemson.edu>
4273         * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4275 2007-02-13  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
4277         * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4278         * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4279         * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4281 2007-02-11  Paul Eggert  <eggert@cs.ucla.edu>
4283         Undo my 2007-02-07 change, switching back to the c-strcase module
4284         introduced in the 2007-02-03 change.  Bruno Haible reported that
4285         the 2007-02-07 change would be dangerous in Turkish if we add a
4286         language whose name contains "i", since "i" is not lowercase "I"
4287         in Turkish.
4288         * bootstrap.conf (gnulib_modules): Add c-strcase.  Remove strcase.
4289         * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4290         c-strcasecomp.c, c-strncasecmp.c.  Remove strcasecmp.c, strncasecmp.c.
4291         * m4/.cvsignore: Remove strcase.m4.
4292         * src/getargs.c: Revert 2007-02-07 change, as follows.
4293         Include c-strcase.h.
4294         (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4296 2007-02-11  Bruno Haible  <bruno@clisp.org>
4298         Enable the Java related testsuite tests when the only Java compiler
4299         found is a gcj < 4.3.  Discussed at
4300         <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4301         * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4303 2007-02-11  Joel E. Denny  <jdenny@ces.clemson.edu>
4305         * data/Makefile.am: Update copyright date.
4306         * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4307         yypstate_new returns NULL.
4308         (yypstate_new): Return NULL if malloc does.
4309         * src/reader.c (packgram): Move translation of rule actions from the
4310         beginning of packgram to...
4311         (check_and_convert_grammar): ... here right before packgram is invoked
4312         so it's easier to write more complete comments, and remove redundant
4313         code.
4315 2007-02-10  Joel E. Denny  <jdenny@ces.clemson.edu>
4317         As in semantic actions, make @$ in %initial-action, %destructor, and
4318         %printer imply %locations.
4319         * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4320         scanning @$.
4321         * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4322         (@$ in %initial-action implies %locations,
4323         @$ in %destructor implies %locations,
4324         @$ in %printer implies %locations): ... these new test cases.
4326 2007-02-07  Paul Eggert  <eggert@cs.ucla.edu>
4328         Undo most of the 2007-02-03 change, switching to the strcase module
4329         now that gnulib strcase has been fixed.
4330         * bootstrap.conf (gnulib_modules): Remove c-strcase.  Add strcase.
4331         * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4332         c-strcasecomp.c, c-strncasecmp.c.  Add strcasecmp.c, strncasecmp.c
4333         * m4/.cvsignore: Add strcase.m4.
4334         * src/getargs.c: Revert 2007-02-03 change, as follows.
4335         Don't include c-strcase.h.
4336         (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4337         strcasecmp has "unspecified behavior" outside the POSIX locale,
4338         but it works fine in practice if at least one argument is ASCII,
4339         as is the case in Bison.
4341 2007-02-07  Paolo Bonzini  <bonzini@gnu.org>
4343         * tests/java.at: Skip tests if only one of javac/java is present.
4344         Reported by Joel E. Denny.
4345         * tests/atlocal.in: Adjust copyright years.
4347 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
4349         * data/lalr1.java (Stack): Work around old verifiers that disallow
4350         access to the private fields of an inner class, from the outer class.
4351         We can make Stack's fields public because user code doesn't have access
4352         to the instance of Stack used by parse().  Reported by Paul Eggert.
4354 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
4356         * .cvsignore: Add javacomp.sh, javaexec.sh.  Is this really
4357         the right spot for these files?
4358         * bootstrap.conf (gnulib_modules): Add c-strcase.
4359         * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4360         c-strncasecmp.c.
4361         * src/getargs.c: Include c-strcase.h.
4362         (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4363         to avoid unspecified behavior.
4365 2007-02-01  Joel E. Denny  <jdenny@ces.clemson.edu>
4367         * doc/bison.texinfo (Decl Summary): Correct typo.
4369 2007-01-30  Paolo Bonzini  <bonzini@gnu.org>
4371         * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4372         Complain if the value does not match empty, "true" or "false".
4373         * data/c++.m4: Adjust default definitions of %define variables.
4374         * data/java.m4: Adjust default definitions of %define variables.
4375         * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4376         to above behavior.
4377         * tests/input.at (Boolean %define variables): Test new behavior.
4379 2007-01-29  Paolo Bonzini  <bonzini@gnu.org>
4381         * NEWS: Mention java.
4382         * TODO: Remove things that are done.
4383         * bootstrap.conf: Add javacomp-script and javaexec-script.
4384         * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4386         * data/Makefile.am: Add new files.
4387         * data/java-skel.m4: New.
4388         * data/java.m4: New.
4389         * data/lalr1.java: New.
4391         * doc/bison.texinfo: Put "A Complete C++ Example" under
4392         C++ Parsers.  Add Java Parsers.  Put C++ Parsers and Java Parsers
4393         under Other Languages.
4395         * src/getargs.c (valid_languages): Add Java.
4396         * src/getargs.h (struct bison_language): Update size of string fields.
4398         * tests/Makefile.am: Add java.at.
4399         * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4400         * tests/java.at: New.
4401         * tests/testsuite.at: Include it.
4403 2007-01-28  Joel E. Denny  <jdenny@ces.clemson.edu>
4405         Clean up.
4406         * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4407         at_directive_argv arguments so these no longer have to be global
4408         variables.  Also, update the implementation for the following changes.
4409         (fail_for_at_directive_too_many_args,
4410         fail_for_at_directive_too_few_args): Add at_directive_name argument.
4411         (at_directive_name): Remove as at_directive_argv[0] will be used for
4412         this now.
4413         (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4414         for the directive name.
4415         (at_directive_argc, at_directive_argv): Make these local within
4416         skel_lex instead of global.
4417         (INITIAL): Update directive start action for above changes.
4418         (SC_AT_DIRECTIVE_ARG): Rename to...
4419         (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4420         (SC_AT_DIRECTIVE_SKIP_WS): Update.
4421         (scan_skel): Move yylex_destroy to...
4422         (skel_scanner_free): ... here.
4423         * tests/skeletons.at (installed skeleton file name): Rename to...
4424         (installed skeleton file names): ... this.
4426 2007-01-27  Joel E. Denny  <jdenny@ces.clemson.edu>
4428         * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4429         node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4430         Summary" not "Directives".
4431         * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4432         %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4433         since the former is now the more complete one.
4434         (Prologue Alternatives): Likewise and do the same for %defines.
4435         (Table of Symbols): Add summary of %code, add summary of %define, and
4436         move full %code documentation to...
4437         (Decl Summary): ... here for consistency with other entries in these
4438         sections.
4439         Move %define entry in order to keep this list alphabetized.
4440         Reword %define entry a little to put less emphasis on the skeleton
4441         concept, which most users shouldn't have to think about.
4443 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
4445         Adjust to recent gnulib changes.
4446         * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4447         Add string.h, string_.h, unistd_.h, wchar_.h.
4448         * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4449         * src/system.h: Don't include <stpcpy.h>; this is now done by
4450         <string.h>.
4452 2007-01-23  Paolo Bonzini  <bonzini@gnu.org>
4454         Simplify implementation of unqualified %code, implement macros for
4455         uniform treatment of boolean %define flags.  Document %define.
4456         * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4457         b4_percent_code_ifdef): New.
4458         (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4459         * data/c++.m4: Define default value for global_tokens_and_yystype.
4460         * data/glr.cc: Likewise.
4461         * data/location.cc: Use b4_percent_define_flag_if.
4463         * doc/bison.texinfo (Decl Summary): Document %define.
4465         * src/parse-gram.y (Unqualified %code): Change muscle name to
4466         b4_percent_code().
4467         (content.opt): Default to empty.
4469 2007-01-17  Joel E. Denny  <jdenny@ces.clemson.edu>
4471         Implement support for relative and absolute skeleton file names.
4472         Discussed starting at
4473         <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4474         * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4475         (Bison Options): Document in --skeleton entry.
4476         * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4477         full_skeleton can't necessarily hold all of pkgdatadir.
4478         If the specified skeleton file name contains a `/', don't prepend
4479         pkgdatadir.
4480         * src/parse-gram.y (prologue_declaration): If the specified skeleton
4481         file name contains a `/', prepend the grammar file directory.
4482         * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4483         * skeletons.at: New file.
4484         (relative skeleton file names): New test case.
4485         (installed skeleton file names): New test case.
4486         * tests/testsuite.at: Include skeletons.at.
4488         * bootstrap: Update copyright to 2007.
4490 2007-01-17  Paolo Bonzini  <bonzini@gnu.org>
4492         * bootstrap: Remove occurrences of .#bootmp from the files.
4494 2007-01-17  Akim Demaille  <akim@epita.fr>
4496         * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4497         nonterminals.
4498         Use per-type %printer.
4500 2007-01-17  Joel E. Denny  <jdenny@ces.clemson.edu>
4502         * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4503         data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4504         djgpp/config.site, src/files.c, src/files.h, src/main.c,
4505         src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4506         src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4507         tests/glr-regression.at, tests/input.at, tests/local.at,
4508         tests/output.at, tests/torture.at: Update copyright to 2007.
4510 2007-01-16  Akim Demaille  <akim@epita.fr>
4512         * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4513         error code.
4514         (Calc++ Scanner): Exit with failure if we can't open the input
4515         file.
4516         Accept "-" standing for stdin.
4517         (Calc++ Top Level): Print the result only if the parsing was
4518         successful.
4520 2007-01-16  Akim Demaille  <akim@epita.fr>
4522         * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4524 2007-01-15  Paolo Bonzini  <bonzini@gnu.org>
4525         and Joel E. Denny  <jdenny@ces.clemson.edu>
4527         Clean up %define and %code implementation in M4 some.  Most
4528         importantly, rename all related macros to be in the b4_percent_define
4529         and b4_percent_code namespaces.  Also, complete support for `.' in
4530         %define variable names and %code qualifiers.
4531         * data/bison.m4 (b4_check_user_names): Check for special
4532         "SKELETON-NAMESPACE(name)" macros instead of using two nested
4533         m4_foreach loops.
4534         (b4_get_percent_define, b4_get_percent_code): Rename to...
4535         (b4_percent_define_get, b4_percent_code_get): ... these.
4536         Extend documentation with examples.
4537         For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4538         b4_percent_define_skeleton_variables and
4539         b4_percent_code_skeleton_qualifiers.
4540         Expect any value for the %define variable `foo' to be stored in the
4541         macro named `b4_percent_define(foo)'; expect any %code blocks for the
4542         qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4543         expect any unqualified %code blocks to be stored in a macro named
4544         `b4_percent_code_unqualified'.
4545         Use m4_indir so that %define variable names and %code qualifiers can
4546         contain `.', which is allowed by the grammar parser.
4547         (b4_percent_define_default): New macro to set a default value for a
4548         %define variable.
4549         (m4_wrap): Update wrapped code, and fix some underquoting.
4550         (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4551         Expect grammar uses of %define variables and %code qualifiers to be
4552         defined in b4_percent_define_user_variables and
4553         b4_percent_code_user_qualifiers.
4554         * data/c++.m4: Use b4_percent_define_default rather than
4555         m4_define_default.  Fix some underquoting.  Skeleton usage of %define
4556         variable define_location_comparison now implies skeleton usage of
4557         %define variable filename_type.
4558         * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4559         data/push.c, data/yacc.c: Update macro names.
4560         * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4561         muscle names.
4563 2007-01-14  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
4565         DJGPP specific issues.
4567         * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4568         default.  Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4570 2007-01-09  Joel E. Denny  <jdenny@ces.clemson.edu>
4572         * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4573         run parsers in all tests so that Valgrind is invoked during
4574         maintainer-check-valgrind.
4575         (Duplicate representation of merged trees): Free all semantic values.
4576         (Duplicated user destructor for lookahead): Likewise.
4578 2007-01-09  Joel E. Denny  <jdenny@ces.clemson.edu>
4580         * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4581         command-line prefix.
4582         * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4583         ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4584         miss Valgrind messages.
4585         (Exploding the Stack Size with Malloc): Likewise.
4587 2007-01-09  Joel E. Denny  <jdenny@ces.clemson.edu>
4589         Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4590         locals.  Reported by Juan Manuel Guerrero at
4591         <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4592         * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4593         Fix some indentation also.
4594         * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4595         explaining this issue.
4597 2007-01-09  Paolo Bonzini  <bonzini@gnu.org>
4598         and Joel E. Denny  <jdenny@ces.clemson.edu>
4600         Simplify union and prologue handling, and escape union and lex/parse
4601         params with digraphs.
4602         * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4603         values to the empty string since these are no longer guaranteed
4604         initialized by the front-end.
4605         * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4606         braces around b4_user_stype since this is no longer done by the
4607         front-end.
4608         * src/files.c, src/files.h (pre_prologue_obstack,
4609         post_prologue_obstack): Remove.
4610         * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4611         comments here.  Use MUSCLE_OBSTACK_SGROW so that values are escaped
4612         with digraphs.  This fixes lex params and parse params.
4613         * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4614         * src/output.c (prepare): Remove muscle insertion of the prologues.
4615         (output): Remove freeing of pre_prologue_obstack and
4616         post_prologue_obstack.
4617         * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4618         than prologue_augment for prologue parsing so you don't need prologue
4619         obstacks.
4620         (grammar_declaration): For %union RHS, use `braceless' instead of
4621         "{...}" so that braces are already stripped and code is escaped with
4622         digraphs.
4623         * src/reader.c (prologue_augment): Remove.
4624         (reader): Remove initialization of pre_prologue_obstack and
4625         post_prologue_obstack.
4626         * src/reader.h (prologue_augment): Remove.
4628         * data/c.m4: Remove stray parenthesis.
4630 2007-01-08  Joel E. Denny  <jdenny@ces.clemson.edu>
4632         Remove quotes from variables names in %define directives and from
4633         qualifiers in %code directives, and restrict the characters that are
4634         allowed in them to M4-friendly ones.  For %define, continue to support
4635         the quoted form as a deprecated feature.  Discussed starting at
4636         <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4637         * NEWS (2.3a+): Add entry for the change to %define.  Update entry for
4638         %code.
4639         * doc/bison.texinfo (Prologue Alternatives): Update.
4640         (Decl Summary): In %defines entry, update mention of `%code requires'
4641         and `%code provides'.
4642         (C++ Location Values): Update %define uses.
4643         (Calc++ Parser Interface): Likewise.
4644         (Calc++ Parser): Likewise, and update `%code requires' uses.
4645         (Table of Symbols): Update %code documentation.
4646         * src/parse-gram.y (prologue_declaration): For %define variables, use
4647         `variable' instead of `STRING'.
4648         (grammar_declaration): For %code qualifiers, use `ID' instead of
4649         `STRING'.
4650         (variable): New nonterminal that takes an `ID' or a `STRING'.
4651         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4652         and %define uses.
4653         * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4654         * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4655         (%define errors): Update %define uses.
4657 2007-01-08  Joel E. Denny  <jdenny@ces.clemson.edu>
4659         * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4660         instead of muscle_insert for %define values so that M4-special
4661         characters are replaced with digraphs.
4662         * tests/input.at (%define errors): Extend to check weird values.
4664 2007-01-08  Joel E. Denny  <jdenny@ces.clemson.edu>
4666         Instead of having skeletons declare all valid %define variables and
4667         %code qualifiers, provide macros that retrieve the associated values
4668         and build these lists automatically.  Thus Bison will now warn when a
4669         variable or qualifier is not used by the skeleton in the current
4670         invocation regardless of whether it might sometimes be used by that
4671         skeleton in other invocations.  Also, move all %define value macros to
4672         the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4673         form, which is replaced by %code.
4674         * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4675         (b4_check_user_names): ... this, and change the series of valid name
4676         arguments to a single list argument for names used in the skeleton
4677         similar to the existing list argument for names used in the grammar.
4678         Warn instead of complaining.
4679         (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4680         values and %code code, to format %code code properly, and to build
4681         lists of all %define variables and %code qualifiers used in the
4682         skeleton: b4_skeleton_percent_define_variables and
4683         b4_skeleton_percent_code_qualifiers.
4684         (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4685         Remove, and...
4686         (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4687         the skeleton names lists can finish building first.  In place of
4688         b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4689         expect the lists b4_user_percent_define_variables and
4690         b4_user_percent_code_qualifiers.
4691         * data/c++.m4: Where setting default values for b4_parser_class_name,
4692         b4_location_type, b4_filename_type, b4_namespace, and
4693         b4_define_location_comparison, update their names to the
4694         b4_percent_define_ namespace.
4695         * data/glr.c: Don't use b4_check_percent_define_variables and
4696         b4_check_percent_code_qualifiers.  Use b4_get_percent_code.
4697         * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4698         (b4_parser_class_name, b4_namespace): Define these using
4699         b4_get_percent_define for parser_class_name and namespace.
4700         * data/location.cc: Use b4_get_percent_define.
4701         * data/push.c: Don't use b4_check_percent_define_variables and
4702         b4_check_percent_code_qualifiers.  Use b4_get_percent_code.
4703         * data/yacc.c: Likewise, and don't call m4_exit in
4704         b4_use_push_for_pull_if or m4_wrap code will never execute.
4705         * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4706         Rename to...
4707         (muscle_grow_user_name_list): ... this for consistency with the
4708         terminology used in bison.m4.
4709         * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4710         %define variable names, and rename muscle used_percent_define_variables
4711         to user_percent_define_variables.
4712         (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4713         user_percent_code_qualifiers.
4714         (content): Remove.
4715         (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4716         {CODE} form is no longer accepted.
4717         * tests/input.at (Reject bad %code qualifiers): Rename to...
4718         (Reject unused %code qualifiers): ... this, and update test output.
4719         (%define error): Update test output.
4721 2007-01-07  Joel E. Denny  <jdenny@ces.clemson.edu>
4723         Check for unrecognized %define variables similar to checking for
4724         unrecognized %code qualifiers.  Check for redefined %define variables.
4725         * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4726         generalizes...
4727         (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4728         (b4_check_percent_define_variables): New, also wraps it.
4729         * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4730         variables using b4_check_percent_define_variables.
4731         * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4732         all those exercised in the test suite and all those listed in the
4733         `Default values' section of c++.m4.  Are there others?
4734         * data/push.c, data/yacc.c: Declare no valid %define variables.
4735         * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4736         similar to muscle_find, but it works even when the muscle stores a
4737         const value.
4738         (muscle_grow_used_name_list): New function for constructing the used
4739         name list muscles that b4_check_for_unrecognized_names requires.
4740         * src/parse-gram.y (prologue_declaration): Warn if a variable is
4741         %define'd more than once.  Define the b4_used_percent_define_variables
4742         muscle with muscle_grow_used_name_list.
4743         (grammar_declaration): Abbreviate %code code with
4744         muscle_grow_used_name_list.
4745         * tests/input.at (%define errors): New.
4747 2007-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
4749         Provide warn_at, complain_at, and fatal_at function callbacks to the
4750         skeletons, and use this for %code qualifier complaints.
4751         * data/bison.m4 (b4_error_at): New, invoked by...
4752         (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4753         the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4754         @fatal_at(...@) directives.
4755         (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4756         qualifiers in b4_used_percent_code_qualifiers and to use
4757         b4_complain_at.
4758         * src/location.c, src/location.h (boundary_set_from_string): New global
4759         function.
4760         * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4761         function.
4762         * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4763         to b4_used_percent_code_qualifiers.
4764         * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4765         function.
4766         (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4767         (lineno): Rename to...
4768         (out_lineno): ... this so I don't misunderstand it again.
4769         (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4770         here; these newlines are in the input but not the output file.
4771         (SC_AT_DIRECTIVE_ARG): Likewise.  Extract directive execution to...
4772         (at_directive_perform): ... this new static function, and add handling
4773         of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4774         directives.
4775         * tests/input.at (Reject bad %code qualifiers): Update test output with
4776         locations and extend.
4778         * tests/output.at (Output file name: [, Output file name: ]): Remove
4779         bogus comment about these tests failing.
4781 2007-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
4783         Clean up b4_check_percent_code_qualifiers a little.
4784         * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4785         in b4_used_percent_code_qualifiers to be double-M4-quoted.  Rewrite
4786         documentation and add examples.
4787         * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4788         qualifiers here.
4790 2007-01-05  Joel E. Denny  <jdenny@ces.clemson.edu>
4792         Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4793         unreliable -- especially when they're hidden inside another macro.
4794         * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4795         data/c.m4: Remove m4_divert(-1).
4796         * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4797         data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4798         m4_divert_push(0) and m4_divert_pop(0).
4799         * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4800         an m4_wrap([m4_divert_pop(0)]) to the M4.  Diversion -1, which is
4801         pushed and popped by m4sugar, should be first on the stack.
4803         Provide warn, complain, and fatal function callbacks to the skeletons.
4804         This provides more flexibility than m4_fatal, improves the error
4805         message format, and captures messages for translation.  Discussed
4806         starting at
4807         <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4808         * data/bison.m4 (b4_error): New, invoked by...
4809         (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4810         skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4811         directives.  Because these M4 macros might be called when the current
4812         diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4813         the previous removal of uses of m4_divert, which caused trouble.
4814         (b4_check_percent_code_qualifiers): Use b4_complain instead of
4815         m4_fatal to report unrecognized %code qualifiers.
4816         * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4817         push parser requests.
4818         * data/glr.c: Use b4_complain instead of m4_fatal to report
4819         non-deterministic push parser requests.
4820         Update @output usage to @output(...@) form.
4821         * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4822         report missing %defines.  Update @output usage to @output(...@) form.
4823         * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4824         @output(...@) form.
4825         * src/main.c (main): Invoke skel_scanner_free.
4826         * src/scan-skel.h (skel_scanner_free): Prototype new function.
4827         * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4828         obstack_for_string from flex-scanner.h.
4829         (YY_DECL): Use to declare skel_lex static.
4830         (decode_at_digraphs): Remove; now handled in the new
4831         SC_AT_DIRECTIVE_ARG start condition.
4832         (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4833         functions.
4834         (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4835         at_directive_argv): New static globals.
4836         (INITIAL): Use fail_for_invalid_at.
4837         Don't parse `@output file_name\n' or `@basename(...@)'.  Instead,
4838         recognize the start of a generalized `@directive(...@)' form and
4839         start...
4840         (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4841         directive args (using the new obstack_for_string), to decode the
4842         contained @ diagraphs, and to perform the directive.  It recognizes
4843         @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4844         @output(...@).
4845         (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4846         SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4847         `@,'.
4848         (scan_skel): Initialize obstack_for_string on the first call.
4849         (skel_scanner_free): New function to free obstack_for_string.
4850         * tests/input.at (Reject bad %code qualifiers): Update test output.
4852 2007-01-04  Joel E. Denny  <jdenny@ces.clemson.edu>
4854         Consolidate the 4 prologue alternative directives (%code, %requires,
4855         %provides, and %code-top) into a single %code directive with an
4856         optional qualifier field.  Discussed at
4857         <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4858         * NEWS (2.3a+): Rewrite the existing entry for the prologue
4859         alternatives.
4860         * doc/bison.texinfo (Prologue Alternatives): Update.
4861         (Decl Summary): Update to %code "requires" and %code "provides".
4862         (Calc++ Parser): Update to %code "requires".
4863         (Table of Symbols): Remove entries for %requires, %provides, and
4864         %code-top.  Rewrite %code entry, and add a %code "QUALIFIER" entry.
4865         * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4866         are replaced by b4_percent_code_provides and b4_percent_code_requires,
4867         which are skeleton-specific.
4868         (b4_check_percent_code_qualifiers): New.  A skeleton can use this to
4869         declare what %code qualifiers it supports and to complain if any other
4870         qualifiers were used in the grammar.
4871         * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4872         and b4_user_code([b4_percent_code_provides]) in place of
4873         b4_user_requires and b4_user_provides.
4874         * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4875         Add b4_user_code([b4_percent_code_top]) and
4876         b4_user_code([b4_percent_code]).
4877         Invoke b4_check_percent_code_qualifiers.
4878         * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4879         PERCENT_REQUIRES): Remove.
4880         (grammar_declaration): Remove RHS's for %code-top, %provides, and
4881         %requires.  Rewrite the %code RHS as the unqualified form defining the
4882         muscle b4_percent_code.  Add another RHS for the qualified %code form,
4883         which defines muscles of the form b4_percent_code_QUALIFIER and the
4884         b4_used_percent_code_qualifiers muscle.
4885         * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4886         PERCENT_REQUIRES): Remove.
4887         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4888         %code "requires" and %code "provides".
4889         * tests/input.at (Reject bad %code qualifiers): New.
4891 2007-01-03  Joel E. Denny  <jdenny@ces.clemson.edu>
4893         Use the new code_props interface for destructors and printers.
4894         * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4895         printer_location members, and change the type of the destructor and
4896         printer members to code_props.
4897         (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4898         symbol_printer_get, semantic_type_destructor_set,
4899         semantic_type_printer_set, default_tagged_destructor_set,
4900         default_tagless_destructor_set, default_tagged_printer_set,
4901         default_tagless_printer_set): Use code_props in arguments and return
4902         types in place of char const * and location.
4903         (symbol_destructor_location_get, symbol_printer_location_get): Remove
4904         since the locations are now contained in the return of
4905         symbol_destructor_get and symbol_printer_get.
4906         * src/output.c (symbol_destructors_output, symbol_printers_output):
4907         Replace with...
4908         (symbol_code_props_output): ... this to eliminate duplicate code.
4909         (output_skeleton): Update to use symbol_code_props_output.
4910         * src/reader.c (symbol_should_be_used): Update use of
4911         symbol_destructor_get.
4912         * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4913         Update uses of the various _destructor_set and _printer_set functions.
4914         * src/symtab.c: (default_tagged_destructor_location,
4915         default_tagless_destructor_location, default_tagged_printer_location,
4916         default_tagless_printer_location): Remove since we...
4917         (default_tagged_destructor, default_tagless_destructor,
4918         default_tagged_printer, default_tagless_printer): ... change the type
4919         of these to code_props.
4920         (symbol_new, semantic_type_new, symbol_destructor_set,
4921         semantic_type_destructor_set, symbol_destructor_get,
4922         symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4923         symbol_check_alias_consistency, default_tagged_destructor_set,
4924         default_tagless_destructor_set, default_tagged_printer_set,
4925         default_tagless_printer_set): Update.
4926         (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4927         (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4928         code_props members.
4929         (symbol_print): Use SYMBOL_CODE_PRINT.
4931 2007-01-03  Joel E. Denny  <jdenny@ces.clemson.edu>
4933         Use the new code_props interface for rule actions.
4934         * src/symlist.h (symbol_list): Replace action, action_location, and
4935         used members with a code_props action_props member.
4936         * src/reader.c (symbol_should_be_used, grammar_rule_check,
4937         grammar_midrule_action, grammar_current_rule_merge_set,
4938         grammar_current_rule_symbol_append, packgram): Update.
4939         * src/scan-code.h (translate_rule_action): Remove, no longer used.
4940         * src/scan-code.l (handle_action_dollar): Update.
4941         (translate_rule_action): Remove, no longer used.
4942         * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4944 2007-01-02  Joel E. Denny  <jdenny@ces.clemson.edu>
4946         Use the new code_props interface in parse-gram.y.
4947         * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4948         Update all uses of translate_* functions to use the new code_props
4949         interface and to use gram_scanner_last_string_free and
4950         code_scanner_last_string_free where possible.
4951         (grammar_declaration): symbol_list_destructor_set and
4952         symbol_list_printer_set now perform the translation, so don't do it
4953         here.  Use gram_scanner_last_string_free where possible.
4954         * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4955         translate_code): Remove, no longer used.
4956         * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4957         symbol_list_printer_set): Perform code translation here rather than
4958         depending on the caller to do so.
4960         * src/symlist.h (struct symbol_list): Correct some documentation typos.
4961         * src/scan-gram.h (gram_last_string): Remove declaration.
4962         * src/scan-gram.l (last_string): Declare it static.
4964 2007-01-02  Joel E. Denny  <jdenny@ces.clemson.edu>
4966         Encapsulate code properties and related functionality for the various
4967         destructors, printers, and actions into a code_props structure and
4968         interface.  This patch merely implements code_props in scan-code.h and
4969         scan-code.l.  Future patches will rewrite other modules to use it.
4970         Discussed starting at
4971         <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4972         * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4973         consistently initialize const structs that have an empty location
4974         field.
4975         * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4976         to ensure consistency.
4977         * src/scan-code.h (code_props): New structure.
4978         (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4979         function, macro, and const global variable for initializing a
4980         code_props with no code.
4981         (code_props_plain_init, code_props_symbol_action_init,
4982         code_props_rule_action_init, code_props_translate_code): The rest of
4983         the new code_props functional interface.  Among other things, the init
4984         functions set the code_props kind field so that
4985         code_props_translate_code will know whether to behave like
4986         translate_symbol_action, translate_rule_action, or translate_code.
4987         These old translate functions must remain until all other modules are
4988         updated to use the new code_props interface.
4989         (code_scanner_last_string_free): New function similar to
4990         gram_scanner_last_string_free.
4991         (code_scanner_free): Add documentation.
4992         * src/scan-code.l: Implement the new interface.
4993         (code_lex): Make it static, add a code_props* argument, and remove the
4994         rule argument.
4995         (last_string): New static global similar to the one in scan-gram.l.
4996         (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4997         instead of rule.
4998         (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4999         code_props since Bison may one day use this information for destructors
5000         and printers.
5001         (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5002         (handle_action_dollar): Use symbol_list_n_get and set used flag
5003         directly since symbol_list_n_used_set is removed.
5004         (translate_action): Add a code_props* argument and remove the rule,
5005         action, and location arguments.  Pass the code_props* on to code_lex.
5006         (translate_rule_action, translate_symbol_action, translate_code):
5007         Rewrite as wrappers around the new code_props interface.
5008         * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5009         it would eventually need to break the encapsulation of code_props.
5011 2007-01-01  Joel E. Denny  <jdenny@ces.clemson.edu>
5013         * etc/.cvsignore: New.
5015 2007-01-01  Joel E. Denny  <jdenny@ces.clemson.edu>
5017         Add maintainer-push-check to run maintainer-check using push parsing in
5018         place of pull parsing where available.
5019         * Makefile.am (maintainer-push-check): New.
5020         * data/bison.m4 (b4_use_push_for_pull_if): New.
5021         * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5022         appropriately based on their existing values.
5023         (yypush_parse): Don't print push-parser-specific diagnostics if push
5024         parsing is being used in place of pull parsing.
5025         * data/yacc.c: If push parsing should replace pull parsing, redirect to
5026         push.c.
5027         * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5028         variable, and insert b4_use_push_for_pull_flag into muscles.
5029         * tests/Makefile.am (maintainer-push-check): New.
5031 2006-12-31  Joel E. Denny  <jdenny@ces.clemson.edu>
5033         * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5034         (whether successful or failed) so that yypush_parse can be invoked
5035         again to start a new parse using the same yypstate.
5036         * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5037         check multiple yypull_parse invocations on the same yypstate.  For pull
5038         mode, extend to check multiple yyparse invocations.
5039         (Exploding the Stack Size with Alloca): Extend to try with
5040         %push-pull-parser.
5041         (Exploding the Stack Size with Malloc): Likewise.
5043         * tests/calc.at (Simple LALR Calculator): Don't specify
5044         %skeleton "push.c" since %push-pull-parser implies that now.
5045         * tests/headers.at (export YYLTYPE): Don't check for the push
5046         declarations.  Otherwise, this test case can't be used to see if push
5047         mode can truly emulate pull mode.
5048         * tests/input.at (Torturing the Scanner): Likewise.
5049         * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5050         (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5051         AT_YACC_IF, which now includes the case of push mode since %skeleton
5052         need not be used for push mode.  This will be more intuitive once
5053         push.c is renamed to yacc.c.
5055 2006-12-31  Joel E. Denny  <jdenny@ces.clemson.edu>
5057         For push mode, convert yyparse from a macro to a function, invoke yylex
5058         instead of passing a yylexp argument to yypull_parse, and don't
5059         generate yypull_parse or yyparse unless %push-pull-parser is declared.
5060         Discussed starting at
5061         <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5062         * data/bison.m4 (b4_pull_if): New.
5063         * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5064         * data/push.c: Improve M4 quoting a little.
5065         (b4_generate_macro_args, b4_parenthesize): Remove.
5066         (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5067         any time a pull parser is requested.
5068         Don't #define this as a wrapper around yypull_parse.  Instead, when
5069         both push and pull are requested, make it a function that does that
5070         same thing.
5071         (yypull_parse): If there's a b4_prefix, #define this to
5072         b4_prefix[pull_parse] when both push and pull are requested.
5073         Don't define this as a function unless both push and pull are
5074         requested.
5075         Remove the yylexp argument and hard-code yylex invocation instead.
5076         * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5077         %push-parser.
5078         * src/getargs.c (pull_parser): New global initialized to true.
5079         * getargs.h (pull_parser): extern it.
5080         * src/output.c (prepare): Insert pull_flag muscle.
5081         * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5082         (prologue_declaration): Set both push_parser and pull_parser = true for
5083         %push-pull-parser.  Set push_parser = true and pull_parser = false for
5084         %push-parser.
5085         * src/scan-gram.l: Don't accept %push_parser as an alternative to
5086         %push-parser since there's no backward-compatibility concern here.
5087         Scan %push-pull-parser.
5088         * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5089         instead of %push-parser.
5090         * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5091         prototype it in the module that calls yyparse.
5092         * tests/input.at (Torturing the Scanner): Likewise.
5093         * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5095 2006-12-26  Joel E. Denny  <jdenny@ces.clemson.edu>
5097         Update etc/bench.pl.  Optimize push mode a little (the yyn change
5098         deserves most of the credit).
5099         * Makefile.am (SUBDIRS): Add etc subdirectory.
5100         * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5101         * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5102         yytoken, yyval, and yyloc declarations to...
5103         (yyparse or yypush_parse): ... here to improve performance.  For
5104         yypush_parse invocations after the first, be sure to assign yyn its old
5105         value again.
5106         (yypstate_new): Don't bother initializing the yyresult field since the
5107         initial value isn't used.
5108         (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5109         remove the #define that, in push mode, set it to yyps->NAME.
5110         * etc/Makefile.am: New.
5111         * etc/bench.pl: Remove and build it instead from...
5112         * etc/bench.pl.in: ... this new file.  Use @abs_top_builddir@ to invoke
5113         "tests/bison" from the build directory by default rather than just
5114         invoking "bison" from $PATH.
5115         (calc_grammar): Update push parser code: don't declare yylval globally,
5116         don't define yyparse_wrapper, and don't #define yyparse.
5117         (bench_grammar): Update to check all working combinations of yacc.c,
5118         push.c, impure, pure, pull, and push.
5120 2006-12-25  Joel E. Denny  <jdenny@ces.clemson.edu>
5122         For push mode, add pull wrappers around yypush_parse.
5123         * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5124         (yypull_parse): New function wrapping yypush_parse.
5125         (yyparse): New #define wrapping yypull_parse.
5126         * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5127         is declared.
5128         * tests/headers.at (export YYLTYPE): Make yylex global.  For push mode,
5129         prototype yylex in the module that calls yyparse, and don't prototype
5130         yyparse there.  Otherwise, the yyparse expansion won't compile.
5131         * tests/input.at (Torturing the Scanner): Likewise.
5133 2006-12-25  Joel E. Denny  <jdenny@ces.clemson.edu>
5135         Enable push parsers to operate in impure mode.  Thus, %push-parser no
5136         longer implies %pure-parser.  The point of this change is to move
5137         towards being able to test the push parser code by running the entire
5138         test suite as if %push-parser had been declared.
5139         * data/push.c (yypush_parse): For impure mode, remove the
5140         yypushed_char, yypushed_val, and yypushed_loc arguments.
5141         Instead, declare these as local variables initialized to the global
5142         yychar, yylval, and yylloc.
5143         For the first yypush_parse invocation only, restore the initial values
5144         of these global variables when it's time to read a token since they
5145         have been overwritten.
5146         * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5147         %push-parser.
5148         * tests/calc.at (Simple LALR(1) Calculator): Always declare
5149         %pure-parser along with %push-parser since this test case was designed
5150         for pure push parsers.
5151         * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5152         (AT_YACC_OR_PUSH_IF): New.
5153         (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5154         add a note that it's still wrong for some cases (as it has been for a
5155         while).
5156         (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5157         %push-parser no longer implies %pure-parser.
5159 2006-12-20  Joel E. Denny  <jdenny@ces.clemson.edu>
5161         Remove some unnecessary differences between the pull parser code and
5162         the push parser code.  This patch enables yynerrs in push mode.
5163         * data/push.c: Reformat M4 a little.
5164         (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5165         (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5166         because push mode is on.  Instead, if pure mode is on, move yynerrs
5167         to...
5168         (b4_declare_parser_state_variables): ... here.
5169         (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5170         to yyps->NAME so it can be used in yypush_parse.
5171         (yypush_parse): Don't omit uses of yynerrs in push mode.
5173 2006-12-20  Joel E. Denny  <jdenny@ces.clemson.edu>
5175         Fix bug such that the first pushed token's value and location are
5176         sometimes overwritten (sometimes by %initial-action) before being used.
5177         * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5178         yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5179         For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5180         more closely mimic the pull parser logic.
5181         Don't copy the pushed token to yychar, yylval, and yylloc until it's
5182         time to read a token, which is after any initialization of yylval and
5183         yylloc.
5184         (gottoken): Rename label to...
5185         (yyread_pushed_token): ... for clarity and to avoid infringing on the
5186         user namespace.
5188 2006-12-20  Joel E. Denny  <jdenny@ces.clemson.edu>
5190         Rearrange initialization of the parser state variables so that the
5191         skeleton doesn't have to have a copy for pull mode and another for push
5192         mode.  This patch also fixes at least a bug such that yylloc was not
5193         initialized (with b4_location_initial_line and
5194         b4_location_initial_column) upon calling yypush_parse.  However, that
5195         initialization now overwrites the first token's location;
5196         %initial-action assigning @$ already did the same thing, and both bugs
5197         will be fixed in a later patch.
5198         * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5199         (b4_declare_parser_state_variables): Remove initialization of yytoken,
5200         yyss, yyvs, yyls, and yystacksize.
5201         (yypstate_new): Remove initialization of some yypstate fields: yystate,
5202         yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5203         yylsp.
5204         (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5205         yyps->NAME so it can be used in yypush_parse.
5206         (yyparse or yypush_parse): For yypush_parse, don't print the
5207         "Starting parse" diagnostic for invocations after the first.
5208         Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5209         yypush_parse, only do it for the first invocation.
5210         Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5211         initialization to occur in yypush_parse but only on the first
5212         invocation.
5214 2006-12-19  Joel E. Denny  <jdenny@ces.clemson.edu>
5216         * data/push.c: Add CPP guards around push parser declarations in both
5217         the header and the code file.
5218         In the code file, move the push parser declarations to the same place
5219         they appear in the header file.
5220         Clean up the M4 some, especially the inconsistent underquoting in
5221         some b4_c_function_def and b4_c_function_decl uses.
5223 2006-12-19  Joel E. Denny  <jdenny@ces.clemson.edu>
5225         Encapsulate the push parser state variables into an M4 macro so the
5226         push skeleton doesn't have to list them again for pull mode's yyparse.
5227         For push mode, remove yypush_parse's local equivalents of these
5228         variables to eliminate unnecessary copying between the two sets at
5229         run-time.  This patch also fixes at least a bug related to multiple
5230         %initial-action invocations in push mode.
5231         * data/push.c (b4_declare_parser_variables): Rename to...
5232         (b4_declare_scanner_communication_variables): ... this for clarity and
5233         update both uses.
5234         (b4_declare_yyparse_variables): Remove and move its contents to the one
5235         spot where it was invoked.
5236         (b4_declare_parser_state_variables): New macro containing the parser
5237         state variables required by push mode.
5238         (struct yypstate): Replace all fields but yynew with
5239         b4_declare_parser_state_variables.
5240         (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5241         yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5242         each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5243         (yyparse or yypush_parse): For yyparse in pull mode, replace local
5244         parser state variable declarations with
5245         b4_declare_parser_state_variables.
5246         Don't initialize parser state variables when calling yypush_parse since
5247         yypstate_new already does that.
5248         Invoke the user's initial action only upon the first yypush_parse
5249         invocation.
5250         Remove all code that copies between the local parser state variables
5251         and the yypstate.
5253 2006-12-19  Joel E. Denny  <jdenny@ces.clemson.edu>
5255         * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5256         prevent a name collision in a future patch where these names will
5257         sometimes be #define'd.
5258         (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5259         since it no longer has the same name as the existing argument.
5260         (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5262 2006-12-19  Paolo Bonzini  <bonzini@gnu.org>
5263         and Joel E. Denny  <jdenny@ces.clemson.edu>
5265         * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5266         that the argument is case-insensitive, and there's no `=' here.
5267         For the %skeleton entry, mention that %language is better.
5268         (Bison Options): Likewise for --language and --skeleton.  Move the
5269         --skeleton entry so that the `Tuning the parser' section is sorted
5270         alphabetically on long options.
5271         (C++ Bison Interface): Don't use the word skeleton.  Don't explain the
5272         %language directive in detail here; cross-reference the %language
5273         documentation instead.
5274         (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5275         `%require "2.3b"' so that the example is always up-to-date.
5276         (Table of Symbols): Add entries for %language and %skeleton.
5277         * examples/extexi (normalize): Instead of replacing every %require
5278         argument with the current Bison version, just substitute for
5279         `@value{VERSION}'.  This guarantees that we're testing what actually
5280         appears in the documentation.
5281         * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5282         rather than `@VERSION@'.
5284 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5286         * NEWS: Reword the %language news a bit, and put it earlier.
5288         * src/getargs.c (skeleton_arg): Last arg is now location const *.
5289         Rewrite to simplify the logic.
5290         (language_argmatch): Likewise.
5291         (program_name): We now own this var.
5292         * src/getargs.h (struct bison_language): Use char[] rather than
5293         const char *.
5295         * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5296         Java is supported.
5297         * src/complain.c (program_name): Remove decl; no longer needed.
5298         * src/main.c (program_name): Remove; now belongs to getargs.
5300 2006-12-18  Paolo Bonzini  <bonzini@gnu.org>
5302         * NEWS: Document %language.
5304         * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5306         * data/c-skel.m4, data/c++-skel.m4: New files.
5307         * data/glr.c: Complain on push parsers.
5309         * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5310         over %skeleton.
5311         (Decl Summary): Document %language and %skeleton.
5312         (Command line): Document -L.
5314         * examples/extexi: Rewrite %require directive.
5315         * examples/calc++/Makefile.am: Pass VERSION to extexi.
5317         * src/files.c (compute_exts_from_gc): Look in language structure
5318         for .y extension.
5319         (compute_file_name_parts): Check whether .tab should be added.
5320         * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5321         (language, skeleton_arg, language_argmatch): New.
5322         (long_options): Add --language.
5323         (getargs): Use skeleton_arg, add -L/--language.
5324         * src/getargs.h: Include location.h.
5325         (struct bison_language, language, skeleton_arg, language_argmatch): New.
5326         * src/output.c (prepare): Pick default skeleton from struct language.
5327         Don't dispatch C skeletons here.
5328         * src/parse-gram.y (PERCENT_LANGUAGE): New.
5329         (prologue_declaration): Add "%language" rule, use skeleton_arg.
5330         * src/scan-gram.l ("%language"): New rule.
5332         * tests/calc.at: Test %skeleton and %language.
5333         * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5334         (AT_GLR_IF): Look for %skeleton "glr.cc".
5335         (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5336         (AT_YACC_IF): Reject %language.
5338 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5340         * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5341         since it wasn't used; only the typedef name 'semantic_type' is needed.
5342         Also, omit trailing white space.
5344         * bootstrap: Sync from coreutils.
5345         (gnulib_extra_files): Add build-aux/announce.gen.
5346         (slurp): Adjust .gitignore files like .cvsignore files.
5347         * build-aux/announce-gen: Remove from CVS, since bootstrap
5348         now creates this.
5350 2006-12-16  Joel E. Denny  <jdenny@ces.clemson.edu>
5352         Make %push-parser imply %pure-parser.  This fixes several bugs; see
5353         <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5354         * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5355         pure_parser = true.
5356         * data/push.c: Don't bother testing b4_push_if when deciding whether
5357         to expand b4_declare_parser_variables globally.
5358         (yypush_parse): Likewise in here.
5360         * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5361         (yy_reduce_print): Reformat M4 for readability.
5363 2006-12-15  Bob Rossi  <bob@brasko.net>
5364         and Joel Denny  <jdenny@ces.clemson.edu>
5366         * data/push.c (yypstate): Add typedef, and update all uses of
5367         struct yypstate to just yypstate.
5368         * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5370 2006-12-14  Bob Rossi  <bob@brasko.net>
5372         * data/push.c (yypush_parse): Declare prototype regardless of
5373         %locations option.
5375 2006-12-14  Bob Rossi  <bob@brasko.net>
5377         * data/push.c (yyparse): Remove the prototype and the #define when in
5378         push-parser mode.
5380 2006-12-13  Bob Rossi  <bob@brasko.net>
5382         * data/push.c (yypstate_init): Rename to...
5383         (yypstate_new): ... this and use b4_c_function_def.
5384         (yypstate_delete): New.
5385         (yypush_parse): Change parameters yynval and yynlloc to be const.
5386         * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5387         yypstate_delete functions.
5389 2006-12-13  Joel E. Denny  <jdenny@ces.clemson.edu>
5391         * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5392         strange test case titles.  Reported by Bob Rossi.
5394 2006-12-13  Paul Eggert  <eggert@cs.ucla.edu>
5396         * TODO: Add pointer to Sylvain Schmitz's work on static detection
5397         of potential ambiguities in GLR grammers.
5399 2006-12-12  Joel E. Denny  <jdenny@ces.clemson.edu>
5401         * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5402         `bison ', use m4_index instead of m4_substr since chopping up a string
5403         containing M4-special characters causes problems here.
5405         Fix a couple of bugs related to special characters in user-specified
5406         file names, and make it easier for skeletons to compute output file
5407         names with the same file name prefix as Bison-computed output file
5408         names.
5409         * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5410         b4_parser_file_name and b4_spec_defines_file instead of
5411         @output_parser_name@ and @output_header_name@, which are now redundant.
5412         * data/glr.c, data/lalr1.cc: Likewise.  Also, in header #include's, use
5413         b4_parser_file_name, b4_spec_defines_file, and the new
5414         @basename(FILENAME@) instead of @output_parser_name@ and
5415         @output_header_name@, which inappropriately escaped the file names as
5416         C string literals.
5417         * src/files.c (all_but_ext): Remove static qualifier.
5418         (compute_output_file_names): Move `free (all_but_ext)' to...
5419         (output_file_names_free): ... here since all_but_ext is needed later.
5420         * src/files.h (all_but_ext): Extern.
5421         * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5422         exactly what MUSCLE_INSERT_STRING used to do.
5423         (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5424         characters are escaped properly.
5425         * src/output.c (prepare): Define muscle file_name_all_but_ext as
5426         all_but_ext.
5427         For pkgdatadir muscle, maintain previous functionality by using
5428         MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING.  The problem
5429         is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5430         digraphs would never be expanded.  Hopefully no one has M4-special
5431         characters in his Bison installation path.
5432         * src/scan-skel.l: Don't parse @output_header_name@ and
5433         @output_parser_name@ anymore since they're now redundant.
5434         In @output, use decode_at_digraphs.
5435         Parse a new @basename command that invokes last_component.
5436         (decode_at_digraphs): New.
5437         (BASE_QPUTS): Remove unused.
5438         * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5439         (Output file name): New tests.
5441 2006-12-09  Joel E. Denny  <jdenny@ces.clemson.edu>
5443         Warn about output files that are generated by the skeletons and that
5444         conflict with other output files.
5445         * data/glr.c: Don't generate the header file here when glr.cc does.
5446         * src/files.c (file_names, file_names_count): New static globals.
5447         (compute_output_file_names): Invoke output_file_name_check for files
5448         not generated by the skeletons and remove existing checks.
5449         (output_file_name_check): New function that warns about conflicting
5450         output file names.
5451         (output_file_names_free): Free file_names.
5452         * src/files.h (output_file_name_check): Declare.
5453         * src/scan-skel.l: Invoke output_file_name_check for files generated by
5454         the skeletons.
5455         * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5456         (Conflicting output files): New tests.
5458 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5460         * doc/bison.texinfo: Fix a couple of typos.
5462 2006-12-08  Bob Rossi  <bob@brasko.net>
5464         * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5465         Rename to...
5466         (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5467         update all uses.
5468         (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5469         (yypush_parse): Rename yypvars argument to yyps and remove redundant
5470         local pv.
5471         (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5472         * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5474 2006-12-07  Bob Rossi  <bob@brasko.net>
5475         and Joel Denny  <jdenny@ces.clemson.edu>
5477         * data/push.c (yypvarsinit): Change return type from void* to struct
5478         yypvars*. No longer cast to void* on return.
5479         (struct yypvars): Remove yylen since it need not be remembered between
5480         yypushparse invocations.
5481         (yypushparse): Don't copy between yylen and pv->yylen.
5483 2006-12-05  Bob Rossi  <bob@brasko.net>
5485         * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5486         (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5487         (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5488         (struct yypvars): Remove b4_declare_parser_variables.
5489         (yypvarsinit): Remove init code for removed variables.
5490         (global scope): Do not declare b4_declare_parser_variables if
5491         push or pure mode.
5492         (yypushparse): Add b4_declare_parser_variables.
5493         Init new local variables, and remove init code for removed
5494         yypvars variables.
5495         (yyparse): Delete.
5496         * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5497         and yyparse for other modes.
5498         (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5499         * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5500         (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5501         (AT_PURE_LEX_IF): True if pure or push parser.
5503 2006-12-05  Joel E. Denny  <jdenny@ces.clemson.edu>
5505         Document Yacc prologue alternatives and default %destructor's and
5506         %printer's as experimental.  Don't mention Java yet.  Discussed at
5507         <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5508         * NEWS (2.3a+): Say they're experimental.  Remove any mention of Java.
5509         (2.3a): Annotate this entry to say the old forms of these features were
5510         also experimental.
5511         * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5512         Table of Symbols): Say they're experimental.  Comment out any mention
5513         of Java (we'll want this back eventually).
5515 2006-12-01  Joel E. Denny  <jdenny@ces.clemson.edu>
5517         Support a file name argument to %defines.  Deprecate `=' in
5518         %file-prefix, %name-prefix, and %output.  Discussed at
5519         <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5520         * NEWS (2.3a+): Mention.
5521         * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5522         form of %defines, and remove `=' from entries for %file-prefix,
5523         %name-prefix, and %output.
5524         * src/parse-gram.y (prologue_declaration): Implement.
5525         * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5526         LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5527         all but one occurrence of %name-prefix.
5528         * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5529         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5530         * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5531         occurrence of each of %file-prefix and %output.  Add check for %defines
5532         with argument.
5533         * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5534         Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5535         Remove the `=' from %output.
5537 2006-11-21  Joel E. Denny  <jdenny@ces.clemson.edu>
5539         Don't escape $ in test case titles since Autoconf 2.61 now does that
5540         correctly.
5541         * tests/actions.at (Default %printer and %destructor are not for error
5542         or $undefined): Here.
5543         (Default %printer and %destructor are not for $accept): Here.
5544         * tests/input.at (Invalid $n and @n): Here.
5546 2006-11-20  Joel E. Denny  <jdenny@ces.clemson.edu>
5548         Rename <!> to <>.  Discussed starting at
5549         <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5550         * NEWS (2.3a+): Update.
5551         * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5552         Update.
5553         * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5554         * src/scan-gram.l (INITIAL): Implement.
5555         * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5556         * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5557         comment.
5558         * tests/actions.at (Default tagless %printer and %destructor,
5559         Default tagged and per-type %printer and %destructor,
5560         Default %printer and %destructor are not for error or $undefined,
5561         Default %printer and %destructor are not for $accept,
5562         Default %printer and %destructor for mid-rule values): Update.
5563         * tests/input.at (Default %printer and %destructor redeclared,
5564         Unused values with default %destructor): Update.
5566 2006-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
5568         Don't let %prec take a nonterminal.
5569         * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5570         token.
5571         * tests/input.at (%prec takes a token): New test checking that %prec
5572         won't take a nonterminal.
5574 2006-11-10  Joel E. Denny  <jdenny@ces.clemson.edu>
5576         * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5577         it was double-quoted.
5578         * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5579         grammar is maintained with Bison's highest standards.
5580         * src/getargs.c: Fix some typos in Doxygen comments.
5582 2006-11-10  Joel E. Denny  <jdenny@ces.clemson.edu>
5584         Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5585         later.  Reported by Paul Eggert in
5586         <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5587         * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5588         * src/scan-code.l (translate_action): Don't bother invoking
5589         yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5590         (code_scanner_free): Instead of invoking
5591         yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5592         which frees more.
5593         * src/scan-gram.l (gram_scanner_free): Likewise.
5594         * src/scan-skel.l (scan_skel): Likewise.
5596 2006-11-09  Joel E. Denny  <jdenny@ces.clemson.edu>
5598         * src/files.c (tr): Change return type to void.
5599         * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5600         has been called previously for the same key.
5601         (muscle_find): Return storage instead of value so that
5602         --enable-gcc-warnings doesn't produce warnings that the return discards
5603         const.  aver that the value and storage are the same since storage
5604         could potentially be NULL when value is not.
5605         * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5606         same as 0.
5608 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5610         * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5611         the earlier change today), m4/intl.m4, m4/intldir.m4.  This gives
5612         us a slightly cleaner distribution, and also works.
5613         * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5614         gnulib changes.
5616 2006-11-08  Joel E. Denny  <jdenny@ces.clemson.edu>
5617         and Paul Eggert  <eggert@cs.ucla.edu>
5619         Don't let Bison leak memory except when it complains.
5620         * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5621         (spec_defines_file, dir_prefix): Now char *, not const char *,
5622         since they are freed.
5623         * src/files.c: Likewise.
5624         (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5625         Likewise.
5626         (tr): Now operates in-place.  All uses changed.
5627         (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5628         values.
5629         (compute_file_name_parts, compute_output_file_names): Don't store
5630         read-only data in variables that will be freed.
5631         (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5632         src_extension, and header_extension.
5633         (output_file_names_free): New public function to free
5634         spec_verbose_file, spec_graph_file, spec_defines_file,
5635         parser_file_name, and dir_prefix.
5636         * src/getargs.c (getargs): Don't store read-only data in variables that
5637         will be freed.
5638         * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5639         (which previously existed but was unused), and quotearg_free.
5640         * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5641         * src/muscle_tab.c: Likewise.
5642         (muscle_entry): Make the value char const *,
5643         and add a new storage member that is char * and can be freed.
5644         (muscle_entry_free): New private function.
5645         (muscle_init): Use it instead of free.
5646         (muscle_insert, muscle_grow): Update and use new storage member.
5647         (muscle_code_grow): Free the string passed to muscle_grow
5648         since it's not needed anymore.
5649         * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5650         add a new `char *code' member.
5651         ("{...}"): Declare semantic type as code.
5652         * src/scan-code.h (translate_rule_action):
5653         (translate_symbol_action, translate_code, translate_action): Return
5654         `char const *' rather than `char *' since external code should not free
5655         these strings.
5656         * src/scan-code.l: Likewise.
5657         * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5658         which is "{...}" in the parser.
5659         * tests/Makefile.am (maintainer-check-valgrind): Set
5660         VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5661         Valgrind.
5662         * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5663         complain.
5664         * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5665         expecting a non-zero exit status sets --leak-check=summary and
5666         --show-reachable=no for Valgrind.  Bison unabashedly leaks memory in
5667         this case, and we don't want to hear about it.
5669 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5671         * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5672         instead of from the template, to simplify configuration a bit.
5673         * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5674         and m4/wint_t.m4, as they are needed with the latest gnulib.
5676 2006-10-31  Joel E. Denny  <jdenny@ces.clemson.edu>
5678         Disable unset/unused mid-rule value warnings by default, and recognize
5679         --warnings=midrule-values to enable them.  Discussed starting at
5680         <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5681         * NEWS (2.3a+): Mention.
5682         * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5683         warnings): Add entry for midrule-values subargument.
5684         * src/reader.c (symbol_should_be_used): Don't return true just because
5685         the value is a set/used mid-rule value unless
5686         --warnings=midrule-values was specified.
5687         * tests/input.at (Unused values, Unused values before symbol
5688         declarations): Run tests with and without --warnings=midrule-values.
5690         * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5691         than LIST_FREE directly.
5693 2006-10-31  Joel E. Denny  <jdenny@ces.clemson.edu>
5695         Finish implementing --warnings=error, which should not be implied by
5696         --warnings=all (or by its synonyms -W and --warnings without
5697         subarguments).
5698         * src/complain.c (set_warning_issued): New function to report that
5699         warnings are being treated as errors and to record an error if so.
5700         Invoke...
5701         (warn_at, warn): ... here.
5702         * src/getargs.c (warnings_args, warnings_types): Reorder so that
5703         "error - warnings are errors" does not appear above "all - all of the
5704         above".
5705         (getargs): For -W and --warnings without subarguments, don't let
5706         FLAGS_ARGMATCH set warnings_error in warnings_flag.
5707         * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5709 2006-10-31  Joel E. Denny  <jdenny@ces.clemson.edu>
5711         * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5712         empty subargument list.  For example: `bison  --warnings=  parser.y'.
5714 2006-10-21  Joel E. Denny  <jdenny@ces.clemson.edu>
5716         * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5717         the parser header file so that gcc doesn't warn.
5719 2006-10-21  Joel E. Denny  <jdenny@ces.clemson.edu>
5721         Split the default %destructor/%printer into two kinds: <*> and <!>.
5722         Discussed starting at
5723         <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5724         * NEWS (2.3a+): Mention.
5725         * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5726         previous change today related to mid-rules.
5727         (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5728         * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5729         (TYPE_TAG_ANY): Add as <*>.
5730         (TYPE_TAG_NONE): Add as <!>.
5731         (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5732         for <*> and <!>.
5733         * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5734         (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5735         * src/symlist.c (symbol_list_default_new): Split into tagged and
5736         tagless versions.
5737         (symbol_list_destructor_set, symbol_list_printer_set): Split
5738         SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5739         SYMLIST_DEFAULT_TAGLESS.
5740         * src/symlist.h: Update symbol_list_default*_new prototypes.
5741         (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5742         SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5743         * src/symtab.c (default_destructor, default_destructor_location,
5744         default_printer, default_printer_location): Split each into tagged and
5745         tagless versions.
5746         (symbol_destructor_get, symbol_destructor_location_get,
5747         symbol_printer_get, symbol_printer_location_get): Implement tagged
5748         default and tagless default cases.
5749         (default_destructor_set, default_printer_set): Split each into tagged
5750         and tagless versions.
5751         * src/symtab.h: Update prototypes.
5752         * tests/actions.at (Default %printer and %destructor): Rename to...
5753         (Default tagless %printer and %destructor): ... this, and extend.
5754         (Per-type %printer and %destructor): Rename to...
5755         (Default tagged and per-type %printer and %destructor): ... this, and
5756         extend.
5757         (Default %printer and %destructor for user-defined end token): Extend.
5758         (Default %printer and %destructor are not for error or $undefined):
5759         Update.
5760         (Default %printer and %destructor are not for $accept): Update.
5761         (Default %printer and %destructor for mid-rule values): Extend.
5762         * tests/input.at (Default %printer and %destructor redeclared): Extend.
5763         (Unused values with default %destructor): Extend.
5765 2006-10-21  Joel E. Denny  <jdenny@ces.clemson.edu>
5767         Don't apply the default %destructor/%printer to an unreferenced midrule
5768         value.  Mentioned at
5769         <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5770         * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5771         like $@n instead of just @n so that the default %destructor/%printer
5772         logic doesn't see them as user-defined symbols.
5773         (symbol_is_dummy): Check for both forms of the name.
5774         * src/reader.c (packgram): Remove the `$' from each midrule symbol
5775         name for which the midrule value is referenced in any action.
5776         * tests/actions.at (Default %printer and %destructor for mid-rule
5777         values): New test.
5778         * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5779         for change to dummy symbol names.
5781 2006-10-20  Joel E. Denny  <jdenny@ces.clemson.edu>
5783         Warn about unset midrule $$ if the corresponding $n is used.
5784         * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5785         $n usage.
5786         (packgram): Before invoking grammar_rule_check on any rule, make sure
5787         all actions have already been scanned in order to set `used' flags.
5788         Otherwise, checking that a midrule's $$ is set will not always work
5789         properly because the midrule check must forward-reference the midrule's
5790         parent rule.
5791         * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5792         warning.
5794 2006-10-20  Joel E. Denny  <jdenny@ces.clemson.edu>
5796         More improvements to the documentation of the prologue alternatives:
5797         * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5798         Bison manual.
5799         * doc/bison.texinfo (Prologue Alternatives): Correct some errors.  Add
5800         some text to clarify the relative importance of the new directives and
5801         to show how these directives may be viewed as code labels.
5803 2006-10-16  Joel E. Denny  <jdenny@ces.clemson.edu>
5805         Similar to the recently removed %before-header, add %code-top as the
5806         alternative to the pre-prologue.  Mentioned at
5807         <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5808         Also, let the prologue alternatives appear in the grammar section.
5809         * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5810         (prologue_declaration): Move the existing prologue alternatives to...
5811         (grammar_declaration): ... here and add %code-top.
5812         * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5814         Clean up and extend documentation for the prologue alternatives.
5815         * NEWS (2.3a+): Describe prologue alternatives.
5816         * doc/bison.texinfo (Prologue): Move discussion of prologue
5817         alternatives to...
5818         (Prologue Alternatives): ... this new section, and extend it to discuss
5819         all 4 directives in detail.
5820         (Table of Symbols): Clean up discussion of prologue alternatives and
5821         add %code-top.
5823 2006-10-16  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
5825         DJGPP specific issues.
5827         * djgpp/config.bat: config.hin has been moved to lib. Adjust
5828         config.bat accordingly.
5829         * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5830         * djgpp/config.site: Likewise.
5832 2006-10-16  Paolo Bonzini  <bonzini@gnu.org>
5834         Replace %*-header with %provides, %requires, %code.  See discussion at
5835         http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5837         * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5838         (b4_user_start_header): Remove.
5839         * data/glr.c: Use new macros instead of b4_*start_header
5840         and b4_*end_header.
5841         * data/glr.cc: Likewise.
5842         * data/lalr1.cc: Likewise.
5843         * data/push.c: Likewise.
5844         * data/yacc.c: Likewise.
5846         * doc/bison.texinfo: Remove %before-header, rename
5847         %{start,end,after}-header to %requires, %provides, %code.
5849         * src/parse-gram.y: Likewise (also rename token names accordingly).
5850         * src/scan-gram.l: Likewise.
5851         * tests/actions.at: Likewise.
5853 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
5855         * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5856         Problem reported by Joel E. Denny.
5858 2006-10-14  Jim Meyering  <jim@meyering.net>
5860         (Sync from coreutils.)
5861         Work also when the working directory (with e.g. coreutils sources)
5862         is version controlled with git, rather than CVS.
5863         * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5864         rather than CVS.
5865         In messages and comments, say e.g., "checked-out sources",
5866         rather than "CVS sources".
5867         (version_controlled_file): New function.  Work for git as well as
5868         for CVS.  Don't use grep's -q option.
5869         (slurp): Call it here, in place of CVS-specific code.
5871 2006-10-14  Joel E. Denny  <jdenny@ces.clemson.edu>
5873         Fix testsuite for ./configure --enable-gcc-warnings:
5874         * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5875         Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5876         __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5877         * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5878         * test/regression.at (Diagnostic that expects two alternatives):
5879         Likewise.
5881 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5883         * bootstrap.conf (gnulib_modules): Add config-h.
5884         * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5885         worry about HAVE_CONFIG_H.
5886         * lib/abitset.c: Likewise.
5887         * lib/bitset.c: Likewise.
5888         * lib/bitset_stats.c: Likewise.
5889         * lib/bitsetv-print.c: Likewise.
5890         * lib/bitsetv.c: Likewise.
5891         * lib/ebitset.c: Likewise.
5892         * lib/get-errno.c: Likewise.
5893         * lib/lbitset.c: Likewise.
5894         * lib/subpipe.c: Likewise.
5895         * lib/timevar.c: Likewise.
5896         * lib/vbitset.c: Likewise.
5897         * lib/bitset.c: Include "bitset.h" first, to test interface.
5898         * lib/bitset_stats.c: Include "bitset_stats.h" first.
5899         * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5900         * lib/bitsetv.c: Include "bitsetv.h" first.
5901         * lib/get-errno.c: Include "get-errno.h" first.
5902         * m4/.cvsignore: Add config-h.m4.
5903         * tests/actions.at (Default %printer and %destructor for ...):
5904         Adjust expected line numbers in output to reflect removal of #if
5905         HAVE_CONFIG_H lines.
5906         * tests/glr-regression.at (Missed %merge type warnings when ...):
5907         Likewise.
5908         * tests/regression.at (Braced code in declaration in rules section):
5909         Likewise.
5910         * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5911         * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5912         Include <config.h> unconditionally.
5914         * bootstrap: Sync from coreutils, as follows:
5916         2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5918         * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5919         variable was sometimes used without being initialized.  This
5920         messed up the installation of the INSTALL file in some cases.
5922         2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5924         * bootstrap (usage, main program, symlink_to_gnulib): Add option
5925         --copy.  Inspired by a suggestion from Bruno Haible.
5927         2006-10-03  Jim Meyering  <jim@meyering.net>
5929         * bootstrap: Undo last change to this file, since now gnulib-tool
5930         sticks with the automake default in generating dependencies.
5932 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5934         * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5935         the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5937         * doc/bison.1: Add copyright notice.
5939         * data/glr.c: Don't include <stdarg.h>; not used.
5941         * NEWS: The -g and --graph options now output graphs in Graphviz
5942         DOT format, not VCG format.
5943         * doc/bison.1: Likewise.
5944         * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5945         * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5946         of this change in
5947         <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5948         * TODO: Remove Graphviz entry.
5949         * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5950         remove vcg.c, vcg.h, vcg_defaults.h.
5951         * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5952         * src/graphviz.c, src/graphviz.h: New files.
5953         * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5954         * src/files.h: Make comment more generic.
5955         * src/main.c (main): Likewise.
5956         * src/print_graph.h: Likewise.
5957         * src/getargs.c (usage): Make usage description more generic.
5958         * src/print_graph.c: Include graphviz.h rather than vcg.h.
5959         (static_graph, fgraph): Remove.  All uses changed to pass
5960         arguments instead of sharing a static var.
5961         (print_core, print_actions, print_state, print_graph):
5962         Output graphviz format rather than VCG format.
5963         * tests/.cvsignore: Remove *.vcg; add *.dot.
5964         * tests/output.at: Expect *.dot files, not *.vcg files.
5966         * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5967         accommodates the 2006-10-08 change.
5969 2006-10-11  Bob Rossi  <bob@brasko.net>
5971         * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5972         (b4_yyssa, b4_yyerror_range): New macros.
5973         (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5974         (yypvarsinit): Remove init of removed fields.
5975         (yypushparse): Remove use of removed fields; use new macros instead.
5977 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5979         * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5980         in a push parser.  Reindent slightly to match yacc.c better.
5982 2006-10-11  Bob Rossi  <bob@brasko.net>
5984         * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5985         yymsg_alloc fields.
5986         (yypvarsinit, yypushparse): Remove init of removed fields.
5987         (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5989 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5991         * THANKS: Add Paolo Bonzini and Bob Rossi.
5993 2006-10-08  Paolo Bonzini  <bonzini@gnu.org>
5995         * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5996         b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5997         b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5998         b4_define_user_cde and uses): Remove.
5999         (b4_comment, b4_prefix, b4_sync_start): New.
6000         * data/bison.m4: New file, with most of the content removed from c.m4.
6001         * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6002         * src/output.c (output_skeleton): Pass bison.m4.
6003         (prepare): Pass glr_flag and nondeterministic_flag.  Pass prefix
6004         only if specified.
6006 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6008         Fix test failure reported by Tom Lane in
6009         <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6010         and try to make such failures easier to catch in the future.
6011         * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6012         that's now the caller's responsibility.
6013         (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6014         Set yychar = YYEOF if it's negative.
6015         * tests/actions.at (yylex): Abort if asked to read past EOF.
6016         * tests/conflicts.at (yylex): Likewise.
6017         * tests/cxx-type.at (yylex): Likewise.
6018         * tests/glr-regression.at (yylex): Likewise.
6019         * tests/input.at (yylex): Likewise.
6020         * tests/regression.at (yylex): Likewise.
6021         * tests/torture.at (yylex): Likewise.
6023 2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>
6025         Fix problems with translating English-language diagnostics.
6026         * bootstrap: Fix bug introduced in recent bootstrap changes, with
6027         respect to bison-runtime pot generation.  The YY_ stuff
6028         wasn't being captured.
6029         * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6030         * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6031         * runtime-po/POTFILES.in: Add data/push.c.
6033 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
6035         Merge bootstrap changes from coreutils.
6037         2006-09-28  Jim Meyering  <jim@meyering.net>
6039         Automatically generated dependencies are important even
6040         when all of the sources in a directory come from gnulib.
6041         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6042         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6044         2006-09-23  Jim Meyering  <jim@meyering.net>
6046         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6048         2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6050         * bootstrap: Add support for --force.
6051         (usage): New function.  Describe usage less tersely.
6052         (CVS_only_file): New var.
6054 2006-09-21  Paul Eggert  <eggert@cs.ucla.edu>
6056         * data/push.c (YYPUSH_MORE): Make it an enum instead.
6057         (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6058         Adjust white space and comments to match GNU style better.
6060 2006-09-20  Bob Rossi  <bob@brasko.net>
6062         * data/push.c (yyresult_get): Remove function.
6063         (YYPUSH_MORE): Add #define.
6064         (yypushparse): Modify return value.
6066 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6068         * stamp-h.in: Remove; no longer needed.
6069         * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6070         Remove config.h, config.hin, intl (no longer created).
6071         * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6072         stamp-h1.
6074         Sync bootstrap from coreutils, as follows:
6076         2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6078         * bootstrap (symlink_to_gnulib): New function.
6079         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6080         to copies-of-gnulib.
6081         (cp_mark_as_generated, slurp, gnulib_files):
6082         Avoid making a copy if it's the same as the old version.
6083         (gnulib_files): Add support for this variable (used by Bison).
6085 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6087         * src/getargs.c (usage): Rework to use conventions similar to
6088         coreutils, to make translation a bit easier and the code a bit
6089         smaller.  Problem reported by Tim Van Holder.
6091 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6093         Use some of gnulib's new modules, taken from coreutils.
6095         * bootstrap: Sync from coreutils, except add support for gnulib_files.
6096         * bootstrap.conf: New file.
6097         (gnulib_modules): Add configmake, inttypes, unistd.
6098         (XGETTEXT_OPTIONS): Add complain, complain_at,
6099         fatal, fatal_at, warn, warn_at, unexpected_end.
6100         * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6101         (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6102         (gl_EARLY): Add.
6103         (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6104         (gl_INIT): Add
6105         (GNULIB_AUTOCONF_SNIPPET): Remove.
6106         (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6107         the pickiest.
6108         * lib/.cvsignore: Add inttypes_.h.
6109         * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6110         (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6111         (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6112         no-longer-necessary initializations.
6113         (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6114         * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6115         use the unistd module.
6116         * src/system.h: Likewise.
6117         * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6118         ulonglong.m4.  Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6119         gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6120         * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6121         (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6122         * src/system.h: Include inttypes.h unconditionally, now that we
6123         use the inttypes module.  Don't bother to include stdint.h, since
6124         inttypes.h now does that for us.
6125         (LOCALEDIR): Remove, now that we use the configmake module.
6126         * src/getargs.c: Include configmake.h.
6127         * src/main.c: Likewise.
6128         * src/output.c: Likewise.
6129         * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6130         not from $abs_top_builddir, since config.h moved.
6133         Port to GCC 2.95.  First two problems reported by Michael Deutschmann in
6134         <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6136         * src/parse-gram.y (symbol_declaration): Don't put statements
6137         before declarations; it's not portable to C89.
6138         * src/scan-code.l (handle_action_at): Likewise.
6140         * src/scan-code.l: Always initialize braces_level; the old code
6141         left it uninitialized and therefore had undefined behavior.
6143         Don't attempt to redefine 'assert', since it runs afoul of
6144         systems where standard headers (mistakenly) include <assert.h>.
6145         Instead, define and use our own alternative, called 'aver'.
6146         * src/reader.c: Don't include assert.h, since we no longer
6147         use assert.
6148         * src/scan-code.l: Likewise.
6149         * src/system.h (assert): Remove, replacing with....
6150         (aver): New function, taking a bool arg.  All uses changed.
6151         * src/tables.c (pack_vector): Ensure that aver arg is bool,
6152         not merely an integer.
6154 2006-09-15  Bob Rossi  <bob@brasko.net>
6156         * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6157         * data/c.m4 (YYPUSH): New.
6158         (b4_push_if): New macro.  Use it instead of #ifdef YYPUSH.
6159         * src/getargs.c (push_parser): New var.
6160         * src/getargs.h (push_parser): New declaration.
6161         * src/output.c (prepare): Add macro insertion of `push_flag'.
6162         * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6163         (prologue_declaration): Parse %push-parser.
6164         * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6165         * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6166         list of removed lines from the traces observed.
6167         (AT_CHECK_CALC_LALR): Added push parser tests.
6169 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
6171         * NEWS: Version 2.3a.
6172         * configure.ac (AC_INIT): Likewise.
6174         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6175         "#define YYSTYPE int" that caused "make maintainer-check" to fail
6176         due to header ordering dependencies.  I don't know why the #define
6177         was there.
6179         Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6180         runtime cost when YYDEBUG is not defined, and so that some tests
6181         that used to fail now work.  Problem and initial suggestion by
6182         Paolo Bonzini.
6183         * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6184         * data/glr.cc (b4_parser_class_name):
6185         Initialize yycdebug_ only if YYDEBUG.  Also, initialize yydebug_.
6186         (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6187         (yydebug_) [YYDEBUG]: New member.
6188         (yycdebug_): Now defined only if YYDEBUG.
6189         * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6190         (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6191         (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6192         if YYYDEBUG.
6193         (debug_stream, set_debug_stream, debug_level, set_debug_level):
6194         Define only if YYDEBUG.
6195         * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6196         set_debug_level.
6197         * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6198         * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6199         AT_CHECK_CALC_GLR_CC that are working now.
6201 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
6203         * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6204         We don't need them in glr.cc, and glr.c defines them.
6205         Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6206         assumes that defining it to anything is the same as defining
6207         it to 1.  Problem reported by Paolo Bonzini.
6209 2006-09-12  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
6211         * data/c.m4 (b4_null, b4_case): Define.
6212         * src/output.c (prepare_symbols): Use b4_null.
6213         (user_actions_output): Use b4_case.
6215 2006-09-11  Paul Eggert  <eggert@cs.ucla.edu>
6217         * data/glr.c (b4_shared_declarations): Put start-header first,
6218         before any #includes that we generate, so that feature-test
6219         macros work.  Problem reported by Michael Deutschmann in
6220         <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6221         * data/lalr1.cc: Likewise.
6222         * doc/bison.texinfo (Prologue): Document that feature-test macros
6223         should be defined before any Bison declarations.
6224         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6225         that depend on location.hh after, not before, Bison decls, since
6226         we now include location.hh after the first user prologue.
6228         * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6229         Sander Brandenburg in
6230         <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6231         Also, fix minor white space and comment issues.
6232         (Prologue): Mention that it's better to define feature-test macros
6233         before Bison declarations.  Problem reported by Michael Deutschmann.
6235         * README-cvs: Fix typo: "&" should be "&&".  Problem reported
6236         by Jim Meyering.
6237         * m4/.cvsignore: Add argmatch.m4.  Remove obstack.m4, strerror_r.m4.
6238         This adjusts to recent gnulib changes.
6240 2006-09-04  Joel E. Denny  <jdenny@ces.clemson.edu>
6242         Finish implementation of per-type %destructor/%printer.  Discussed
6243         starting at
6244         <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6245         and
6246         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6247         * NEWS (2.3+): Add a description of this feature to the default
6248         %destructor/%printer description.
6249         * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6250         * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6251         Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6252         list node contains a semantic type.
6253         * src/symtab.c, src/symtab.h: Extend with a table that associates
6254         semantic types with their %destructor's and %printer's.
6255         (semantic_type_from_uniqstr, semantic_type_get,
6256         semantic_type_destructor_set, semantic_type_printer_set): New functions
6257         composing the public interface of that table.
6258         (symbol_destructor_get, symbol_destructor_location_get,
6259         symbol_printer_get, symbol_printer_location_get):  If there's no
6260         per-symbol %destructor/%printer, look up the per-type before trying
6261         the default.
6262         * tests/actions.at (Per-type %printer and %destructor): New test case.
6263         * tests/input.at (Default %printer and %destructor redeclared):
6264         Extend to check that multiple occurrences of %symbol-default in a
6265         single %destructor/%printer declaration is an error.
6266         (Per-type %printer and %destructor redeclared, Unused values with
6267         per-type %destructor): New test cases.
6269 2006-09-04  Joel E. Denny  <jdenny@ces.clemson.edu>
6271         Require default %destructor/%printer to be declared using
6272         %symbol-default instead of an empty symbol list, and start working on
6273         new per-type %destructor/%printer.  Discussed at
6274         <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6275         * NEWS (2.3+): Add %symbol-default to example.
6276         * bison.texinfo (Freeing Discarded Symbols): Likewise.
6277         (Table of Symbols): Add entry for %symbol-default.
6278         * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6279         (generic_symlist, generic_symlist_item): New nonterminals for creating
6280         a list in which each item is a symbol, semantic type, or
6281         %symbol-default.
6282         (grammar_declaration): Use generic_symlist in %destructor and %printer
6283         declarations instead of symbols.1 or an empty list.
6284         (symbol_declaration, precedence_declaration, symbols.1): Update actions
6285         for changes to symbol_list.
6286         * src/reader.c: Update for changes to symbol_list.
6287         * src/scan-code.l: Likewise.
6288         * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6289         * src/symlist.c, src/symlist.h: Extend such that a list node may
6290         represent a semantic type or a %symbol-default in addition to just an
6291         ordinary symbol.  Add switched functions for setting %destructor's and
6292         %printer's.
6293         * tests/actions.at, tests/input.at: Add %symbol-default to all default
6294         %destructor/%printer declarations.
6296 2006-08-23  Joel E. Denny  <jdenny@ces.clemson.edu>
6298         Whether the default %destructor/%printer applies to a particular symbol
6299         isn't a question of whether the user *declares* that symbol (in %token,
6300         for example).  It's a question of whether the user by any means
6301         *defines* the symbol at all (by simply using a char token, for
6302         example).  $end is defined by Bison whereas any other token with token
6303         number 0 is defined by the user.  The error token is always defined by
6304         Bison regardless of whether the user declares it with %token, but we
6305         may one day let the user define error as a nonterminal instead.
6306         * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6307         * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6308         the meaning of "user-defined".
6309         * tests/actions.at (Default %printer and %destructor for user-declared
6310         end token): Rename to...
6311         (Default %printer and %destructor for user-defined end token): ...
6312         this.
6314         * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6315         computation of whether to apply the default, don't maintain a list of
6316         every Bison-defined symbol.  Instead, just check for a first character
6317         of '$', which a user symbol cannot have, and check for the error token.
6319 2006-08-21  Joel E. Denny  <jdenny@ces.clemson.edu>
6321         Don't apply the default %destructor or %printer to the error token,
6322         $undefined, or $accept.  This change fits the general rule that the
6323         default %destructor and %printer are only for user-declared symbols,
6324         and it solves several difficulties that are described in the new test
6325         cases listed below.
6326         * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6327         * tests/actions.at (Default %printer and %destructor are not for error
6328         or $undefined, Default %printer and %destructor are not for $accept):
6329         New test cases.
6331 2006-08-19  Joel E. Denny  <jdenny@ces.clemson.edu>
6333         Allow %start after the first rule.
6334         * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6335         when parsing the first rule.
6336         (check_and_convert_grammar): Search for it here after all grammar
6337         declarations have been parsed.  Skip midrules, which have dummy LHS
6338         nonterminals.
6339         * src/symtab.c (symbol_is_dummy): New function.
6340         * src/symtab.h (symbol_is_dummy): Declare it.
6341         * tests/input.at (%start after first rule): New test.
6343 2006-08-18  Joel E. Denny  <jdenny@ces.clemson.edu>
6345         Redo some of the previous commit: add back the ability to use
6346         non-aliased/undeclared string literals since it might be useful to
6347         those declaring %token-table.
6348         * src/reader.c (check_and_convert_grammar): Undo changes in previous
6349         commit: don't worry about complaints from symbols_pack.
6350         * src/symtab.c (symbol_new, symbol_class_set,
6351         symbol_check_alias_consistency): Undo changes in previous commit: count
6352         each string literal as a new symbol and token, assign it a symbol
6353         number, and don't complain about non-aliased string literals.
6354         (symbols_pack): Since symbol_make_alias still does not decrement symbol
6355         and token counts but does still set aliased tokens to the same number,
6356         symbol_pack_processor now leaves empty slots in the symbols array.
6357         Remove those slots.
6358         * tests/regression.at (Undeclared string literal): Remove test case
6359         added in previous commit since non-aliased string literals are allowed
6360         again.
6361         (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6362         remove unnecessary string literal declarations.
6363         * tests/sets.at (Firsts): Likewise.
6365 2006-08-18  Joel E. Denny  <jdenny@ces.clemson.edu>
6367         Don't allow an undeclared string literal, but allow a string literal to
6368         be used before its declaration.
6369         * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6370         symbols_pack complained.
6371         * src/symtab.c (symbol_new): Don't count a string literal as a new
6372         symbol.
6373         (symbol_class_set): Don't count a string literal as a new token, and
6374         don't assign it a symbol number since symbol_make_alias does that.
6375         (symbol_make_alias): It's not necessary to decrement the symbol and
6376         token counts anymore.  Don't assume that an alias declaration occurs
6377         before any uses of the identifier or string, and thus don't assert that
6378         one of them has the highest symbol number so far.
6379         (symbol_check_alias_consistency): Complain if there's a string literal
6380         that wasn't declared as an alias.
6381         (symbols_pack): Bail if symbol_check_alias_consistency failed since
6382         symbol_pack asserts that every token has been assigned a symbol number
6383         although undeclared string literals have not.
6384         * tests/regression.at (String alias declared after use, Undeclared
6385         string literal): New test cases.
6386         (Characters Escapes, Web2c Actions): Declare string literals as
6387         aliases.
6388         * tests/sets.at (Firsts): Likewise.
6390 2006-08-14  Joel E. Denny  <jdenny@ces.clemson.edu>
6392         In the grammar scanner, STRING_FINISH unclosed constructs and return
6393         them to the parser in order to improve error messages.
6394         * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6395         SC_BRACED_CODE, SC_PROLOGUE): Implement.
6396         * tests/input.at (Unclosed constructs): New test case.
6397         * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6398         seen.
6400         * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6401         unused global.
6403 2006-08-13  Joel E. Denny  <jdenny@ces.clemson.edu>
6405         Handle string aliases for character tokens correctly.
6406         * src/symtab.c (symbol_user_token_number_set): If the token has an
6407         alias, check and set its alias's user token number instead of its own,
6408         which is set to indicate the alias.  Previously, every occurrence of
6409         the character token in the grammar overwrote that alias indicator with
6410         the character code.
6411         * tests/input.at (String aliases for character tokens): New test.
6413 2006-08-12  Joel E. Denny  <jdenny@ces.clemson.edu>
6415         * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6417 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6419         * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6420         to prevent failures when building on older platforms.
6421         Check for autopoint failure.
6422         Set XGETTEXT_OPTIONS to values that check for C format strings,
6423         so that translators are warned about them (this also helps
6424         prevent core dumps).
6426         * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6427         function, since it simplifies our code a bit.
6429         * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6430         rather than -W, so we don't get bogus warnings about sign comparisons.
6431         Add -Wpointer-arith, since that warning is useful (it reports code
6432         that does not conform to C89 and that some compilers reject).
6433         * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6434         since it's no longer needed.
6436 2006-08-10  Joel E. Denny  <jdenny@ces.clemson.edu>
6438         Clean up scanners a bit.
6439         * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6440         definitions so gcc won't warn when obstack_for_string is unused.
6441         * src/scan-code.l: config.h and system.h are already #include'd by
6442         scan-code-c.c, so get rid of them here.
6443         * src/scan-gram.l: Likewise.
6444         * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6445         definitions rather than duplicating the rest of it.
6446         * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6448 2006-08-09  Joel E. Denny  <jdenny@ces.clemson.edu>
6450         Suppress signed/unsigned comparison warnings for yycheck.
6451         * data/c.m4 (b4_safest_int_type): New macro.
6452         * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6453         a signed int type, cast it to b4_safest_int_type first.
6454         * data/yacc.c: Likewise.
6455         (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6456         also overwritten.
6458 2006-08-09  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>  (tiny change)
6460         * doc/bison.texinfo: Fix some typos.
6462 2006-08-02  Paul Eggert  <eggert@cs.ucla.edu>
6464         * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6465         po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6467         * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6468         the latest gnulib does this a different way.
6469         (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6470         translation was patched, so stop omitting it.
6472 2006-07-29  Joel E. Denny  <jdenny@ces.clemson.edu>
6474         Enable declaration of default %printer/%destructor.  Make the parser
6475         use these for all user-declared grammar symbols for which the user does
6476         not declare a specific %printer/%destructor.  Thus, the parser uses it
6477         for token 0 if the user declares it but not if Bison generates it as
6478         $end.  Discussed starting at
6479         <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6480         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6481         and
6482         <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6483         * NEWS (2.3+): Mention.
6484         * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6485         declare a %destructor for a mid-rule's semantic value.  It's just
6486         impossible to declare one specific to it.
6487         (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6488         code.  Describe default %destructor form.
6489         * src/parse-gram.y (grammar_declaration): Parse default
6490         %printer/%destructor declarations.
6491         * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6492         and symbol_destructor_location_get rather than accessing the destructor
6493         and destructor_location members of struct symbol.
6494         (symbol_printers_output): Likewise but for %printer's.
6495         * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6496         again.
6497         * src/symtab.c (default_destructor, default_destructor_location,
6498         default_printer, default_printer_location): New static global
6499         variables to record the default %destructor and %printer.
6500         (symbol_destructor_get, symbol_destructor_location_get,
6501         symbol_printer_get, symbol_printer_location_get): New functions to
6502         compute the appropriate %destructor and %printer for a symbol.
6503         (default_destructor_set, default_printer_set): New functions to set the
6504         default %destructor and %printer.
6505         * src/symtab.h: Prototype all those new functions.
6506         * tests/actions.at (Default %printer and %destructor): New test to
6507         check that the right %printer and %destructor are called, that they're
6508         not called for $end, and that $$ and @$ work correctly.
6509         (Default %printer and %destructor for user-declared end token): New
6510         test to check that the default %printer and %destructor are called for
6511         a user-declared end token.
6512         * tests/input.at (Default %printer and %destructor redeclared, Unused
6513         values with default %destructor): New tests to check related grammar
6514         warnings and errors.
6516 2006-07-29  Joel E. Denny  <jdenny@ces.clemson.edu>
6518         Clean up handling of %destructor for the end token (token 0).
6519         Discussed starting at
6520         <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6521         and
6522         <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6524         Make the skeletons consistent in how they pop the end token and invoke
6525         its %destructor.
6526         * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6527         state, which has token number 0, since this would invoke the
6528         %destructor for the end token.
6529         * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6530         until after shifting the end token, or else it won't be popped.
6531         * data/yacc.c (yyparse): Likewise.
6533         * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6534         it's the end token.  Upon termination, destroy an unshifted lookahead
6535         even when it's the end token.
6536         * data/lalr1.cc (yy::parser::parse): Likewise.
6537         * data/yacc.c (yyparse): Likewise.
6539         * src/reader.c (packgram): Don't check rule 0.  This suppresses unused
6540         value warnings for the end token when the user gives the end token a
6541         %destructor.
6543         * tests/actions.at (Printers and Destructors): Test all the above.
6545 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6547         Update to latest gnulib and gettext versions.
6548         * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6549         Add fopen-safer.
6550         (gnulib_files): Add m4/warning.m4.  Don't worry about files
6551         overwritten by autopoint.
6552         Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6553         Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6554         rejects them.
6555         Don't use autoreconf; instead, invoke autopoint etc. by hand,
6556         so that we can remove the intl files at a better time.
6557         (intl_files_to_remove): Remove aclocal.m4, since it gets
6558         rebuilt anyway.  Remove m4/inttypes_h.m4, m4/inttypes.m4,
6559         m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6560         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6561         Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6562         Remove datarootdir hack; no longer needed.
6563         * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6564         (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6565         * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6566         strdup.h.
6567         * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6568         * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6570 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6572         * bootstrap: Adjust to today's change to gnulib-tool by invoking
6573         it with --assume-autoconf='latest-stable'.
6575 2006-07-13  Joel E. Denny  <jdenny@ces.clemson.edu>
6577         * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6578         least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6579         YYSTYPE' and `{'.
6580         * src/muscle_tab.h (muscle_grow): Replace the header comments with
6581         those from muscle_tab.c since the old ones are misleading.
6583 2006-07-13  Akim Demaille  <akim@epita.fr>
6585         Support %define "KEY" {VALUE}.
6586         * src/scan-code.h, src/scan-code.l (translate_action)
6587         (translate_rule_action, translate_symbol_action, translate_code):
6588         Return char *, not const char *.
6589         * src/parse-gram.y (declaration): Rename as...
6590         (prologue_declaration): this.
6591         (string_content): Remove this nonterminal, use STRING.
6592         (braceless, content, content.opt): New nonterminal.
6593         Use them.
6594         (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6595         as value.
6596         * src/scan-gram.l (getargs.h): Don't include it.
6598 2006-07-12  Paul Eggert  <eggert@cs.ucla.edu>
6600         * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6601         rather than a for-loop that declares a local bool variable.  This
6602         should work around a compatibility problem with a Cray x1e C++
6603         compiler reported by Hung Nguyen in
6604         <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6605         The for-loop was introduced in the 2004-11-17 change but I don't
6606         know why it was needed.
6608 2006-07-12  Akim Demaille  <akim@epita.fr>
6610         * data/c.m4: Comment changes.
6612 2006-07-10  Akim Demaille  <akim@lrde.epita.fr>
6614         * src/complain.c (error_message, ERROR_MESSAGE): New.
6615         To factor...
6616         (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6617         * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6619 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6621         * NEWS: Instead of %union, you can define and use your own union type
6622         YYSTYPE if your grammar contains at least one <type> tag.
6623         Your YYSTYPE need not be a macro; it can be a typedef.
6624         * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6625         (Union Decl, Decl Summary): Document this.
6626         * data/glr.c (YYSTYPE): Implement this.
6627         * data/glr.cc (YYSTYPE): Likewise.
6628         * data/lalr1.cc (YYSTYPE): Likewise.
6629         * data/yacc.c (YYSTYPE): Likewise.
6630         * src/output.c (prepare): Output tag_seen_flag.
6631         * src/parse-gram.y (declaration, grammar_declaration):
6632         Use 'union_seen' rather than 'typed' to determine whether
6633         %union has been seen, since grammars can now be typed without
6634         %union.
6635         (symbol_declaration, type.opt, symbol_def):
6636         Keep track of whether a tag has been seen.
6637         * src/reader.c (union_seen, tag_seen): New vars.
6638         (typed): remove.
6639         * src/reader.h (union_seen, tag_seen, typed): Likewise.
6640         * src/scan-code.l (untyped_var_seen): New variable.
6641         (handle_action_dollar): Adjust to above changes.
6642         (handle_action_dollar, handle_action_at):
6643         Improve overflow checking for outlandish numbers.
6644         * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6645         avoid new diagnostics generated by above changes.
6646         * tests/regression.at (YYSTYPE typedef): Add test to check
6647         for type tags without %union.
6649         * src/symlist.c (symbol_list_length): Return int, not unsigned
6650         int, since callers expect int.  This may need to get revisited
6651         once we have proper integer overflow checking.
6653         * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6654         object is now static.
6656         * src/getargs.c (flags_argmatch): Return void, not int,
6657         to pacify ./configure --enable-gcc-warnings.
6659         * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6660         since last_string is already defined to FLEX_PREFIX (last_string).
6662 2006-07-09  Akim Demaille  <akim@lrde.epita.fr>
6664         Implement --warnings/-W.
6665         * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6666         replaced by...
6667         (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6668         Adjust callers.
6669         * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6670         (warnings_args, warnings_types): New.
6671         (getargs, short_options, long_options): Accept -W/--warnings.
6672         Sort the options by alphabetical order, upper case letter right
6673         before its lower case.
6675 2006-07-09  Joel E. Denny  <jdenny@ces.clemson.edu>
6677         Change %merge result type clash warnings to errors.  Discussed at
6678         <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6679         * src/reader.c (record_merge_function_type): Use complain_at.
6680         * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6681         declared later): Update test case results.
6683 2006-07-09  Akim Demaille  <akim@lrde.epita.fr>
6685         * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6686         to be in alphabetical order.
6687         (trace_args): Spelling fixes.
6689 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6691         * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6692         so they don't collide with user-defined macros.
6693         (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6694         this was never guaranteed, and now that we're using gnulib stdint,
6695         which defines int_fast16_t to long int, the problem is exposed.
6697 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6699         * data/c.m4 (b4_basename): Simplify a bit, since we don't
6700         need the full POSIX semantics (and weren't implementing them
6701         anyway).
6703         Adjust to Autoconf 2.60 and today's gnulib.
6704         * bootstrap (gnulib_modules): Add stdint.
6705         Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6706         no longer copies it.
6707         (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6708         since stdint needs the former and wcwidth (which is now required
6709         by mbswidth) needs the latter.
6710         Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6711         work around a compatibility glitch between gettext 0.14.6 and
6712         Autoconf 2.60.
6713         * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6714         Do not check for uintptr_t, since new stdint module does the right
6715         thing.
6716         * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6717         Add stdint.h, stdint_.h, wcwidth.h.
6718         * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6719         Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6720         stdint.m4, wchar_t.m4, wcwidth.m4.
6721         * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6722         usual order for ../lib/*.h files.
6723         (file_name_split): Use last_component, not base_name, to adjust
6724         to gnulib changes.
6725         * src/parse-gram.h: Include <strverscmp.h> in the usual order
6726         for ../lib/*.h files.
6727         (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6728         Define unconditionally, since we now assume the stdint module.
6729         * src/scan-skel.l: Include <dirname.h>.
6730         (BASE_QPUTS): Use last_component, not base_name.
6731         * src/system.h: Include <unlocked-io.h> in the usual order
6732         for ../lib/*.h files.  Include <stdint.h> unconditionally,
6733         since we now use the stdint module.
6734         (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6735         HAVE_UINTPTR_T, since we now use the stdint module.
6736         (base_name): Remove decl, since files now include <dirname.h>
6737         to get the decl.
6739 2006-07-08  Akim Demaille  <akim@lrde.epita.fr>
6741         * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6742         New, default to 1.
6743         * data/yacc.c, data/glr.c, data/location.cc: Use them.
6744         * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6745         default.
6746         * tests/calc.at: Adjust.
6748 2006-07-08  Akim Demaille  <akim@lrde.epita.fr>
6750         * data/c.m4 (b4_basename): New.
6751         (b4_syncline): Also output the location of its invocation (from
6752         the skeleton).
6753         (b4_user_action, b4_define_user_action, b4_user_actions)
6754         (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6755         (b4_user_stype): New.
6756         * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6758 2006-07-07  Joel E. Denny  <jdenny@ces.clemson.edu>
6760         In the grammar file, the first column is 1 not 0 on the first line as
6761         on every other line.
6762         * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6763         * tests/input.at (Torturing the Scanner): Update output.
6765         * src/scan-gram.l (scanner_cursor): Declare it static.
6767 2006-07-07  Joel E. Denny  <jdenny@ces.clemson.edu>
6769         In warnings, say "previous declaration" rather than "first
6770         declaration".
6771         * src/symtab.c (redeclaration): Do that here.
6772         * src/reader.c (record_merge_function_type): In the case of a result
6773         type clash, report the previous declaration rather than the very first
6774         one in the grammar file.
6775         * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6776         declared later): Add a third declaration to check this behavior.
6777         * tests/input.at (Incompatible Aliases): Update output.
6779 2006-06-27  Akim Demaille  <akim@epita.fr>
6781         * doc/Doxyfile.in: New.
6782         * doc/Makefile.am: Use it.
6783         * src/lalr.h, src/symtab.h: Initial doxygenation.
6785 2006-06-26  Joel E. Denny  <jdenny@ces.clemson.edu>
6787         Don't miss %merge result type warnings just because the LHS types are
6788         declared after the %merge.  This continues the effort of the previous
6789         patch.
6790         * src/reader.c (get_merge_function): Don't set the merger type yet.
6791         (record_merge_function_type): New function for setting the merger type
6792         and checking for clashes.
6793         (grammar_current_rule_merge_set): Set the location of the %merge for
6794         the current rule.
6795         (packgram): Invoke record_merge_function_type for each rule now that
6796         all symbol type declarations have been parsed.
6797         * src/reader.h (merger_list.type_declaration_location): New member
6798         storing the location of the first %merge from which the type for this
6799         merging function was derived.
6800         * src/symlist.h (symbol_list.merger_declaration_location): New member
6801         storing the location of a rule's %merge, if any.
6802         * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6803         declared later): New test to catch the error fixed by the above patch.
6805 2006-06-26  Joel E. Denny  <jdenny@ces.clemson.edu>
6807         Get action warnings (grammar_rule_check) right even when symbol
6808         declarations appear after the rules.  Discussed at
6809         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6810         and
6811         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6812         Don't mistake the type of $$ in a midrule to be that of its parent
6813         rule's $$.
6814         * src/reader.c (grammar_current_rule_end): Don't invoke
6815         grammar_rule_check yet since not all symbol declarations may have been
6816         parsed yet.
6817         (grammar_midrule_action): Likewise.
6818         Don't record whether the midrule's $$ has been used yet since actions
6819         haven't been translated yet.
6820         Record the midrule's parent rule and its RHS index within the parent
6821         rule.
6822         (grammar_current_rule_action_append): Don't translate the action yet
6823         since not all symbol declarations may have been parsed yet and, thus,
6824         warnings about types for $$, $n, @$, and @n can't be reported yet.
6825         (packgram): Translate the action and invoke grammar_rule_check now that
6826         all symbol declarations have been parsed.
6827         * src/scan-code.l (handle_action_dollar): Now that this is invoked
6828         after parsing the entire grammar file, the symbol list here in the case
6829         of a midrule is actually the midrule's empty RHS, so reference its
6830         parent rule's RHS where necessary.
6831         On the other hand, now that you can already know it's a midrule, you
6832         aren't forced to think $$ has the same type as its parent rule's $$.
6833         (handle_action_at): In the case of a midrule, reference the parent rule
6834         where necessary.
6835         * src/symlist.c (symbol_list_new): Initialize new midrule-related
6836         members.
6837         (symbol_list_length): Now that this is invoked after all rules have
6838         been parsed, a NULL symbol (rather than a NULL symbol list node)
6839         terminates a rule.  symbol_list_print already does this correctly.
6840         * src/symlist.h (symbol_list.midrule_parent_rule,
6841         symbol_list.midrule_parent_rhs_index): New members so that midrules can
6842         remember their relationships with their parents.
6843         * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6844         fixed by the above patch.
6845         (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6846         implementing...
6847         (Unused values): ... this old test case and...
6848         (Unused values before symbol declarations): ... this new test case.
6849         This one is the same as `Unused values' except that all symbol
6850         declarations appear after the rules in order to catch the rest of the
6851         errors fixed by the above patch.
6853 2006-06-26  Joel E. Denny  <jdenny@ces.clemson.edu>
6855         More cleanup.
6856         * src/reader.c (current_rule): Declare it static since it's no longer
6857         used outside this file.
6858         (grammar_current_rule_action_append): Remove redundant arguments from
6859         translate_rule_action invocation.
6860         * src/reader.h (current_rule): Remove this unused extern.
6861         * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6862         * src/scan-code.l (translate_rule_action): Likewise.
6864 2006-06-25  Joel E. Denny  <jdenny@ces.clemson.edu>
6866         Clean up yesterday's patch.
6867         * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6868         to...
6869         * src/reader.c (grammar_current_rule_action_append): ... here for
6870         consistency with grammar_current_rule_symbol_append.
6871         * tests/regression.at (Braced code in declaration in rules section):
6872         Make yyerror and yylex static as usual.
6874 2006-06-24  Joel E. Denny  <jdenny@ces.clemson.edu>
6876         Fix bug that mistakes braced code in a declaration in the rules section
6877         to be a rule action.  Mentioned at
6878         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6879         * src/scan-gram.l: Move midrule action detection from the start of the
6880         scanning of any braced code to...
6881         * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6882         action.  For readability, use $2 and @2 rather than the equivalent
6883         global variables.
6884         * tests/regression.at (Braced code in declaration in rules section):
6885         New test to catch the error fixed by the above patch.
6887         Work on code readability some.
6888         * src/scan-code.l (current_rule): Get rid of this misleading and
6889         redundant declaration: it's actually extern'ed in reader.h.
6890         (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6891         translate_action): Add a rule argument and use it instead of the global
6892         current_rule.
6893         (translate_rule_action): This already receives current_rule through an
6894         argument, so pass it on to translate_action instead of assigning
6895         current_rule to current_rule.
6896         (translate_symbol_action, translate_code): Pass rule = NULL to
6897         translate_action.
6899 2006-06-23  Joel E. Denny  <jdenny@ces.clemson.edu>
6901         Rename %before-definitions to %start-header and %after-definitions to
6902         %end-header.  Don't use these declarations to separate pre-prologue
6903         blocks from post-prologue blocks.  Add new order-independent
6904         declarations %before-header and %after-header as alternatives to the
6905         traditional Yacc pre-prologue and post-prologue blocks.  Discussed at
6906         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6907         * NEWS (2.3+): Update for these changes.
6908         * data/glr.c (b4_before_definitions): Update to...
6909         (b4_start_header): ... this.
6910         (b4_after_definitions): Update to...
6911         (b4_end_header): ... this.
6912         * data/glr.cc: Likewise.
6913         * data/lalr1.cc: Likewise.
6914         * data/yacc.c: Likewise.
6915         * doc/bison.texinfo (The prologue): Update names, and replace remaining
6916         prologue blocks with %*-header declarations.
6917         (Calc++ Parser): Likewise.
6918         (Decl Summary): Update names.
6919         (Table of Symbols): Update description.
6920         * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6921         (PERCENT_END_HEADER): ... this.
6922         (PERCENT_BEFORE_DEFINITIONS): Update to...
6923         (PERCENT_START_HEADER): ... this.
6924         (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6925         (declaration): Update token names and m4 macro names.
6926         When parsing %end-header and %start-header, invoke translate_code
6927         before muscle_code_grow, and no longer set global booleans to remember
6928         whether these declarations have been seen.
6929         Parse new %after-header and %before-header.
6930         * src/reader.c (before_definitions, after_definitions): Remove.
6931         (prologue_augment): Accept a new bool argument to specify whether to
6932         augment the pre-prologue or post-prologue.
6933         * src/reader.h (before_definitions, after_definitions): Remove these
6934         extern's.
6935         (prologue_augment): Add new bool argument.
6936         * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6937         (PERCENT_END_HEADER): ... this.
6938         (PERCENT_BEFORE_DEFINITIONS): Update to...
6939         (PERCENT_START_HEADER): ... this.
6940         (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6941         * tests/actions.at (Printers and Destructors): Update names.
6943 2006-06-22  Joel E. Denny  <jdenny@ces.clemson.edu>
6945         Add comparison operators for C++ location classes.  Discussed at
6946         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6947         * data/c++.m4 (b4_define_location_comparison): New boolean %define
6948         declaration indicating whether filename_type has an operator==.  If
6949         filename_type is `std::string', it defaults to `1', `0' otherwise.
6950         * data/location.cc: Iff b4_define_location_comparison is `1', add
6951         operator== and operator!= for class position and for class location.
6953         Some minor fixes.
6954         * src/scan-action.l: Remove unused file.
6955         * src/symtab.c (symbol_printer_set): Use printer_location not
6956         destructor_location.
6957         * src/symtab.h (struct symbol): Replace incorrect source comment for
6958         printer members.
6959         * tests/input.at (Incompatible Aliases): Update output with correct
6960         printer location.
6962 2006-06-20  Joel E. Denny  <jdenny@ces.clemson.edu>
6964         Don't put the pre-prologue in the header file.  For the yacc.c code
6965         file and the glr.c header and code files, move the pre-prologue before
6966         the token definitions.  Add new %before-definitions and
6967         %after-definitions to declare code that will go in both the header file
6968         and code file.  Discussed at
6969         <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6970         <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6971         and
6972         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6973         * NEWS (2.3+): Describe these changes.
6974         * data/glr.c (b4_pre_prologue): Move from within to before...
6975         (b4_shared_declarations): ... this.
6976         Add new b4_before_definitions before b4_token_enums.
6977         Add new b4_after_definitions at the end.
6978         * data/glr.cc (b4_pre_prologue): Replace with...
6979         (b4_before_definitions): ... this in the header file.
6980         (b4_after_definitions): New near the end of the header file.
6981         * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6982         code file right before including the header file.
6983         (b4_before_definitions): New in the previous position of
6984         b4_pre_prologue in the header file.
6985         (b4_after_definitions): New near the end of the header file.
6986         * data/yacc.c: Clean up some m4 quoting especially in the header file.
6987         (b4_token_enums_defines): In the code file, move to right before
6988         YYSTYPE for consistency with the header file.
6989         (b4_before_definitions): New right before b4_token_enums_defines in
6990         both the header and code file.
6991         (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6992         header and code file.
6993         * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6994         of prologues for %union dependencies.
6995         (Decl Summary): In %defines description, mention the effect of
6996         %before-definitions and %after-definitions on the header file.
6997         (Calc++ Parser): Forward declare driver in a %before-definitions rather
6998         than in the pre-prologue so that make check succeeds.
6999         (Table of Symbols): Add entries for %before-definitions and
7000         %after-definitions.
7001         * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7002         %before-definitions.
7003         (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7004         (declaration): Parse those declarations and append to
7005         b4_before_definitions and b4_after_definitions, respectively.
7006         * src/reader.c (before_definitions, after_definitions): New bools to
7007         track whether those declarations have been seen.
7008         (prologue_augment): Add to the post-prologue if %union,
7009         %before-definitions, or %after-definitions has been seen.
7010         * src/reader.h (before_definitions, after_definitions): New extern's.
7011         * src/scan-gram.l: Scan the new declarations.
7012         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7013         prologue block in a %before-definitions or a %after-definitions based
7014         on whether the %union is declared.
7015         * tests/regression.at (Early token definitions with --yacc, Early token
7016         definitions without --yacc): Move tests for token definitions into the
7017         post-prologue since token names are no longer defined in the
7018         pre-prologue.
7020 2006-06-20  Akim Demaille  <akim@epita.fr>
7022         * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7023         (symbol_get): Use it.
7024         * src/parse-gram.y: Use it.
7026 2006-06-19  Joel E. Denny  <jdenny@ces.clemson.edu>
7028         * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7029         build succeeds when configured with --enable-gcc-warnings.
7031 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7033         * src/parse-gram.y (char_name): New function.
7034         (CHAR, STRING, string_content): For %printer, properly escape.
7035         (ID): Prefer fputs to fprintf.
7036         (id): Reindent to be consistent with other rules.
7037         Properly quote char.
7039         The Translation Project changed its way of publishing translations
7040         to maintainers.  I haven't received any responses to my request
7041         for supporting the old way, or for documenting the new way.  I
7042         have modified 'bootstrap' to use screen scraping
7043         (in this case, HTML scraping).  This is unreliable and inelegant,
7044         but I don't see any better way.  Yuck.
7045         * bootstrap (TP_URL, WGET_COMMAND): New vars.
7046         (get_translations): New function, which uses HTML scraping to
7047         deduce locations of latest translations.
7048         Use this function to grab both bison and bison-runtime .po files.
7049         Don't bother priming the pump for the runtime-po domain any more,
7050         as it's now translated better than bison is.
7052 2006-06-19  Akim Demaille  <akim@epita.fr>
7054         * src/scan-gram.l: No longer "parse" things after `%union' until
7055         `{'.  Rather, return a single "%union" token.
7056         No longer make symbols: return strings, and leave the conversion
7057         to symbols to the parser.
7058         (SC_PRE_CODE, token_type): Remove.
7059         * src/parse-gram.y (%union): New field `character'.
7060         Sort tokens.
7061         (CHAR): New token.
7062         (ID, ID_COLON): Now that the scanner no longer makes them
7063         identifiers, adjust all uses to invoke symbol_get.
7064         (id_colon): New, wraps the conversion from string to symbol.
7065         (%union): Accept a possible union_name.
7066         (symbol): Now can be a char.
7067         * data/c.m4 (b4_union_name): Leave a default value.
7068         * data/glr.c, data/yacc.c: Use it.
7070 2006-06-11  Joel E. Denny  <jdenny@ces.clemson.edu>
7072         For associating token numbers with token names for "yacc.c", don't use
7073         #define statements unless `--yacc' is specified; always use enum
7074         yytokentype.  Most important discussions start at:
7075         <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7076         <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7077         and
7078         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7079         * NEWS (2.3+): Mention.
7080         * data/c.m4 (b4_yacc_if): New.
7081         (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7082         token #define's.
7083         * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7084         on token name definitions.
7085         * src/getargs.c (usage): Capitalize `Yacc' in English.
7086         * src/output.c (prepare): Define b4_yacc_flag.
7087         * tests/regression.at (Early token definitions): Test that tokens names
7088         are defined before the pre-prologue not just before the post-prologue.
7089         Remove this test case and copy to...
7090         (Early token definitions with --yacc): ... this to test #define's.
7091         (Early token definitions without --yacc): ... and this to test enums.
7093 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7095         * NEWS: Reword the post-2.3 change to not be so optimistic about
7096         removing the old "look-ahead" spelling.
7097         Update previous look-ahead/lookahead change reports.
7098         * REFERENCES: look-ahead -> lookahead (since that's
7099         what he actually wrote).
7100         * doc/refcard.tex: look ahead -> lookahead,
7101         look-ahead -> lookahead
7103 2006-06-09  Joel E. Denny  <jdenny@ces.clemson.edu>
7105         For consistency, use `lookahead' instead of `look-ahead' or
7106         `look_ahead'.  Discussed starting at
7107         <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7108         and then at
7109         <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7110         * NEWS: For the next release, note the change to `--report'.
7111         * TODO, doc/bison.1: Update English.
7112         * doc/bison.texinfo: Update English.
7113         (Understanding Your Parser, Bison Options): Document as
7114         `--report=lookahead' rather than `--report=look-ahead'.
7115         * src/conflicts.c: Update English in comments.
7116         (lookahead_set): Rename from look_ahead_set.
7117         (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7118         (resolve_sr_conflict): Rename local look_ahead_tokens to
7119         lookahead_tokens, and update other uses.
7120         (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7121         count_rr_conflicts, conflicts_free): Update uses.
7122         * src/getargs.c (report_args): Move "lookahead" before alternate
7123         spellings.
7124         (report_types): Update uses.
7125         (usage): For `--report' usage description, state `lookahead' spelling
7126         rather than `look-ahead'.
7127         * src/getargs.h (report.report_lookahead_tokens): Rename from
7128         report_look_ahead_tokens.
7129         * src/lalr.c: Update English in comments.
7130         (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7131         (state_lookahead_tokens_count): Rename from
7132         state_look_ahead_tokens_count.
7133         Rename local n_look_ahead_tokens to n_lookahead_tokens.
7134         (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7135         Rename local n_look_ahead_tokens to n_lookahead_tokens.
7136         Update other uses.
7137         Update English in output.
7138         (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7139         * src/print.c: Update English in comments.
7140         (lookahead_set): Rename from look_ahead_set.
7141         (print_reduction): Rename argument lookahead_token from
7142         look_ahead_token.
7143         (print_core, state_default_rule, print_reductions, print_results):
7144         Update uses.
7145         * src/print_graph.c: Update English in comments.
7146         (print_core): Update uses.
7147         * src/state.c: Update English in comments.
7148         (reductions_new): Update uses.
7149         (state_rule_lookahead_tokens_print): Rename from
7150         state_rule_look_ahead_tokens_print, and update other uses.
7151         * src/state.h: Update English in comments.
7152         (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7153         (state_rule_lookahead_tokens_print): Rename from
7154         state_rule_look_ahead_tokens_print.
7155         * src/tables.c: Update English in comments.
7156         (conflict_row, action_row): Update uses.
7157         * tests/glr-regression.at
7158         (Incorrect lookahead during deterministic GLR,
7159         Incorrect lookahead during nondeterministic GLR): Rename
7160         print_look_ahead to print_lookahead.
7161         * tests/torture.at: Update English in comments.
7162         (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7163         AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7164         (Many lookahead tokens): Update uses.
7165         * data/glr.c: Update English in comments.
7166         * lalr1.cc: Likewise.
7167         * yacc.c: Likewise.
7168         * src/conflicts.h: Likewise.
7169         * src/lalr.h: Likewise.
7170         * src/main.c: Likewise.
7171         * src/output.c: Likewise.
7172         * src/parse-gram.c: Likewise.
7173         * src/tables.h: Likewise.
7174         * tests/calc.at: Likewise.
7176 2006-06-08  Joel E. Denny  <jdenny@ces.clemson.edu>
7178         * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7180 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
7182         * TODO: Add request from Nelson H. F. Beebe to be able to install
7183         Bison without installing the yacc script.
7185 2006-06-07  Joel E. Denny  <jdenny@ces.clemson.edu>
7187         * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7188         and yytext if they're already #define'd.
7189         * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7190         * src/scan-code-c.c: ... here.
7191         * src/scan-code.l, src/scan-gram.l: ... and here.  Also #include
7192         <config.h>.
7194 2006-06-07  Joel E. Denny  <jdenny@ces.clemson.edu>
7196         Get Bison to build again when configured with --enable-gcc-warnings.
7197         * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7198         missing #include's.
7199         * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7200         loc argument as it shadows a global.
7201         * src/scan-gram.l: Remove stray comma that prevents boundary_set
7202         invocation.
7204         * src/.cvsignore: Add scan-code.c.
7206 2006-06-07  Akim Demaille  <akim@epita.fr>
7208         * src/scan-gram.l: Move the "add a trailing ; to actions" code
7209         to...
7210         * src/scan-code.l: here.
7211         * tests/input.at (Torturing the Scanner): Fix another location
7212         error.
7214 2006-06-07  Akim Demaille  <akim@epita.fr>
7216         * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7218 2006-06-06  Akim Demaille  <akim@epita.fr>
7220         Extract the parsing of user actions from the grammar scanner.
7221         As a consequence, the relation between the grammar scanner and
7222         parser is much simpler.  We can also split "composite tokens" back
7223         into simple tokens.
7224         * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7225         * src/scan-gram.l (add_column_width, adjust_location): Move to and
7226         rename as...
7227         * src/location.h, src/location.c (add_column_width)
7228         (location_compute): these.
7229         Fix the column count: the initial column is 0.
7230         (location_print): Be robust to ending column being 0.
7231         * src/location.h (boundary_set): New.
7232         * src/main.c: Adjust to scanner_free being renamed as
7233         gram_scanner_free.
7234         * src/output.c: Include scan-code.h.
7235         * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7236         Use boundary_set.
7237         (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7238         (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7239         which is now, again, a separate token.
7240         Adjust all dependencies.
7241         Whereever actions with $ and @ are used, use translate_code.
7242         (action): Remove this nonterminal which is now useless.
7243         * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7244         (grammar_current_rule_action_append): Use translate_code.
7245         (packgram): Bound check ruleno, itemno, and rule_length.
7246         * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7247         (last_string, last_braced_code_loc, max_left_semantic_context)
7248         (scanner_initialize, scanner_free, scanner_last_string_free)
7249         (gram_out, gram_lineno, YY_DECL_): Move to...
7250         * src/scan-gram.h: this new file.
7251         (YY_DECL): Rename as...
7252         (GRAM_DECL): this.
7253         * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7254         * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7255         (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7256         (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7257         Move these declarations, and...
7258         (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7259         these to...
7260         * src/flex-scanner.h: this new file.
7261         * src/scan-gram.l (rule_length, rule_length_overflow)
7262         (increment_rule_length): Remove.
7263         (last_braced_code_loc): Rename as...
7264         (gram_last_braced_code_loc): this.
7265         Adjust to the changes of the parser.
7266         Move all the handling of $ and @ into...
7267         * src/scan-code.l: here.
7268         * src/scan-gram.l (handle_dollar, handle_at): Remove.
7269         (handle_action_dollar, handle_action_at): Move to...
7270         * src/scan-code.l: here.
7271         * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7272         scan-code.h, scan-code-c.c, scan-gram.h.
7273         (EXTRA_bison_SOURCES): Add scan-code.l.
7274         (BUILT_SOURCES): Add scan-code.c.
7275         (yacc): Be robust to white spaces.
7277         * tests/conflicts.at, tests/input.at, tests/reduce.at,
7278         * tests/regression.at: Adjust the column numbers.
7279         * tests/regression.at: Adjust the error message.
7281 2006-06-06  Joel E. Denny  <jdenny@ces.clemson.edu>
7283         * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7284         Use Akim's wording from
7285         <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7287 2006-06-06  Joel E. Denny  <jdenny@ces.clemson.edu>
7289         Between Bison releases, manually append `+' to the previous Bison
7290         release number, and use that as a signal to automatically print the
7291         ChangeLog's CVS Id keyword from --version.  Discussed starting at
7292         <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7293         * ChangeLog: Add Id header.
7294         * configure.ac (AC_INIT): Append `+' to `2.3'.
7295         * src/.cvsignore: Add revision.c.
7296         * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7297         (BUILT_SOURCES): Add revision.c.
7298         (revision.c): New target rule.  This file defines a new global variable
7299         named revision.  It initializes it with either the Id from ChangeLog
7300         or, if VERSION doesn't contain `+', with the empty string.
7301         * src/getargs.c (version): Print the value of revision.
7302         * src/revision.h: Extern revision.
7304 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
7306         * NEWS: Version 2.3.
7307         * configure.ac (AC_INIT): Likewise.
7309 2006-05-30  Paul Eggert  <eggert@cs.ucla.edu>
7311         * data/glr.c (YYRECOVERING): Define to be a function-like macro
7312         with no arguments, not as an object-like macro.  This is for
7313         compatibility with data/yacc.c.  Problem reported by John P. Hartmann in
7314         <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7315         * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7316         Document this.
7318 2006-05-30  Joel E. Denny  <jdenny@ces.clemson.edu>
7320         * src/getargs.c (usage): Back out yesterday's modification of the
7321         --help output so that we don't have to wait for translation before
7322         releasing 2.3.
7324 2006-05-29  Paul Eggert  <eggert@cs.ucla.edu>
7326         * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7327         Problem reported by Akim Demaille.
7329 2006-05-29  Joel E. Denny  <jdenny@ces.clemson.edu>
7331         * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7333 2006-05-26  Paul Eggert  <eggert@cs.ucla.edu>
7335         * data/yacc.c (yy_reduce_print): Omit trailing white space in
7336         generated source code.  Problem reported by Frans Englich in
7337         <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7339 2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7341         * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7342         shell, not within 'make', so that 'make' by an ordinary builder
7343         (using GNU make) does not worry about configuring gzip.  This also
7344         works around a bug reported independently by Keith Thompson and by
7345         Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7346         stderr rather than stdout, messing up the build logs.
7348 2006-05-21  Joel E. Denny  <jdenny@ces.clemson.edu>
7350         * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7351         to make sure that YYID will never be unused.  This fixes a 'make
7352         maintainer-check' failure caused by the recent changes to the 'Trivial
7353         grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7354         not used.
7355         * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7357 2006-05-21  Joel E. Denny  <jdenny@ces.clemson.edu>
7359         * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7360         state before an empty RHS is always resolved here.  Only the location
7361         of that state is guaranteed to be resolved, and that's enough.  This
7362         fixes the remaining bug reported by Derek M. Jones in
7363         <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7364         * tests/glr-regression.at (Uninitialized location when reporting
7365         ambiguity): Test the above case.
7366         Also, the embedded comments in this test case claim it checks the case
7367         of an empty RHS that has inherited the initial location.  However, the
7368         corresponding LHS was already resolved, so yyresolveLocations didn't
7369         actually have reason to modify it.  Fix this by forcing
7370         nondeterministic operation at the beginning of the parse.
7372 2006-05-20  Paul Eggert  <eggert@cs.ucla.edu>
7374         * data/c.m4 (b4_yy_symbol_print_generate):
7375         (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7376         'const YYSTYPE', and similarly for YYLTYPE.  This fixes one
7377         of the bugs reported today by Derek M Jones in
7378         <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7379         * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7380         defined to be a type name without parens or brackets.
7381         (Location Type): Similarly for YYLTYPE.
7382         * tests/regression.at (Trivial grammars): Put in a test for this
7383         bug that will be caught by 'make maintainer-check' (though not,
7384         alas, by 'make check' unless your compiler is picky).
7386 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7388         * NEWS: Version 2.2.
7389         * configure.ac (AC_INIT): Likewise.
7391 2006-05-17  Joel E. Denny  <jdenny@ces.clemson.edu>
7393         * data/glr.c (yyreportTree): Make room in yystates for the state
7394         preceding the RHS.  This fixes the segmentation fault reported by Derek
7395         M. Jones in
7396         <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7397         (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7398         to the user.  Reported for yyreportTree by Derek M. Jones later in the
7399         same thread.
7400         * THANKS: Add Derek M. Jones.
7401         Update my email address.
7402         Fix typo in Steve Murphy's name.
7404 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7406         * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7407         checking against YYLAST that caused the parser to miss a potential
7408         alternative in its diagnostic.
7409         Problem reported by Maria Jose Moron Fernandez in
7410         <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7411         * data/lalr1.cc (yysyntax_error_): Likewise.
7412         * data/yacc.c (yysyntax_error): Likewise.
7413         * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7414         tokens, in case we run into an older C compiler.
7415         (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7416         Use them to check for the off-by-one error fixed above.
7418         * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7419         YYSIZE_T, not size_t.
7420         * tests/regression.at (Trivial grammars): New test, to catch
7421         the error fixed by the above patch.
7423 2006-05-14  Akim Demaille  <akim@lrde.epita.fr>
7425         * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7426         scheme.
7427         Reported by Steve Murphy.
7429 2006-05-14  Akim Demaille  <akim@lrde.epita.fr>
7431         * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7432         * data/glr.cc: b4_location_flag is now b4_locations_flag.
7434 2006-05-14  Akim Demaille  <akim@lrde.epita.fr>
7436         Implement --trace=m4.
7437         * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7438         * src/output.c (output_skeleton): When set, pass -dV to m4.
7440         Factor the handling of flags in m4.
7441         * src/output.c (prepare): Rename the muscle names debug, defines,
7442         error_verbose to debug_flag, defines_flag, error_verbose_flag.
7443         * data/c.m4: Adjust.
7444         (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7445         Use b4_define_flag_if to define other b4_FLAG_if macros.
7446         (b4_location_if): As a consequence, rename as...
7447         (b4_locations_if): this, for consistency.
7448         Adjust all the skeletons.
7450 2006-05-14  Akim Demaille  <akim@lrde.epita.fr>
7452         * etc/bench.pm: Shorten bench names.
7454 2006-05-14  Akim Demaille  <akim@lrde.epita.fr>
7456         * src/output.h, src/output.c (error_verbose): Move to...
7457         * src/getargs.h, src/getargs.c: here.
7458         Sort the flags.
7459         Adjust dependencies.
7461 2006-05-13  Paul Eggert  <eggert@cs.ucla.edu>
7463         * data/c.m4 (b4_copyright): Put the special exception for Bison
7464         skeletons here, so we don't have to put it in each skeleton.  All
7465         uses changed.  Suggested by Akim Demaille.  Also, wrap the
7466         copyright notice, in case it is longer than 80 columns.  Replace
7467         comma by newline after title.
7469 2006-05-11  Paul Eggert  <eggert@cs.ucla.edu>
7471         * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7472         incompatibility, not a bug.  Mention that it wasn't fixed as of
7473         flex 2.5.33.
7475 2006-05-11  Akim Demaille  <akim@lrde.epita.fr>
7477         * examples/extexi: Enforce the precedence of concatenation over
7478         >>.
7479         Reported by Tommy Nordgren.
7481 2006-05-11  Akim Demaille  <akim@lrde.epita.fr>
7483         * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7484         with the member "token".
7485         Reported by Martin Nylin.
7487 2006-05-08  Paul Eggert  <eggert@cs.ucla.edu>
7489         * data/glr.c: Switch to Bison 2.2 special-exception language in
7490         the copyright notice.  Use more-regular format for titles and
7491         copyright notices.
7492         * data/glr.cc: Likewise.
7493         * data/location.cc: Likewise.
7494         * data/yacc.cc: Likewise.
7495         * doc/bison.texinfo (Conditions): Document this.
7496         * NEWS: likewise.  Upgrade version to 2.2.
7498 2006-04-27  Akim Demaille  <akim@lrde.epita.fr>
7500         * data/glr.cc: Remove dead code.
7502 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7504         * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7505         that variable and the line breaks the bootstrap.  Problem reported
7506         by Juan M. Guerrero.
7508 2006-04-24  Akim Demaille  <akim@lrde.epita.fr>
7510         * doc/bison.texinfo (Multiple start-symbols): New.
7512 2006-04-24  Akim Demaille  <akim@lrde.epita.fr>
7514         * etc/README, etc/bench.pl: New.
7516 2006-04-03  Akim Demaille  <akim@lrde.epita.fr>
7518         * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7519         rule.
7520         Reported by Mickael Labau.
7521         * tests/input.at (Torturing the Scanner): Test it.
7523 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7525         * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7526         Problem reported by Bob Rossi.
7528 2006-03-13  Paul Eggert  <eggert@cs.ucla.edu>
7530         * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7531         and didn't really work.
7532         For the index, use @ifnotinfo, not @iftex.
7533         Minor cleanups of spacing and terminology.
7535 2006-03-12  Akim Demaille  <akim@lrde.epita.fr>
7537         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7538         of AT_NAME_PREFIX when %name-prefix is not used.
7540 2006-03-12  Akim Demaille  <akim@lrde.epita.fr>
7542         Apply --prefix to C++ skeletons too: they change the namespace.
7543         The test suite already exercize these cases.
7544         * data/c++.m4 (b4_namespace): New.
7545         * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7546         * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7547         * data/yacc.c, data/glr.c: Remove a useless `[]'.
7548         * doc/bison.texinfo: Document it.
7549         (Option Cross Key): Use @multitable in all formats.  It looks
7550         nicer, even in TeX outputs.
7551         (Rules): Use the same code whatever the output type is.
7552         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7553         (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7554         * tests/calc.at: Use it, instead of hard coding `yy'.
7556 2006-03-10  Akim Demaille  <akim@lrde.epita.fr>
7558         * TODO: Remove dead items.
7560 2006-03-10  Akim Demaille  <akim@lrde.epita.fr>
7562         * doc/FAQ: Remove, merged into...
7563         * doc/bison.texinfo (FAQ): this.
7564         * doc/Makefile.am (EXTRA_DIST): Adjust.
7566 2006-03-10  Akim Demaille  <akim@lrde.epita.fr>
7568         * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7569         even if empty.
7570         * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7571         * doc/bison.texinfo (Calc++ Scanner): Use it.
7573 2006-03-09  Paul Eggert  <eggert@cs.ucla.edu>
7575         Fix two nits reported by twlevo, plus one more that I discovered.
7577         * src/assoc.h (assoc_to_string): Give a name to the arg, as
7578         this is the usual Bison style.
7579         * src/location.h (location_print): Likewise.
7581         * src/reader.h (token_name): Likewise.
7583 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
7585         Fix some nits reported by twlevo.
7586         * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7587         and "POSIX".  Use more-modern syntax for URLs.  Mention C++
7588         and ask for Java.  Don't hardwire OS version numbers.  Add
7589         copyright notice.
7590         * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7591         * src/conflicts.c (solved_conflicts_obstack): Now static.
7593 2006-03-08  Joel E. Denny  <jdenny@ces.clemson.edu>
7595         * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7596         page.  Say "you can use it" not "you may use it" as on the web page;
7597         we're describing capabilities not granting permission.
7599 2006-03-06  Paul Eggert  <eggert@cs.ucla.edu>
7601         * data/glr.c (yyresolveLocations): Rename local variables to avoid
7602         shadowing warnings.  Use usual patter for iterating through RHS.
7603         * tests/glr-regression.at
7604         (Uninitialized location when reporting ambiguity):
7605         Modify yylex so that it uses its argument, rather than trying
7606         to rely on ARGSUSED (which doesn't work for gcc with warnings).
7607         const char -> char const.
7609         * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7610         Don't use tabs inside commands; it messes up 'ps'.
7611         Problem reported by twlevo.
7613 2006-03-06  Joel E. Denny  <jdenny@ces.clemson.edu>
7615         * tests/glr-regression.at (Uninitialized location when reporting
7616         ambiguity): New test case.
7617         * data/glr.c (yyresolveLocations): New function, which uses
7618         YYLLOC_DEFAULT.
7619         (yyresolveValue): Invoke yyresolveLocations before reporting an
7620         ambiguity.
7621         * doc/bison.texinfo (Default Action for Locations): Note
7622         YYLLOC_DEFAULT's usage for ambiguity locations.
7623         (GLR Semantic Actions): Cross-reference those notes.
7625 2006-03-04  Joel E. Denny  <jdenny@ces.clemson.edu>
7627         * tests/glr-regression.at (Leaked semantic values when reporting
7628         ambiguity): Remove unnecessary union and type declarations.
7629         (Leaked lookahead after nondeterministic parse syntax error): New test
7630         case.
7631         * data/glr.c (yyparse): Check for zero stacks remaining before
7632         attempting to shift the lookahead so that you don't lose it.
7634 2006-03-02  Joel E. Denny  <jdenny@ces.clemson.edu>
7636         Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7637         * tests/glr-regression.at (Leaked semantic values when reporting
7638         ambiguity): New test case.
7639         * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7640         yyabort rather than invoking yyFail, which invokes longjmp.  Remove the
7641         now unnecessary yystackp parameter.
7642         (yyresolveValue): Return yyreportAmbiguity's result.  Now the necessary
7643         destructors can be called.
7645         * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7646         in existing testcases.
7648 2006-03-02  Joel E. Denny  <jdenny@ces.clemson.edu>
7650         Don't leak semantic values for parent RHS when a user action cuts the
7651         parser, and clean up related code a bit.
7652         * tests/glr-regression.at (Leaked merged semantic value if user action
7653         cuts parse): Rename to...
7654         (Leaked semantic values if user action cuts parse): ... this.  Add check
7655         for leaked parent RHS values.
7656         * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7657         between an unresolved state (non-empty chain of semantic options) and
7658         an incomplete one (signaled by an empty chain).
7659         (yyresolveStates): Document the interface.  Move all manipulation of a
7660         successfully or unsuccessfully resolved yyGLRState to...
7661         (yyresolveValue): ... here so that yyresolveValue always leaves a
7662         yyGLRState with consistent data and thus is easier to understand.
7663         Remove the yyvalp and yylocp parameters since they are always just
7664         taken from the yys parameter.  When reporting a discarded merged value
7665         in debugging output, note that it is incompletely merged.  Document the
7666         interface.
7667         (yyresolveAction): If resolving any of the RHS states fails, destroy
7668         them all rather than leaking them.  Thus, as long as user actions are
7669         written to clean up the RHS correctly, yyresolveAction always cleans up
7670         the RHS of a semantic option.  Document the interface.
7672 2006-02-27  Paul Eggert  <eggert@cs.ucla.edu>
7674         * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7675         led to a segmentation fault in GNU Pascal.  Problem reported
7676         by Waldek Hebisch.
7678 2006-02-21  Joel E. Denny  <jdenny@ces.clemson.edu>
7680         * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7681         mid-rule action inside a nonterminal symbol in order to declare a
7682         destructor for its semantic value.
7684 2006-02-16  Paul Eggert  <eggert@cs.ucla.edu>
7686         * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7687         YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7688         __cplusplus && ! defined _STDLIB_H && !
7689         ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7690         defined free))]: Include <stdlib.h> rather than rolling our own
7691         declarations of malloc and free, to avoid problems with
7692         incompatible declarations (using 'throw') C++'s stdlib.h.  This
7693         should fix Debian bug 340012
7694         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7695         reported by Guillaume Melquiond.
7697 2006-02-13  Paul Eggert  <eggert@cs.ucla.edu>
7699         * NEWS: Clarify symbols versus types in unused-value warnings.
7701         * configure.ac (AC_INIT): Bump version number.
7703 2006-02-13  Paul Eggert  <eggert@cs.ucla.edu>
7705         * NEWS: Version 2.1a.
7706         * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7707         since C99 requires this.
7709 2006-02-11  Paul Eggert  <eggert@cs.ucla.edu>
7711         * m4/c-working.m4: New file.
7712         * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7714 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
7716         * Makefile.maint: Merge from coreutils.
7718 2006-02-09  Paul Eggert  <eggert@cs.ucla.edu>
7720         More portability fixes for problems summarized by Nelson H. F. Beebe.
7722         * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7723         configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7724         CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7725         LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7726         messes up because C++ code is compiled in 32-bit mode but linked
7727         in 64-bit mode.
7729 2006-02-08  Paul Eggert  <eggert@cs.ucla.edu>
7731         More portability fixes for problems summarized by Nelson H. F. Beebe.
7733         * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7734         2.5.31.  This resembles the 2005-10-10 patch to src/scan-skel.l.
7736         * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7737         nodist_PROGRAMS, since we don't need to actually compile the
7738         example if we're just doing a plain 'make'.  This avoids bothering
7739         the installer unnecessarily about problems due to weird C++
7740         compilers.
7742 2006-02-06  Paul Eggert  <eggert@cs.ucla.edu>
7744         More portability fixes for problems summarized by Nelson H. F. Beebe.
7746         * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7747         than #include "...", and compile with -I'.'.  The old method was
7748         not portable, according to Posix and the C standard, and it does
7749         not work with Sun C 5.7, where previous #line directives affect
7750         the working directory used in later #include "..." directives.
7752 2006-02-06  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
7754         Various DJGGP specific issues in /djgpp
7756 2006-02-02  Paul Eggert  <eggert@cs.ucla.edu>
7758         More portability fixes for problems summarized by Nelson H. F. Beebe.
7760         * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7761         '#include <map>' works and that you can apply ++ to iterators.
7763 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
7765         Work around portability problems summarized by Nelson H. F. Beebe in
7766         <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7768         * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7769         that '#include <string>' works.
7771         * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7772         porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7773         "warning: sorry: semantics of inline function static data `const
7774         unsigned char translate_table[262]' are wrong (you'll wind up with
7775         multiple copies)".
7777         * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7778         or, xor to not_, and_, or_, and xor_, respectively.  This works
7779         around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7780         random system header somewhere that includes the equivalent of
7781         <iso646.h>.
7783         * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7784         -E" works; it apparently doesn't work with PathScale EKO Compiler
7785         Suite Version 2.0.
7787 2006-01-30  Joel E. Denny  <jdenny@ces.clemson.edu>
7789         During deterministic GLR operation, user actions should be able to
7790         influence the parse by changing yychar.  To make this easier to fix and
7791         to make glr.c easier to evolve in general, don't maintain yytoken in
7792         parallel with yychar; just compute yytoken when needed.
7793         * tests/glr-regression.at (Incorrect lookahead during deterministic
7794         GLR): Check that setting yychar in a user action has the intended
7795         effect.
7796         * data/glr.c (yyGLRStack): Remove yytokenp member.
7797         (yyclearin): Don't set *yytokenp.
7798         (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7799         yychar rather than *yytokenp to determine the current lookahead.
7800         Compute yytoken locally when needed.
7801         (yyparse): Likewise.  Remove the local yytoken that yytokenp used to
7802         point to.
7804         * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7805         after `--report' documentation.
7807 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
7809         * src/parse-gram.y (grammar_declaration): Location of printer
7810         symbol is @1, not list->location.  Bug reported by twlevo.
7811         * tests/input.at (Incompatible Aliases): Adjust to above change.
7813 2006-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7815         * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove.  Instead, do
7816         all the test at once.  This makes the output easier to read in the
7817         normal case.
7819         Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7820         got from <http://bro-ids.org/download.html>.  The bug is that
7821         when two actions appeared in succession, the second one was
7822         scanned before the first one was added to the grammar rule
7823         as a midrule action.  Bison then output the incorrect warning
7824         "parse.y:905.17-906.36: warning: unused value: $3".
7825         * src/parse-gram.y (BRACED_CODE, action): These are no longer
7826         associated with a value.
7827         (rhs): Don't invoke grammar_current_rule_action_append.
7828         (action): Invoke it here instead.
7829         * src/reader.c (grammar_midrule_action): Now extern.
7830         (grammar_current_rule_action_append): Don't invoke
7831         grammar_midrule_action; that is now the scanner's job.
7832         * src/reader.h (last_string, last_braced_code_loc):
7833         (grammar_midrule_action): New decls.
7834         * src/scan-gram.l (last_string): Now extern, sigh.
7835         (last_braced_code_loc): New extern variable.
7836         (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7837         rule already has an action.
7838         (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7839         * tests/input.at (AT_CHECK_UNUSED_VALUES):
7840         Add some tests to check that the above changes fixed the bug.
7842 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7844         * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7845         All used changed.  Check whether the symbol has a destructor,
7846         not whether it is typed.
7847         * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7848         that the values are still reported as unused.  All line numbers
7849         adjusted.
7851 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7853         Work around a bug in bro 0.8, which underparenthesizes its
7854         definition of YYLLOC_DEFAULT.
7855         * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7856         their arguments.
7857         * data/lalr1.cc: Likewise.
7858         * data/yacc.cc: Likewise.
7860 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7862         Work around a bug in Pike 7.0, and give the Pike folks a
7863         better way to override the usual int widths.
7864         * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7865         user can override the types.
7866         (short): #undef, to work around a bug in Pike 7.0.
7867         (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7868         (union yyalloc.yyss): Use yytype_int16 rather than short.
7869         All uses changed.
7870         (yysigned_char): Remove.
7871         * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7872         (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7873         * tests/regression.at (Web2c Actions): Adjust to above changes.
7875         * src/reader.c (check_and_convert_grammar): New function.
7876         (reader): Close the input file even if something went wrong during
7877         parsing.  Minor file descriptor leak reported by twlevo.
7879         * src/assoc.c (assoc_to_string): Use a default: abort (); case
7880         to pacify gcc -Wswitch-default.
7881         * src/scan-gram.l (adjust_location): Use a default: break; case
7882         to pacify gcc -Wswitch-default.
7883         * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7884         (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7885         (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7886         Move these decls to scan-skel.l, since they don't need to be
7887         visible elsewhere.
7888         * src/scan-skel.l: Accept the above decls.
7889         (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7890         is used.
7892 2006-01-21  Paul Eggert  <eggert@cs.ucla.edu>
7894         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7895         since we don't want to insist on a version number at the start
7896         of the changelog every time.
7897         * Makefile.maint: Sync from coreutils a bit better.
7898         (sc_trailing_blank): Renamed from sc_trailing_space.
7899         All uses changed.
7900         (sc_no_if_have_config_h, sc_require_config_h):
7901         (sc_prohibit_assert_without_use): New rules.
7902         (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7903         (sc_dd_max_sym_length): Fix leading spaces in rule.
7904         (sc_system_h_headers): Prefix with @.
7905         (sc_useless_cpp_parens, m4-check): Output line numbers.
7906         (changelog-check): Allow version only in head.
7907         * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7908         satisfy new Makefile.maint rule.
7909         * data/glr.c: Likewise.
7910         * data/glr.cc: Likewise.
7911         * data/lalr1.cc: Likewise.
7912         * data/yacc.c: Likewise.
7913         * lib/ebitsetv.c: Likewise.
7914         * lib/lbitset.c: Likewise.
7915         * lib/subpipe.c: Likewise.
7916         * lib/timevar.c: Likewise.
7917         * src/system.h: Likewise.
7918         * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7919         * djgpp/Makefile.maint: Add copyright notice.
7920         * djgpp/README.in: Likewise.
7921         * djgpp/config.bat: Likewise.
7922         * djgpp/config.site: Likewise.
7923         * djgpp/config_h.sed: Likewise.
7924         * djgpp/djunpack.bat: Likewise.
7925         * djgpp/config.sed: Fix copyright notice to match standard format.
7926         * djgpp/subpipe.h: Likewise.
7927         * lib/bitsetv-print.c: Likewise.
7928         * lib/bitsetv.c: Likewise.
7929         * lib/subpipe.h: Likewise.
7930         * lib/timevar.c: Likewise.
7931         * lib/timevar.h: Likewise.
7932         * djgpp/subpipe.c: Use standard recipe for config.h.
7933         * lib/abitset.c: Likewise.
7934         * lib/bitset.c: Likewise.
7935         * lib/bitset_stats.c: Likewise.
7936         * lib/bitsetv-print.c: Likewise.
7937         * lib/bitsetv.c: Likewise.
7938         * lib/ebitsetv.c: Likewise.
7939         * lib/get-errno.c: Likewise.
7940         * lib/lbitset.c: Likewise.
7941         * lib/subpipe.c: Likewise.
7942         * lib/timevar.c: Likewise.
7943         * lib/vbitset.c: Likewise.
7944         * tests/local.at: Likewise.
7945         * src/scan-gram.l: Don't include verify.h, since system.h does
7946         that for us.
7947         * .x-sc_require_config_h: New file.
7948         * .x-sc_unmarked_diagnostics: New file.
7950 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
7952         Be a bit more systematic about using 'abort'.
7953         * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7954         * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7955         Put 'default: abort ();' before some other case, to satisfy older
7956         pedantic compilers.
7957         * lib/bitset_stats.c (bitset_stats_init): Likewise.
7958         * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7959         * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7960         * src/conflicts.c (resolve_sr_conflict): Likewise.
7961         * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7962         (get_decision_str, get_orientation_str, get_node_alignment_str):
7963         (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7964         (get_linestyle_str, get_arrowstyle_str): Likewise.
7965         * src/conflicts.c (resolve_sr_conflict):
7966         Use a default case rather than one for the one remaining enum
7967         value, to catch invalid enum values as well.
7968         * src/lalr.c (set_goto_map, map_goto):
7969         Prefer "assert (FOO);" to "if (!FOO) abort ();".
7970         * src/nullable.c (nullable_compute, token_definitions_output):
7971         Likewise.
7972         * src/reader.c (packgram, reader): Likewise.
7973         * src/state.c (transitions_to, state_new, state_reduction_find):
7974         Likewise.
7975         * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7976         (symbol_pack): Likewise.
7977         * src/tables.c (conflict_row, pack_vector): Likewise.
7978         * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7979         (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7980         * src/system.h: Don't include <assert.h>.
7981         (assert): New macro.
7983         * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7984         (Destructor Decl, Parser Function, Pure Calling):
7985         Describe rules for braces inside C code more carefully.
7987 2006-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7989         Fix some porting glitches found by Nelson H. F. Beebe.
7990         * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7991         compilers that don't understand that abort () does not return.
7992         * src/state.c (transitions_to): Likewise.
7993         * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7994         that '#include <cstdlib>' works.
7995         * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7996         (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7997         #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7998         for the benefit of some pre-C99 compilers.
8000         * bootstrap: Undo changes to gnulib files that autoreconf made.
8002         Minor fixups to get 'make maintainer-check' to work.
8003         * configure.ac: Don't use -Wnested-externs, as it's incompatible
8004         with the new verify.h implementation.
8005         * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8006         * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8007         * data/yacc.c (YYUSE): Likewise.
8008         * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8009         * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8010         * src/parse-gram.y (declaration): Don't pass a string constant
8011         to a function that expects char *, since GCC might complain
8012         about the constant value.
8013         * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8014         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8015         before #defining them.
8016         * tests/glr-regression.at
8017         (Incorrectly initialized location for empty right-hand side in GLR):
8018         In yyerror, use the msg arg.
8019         (Corrupted semantic options if user action cuts parse):
8020         (Incorrect lookahead during deterministic GLR):
8021         (Incorrect lookahead during nondeterministic GLR):
8022         Don't name a local var 'index'; it shadows string.h's 'index'.
8024 2006-01-19  Akim Demaille  <akim@epita.fr>
8026         * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8027         location, not just parts of it.
8029 2006-01-18  Paul Eggert  <eggert@cs.ucla.edu>
8031         * NEWS: Document the fact that multiple %unions are now allowed.
8032         * doc/bison.texinfo (Union Decl): Likewise.
8033         * TODO: This feature is now implemented, so remove it from
8034         the wishlist.
8036         * Makefile.maint: Merge with coreutils Makefile.maint.
8037         (CVS_LIST): Use build-aux version if available.
8038         (VERSION_REGEXP): New macro.
8039         (syntax-check-rules): Add sc_no_if_have_config_h,
8040         sc_prohibit_assert_without_use, sc_require_config_h,
8041         sc_useless_cpp_parens.
8042         (sc_obsolete_symbols): Check for O_NDELAY.
8043         (sc_dd_max_sym_length): Track coreutils.
8044         (sc_unmarked_diagnostics): Look in all files, not just *.c.
8045         (sc_useless_cpp_parens): New rule.
8046         (news-date-check): Look for version or today's date.
8047         (changelog-check): Don't require version number near head.
8048         (copyright-check): Use current year instead of hardwiring 2005.
8049         (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8050         (announcement): Add --gpg-key-ID.
8052         * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8053         with "file system".
8055         Avoid undefined behavior that addressed just before the start of an
8056         array.  Problem reported by twlevo.
8057         * src/reader.c (packgram): Prepend a new sentinel before ritem.
8058         * src/lalr.c (build_relations): Rely on new sentinel.
8059         * src/gram.c (gram_free): Adjust to new sentinel.
8061 2006-01-12  Joel E. Denny  <jdenny@ces.clemson.edu>
8063         * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8064         yylookaheadNeeds.  All uses updated.
8065         (yysplitStack): Rename local yynewLookaheadStatuses to
8066         yynewLookaheadNeeds.
8067         * data/glr-regression.at (Incorrect lookahead during nondeterministic
8068         GLR): In comments, change `lookahead status' to `lookahead need'.
8070 2006-01-11  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
8072         * data/glr.c (yysplitStack): A little stylistic rewrite.
8074 2006-01-11  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
8076         * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8078 2006-01-11  Joel E. Denny  <jdenny@ces.clemson.edu>
8080         * doc/bison.texinfo: Fix some typos.
8081         (GLR Semantic Actions): New subsection discussing special
8082         considerations because GLR semantic actions might be deferred.
8083         (Actions): Mention look-ahead usage of yylval.
8084         (Actions and Locations): Mention look-ahead usage of yylloc.
8085         (Special Features for Use in Actions): Add YYEOF entry and mention it
8086         in the yychar entry.
8087         In the yychar entry, remove mention of the local yychar case (pure
8088         parser) since this is irrelevant information when writing semantic
8089         actions and since it's already discussed in `Table of Symbols' where
8090         yychar is otherwise described as an external variable.
8091         In the yychar entry, don't call it the `current' look-ahead since it
8092         isn't when semantic actions are deferred.
8093         In the yychar and yyclearin entries, add note about deferred semantic
8094         actions.
8095         Add yylloc and yylval entries discussing look-ahead usage.
8096         (Look-Ahead Tokens): When discussing yychar, don't call it the
8097         `current' look-ahead, and do mention yylval and yylloc.
8098         (Error Recovery): Cross-reference `Action Features' when mentioning
8099         yyclearin.
8100         (Table of Symbols): In the yychar entry, don't call it the `current'
8101         look-ahead.
8102         In the yylloc and yylval entries, mention look-ahead usage.
8104 2006-01-08  Joel E. Denny  <jdenny@ces.clemson.edu>
8106         * tests/glr-regression.at: Update copyright year to 2006.
8108 2006-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
8110         * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8111         use during nondeterministic operation to track which stacks have
8112         actually needed the current lookahead.
8113         (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8114         Allocate, deallocate, resize, and otherwise shuffle space for
8115         yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8116         (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8117         appropriately during nondeterministic operation.
8118         (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8119         members to store the current lookahead to be used by the deferred
8120         user action.
8121         (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8122         from which the RHS is taken.  Set the lookahead members of the new
8123         yySemanticOption according to the lookahead status for stack yyk.
8124         (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8125         yyaddDeferredAction.
8126         (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8127         members of yySemanticOption before invoking yyuserAction, and then set
8128         them back to their current values afterward.
8129         (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8130         (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8131         * tests/glr-regression.at: Remove `.' from the ends of recent test case
8132         titles for consistency.
8133         (Leaked merged semantic value if user action cuts parse): In order to
8134         suppress lint warnings, use arguments in merge function, and assign
8135         char value < 128 in main.
8136         (Incorrect lookahead during deterministic GLR): New test case.
8137         (Incorrect lookahead during nondeterministic GLR): New test case.
8139 2006-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
8141         * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8142         !yyvaluep as signal that no semantic value is available to print.
8143         * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8144         to print a semantic value.
8146 2006-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
8148         * tests/glr-regression.at: For consistency with my newer test cases,
8149         don't thank myself.
8151 2006-01-05  Joel E. Denny  <jdenny@ces.clemson.edu>
8153         * data/glr.c (yyresolveValue): When merging semantic options, if at
8154         least one user action succeeds but a later one cuts the parse, then
8155         destroy the semantic value before returning rather than leaking it.
8156         (yyresolveStates): If a user action cuts the parse and thus
8157         yyresolveValue fails, ignore the (unset) semantic value rather than
8158         corrupting the yyGLRState, and empty the semantic options list since
8159         the user actions should have called all necessary destructors.
8160         Simplify code with YYCHK.
8161         * tests/glr-regression.at (Corrupted semantic options if user action
8162         cuts parse): New test case.
8163         (Undesirable destructors if user action cuts parse): New test case.
8164         Before applying any of this patch, this test case never actually failed
8165         for me... but only because the corrupted semantic options usually
8166         masked this bug.
8167         (Leaked merged semantic value if user action cuts parse): New test
8168         case.
8170 2006-01-05  Akim Demaille  <akim@epita.fr>
8172         * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8174 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8176         * data/c.m4 (b4_c_modern): New macro, with a new provision for
8177         _MSC_VER.  Problem reported by Cenzato Marco.
8178         (b4_c_function_def): Use it.
8179         * data/yacc.c (YYMODERN_C): Remove.  All uses replaced by
8180         b4_c_modern.
8181         (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8182         than rolling our own.
8184 2006-01-04  Akim Demaille  <akim@epita.fr>
8186         Also warn about non-used mid-rule values.
8187         * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8188         member.
8189         (symbol_list_new): Adjust.
8190         * src/reader.c (symbol_typed_p): New.
8191         (grammar_rule_check): Use it.
8192         (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8193         Check its rule.
8194         * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8195         Use it.
8196         * tests/actions.at (Exotic Dollars): Adjust.
8198 2006-01-04  Akim Demaille  <akim@epita.fr>
8200         * src/reader.c (grammar_midrule_action): If $$ is set in a
8201         mid-rule, move the `used' bit to its lhs.
8202         * tests/input.at (Unused values): New.
8203         * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8205 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8207         * doc/bison.texinfo (Bison Options): Say more accurately what
8208         --yacc does.
8209         * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8210         about declarations in the grammar when in Yacc mode, as POSIX does
8211         not require a diagnostic when the grammar uses extensions.
8213         * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8215         Warn about dubious constructions like "%token T T".
8216         Reported by twlevo.
8217         * src/symtab.h (struct symbol.declared): New member.
8218         * src/symtab.c (symbol_new): Initialize it to false.
8219         (symbol_class_set): New arg DECLARING, specifying whether
8220         this is a declaration that we want to warn about, if there
8221         is more than one of them.  All uses changed.
8223         * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8224         Allow multiple %union directives, whose contents concatenate.
8225         * src/parse-gram.y (grammar_declaration): Likewise.
8226         Use muscle_code_grow, so that we don't need stype_line any more.
8227         All uses changed.
8229         * src/muscle_tab.c (muscle_grow): Fix comment.
8231         * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8232         * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8233         Update copyright year to 2006.
8235 2006-01-03  Akim Demaille  <akim@epita.fr>
8237         Have glr.cc pass (some of) the calc.at tests.
8238         * data/glr.cc (b4_parse_param_orig): New.
8239         (b4_parse_param): Improve its definition, and bound it more
8240         clearly in the skeleton.
8241         (b4_epilogue): Append, instead of prepending, in order to keep
8242         #line consistency.
8243         Simplify the generation of auxiliary functions: locations and
8244         purity are mandated.
8245         (b4_global_tokens_and_yystype): Honor it.
8246         * data/location.cc (c++.m4): Don't include it.
8247         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8248         and AT_SKEL_CC_IF.
8249         * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8250         AT_LALR1_CC_IF.
8251         Be sure to initialize the first position's filename.
8252         (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8253         mandated anyway.
8254         (AT_CHECK_CALC_GLR_CC): New.
8255         Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8257 2006-01-02  Akim Demaille  <akim@epita.fr>
8259         * src/output.c (output_skeleton): Don't hard wire the inclusion of
8260         c.m4.
8261         * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8262         * data/glr.cc: Do not include stack.hh.
8264 2006-01-02  Joel E. Denny  <jdenny@ces.clemson.edu>
8266         * data/glr.c: Reformat whitespace with tabs.
8267         (b4_lpure_formals): Remove this unused m4 macro.
8268         * tests/cxx-type.at: Reformat whitespace with tabs.
8269         (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8270         since it's a member.  Rename type to isNterm for clarity.
8272 2005-12-29  Akim  <akim@sulaco.local>
8274         Let glr.cc catch up with symbol_value_print.
8275         * data/glr.cc (b4_yysymprint_generate): Replace by...
8276         (b4_yy_symbol_print_generate): this.
8277         (yy_symbol_print, yy_symbol_value_print): Declare them.
8279 2005-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8281         * src/location.h (boundary): Note that a line or column equal
8282         to INT_MAX indicates an overflow.
8283         * src/scan-gram.l: Include verify.h.  Don't include get-errno.h.
8284         (rule_length_overflow, increment_rule_length, add_column_width):
8285         New functions.
8286         (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8287         (<SC_BRACED_CODE>"}"):
8288         Use increment_rule_length rather than incrementing it by hand.
8289         (adjust_location, handle_syncline): Diagnose overflow.
8290         (handle_action_dollar, handle_action_at):
8291         Fix bug with monstrosities like $-2147483648.
8292         Remove now-unnecessary checks.
8293         (scan_integer): Verify assumptions and remove now-unnecessary checks.
8294         (convert_ucn_to_byte): Verify assumptions.
8295         (handle_syncline): New arg LOC.  All callers changed.
8296         Don't store through a value derived from char const * pointer.
8298         * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8299         GCC warnings.
8301 2005-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8303         * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8304         Remove unnecessary forward static decls.
8306 2005-12-27  Akim Demaille  <akim@epita.fr>
8308         * src/reader.c (grammar_current_rule_check): Also check that $$
8309         is used.
8310         Take the rule to check as argument, hence rename as...
8311         (grammar_rule_check): this.
8312         * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8313         Rename as...
8314         (grammar_rule_begin, grammar_rule_end): these, for consistency.
8315         (grammar_midrule_action, grammar_symbol_append): Now static.
8316         * tests/torture.at (input): Don't rely on the default action
8317         being always performed.
8318         * tests/calc.at: "Set" $$ even when the action is "cut" with
8319         YYERROR or other.
8320         * tests/actions.at (Exotic Dollars): Instead of using unused
8321         values, check that the warning is issued.
8323 2005-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8325         * NEWS: Improve wording for unused-value warnings.
8327 2005-12-22  Akim Demaille  <akim@epita.fr>
8329         * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8330         (b4_yysymprint_generate): Rename as...
8331         (b4_yy_symbol_print_generate): this.
8332         Generate yy_symbol_print instead of yysymprint.
8333         Generate also yy_symbol_value_print, and use it.
8335 2005-12-22  Akim Demaille  <akim@epita.fr>
8337         * NEWS: Warn about unused values.
8338         * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8339         a `used' member.
8340         (symbol_list_n_get, symbol_list_n_used_set): New.
8341         (symbol_list_n_type_name_get): Use symbol_list_n_get.
8342         * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8343         * src/reader.c (grammar_current_rule_check): Check that values are
8344         used.
8345         * src/symtab.c (symbol_print): Accept 0.
8346         * tests/existing.at: Remove the type information.
8347         Empty the actions.
8348         Remove useless actions (beware of mid-rule actions: perl -000
8349         -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8350         * tests/actions.at (Exotic Dollars): Use unused values.
8351         * tests/calc.at: Likewise.
8352         * tests/glr-regression.at (No users destructors if stack 0 deleted):
8353         Likewise.
8355         * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8356         rule_useful_p.
8358 2005-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8360         Undo 2005-12-01 tentative license wording change.  The wording is
8361         still being reviewed by the lawyers, and we don't want to wait for
8362         them before publishing a test release.  For now, revert to the
8363         previous wording.
8364         * NEWS: Undo 2005-12-01 change.
8365         * data/glr.c: Revert to previous license wording.
8366         * data/glr.cc: Likewise.
8367         * data/lalr1.cc: Likewise.
8368         * data/location.cc: Likewise.
8369         * data/yacc.c: Likewise.
8371         * NEWS: Reword %destructor vs YYABORT etc.
8372         * data/glr.c: Use American spacing, for consistency.
8373         * data/glr.cc: Likewise.
8374         * data/lalr1.cc: Likewise.
8375         * data/yacc.c: Likewise.
8376         * data/yacc.c: Reformat comments slightly.
8377         * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8378         for consistency.  Fix some spelling errors and reword recently-included
8379         text slightly.
8380         * tests/cxx-type.at: Cast results of malloc, for C++.
8382 2005-12-21  Joel E. Denny  <address@hidden>
8384         * tests/cxx-type.at: Construct a tree, count the parents of shared
8385         nodes, and free each node once and only once.  Previously, the memory
8386         for semantic values was leaked instead.
8388 2005-12-21  Joel E. Denny  <address@hidden>
8390         * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8391         (yylval, yylloc): If pure, #define to yystackp->yyval and
8392         yystackp->yyloc similar to yychar and yynerrs.
8393         (yyparse): If pure, remove local yylval and yylloc. Add local
8394         yystackp to accommodate pure definitions of yylval and yylloc.
8395         (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8396         yylvalp and yyllocp to &yylval and &yylloc.
8397         (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8398         namespace. Previously, nerrs and char were missing, but lval and lloc
8399         weren't necessary.
8400         (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8401         yylvalp and yyllocp parameters since, if pure, these are now always
8402         accessible through yystackp.  If not pure, they are still accessible
8403         globally.
8404         * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8405         `if (YYID (N))' to pacify lint.
8407 2005-12-21  Akim Demaille  <akim@epita.fr>
8409         YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8410         destroy the RHS symbols of a rule.
8411         * data/yacc.c (yylen): Initialize to 0.
8412         Keep its value to the number of items to possibly shift.
8413         In particular, a regular successful parse that ends on YYFINAL by
8414         a (internal) YYACCEPT must not have yylen != 0.
8415         (yyerrorlab, yyreturn): Pop the RHS.
8416         Reorder a bit to emphasize the `shifting' bits of code.
8417         (YYPOPSTACK): Now accept a number of items to pop.
8418         * data/lalr1.cc: Likewise.
8419         * data/glr.c: Formatting changes.
8420         Use goto instead of fall through.
8421         * doc/bison.texinfo (Destructor Decl): Complete.
8423 2005-12-20  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
8425         * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8426         * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8427         * djgpp/config.bat: Replace every occurence of the file name
8428         scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8429         c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8430         * djgpp/config.sed: Replace every occurence of the file name
8431         scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8432         c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8433         * djgpp/djunpack.bat: DJGPP specific file.
8434         * djgpp/fnchange.lst: DJGPP specific file.
8435         * djgpp/README.in: Add new information about how to unpack the bison
8436         source on MSDOS and other systems which have 8.3 file name restrictions
8437         using djunpack.bat and fnchange.lst.
8439 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
8441         * bootstrap (build_cvs_prefix): Remove; unused.
8442         (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8443         when getting gnulib.
8445 2005-12-12  "Joel E. Denny" <jdenny@ces.clemson.edu>
8447         * data/glr.c: Reorder typedef declarations for structs to match order
8448         of struct declarations.
8449         Rename yystack everywhere to yystackp except in yyparse where it's not
8450         a pointer.
8451         (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8452         consistency.
8453         (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8454         (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8455         (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8456         lint.
8458 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
8460         * tests/sets.at (Accept): Fix typos in regular expression used to
8461         sed out the final state number.
8463         Work around portability problem on Solaris 10: flex-generated
8464         files include <stdio.h> before <config.h>, which messes up
8465         because the latter defines __EXTENSIONS__.  Address the problem
8466         by creating two new little files that include <config.h> first,
8467         then include the flex-generated files.  Rewrite everyone else
8468         to include <config.h> first, as well.
8469         * lib/timevar.c: Always include "config.h".
8470         * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8471         scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8472         (EXTRA_bison_SOURCES): New macro.
8473         * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8474         * src/system.h: Don't include config.h.
8475         * src/LR0.c: Include <config.h> first.
8476         * src/assoc.c: Likewise.
8477         * src/closure.c: Likewise.
8478         * src/complain.c: Likewise.
8479         * src/conflicts.c: Likewise.
8480         * src/derives.c: Likewise.
8481         * src/files.c: Likewise.
8482         * src/getargs.c: Likewise.
8483         * src/gram.c: Likewise.
8484         * src/lalr.c: Likewise.
8485         * src/location.c: Likewise.
8486         * src/main.c: Likewise.
8487         * src/muscle_tab.c: Likewise.
8488         * src/nullable.c: Likewise.
8489         * src/output.c: Likewise.
8490         * src/parse-gram.y: Likewise.
8491         * src/print.c: Likewise.
8492         * src/print_graph.c: Likewise.
8493         * src/reader.c: Likewise.
8494         * src/reduce.c: Likewise.
8495         * src/relation.c: Likewise.
8496         * src/state.c: Likewise.
8497         * src/symlist.c: Likewise.
8498         * src/symtab.c: Likewise.
8499         * src/tables.c: Likewise.
8500         * src/uniqstr.c: Likewise.
8501         * src/vcg.c: Likewise.
8503         * src/parse-gram.y: Fix minor problems uncovered by lint.
8504         (current_lhs, current_lhs_location): Now static.
8505         (current_assoc): Remove unused variable.
8507         Cleanups so that Bison-generated parsers have less lint.
8508         * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8509         Prepend /*ARGSUSED*/, for lint's sake.
8510         * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8511         definition if 'lint' is defined.
8512         (YYID): New macro (or function, if lint).
8513         All uses of /*CONSTCOND*/0 replaced by YYID(0).
8514         * data/yacc.c: Likewise.
8515         * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8516         (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8517         * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8518         is C++ only.
8519         * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8520         * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8521         Use YYID(0) rather than 0, for lint.
8522         (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8523         (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8525 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8527         * tests/glr-regression.at
8528         (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8529         Close memory leak reported by twlevo.
8531 2005-12-06  "Joel E. Denny" <jdenny@ces.clemson.edu>
8533         * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8534         all stacks.
8535         (yyparse): Iterate another stack in order to call user destructors.
8536         * tests/glr-regression.at (No users destructors if stack 0 deleted):
8537         New test case.
8538         (Duplicated user destructor for lookahead): This test now is expected
8539         to succeed.
8541 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8543         * NEWS: Document the following change.
8544         * data/yacc.c: Say "parser skeleton" rather than "file", since
8545         it's no longer just a file.
8546         * data/glr.c: Grant a special exception for C GLR parsers, that
8547         reads like the already-existing exception for C LALR(1) parsers.
8548         * data/glr.cc: Likewise.
8549         * data/lalr1.cc: Likewise.
8550         * data/location.cc: Likewise.
8551         * data/yacc.c: Reword the "written by" statement to clarify that
8552         it was the parser skeleton, not the entire output file.
8553         * data/glr.c: Written by Paul Hilfinger.
8554         * data/glr.cc: Written by Akim Demaille.
8555         * data/lalr1.cc: Likewise.
8557 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
8559         * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8560         Fix typos in previous change that broke 'make check'.
8561         YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8562         supported in C.
8563         * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8564         Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8565         We can revert this once things settle down.
8567         * src/conflicts.c (conflicts_print): Don't print file name twice
8568         when %expect fails because there were no conflicts.
8569         * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8570         change.
8571         * tests/conflicts.at (%expect not enough, %expect too much):
8572         (%expect with reduce conflicts): Adjust to new behavior.
8574 2005-11-18  Akim Demaille  <akim@epita.fr>
8576         * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8577         errors.
8578         * NEWS: Document this.
8579         * doc/bison.texinfo (Expect Decl): Likewise.
8581 2005-11-16  Akim Demaille  <akim@epita.fr>
8583         Generalize the display of semantic values and locations in traces.
8584         * data/glr.c (yy_reduce_print): Fix indices (again).
8585         * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8586         literal integers.
8587         * data/lalr1.cc (yyreduce_print): Rename as...
8588         (yy_reduce_print): this.
8589         Display values and locations.
8590         * data/yacc.c (yy_reduce_print): Likewise.
8591         (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8592         (yysymprint): Move higher to be visible from yy_reduce_print).
8593         (yyparse): Adjust.
8594         * tests/calc.at: Adjust the expected length of the traces.
8596 2005-11-14  Akim Demaille  <akim@epita.fr>
8598         * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8599         from 1 to N, while values and location start at 0.
8600         (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8602 2005-11-14  Akim Demaille  <akim@epita.fr>
8604         * data/glr.c (yy_reduce_print): Fix the $ number.
8606 2005-11-14  Akim Demaille  <akim@epita.fr>
8608         "Use" parse parameters.
8609         * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8610         * data/glr.c, data/glr.cc: Use them.
8611         * data/glr.c (YYUSE): Have a C++ definition that supports
8612         non-pointer types.
8614 2005-11-14  Akim Demaille  <akim@epita.fr>
8616         * data/glr.c (yyexpandGLRStack): Declare only if defined.
8618 2005-11-14  Akim Demaille  <akim@epita.fr>
8620         * data/glr.cc: New.
8621         * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8623 2005-11-12  Akim Demaille  <akim@epita.fr>
8625         Let position and location be PODs.
8626         * data/location.cc (position::initialize, location::initialize): New.
8627         (position::position, location::location): Define only if
8628         b4_location_constructors is defined.
8629         * data/lalr1.cc (b4_location_constructors): Define it for backward
8630         compatibility.
8631         * doc/bison.texinfo (Initial Action Decl): Use initialize.
8633 2005-11-12  Akim Demaille  <akim@epita.fr>
8635         * data/lalr1.cc: Move the body of the ctor and dtor into the
8636         parser file (instead of the header).
8637         Wrap the implementations in a "namespace yy".
8639 2005-11-12  Akim Demaille  <akim@epita.fr>
8641         Have glr.c include its header file when created.
8642         * data/glr.c (b4_shared_declarations): New.
8643         Output them verbatim in the parser if !%defines, otherwise
8644         output then in the header file, and include it instead.
8646 2005-11-11  Akim Demaille  <akim@epita.fr>
8648         * data/glr.c: Comment changes.
8650 2005-11-11  Akim Demaille  <akim@epita.fr>
8652         When yydebug, report semantic and location values for reductions.
8653         * data/glr.c (yy_reduce_print): Report the semantic values and the
8654         locations.
8655         (YY_REDUCE_PRINT): Adjust.
8656         (yyglrReduce): Use them.
8657         (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8658         * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8659         * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8660         traces.
8662 2005-11-10  Akim Demaille  <akim@epita.fr>
8664         * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8665         (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8666         (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8668 2005-11-09  Albert Chin-A-Young  <china@thewrittenword.com>
8670         * m4/cxx.m4, examples/Makefile.am: Don't build
8671         examples/calc++ if no C++ compiler is available.  (trivial change)
8673 2005-11-09  Akim Demaille  <akim@epita.fr>
8675         * src/scan-skel.l: Use a couple of asserts.
8677 2005-11-03  Akim Demaille  <akim@epita.fr>
8679         In some (weird) cases, the final state number is incorrect.
8680         Reported by Alexandre Duret-Lutz.
8681         * src/LR0.c (state_list_append): Remove the computation of
8682         final_state.
8683         (save_reductions): Do it here.
8684         (get_state): Alpha conversion.
8685         (generate_states): Use a for loop.
8686         * src/gram.h (item_number_is_rule_number)
8687         (item_number_is_symbol_number): New.
8688         * src/state.c: Use assert.
8689         * src/system.h: Include assert.h.
8690         * tests/sets.at (Accept): New.
8692 2005-10-30  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
8694         * data/glr.c (yyfill): Adjust comment.
8695         (yyresolveAction): Initialize default location properly
8696         for empty right-hand sides.
8697         (yydoAction): Ditto.
8698         Add comment explaining apparently dead code.
8699         * tests/glr-regression.at
8700         (Incorrectly initialized location for empty right-hand side in GLR):
8701         New test.
8703 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8705         * bootstrap (cleanup_gnulib): New function.  Use it to clean up
8706         gnulib when interrupted.  This fixes some race conditions and
8707         works around some portability problems (one noted by Paul
8708         Hilfinger).
8710 2005-10-22  Akim  <akim@epita.fr>
8712         * Makefile.cfg: Adjust to config -> build-aux.
8713         Reported by twledo.
8715 2005-10-21  Akim Demaille  <akim@epita.fr>
8717         * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8718         the %parse-params.
8719         * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8720         * data/yacc.c (b4_Pure_if): Rename as...
8721         (b4_yacc_pure_if): this.
8722         (YY_SYMBOL_PRINT, yyparse): Adjust.
8723         * doc/bison.texinfo: Formatting changes.
8725 2005-10-21  Akim Demaille  <akim@epita.fr>
8727         Finish the transition config -> build-aux.
8728         * configure.ac, Makefile.am: Use build-aux.
8729         * config/prev-version, config/announce-gen, config/Makefile.am:
8730         Move to...
8731         * build-aux/prev-version, build-aux/announce-gen,
8732         * build-aux/Makefile.am: here.
8734 2005-10-14  Akim Demaille  <akim@epita.fr>
8736         * examples/calc++/test: Use set -x only when VERBOSE.
8738 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
8740         * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8741         * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8743 2005-10-13  Akim Demaille  <akim@epita.fr>
8745         * src/scan-skel.l: Output the base name parts of the parser and
8746         header file names.
8747         * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8748         additional checks.
8749         Use this to exercise C++ outputs in subdirs.
8750         Reported by Oleg Smolsky.
8752 2005-10-12  Paul Eggert  <eggert@cs.ucla.edu>
8754         * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8755         __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8756         Problem reported by John P. Hartmann.
8757         * data/yacc.c (YYMODERN_C): Likewise.  Don't define if the user has
8758         already defined it.
8760 2005-10-12  Akim Demaille  <akim@epita.fr>
8762         * src/parse-gram.y (version_check): Exit 63 to please missing
8763         (stands for "version mismatch).
8764         * tests/input.at, doc/bison.texinfo: Adjust.
8766 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8768         Work around portability problems with Visual Age C compiler
8769         (xlc and xlC_r) reported by John P. Hartmann.
8770         * data/location.cc (initial_column, initial_line): Remove.
8771         All uses replaced by 0 and 1.
8772         * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8773         that xlc complains about.
8774         * src/scan-skel.l (skel_wrap): Likewise.
8775         * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8776         as __STDC__.
8777         * data/yacc.c (YYMODERN_C): New macro, which also looks at
8778         __STDC_VERSION__.  Use it everywhere instead of looking at
8779         __STDC__ and __cplusplus.
8781 2005-10-10  Akim Demaille  <akim@epita.fr>
8783         * examples/calc++/test: Be quiet unless VERBOSE.
8785 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8787         * data/c.m4 (yydestruct, yysymprint):
8788         Use YYUSE instead of casting to void.
8789         * data/glr.c (YYUSE): New macro.
8790         (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8791         Use it instead of rolling our own.
8792         (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8793         (YYCHK1):
8794         Use /*CONSTCOND*/ to suppress lint warnings.
8795         * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8796         (YY_STACK_PRINT): Use 'false' not '0'.
8797         (YYUSE): New macro.
8798         (yysymprint_, yydestruct_): Use it instead of rolling our own.
8799         * data/yacc.c (YYUSE): New macro.
8800         (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8801         (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8802         (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8805         * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8806         (m4_map, m4_map_sep): Use it.  Handle the empty list correctly.
8808 2005-10-04  Paul Eggert  <eggert@cs.ucla.edu>
8810         Undo the parts of the unlocked-I/O change that substituted
8811         putc or puts for printf.  This might hurt performance a bit,
8812         but some people prefer the printf style.
8813         * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8814         * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8815         All uses replaced by YYFPRINTF and YYDPRINTF.
8816         * data/yacc.c: Likewise.
8817         * lib/bitset.c (bitset_print): Likewise.
8818         * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8819         putc and puts.
8820         * lib/lbitset.c (debug_lbitset): Likewise.
8821         * src/closure.c (print_firsts, print_fderives): Likewise.
8822         * src/gram.c (grammar_dump): Likewise.
8823         * src/lalr.c (look_ahead_tokens_print): Likewise.
8824         * src/output.c (escaped_output): Likewise.
8825         (user_actions_output): Break apart two printfs.
8826         * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8827         * src/reduce.c (reduce_print): Likewise.
8828         * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8829         * src/system.h: Include unlocked-io.h rathe than stdio.h.
8831         * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8832         Use assignments rather than casts-to-void to suppress
8833         unused-variable warnings.  This pacifies 'lint'.
8834         * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8835         unused-variable warnings.
8837 2005-10-03  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
8839         * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8841 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8843         Use unlocked I/O for a minor performance improvement on hosts like
8844         GNU/Linux and Solaris that support unlocked I/O.  The basic idea
8845         is to use the gnlib unlocked-io module, and to prefer putc and
8846         puts to printf when either will work (since the latter doesn't
8847         come in an unlocked flavor).
8848         * bootstrap (gnulib_modules): Add unlocked-io.
8849         * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8850         * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8851         Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8852         and similarly for puts and putc and printf.
8853         * data/yacc.c: Likewise.
8854         * lib/bitset.c (bitset_print): Likewise.
8855         * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8856         * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8857         to printf.
8858         * lib/lbitset.c (debug_lbitset): Likewise.
8859         * src/closure.c (print_firsts, print_fderives): Likewise.
8860         * src/gram.c (grammar_dump): Likewise.
8861         * src/lalr.c (look_ahead_tokens_print): Likewise.
8862         * src/output.c (escaped_output): Likewise.
8863         (user_actions_output): Coalesce two printfs.
8864         * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8865         * src/reduce.c (reduce_print): Likewise.
8866         * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8867         * src/system.h: Include unlocked-io.h rather than stdio.h.
8869         * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8870         this confuses xgettext.
8872 2005-10-02  Akim Demaille  <akim@epita.fr>
8874         * bootstrap (gnulib_modules): Add strverscmp.
8875         * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8876         * m4/.cvsignore: Add strverscmp.m4.
8877         * src/parse-gram.y (%require): New token, new rule.
8878         (version_check): New.
8879         * src/scan-gram.l (%require): Adjust.
8880         * tests/input.at (AT_REQUIRE): New.
8881         Use it.
8882         * doc/bison.texinfo (Require Decl): New.
8883         (Calc++ Parser): Use %require.
8885 2005-10-02  Akim Demaille  <akim@epita.fr>
8887         * data/location.cc: New.
8889 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>,
8890             Akim Demaille  <akim@epita.fr>
8892         Make sure -odir/foo.cc creates dir/location.hh etc.
8893         * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8894         (spec_file_prefix, spec_verbose_file, spec_graph_file)
8895         (spec_defines_file): Now const.
8896         (dir_prefix): New.
8897         (short_base_name): Remove.
8898         * src/files.c: Adjust.
8899         (dirname.h): Include.
8900         (base_name): Don't prototype it.
8901         (finput): Remove, duplicates gram_in.
8902         (full_base_name, short_base_name): Replace by...
8903         (all_but_ext, all_but_tab_ext): these.
8904         (compute_base_names): Rename as...
8905         (compute_file_name_parts): this.
8906         Update to compute the new variables, including dir_prefix.
8907         Adjust dependencies.
8908         * src/output.c (prepare): Output them.
8909         * src/reader.c: Adjust to use gram_in, not finput.
8910         * src/scan-skel.l (@dir_prefix@): New.
8912 2005-10-02  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
8914         * lib/subpipe.c: New function end_of_output_subpipe() added
8915         to allow support for non-posix systems. This is a no-op function
8916         for posix systems.
8918         * lib/subpipe.h: New function end_of_output_subpipe() added
8919         to allow support for non-posix systems. This is a no-op function
8920         for posix systems.
8922         * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8923         handle the lack of pipe/fork functionality on non-posix systems.
8925         * djgpp/Makefile.maint: DJGPP specific file.
8927         * djgpp/README.in: DJGPP specific file.
8929         * djgpp/config.bat: DJGPP specific configuration file.
8931         * djgpp/config.sed: DJGPP specific configuration file.
8933         * djgpp/config.site: DJGPP specific configuration file.
8935         * djgpp/config_h.sed: DJGPP specific configuration file.
8937         * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8939         * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8941 2005-10-02  Akim Demaille  <akim@epita.fr>
8943         * data/location.cc: New, extract from...
8944         * data/lalr1.cc: here.
8945         (location.hh): Include it after the user prologue, in case the
8946         filename type is defined by the user.
8947         Forward declation location and position before the pre-prologue.
8948         (yyresult_): Rename as...
8949         (yyresult): this, it's a local variable, not an attribute.
8950         * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8952 2005-10-01  Akim Demaille  <akim@epita.fr>
8954         * examples/extexi: Restore the #line generation.
8956 2005-09-30  Akim Demaille  <akim@epita.fr>,
8957             Alexandre Duret-Lutz <adl@gnu.org>
8959         Move the token type and YYSTYPE in the parser class.
8960         * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8961         (parser::token): New, from the moved free definition of tokens.
8962         (parser::semantic_value): Now a full definition instead of an
8963         indirection to YYSTYPE.
8964         (b4_post_prologue): No longer included in the header file, but
8965         in the implementation file.
8966         * doc/bison.texi (C+ Language Interface): Update.
8967         * src/parse-gram.y: Support unary %define.
8968         * tests/actions.at: Define global_tokens_and_yystype for backward
8969         compatibility until we update the tests.
8970         * tests/calc.at: Idem.
8971         (first_line, first_column, last_line, last_column): Define for lalr1.cc
8972         to simplify the code.
8974 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8976         Port to SunOS 4.1.4, which lacks strtoul and strerror.
8977         Ah, the good old days!  Problem reported by Peter Klein.
8978         * bootstrap (gnulib_modules): Add strerror, strtoul.
8979         * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8980         * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8982 2005-09-29  Akim Demaille  <akim@epita.fr>
8984         * data/c.m4 (b4_error_verbose_if): New.
8985         * data/lalr1.cc: Use it.
8986         (YYERROR_VERBOSE_IF): Remove.
8987         (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8988         parser members, replaced by...
8989         (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8990         local variables.
8991         (yysyntax_error_): Takes the state number as argument.
8992         (yyreduce_print_): Use the argument yyrule, not the former
8993         attribute yyn_.
8995 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8997         * bootstrap (gnulib_modules): Add verify.
8998         * lib/.cvsignore: Add verify.h.
8999         * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9000         * src/system.h (verify): Remove.
9001         Include verify.h instead.
9002         * src/tables.c (tables_generate): Use new API for 'verify'.
9004 2005-09-21  Paul Eggert  <eggert@cs.ucla.edu>
9006         * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9007         local variables whose names begin with 'yy'.
9008         * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9009         Trivial changes from Joel E. Denny.
9011         * bootstrap (gnulib_modules): Remove alloca.  Bison doesn't need
9012         it itself.
9013         * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9014         don't use alloca any more.
9016         * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9017         __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9018         defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9019         * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9020         to match yacc.c, to test more hosts.
9022 2005-09-20  Paul Eggert  <eggert@cs.ucla.edu>
9024         * data/yacc.c (YYSIZE_T): Reindent to make it clearer.  This
9025         doesn't affect behavior.
9026         (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9027         Solaris, AIX, MSC.
9028         (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H.  All uses changed.
9029         This works a bit better with glibc, if user code has already included
9030         stdlib.h.
9031         * doc/bison.texinfo (Bison Parser): Document that users can't
9032         arbitrarily use malloc and free for other purposes.  Document
9033         that <alloca.h> and <malloc.h> might be included.
9034         (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9035         user must declare alloca.
9037         * HACKING (release): Forwarn the Translation Project about
9038         stable releses.
9040 2005-09-20  Akim Demaille  <akim@epita.fr>
9042         * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9044 2005-09-19  Paul Eggert  <eggert@cs.ucla.edu>
9046         * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9047         (YYSTACK_ALLOC_MAXIMUM): Use it.
9048         (yysyntax_error): New function.
9049         (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9050         multiple syntax errors are reported, and alloca is being used.
9051         Instead, reallocate buffers twice as big each time, so that
9052         we waste at most half the allocated memory.  Start with a small
9053         (128-byte) buffer that will suffice in most cases anyway.
9054         Use yysyntax_error to do most of the work.
9056         * doc/bison.texinfo (Error Reporting, Table of Symbols):
9057         yynerrs is the number of errors reported, not the number of
9058         errors encountered.
9060         * tests/glr-regression.at (Duplicated user destructor for lookahead):
9061         Mark it as expected to fail.
9062         Cast result of malloc; problem reported by twlevo@xs4all.nl.
9063         * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9064         Don't start user-code symbols with "yy", to avoid name space problems.
9066 2005-09-19  Akim Demaille  <akim@epita.fr>
9068         Remove the traits, failed experiment.
9069         It never proved useful, and anyway because of the current
9070         definition, it was not possible to have several specialization of
9071         this traits, making it useless.
9072         * data/lalr1.cc (yy:traits): Remove.
9073         Inline its definitions in the parser class.
9075 2005-09-19  Akim Demaille  <akim@epita.fr>
9077         * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9078         least Mac OSX with a /usr/local install of gettext.
9080 2005-09-19  Akim Demaille  <akim@epita.fr>
9082         * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9083         and yytoken for similarity with the other skeletons.
9085 2005-09-19  Akim Demaille  <akim@epita.fr>
9087         * NEWS, configure.ac: update version number to 2.1a.
9089 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9091         * NEWS: Version 2.1.
9093         * NEWS: Remove notice of yytname change, since it was never in an
9094         official release.
9095         * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9096         diagnostic.
9097         * src/output.c (prepare): Likewise.
9098         * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9099         (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9100         is not defined.  This is an awful hack, but it's enough for now.
9101         All callers changed.
9102         * tests/glr-regression-at (make_value): Args are const pointers now,
9103         to avoid GCC warning.
9104         (Duplicated user destructor for lookahead): New test.  Currently
9105         skipped.  It fails on my host but I'm not sure it'll always fail.
9107 2005-09-16  Akim Demaille  <akim@epita.fr>
9109         * src/symtab.h (struct symbol): Declare the printer and destructor
9110         as const, to avoid accidental calls to free.
9111         (symbol_destructor_set, symbol_printer_set): Adjust.
9112         * src/symtab.c: Adjust.
9114 2005-09-16  Akim Demaille  <akim@epita.fr>
9116         * data/c.m4 (b4_token_enums): New.
9117         (b4_token_defines): Rename as...
9118         (b4_token_enums_defines): this.
9119         (b4_token_defines): New, output only the #defines.
9120         * data/yacc.c, data/glr.c: Adjust.
9121         * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9122         * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9123         as default values.
9125 2005-09-16  Akim Demaille  <akim@epita.fr>
9127         * data/lalr1.cc (yylex_): Remove, inline its code.
9128         (yyreport_syntax_error_): Remove, replaced by...
9129         (yysyntax_error_): this which returns a string and leaves to the
9130         caller the call to the users' error function.
9131         (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9132         Move from members of the parser object...
9133         (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9134         to local variables of the parse function.
9136 2005-09-16  Akim Demaille  <akim@epita.fr>
9138         * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9139         since it's in Bison's name space.
9141 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9143         * data/glr.c (yyresolveValue): Add default case to pacify
9144         gcc -Wswitch-default.  Problem reported by twlevo@xs4all.nl.
9146         * NEWS: Document when yyparse started to return 2.
9147         * doc/bison.texinfo (Parser Function): Document when yyparse
9148         returns 2.
9150         * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9151         (b4_filename_type): Renamed back from b4_file_name_type.  All uses
9152         changed.
9153         (class position): file_name -> filename (reverting).  All uses changed.
9155 2005-09-14  Paul Eggert  <eggert@cs.ucla.edu>
9157         * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9158         do anything if $@ exists.  This reverts part of the 2005-07-07
9159         patch.
9161 2005-09-11  Paul Eggert  <eggert@cs.ucla.edu>
9163         * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9164         contains obsolete information and isn't worth distributing as a
9165         separate file anyway.
9166         * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9167         (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9168         All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9169         (yyparse): Abort if user code uses longjmp to throw an unexpected
9170         value.
9172 2005-09-09  Paul Eggert  <eggert@cs.ucla.edu>
9174         * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9175         Suggested by twlevo@xs4all.nl.
9177         * data/glr.c (YYCHK1): Do not assume YYE is in range.
9178         This avoids a diagnostic from gcc -Wswitch-enum.
9179         Problem reported by twlevo@xs4all.nl.
9181         * doc/bison.texinfo: Don't use "filename", as per GNU coding
9182         standards.  Use "file name" or "file" or "name", depending on
9183         the context.
9184         (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9185         not to hack/foo.tab.c.
9186         (Calc++ Top Level): 2nd arg of main is not const.
9187         * data/glr.c: b4_filename -> b4_file_name.
9188         * data/lalr1.cc: Likewise.  Also, b4_filename_type -> b4_file_name_type.
9189         All uses changed.
9190         (class position): filename -> file_name.  All uses changed.
9191         * data/yacc.c: b4_filename -> b4_file_name.
9192         * lib/bitset.h: filename -> file_name in local vars.
9193         * lib/bitset_stats.c: Likewise.
9194         * src/files.c: Likewise.
9195         * src/scan-skel.l ("@output ".*\n): Likewise.
9196         * src/files.c (file_name_split): Renamed from filename_split.
9197         * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9199 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9201         * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9202         to accommodate latest gnulib.
9204         * tests/glr-regression.at (Duplicate representation of merged trees):
9205         Add casts to pacify g++.  Problem reported by twlevo@xs4all.nl.
9207         * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9208         needed.
9210 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
9212         * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9213         All uses changed.  Invoke user destructor after an error during a
9214         split parse (trivial change from Joel E. Denny).
9216         * tests/glr-regression.at
9217         (User destructor after an error during a split parse):  New test case.
9218         Problem reported by Joel E. Denny in:
9219         http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9221 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9223         * README-cvs: Give URLs for recommended tools.
9224         Mention Gzip version problem, and bootstrapping issues.
9225         Remove troubleshooting section, as it's somewhat obsolete.
9227         * bootstrap (no_cache): New var, to accommodate different wget
9228         variants.  Use it instead of '-C off'.  Problem reported by
9229         twlevo@xs4all.nl.
9231         * data/glr.c (yydestroyStackItem): New function.
9232         (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9233         debugging information.  Problem reported by Joel E. Denny.
9235 2005-08-25  Akim Demaille  <akim@epita.fr>
9237         * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9239 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9241         * data/glr.c (yyrecoverSyntaxError, yyreturn):
9242         Don't invoke destructor on unresolved entries.
9243         * tests/glr-regression.at
9244         (User destructor for unresolved GLR semantic value): New test case.
9245         Problem reported by Joel E. Denny in:
9246         http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9248 2005-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9250         * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9251         Add strnlen.c.
9252         * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9253         lib-prefix.m4, po.m4.
9255         * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9256         in yydestruct diagnostic, since it might not be an error.
9257         Problem reported by Joel Denny near end of
9258         <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9259         * data/lalr1.cc (yyerturn): Likewise.
9260         * data/yacc.c (yyreturn): Likewise.
9261         * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9263         * src/files.c: Remove obsolete FIXME comment.
9265         * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9266         with the other templates, and to fix bogus run-on messages such
9267         as the one reported at the end of
9268         <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9269         All callers changed to avoid the newline.
9270         (yyprocessOneStack): Output two lines rather than one, to accommodate
9271         the above change.  This changes the debug output format slightly.
9273         * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9274         reported by Joel E. Denny in
9275         <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9276         (trivial change).
9277         * tests/glr-regression.at (Duplicate representation of merged trees):
9278         New test, from Joel E. Denny in:
9279         <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9280         * THANKS: Add Joel E. Denny.
9282         * configure.ac (AC_INIT): Bump to 2.0c.
9284 2005-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9286         * NEWS: Version 2.0b.
9288         * Makefile.am (SUBDIRS): Put examples before tests, so that
9289         "make check" doesn't finish with "All 1 tests passed".
9291         * tests/regression.at (Token definitions): Don't rely on
9292         AT_PARSER_CHECK for data that contains backslashes.  It currently
9293         uses 'echo', and 'echo' isn't portable if its argument contains
9294         backslashes.  Problem found on OpenBSD 3.4.  Also, do not assume
9295         that the byte '\0xff' is not printable in the C locale; it is,
9296         under OpenBSD 3.4 (!).  Luckily, '\0x80' through '\0x9e' are
9297         not printable, so use '\0x81' to test.
9299         * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9300         version of GCC, since the macro is used with non-GCC compilers.
9302         Fix core dump reported by Pablo De Napoli in
9303         <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9304         * tests/regression.at (Invalid inputs with {}): New test.
9305         * src/parse-gram.y (token_name): Translate type before using
9306         it as an index.
9308         * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9309         the user's name space.  All uses changed to __attribute__
9310         ((__unused__)).
9311         (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9312         Add __attribute__ ((__noreturn__)).
9314         * etc/clcommit: Remove.  We weren't using it, and it failed
9315         "make maintainer-distcheck".
9316         * Makefile.maint: Merge from coreutils.
9317         (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9318         (syntax-check-rules): Change list of rules as described below.
9319         (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9320         (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9321         (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9322         (sc_trailing_space): New rules.
9323         (sc_xalloc_h_in_src): Remove.
9324         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9325         (sc_space_tab, sc_error_exit_success, sc_changelog):
9326         (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9327         (makefile-check, po-check, author_mark_check):
9328         (makefile_path_separator_check, copyright-check):
9329         Use grep -n, to make it easier to find violations.
9330         Use CVS_LIST and CVS_LIST_EXCEPT.
9331         (header_regexp, h_re): Remove.
9332         (dd_c): New macro.
9333         (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9334         (my-distcheck): Use more-modern GCC flags.
9335         (signatures, %.asc): Remove.
9336         (rel-files, announcement): Remove signatures.
9337         Restore old updating code, even though we don't use it, so
9338         that we're the same as coreutils.
9339         (alpha, beta, major): Depend on news-date-check.
9340         Make the upload commands.
9342         * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9343         * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9344         * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9345         * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9346         * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9347         * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9348         * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9349         * tests/sets.at: Likewise.
9351         * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9352         we comment out the Autoconf version number.
9353         * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9354         it's error-prone and "make maintainer-distcheck" rejects it.
9356         * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9357         Indent calls to "error" to pacify "make maintainer-distcheck",
9358         when the calls are not intended to be translated.
9359         * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9361         * src/Makefile.am (DEFS): Use +=, to pacify
9362         "make maintainer-distcheck".
9363         (bison_SOURCES): Add scan-skel.h.
9364         (sc_tight_scope): New rule, from coreutils.
9366         * src/files.c (src_extension, header_extension):
9367         Now static, not extern.
9368         * src/getargs.c (short_options): Likewise.
9369         * src/muscle_tab.c (muscle_table): Likewise.
9370         * src/parse-gram.y (current_class, current_type, current_prec):
9371         Likewise.
9372         * src/reader.c (grammar_end, previous_rule_end): Likewise.
9373         * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9374         * src/main.c (main): Cast bindtextdomain and textdomain calls to
9375         void, to avoid warning when NLS is disabled.
9376         * src/output.c: Include scan-skel.h.
9377         (scan_skel): Remove decl, since scan-skel.h does this.
9378         (output_skeleton):
9379         Indent calls to "error" to pacify "make maintainer-distcheck".
9380         * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9381         * src/reader.h (gram_end, gram_lineno): New decls to pacify
9382         "make maintainer-distcheck".
9383         * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9384         (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9385         (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9386         (skel_lex_destroy, scan_skel): Move these decls to...
9387         * src/scan-skel.h: New file.
9388         * src/uniqstr.c (uniqstr_assert):
9389         Indent calls to "error" to pacify "make maintainer-distcheck".
9391         * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9392         not @VAR@.
9394         * tests/torture.at: Revamp to avoid misuse of atoi that
9395         "make maintainer-distcheck" complained about.
9397         * examples/extexi (message): Don't print a message more than once,
9398         and omit line-number decoration that makes Emacs compile think
9399         that informative messages are worth worrying about.
9401 2005-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9403         * configure.ac: Update version number.
9405         * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9406         accidentally.
9407         * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9408         autogenerated by the maintainer.
9409         * examples/calc++/.cvsignore: Add *.yy.
9411         * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9412         * lib/bitset_stats.c (bitset_stats_init): Likewise.
9413         * lib/bitsetv.c (bitsetv_alloc): Likewise.
9415         * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9417         * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9418         from maintainer-distcheck about casting the argument of 'free'.
9420         * NEWS: Mention recent yytname changes.
9421         * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9423         * bootstrap: For translations that have not yet been upgraded to
9424         the new runtime-po domain, prime the pump by extracting the
9425         relevant strings from the obsolete translations.  This code can be
9426         removed once the bison-runtime domain has been translated by each
9427         team.
9429         * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9430         now that token names are already quoted.
9432         Fix problem reported by Anthony Heading.
9433         * data/glr.c (YYTOKEN_TABLE): New macro.
9434         (yytname): Define if YYTOKEN_TABLE.
9435         * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9436         * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9437         (YYERROR_VERBOSE): Define the same way the other skeletons do.
9438         * src/output.c (prepare_symbols): Output token_table_flag.
9440 2005-07-21  Paul Eggert  <eggert@cs.ucla.edu>
9442         * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9443         again if the first call fails.
9445         * data/glr.c (yytnamerr): New function.
9446         (yyreportSyntaxError): Use it to dequote most string literals.
9447         * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9448         with other skeletons.  All uses changed.
9449         (yytnameerr_): New function.
9450         (yyreport_syntax_error): Use it to dequote most string literals.
9451         * data/yacc.c (yytnamerr): New function.
9452         (yyerrlab): Use it to decode most string literals.
9453         * doc/bison.texinfo (Decl Summary, Calling Convention):
9454         Clarify quoting convention of yytname.
9455         * src/output.c (prepare_symbols): Quote all names.  This undoes
9456         the 2005-04-17 change, which is now accomplished (mostly) via
9457         changes in the parsers as described above.
9458         * tests/regression.at (Token definitions, Web2c Actions):
9459         Undo most 2005-04-17 change here, too.
9461 2005-07-20  Paul Eggert  <eggert@cs.ucla.edu>
9463         Fix more problems reported by twlevo@xs4all.nl.
9464         * tests/cxx-type.at: Don't pipe output of ./types through sed to
9465         remove trailing spaces.  This loses the exit status of ./types,
9466         and isn't needed since ./types shouldn't be emitting trailing
9467         spaces.
9468         * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9469         as the stack isn't valid in that case.
9471         * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9472         (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9473         (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9474         Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9475         is used.
9476         * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9477         (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9478         (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9479         Likewise.
9481         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9482         overly-picky compilers that reject 'char *foo = "bar";'.
9484         * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9485         to FILE * parameter, not to stderr.  This fixes a typo introduced
9486         in the 2005-07-12 change.
9488         * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9489         warnings from GCC 4.
9491         * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9492         (yyglrShiftDefer, yysplitStack):
9493         Remove unused parameters b4_pure_formals.  All uses changed.
9494         (yyglrShift): Remove unused parameters b4_user_formals.
9495         All uses changed.
9496         (yyglrReduce): Removed unused parameter yylocp.  All uses changed.
9498 2005-07-18  Paul Eggert  <eggert@cs.ucla.edu>
9500         Destructor cleanups and regularization among the three skeletons.
9501         * NEWS: Document the behavior changes.
9502         * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9503         stack before failing, as the cleanup code will do it for us now.
9504         * data/lalr1.cc (yyerrlab): Likewise.
9505         * data/glr.c (yyparse): Pop everything off the stack before
9506         freeing it, so that destructors get called properly.
9507         * data/lalr1.cc (yyreturn): Likewise.
9508         * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9509         This is more consistent.
9510         * doc/bison.texinfo (Destructor Decl): Mention more reasons
9511         why destructors might be called.  1.875 -> 2.1.
9512         (Destructor Decl, Decl Summary, Table of Symbols):
9513         Some English-language cleanups for %destructor.
9514         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9515         Add output line for destructor of start symbol.
9516         * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9517         because of that same extra output line.
9519         * NEWS: Document minor wording changes in diagnostics of
9520         Bison-generated parsers.
9521         * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9522         Remove unused formals.  All uses changed.
9523         (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9524         (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9525         * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9526         Rename yyoverflowab to yyexhaustedlab.
9527         When memory exhaustion occurs during syntax-error reporting,
9528         report it separately rather than in a single diagnostic; this
9529         eases translation.
9530         * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9531         (Memory Exhausted): Renamed from Parser Stack Overflow.
9532         Revamp wording slightly to prefer "memory exhaustion".
9533         * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9535         * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9537         Add i18n support to the GLR skeleton.  Partially fix the C++
9538         skeleton; a C++ expert needs to finish this.  Remove debugging
9539         msgids; there's little point to having them translated, since they
9540         can be understood only by someone who can read the
9541         (English-language) source code.
9543         Generate runtime-po/bison-runtime.pot automatically, so that we
9544         don't have to worry about garbage getting in that file.  We'll
9545         make sure after the next official release that old msgids don't
9546         get lost.  See
9547         <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9549         * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9550         Now auto-generated.
9551         * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9552         Fix typos in explanations of the runtime file.
9553         * bootstrap: Change gettext keyword from YYI18N to YY_.
9554         Use standard Makefile.in.in in runtime-po, since we'll arrange
9555         for backward-compatible bison-runtime.po files in a different way.
9556         * data/glr.c (YY_): New macro, from yacc.c.
9557         (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9558         Translate messages intended for users.
9559         (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9560         the wording in the other skeletons.  We don't know that the memory
9561         is virtual.
9562         * data/lalr1.cc (YY_): Renamed from _.  All uses changed.
9563         Use same method that yacc.c uses.
9564         Don't translate debugging messages.
9565         (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9566         it doesn't work (yet), and requires C++ expertise to fix.
9567         * data/yacc.c (YY_): Renamed from YY18N.  All uses changed.
9568         Move defn to a more logical place, to be consistent with other
9569         skeletons.
9570         Don't translate debugging messages.
9571         Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9572         * doc/bison.texinfo: Mention <libintl.h>.  Change glibc cross reference
9573         to gettext cross reference.  Add indexing terms.  Mention YYENABLE_NLS.
9574         * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9576         Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9577         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9578         void, not int.
9579         * tests/glr-regression.at (Badly Collapsed GLR States):
9580         Likewise.
9581         (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9582         yylex should return 0 at EOF rather than aborting.
9584         Improve tests for stack overflow in GLR parser.
9585         Problem reported by twlevo@xs4all.nl.
9586         * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9587         All uses removed.
9588         (yyStackOverflow): Just longjmp, but with value 2 so that caller
9589         can handle the problem.
9590         (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9591         (yyparse): New local variable yyresult to record the result.
9592         Use result of setjmp to set it, rather than storing itinto
9593         struct.
9594         (yyDone): Remove label.
9595         (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9596         to mimic yacc.c.  Do not discard lookahead if it's EOF (possible
9597         if YYABORT is used).
9598         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9599         yyparse status; put status > 1 into diagnostic.
9600         Check that status==2 works.
9601         * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9602         Use exit status 3 for failure to open (which shouldn't happen).
9604 2005-07-17  Paul Eggert  <eggert@cs.ucla.edu>
9606         * tests/conflicts.at (%nonassoc and eof):  Don't exit with status
9607         1 on syntax error; just let yyparse do its thing.
9608         * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9609         * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9610         (Exploding the Stack Size with Alloca):
9611         (Exploding the Stack Size with Malloc):
9612         Expect exit status 2, not 1, since the parser is supposed to blow
9613         its stack.  Problem reported by twlevo@xs4all.nl.
9615         * data/glr.c (yyparse): Don't assume that the initial calls
9616         to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9617         Print a stack-overflow message and fail instead.
9618         Initialize the line-number information before creating the stack,
9619         so that the stack-overflow message can report line zero safely.
9621 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
9623         Fix problems reported by twlevo@xs4all.nl.
9624         * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9625         (yyuserMerge): Provide a default case if b4_mergers is empty.
9626         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9627         * tests/glr-regression.at
9628         (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9629         Add casts to pacify C++ compilers.
9630         * tests/glr-regression.at (Improper merging of GLR delayed action
9631         sets): Declare yylex before using it.
9632         * tests/Makefile.am (maintainer-check-g++): Fix a stray
9633         $(GXX) that escaped the renaming of GXX to CXX.  Remove bogus
9634         test for valgrind; valgrind is independent of g++.
9635         (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9636         for compatibility with POSIX 1003.1-2001 (if running coreutils).
9637         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9638         Use a destructor, so that we can expand the stack.  Change
9639         YYSTYPE to char * so that we can free it.  Cast result of malloc.
9641 2005-07-13  Paul Hilfinger  <hilfingr@CS.Berkeley.EDU>
9643         * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9644         a valgrind failure.  Problem reported by twlevo@xs4all.nl.
9646 2005-07-13  Paul Eggert  <eggert@cs.ucla.edu>
9648         * PACKAGING: New file, suggested by Bruno Haible and taken from
9649         similar wording in gettext's PACKAGING file.
9650         * NEWS: Mention PACKAGING.
9651         * Makefile.am (EXTRA_DIST): Add PACKAGING.
9653 2005-07-12  Paul Eggert  <eggert@cs.ucla.edu>
9655         * NEWS: Document recent i18n improvements.
9656         * bootstrap: Get runtime translations into runtime-po.
9657         Create runtime-po files automatically, if possible.
9658         * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9659         * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9660         does not infringe on the user's name space.
9661         (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9662         * doc/bison.texinfo (Internationalization): Revamp the English
9663         and Texinfo syntax a bit, to try to make it clearer.
9664         (Bison Options, Option Cross Key): Mention --print-localedir.
9665         * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9666         YYENABLE_NLS.  Quote a bit more.
9667         * runtime-po/.cvsignore: New file.
9668         * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9669         * runtime-po/Rules-quot: Remove; now created by bootstrap.
9670         * runtime-po/quot.sed: Likewise.
9671         * runtime-po/boldquot.sed: Likewise.
9672         * runtime-po/en@quot.header: Likewise.
9673         * runtime-po/en@boldquot.header: Likewise.
9674         * runtime-po/insert-header.sin: Likewise.
9675         * runtime-po/remove-potcdate.sin: Likewise.
9676         * runtime-po/Makevars: Likewise.
9677         * runtime-po/LINGUAS: Likewise.
9678         * runtime-po/de.po: Likewise; we will rely on the translation project
9679         to maintain this, so "bootstrap" should get it.
9680         * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9681         its value.
9682         * src/main.c (main): Bind the bison-runtime domain, too.
9684 2005-07-12  Bruno Haible  <bruno@clisp.org>
9686         * data/yacc.c: Include <libintl.h> when NLS is enabled.
9687         (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9688         * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9689         * runtime-po: New directory.
9690         * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9691         $(DOMAIN).pot-update rule, so that old messages are never dropped.
9692         * runtime-po/Rules-quot: New file, copied from po/.
9693         * runtime-po/quot.sed: Likewise.
9694         * runtime-po/boldquot.sed: Likewise.
9695         * runtime-po/en@quot.header: Likewise.
9696         * runtime-po/en@boldquot.header: Likewise.
9697         * runtime-po/insert-header.sin: Likewise.
9698         * runtime-po/remove-potcdate.sin: Likewise.
9699         * runtime-po/Makevars: New file.
9700         * runtime-po/POTFILES.in: New file.
9701         * runtime-po/LINGUAS: New file.
9702         * runtime-po/bison-runtime.pot: New file.
9703         * runtime-po/de.po: New file.
9704         * m4/bison.m4: New file.
9705         * Makefile.am (SUBDIRS): Add runtime-po.
9706         (aclocaldir, aclocal_DATA): New variables.
9707         * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9708         Define aclocaldir.
9709         * src/getargs.c (usage): Document --print-localedir option.
9710         (PRINT_LOCALEDIR_OPTION): New enum item.
9711         (long_options): Add --print-localedir option.
9712         (getargs): Handle --print-localedir option.
9713         * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9714         (Internationalization): New section.
9716 2005-07-12  Akim Demaille  <akim@epita.fr>
9718         * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9719         for consistency with the rest of the code.
9720         * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9721         Add separators.
9723 2005-07-12  Akim Demaille  <akim@epita.fr>
9725         * src/parse-gram.y: Use %printer instead of YYPRINT.
9727 2005-07-12  Akim Demaille  <akim@epita.fr>
9729         * src/symtab.h, src/symtab.c (symbol_print): New.
9730         * src/symlist.h, src/symlist.c (symbol_list_print): New.
9731         * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9733 2005-07-12  Akim Demaille  <akim@epita.fr>
9735         * data/glr.c (b4_syncline): Fix (swap) the definitions of
9736         b4_at_dollar and b4_dollar_dollar.
9738 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
9740         * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9741         and Pennello's paper.
9743 2005-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9745         * data/yacc.c (yyparse): Undo previous patch.  Instead,
9746         set yylsp[0] and yyvsp[0] only if the initial action
9747         sets yylloc and yylval, respectively.
9749         * data/yacc.c (yyparse): In the initial action, set
9750         yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9751         This avoids the use of undefined variables if the initial
9752         action does not set yylloc and/or yylval.
9754 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9756         * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9757         * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9758         Remove from CVS.  These files are automatically generated.
9759         * examples/extexi: Clarify that this file is now part of Bison,
9760         not GNU M4, and that it works with any POSIX-compatible Awk.
9761         * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9762         ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9763         so that we also get calc++-parser.yy.  Geneate it.
9764         Use $(AWK), not gawk, since any conforming Awk will do.
9765         Put comment before action, since older 'make' can't handle comment
9766         in action.
9767         $(BUILT_SOURCES): List all built sources, not just some of them.
9768         $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9769         $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9770         $($(calc_sources_generated)): Remove unnecessary test for existence
9771         of target.  (This had a shell syntax error anyway; a stray "x".)
9772         (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9773         calc++-parser.yy.
9774         * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9776         * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9777         implied by the other modules.
9779 2005-07-06  Akim Demaille  <akim@epita.fr>
9781         Bind examples/calc++ to the package.
9782         * examples/calc++/Makefile: Remove, replaced by...
9783         * examples/calc++/Makefile.am: ... this new file.
9784         * examples/calc++/test: Remove input.
9785         * examples/calc++/compile: Remove.
9786         * examples/Makefile.am: New.
9787         * configure.ac, Makefile.am: Adjust.
9788         * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9790 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9792         * data/glr.c (yyFail): Drastically simplify; since the format argument
9793         never had any % directives, we can simply pass it to yyerror.
9794         (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9795         be modified later, as that is the usual style in glr.c.
9796         Problems reported by Paul Hilfinger.
9798         Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9799         and size overflow errors.
9800         * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9801         in case the user prolog sets feature-test macros like _GNU_SOURCE.
9802         (YYSIZEMAX): New macro.
9803         (yystpcpy): New function, taken from yacc.c.
9804         (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9805         (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9806         so that we don't have to maintain their signatures.
9807         (yyFail): Check for buffer overflow, by using vsnprintf rather
9808         than vsprintf.  Allocate a bigger buffer if possible.
9809         Report an error if buffer allocation fails.
9810         (yyStackOverflow): New function.
9811         (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9812         the initialization was successful.  It might fail if storage was
9813         exhausted.
9814         (yyexpandGLRStack): Add more checks for storage allocation failure.
9815         Use yyStackOverflow to report failures.
9816         (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9817         (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9818         Don't assume stack number fits in int.
9819         (yysplitStack): Check for storage allocation failure.
9820         (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9821         can print diagnostics on storage allocation failure.  All callers
9822         changed.
9823         (yyresolveValue): Use yybool for boolean.
9824         (yyreportSyntaxError): Check for size-calculation overflow.
9825         This code is taken from yacc.c.
9826         (yyparse): Check for storage allocation errors when allocating
9827         the initial stack.
9829 2005-07-05  Akim Demaille  <akim@epita.fr>
9831         Extract calc++ from the documentation.
9832         * doc/bison.texinfo (Calc++): Add the extraction marks.
9833         * examples/extexi: New, from the aborted GNU Programming 2E.
9834         Separate the different paragraph of a file with empty lines.
9835         * examples/Makefile: Use it to extract the whole calc++ example.
9837 2005-06-24  Akim Demaille  <akim@epita.fr>
9839         * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9840         class typedefs.
9842 2005-06-22  Akim Demaille  <akim@epita.fr>
9844         * doc/bison.texinfo (C++ Language Interface): First stab.
9845         (C++ Parsers): Remove.
9847 2005-06-22  Akim Demaille  <akim@epita.fr>
9849         * data/lalr1.cc (yylex_): Honor %lex-param.
9851 2005-06-22  Akim Demaille  <akim@epita.fr>
9853         Start a set of simple examples.
9854         * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9855         * examples/calc++/calc++-driver.hh,
9856         * examples/calc++/calc++-parser.yy,
9857         * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9858         * examples/calc++/compile, examples/calc++/test: New.
9860 2005-06-09  Paul Eggert  <eggert@cs.ucla.edu>
9862         * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9863         extern "C" {}.  This fixes a problem reported by Paul Hilfinger,
9864         which stems from the 2005-05-27 patch.
9866 2005-06-06  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
9868         * data/glr.c: Modify treatment of unused parameters to permit use
9869         of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9871 2005-05-30  Paul Eggert  <eggert@cs.ucla.edu>
9873         Fix infringement on user name space reported by Janos Zoltan Szabo.
9874         * data/yacc.c (yyparse): strlen -> yystrlen.
9876 2005-05-30  Akim Demaille  <akim@epita.fr>
9878         * data/lalr1.cc (_): New.
9879         Translate the various messages.
9881 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
9883         Fix infringement on user name space reported by Bruno Haible.
9884         * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9885         Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9886         the user's name space.
9887         (alloca): Include <stdlib.h> to get it, if it's not built in.
9888         (YYMALLOC, YYFREE): Define only if needed.
9889         (malloc, free): Declare, but only if needed, as this infringes on
9890         the user name space.
9892 2005-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9894         Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9895         * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9896         with %d format.
9897         * lib/ebitset.c (min, max): Undef before defining.
9898         * lib/vbitset.c (min, max): Likewise.
9899         * lib/subpipe.c (create_subpipe): Save local variables in case
9900         vfork clobbers them.
9902 2005-05-24  Bruno Haible  <bruno@clisp.org>
9904         * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9905         error message syntax used by gcc-4.0.
9907 2005-05-23  Paul Eggert  <eggert@cs.ucla.edu>
9909         * README: Mention m4 1.4.3.  Remove obsolete advice about
9910         Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9912         * bootstrap: Remove workaround for problem I encountered with
9913         gettext 0.14.1; it seems to be fixed now.
9915 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
9917         * NEWS: Version 2.0a.
9919         * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9920         the previous change.
9922         Various maintainer cleanups.
9923         * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9924         conftest*, for benefit of CVS commands run at the same time as
9925         "configure".  Add build-aux, since "bootstrap" now creates it and
9926         its subfiles.
9927         * Makefile.cfg (move_if_change): Remove.
9928         * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9929         (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9930         (po_repo, do-po-update, po-update, wget_files, get-targets):
9931         (config.guess-url_prefix, config.sub-url_prefix):
9932         (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9933         (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9934         ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9935         Remove.
9936         * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9937         this is now the recommended name.
9938         * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9939         depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9940         ylwrap.  These files now go into build-aux.
9941         * config/move-if-change: Remove.
9942         * config/prev-version.txt: Bump from 1.75 to 2.0.
9944         * bootstrap: Add stdio-safer, unistd-safer modules.
9945         Remove m4/glibc2.m4 (introduced by latest gnulib, but
9946         we don't need it).
9947         * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9948         fopen-safer.c, stdio-safer.h, unistd-safer.h.
9949         * lib/subpipe.c: Include "unistd-safer.h".
9950         (create_subpipe): Make sure all the newly-created
9951         file descriptors are > 2, so that diagnostics don't
9952         get sent down them (which might cause Bison to hang, in theory).
9953         * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9954         * src/files.c (xfopen): Use fopen_safer, not fopen.
9956         * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9957         yesterday's yacc.c fix.
9959 2005-05-21  Paul Eggert  <eggert@cs.ucla.edu>
9961         * data/glr.c, data/lalr1.cc: Update copyright date.
9963         Fix a destructor bug reported by Wolfgang Spraul in
9964         <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9965         * data/yacc.c (yyabortlab): Don't call destructor, and
9966         don't set yychar to EMPTY.
9967         (yyoverflowlab): Don't call destructor.
9968         (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9969         * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9970         since we no longer output the message "discarding lookahead token
9971         end of input ()".
9973 2005-05-20  Paul Hilfinger  <hilfingr@CS.Berkeley.EDU>
9975         * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9976         fix a small glitch in debugging output.
9977         (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9978         after YY_SYMBOL_PRINT where needed.
9980         (struct yyGLRState): Add some comments.
9981         (struct yySemanticOption): Add some comments.
9982         (union yyGLRStackItem): Add comment.
9984         (yymergeOptionSets): Correct this to properly perform the union,
9985         avoiding infinite reported by Michael Rosien.
9986         Update comment.
9988         * tests/glr-regression.at: Add test for GLR merging error reported
9989         by M. Rosien.
9991 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
9993         * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9994         Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9995         README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9996         data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9997         data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9998         doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9999         lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10000         lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10001         lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10002         lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10003         lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10004         lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10005         lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10006         lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10007         m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10008         src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10009         src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10010         src/derives.h, src/files.c, src/files.h, src/getargs.c,
10011         src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10012         src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10013         src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10014         src/output.h, src/parse-gram.c, src/parse-gram.h,
10015         src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10016         src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10017         src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10018         src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10019         src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10020         src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10021         src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10022         tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10023         tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10024         tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10025         tests/reduce.at, tests/regression.at, tests/sets.at,
10026         tests/synclines.at, tests/testsuite.at, tests/torture.at:
10027         Update FSF postal mail address.
10029 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
10031         * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10032         Problem reported by Ralf Menzel.
10034 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10036         * tests/actions.at: Test that stack overflow invokes destructors.
10037         From Marcus Holland-Moritz.
10038         * data/yacc.c (yyerrlab): Move the code that destroys the stack
10039         from here....
10040         (yyreturn): to here.  That way, destructors are called properly
10041         even if the stack overflows, or the user calls YYACCEPT or
10042         YYABORT.  Stack-overflow problem reported by Marcus Holland-Moritz.
10043         (yyoverflowlab): Destroy the lookahead.
10045 2005-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10047         * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10049 2005-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10051         * NEWS: Bison-generated C parsers no longer quote literal strings
10052         associated with tokens.
10053         * src/output.c (prepare_symbols): Don't escape strings,
10054         since users don't want to see C escapes.
10055         * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10056         in diagnostics.
10057         * tests/input.at (Torturing the Scanner): Likewise.
10058         * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10060 2005-04-16  Paul Eggert  <eggert@cs.ucla.edu>
10062         * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10063         the data size is known to be too small and we can't increase it.
10064         This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10066 2005-04-15  Paul Eggert  <eggert@cs.ucla.edu>
10068         * src/parse-gram.y: Include quotearg.h.
10069         (string_as_id): Quote $1 before using it as a key, since the
10070         lexer no longer quotes it for us.
10071         (string_content): Don't strip quotes, since lexer no longer
10072         quotes it for us.
10073         * src/scan-gram.l: Include quotearg.h.
10074         ("\""): Omit quote.
10075         ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10076         a key, since the rest of the lexer doesn't quote it.
10077         * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10078         * tests/regression.at (Token definitions): Check for backslashes
10079         in token strings.
10081         * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10082         (YYSIZE_T): Define to unsigned long int when using an older compiler.
10083         (yyparse): Revamp code to generate long syntax error message, to
10084         make it easier to translate, and to avoid problems with arithmetic
10085         overflow.  Change "virtual memory" to "memory" in diagnostic, since
10086         we don't know whether the memory is virtual.
10088 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10090         * NEWS: Bison-generated C parsers now use the _ macro to
10091         translate strings.
10092         * data/yacc.c (_) [!defined _]: New macro.
10093         All English strings wrapped inside this macro.
10094         * doc/bison.texinfo (Bison Parser): Document _.
10095         * po/POTFILES.in: Include src/parse-gram.c, since it now
10096         includes translateable strings that parse-gram.y doesn't.
10098 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10100         * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10101         reverting the 2004-10-11 change to this function.
10102         (symbol_check_alias_consistency): Don't call symbol_type_set
10103         if the type name is already correct.
10104         * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10106 2005-03-25  Paul Eggert  <eggert@cs.ucla.edu>
10108         * tests/regression.at (Token definitions): Don't use a token named
10109         c, as that generates a "#define c ..." that runs afoul of buggy
10110         stdlib.h that uses the identifier c as a member of struct
10111         drand48_data.  Problem reported by Horst Wente.
10113 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
10115         * bootstrap: Change translation URL from
10116         http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10117         http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10118         redirection glitches.  Problem reported by twlevo@xs4all.nl.
10120 2005-03-20  Paul Eggert  <eggert@cs.ucla.edu>
10122         * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10123         after operands; POSIX says this isn't portable for the c99 command.
10125 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
10127         * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10128         immediately if a data overrun has occurred; this may help us track
10129         down what may be a spurious failure on MacOS.
10131 2005-03-17  Paul Eggert  <eggert@cs.ucla.edu>
10133         Respond to problems reported by twlevo@xs4all.nl.
10135         * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10137         * src/vcg.h: Comment fix.
10138         * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10139         (G_CMAX): Change to -1 instead of INT_MAX.
10141         * data/yacc.c (yyparse): Omit spaces before #line.
10143 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
10145         * src/tables.c (state_number_to_vector_number): Put it inside an
10146         "#if 0", since it's not currently used.  Problem reported by
10147         Roland McGrath.
10149 2005-03-06  Paul Eggert  <eggert@cs.ucla.edu>
10151         * src/output.c (escaped_output): Renamed from
10152         escaped_file_name_output, since we now use it for symbol tags as
10153         well.  All uses changed.
10154         (symbol_destructors_output, symbol_printers_output):
10155         Escape symbol tags too.
10156         Problem reported by Matyas Forstner in
10157         <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10159         * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10160         not needed.
10161         * src/output.c (user_actions_output, token_definitions_output,
10162         symbol_destructors_output, symbol_printers_output): Likewise.
10163         * src/reader.c (prologue_augment): Likewise.
10164         * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10166         * src/vcg.c (output_edge): Don't quote linestyle arg.
10167         Problem reported by twlevo@xs4all.nl.
10169 2005-02-28  Paul Eggert  <eggert@cs.ucla.edu>
10171         * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10172         example, reported by Derek M Jones.  Also, make the example even
10173         more outrageous, to better illustrate how bad the problem is.
10175 2005-02-24  Paul Eggert  <eggert@cs.ucla.edu>
10177         * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10178         putsym.  Typo reported by Sebastian Piping.
10180 2005-02-23  Paul Eggert  <eggert@cs.ucla.edu>
10182         * doc/bison.texinfo (Language and Grammar): some -> same
10183         (Epilogue): int he -> in the
10184         Typos reported by Sebastian Piping via Justin Pence.
10186 2005-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10188         * tests/glr-regression.at (Improper handling of embedded actions
10189         and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10190         embedded actions and $-N in GLR parsers", work around an Autoconf bug
10191         with dollar signs in test names.
10192         * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10193         for a similar reason.
10195 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
10197         * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10198         wants to redefine G_VIEW.
10200 2005-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10202         * src/vcg.c (get_view_str): Remove case for normal_view.
10203         Problem reported by twlevo@xs4all.nl.
10205 2005-01-24  Paul Eggert  <eggert@cs.ucla.edu>
10207         * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10208         Problem reported by twlevo@xs4all.nl.
10210         * doc/bison.texinfo: Change @dircategory from "GNU programming
10211         tools" to "Software development".  Requested by Richard Stallman
10212         via Karl Berry.
10214 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10216         * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10217         Problem reported by twlevo@xs4all.nl.
10219 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
10221         * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10222         keyword; it's not needed with modern compilers, and it doesn't
10223         affect correctness with older compilers.  Suggested by
10224         twlevo@xs4all.nl.
10226 2005-01-17  Paul Eggert  <eggert@cs.ucla.edu>
10228         * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10229         gcc -Wswitch-default.
10230         * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10231         * data/yacc.c (yyparse): Likewise.
10233 2005-01-12  Paul Eggert  <eggert@cs.ucla.edu>
10235         * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10236         already.  Let config.h define any nonstandard values.
10238 2005-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10240         * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10241         for the benefit of slower hosts.  Problem reported by
10242         Nelson H. F. Beebe.
10244 2005-01-07  Paul Eggert  <eggert@cs.ucla.edu>
10246         * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10247         being defined and not used.
10248         * data/lalr1.cc (yyparse): Likewise.
10249         Use "if (false)" rather than "if (0)".
10251 2005-01-05  Paul Eggert  <eggert@cs.ucla.edu>
10253         * TODO: Mention that we should allow NUL bytes in tokens.
10255 2005-01-02  Paul Eggert  <eggert@cs.ucla.edu>
10257         * src/scan-skel.l (<<EOF>>): Don't close standard output.
10258         Problem reported by Hans Aberg.
10260 2005-01-01  Paul Eggert  <eggert@cs.ucla.edu>
10262         * src/getargs.c (version): Happy new year; update overall
10263         program copyright date from 2004 to 2005.
10265         * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10266         Problem reported by Hans Aberg.
10267         * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10268         (Output file names.): Add a test for the case when standard output
10269         is closed.
10271 2004-12-26  Paul Eggert  <eggert@cs.ucla.edu>
10273         * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10274         to fix an oversight in the Bison 2.0 manual.
10276 2004-12-25  Paul Eggert  <eggert@cs.ucla.edu>
10278         * NEWS: Version 2.0.  Reformat the existing news items since
10279         1.875, so that related items are grouped together.
10280         * configure.ac (AC_INIT): Bump version to 2.0.
10281         * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10283         * tests/torture.at (Exploding the Stack Size with Alloca): Set
10284         YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10285         otherwise, we're not testing alloca.  Unfortunately there's no
10286         simple way to consult HAVE_ALLOCA here.
10288         * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10289         for yymsg, too.
10291         * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10292         hand.  This avoids a warning about comparing int to size_t when
10293         GCC warnings are enabled.
10295 2004-12-22  Paul Eggert  <eggert@cs.ucla.edu>
10297         * NEWS: Bison-generated parsers no longer default to using the
10298         alloca function (when available) to extend the parser stack, due
10299         to widespread problems in unchecked stack-overflow detection.
10300         * data/glr.c (YYMAXDEPTH): Remove undef when zero.  It's the user's
10301         responsibility to set it to a positive value.  This lets the user
10302         specify a value that is not a preprocessor constant.
10303         * data/yacc.c (YYMAXDEPTH): Likewise.
10304         (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10305         * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10306         to be a compile-time constant.  However, explain the constraints on it.
10307         Also, explain the constraints on YYINITDEPTH.
10308         (Table of Symbols): Explain that alloca is no longer the default.
10309         Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10310         to 1.
10312         * doc/bison.texinfo (Location Default Action): Mention that n must
10313         be zero when k is zero.  Suggested by Frank Heckenbach.
10315 2004-12-22  Akim Demaille  <akim@epita.fr>
10317         * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10318         (parser::state_type, parser::semantic_type, parser::location_type):
10319         Private, not public.
10320         (parser::parse): Return ints, not bool.
10321         Returning a bool introduces a problem: 0 corresponds to false, and
10322         it seems weird to return false on success.  Returning true changes
10323         the conventions for yyparse.
10324         Alternatively we could return void and send an exception.
10325         There is no clear consensus (yet?).
10326         (state_stack, semantic_stack, location_stack): Rename as...
10327         (state_stack_type, semantic_stack_type, location_stack_type): these.
10328         Private, not public.
10329         * tests/c++.at: New.
10330         * tests/testsuite.at, tests/Makefile.am: Adjust.
10332 2004-12-21  Akim Demaille  <akim@epita.fr>
10334         * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10336 2004-12-21  Akim Demaille  <akim@epita.fr>
10338         Don't impose std::string for filenames.
10340         * data/lalr1.cc (b4_filename_type): New.
10341         (position::filename): Use it.
10342         (parser.hh): Move the inclusion of stack.hh and location.hh below
10343         the user code, so that needed headers for the filename type can be
10344         included first.
10345         Forward declare them before the user code.
10346         * tests/Makefile.am (check-local, installcheck-local): Pass
10347         TESTSUITEFLAGS to the TESTSUITE.
10349 2004-12-20  Akim Demaille  <akim@epita.fr>
10351         Use more STL like names: my_class instead of MyClass.
10353         * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10354         (SemanticStack, SemanticType, StateStack, StateType)
10355         (TokenNumberType, Stack, Slice, Traits, Parser::location)
10356         (Parser::value): Rename as...
10357         (location_stack, location_type, rhs_number_type, semantic_stack)
10358         (semantic_type, state_stack, state_type, token_number_type, stack)
10359         (slice, traits, parser::yylloc, parser::yylval): these.
10361         * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10363 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
10365         * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10366         * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10368 2004-12-17  Paul Eggert  <eggert@cs.ucla.edu>
10370         Remove uses of 'short int' and 'unsigned short int'.  This raises
10371         some arbitrary limits.  It uses more memory but nowadays that's
10372         not much of an issue.
10374         This change does not affect the generated parsers; that's a different
10375         task, as some users will want to conserve memory there.
10377         Ideally we should use size_t to represent all object counts, and
10378         something like ptrdiff_t to represent signed differences of object
10379         counts; but that will require more code-cleanup than I have the
10380         time to do right now.
10382         * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10383         Use size_t, not int or short int, to count objects.
10384         * src/closure.c (nritemset, closure): Likewise.
10385         * src/closure.h (nritemset, closure): Likewise.
10386         * src/nullable.c (nullable_compute): Likewise.
10387         * src/print.c (print_core): Likewise.
10388         * src/print_graph.c (print_core): Likewise.
10389         * src/state.c (state_compare, state_hash): Likewise.
10390         * src/state.h (struct state): Likewise.
10391         * src/tables.c (default_goto, goto_actions): Likewise.
10393         * src/gram.h (rule_number, rule): Use int, not short int.
10394         * src/output.c (prepare_rules): Likewise.
10395         * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10396         errs, reductions): Likewise.
10397         * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10398         Likewise.
10399         * src/tables.c (vector_number, tally, action_number,
10400         ACTION_NUMBER_MINIMUM): Likewise.
10401         * src/output.c (muscle_insert_short_int_table): Remove.
10403 2004-12-17  Akim Demaille  <akim@epita.fr>
10405         * data/lalr1.cc: Extensive Doxygenation.
10406         (error_): Rename as...
10407         (error): this, since it is visible to the user.
10408         Adjust callers.
10409         (Parser::message): Now an automatic variable from...
10410         (Parser::yyreport_syntax_error_): here.
10411         * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10412         Parser::error.
10413         * tests/input.at: Escape $.
10415 2004-12-16  Paul Eggert  <eggert@cs.ucla.edu>
10417         * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10418         Parenthesize rhs to avoid obscure problems with mistakes like
10419         "foo$$bar = foo$1bar;".  Problem reported by twlevo at xs4all.
10420         * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10421         b4_rhs_location): Likewise.
10422         * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10423         b4_rhs_location): Likewise.
10425 2004-12-16  Akim Demaille  <akim@epita.fr>
10427         * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10428         yacc.c: be sure to stay within yycheck_.
10429         * tests/actions.at: Re-enable C++ tests.
10431 2004-12-16  Akim Demaille  <akim@epita.fr>
10433         * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10434         real.
10436 2004-12-16  Akim Demaille  <akim@epita.fr>
10438         Use #define to handle the %name-prefix.
10440         * data/glr.c, data/yacc.c: Comment changes.
10441         * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10442         so that one can refer to yylex in the parser file, and have it
10443         renamed, as is the case with other skeletons.
10445 2004-12-16  Akim Demaille  <akim@epita.fr>
10447         Move lalr1.cc internals into yy*.
10449         * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10450         (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10451         (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10452         (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10453         (empty_, final_, terror_, errcode_, ntokens_)
10454         (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10455         (looka_, ilooka_, error_range_, nerrs_):
10456         Rename as...
10457         (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10458         (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10459         (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10460         (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10461         (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10462         (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10463         (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10464         (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10465         these.
10467 2004-12-15  Paul Eggert  <eggert@cs.ucla.edu>
10469         Fix some problems reported by twlevo at xs4all.
10470         * src/symtab.c (symbol_new): Report an error if the input grammar
10471         contains too many symbols.  This is better than calling abort() later.
10472         * src/vcg.h (enum layoutalgorithm): Remove.  All uses removed.
10473         (struct node, struct graph):
10474         Rename member expand to stretch.  All uses changed.
10475         (struct graph): Remove member layoutalgorithm.  All uses removed.
10476         * src/vcg.c (get_layoutalgorithm_str): Remove.  All uses removed.
10477         * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10478         All uses changed.
10479         (N_STRETCH): Rename from N_EXPAND.  All uses changed.
10481 2004-12-15  Akim Demaille  <akim@epita.fr>
10483         * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10484         Add more Doxygen comments.
10485         (symprint_, stack_print_, reduce_print_, destruct_, pop)
10486         (report_syntax_error_, translate_): Rename as...
10487         (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10488         (yypop_, yyreport_syntax_error_, yytranslate_): this.
10490 2004-12-15  Akim Demaille  <akim@epita.fr>
10492         * data/lalr1.cc (lex_): Rename as...
10493         (yylex_): this.
10494         Move the trace here.
10495         Take the %name-prefix into account.
10496         Reported by Alexandre Duret-Lutz.
10498 2004-12-15  Akim Demaille  <akim@epita.fr>
10500         Simplify the C++ parser constructor.
10502         * data/lalr1.cc (debug_): Rename as...
10503         (yydebug_): so that the parser's internals are always in the yy*
10504         pseudo namespace.
10505         Adjust uses.
10506         (b4_parse_param_decl): Remove the leading comma as it is now only
10507         called as unique argument list.
10508         (Parser::Parser): Remove the constructor accepting a location and
10509         an initial debugging level.
10510         Remove from the other ctor the argument for the debugging level.
10511         (debug_level_type, debug_level, set_debug_level): New.
10513         * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10514         constructor calls.
10516 2004-12-15  Akim Demaille  <akim@epita.fr>
10518         Remove b4_root related material: failure experiment
10519         (which goal was to allow to derive from a class).
10521         * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10522         definitions and uses.
10524 2004-12-14  Paul Eggert  <eggert@cs.ucla.edu>
10526         * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10527         not 2, since it's not portable to subtract 1 from the start of an
10528         array.  The new item 0 is never set or used.  All uses changed.
10530         (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10531         the default definition of YYLLOC_DEFAULT.  Problem reported
10532         by Frank Heckenbach.
10534 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
10536         * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10537         the normal case and one for the error case.  Just use the
10538         first one uniformly.  Problem reported by Frank Heckenbach.
10539         (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10540         use exactly the same macro in both places.
10541         (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10542         so that the normal-case YYRHSLOC works for the error case too.
10543         All uses changed.
10544         * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10545         (YYLLOC_DEFAULT): Use the same macro as glr.c.
10546         * doc/bison.texinfo (Location Default Action): Don't claim that
10547         we have an array of locations.  Use the same macro for both glr
10548         and lalr parsers.  Mention YYRHSLOC.  Mention what happens when
10549         the index is 0.
10551 2004-12-10  Paul Eggert  <eggert@cs.ucla.edu>
10553         * HACKING: Update email addresses to send announcements to.
10555         * configure.ac (AC_INIT): Bump version to 1.875f.
10557 2004-12-10  Paul Eggert  <eggert@cs.ucla.edu>
10559         * NEWS: Version 1.875e.
10560         * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10562         * src/scan-skel.l: Include "complain.h", for "fatal".
10564         * src/relation.h (relation_print, relation_digraph):
10565         Relation sizes are of type relation_node, not size_t (this is
10566         merely a doc fix, since the two types are equivalent).
10567         (relation_transpose): Relation sizes are of type relation_node,
10568         not int.
10569         * src/relation.c: Likewise.
10570         (top, infinity): Now of type relation_node, not int.
10571         (traverse, relation_transpose): Use relation_node, not int.
10573         * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10574         with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10575         (yyparse): Remove unused local introduced in 2004-10-25 patch.
10577         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10578         specifying whether the test should be skipped.  Use it tp
10579         specify that the [%defines %skeleton "lalr1.cc"] tests currently
10580         fail on some hosts, and should be skipped.
10582 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
10584         * src/system.h (CALLOC, MALLOC, REALLOC): Remove.  All callers
10585         changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10586         unless otherwise specified below.
10588         * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10589         to allocate kernel_base, kernel_items, kernel_size, since
10590         they needn't be initialized to 0.
10591         (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10592         * src/closure.c (new_closure): Likewise, for itemset.
10593         * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10594         * src/lalr.c (set_goto_map): Likewise, for temp_map.
10595         (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10596         (build_relations): Likewise for edge, states1, includes.
10597         * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10598         * src/reader.c (packgram): Likewise, for ritem, rules.
10599         * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10600         * src/relation.c (relation_digraph): Likewise for VERTICES.
10601         (relation_transpose): Likewise for new_R, end_R.
10602         * src/symtab.c (symbols_token_translations_init): Likewise for
10603         token_translations.
10604         * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10605         (token_actions): Likewise for yydefact, actrow, conflrow,
10606         conflict_list.
10607         (save_column): Likewise for froms[symno], tos[symno].
10608         (goto_actions): Likewise for state_count.
10609         (pack_table): Likewise for base, pos, check.
10610         (tables_generate): Likewise for width.
10612         * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10613         for initial core.  Just have a separate core, so we needn't worry
10614         about whether kernel_size and kernel_base are initialized.
10616         * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10617         kernel_size, kernel_items): Remove unnecessary initialization.
10618         * src/conflicts.c (conflicts): Likewise.
10619         * src/derives.c (derives): Likewise.
10620         * src/muscle_tablc (muscle_insert): Likewise.
10621         * src/relation.c (relation_digraph): Likewise.
10622         * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10623         conflrow, conflict_table, conflict_list, table, check):
10624         Likewise.
10626         * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10627         This is because all callers pass unsigned int.
10628         * src/closure.h (new_closure): Likewise.
10630         * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10631         (build_relations): Initialize includes[i] in all cases.
10632         * src/reader.c (packgram): Always initialize rules[ruleno].prec
10633         and rules[ruleno].precsym.  Initialize members in order.
10634         * src/relation.c (relation_transpose): Always initialize new_R[i]
10635         and end_R[i].
10636         * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10638         * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10639         conflict_list[0] was always 0, but now it isn't initialized.
10641         * src/table.c (table_grow): When conflict_table grew, the grown
10642         area wasn't cleared.  Fix this.
10644         * lib/.cvsignore: Add strdup.c, strdup.h.
10645         * m4/.cvsignore: Add strdup.m4.
10647 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10649         * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10650         * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10651         GOTO_NUMBER_MAXIMUM, since we occasionally compute
10652         ngotos + 1 without checking for overflow.
10653         (build_relations): Use END_NODE, not -1, to denote end of edges.
10654         * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10655         build_relations): Use goto_number, not int, for goto numbers.
10656         * src/tables.c (save_column, default_goto): Likewise.
10658 2004-11-23  Akim Demaille  <akim@epita.fr>
10660         * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10661         of #defining from yystype.
10662         Don't typedef yystype, C++ does not need it.
10663         This lets it possible to forward declare it as union.
10665 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
10667         * bootstrap (gnulib_modules): Add extensions.
10668         Problem reported by Jim Meyering.
10670 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
10672         * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10673         src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10674         src/system.h, src/tables.c: XFREE -> free, to accommodate
10675         recent change to gnulib xalloc.h.
10676         Problem reported by Jim Meyering.
10678 2004-11-17  Akim Demaille  <akim@epita.fr>
10680         * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10682 2004-11-17  Akim Demaille  <akim@epita.fr>,
10683             Alexandre Duret-Lutz <adl@gnu.org>
10685         * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10686         changes.
10687         (YYCDEBUG): Adjust.
10688         Use it instead of cdebug_.
10689         (Parser::debug_stream, Parser::set_debug_stream): New.
10690         (Parser::symprint_): Define cdebug_ for temporary backward
10691         compatibility.
10692         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10693         debug_stream ().
10695 2004-11-17  Akim Demaille  <akim@epita.fr>
10697         * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10698         * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10699         * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10700         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10702 2004-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10704         * data/glr.c (yyloc_default): Remove; not used.
10705         Problem reported by Frank Heckenbach.
10707 2004-10-25  Akim Demaille  <akim@epita.fr>
10709         * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10710         Introduce another definition to address simple location arrays.
10711         (yyGLRStack): New member: yyerror_range.
10712         (yyrecoverSyntaxError, yyparse): Update it.
10713         (yyrecoverSyntaxError): Use it when shifting the error token to
10714         have an accurate range, equivalent to the one computed by both
10715         yacc.c and lalr1.cc.
10716         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10717         that column numbers start at column 0, as per GNU Coding
10718         Standards, the others tests, and the doc.
10719         (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10720         Adjust to the above change (first column is 0).
10721         And adjust the location of the "<error>", now covering the whole
10722         line.
10724 2004-10-22  Akim Demaille  <akim@epita.fr>
10725         and Paul Eggert  <eggert@cs.ucla.edu>
10727         Remove some arbitrary limits on goto numbers and relations.
10728         * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10729         initial values, since they're never used.
10730         (set_goto_map): ngotos is now unsigned, so test for overflow
10731         by seeing whether it wraps around to zero.
10732         * src/lalr.h (goto_number): Now size_t, not short int.
10733         (GOTO_NUMBER_MAXIMUM): Remove.
10734         * src/relation.c (relation_print, traverse, relation_transpose):
10735         Check for END_NODE rather than looking at sign.
10736         * src/relation.h (END_NODE): New macro.
10737         (relation_node): Now size_t, not short int.
10739 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
10741         * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10742         keyword, not an identifier.  Problem reported by Baron Schwartz in
10743         <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10745 2004-10-11  Akim Demaille  <akim@epita.fr>
10747         * src/symtab.c (symbol_check_alias_consistency): Also check
10748         type names, destructors, and printers.
10749         Reported by Alexandre Duret-Lutz.
10750         Recode the handling of associativity and precedence in terms
10751         of symbol_precedence_set.
10752         Accept no redeclaration at all, not even equal to the previous
10753         value.
10754         (redeclaration): New.
10755         Use it to factor redeclaration complaints.
10756         (symbol_make_alias): Don't set the type of the alias, let
10757         symbol_check_alias_consistency do it as for other features.
10758         * src/symtab.h (symbol): Add new member prec_location, and
10759         type_location.
10760         * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10761         * tests/input.at (Incompatible Aliases): New.
10763 2004-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10765         .cvsignore fixes to accommodate gnulib changes,
10766         and the practice of naming build directories "_build".
10767         * .cvsignore: Add "_*".  Sort.
10768         * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10769         * m4/.cvsignore: Add "*_gl.m4".
10771 2004-10-06  Akim Demaille  <akim@epita.fr>
10773         * src/parse-gram.y (add_param): Fix the truncation of trailing
10774         spaces.
10776 2004-10-05  Akim Demaille  <akim@epita.fr>
10778         In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10779         whether the reducion was empty or not.  This leaves room to
10780         improve the use of YYLLOC_DEFAULT in such a case.
10781         lalr1.cc is still experimental, so changing this is acceptable.
10782         And finally, there are probably not many users who changed the
10783         handling of locations in GLR, so changing is admissible too.
10785         * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10786         empty reduction, set @$ to an empty location ending the previously
10787         stacked symbol.
10788         Adjust uses to make sure the code is triggered on empty
10789         reductions.
10790         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10791         expected output: empty reductions have empty locations.
10793 2004-09-29  Akim Demaille  <akim@epita.fr>
10795         * data/lalr1.cc: Move towards a more standard C++ coding style
10796         for templates: Class < T > -> Class<T>.
10798 2004-09-29  Akim Demaille  <akim@epita.fr>
10800         * data/lalr1.cc: Reinstall the former ctor, for sake of
10801         compatibility, but warn it will be removed.
10802         Move towards a more standard C++ coding style (i.e., type *var ->
10803         type* var).
10805 2004-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10807         * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10808         since it's less likely to work if NULs are involved in the future.
10810 2004-09-27  Akim Demaille  <akim@epita.fr>
10812         * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10814 2004-09-27  Akim Demaille  <akim@epita.fr>
10816         * data/lalr1.cc (b4_parse_param_decl_1): New.
10817         (b4_parse_param_decl): Use it to have different names between attribute
10818         and argument names.
10819         (b4_cc_constructor_call): Likewise.
10821 2004-09-24  Akim Demaille  <akim@epita.fr>
10823         * src/parse-gram.y (add_param): Strip the leading and trailing
10824         blanks from a formal argument declaration.
10825         (YY_LOCATION_PRINT): New.
10827 2004-09-24  Akim Demaille  <akim@epita.fr>
10829         * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10830         after the location.
10832 2004-09-24  Akim Demaille  <akim@epita.fr>
10834         * doc/bison.texinfo (Table of Symbols): Sort.
10836 2004-09-21  Akim Demaille  <akim@epita.fr>
10838         * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10839         the useless parentheses.
10840         Suggested by Paul Eggert.
10842 2004-09-20  Akim Demaille  <akim@epita.fr>
10844         Let the initial-action act on the look-ahead, and use it for the
10845         "initial push" (corresponding to an hypothetical beginning-of-file).
10846         And let lalr1.cc honor %initial-action.
10848         * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10849         example.
10850         * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10851         (Parser::Parser): Remove the ctor that used to initialize it.
10852         (Parser::parse): Like in the other skeletons, issue the "starting
10853         parse" message before any action.
10854         Honor %initial-action.
10855         Initialize the stacks with the lookahead.
10856         * data/yacc.c: Let $$ and @$ in %initial-action designate the
10857         look-ahead.
10858         Push them in the stacks.
10859         * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10861 2004-09-20  Akim Demaille  <akim@epita.fr>
10863         * doc/bison.texinfo (Initial Action Decl): New.
10865 2004-09-20  Akim Demaille  <akim@epita.fr>
10867         * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10868         clearer criterion to define it.
10869         (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10870         When reducing on an empty RHS, use the latest stacked location as
10871         location.
10872         yylloc is not always available.
10873         * data/glr.c: Likewise.
10874         Also, honor initial-actions.
10876 2004-09-20  Akim Demaille  <akim@epita.fr>
10878         * data/yacc.c (YY_LOCATION_PRINT): New.
10879         Define when we know YYLTYPE's structure, i.e., when the default
10880         YYLLOC_DEFAULT is used.
10881         * data/c.m4 (b4_yysymprint_generate): Use it.
10882         * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10883         value of the result.
10884         (error_start_): Replace with...
10885         (error_range_): this location array.
10886         This allows to replace code relying on the implementation of
10887         locations by portable code.
10888         * data/yacc.c (yylerrsp): Replace with...
10889         (yyerror_range): this.
10890         Every time a token is popped, update yyerror_range[0], to have an
10891         accurate location for the error token.
10892         * data/glr.c (YY_LOCATION_PRINT): New.
10893         (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10894         deference a pointer.
10895         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10896         report the location in %printers.
10898         * src/scan-skel.l: Instead of abort, report error messages to ease
10899         understanding skeleton scanning failures.
10901 2004-09-16  Akim Demaille  <akim@epita.fr>
10903         * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10904         (iterator, const_iterator): these, to be more in the C++ spirit.
10905         Also, return reverse iterators so that when displaying the stack
10906         we display its bottom first.
10907         (Parser::stack_print_, Parser::reduce_print_): Match the messages
10908         from yacc.c.
10909         We should probably use vector here though.
10911 2004-09-16  Akim Demaille  <akim@epita.fr>
10913         Have more complete shift traces.
10915         * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10916         to report Shifts instead of ad hoc YYDPRINTF invocations,
10917         including for the error token.
10918         * data/lalr1.cc (symprint_): Output the location.
10919         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10920         output the location within the %printer.
10921         Activate GLR tests, at least to make sure they compile properly.
10922         They still don't pass though.
10923         * tests/calc.at: Adjust expect verbose output, since now "Entering
10924         state..." is on a different line than the "Shifting" message.
10926 2004-09-08  Akim Demaille  <akim@epita.fr>
10928         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10929         Bison directive from the Bison file to the invocation of this
10930         macro, so that these directives are passed to
10931         AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10932         Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10933         Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10934         the extra Bison directives instead of the whole series.
10935         Change the grammar so that there are recoverable errors, and
10936         unrecoverable errors.  Now we can have the parser give up before
10937         consuming the whole input.  As a result we now can observe that
10938         the lookahead is freed when needed.
10939         Change the parser source to parse argv[1] instead of a hard coded
10940         string.
10941         Simplify yylex, and give a value and location to EOF.
10942         Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10943         passed directives already coded in the file.
10944         Add some tests to check the location of "error".
10945         For some tests, the C++ parser is correct, and not yacc.c.
10946         For other tests, they provide different, but unsatisfying, values,
10947         so keep the C++ value so that at least one parser is "correct"
10948         according to the test suite.
10949         (Actions after errors): Remove, this is subsumed by the
10950         AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10952 2004-09-06  Akim Demaille  <akim@epita.fr>
10954         * data/lalr1.cc: Adjust the indentation of the labels.
10955         (Parser::pop): New.
10956         Use it.
10958 2004-09-06  Akim Demaille  <akim@epita.fr>
10960         * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10961         argument, an informative message.
10962         Call YY_SYMBOL_PRINT.
10963         Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10964         * data/lalr1.cc (destruct_): Likewise.
10965         In addition, no longer depend on b4_yysymprint_generate and
10966         b4_yydestruct_generate to generate these functions, do it "by
10967         hand".
10969 2004-09-03  Akim Demaille  <akim@epita.fr>
10971         * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10972         invoked, yydestruct the lookahead.
10973         * tests/calc.at (Calculator $1): Update the expected lengths of
10974         traces: there is an added line for the discarded lookahead.
10975         * doc/bison.texinfo (Destructor Decl): Some rewording.
10976         Define "discarded" symbols.
10978 2004-09-02  Akim Demaille  <akim@epita.fr>
10980         * data/lalr1.cc (translate_, destruct_): No reason to be static.
10982 2004-09-02  Akim Demaille  <akim@epita.fr>
10984         * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10985         (YYDSYMPRINTF): Rename as...
10986         (YY_SYMBOL_PRINT): this.
10987         * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10988         two.
10989         Use it instead of direct symprint_ calls.
10990         (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10991         one.
10993 2004-09-02  Akim Demaille  <akim@epita.fr>
10995         * data/lalr1.cc (b4_yysymprint_generate): New.
10996         (symprint_): New member function, defined when YYDEBUG.
10997         Use it consistently instead of token/nterm debugging output by
10998         hand.
10999         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11000         %printer calls to use cdebug_ when using lalr1.cc.
11002 2004-08-30  Florian Krohm  <florian@edamail.fishkill.ibm.com>
11004         * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11005         with #ifdef YYDEBUG.
11007 2004-08-26  Akim Demaille  <akim@epita.fr>
11009         * doc/bison.texinfo (Implementing Loops): Rename as...
11010         (Implementing Gotos/Loops): this.
11012 2004-08-13  Paul Eggert  <eggert@cs.ucla.edu>
11014         Adjust to latest gnulib.
11015         * bootstrap (gnulib_modules): Add xalloc-die.
11016         Set LC_ALL=C so that file names sort consistently.
11017         Prefer the gnulib copies of gettext.m4, glibc21.m4,
11018         inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11019         uintmax_t.m4, ulonglong.m4.
11020         (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11021         po.m4 since we are now using _gl.m4 instead.
11023 2004-08-10  Florian Krohm  <florian@edamail.fishkill.ibm.com>
11025         * src/scan-action.l: Remove. Scanning of semantic actions is
11026         handled in scan-gram.l.
11028 2004-08-07  Florian Krohm  <florian@edamail.fishkill.ibm.com>
11030         * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11032         * src/location.h (struct): The file member is a uniqstr.
11033         (equal_boundaries): Use UNIQSTR_EQ for comparison.
11035 2004-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11037         Fix bug with non-%union parsers that have printers or destructors,
11038         which led to a Bison core dump.  Reported by Peter Fales in
11039         <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11041         * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11042         * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11043         not to our own type.
11044         * src/output.c (symbol_destructors_output, symbol_printers_output):
11045         Don't assume %union.
11046         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11047         AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11048         UNION-FLAG.  All callers changed.
11049         (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11050         Use type char, not unsigned int, when declaring an array of char;
11051         this lets us remove a cast.
11052         (Printers and Destructors): Add non-%union test cases.
11054 2004-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11056         * doc/bison.texinfo: Minor editorial changes, mostly to the new
11057         GLR writeups.  E.g., avoid frenchspacing and the future tense,
11058         change "lookahead" to "look-ahead", and change "wrt" to "with
11059         respect to".
11061 2004-06-21  Paul Hilfinger  <hilfingr@CS.Berkeley.EDU>
11063         * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11064         New sections, split off from the GLR Parsers section.  Put the new
11065         Simple GLR Parser near the start of the GLR section, for clarity.
11066         Rewrite connective text.
11068 2004-06-21  Frank Heckenbach  <frank@g-n-u.de>
11070         * doc/bison.texinfo (Simple GLR Parsers): New section.
11072 2004-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11074         * NEWS, TODO, doc/bison.texinfo:
11075         Use "look-ahead" instead of "lookahead", to be consistent.
11076         * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11077         while we're fixing "look-ahead".
11078         * src/conflicts.c (shift_set): Renamed from shiftset.
11079         (look_ahead_set): Renamed from lookaheadset.
11080         * src/print.c: Likewise.
11081         * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11082         name for "lookahead".
11083         (report_types, usage): Likewise.
11084         * src/getargs.h (report_look_ahead_tokens): Renamed from
11085         report_lookaheads.
11086         * src/lalr.c (compute_look_ahead_tokens): Renamed from
11087         compute_lookaheads.
11088         (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11089         (look_ahead_tokens_print): Renamed from lookaheads_print.
11090         * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11091         state_rule_lookaheads_print.
11092         * src/state.h: Likewise.
11093         (reductions.look_ahead_tokens): Renamed from lookaheads.
11094         * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11095         AT_DATA_LOOKAHEADS_GRAMMAR.
11097 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
11099         * README: Update location of patched M4 distribution.
11101 2004-05-30  Albert Chin-A-Young  <china@thewrittenword.com>
11103         Don't assume the C++ compiler takes the same arguments as the C compiler
11104         (trivial change).
11105         * configure.ac (O0CXXFLAGS): New var.
11106         * tests/atlocal.in (CXXFLAGS): Use it.
11108 2004-05-29  Paul Eggert  <eggert@cs.ucla.edu>
11110         Fix some "make check" problems with C++ reported by
11111         Albert Chin-A-Young for Tru64 C++ in this thread:
11112         http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11114         * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11115         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11116         Output to a .cc file for C++, not to a .c file.
11117         * tests/calc.at (AT_CHECK_CALC): Likewise.
11118         * tests/regression.at (AT_CHECK_DANCER): Likewise.
11119         * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11121 2004-05-28  Albert Chin-A-Young  <china@thewrittenword.com>
11123         * tests/calc.at, tests/actions.at: Workaround for SGI
11124         C++ compiler.  (trivial change)
11126 2004-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11128         Spent a few hours checking out which prerequisite versions the
11129         current sources actually require.  I went all the way back to
11130         Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11131         a seemingly endless set of combinations of versions more recent
11132         than that.  The bottom line is that the current sources require
11133         fairly recent versions of the build tools, and it'll be some work
11134         to change this.
11135         * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11136         (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11137         (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11138         Add comments explaining why those particular versions are
11139         currently needed.
11141         * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11142         in SGI MIPSpro 7.4.1m.  Problem reported by Albert Chin-A-Young in
11143         <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11145         * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11146         (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11148 2004-05-26  Paul Eggert  <eggert@cs.ucla.edu>
11150         * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11151         0.11.5.  Suggested by Bruno Haible.
11152         * bootstrap: Remove gettext version checking.
11154         * doc/bison.texinfo (Decl Summary): Also mention that %union
11155         can depend on prerequisite types.  Problem reported by Tim
11156         Van Holder.
11158 2004-05-25  Paul Eggert  <eggert@cs.ucla.edu>
11160         * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11161         * README-alpha: Don't tell people not to package this.
11163         * bootstrap: Don't assume $(...) works; use `...` instead.
11164         Problem reported by Paul Hilfinger.  Also, diagnose non-GNU
11165         gettext better.
11167         * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11168         put into the -d output file, and mention what to do if YYSTYPE is
11169         defined as a macro.
11171 2004-05-24  Paul Eggert  <eggert@cs.ucla.edu>
11173         Undo change made earlier today: it caused autopoint to not bring
11174         in ABOUT-NLS.  Ouch.  Instead, substitute our own diagnostic for
11175         autopoint's.
11177         * bootstrap: Check that gettext version matches what's in
11178         configure.ac.  Warn users to ignore robots.txt ERROR 404.
11179         * bootstrap: Undo today's earlier change (logged below).
11180         * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11182         The gettext version checking is causing more trouble than it's
11183         curing; remove it.  Problem reported by Paul Hilfinger.
11185         * bootstrap: Issue a warning that one can expect a message
11186         'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11187         * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11189 2004-05-23  Paul Eggert  <eggert@cs.ucla.edu>
11191         Ensure that the C++ compiler used for testing actually works on a
11192         simple test program; if not, skip the C++-related tests.  Problem
11193         reported by Vin Shelton in:
11194         http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11196         * m4/cxx.m4: New file.
11197         * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11198         * tests/atlocal.in (BISON_CXX_WORKS): Add.
11199         * tests/local.at (AT_COMPILE_CXX): Use it.
11201 2004-05-21  Paul Eggert  <eggert@cs.ucla.edu>
11203         * data/glr.c (yylloc): Output this macro even if locations are not
11204         being generated, as the GLR parser needs it even in that case.
11205         Problem reported by Troy A. Johnson
11206         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11208         * configure.ac (AC_INIT): Update to 1.875e.
11210 2004-05-21  Paul Eggert  <eggert@cs.ucla.edu>
11212         * NEWS: Version 1.875d.
11213         * configure.ac (AC_INIT): Likewise.
11214         * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11216         * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11217         -Wmissing-prototypes, or -Wstrict-prototypes for C++.  The current
11218         lalr1.cc runs afoul of the first, and the last two are no longer
11219         supported by GCC 3.4.0.
11220         * README: Mention GNU m4 1.4 or later; mention m4 patches.
11221         * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11223 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11225         * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11226         unsigned int, for compatibility with latest gnulib hash module.
11227         * src/state.c (state_hash, state_hasher): Likewise.
11228         * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11229         * src/uniqstr.c (hash_uniqstr): Likewise.
11231 2004-05-03  Paul Eggert  <eggert@cs.ucla.edu>
11233         * NEWS: Unescaped newlines are no longer allowed in char & strings.
11235         * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11236         SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11237         character and string literals.
11238         (unexpected_end): New function.
11239         (unexpected_eof): Use it.
11240         (unexpected_newline): New function.
11241         (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11242         actions.
11244         * NEWS: Document %expect-rr.
11246         * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11247         Fix typo by replacing $1 with $option.
11248         Remove more 'intl'-related files.
11249         Don't DEFUN AM_INTL_SUBDIR twice.
11251         * lib/.cvsignore: Add strndup.h.  Remove memchr.c, memcmp.c,
11252         memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11253         strtoul.c.
11254         * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11255         hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11256         xstrndup.m4.  Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11257         inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11258         stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11259         * src/.cvsignore: Add *.output.
11261         * src/parse-gram.y: Put copyright notice inside %{ %} so it
11262         gets copied to the output file.
11264 2004-04-28  Paul Eggert  <eggert@twinsun.com>
11266         Get files from the gnulib and po repositories, instead of relying
11267         on them being in our CVS.  Upgrade to latest versions of gnulib
11268         and Automake.
11270         * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11271         * bootstrap: Bootstrap from gnulib and po repositories.
11272         Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11273         * README-cvs: Document these changes.  Remove version numbers from
11274         mentions of build tools, since they change so often.  Mention Flex.
11276         * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11277         (gl_USE_SYSTEM_EXTENSIONS): Add.
11278         (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11279         Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11280         does this for us.
11281         (AC_ISC_POSIX): Remove; we no longer support this
11282         ancient OS, as it gets in the way of latest Autoconf & gnulib.
11283         (AC_HEADER_STDC): Remove: we now assume C89 or better.
11284         (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11285         Do not check for C89 headers, except for locale.h which is used
11286         by the Yacc library and must port to K&R hosts.
11287         (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11288         Do not check for C89 functions, except for setlocale which is
11289         used by the Yacc library.
11290         (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11291         (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11292         gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11293         gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11294         gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11295         AM_GNU_GETTEXT): Remove; now done by:
11296         (GNULIB_AUTOCONF_SNIPPET): Add.  "bootstrap" builds this for us.
11297         (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11298         for us.
11300         * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11301         (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11302         Define to empty, as gnulib.mk will do the rest for us.
11303         ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11304         for us.
11305         (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11306         (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11308         * src/files.c: Include gnulib's xstrndup.h.
11310         * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11311         (REALLOC): Use xnrealloc, for likewise.
11312         (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11313         (strnlen, memrchr): Remove decls; functions no longer used.
11314         Include <stpcpy.h>.
11316         * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11317         lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11318         lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11319         lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11320         lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11321         lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11322         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11323         lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11324         lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11325         lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11326         lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11327         m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11328         m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11329         m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11330         m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11331         m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11332         m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11333         m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11334         po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11335         po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11336         po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11337         Remove, as these files are now generated automatically
11338         by bootstrap or automake.
11340         * po/ChangeLog: Remove: all but one entry was a duplicate
11341         of this file, and I moved that 2000-11-02 entry here.
11343         * config/.cvsignore: Add Makefile, depcomp, install-sh.
11344         * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11345         argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11346         exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11347         getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11348         hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11349         memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11350         quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11351         strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11352         strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11353         unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11354         xstrndup.h.
11355         * m4/.cvsignore: Remove Makefile, Makefile.in.  Add alloca.m4,
11356         dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11357         mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11358         stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11359         * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11360         * src/.cvsignore: Remove *_.c.
11363         * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11364         support it.  (The latest stable gzip doesn't.)
11366 2004-04-27  Paul Eggert  <eggert@twinsun.com>
11368         * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11369         case, as stos_ is now used by destructors due to the 2004-02-09
11370         change.
11372         Remove more K&R C support.
11373         * lib/libiberty.y (PARAMS): Remove.  All uses removed.
11374         * lib/subpipe.c (errno): Remove decl.
11375         Include <stdlib.h> unconditionally.
11376         (EXIT_FAILURE): Remove macro.
11377         * src/complain.c (vfprintf, strerror): Remove.
11378         * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11379         unconditionally.
11380         (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11381         Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11382         (strchr, strspn, memchr): Remove decls.
11383         * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11384         unconditionally.  Do not declare perror.
11385         * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11386         unconditionally.
11388         * src/complain.c (_): Remove useless defn, as system.h defines this.
11390         * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11391         with latest obstack.h.
11392         * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11393         to procedure types, as obstack.h now does that for us.
11394         * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11396         * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11397         so that this include file can stand alone.
11398         * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11399         does this now.  Include subpipe.h first after config.h, to
11400         test whether it can stand alone.
11402         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11403         declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11404         unused declaration.
11406         * tests/synclines.at (%union synch line): Put a dummy member in
11407         the union, because empty unions aren't allowed in C.  Caught
11408         by GCC 3.4.0.
11410 2004-04-13  Jim Meyering  <jim@meyering.net>
11412         * src/conflicts.c (conflicts_print): Correct format string typo:
11413         use `%%' to produce literal `%'.  (trivial change)
11415 2004-03-30  Paul Eggert  <eggert@twinsun.com>
11417         * src/getargs.c (version): Update copyright year to 2004.
11419         * data/c.m4 (b4_int_type): Use 'short int' rather than
11420         'short', and similarly for 'long', 'unsigned', etc.
11421         * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11422         yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11423         yy_yypstack, yydumpstack): Likewise.
11424         * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11425         translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11426         Likewise.
11427         * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11428         yy_stack_print, yyparse): Likewise.
11429         * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11430         * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11431         * lib/bitset.c (bitset_print): Likewise.
11432         * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11433         * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11434         * lib/bitsetv.c (bitsetv_dump): Likewise.
11435         * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11436         * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11437         Likewise.
11438         * src/LR0.c (allocate_itemsets): Likewise.
11439         * src/gram.h (rule_number, rule): Likewise.
11440         * src/lalr.h (goto_number): Likewise.
11441         * src/nullable.c (nullable_compute): Likewise.
11442         * src/output.c (prepare_rules): Likewise.
11443         * src/relation.c (relation_print, relation_digraph): Likewise.
11444         * src/relation.h (relation_node): Likewise.
11445         * src/state.h (state_number, transitions, errs, reductions,
11446         struct state): Likewise.
11447         * src/symtab.h (symbol_number, struct symbol): Likewise.
11448         * src/tables.c (vector_number, tally, action_number,
11449         default_goto, goto_actions): Likewise.
11450         * tests/existing.at (GNU Cim Grammar): Likewise.
11451         * tests/regression.at (Web2c Actions): Likewise.
11453         * src/output.c (muscle_insert_short_int_table): Renamed from
11454         muscle_insert_short_table.  All uses changed.
11456 2004-03-25  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
11458         * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11459         (declaration): Replace expected_conflicts with expected_sr_conflicts.
11460         Add %expect-rr rule.
11462         * src/scan-gram.l: Recognize %expect-rr.
11464         * src/conflicts.h (expected_sr_conflicts): Rename from
11465         expected_conflicts.
11466         (expected_rr_conflicts): Declare.
11468         * src/conflicts.c (expected_sr_conflicts): Rename from
11469         expected_conflicts.
11470         (expected_rr_conflicts): Define.
11471         (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11472         for GLR parsers.
11473         Use expected_sr_conflicts in place of expected_conflicts.
11474         Warn if expected_rr_conflicts used in non-GLR parser.
11476         * doc/bison.texinfo: Add documentation for %expect-rr.
11478 2004-03-08  Paul Eggert  <eggert@gnu.org>
11480         Add support for hex token numbers.  Suggested by Odd Arild Olsen in
11481         <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11483         * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11484         in lalr1.cc.
11485         * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11486         * src/scan-gram.l (scan_integer): New function.
11487         ({int}): Use it.
11488         (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11489         (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11490         handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11491         Say "long int", not "long", for uniformity with GNU style.
11493 2004-02-25  Paul Eggert  <eggert@twinsun.com>
11495         * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11496         compilers.  This fixes a problem with Intel's C++ compiler being
11497         chatty, reported by Guido Trentalancia in
11498         <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11500 2004-02-09  Alexandre Duret-Lutz  <adl@gnu.org>
11502         Support %destructor and merge error locations in lalr1.cc.
11504         * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11505         (Parser::stos_): Define unconditionally.
11506         (Parser::destruct_): New method.  Generate its body with
11507         b4_yydestruct_generate.
11508         (Parser::error_start_): New attribute.
11509         (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11510         token which are discarded.
11511         (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11512         error_start_ when erroneous token are discarded.
11513         (Parser::parse) <yyerrlab1>: Compute the location of the error
11514         token so that it covers all the discarded tokens.
11515         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11516         it can be called with `%skeleton "lalr1.cc"', and do that.
11518 2004-02-02  Paul Eggert  <eggert@twinsun.com>
11520         * src/Makefile.am (AM_CPPFLAGS): New macro.  It mentions
11521         $(top_srcdir)/lib and ../lib.  This fixes a bug reported
11522         by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11523         There's no need to mention top_builddir since Automake does that
11524         for us.
11525         (INCLUDES): Remove, as Automake says it's obsolescent.
11526         Contents migrated into AM_CPPFLAGS as described above.
11527         * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11529 2004-01-14  Paul Hilfinger  <hilfingr@CS.Berkeley.EDU>
11531         * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11532         (yyreportSyntaxError): Handle case where lookahead token is
11533         YYEMPTY.
11535 2004-01-13  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
11537         * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11538         resulting parsers are compilable with C++.
11540 2003-12-23  Paul Eggert  <eggert@twinsun.com>
11542         * config/depcomp, config/install-sh: Sync with Automake 1.8.
11543         * src/output.c (output_skeleton): Rename local var.
11544         * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11545         Bison tokens, as this runs afoul of the 2003-10-07 change that
11546         disallowed NUL bytes in character constants or string literals.
11548         * tests/local.at: Require Autoconf 2.59's Autotest.
11549         * tests/testsuite.at: Don't include local.at, since we now assume
11550         Autoconf 2.59 or later.  Autoconf 2.59 had some problems with
11551         including it.
11552         * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11553         multiple inclusion warnings.
11555 2003-12-02  Akim Demaille  <akim@epita.fr>
11557         * doc/bison.texinfo (How Can I Reset the Parser): More about start
11558         conditions.
11559         From Bruno Haible.
11561 2003-11-18  Alexandre Duret-Lutz  <adl@gnu.org>
11563         * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11565 2003-10-07  Paul Eggert  <eggert@twinsun.com>
11567         * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11568         if testsuite doesn't exist.
11570         * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11571         literals, unfortunately.
11572         * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11573         Complain about NUL bytes in character constants or string literals.
11575 2003-10-05  Paul Eggert  <eggert@twinsun.com>
11577         * NEWS: Don't document %no-default-prec, as it's still
11578         too experimental.
11579         * doc/bison.texinfo: Document %no-default-prec only if
11580         the defaultprec flag is set.  Normally it's not.
11582 2003-10-04  Paul Eggert  <eggert@twinsun.com>
11584         * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11585         non-modifiable lvalue, instead of a modifiable one.
11586         * doc/bison.texinfo (Actions): Document that $$ can
11587         be assigned to.  Do not claim that $$ and $N are
11588         array element references: user code should not rely on this.
11590 2003-10-01  Paul Eggert  <eggert@twinsun.com>
11592         * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11593         (grammar_declaration): Use it.
11594         * src/scan-gram.l: New token %no-default-prec.
11595         * tests/conflicts.at: Revamp tests to use %no-default-prec.
11596         * NEWS, doc/bison.texinfo: Document the above.
11598 2003-10-01  Akim Demaille  <akim@epita.fr>
11600         VCG no longer supports long_straight_phase.
11602         * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11603         * src/print_graph.c (print_graph): Adjust.
11605 2003-09-30  Frank Heckenbach  <frank@g-n-u.de>
11606         and Paul Eggert  <eggert@twinsun.com>
11608         * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11609         Table of Symbols): Document %default-prec.
11610         * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11611         (grammar_declaration): Set default_prec on %default-prec.
11612         * src/scan-gram.l (%default-prec): New token.
11613         * src/reader.h (default_prec): New flag.
11614         * src/reader.c: Likewise.
11615         (packgram): Handle it.
11616         * tests/conflicts.at (%default-prec without %prec,
11617         %default-prec with %prec, %default-prec 1): New tests.
11619 2003-09-30  Paul Eggert  <eggert@twinsun.com>
11621         * tests/testsuite.at: Include local.at, not input.at, fixing
11622         a typo in the 2003-08-25 patch.
11624 2003-08-27  Akim Demaille  <akim@epita.fr>
11626         * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11627         GCC warnings.
11629 2003-08-26  Akim Demaille  <akim@epita.fr>
11631         * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11632         "<\#" to avoid magic from Gnus when posting parts of this script.
11634 2003-08-26  Akim Demaille  <akim@epita.fr>
11636         * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11637         (Parser::parse): here.
11638         Adjust: nerrs and errstatus is now replaced by...
11639         (Parser::nerrs_, Parser::errstatus_): New.
11641 2003-08-25  Akim Demaille  <akim@epita.fr>
11643         * config/announce-gen, Makefile.cfg: New.
11644         * Makefile.am: Adjust.
11645         * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11646         keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11648 2003-08-25  Akim Demaille  <akim@epita.fr>
11650         When reducing initial empty rules, Bison parser read an initial
11651         location that is not defined.  This results in garbage, and that
11652         affects Bison's own parser.  Therefore we need (i) to extend Bison
11653         to support a means to initialize this location, and (ii) to use
11654         this CVS Bison to fix CVS Bison's parser.
11656         * src/reader.h, reader.c (epilogue_augment): Remove, replace
11657         with...
11658         * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11659         * src/parse-gram.y: Adjust.
11660         (%initial-action): New.
11661         (%error-verbose): Since we require CVS Bison, there is no reason
11662         not to use it.
11663         * src/scan-gram.l: Adjust.
11664         * src/Makefile.am (YACC): New, to make sure we use our own parser.
11665         * data/yacc.c (yyparse): Use b4_initial_action.
11667 2003-08-25  Akim Demaille  <akim@epita.fr>
11669         * doc/bison.texinfo: Don't promote stdout for error messages.
11671 2003-08-25  Akim Demaille  <akim@epita.fr>
11673         * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11674         From Alexandre Duret-Lutz.
11676 2003-08-25  Akim Demaille  <akim@epita.fr>
11678         Version 1.875c.
11680 2003-08-25  Akim Demaille  <akim@epita.fr>
11682         * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11683         Use them.
11685 2003-08-25  Akim Demaille  <akim@epita.fr>
11687         * data/lalr1.cc (Parser::reduce_print_): New.
11688         Use it.
11690 2003-08-25  Akim Demaille  <akim@epita.fr>
11692         Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11693         error recovery loops.  This patch is based on
11694         <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11695         Also, augment the similarity between lalr1.cc and yacc.c.
11696         Note: the locations of error recovery rules are not correct yet.
11698         * data/lalr1.cc: Comment changes to augment the similarity between
11699         lalr1.cc and yacc.c.
11700         (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11701         (yyerrlab1): Remove, but where it used to be (now the bottom part of
11702         yyerrlab), when hitting EOF, pop the whole stack here instead of
11703         merely falling thru the default error handling mechanism.
11704         (yyerrorlab): New label, with the old contents of YYERROR,
11705         plus the following change: pop the stack of rhs corresponding
11706         to the production that invoked YYERROR.  That is how Yacc
11707         behaves (required by POSIX).
11708         * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11709         fail.
11711 2003-08-25  Akim Demaille  <akim@epita.fr>
11713         Tune local.at so that people can "autom4te -l autotest calc.at -o
11714         calc" for instance, to extract a sub test suite.
11716         * tests/testsuite.at: Move the initialization, Autotest version
11717         requirement, and AT_TESTED invocation into...
11718         * tests/local.at: here.
11719         * tests/testsuite.at: Include it for compatibility with Autoconf
11720         2.57.
11721         * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11722         be ignore.
11724 2003-08-04  Paul Eggert  <eggert@twinsun.com>
11726         Rework code slightly to avoid gcc -Wtraditional warnings.
11727         * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11728         The returned value is now stored in *YY0.  All callers changed.
11729         * src/output.c (merge_output): Adjust to the above change.
11731 2003-07-26  Paul Eggert  <eggert@twinsun.com>
11733         * data/glr.c (YYASSERT): New macro.
11734         (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11735         yyresolveStates, yyprocessOneStack):
11736         Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11737         Derived from a suggestion by Frank Heckenbach.
11739 2003-07-25  Paul Eggert  <eggert@twinsun.com>
11741         * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11742         for portability to K&R C (after ansi2knr, presumably).  See
11743         <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11744         by Frank Heckenbach, though I have omitted the structure-initialization
11745         part of his glr-knr.diff patch since I recall that the Portable
11746         C Compiler didn't require that change.
11748         Let the user specify how to allocate and free memory.
11749         Derived from a suggestion by Frank Heckenbach in
11750         <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11751         * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11752         All uses of free, malloc, realloc changed to use these macros,
11753         and unnecessary casts removed.
11754         * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11756 2003-07-06  Matthias Mann  <MatthiasMann@gmx.de>
11758         * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11759         use s.empty() rather than s == "" to test for empty string; see
11760         <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11761         (trivial change)
11763 2003-06-25  Akim Demaille  <akim@epita.fr>
11765         * config/depcomp, config/install-sh: Update from masters.
11767 2003-06-20  Paul Eggert  <eggert@twinsun.com>
11769         * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11770         and return properly parenthesized result.
11771         * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11772         * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11773         Remove unnecessary parentheses from uses.
11774         * doc/bison.texinfo (Location Default Action): Describe the
11775         conventions for parentheses.
11777 2003-06-19  Paul Eggert  <eggert@twinsun.com>
11779         * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11780         yyreportTree): Do not assume that size_t is the same width as int,
11781         when printing sizes.  Print sizes using an unsigned format.
11782         Problem reported by Frank Heckenbach in
11783         <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11785         Port to Forte Developer 7 C compiler.
11786         * data/glr.c (struct YYLTYPE): If locations are not being used,
11787         declare a single dummy member, as empty structs do not conform
11788         to the C standard.
11789         (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11790         the Forte Developer 7 C compiler complains that end-of-loop
11791         code is not reached.
11793 2003-06-17  Paul Eggert  <eggert@twinsun.com>
11795         * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11796         avoid warnings from picky compilers about redefinition of PARAMS.
11798 2003-06-17  Paul Eggert  <eggert@twinsun.com>
11800         Version 1.875b.
11802         * NEWS: Document 1.875b.
11804         * lib/bbitset.h: Do not include config.h; that's the includer's job.
11805         Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11806         * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11807         Don't use 'index' in comments, as it's a builtin fn on some hosts.
11808         * lib/bitset_stats.c: Include gettext.h unconditionally, as
11809         per recent gettext manual's suggestion.
11810         * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11811         Use prototypes, not old-style definitions.
11812         * lib/lbitset.c (lbitset_unused_clear): Likewise.
11813         * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11814         vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11815         vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11816         vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11817         vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11818         vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11819         vbitset_or_and_cmp, vbitset_copy): Likewise.
11821         * lib/libiberty.h: Do not include config.h; that's the includer's job.
11822         Do not include <stdlib.h>.
11823         (PARAMS): Define unconditionally for C89.
11824         (ATTRIBUTE_NORETURN): Remove.
11825         (ATTRIBUTE_UNUSED): Define unconditionally.
11827         Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11828         <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11829         * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11830         * lib/vbitset.c, lib/vbitset.h: New files.
11831         * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11832         lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11833         from libbitset.
11835         * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11836         `How Can I Reset @code{yyparse}', since texinfo does not allow
11837         arbitrary @ in node names.
11839         * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11840         shouldn't be needed according to the gettext 0.12.1 documentation
11841         but which seem to be needed anyway: codeset.m4 glibc21.m4
11842         intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11843         lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11844         * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11846         * lib/.cvsignore: Add stdbool.h.
11847         * m4/.cvsignore: Add nls.m4, po.m4.
11849         Upgrade to CVS gnulib.
11850         * stdbool_.h: File renamed from stdbool.h.in.
11851         * configure.ac (AM_STDBOOL_H): Invoke this instead of
11852         AC_HEADER_STDBOOL.
11853         (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11854         (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11855         * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11856         (MOSTLYCLEANFILES): New var.
11857         ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11858         (stdbool.h): New rule.
11859         * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11860         lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11861         lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11862         m4/quote.m4: Upgrade to today's gnulib.
11864         * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11865         (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11866         the tests right now.
11867         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11868         yyerror are declared before use; C99 requires this.
11870 2003-06-09  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
11872         * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11873         first.
11874         (yyrecoverSyntaxError): Correct the logic for setting and testing
11875         yyerrState.
11876         Correct comment on handling EOF.
11877         Allow states with only a default reduction, rather than failing
11878         (I can't quite reconstruct why these were not allowed before).
11880         Fixes to avoid problem that $-N rules in GLR parsers can cause
11881         buffer overruns, corrupting state.
11883         * src/output.c (prepare_rules): Output max_left_semantic_context
11884         definition.
11885         * src/reader.h (max_left_semantic_context): New variable declaration.
11886         * src/scan-gram.l (max_left_semantic_context): Define.
11887         (handle_action_dollar): Update max_left_semantic_context.
11888         * data/glr.c (YYMAXLEFT): New definition.
11889         (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11890         (yyresolveAction): Ditto.
11892         Fixes to problems with location handling in GLR parsers reported by
11893         Frank Heckenbach (2003/06/05).
11895         * data/glr.c (YYLTYPE): Make trivial if locations not used.
11896         (YYRHSLOC): Add parentheses, and define only if locations used.
11897         (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11898         locations not used.
11899         (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11900         (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11902         * tests/cxx-type.at: Exercise location information; update tests
11903         to differentiate output with and without locations.
11904         Remove forward declarations of yylex and yyerror---caused errors
11905         because default YYLTYPE not yet defined.
11906         Change semantic actions to compute strings, rather than printing
11907         them directly (to test proper passing of semantics values).  Change
11908         output to prefix notation and update test data and expected results.
11909         (yylex): Track locations.
11910         (stmtMerge): Return value rather than printing, and include arguments
11911         in value.
11913 2003-06-03  Paul Eggert  <eggert@twinsun.com>
11915         Avoid warnings generated by GCC 2.95.4 when Bison is
11916         configured with --enable-gcc-warnings.
11917         * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11918         yy::]b4_parser_class_name[::translate_,
11919         yy::Stack::operator[] (unsigned),
11920         yy::Stack::operator[] (unsigned) const,
11921         yy::Slice::operator[] (unsigned),
11922         yy::Slice::operator[] (unsigned) const):
11923         Rename local vars to avoid warnings.
11924         * tests/glr-regression.at (Improper handling of embedded actions
11925         and $-N in GLR parsers): Remove unused local variable from yylex.
11926         * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11927         (void) as arg when not pure, since we now assume C89 when building
11928         Bison.  Pacify GCC by using parameter.
11930 2003-06-02  Paul Eggert  <eggert@twinsun.com>
11932         * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11933         yy::Location::lines, yy::Location::columns): Rename arguments
11934         to avoid shadowing; this removes a warning generated by GCC 3.3.
11936 2003-06-01  Paul Eggert  <eggert@twinsun.com>
11938         Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11939         to g++, as GCC 3.3 complains if you do it.
11940         * configure.ac (WARNING_CXXFLAGS): New subst.  Set it to
11941         everything that WARNING_CFLAGS has, except omit warnings
11942         not suitable for C++.
11943         (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11944         * tests/atlocal.in (CXXFLAGS): New var.
11945         * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11947         Fix a GLR parser bug I reported in February; see
11948         <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11949         The problem was that GLR parsers did not conform to the C standard,
11950         because actions like { $1 = $2 + $3; } expanded to expressions
11951         that invoked YYFILL in separate subexpressions, and YYFILL assigned
11952         to a local variable.  The C standard says that expressions
11953         like (var = f ()) + (var = f ()) have undefined behavior.
11954         Another problem was that GCC sometimes issues warnings that
11955         yyfill and its parameters are unused.
11957         * data/glr.c (yyfillin): Renamed from the old yyfill.  Mark
11958         as possibly unused.
11959         (yyfill): New function.
11960         (YYFILL): Use it.
11961         (yyuserAction): Change type of yynormal to bool, so that it matches
11962         the new yyfill signature.  Mark it as possibly unused.
11965         Follow up on a bug I reported in February, where a Bison-generated
11966         parser can loop.  Provide a test case and a fix for yacc.c.  I
11967         don't have a fix for lalr1.cc or for glr.c, unfortunately.
11968         The original bug report is in:
11969         <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11971         * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11972         macro's size was becoming unwieldy.
11973         (yyerrlab): Do not discard an empty lookahead symbol, as this
11974         might destroy garbage.
11975         (yyerrorlab): New label, with the old contents of YYERROR,
11976         plus the following change: pop the stack of rhs corresponding
11977         to the production that invoked YYERROR.  That is how Yacc
11978         behaves, and POSIX requires this behavior.
11979         (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11980         * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11981         Define 'alarm' to do nothing if unistd.h is not available.
11982         Add a new rule "exp: '-' error;" to test the above change to
11983         data/yacc.c.  Use 'alarm' to abort any test taking longer than
11984         10 seconds, as it's probably looping.
11985         (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11986         Also, the new yacc.c generates two fewer diagnostics for an
11987         existing test.
11989 2003-05-24  Paul Eggert  <eggert@twinsun.com>
11991         * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11992         YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11993         This fixes a problem reported by John Bowman when the Compaq/HP
11994         Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11995         -ansi -Wall -gall).
11996         * data/yacc.c (union yyalloc): Likewise.
11997         (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11999         Switch from 'int' to 'bool' where that makes sense.
12001         * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12002         abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12003         abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12004         abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12005         Return or accept bool, not int.  All callers changed.
12006         * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12007         bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12008         * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12009         bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12010         bitset_or_and_cmp_): Likewise.
12011         * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12012         * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12013         bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12014         bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12015         bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12016         bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12017         bitset_stats_or_and_cmp): Likewise.
12018         * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12019         ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12020         ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12021         ebitset_xor_cmp): Likewise.
12022         * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12023         lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12024         lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12025         lbitset_xor_cmp): Likewise.
12026         * lib/bbitset.h: Include <stdbool.h>.
12027         (struct bitset_vtable): The following members now return bool, not
12028         int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12029         and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12030         or_and_cmp).
12031         * src/conflicts.c (count_rr_conflicts): Likewise.
12032         * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12033         All uses changed.
12034         * lib/ebitset.c (ebitset_obstack_init): Likewise.
12035         * lib/lbitset.c (lbitset_obstack_init): Likewise.
12036         * src/getargs.c (debug_flag, defines_flag, locations_flag,
12037         no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12038         graph_flag): Likewise.
12039         * src/getargs.h (debug_flag, defines_flag, locations_flag,
12040         no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12041         graph_flag): Likewise.
12042         * src/output.c (error_verbose): Likewise.
12043         * src/output.h (error_verbose): Likewise.
12044         * src/reader.c (start_flag, typed): Likewise.
12045         * src/reader.h (typed): Likewise.
12046         * src/getargs.c (LOCATIONS_OPTION): New constant.
12047         (long_options, getargs): Use it.
12048         * src/lalr.c (build_relations): Use bool, not int.
12049         * src/nullable.c (nullable_compute): Likewise.
12050         * src/print.c (print_reductions): Likewise.
12051         * src/tables.c (action_row, pack_vector): Likewise.
12052         * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12053         * src/output.c (prepare): Use it.
12054         * src/output.c (token_definitions_output,
12055         symbol_destructors_output, symbol_destructors_output): Use string,
12056         not boolean integer, to keep track of whether to output separator.
12057         * src/print_graph.c (print_core): Likewise.
12058         * src/state.c (state_rule_lookaheads_print): Likewise.
12060         * config/install-sh: Sync from automake 1.7.5.
12062 2003-05-14  Paul Eggert  <eggert@twinsun.com>
12064         * src/parse-gram.y (rules_or_grammar_declaration): Require a
12065         semicolon after a grammar declaration, in the interest of possible
12066         future changes to the Bison input language.
12067         Do not allow a stray semicolon at the start of the grammar.
12068         (rhses.1): Allow one or more semicolons after any rule, including
12069         just before "|" as required by POSIX.
12070         * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12071         grammar.
12073 2003-05-14  Alexandre Duret-Lutz  <adl@gnu.org>
12075         %parse-param support for lalr1.cc.
12077         * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12078         b4_cc_constructor_calls, b4_cc_constructor_call,
12079         b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12080         definitions.
12081         (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12082         parse-param arguments.
12083         (yy::b4_parser_class_name): Declare instance variables to
12084         hold parse-param arguments.
12085         * tests/calc.at: s/value/semantic_value/ because value clashes
12086         with a member of yy::b4_parser_class_name.  Adjust C++ code
12087         to handle %parse-param.  Enable %parse-param test in C++.
12089 2003-05-12  Paul Eggert  <eggert@twinsun.com>
12091         * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12092         English a bit.  Fix fclose typo.  Change "const char" to "char
12093         const", and use ANSI C rather than K&R for "main".  Suggest
12094         YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12095         and suggest yy_switch_to_buffer.
12097 2003-05-05  Paul Eggert  <eggert@twinsun.com>
12099         * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12100         C89.  This avoids a diagnostic on compilers that define __STDC__
12101         to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12102         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12104 2003-05-03  Paul Eggert  <eggert@twinsun.com>
12106         * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12107         Do not overrun array bounds.
12108         This should fix a bug reported today by Olatunji Oluwabukunmi in
12109         <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12111 2003-04-29  Akim Demaille  <akim@epita.fr>
12113         * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12114         * src/getargs.c, src/getargs.h: here, as bool, not int.
12115         (nondeterministic_parser): New.
12116         * src/parse-gram.y, src/scan-gram.l: Support
12117         %nondeterministic-parser.
12118         * src/output.c (prepare): Use nondeterministic_parser instead
12119         of glr_parser where appropriate.
12120         * src/tables.c (conflict_row, action_row, save_row)
12121         (token_actions, token_actions, pack_vector): Ditto.
12123 2003-04-29  Akim Demaille  <akim@epita.fr>
12125         * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12127 2003-04-29  Akim Demaille  <akim@epita.fr>
12129         * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12130         with %pure-parser and %locations to exercise the patch from Yakov
12131         Markovitch below.
12133 2003-04-28  Tim Van Holder <tim.van.holder@pandora.be>
12135         * data/yacc.c: (b4_lex_param): Corrected for the case where
12136         %lex-param is provided and %pure-parser isn't.
12138 2003-04-27  Paul Eggert  <eggert@twinsun.com>
12140         Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12141         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12142         * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12143         if it is not defined.
12144         (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12146 2003-04-26  Paul Eggert  <eggert@twinsun.com>
12148         * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12149         Declare to be of type suitable for the ninf value itself, not of
12150         type suitable for the corresponding table, since the latter might
12151         be unsigned but the ninf value might be negative.  This fixes a
12152         bug reported by Alexandre Duret-Lutz in
12153         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12155         * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12156         invokes it.  We shouldn't invoke it twice because it will attempt
12157         to put error.o in the archive twice.  This fixes a glitch reported
12158         by Martin Mokrejs in
12159         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12161 2003-04-21  Paul Eggert  <eggert@twinsun.com>
12163         * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12164         to gnulib.
12166 2003-04-21  Yakov Markovitch <Markovitch@iso.ru>
12168         * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12169         Fix obvious typo that results in uncompilable GLR parsers
12170         when both %pure-parser and %locations are used.  (trivial change)
12172 2003-04-17  Paul Eggert  <eggert@twinsun.com>
12174         * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12175         (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12176         Do not insert the expected token via unput, as this runs afoul
12177         of a POSIX-compatibility bug in flex 2.5.31.
12178         All uses changed to BEGIN the parent state,
12179         since we no longer insert the expected token via unput.
12180         * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12181         that is no longer emitted after the above change.
12183         * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12184         the first one.  This change is from Paul Hilfinger, and it fixes
12185         regression reported by Werner Lemberg in
12186         <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12188         (resolve_sr_conflict): Don't invoke state_errs_set
12189         unless one or more tokens have been explicitly made errors.
12190         Otherwise, the above change causes Bison to abort.
12192         * tests/existing.at (GNU pic Grammar): New test case, taken from
12193         Lemberg's email.
12195 2003-03-31  Akim Demaille  <akim@epita.fr>
12197         * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12199 2003-03-31  Akim Demaille  <akim@epita.fr>
12201         * src/output.c (prepare_symbols): Avoid trailing spaces in the
12202         output.
12204 2003-03-31  Akim Demaille  <akim@epita.fr>
12206         * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12207         From Paul Hilfinger.
12209 2003-03-29  Akim Demaille  <akim@epita.fr>
12211         * m4/error.m4: Do not put under dynamic conditions some code which
12212         expansion is under static control.
12214 2003-03-29  Akim Demaille  <akim@epita.fr>
12216         * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12218 2003-03-29  Akim Demaille  <akim@epita.fr>
12220         * doc/bison.texinfo (Strings are Destroyed): New.
12222 2003-03-13  Paul Eggert  <eggert@twinsun.com>
12224         * .cvsignore: Add configure.lineno.
12225         * src/.cvsignore: Add yacc.
12226         * tests/.cvsignore: Add testsuite.log.
12227         * doc/fdl.texi: Sync with latest FSF version.
12229 2003-03-12  Paul Eggert  <eggert@twinsun.com>
12231         * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12232         (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12233         cursor, instead of leaving it undefined.  This fixes a bug
12234         reported by Tim Van Holder in
12235         <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12236         * tests/input.at (Torturing the Scanner): Test the scanner on
12237         an empty input file, which was Tim Van Holder's test case.
12239         * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12240         <sys/resource.h> can be included, include sys/time.h and
12241         sys/times.h first, if available.  This works around the SunOS
12242         4.1.4 porting bug reported by Bruce Becker in
12243         <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12245         * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12246         AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12247         AC_HEADER_SYS_WAIT.
12249         Merge changes from gnulib.  This was prompted because the CVS
12250         snapshot didn't build on Solaris 7 due to strnlen problems.
12252         These changes need to be merged back into gnulib:
12253         * lib/hash.c: Include <stdbool.h> unconditionally.
12254         * m4/onceonly.m4 (m4_quote): New macro.
12255         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12256         Quote AC_FOREACH variable-expansions properly.
12257         The 2003-01-03 obstack.h change also needs merging.
12258         {end of changes requiring merging}
12260         * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12261         m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12262         m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12263         m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12264         m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12265         New files, imported from gnulib.
12266         * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12267         above.
12269         * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12270         m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12271         gnulib sources.
12273         * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12274         Add.
12275         (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12276         (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12277         (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12278         (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12279         (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12280         (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12281         (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12282         (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12283         (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12284         (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12285         (jm_PREREQ_ARGMATCH): Remove.
12286         (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12287         * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12289         * src/system.h: Include <stdbool.h> unconditionally.
12291         * lib/bbitset.h: Include <limits.h> unconditionally.  We have been
12292         assuming at least C89 in the bitset code for some time now.
12294 2003-03-03  Akim Demaille  <akim@epita.fr>
12296         * ro.po: New.
12298 2003-03-02  Akim Demaille  <akim@epita.fr>
12300         * doc/bison.texinfo (Table of Symbols): Reactivate the
12301         documentation for %lex-param, and %parse-param.
12303 2003-03-02  Akim Demaille  <akim@epita.fr>
12305         * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12306         generate verbose error messages.
12307         Use the number of tokens as an upper bound in yytname, as it
12308         cannot be a non terminal.
12310 2003-03-02  Akim Demaille  <akim@epita.fr>
12312         * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12313         message.
12315 2003-03-02  Akim Demaille  <akim@epita.fr>
12317         * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12318         Use them to exercise yycheck overrun.
12319         Based on Andrew Suffield's grammar.
12321 2003-03-02  Akim Demaille  <akim@epita.fr>
12323         Create tests/local.at for Bison generic testing macros.
12325         * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12326         * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12327         This new file.
12328         * tests/calc.at (AT_CHECK_CALC): Adjust.
12329         * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12330         (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12331         * tests/local.at: here.
12332         (AT_COMPILE_CXX): Tags the tests using it as c++.
12333         Ignore the test if CXX is not functional.
12335 2003-03-01  Paul Eggert  <eggert@twinsun.com>
12337         * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12338         not loc->end, since loc->end might contain garbage and this leads
12339         to undefined behavior on some platforms.
12340         (id_loc, token_start): Use (IF_LINTed) initial values that do not
12341         depend on *loc, so that the reader doesn't give the the false
12342         impression that *loc is initialized.
12343         (<INITIAL>"%%"): Do not bother setting code_start, since its value
12344         does not survive the return.
12346 2003-03-01  Akim Demaille  <akim@epita.fr>
12348         * src/scan-gram.l (code_start): Always initialize it when entering
12349         into yylex, as SC_EPILOGUE is activated *before* the corresponding
12350         yylex invocation.  An alternative would be making it static, but
12351         then it starts with the second %%'s beginning, instead of its end.
12353 2003-02-28  Paul Eggert  <eggert@twinsun.com>
12355         * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12356         around a UnixWare 7.1.1 porting bug reported by John Hughes in
12357         <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12359 2003-02-26  Paul Eggert  <eggert@twinsun.com>
12361         * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12362         Remove Sequent/Pyramid discussion (nobody uses them any more).
12363         Merge VMS and MS-DOS discussion; these ports may well be dead
12364         but let's keep mentioning them for now.  Put <> around email
12365         addresses.  Add copyright notice.
12367 2003-02-24  Paul Eggert  <eggert@twinsun.com>
12369         * data/glr.c (yy_reduce_print): yylineno -> yylno,
12370         to avoid collision with flex use of yylineno.
12371         Problem reported by Bruce Lilly in
12372         <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12373         * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12374         * data/yacc.c (yy_reduce_print): Likewise.
12376         * config/depcomp: Sync with Automake 1.7.3.
12378 2003-02-21  Akim Demaille  <akim@epita.fr>
12380         * data/lalr1.cc: Use temporary variables instead of casts to
12381         change integer types.
12382         Suggested by Paul Eggert.
12384 2003-02-21  Akim Demaille  <akim@epita.fr>
12386         * doc/bison.texinfo: Use "location" consistently to refer to @n,
12387         to avoid confusions with lalr1.cc's notion of Position.
12388         Suggested by Paul Eggert.
12390 2003-02-20  Akim Demaille  <akim@epita.fr>
12392         * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12393         before initial_columns.
12394         (location.hh): Use consistent variable names when defining the
12395         operator<<.
12396         Use "last" so that we subtract from Positions, not from unsigned.
12398 2003-02-20  Akim Demaille  <akim@epita.fr>
12400         * data/lalr1.cc (position.hh): New subfile, including the extended
12401         and Doxygen'ed documentation of class Position.
12402         (location.hh): Use it.
12403         Document a` la Doxygen.
12404         With the help of Benoit Perrot.
12406 2003-02-20  Akim Demaille  <akim@epita.fr>
12408         * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12409         AT_YACC_IF.
12410         Redefine AT_YYERROR_SEES_LOC_IF using it.
12411         (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12412         not defined.
12413         Don't use the location in yy::Parser::error_ and
12414         yy::Parser::print_ when not %locations.
12415         Activate more lalr1.cc tests.
12417 2003-02-19  Akim Demaille  <akim@epita.fr>
12419         * data/lalr1.cc: When displaying a line number, be sure to make it
12420         an int.
12422 2003-02-19  Akim Demaille  <akim@epita.fr>
12424         * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12425         Remove, useless.
12426         (YYABORT, YYACCEPT, YYERROR): New.
12427         * tests/calc.at: Renable the lalr1.cc test.
12429 2003-02-19  Akim Demaille  <akim@epita.fr>
12431         * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12432         error recovery, mixing with/without pops and discarding of the
12433         lookahead.
12434         Exercise YYERROR.
12435         Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12437 2003-02-17  Paul Eggert  <eggert@twinsun.com>
12439         * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12440         * tests/testsuite.at (AT_COMPILE): Use them.
12441         This fixes the testsuite problem reported by Robert Lentz in
12442         <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12444 2003-02-12  Paul Eggert  <eggert@twinsun.com>
12446         * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12447         Avoid subscript error in yycheck.  Bug reported by Andrew Suffield in
12448         <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12449         * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12450         Check for malloc failure, for consistency with yacc.c.
12451         (yytname_size): Remove, for consistency with yacc.c.
12453         The bug still remains in data/lalr1.cc, as I didn't have time
12454         to fix it there.
12456 2003-02-06  Akim Demaille  <akim@epita.fr>
12458         * configure.ac (GXX): Rename as...
12459         (CXX): this, to keep the original Autoconf semantics.
12460         Require 2.57.
12461         * data/lalr1.cc: Fix b4_copyright invocations.
12462         If YYDEBUG is not defined, don't depend upon name_ being defined.
12463         (location.hh): Include string and iostream.
12464         (Position::filename): New member.
12465         (Position::Position ()): New.
12466         (operator<< (Position)): New.
12467         (operator- (Position, int)): New.
12468         (Location::first, Location::last): Rename as...
12469         (Location::begin, Location::end): these, to mock the conventional
12470         iterator names.
12471         (operator<< (Location)): New.
12472         * tests/atlocal.in (CXX): New.
12473         * tests/testsuite.at (AT_COMPILE_CXX): New.
12474         * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12475         locations in a more synthetic way.
12476         (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12477         lalr1.cc is used.
12478         Adjust the C locations to match those from Emacs: first column is
12479         column 0.
12480         Change all the expected results.
12481         Conform to the GCS: simplify the locations when applicable.
12482         (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12483         (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12484         these CPP macros with the m4 macros new defined by...
12485         (AT_CHECK_PUSHDEFS): this, i.e.:
12486         (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12487         (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12488         New macros.
12489         (AT_CHECK_POPDEFS): Undefine them.
12490         (AT_CHECK_CALC_LALR1_CC): New.
12491         Use it for the first lalr1.cc test.
12493 2003-02-04  Akim Demaille  <akim@epita.fr>
12495         * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12496         Location as is defined.
12498 2003-02-04  Akim Demaille  <akim@epita.fr>
12500         * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12501         name_ being defined.
12503 2003-02-03  Paul Eggert  <eggert@twinsun.com>
12505         * src/gram.h (start_symbol): Remove unused decl.
12507         Use more-consistent naming conventions for local vars.
12509         * src/derives.c (derives_compute): Change type of local var from
12510         int to rule_number.
12511         * src/gram.c (grammar_rules_partial_print): Likewise.
12512         * src/print.c (print_core): Likewise.
12513         * src/reduce.c (reduce_grammar_tables): Likewise.
12515         * src/gram.c (grammar_dump): Change name of item_number *
12516         local var from r to rp.
12517         * src/nullable.c (nullable_compute): Likewise.
12519         * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12521         * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12522         for symbol or symbol_number var.
12523         * src/reader.c (grammar_start_symbol_set): Likewise.
12524         * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12525         Likewise.
12526         * src/state.c (transitions_to): Likewise.
12527         * src/state.h: Likewise.
12528         * src/tables.c (symbol_number_to_vector_number): Likewise.
12530         * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12531         char * var.
12533         * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12534         var.
12536         * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12537         var.
12539         * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12540         Use str, not s, for char * var.  Use ch, not c, for character var.
12541         Use size for size var.
12543         * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12544         char * var.
12545         (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12546         uniqstr var.
12547         * src/uniqstr.h: Likewise.
12549         * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12550         get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12551         get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12552         get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12553         param to have same name as that of enum, so that we don't use
12554         "s" to stand for a non-state.
12556 2003-02-02  Akim Demaille  <akim@epita.fr>
12558         * src/scan-skel.l: Scan more than one inert character per yylex
12559         invocation.
12561 2003-02-01  Paul Eggert  <eggert@twinsun.com>
12563         Version 1.875a.
12565         * po/LINGUAS: Add ms.
12567 2003-01-30  Akim Demaille  <akim@epita.fr>
12569         * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12571 2003-01-29  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
12573         * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12574         of $1.
12576         Changes in response to error report by S. Eken: GLR mode does not
12577         handle negative $ indices or $ indices in embedded rules correctly.
12578         See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12580         * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12581         (b4_rhs_location): Ditto.
12582         (yyfill): New function to copy from stack tree into array
12583         incrementally.
12584         (yyuserAction): Modify to allow incremental move of semantic values
12585         to rhs array when in GLR mode.
12586         Define YYFILL to use in user-defined actions to fill semantic array
12587         as needed.
12588         Remove dummy use of yystack, as there is now a guaranteed use.
12589         (yydoAction): Modify to allow incremental move of semantic values
12590         to rhs array when in GLR mode.
12591         (yyresolveAction): Ditto.
12592         (yyglrShiftDefer): Update comment.
12593         (yyresolveStates): Use X == NULL for pointers, not !X.
12594         (yyglrReduce): Ditto.
12595         (yydoAction): Ditto
12597         * tests/glr-regr1.at: Rename to ...
12598         * tests/glr-regression.at: Add new regression test for the problems
12599         described above (adapted from S. Eken).
12600         Update copyright notice.
12601         * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12602         * tests/Makefile.am: Ditto.
12604 2003-01-28  Paul Eggert  <eggert@twinsun.com>
12606         * data/lalr1.cc: Do not use @output_header_name@ unless
12607         b4_defines_flag is set.  This fixes two bugs reported by
12608         Tim Van Holder in
12609         <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12610         and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12612 2003-01-21  Paul Eggert  <eggert@twinsun.com>
12614         * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12615         we don't need to worry about yyerrlab1 being reported as an
12616         "unused label" by non-GCC C compilers.  The downside is that if
12617         locations are used then a couple of statements are duplicated each
12618         time YYERROR is invoked, but the upside is that the warnings
12619         should vanish.
12620         (yyerrlab1): Move code to YERROR.
12621         (yyerrlab2): Remove.  Change uses back to yyerrlab1.
12622         This reverts some of the 2002-12-27 change.
12624 2003-01-17  Paul Eggert  <eggert@twinsun.com>
12626         * src/output.c (symbol_printers_output): Fix typo that led
12627         to core dump.  Problem reported by Antonio Rus in
12628         <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12630 2003-01-13  Akim Demaille  <akim@epita.fr>,
12631                 Quoc Peyrot <chojin@lrde.epita.fr>,
12632                 Robert Anisko <anisko_r@lrde.epita.fr>
12634         * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12635         when the stacks contain one element, as the loop would otherwise
12636         free the last state, and then use the top state (the one we just
12637         popped).  This means that the initial elements will not be freed
12638         explicitly, as is the case in yacc.c; it is not a problem, as
12639         these elements have fake values.
12641 2003-01-11  Paul Eggert  <eggert@twinsun.com>
12643         * NEWS: %expect-violations are now just warnings, reverting
12644         to Bison 1.30 and 1.75 behavior.  This fixes the GCC 3.2
12645         bootstrapping problem reported by Matthias Klose; see
12646         <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12647         * src/conflicts.c (conflicts_print): Likewise.
12648         * tests/conflicts.at (%expect not enough, %expect too much,
12649         %expect with reduce conflicts): Likewise.
12650         * doc/bison.texinfo (Expect Decl): Document this.  Also mention
12651         that the warning is enabled if the number of conflicts changes
12652         (not necessarily increases).
12654         * src/getargs.c (version): Update copyright year.
12656 2003-01-09  Akim Demaille  <akim@epita.fr>
12658         * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12660 2003-01-08  Paul Eggert  <eggert@twinsun.com>
12662         * Makefile.maint (WGETFLAGS):
12663         New macro, containing "-C off" to disable proxy caches.
12664         All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12665         (rel-check): Use $(WGET) instead of wget.
12667 2003-01-06  Paul Eggert  <eggert@twinsun.com>
12669         * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12670         the GLR paper of Scott, Johnstone and Hussain.
12672 2003-01-04  Paul Eggert  <eggert@twinsun.com>
12674         * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12675         (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12676         * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12677         (EXTRA_LIBRARIES): New var, for liby.a.
12678         * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12679         (EXTRA_SCRIPTS): New var, for yacc.
12681         * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12682         since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12683         Problem reported by Nelson H. F. Beebe.
12685 2003-01-03  Paul Eggert  <eggert@twinsun.com>
12687         * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12688         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12689         when compiling Bison 1.875's `bitset bset = obstack_alloc
12690         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
12692         * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12693         ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12694         grow to a huge size with typical invocation.
12696         * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12697         Use the pattern recommended by Autoconf 2.57, except also protect
12698         against double-definition.
12699         * src/system.h: Likewise.
12700         Portability issues reported by Nelson H. F. Beebe.
12702         * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12703         All uses changed.  Provide a definition in both C and C++.
12704         (yytrue, yyfalse): Define even if defined (__cplusplus).
12706         * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12707         Reported by Nelson H. F. Beebe.
12709         * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12711 2003-01-02  Paul Eggert  <eggert@twinsun.com>
12713         * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12714         pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12715         Bug reported by Nelson H. F. Beebe.
12717 2003-01-01  Paul Eggert  <eggert@twinsun.com>
12719         * Version 1.875.
12721 2002-12-30  Paul Eggert  <eggert@twinsun.com>
12723         * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12724         Moved here from...
12725         (<INITIAL>","): Here.  This causes stray "," to be treated
12726         more uniformly.
12728         * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12729         last brace in braced code when not in Yacc mode, for compatibility
12730         with Bison 1.35.  This resurrects the 2001-12-15 patch to
12731         src/reader.c.
12733         * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12734         yystype.  This follows up the 2002-12-24 YYSTYPE bug fix.
12736 2002-12-28  Paul Eggert  <eggert@twinsun.com>
12738         * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12739         that of SYM's type.  This fixes Debian bug 168069, reported by
12740         Thomas Olsson.
12742 2002-12-28  Paul Eggert  <eggert@twinsun.com>
12744         Version 1.75f.
12746         Switch back to the Yacc style of conflict reports, undoing some
12747         of the 2002-07-30 change.
12748         * doc/bison.texinfo (Understanding): Use Yacc style for
12749         conflict reports.  Also, use new way of locating rules.
12750         * src/conflicts.c (conflict_report):
12751         Renamed from conflict_report_yacc, removing the old
12752         'conflict_report'.  Translate the entire conflict report at once,
12753         so that we don't assume that "," has the same interpretation in
12754         all languages.
12755         (conflicts_output): Use Yacc-style conflict report for each state,
12756         instead of our more-complicated style.
12757         (conflicts_print): Use Yacc-style conflict report, except print
12758         the input file name when not emulating Yacc.
12759         * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12760         Conflicted Reduction, %expect not enough, %expect too much,
12761         %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12762         * tests/existing.at (GNU Cim Grammar): Likewise.
12763         * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12765         * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12766         fatal): Don't invoke fflush; it's not needed and it might even be
12767         harmful for stdout, as stdout might not be open.
12768         * src/reduce.c (reduce_print): Likewise.
12770 2002-12-27  Paul Eggert  <eggert@twinsun.com>
12772         Fix a bug where error locations were not being recorded correctly.
12773         This problem was originally reported by Paul Hilfinger in
12774         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12776         * data/yacc.c (yyparse): New local var yylerrsp, to record the
12777         top of the location stack's error locations.
12778         (yyerrlab): Set it.  When discarding a token, push its location
12779         onto yylerrsp so that we don't lose track of the error's end.
12780         (yyerrlab1): Now is only the target of YYERROR, so that we can
12781         properly record the location of the action that failed.  For GCC
12782         2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12783         GCC warning about yyerrlab1 being unused if YYERROR is unused.
12784         (yyerrlab2): New label, which yyerrlab now falls through to.
12785         Compute the error's location by applying YYLLOC_DEFAULT to
12786         the locations of all the symbols that went into the error.
12787         * doc/bison.texinfo (Location Default Action): Mention that
12788         YYLLOC_DEFAULT is also invoked for syntax errors.
12789         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12790         Error locations include the locations of all the tokens that were
12791         discarded, not just the last token.
12793 2002-12-26  Paul Eggert  <eggert@twinsun.com>
12795         * src/files.c: Include quote.h.
12796         (compute_output_file_names): Warn if we detect conflicting
12797         outputs to the same file.  This should catch the misunderstanding
12798         exemplified by Debian Bug 165349, reported by Bruce Stephens..
12800         * src/conflicts.c (conflicts_print): If the user specifies
12801         "%expect N", report an error if there are any reduce/reduce
12802         conflicts.  This is what the manual says should happen.
12803         This fixes Debian bug 130890, reported by Anthony DeRobertis.
12804         * tests/conflicts.at (%expect with reduce conflicts): New test.
12806         Don't use m4_include on relative file names, as it doesn't work as
12807         desired if there happens to be a file with that name under ".".
12809         * m4sugar/version.m4: Remove; it was included but it wasn't used.
12810         * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12811         * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12812         * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12813         * src/output.c (output_skeleton): Use full path names when
12814         specifying a file to include; don't rely on include path, as
12815         it's unreliable when the working file contains a file with
12816         that name.
12818 2002-12-25  Paul Eggert  <eggert@twinsun.com>
12820         Remove obsolete references to bison.simple and bison.hairy.
12821         Problem mentioned by Aubin Mahe in
12822         <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12823         * data/glr.c: Comment fix.
12824         * doc/bison.1: Remove references.  Also, mention "yacc".
12826         * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12827         with -g option.
12829         * src/parse-gram.y (declaration): Use enum "report_states" rather
12830         than its numeric value 1.
12832         * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12833         opening a new one.  This fixes Debian bug 165349, reported by
12834         Bruce Stephens.
12836 2002-12-24  Paul Eggert  <eggert@twinsun.com>
12838         Version 1.75e.
12840         * Makefile.maint (cvs-update): Don't assume that the shell
12841         supports $(...), as Solaris sh doesn't.
12843         * src/parse-gram.y (lloc_default): Remove test for empty
12844         nonterminals at the end, since it didn't change the result.
12846 2002-12-24  Paul Eggert  <eggert@twinsun.com>
12848         If the user does not define YYSTYPE as a macro, Bison now declares it
12849         using typedef instead of defining it as a macro.  POSIX requires this.
12850         For consistency, YYLTYPE is also declared instead of defined.
12852         %union directives can now have a tag before the `{', e.g., the
12853         directive `%union foo {...}' now generates the C code
12854         `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12855         The default union tag is `YYSTYPE', for compatibility with Solaris 9
12856         Yacc.  For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12857         instead of `yyltype'.
12859         `yystype' and `yyltype' are now obsolescent macros instead of being
12860         typedefs or tags; they are no longer documented and will be
12861         withdrawn in a future release.
12863         * data/glr.c (b4_location_type): Remove.
12864         (YYSTYPE): Renamed from yystype.
12865         (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12866         (struct YYLTYPE): Renamed from struct yyltype.
12867         (YYLTYPE): Renamed from yyltype.
12868         (yyltype, yystype): New (and obsolescent) macros,
12869         for backward compatibility.
12870         * data/yacc.c: Likewise.
12872         * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12873         does not specify a union tag.  This is for compatibility with
12874         Solaris 9 yacc.
12876         * src/parse-gram.y (add_param): 2nd arg is now char * not char
12877         const *, since it is now modified by stripping surrounding { }.
12878         (current_braced_code): Remove.
12879         (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12880         PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12881         trailing " {...}".  Now of type <chars>.
12882         (grammar_declaration): Adjust to bundled tokens.
12883         (code_content): Remove; stripping is now done by add_param.
12884         (print_token_value): Print contents of bundled tokens.
12885         (token_name): New function.
12887         * src/reader.h (braced_code, current_braced_code): Remove.
12888         (token_name): New decl.
12890         * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12891         token_type, not braced_code code_kind.  All uses changed.
12892         (SC_PRE_CODE): New state, for scanning after a keyword that
12893         has (or usually has) an immediately-following braced code.
12894         (token_type): New local var, to keep track of which token type
12895         to return when scanning braced code.
12896         (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12897         <INITIAL>"%parse-param", <INITIAL>"%printer",
12898         <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12899         instead of returning a token type immediately.
12900         (<INITIAL>"{"): Set token type.
12901         (<SC_BRACED_CODE>"}"): Use it.
12902         (handle_action_dollar, handle_action_at): Now returns bool
12903         indicating success.  Fail if ! current_rule; this prevents a core dump.
12904         (handle_symbol_code_dollar, handle_symbol_code_at):
12905         Remove; merge body into caller.
12906         (handle_dollar, handle_at): Complain in invalid contexts.
12908         * NEWS, doc/bison.texinfo: Document the above.
12909         * NEWS: Fix years and program names in copyright notice.
12911 2002-12-17  Paul Eggert  <eggert@twinsun.com>
12913         * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12914         Reporting, Table of Symbols): Omit mentions of %lex-param and
12915         %parse-param from the documentation for now.
12917 2002-12-15  Paul Eggert  <eggert@twinsun.com>
12919         Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12920         GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12921         lookahead symbol, and which sets yychar in parser actions) and it
12922         disagreed with the Bison documentation.  Bug
12923         reported by Andrew Walrond.
12925         * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12926         as the caller now does that.
12927         (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12928         (YYEMPTY): Parenthesize right hand side, since others use it.
12929         (yyparse): Don't assume that our generated code is the only code
12930         that sets yychar.
12932 2002-12-13  Paul Eggert  <eggert@twinsun.com>
12934         Version 1.75d.
12936         POSIX requires a "yacc" command.
12937         * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12938         (MOSTLYCLEANFILES): Add yacc.
12939         (yacc): New rule.
12940         * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12941         as an alias for bison y.
12943         * po/LINGUAS: Add da.
12945         * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12946         problem with latest <getopt.h>.
12947         (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12949         * doc/fdl.texi: Upgrade to 1.2.
12950         * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12951         lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12952         lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12953         gnulib.
12954         * config/install-sh: Sync with autotools.
12956         Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12957         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12958         * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12959         locations are requested.
12960         (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12961         locations are requested.
12963 2002-12-12  Paul Eggert  <eggert@twinsun.com>
12965         Remove unportable casts and storage allocation tricks.
12966         While we're at it, remove almost all casts, since they
12967         usually aren't needed and are a sign of trouble.
12969         * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12971         * src/derives.c (derives_compute): Do not subtract NTOKENS from
12972         the pointer DSET returned by malloc; this isn't portable.
12973         Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12974         Similarly for DERIVES.
12975         * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12976         * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12977         * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12979         * src/derives.c (derives_compute): Do not bother invoking
12980         int_of_rule_number, since rule numbers are integers.
12982         * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12983         rather than XMALLOC (char, N).
12985         * src/files.c (filename_split): Rewrite to avoid cast.
12987         * src/gram.h (symbol_number_as_item_number,
12988         item_number_as_symbol_number, rule_number_as_item_number,
12989         item_number_as_rule_number):
12990         Now inline functions rather than macros, to avoid casts.
12991         * src/state.h (state_number_as_int): Likewise.
12992         * src/tables.c (state_number_to_vector_number,
12993         symbol_number_to_vector_number): Likewise.
12995         * src/gram.h (int_of_rule_number): Remove; no longer used.
12997         * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12998         since the resulting storage is always stored into.
13000         * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13001         where it's needed.
13003         * src/muscle_tab.c (muscle_m4_output):
13004         Now inline.  Return bool, not int.
13005         * src/state.c (state_compare): Likewise.
13006         * src/symtab.c (symbol_check_defined,
13007         symbol_check_alias_consistency, symbol_pack, symbol_translation,
13008         hash_compare_symbol, hash_symbol):
13009         Likewise.
13010         * src/uniqstr.c (uniqstr_print): Likewise.
13011         * src/muscle_tab.c (muscle_m4_output_processor):
13012         New function, to avoid casts.
13013         * src/state.c (state_comparator, stage_hasher): Likewise.
13014         * src/symtab.c (symbol_check_defined_processor,
13015         symbol_check_alias_consistency_processor, symbol_pack_processor,
13016         symbol_translation_processor, hash_symbol_comparator,
13017         hash_symbol_hasher): Likewise.
13018         * src/uniqstr.c (uniqstr_print_processor): Likewise.
13019         * src/muscle_tab.c (muscles_m4_output):
13020         Use new functions instead of casting old functions unportably.
13021         * src/state.c (state_hash_new): Likewise.
13022         * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13023         symbols_token_translations_init):
13024         Likewise.
13025         * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13027         * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13028         var instead of casting to long, to avoid casts.
13029         (prepare_states): Use MALLOC rather than alloca, so that we don't
13030         have to worry about alloca.
13031         * src/state.c (state_hash_lookup): Likewise.
13033         * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13034         local var instead of casting to unsigned char, to avoid casts.
13036         * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13037         STATE_ALLOC): Remove.
13038         (transitions_new, errs_new, reductions_new, state_new): Use malloc
13039         rather than calloc, and use offsetof to avoid allocating slightly
13040         too much storage.
13041         (state_new): Initialize all members.
13043         * src/state.c (state_hash): Use unsigned accumulator, not signed.
13045         * src/symtab.c (symbol_free): Remove; unused.
13046         (symbol_get): Remove cast in lhs of assignment.
13047         (symbols_do): Now static.  Accept generic arguments, not
13048         hashing-related ones.
13050         * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13051         (symbol_processor): Remove.
13052         (symbols_do): Remove decl; now static.
13054         * src/system.h (alloca): Remove; decl no longer needed.
13055         (<stddef.h>): Include, for offsetof.
13056         (<inttypes.>, <stdint.h>): Include if available.
13057         (uintptr_t): New type, if system lacks it.
13058         (CALLOC, MALLOC, REALLOC): New macros.
13059         All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13060         new macros.
13062         * src/tables.c (table_size): Now int, to pacify GCC.
13063         (table_grow, table_ninf_remap): Use signed table size.
13064         (save_row): Don't bother initializing locals when not needed.
13065         (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13066         * src/uniqstr.c (hash_compare_uniqstr):  Likewise.
13068         * src/vcg.h: Correct misspellings.
13070         * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13073         * src/getargs.c (getargs): Don't assume EOF == -1.
13075 2002-12-09  Paul Eggert  <eggert@twinsun.com>
13077         Change identifier spellings to avoid collisions with names
13078         that are reserved by POSIX.
13080         Don't use names ending in _t, since POSIX reserves them.
13081         For consistency, remove _e and _s endings -- they're weren't
13082         needed to remove ambiguity.  All uses changed.
13083         * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13084         turn was just renamed from struniq_t.
13085         * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13086         which in turn was just renamed from struniq_processor_t.
13087         (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13088         in turn was renamed from hash_compare_struniq_t.
13089         * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13090         (state_list): Renamed from state_list_t.
13091         * src/assoc.h (assoc): Renamed from assoc_t.
13092         * src/conflicts.c (enum conflict_resolution): Renamed from
13093         enum conflict_resolution_e.
13094         * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13095         (rule_list): Renamed from rule_list_t.
13096         * src/getargs.h (enum trace): Renamed from enum trace_e.
13097         (enum report): Renamed from enum report_e.
13098         * src/gram.h (item_number): Renamed from item_number_t.
13099         (rule_number): Renamed from rule_number_t.
13100         (struct rule_s): Remove the "rule_s" part; not used.
13101         (rule): Renamed from rule_t.
13102         (rule_filter): Renamed from rule_filter_t.
13103         * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13104         (goto_list): Renamed from goto_list_t.
13105         * src/lalr.h (goto_number): Renamed from goto_number_t.
13106         * src/location.h (location): Renamed from location_t.
13107         * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13108         and moved here from:
13109         * src/muscle_tab.h (muscle_entry_t): here.
13110         * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13111         (rule_list): Renamed from rule_list_t.
13112         * src/print_graph.c (static_graph): Renamed from graph.
13113         * src/reader.h (braced_code): Renamed from braced_code_t.
13114         Remove brace_code_e tag.
13115         * src/relation.h (relation_node): Renamed from relation_node_t.
13116         (relation_nodes): Renamed from relation_nodes_t.
13117         (relation): Renamed from relation_t.
13118         * src/state.h (state_number): Renamed from state_number_t.
13119         (struct state): Renamed from struct state_s.
13120         (state): Renamed from state_t.
13121         (transitions): Renamed from transitions_t.  Unused (and
13122         misspelled) transtion_s tag removed.
13123         (errs): Renamed from errs_t.  Unused errs_s tag removed.
13124         (reductions): Renamed from reductions_t.  Unused tag
13125         reductions_s removed.
13126         * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13127         (struct symbol_list): Renamed from struct symbol_list_s.
13128         * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13129         (struct symbol): Renamed from struct symbol_s.
13130         (symbol): Renamed from symbol_t.
13131         * src/tables.c (vector_number): Renamed from vector_number_t.
13132         (action_number): Renamed from action_t.
13133         * src/tables.h (base_number): Renamed from base_t.
13134         * src/vcg.h (enum color): Renamed from enum color_e.
13135         (enum textmode): Renamed from enum textmode_e.
13136         (enum shape): Renamed from enum shape_e.
13137         (struct colorentry): Renamed from struct colorentry_s.
13138         (struct classname): Renamed from struct classname_s.
13139         (struct infoname): Renamed from struct infoname_s.
13140         (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13141         (enum decision): Renamed from enum decision_e.
13142         (enum orientation): Renamed from enum orientation_e.
13143         (enum alignment): Renamed from enum alignment_e.
13144         (enum arrow_mode): Renamed from enum arrow_mode_e.
13145         (enum crossing_type): Renamed from enum crossing_type_e.
13146         (enum view): Renamed from enum view_e.
13147         (struct node): Renamed from struct node_s.
13148         (node): Renamed from node_t.
13149         (enum linestyle): Renamed from enum linestyle_e.
13150         (enum arrowstyle): Renamed from enum arrowstyle_e.
13151         (struct edge): Renamed from struct edge.
13152         (edge): Renamed from edge_t.
13153         (struct graph): Renamed from struct graph_s.
13154         (graph): Renamed from graph_t.
13155         * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13156         Rename value_t -> value.
13157         * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13158         value_t_as_yystype -> value_as_yystype.
13160         Don't include <errno.h> in the mainstream code, since it
13161         reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13162         * lib/get-errno.c, lib/get-errno.h: New files.
13163         * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13164         get-errno.c.
13165         * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13166         * src/output.c (output_skeleton): Likewise.
13167         * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13168         instead of errno.
13169         (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13170         Likewise.
13171         (handle_action_dollar, handle_action_at): Likewise.
13172         * src/system.h: Do not include <errno.h>.
13173         (TAB_EXT): Renamed from EXT_TAB.
13174         (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13176         Avoid str[a-z]*, since <string.h> reserves that name space.
13177         Change all instances of "struniq" in names to "uniqstr", and
13178         likewise for "STRUNIQ" and "UNIQSTR".
13179         * src/uniqstr.c: Renamed from src/struniq.c.
13180         * src/uniqstr.h: Renamed from src/struniq.h.
13181         * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13182         * src/files.c (strsuffix): Remove; unused.
13183         (concat2): Renamed from stringappend.  Now static.
13184         * src/files.h (strsuffix, stringappend): Remove; unused.
13185         * src/parse-gram.y (<chars>): Renamed from <string>.
13186         (<uniqstr>): Renamed from <struniq>.
13187         * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13188         * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13189         (struct graph_s.expand): Renamed from struct graph_s.stretch.
13190         * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13191         (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13192         (N_EXPAND): Renamed from N_STRETCH.
13194         Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13195         * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13196         * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13197         Remove; unused.
13198         * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13199         * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13200         * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13201         * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13202         (BASE_MAXIMUM): Renamed from BASE_MAX.
13203         (BASE_MINIMUM): Renamed from BASE_MIN.
13204         (ACTION_MAX): Remove; unused.
13205         (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13206         Unnecessary casts removed from above defines.
13209         Fix misspelling in names.
13210         * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13211         * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13212         G_NODE_ALIGNEMENT.
13215         * lib/timevar.c (timevar_report): Renamed from time_report,
13216         for consistency with other names.
13217         * lib/timevar.h (timevar_report): New decl.
13218         * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13221         Sort include-file uses.
13223         Reorder all include files under src to be in the order "system.h".
13224         then the ../lib include files in angle brackets (alphabetized),
13225         then the . include files in double-quotes (alphabetized).  Fix
13226         dependency breakages encountered in this process, as follows:
13227         * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13228         * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13229         * src/state.h: Include "symtab.h".
13231 2002-12-08  Paul Eggert  <eggert@twinsun.com>
13233         * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13234         since this causes problems when __file__ contains character
13235         sequences like "@" that are treated specially by src/scan-skel.l.
13236         Instead, just use the file's basename.  This fixes the bug
13237         reported by Martin Mokrejs in
13238         <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13240 2002-12-06  Paul Eggert  <eggert@twinsun.com>
13242         Add support for rules that do not have trailing semicolons, as
13243         POSIX requires.  Improve the quality of locations in Bison
13244         diagnostics.
13246         * src/location.c: Include <quotearg.h>.
13247         (empty_location): Now const.
13248         (location_print): New function.  Follow the recommendation of the
13249         GNU Coding Standards for locations that span file boundaries.
13250         * src/location.h: Do not include <quotearg.h>; no longer needed.
13251         (boundary): New type.
13252         (location_t): Use it.  This allows locations to span file boundaries.
13253         All member uses changed: file -> start.file or end.file (as needed),
13254         first_line -> start.line, first_column -> start.column,
13255         last_line -> end.line, last_column -> end.column.
13256         (equal_boundaries): New function.
13257         (LOCATION_RESET, LOCATION_STEP): Remove.
13258         (LOCATION_PRINT): Remove.  All callers changed to use location_print.
13259         (empty_location): Now const.
13260         (location_print): New decl.
13261         * src/parse-gram.y (lloc_default): New function, which handles
13262         empty locations more accurately.
13263         (YYLLOC_DEFAULT): Use it.
13264         (%token COLON): Remove.
13265         (%token ID_COLON): New token.
13266         (rules): Use it.
13267         (declarations, rules): Remove trailing semicolon.
13268         (declaration, rules_or_grammar_declaration):
13269         Allow empty (";") declaration.
13270         (symbol_def): Remove empty actions; no longer needed.
13271         (rules_or_grammar_declaration): Remove trailing semicolon.
13272         (semi_colon.opt): Remove.
13273         * src/reader.h: Include location.h.
13274         (scanner_cursor): New decl.
13275         * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13276         rolling our own.
13277         * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13278         of *loc.
13279         (STEP): Remove.  No longer needed, now that adjust_location does
13280         the work.  All uses removed.
13281         (scanner_cursor): New var.
13282         (adjust_location): Renamed from extend_location.  It now sets
13283         *loc and adjusts the scanner cursor.  All uses changed.
13284         Don't bother testing for CR.
13285         (handle_syncline): Remove location arg; now updates scanner cursor.
13286         All callers changed.
13287         (unexpected_end_of_file): Now accepts start boundary of token or
13288         comment, not location.  All callers changed.  Update scanner cursor,
13289         not the location.
13290         (SC_AFTER_IDENTIFIER): New state.
13291         (context_state): Renamed from c_context.  All uses changed.
13292         (id_loc, code_start, token_start): New local vars.
13293         (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context.  Move all
13294         processing of Yacc white space and equivalents here.
13295         (<INITIAL>{id}): Save id_loc.  Begin state SC_AFTER_IDENTIFIER
13296         instead of returning ID immediately, since we need to search for
13297         a subsequent colon.
13298         (<INITIAL>"'", "\""): Save token_start.
13299         (<INITIAL>"%{", "{", "%%"): Save code_start.
13300         (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13301         (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13302         BEGIN context_state at end, not INITIAL.
13303         (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13304         <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13305         Return correct token start.
13306         (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13307         the start of a character, string or multiline comment is found.
13308         * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13309         Reduction): Adjust reported locations to match the more-precise
13310         results now expected.
13311         * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13312         * tests/reduce.at (Useless Rules, Reduced Automaton,
13313         Underivable Rules): Likewise.
13314         * tests/regression.at (Invalid inputs): No longer `expecting ";"
13315         or "|"' now that so many other tokens are allowed by the new grammar.
13317         * src/complain.h (current_file): Remove duplicate decl;
13318         current_file is now owned by files.h.
13319         * src/complain.c, src/scan-gram.l: Include files.h.
13321 2002-12-06  Paul Eggert  <eggert@twinsun.com>
13323         * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13324         promotes to int; it might be unsigned int.
13325         * data/yacc.c (yy_reduce_print): Likewise.
13327         * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13328         be #defined in the prologue, not in the Bison declarations.
13329         This fixes Debian Bug 102878, reported by Shaul Karl.
13331 2002-12-02  Paul Eggert  <eggert@twinsun.com>
13333         * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13334         * lib/strtoul.c: New file, from gnulib.
13335         This fixes a porting bug reported by Peter Klein in
13336         <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13338 2002-11-30  Paul Eggert  <eggert@twinsun.com>
13340         * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13341         and put only a forward declaration in the prologue.  This is for
13342         consistency with the other scanner helper functions.
13344         Type clashes now generate warnings, not errors, since it
13345         appears that POSIX may allow some grammars with type clashes.
13346         * src/reader.c (grammar_current_rule_check): Warn about
13347         type clashes instead of complaining.
13348         * tests/input.at (Type Clashes): Expect warnings, not complaints.
13350         Add Yacc library, since POSIX requires it.
13351         * doc/bison.texinfo (Yacc Library): New node.  Regenerate top menu.
13352         * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13353         * lib/main.c, lib/yyerror.c: New files.
13355         gram_error can be static; it need not be extern.
13356         * src/reader.h (gram_error): Remove decl.
13357         * src/parse-gram.y (gram_error): Now static.  Add static decl.
13358         (print_token_value): Omit parameter names from forward decl,
13359         for consistency.
13361 2002-11-29  Paul Eggert  <eggert@twinsun.com>
13363         * doc/bison.texinfo: Emphasize that yylex and yyerror must
13364         be declared before being used.  E.g., one should typically
13365         declare them in the prologue.  Use GNU coding style in examples.
13366         Put "const" consistently after the type it modifies.  Mention
13367         that C99 supports "inline".  Mention that yyerror traditionally
13368         returns "int".
13370         %parse-param and %lex-param now take just one argument, the
13371         declaration; the argument name is deduced from the declaration.
13373         * doc/bison.texinfo (Parser Function, Pure Calling, Error
13374         Reporting, Table of Symbols): Document this.
13375         * src/parse-gram.y (add_param): New function.
13376         (COMMA): Remove.
13377         (declaration): Implement new rule for %parse-param and %lex-param.
13378         * src/scan-gram.l: "," now elicits a warning, rather than being
13379         a token; this is more compatible with byacc.
13380         * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13382 2002-11-27  Paul Eggert  <eggert@twinsun.com>
13384         Rename identifiers to avoid real and potential collisions.
13386         * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13387         to avoid collision with lex macro described by Bruce Lilly in
13388         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13389         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13390         * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13391         * src/parse-gram.y (print_token_value): Renamed from yyprint.
13392         All uses changed.
13393         (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove.  All uses changed.
13394         The name "yycontrol" violates the name space rules, and this stuff
13395         wasn't being used anyway.
13396         (input): Remove action; this stuff wasn't being used.
13397         (gram_error): Rename local variable yylloc -> loc.
13398         * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13399         (YY_DECL): Don't use "yy" at start of local variables.
13400         All uses changed, e.g., yylloc -> loc.
13401         * src/scan-gram.l (STEP): Renamed from YY_STEP.  All uses changed.
13402         (STRING_GROW): Renamed from YY_OBS_GROW.  All uses changed.
13403         (STRING_FINISH): Renamed from YY_OBS_FINISH.  All uses changed.
13404         (STRING_FREE): Renamed from YY_OBS_FREE.  All uses changed.
13406         * src/parse-gram.y (gram_error): loc is now const *.
13407         * src/reader.h (gram_error): Likewise.
13409 2002-11-24  Paul Eggert  <eggert@twinsun.com>
13411         Version 1.75c.
13413         * tests/actions.at (Actions after errors): Use an output format
13414         more similar to that of the Printers and Destructors test.
13415         Test the position of the ';' token too.
13416         (Printers and Destructors): Likewise.
13417         (Printers and Destructors: %glr-parser): Remove for now, to avoid
13418         unnecessarily alarming people when the test fails.
13420         * data/yacc.c (yyerrlab1): Move this label down, so that the
13421         parser does not discard the lookahead token if the user code
13422         invokes YYERROR.  This change is required for POSIX conformance.
13424         * lib/error.c: Sync with gnulib.
13426 2002-11-22  Paul Eggert  <eggert@twinsun.com>
13428         * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13429         * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13430         * lib/xmalloc.c: Likewise.
13432 2002-11-20  Paul Eggert  <eggert@twinsun.com>
13434         * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13436 2002-11-20  Paul Eggert  <eggert@twinsun.com>
13438         Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13439         should use `if (! x) abort ();' rather than `assert (x);', and
13440         anyway it's one less thing to worry about configuring.
13442         * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13443         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13444         and replace all instances of assert with abort.
13445         * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13446         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13448         * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13449         yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13450         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13451         hash_find_entry, hash_rehash, hash_insert): Likewise.
13452         * src/conflicts.c (resolve_sr_conflict): Likewise.
13453         * src/lalr.c (set_goto_map, map_goto): Likewise.
13454         * src/nullable.c (nullable_compute): Likewise.
13455         * src/output.c (prepare_rules, token_definitions_output): Likewise.
13456         * src/reader.c (packgram, reader): Likewise.
13457         * src/state.c (state_new, state_free, state_transitions_set,
13458         state_reduction_find): Likewise.
13459         * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13460         symbol_pack): Likewise.
13461         * src/tables.c (conflict_row, pack_vector): Likewise.
13462         * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13463         get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13464         get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13465         get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13467         * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13468         (ARGMATCH_CONSTRAINT): New macro.
13469         (ARGMATCH_ASSERT): Use it.
13471         * src/system.h (verify): New macro.
13472         * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13473         rather than assert.
13474         * src/tables.c (tables_generate): Likewise.
13476         * src/struniq.c (struniq_assert): Now returns void, and aborts
13477         if the assertion is false.
13478         (struniq_assert_p): Remove.
13479         * src/struniq.h: Likewise.
13481 2002-11-18  Paul Eggert  <eggert@twinsun.com>
13483         * data/glr.c (yygetLRActions): Replace `yyindex' with
13484         `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13485         This fixes the regression with Sun ONE Studio 7 cc that I reported in
13486         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13488 2002-11-18  Akim Demaille  <akim@epita.fr>
13490         * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13491         space.
13492         From Tim Van Holder.
13494 2002-11-17  Paul Eggert  <eggert@twinsun.com>
13496         Pacify Sun ONE Studio 7 lint.  Also, rename "ParseError"
13497         to "SyntaxError" for consistency with my 2002-11-15 change.
13499         * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13500         not define to {}, since this breaks the common use of `YYDPRINTF
13501         ((...));' if a single statement is desired (e.g. before `else').
13502         Work around GCC warnings by surrounding corresponding calls with
13503         {} if needed.
13504         (yyhasResolvedValue): Remove unused function.
13505         (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13506         loop body.
13507         (yyreportSyntaxError): Renamed from yyreportParseError.
13508         (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13509         All uses changed.
13510         * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13511         extern when possible.  Remove unused initializations.
13513 2002-11-16  Akim Demaille  <akim@epita.fr>
13515         Augment the similarity between GLR and LALR traces.
13517         * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13518         (YY_REDUCE_PRINT): New.
13519         (yyparse): Use them.
13520         * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13521         YYDPRINT here.
13522         (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13523         state reached after the reduction/recovery, since...
13524         (yyparse, yyprocessOneStack): Report the state we are entering in.
13526 2002-11-16  Akim Demaille  <akim@epita.fr>
13528         * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13529         Add support for --trace=skeleton.
13530         * src/scan-skel.l: %option debug.
13531         Scan strings of non-@ or \n instead of character by character.
13532         (scan_skel): Handle trace_skeleton.
13533         (QPUTS): New.
13534         (@output_parser_name@, @output_header_name@): ``Restore'' their
13535         support (used to be M4 macros).
13536         * data/yacc.c: Quote larger chunks, a la glr.c.
13537         * data/lalr1.cc: Likewise.
13538         The header guards are no longer available, so use some other
13539         string than `YYLSP_NEEDED'.
13541 2002-11-16  Akim Demaille  <akim@epita.fr>
13543         Make the ``Printers and Destructors'' test more verbose, taking
13544         `yacc.c''s behavior as (possibly wrong) reference.
13546         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13547         instead of fprint on stdout.
13548         Set and report the last_line of the symbols.
13549         Consistently display values and locations.
13551 2002-11-16  Paul Eggert  <eggert@twinsun.com>
13553         * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13555 2002-11-15  Paul Eggert  <eggert@twinsun.com>
13557         * tests/actions.at (Actions after errors): New test case.
13559         * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13560         src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13561         tests/action.at, tests/calc.at, tests/conflicts.at,
13562         tests/cxx-type.at, tests/regression.at:
13563         "parse error" -> "syntax error" for POSIX compatibility.
13564         "parsing stack overflow..." -> "parser stack overflow" so
13565         that code matches Bison documentation.
13567 2002-11-15  Akim Demaille  <akim@epita.fr>
13569         * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13570         take two BRACED_CODE, not two string_content.
13571         Free the scanner's obstack when we are done.
13572         (code_content): New.
13573         * tests/calc.at: Adjust.
13574         * doc/bison.texinfo: Adjust.
13575         Also, make sure to include the `,' for these declarations.
13577 2002-11-15  Tim Van Holder  <tim.van.holder@pandora.be>
13579         * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13580         definition; avoids potential autoreconf problems.
13582 2002-11-15  Akim Demaille  <akim@epita.fr>
13584         Always check the value returned by yyparse.
13586         * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13587         returned by yyparse.
13588         (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13589         Adjust calls.
13590         * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13591         returned by yyparse.
13593 2002-11-14  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
13595         * data/glr.c (yyFail): Always set yyerrflag.  Corrects regression
13596         on input.at test.
13598 2002-11-14  Paul Eggert  <eggert@twinsun.com>
13600         * src/output.c (output_skeleton): Call xfopen instead of
13601         duplicating xfopen's body.
13603         Fix bugs reported by Nelson H. F. Beebe in
13604         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13606         * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13607         "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13608         Group compiler.  Instead, use "$CC -E bar.c".  Include the .h
13609         file twice in the grammar, as an extra check.
13611         * tests/input.at (Torturing the Scanner): Surround the
13612         backslash-newline tests with "#if 0", to make it less likely that
13613         we'll run into compiler bugs.  Bring back solitary \ inside
13614         comment, but add a closing comment to work around HP C bug.  Don't
13615         test backslash-newline in C character constant.
13617 2002-11-14  Akim Demaille  <akim@epita.fr>
13619         * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13620         status of the compiler.
13621         Calling `exit 1' is no longer needed.
13622         Reported by Nelson H. F. Beebe.
13624 2002-11-14  Akim Demaille  <akim@epita.fr>
13626         * tests/atlocal.in (CPPFLAGS): We have config.h.
13627         * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13628         New.
13629         * tests/actions.at, tests/calc.at, tests/conflicts.at,
13630         * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13631         * tests/regression.at, tests/torture.at: Use them for all the
13632         grammars that are to be compiled.
13633         * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13634         * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13635         * doc/bison.texinfo (GLR Parsers): Document `inline'.
13637 2002-11-14  Akim Demaille  <akim@epita.fr>
13639         * doc/bison.texinfo: Various formatting changes (alignments in
13640         samples, additional @group/@end group, GCS in samples.
13641         Use @deffn instead of simple @table to define the directives,
13642         macros, variables etc.
13644 2002-11-13  Paul Eggert  <eggert@twinsun.com>
13646         Fix some bugs reported by Albert Chin-A-Young in
13647         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13649         * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13650         -o c"; the HP C compiler chatters during compilation.
13651         Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13652         * tests/headers.at (export YYLTYPE): Likewise.
13654         * tests/input.at (Torturing the Scanner): Remove lines containing
13655         solitary backslashes, as they tickle a bug in the HP C compiler.
13657         * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13658         comments, since they're not portable.  Use GNU coding style.
13660 2002-11-13  Akim Demaille  <akim@epita.fr>
13662         * data/yacc.c: Leave bigger chunks of quoted text.
13663         (YYDSYMPRINTF): New.
13664         Use it to report symbol activities.
13665         * data/glr.c (YYDSYMPRINTF): New.
13666         Use it.
13668 2002-11-12  Paul Eggert  <eggert@twinsun.com>
13670         Version 1.75b.
13672         * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13673         (yyglrReduce): Return yyok, not 0.
13674         This should avoid the enumerated-type warnings reported
13675         by Nelson H. F. Beebe in
13676         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13678         * lib/bbitset.h (BITSET_INLINE): Remove.
13679         * lib/bitset.h [! BITSET_INLINE]: Remove.
13680         (bitset_set, bitset_reset, bitset_test): Rename local vars
13681         to avoid shadowing warnings by GCC.
13683         * data/glr.c (inline): Remove #define.  It's the user's
13684         responsibility to #define it away, just like 'const'.
13685         This fixes one of the bugs reported by Nelson H. F. Beebe in
13686         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13688         * Makefile.maint (po-check): Scan .l and .y files instead of the
13689         .c and the .h files that they generate.  This fixes the bug
13690         reported by Tim Van Holder in:
13691         <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13692         Look for N_ as well as for _.  Try to avoid matching #define for
13693         N_ and _.
13694         * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13695         src/system.h.  Add src/parse-gram.y, src/scan-gram.l.
13696         * src/scan-gram.l: Revamp regular expressions so that " and '
13697         do not confuse xgettext.
13699         * src/struniq.h (struniq_new): Do not declare the return type
13700         to be 'const'; this violates the C standard.
13701         * src/struniq.c (struniq_new): Likewise.
13703 2002-11-12  Albert Chin-A-Young <china@thewrittenword.com>
13705         * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13706         duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13707         linker.
13709 2002-11-12  Akim Demaille  <akim@epita.fr>
13711         * Makefile.maint: Sync with Autoconf:
13712         (local_updates): New.
13714 2002-11-12  Akim Demaille  <akim@epita.fr>
13716         * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13718 2002-11-12  Akim Demaille  <akim@epita.fr>
13720         * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13721         locations.
13723 2002-11-12  Akim Demaille  <akim@epita.fr>
13725         * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13726         not yyvalue.
13728 2002-11-12  Akim Demaille  <akim@epita.fr>
13730         * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13731         Use it to test the GLR parser.
13733 2002-11-12  Akim Demaille  <akim@epita.fr>
13735         * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13736         defines it.
13737         * data/glr.c (yystos): New.
13738         (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13739         (YYDSYMPRINT): New.
13740         (yyval): Don't define it, it is handled via M4.
13741         (yyrecoverParseError): Free verbosely the discarded symbols.
13742         * data/yacc.c (yysymprint): Remove, rather...
13743         (b4_yysymprint_generate): invoke.
13744         * data/c.m4 (b4_yysymprint_generate): New.
13745         Accept pointers as arguments, as opposed to the version from
13746         yacc.c.
13747         (b4_yydestruct_generate): Likewise.
13748         * tests/cations.at (Printers and Destructors): Use Bison directives
13749         instead of CPP macros.
13750         Don't rely on internal details.
13752 2002-11-12  Akim Demaille  <akim@epita.fr>
13754         * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13755         * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13756         Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13757         it against YYEMPTY and so forth), work on yytoken (i.e., set
13758         it to YYEMPTY etc.).
13759         (yydestruct): Replace with a b4_yydestruct_generate invocation.
13760         (b4_symbol_actions): Remove.
13761         * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13762         for 0, end-of-input.
13764 2002-11-12  Akim Demaille  <akim@epita.fr>
13766         * doc/bison.texinfo (Destructor Decl): New.
13768 2002-11-12  Akim Demaille  <akim@epita.fr>
13770         * src/tables.c (tables_generate): Use free for pointers that
13771         cannot be NULL, not XFREE.
13772         (pack_vector): Use assert, not fatal, for bound violations.
13773         * src/state.c (state_new): Likewise.
13774         * src/reader.c (reader): Likewise.
13775         * src/lalr.c (set_goto_map): Likewise.
13776         * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13777         the file name.
13779 2002-11-12  Akim Demaille  <akim@epita.fr>
13781         * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13782         Restore.
13783         * src/scan-gram.l (last_string): Is global to the file, not to
13784         yylex.
13785         * src/parse-gram.y (input): Don't append the epilogue here,
13786         (epilogue.opt): do it here, and free the scanner's obstack.
13787         * src/reader.c (epilogue_set): Rename as...
13788         (epilogue_augment): this.
13789         * data/c.m4 (b4_epilogue): Defaults to empty.
13791 2002-11-12  Akim Demaille  <akim@epita.fr>
13793         * src/getargs.c (long_options): Remove duplicates.
13794         * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13795         Remove.
13796         * doc/bison.rnh: Remove.
13797         * doc/bison.texinfo (VMS Invocation): Remove.
13799 2002-11-12  Akim Demaille  <akim@epita.fr>
13801         * src/struniq.h, src/struniq.c (struniq_t): Is const.
13802         (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13804         Use struniq for symbols.
13806         * src/symtab.h (symbol_t): The tag member is a struniq.
13807         (symbol_type_set): Adjust.
13808         * src/symtab.c (symbol_new): Takes a struniq.
13809         (symbol_free): Don't free the tag member.
13810         (hash_compare_symbol_t, hash_symbol_t): Rename as...
13811         (hash_compare_symbol, hash_symbol): these.
13812         Use the fact that tags as struniqs.
13813         (symbol_get): Use struniq_new.
13814         * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13815         Returns a strniq.
13816         * src/reader.h (merger_list, grammar_currentmerge_set): The name
13817         and type members are struniqs.
13818         * src/reader.c (get_merge_function)
13819         (grammar_current_rule_merge_set): Adjust.
13820         (TYPE, current_type): Are struniq.
13822         Use struniq for file names.
13824         * src/files.h, src/files.c (infile): Split into...
13825         (grammar_file, current_file): these.
13826         * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13827         * src/reduce.c (reduce_print): Likewise.
13828         * src/getargs.c (getargs): Likewise.
13829         * src/complain.h, src/complain.c: Likewise.
13830         * src/main.c (main): Call struniqs_new early enough to use it for
13831         file names.
13832         Don't free the input file name.
13834 2002-11-12  Akim Demaille  <akim@epita.fr>
13836         * src/symtab.c (symbol_free): Remove dead deactivated code:
13837         type_name are properly removed.
13838         Don't use XFREE to free items that cannot be NULL.
13839         * src/struniq.h, src/struniq.c: New.
13840         * src/main.c (main): Initialize/free struniqs.
13841         * src/parse-gram.y (%union): Add astruniq member.
13842         (yyprint): Adjust.
13843         * src/scan-gram.l (<{tag}>): Return a struniq.
13844         Free the obstack bit that used to store it.
13845         * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13847 2002-11-11  Paul Eggert  <eggert@twinsun.com>
13849         Revamp to fix many (but not all) of the C- and M4-related quoting
13850         problems.  Among other things, this fixes the Bison bug reported
13851         by Jan Hubicka when processing the Bash grammar; see:
13852         <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13854         Use new @ escapes consistently.  Represent brackets with @{ and @}
13855         rather than @<:@ and @:>@, since this works a bit better with dumb
13856         editors like vi.  Represent @ with @@, since @ is now consistently
13857         an escape.  Use @oline@ and @ofile@ rather than __oline__ and
13858         __ofile__, to avoid unexpected expansions.  Similarly, use @output
13859         rather than #output.
13861         * data/c.m4 (b4_copyright): Omit file name from comment, since
13862         the file name could contain "*/".
13863         (b4_synclines_flag): Don't quote the 2nd argument; it should already
13864         be quoted.  All uses changed.
13866         * data/glr.c: Use new @ escapes consistently.
13867         (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13868         b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13869         Remove, since they couldn't handle arbitrary characters in file
13870         names.
13871         * data/lalr1.cc: Likewise.
13872         * data/yacc.c: Likewise.
13874         * src/files.c (output_infix): Remove; all uses removed.
13875         * src/files.h: Likewise.
13877         * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13878         mishandled funny characters in file names, and anyway it isn't
13879         needed any more.
13880         * data/yacc.c: Likewise.
13881         * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13883         * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13884         * data/yacc.c: Likewise.
13886         * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13887         strings now.
13888         (muscle_init): Quote filename as a C string.
13889         * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13890         (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13891         * src/output.c (escaped_file_name_output): New function.
13892         (prepare_symbols): Quote tokens for M4.
13893         (prepare): Don't insert output_infix, output_prefix,
13894         output_parser_name, output_header_name; this is now down by scan-skel.
13895         Insert skeleton as a C string.
13897         * src/output.c (user_actions_output, symbol_destructors_output,
13898         symbol_printers_output): Quote filenames for C and M4.
13899         * src/reader.c (prologue_augment, epilogue_set): Likewise.
13901         * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13902         escapes other than \\ and \'; this simplifies the code.
13903         (<SC_STRING>): Likewise, for \\ and \".
13904         (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13905         SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13906         Use new escapes @{ and @} for [ and ].
13908         * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13909         them with auto vars.
13910         Switch to new escape scheme, where @ is the escape character uniformly.
13911         Abort if a stray escape character is found.  Avoid unbounded input
13912         buffer when parsing non-escaped text.
13914         * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13915         __oline__, #output, $@, and @{ do not have unintended meanings.
13917 2002-11-09  Paul Eggert  <eggert@twinsun.com>
13919         Fix the test failure due to GCC warnings described in
13920         <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13921         * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13922         evaluate to 0 if it's impossible for NINF to be in the respective
13923         table.
13924         (yygetLRActions, yyrecoverParseError): Use them.
13926         * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13927         counted in the token inserted at end of file.  Now takes
13928         location_t *, not location_t, so that the location can be
13929         adjusted.  All uses changed.
13931         * tests/regression.at (Invalid inputs): Adjust wording in
13932         diagnostic to match the new behavior.
13934         * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13935         AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13936         AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13937         abort ();'.  This reduces the runtime of the "Many lookaheads"
13938         test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13939         GCC 3.2.
13941 2002-11-07  Paul Eggert  <eggert@twinsun.com>
13943         * src/parse-gram.y (CHARACTER): Remove unused token.
13944         All uses removed.
13946         * src/scan-gram.l: Remove stack option.  We no longer use the
13947         stack, since the stack was never deeper than 1; instead, use the
13948         new auto var c_context to record the stacked value.
13950         Remove nounput option.  At an unexpected end of file, we now unput
13951         the minimal input necessary to end cleanly; this simplifies the
13952         code.
13954         Avoid unbounded token sizes where this is easy.
13956         (unexpected_end_of_file): New function.
13957         Use it to systematize the error message on unexpected EOF.
13958         (last-string): Now auto, not static.
13959         (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13960         (scanner_last_string_free): Remove; not used.
13961         (percent_percent_count): Move decl to just before use.
13962         (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13963         not the (never otherwised-used) CHARACTER.
13965 2002-11-07  Akim Demaille  <akim@epita.fr>
13967         Let yyerror always receive the msg as last argument, so that
13968         yyerror can be variadic.
13970         * data/yacc.c (b4_yyerror_args): New.
13971         Use it when calling yyerror.
13972         * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13973         Use it when calling yyerror.
13974         * doc/bison.texinfo (Error Reporting): Adjust.
13975         * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13976         * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13978 2002-11-06  Akim Demaille  <akim@epita.fr>
13980         #line should have quoted strings.
13981         Ideally, this should be done by m4_quotearg.
13983         * src/scan-skel.l: Include quotearg.h.
13984         Quote __ofile__.
13985         * src/output.c (symbol_printers_output)
13986         (symbol_destructors_output): Quote the file name.
13988 2002-11-06  Akim Demaille  <akim@epita.fr>
13990         * tests/regression.at (Invalid inputs): Adjust to the recent
13991         messages.
13993 2002-11-06  Akim Demaille  <akim@epita.fr>
13995         Restore --no-lines.
13996         Reported by Jim Kent.
13998         * data/c.m4 (b4_syncline): New.
13999         * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14000         * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14001         * src/output.c (user_actions_output): Likewise.
14002         (prepare): Define 'b4_synclines_flag'.
14003         * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14005 2002-11-06  Akim Demaille  <akim@epita.fr>
14007         * src/main.c (main): Free `infile'.
14008         * src/scan-gram.l (handle_syncline): New.
14009         Recognize `#line'.
14010         * src/output.c (user_actions_output, symbol_destructors_output)
14011         (symbol_printers_output): Use the location's file name, not
14012         infile.
14013         * src/reader.c (prologue_augment, epilogue_set): Likewise.
14015 2002-11-05  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
14017         * src/tables.c (matching_state): Don't allow states to match if
14018         either has GLR conflict entries.
14020 2002-11-05  Paul Eggert  <eggert@twinsun.com>
14022         * src/scan-gram.l: Use more accurate diagnostics, e.g.
14023         "integer out of range" rather than "invalid value".
14024         * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14025         accordingly.
14027         Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14028         Also, remove one static variable in the scanner.
14030         * src/scan-gram.l (braces_level): Now auto, not static.
14031         Initialize to zero if the compiler is being picky.
14032         (INITIAL): Clear braces_level instead of incrementing it.
14033         (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14034         as POSIX 1003.1-2001 requires.
14035         * src/system.h (IF_LINT): New macro, taken from coreutils.
14036         * configure.ac: Define "lint" if --enable-gcc-warnings.
14038 2002-11-05  Akim Demaille  <akim@epita.fr>
14040         * src/scan-gram.l: When it starts with `%', complain about the
14041         whole directive, not just that `invalid character: %'.
14043 2002-11-04  Akim Demaille  <akim@epita.fr>
14045         * Makefile.maint: Update from Autoconf.
14046         (update, cvs-update, po-update, do-po-update): New.
14048 2002-11-04  Akim Demaille  <akim@epita.fr>
14050         * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14051         and yyerror.
14052         Have yyerror `use' its arguments.
14053         * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14054         returns true when location & yacc & pure & parse-param.
14055         (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14057 2002-11-04  Akim Demaille  <akim@epita.fr>
14059         * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14060         clashes.
14061         * src/scan-gram.l: Use [\'] instead of ['] to pacify
14062         font-lock-mode.
14063         Use complain_at.
14064         Use quote, not quote_n since LOCATION_PRINT no longer uses the
14065         slot 0.
14067 2002-11-03  Paul Eggert  <eggert@twinsun.com>
14069         * src/reader.c (get_merge_function, grammar_current_rule_check):
14070         Use consistent diagnostics for reporting type name clashes.
14071         Quote the types with <>, for consistency with Yacc.
14072         * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14074 2002-11-03  Akim Demaille  <akim@epita.fr>
14076         * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14077         New.
14078         * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14079         (b4_parse_param): Remove.
14080         Use b4_identification.
14081         Propagate b4_pure_args where needed to pass them to yyerror.
14082         * data/glr.m4 (b4_parse_param): Remove.
14083         (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14084         (b4_lpure_formals): New.
14085         Use b4_identification.
14086         (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14087         b4_user_formals and b4_user_args.
14088         (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14089         (yyreportAmbiguity): When using a pure parser, also need
14090         the location, and the parse-params.
14091         Adjust callers.
14092         (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14093         When using a pure parser, also need the parse-params.
14094         Adjust callers.
14095         * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14096         (%pure-parser + %parse-param) LALR and GLR parsers.
14097         (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14098         AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14099         AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14100         (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14101         (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14102         * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14103         * doc/bison.texinfo: Untabify the whole file.
14104         (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14105         (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14106         (Error Reporting): Adjust to these new directives.
14107         Document %error-verbose, deprecate YYERROR_VERBOSE.
14109 2002-11-03  Akim Demaille  <akim@epita.fr>
14111         * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14112         AT_CHECK_CALC_GLR invocations to use % directives, instead of
14113         command line options.
14114         * tests/cxx-type.at: Formatting changes.
14116 2002-11-03  Paul Eggert  <eggert@twinsun.com>
14118         * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14119         to count columns correctly, and to check for invalid inputs.
14121         Use mbsnwidth to count columns correctly.  Account for tabs, too.
14122         Include mbswidth.h.
14123         (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14124         (extend_location): New function.
14125         (YY_LINES): Remove.
14127         Handle CRLF in C code rather than in Lex code.
14128         (YY_INPUT): New macro.
14129         (no_cr_read): New function.
14131         Scan UCNs, even though we don't fully handle them yet.
14132         (convert_ucn_to_byte): New function.
14134         Handle backslash-newline correctly in C code.
14135         (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14136         (eols, blanks): Remove.  YY_USER_ACTION now counts newlines etc.;
14137         all uses changed.
14138         (tag, splice): New EREs.  Do not allow NUL or newline in tags.
14139         Use {splice} wherever C allows backslash-newline.
14140         YY_STEP after space, newline, vertical-tab.
14141         ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14143         (letter, id): Don't assume ASCII; e.g., spell out a-z.
14145         ({int}, handle_action_dollar, handle_action_at): Check for integer
14146         overflow.
14148         (YY_STEP): Omit trailing semicolon, so that it's more like C.
14150         (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14151         as well as \000.  Check for UCHAR_MAX, not 255.
14152         Allow \x with an arbitrary positive number of digits, as in C.
14153         Check for overflow here.
14154         Allow \? and UCNs, for compatibility with C.
14156         (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14157         with quote slot used by complain_at.
14159         * tests/input.at: Add tests for backslash-newline, m4 quotes
14160         in symbols, long literals, and funny escapes in strings.
14162         * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14163         * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14164         * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14165         * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14166         * m4/mbswidth.m4: New file, from GNU coreutils.
14168         * doc/bison.texinfo (Grammar Outline): Document // comments.
14169         (Symbols): Document that trigraphs have no special meaning in Bison,
14170         nor is backslash-newline allowed.
14171         (Actions): Document that trigraphs have no special meaning.
14173         * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14174         no longer used.
14176 2002-11-02  Paul Eggert  <eggert@twinsun.com>
14178         * src/reader.c: Don't include quote.h; not needed.
14179         (get_merge_function): Reword warning to be consistent with
14180         type clash diagnostic in grammar_current_rule_check.
14182         * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14183         bug in trigraph handling.
14185         * src/output.c (prepare_symbols): When printing token names,
14186         escape "[" as "@<:@" and likewise for "]".
14188         * src/system.h (errno): Remove declaration, as we are now
14189         assuming C89 or better, and C89 guarantees errno.
14191 2002-10-30  Paul Eggert  <eggert@twinsun.com>
14193         * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14194         Check for close failures.
14195         * src/files.h (xfclose): Return void, not int, since it always
14196         returned zero.
14197         * src/files.c (xfclose): Likewise.  Report I/O error if ferror
14198         indicates one.
14199         * src/output.c (output_skeleton): Use xfclose rather than fclose
14200         and ferror.  xfclose now checks ferror.
14202         * data/glr.c (YYLEFTMOST_STATE): Remove.
14203         (yyreportTree): Use a stack-based leftmost state.  This avoids
14204         our continuing battles with bogus warnings about initializers.
14206 2002-10-30  Akim Demaille  <akim@epita.fr>
14208         * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14209         #if.
14211 2002-10-29  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
14213         * tests/glr-regr1.at: New test for reported regressions.
14214         * tests/testsuite.at: Add glr-regr1.at test.
14215         * tests/Makefile.am: Add glr-regr1.at test.
14217 2002-10-24  Paul Eggert  <eggert@twinsun.com>
14219         Version 1.75a.
14221         * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14222         * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14223         we use malloc.  Don't assume 'A' through 'Z' are contiguous.
14224         Don't assume strdup exists; POSIX says its an XSI extension.
14225         Check for buffer overflow on input.
14227 2002-10-24  Akim Demaille  <akim@epita.fr>
14229         * src/output.c (output_skeleton): Don't disable M4sugar comments
14230         too soon: it results in comments being expanded.
14231         * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14232         first output.
14234 2002-10-24  Akim Demaille  <akim@epita.fr>
14236         * data/yacc.c (m4_int_type): New.
14237         * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14238         char' as only yacc.c wants K&R portability.
14239         * data/glr.c (yysigned_char): Remove.
14240         * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14241         Reported by Quoc Peyrot.
14243 2002-10-23  Paul Eggert  <eggert@twinsun.com>
14245         * src/main.c (main): With --trace=time, report times even if a
14246         non-fatal error occurs.  Formerly, the times were reported in some
14247         such cases but not in others.
14248         * src/reader.c (reader): Just return if a complaint has been issued,
14249         instead of exiting, so that 'main' can report times.
14251 2002-10-22  Akim Demaille  <akim@epita.fr>
14253         * src/system.h: Include sys/types.
14254         Reported by Bert Deknuydt.
14256 2002-10-23  Paul Eggert  <eggert@twinsun.com>
14258         * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14259         Suggested by Art Haas.
14261 2002-10-22  Paul Eggert  <eggert@twinsun.com>
14263         * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14264         decl; not needed any more.
14265         * src/main.c (main): Use return to exit, undoing yesterday's change.
14266         The last OS that we could find where this wouldn't work is
14267         SunOS 3.5, and that's too old to worry about now.
14269         * data/glr.c (struct yyltype): Define members even when not
14270         doing locations.  This is more consistent with yacc.c, and it
14271         works around the following bug reports:
14272         http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14273         http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14275         * doc/bison.texinfo: Minor spelling and typographical fixes.  Use
14276         @acronym consistently.  Standardize on "Yacc" instead of "YACC",
14277         "Algol" instead of "ALGOL".  Give a bit more history about BNF.
14279 2002-10-22  Akim Demaille  <akim@epita.fr>
14281         * data/README: New.
14283 2002-10-21  Paul Eggert  <eggert@twinsun.com>
14285         Be consistent about 'bool'; the old code used an enum in one
14286         module and an int in another, and this violates the C standard.
14287         * m4/stdbool.m4: New file, from coreutils 4.5.3.
14288         * configure.ac (AC_HEADER_STDBOOL): Add.
14289         * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14290         * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14291         * src/symtab.c (hash_compare_symbol_t): Likewise.
14292         * src/system.h (bool, false, true): Use a definition consistent
14293         with ../lib/hash.c.  All uses changed.
14295         * src/complain.c (warning_issued): Renamed from warn_message_count,
14296         so that we needn't worry about integer overflow (!).
14297         Now of type bool.  All uses changed.
14298         (complaint_issued): Renamed from complain_message_count; likewise.
14300         * src/main.c (main): Use exit to exit with failure.
14302         * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14303         rather than 1 and 0.
14304         * src/main.c (main): Likewise.
14305         * src/getargs.c (getargs): Likewise.
14306         * src/reader.c (reader): Likewise.
14308         * src/getarg.c (getargs): Remove duplicate code for
14309         "Try `bison --help'".
14311         * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14312         What was that "2" for?
14314         * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14315         * src/getargs.c (usage): Likewise.
14317         * src/getargs.c (getargs): When there are too few operands, report
14318         the last one.  When there are too many, report the first extra
14319         one.  This is how diffutils does it.
14321 2002-10-20  Paul Eggert  <eggert@twinsun.com>
14323         Remove K&R vestiges.
14324         * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14325         * src/complain.c (VA_START): Remove.  Assume prototypes.
14326         (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14327         (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14328         fatal): Assume prototypes.
14329         * src/complain.h: Assume prototypes.
14330         * src/system.h (PARAMS): Remove.
14331         Include <limits.h> unconditionally, since it's guaranteeed even
14332         for a freestanding C89 compiler.
14333         (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14334         * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14336 2002-10-20  Akim Demaille  <akim@epita.fr>
14338         * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14339         * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14340         (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14341         (yyresolveStates, yyresolveAction, yyresolveStack)
14342         (yyprocessOneStack): Use them.
14343         (yy_reduce_print): New.
14344         * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14346 2002-10-20  Akim Demaille  <akim@epita.fr>
14348         * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14349         arguments and output `void'.
14350         (b4_c_function): Rename as...
14351         (b4_c_function_def): this.
14352         (b4_c_function_decl, b4_c_ansi_function_def)
14353         (b4_c_ansi_function_decl): New.
14354         Change the interpretation of the arguments: before `int, foo', now
14355         `int foo, foo'.
14356         * data/yacc.c (yyparse): Prototype and define thanks to these.
14357         Adjust b4_c_function_def uses.
14358         * data/glr.c (yyparse): Likewise, but ANSI only.
14360 2002-10-20  Akim Demaille  <akim@epita.fr>
14362         * src/output.c (prepare): Move the definition of `tokens_number',
14363         `nterms_number', `undef_token_number', `user_token_number_max'
14364         to...
14365         (prepare_tokens): Here.
14366         (prepare_tokens): Rename as...
14367         (prepare_symbols): this.
14368         (prepare): Move the definition of `rules_number' to...
14369         (prepare_rules): here.
14370         (prepare): Move the definition of `last', `final_state_number',
14371         `states_number' to...
14372         (prepare_states): here.
14373         * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14375 2002-10-20  Akim Demaille  <akim@epita.fr>
14377         * src/tables.h, src/tables.c, src/output.c: Comment changes.
14379 2002-10-20  Akim Demaille  <akim@epita.fr>
14381         * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14382         * data/c.m4: here.
14384 2002-10-20  Akim Demaille  <akim@epita.fr>
14386         * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14387         * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14388         `pair'.
14389         (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14390         `name' to...
14391         * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14392         (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14393         These.
14395 2002-10-19  Paul Eggert  <eggert@twinsun.com>
14397         Do not create a temporary file, as that involves security and
14398         cleanup headaches.  Instead, use a pair of pipes.
14399         Derived from a suggestion by Florian Krohm.
14400         * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14401         * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14402         * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14403         (BISON_PREREQ_SUBPIPE): Add.
14404         * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14405         Add subpipe.h, subpipe.c.
14406         * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4.  Add subpipe.m4.
14407         * po/POTFILES.in: Add lib/subpipe.c.
14408         * src/output.c: Include "subpipe.h".
14409         (m4_invoke): Remove decl.
14410         (scan_skel): New decl.
14411         (output_skeleton): Use pipe rather than temporary file for m4 input.
14412         Check that m4sugar.m4 is readable, to avoid deadlock.
14413         Check for pipe I/O error.
14414         * src/scan-skel.l (readpipe): Remove decl.
14415         (scan_skel): New function, to be used in place of m4_invoke.
14416         Read from stream rather than file.
14418         * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14419         float, as this generates a warning on Solaris 8 + GCC 3.2 with
14420         --enable-gcc-warnings.  Instead, divide into 1.0 rather than 1;
14421         this generates a more-accurate value anyway.
14423         * lib/timevar.c (timervar_accumulate): Rename locals to
14424         avoid confusion with similarly-named more-global.
14425         * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14427         * src/output.c (prepare): Use xstrdup to convert char const *
14428         to char *, to avoid GCC warning.
14430 2002-10-19  Akim Demaille  <akim@epita.fr>
14432         * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14433         LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14434         Use them to have `calc.y' ready for %pure-parser.
14435         * data/yacc.c (YYLEX): Pass a yylex return type to
14436         b4_c_function_call.
14438 2002-10-19  Akim Demaille  <akim@epita.fr>
14440         Prototype support of %lex-param and %parse-param.
14442         * src/parse-gram.y: Add the definition of the %lex-param and
14443         %parse-param tokens, plus their rules.
14444         Drop the `_' version of %glr-parser.
14445         Add the "," token.
14446         * src/scan-gram.l (INITIAL): Scan them.
14447         * src/muscle_tab.c: Comment changes.
14448         (muscle_insert, muscle_find): Rename `pair' as `probe'.
14449         * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14450         (muscle_entry_s): The `value' member is no longer const.
14451         Adjust all dependencies.
14452         * src/muscle_tab.c (muscle_init): Adjust: use
14453         MUSCLE_INSERT_STRING.
14454         Initialize the obstack earlier.
14455         * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14456         (muscle_pair_list_grow): New.
14457         * data/c.m4 (b4_c_function_call, b4_c_args): New.
14458         * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14459         * tests/calc.at: Use %locations, not --locations.
14460         (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14462 2002-10-19  Akim Demaille  <akim@epita.fr>
14464         * src/getargs.c (usage): Take status as argument and exit
14465         accordingly.
14466         Report the traditional `Try ... --help' message when status != 0.
14467         (usage, version): Don't take a FILE * as arg, it is pointless.
14468         (getargs): When there is an incorrect number of arguments, make it
14469         an error, and report it GNUlically thanks to `usage ()'.
14471 2002-10-18  Paul Eggert  <eggert@twinsun.com>
14473         * data/glr.c (yyreportParseError): Don't assume that sprintf
14474         yields the length of the printed string, as this is not true
14475         on SunOS 4.1.4.  Reported by Peter Klein.
14477         * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14478         * tests/conflicts.at (%nonassoc and eof): Likewise.
14479         Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14481 2002-10-17  Akim Demaille  <akim@epita.fr>
14483         * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14484         * src/getargs.c (trace_types, trace_args): Adjust.
14485         * src/reader.c (grammar_current_rule_prec_set)
14486         (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14487         Standardize error messages.
14488         And s/@prec/%prec/!
14489         (reader): Use trace_flag to enable scanner/parser debugging,
14490         instead of an adhoc scheme.
14491         * src/scan-gram.l: Remove trailing debugging code.
14493 2002-10-16  Paul Eggert  <eggert@twinsun.com>
14495         * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14496         MUSCLE_TAB_H.
14498         * NEWS: Officially drop support for building Bison with K&R C,
14499         since it didn't work anyway and it's not worth worrying about.
14500         * Makefile.maint (wget_files): Remove ansi2knr.c.
14501         (ansi2knr.c-url_prefix): Remove.
14502         * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14503         * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14504         * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14506 2002-10-15  Paul Eggert  <eggert@twinsun.com>
14508         Stop using the "enum_" trick for K&R-style function definitions;
14509         it confused me, and I was the author!  Instead, assume that people
14510         who want to use K&R C compilers (when using these modules in GCC,
14511         perhaps?) will run ansi2knr.
14513         * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14514         All uses of "enum_" changed to "enum ".
14515         * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14516         * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14518         * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14519         abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14520         abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14521         abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14522         abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14523         abitset_not, abitset_ones, abitset_or, abitset_or_and,
14524         abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14525         abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14526         abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14527         Use function prototypes; this removes the need for declaring
14528         static functions simply to provide their prototypes.
14529         * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14530         bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14531         bitset_count_, bitset_create, bitset_dump, bitset_first,
14532         bitset_free, bitset_init, bitset_last, bitset_next,
14533         bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14534         bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14535         bitset_print, bitset_release_memory, bitset_toggle_,
14536         bitset_type_choose, bitset_type_get, bitset_type_name_get,
14537         debug_bitset): Likewise.
14538         * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14539         * lib/bitset_stats.c (bitset_log_histogram_print,
14540         bitset_percent_histogram_print, bitset_stats_and,
14541         bitset_stats_and_cmp, bitset_stats_and_or,
14542         bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14543         bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14544         bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14545         bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14546         bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14547         bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14548         bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14549         bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14550         bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14551         bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14552         bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14553         bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14554         bitset_stats_zero): Likewise.
14555         * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14556         bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14557         bitsetv_dump, debug_bitsetv): Likewise.
14558         * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14559         ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14560         ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14561         ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14562         ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14563         ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14564         ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14565         ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14566         ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14567         ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14568         ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14569         Likewise.
14570         * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14571         lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14572         lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14573         lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14574         lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14575         lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14576         lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14577         lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14578         lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14579         lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14580         lbitset_xor_cmp, lbitset_zero): Likewise.
14582 2002-10-14  Akim Demaille  <akim@epita.fr>
14584         Version 1.75.
14586 2002-10-14  Akim Demaille  <akim@epita.fr>
14588         * tests/Makefile.am (maintainer-check-posix): New.
14590 2002-10-14  Akim Demaille  <akim@epita.fr>
14592         * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14593         member.
14595 2002-10-14  Akim Demaille  <akim@epita.fr>
14597         * src/tables.c (table_ninf_remap): base -> tab.
14598         Reported by Matt Rosing.
14600 2002-10-14  Paul Eggert  <eggert@twinsun.com>
14602         * tests/action.at, tests/calc.at, tests/conflicts.at,
14603         tests/cxx-type.at, tests/headers.at, tests/input.at,
14604         tests/regression.at, tests/synclines.at, tests/torture.at:
14605         Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14606         so that the tests still work even if POSIXLY_CORRECT is set.
14607         * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14609         * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14610         for portability to K&R hosts.  Fix typo: signed char is guaranteed
14611         only to 127, not to 128.
14612         * data/glr.c (yysigned_char): New type.
14613         * data/yacc.c (yysigned_char): Likewise.
14614         * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14616 2002-10-13  Paul Eggert  <eggert@twinsun.com>
14618         * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14619         true due to limited range of data type" warning from GCC.
14621         * data/c.m4 (b4_token_defines): Protect against double-inclusion
14622         by wrapping enum yytokentype's definition inside #ifndef
14623         YYTOKENTYPE.  This undoes a bug I introduced on 2002-10-12.
14625 2002-10-13  Akim Demaille  <akim@epita.fr>
14627         * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14628         Un yy- yyrhs to avoid the name clash with the global YYRHS.
14630 2002-10-13  Akim Demaille  <akim@epita.fr>
14632         * Makefile.maint: Update from Autoconf 2.54.
14633         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14635 2002-10-13  Akim Demaille  <akim@epita.fr>
14637         * src/print.c (print_state): Separate the list of solved conflicts
14638         from the other items.
14639         * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14641 2002-10-13  Akim Demaille  <akim@epita.fr>
14643         Let nondeterministic skeletons be usable with deterministic
14644         tables.
14646         With the patch, GAWK compiled by GCC without -O2 passes its test
14647         suite using a GLR parser driven by LALR tables.  It fails with -O2
14648         because `struct stat' gives two different answers on my machine:
14649         88 (definition of an auto var) and later 96 (memset on this var).
14650         Hence the stack is badly corrumpted.  The headers inclusion is to
14651         blame: if I move the awk.h inclusion before GLR's system header
14652         inclusion, the two struct stat have the same size.
14654         * src/tables.c (pack_table): Always create conflict_table.
14655         (token_actions): Always create conflict_list.
14656         * data/glr.c (YYFLAG): Remove, unused.
14658 2002-10-13  Akim Demaille  <akim@epita.fr>
14660         * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14661         (O0FLAGS): New.
14662         (VALGRIND, GXX): New.
14663         * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14664         * tests/bison.in: Run $PREBISON a pre-command.
14665         * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14666         (maintainer-check-g++): New.
14667         * Makefile.am (maintainer-check): New.
14669 2002-10-13  Akim Demaille  <akim@epita.fr>
14671         * data/glr.c: Formatting changes.
14672         Tweak some trace messages to match yacc.c's.
14674 2002-10-13  Akim Demaille  <akim@epita.fr>
14676         GLR parsers sometimes raise parse errors instead of performing the
14677         default reduction.
14678         Reported by Charles-Henry de Boysson.
14680         * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14681         check the length of the traces when %glr.
14682         (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14683         GLR's traces.
14684         (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14685         Test GLR parsers.
14686         * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14687         (yyltype): Remove the yy prefix from the member names.
14688         (yytable): Complete its comment.
14689         (yygetLRActions): Map error action number from YYTABLE from
14690         YYTABLE_NINF to 0.
14691         (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14692         (which was a bug: it should have been YYTABEL_NINF, and yet it was
14693         not satisfying as we could compare an YYACTION computed from
14694         YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14695         only value for error actions.
14696         (yyreportParseError): In verbose parse error messages, don't issue
14697         `error' in the list of expected tokens.
14698         * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14699         next action to perform to match glr.c's decoding.
14700         (yytable): Complete its comment.
14702 2002-10-13  Paul Eggert  <eggert@twinsun.com>
14704         Fix problem reported by Henrik Grubbstroem in
14705         <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14706         "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14707         because the Bison parser reads the second action before reducing
14708         the first one.
14709         * src/scan-gram.l (rule_length): New static var.
14710         Use it to keep track of the rule length in the scanner, since
14711         we can't expect the parser to be in lock-step sync with the scanner.
14712         (handle_action_dollar, handle_action_at): Use this var.
14713         * tests/actions.at (Exotic Dollars): Test for the problem.
14715 2002-10-12  Paul Eggert  <eggert@twinsun.com>
14717         * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14718         * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14719         Include <sys/time.h> when checking for clock_t and struct tms.
14720         Use same include order as source.
14721         This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14722         <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14724         * lib/timevar.c: Update copyright date and clarify comments.
14725         (get_time) [IN_GCC]: Keep the GCC version for reference.
14727         * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14728         GCC version as of today, then merge Bison's changes.
14729         Change "GCC" to "Bison" in copyright notice.  timevar.def's
14730         author is Akim, so change that too.
14732         * src/reader.c (grammar_current_rule_check):
14733         Don't worry about the default action if $$ is untyped.
14734         Prevents bogus warnings reported by Jim Gifford in
14735         <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14737         * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14738         * data/glr.c, data/lalr1.cc, data/yacc.c:
14739         Output token definitions before the first part of user declarations.
14740         Fixes compatibility problem reported by Jim Gifford for kbd in
14741         <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14743 2002-10-11  Paul Eggert  <eggert@twinsun.com>
14745         * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14746         (yyparse): here.  This undoes some of the 2002-07-25 change.
14747         Compatibility problem reported by Ralf S. Engelschall with
14748         OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14750 2002-10-11  Akim Demaille  <akim@epita.fr>
14752         * tests/regression.at Characters Escapes): New.
14753         * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14754         characters.
14755         Reported by Jan Nieuwenhuizen.
14757 2002-10-11  Akim Demaille  <akim@epita.fr>
14759         * po/id.po: New.
14761 2002-10-10  Paul Eggert  <eggert@twinsun.com>
14763         Portability fixes for bitsets; this also avoids several GCC
14764         warnings.
14766         * lib/abitset.c: Include <stddef.h>, for offsetof.
14767         * lib/lbitset.c: Likewise.
14769         * lib/abitset.c (abitset_bytes): Return a size that is aligned
14770         properly for vectors of objects.  Do not assume that adding a
14771         header size to a multiple of a word size yields a value that is
14772         properly aligned for the whole union.
14773         * lib/bitsetv.c (bitsetv_alloc): Likewise.
14775         * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14776         unique names for structures.
14777         * lib/ebitset.c (ebitset_bytes): Likewise.
14778         * lib/lbitset.c (lbitset_bytes): Likewise.
14780         * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14781         abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14782         abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14783         abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14784         abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14785         abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14786         abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14787         to improve the type-checking that GCC can do.
14788         * lib/bitset.c (bitset_op4_cmp): Likewise.
14789         * lib/bitset_stats.c (bitset_stats_count,
14790         bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14791         bitset_stats_copy, bitset_stats_disjoint_p,
14792         bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14793         bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14794         bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14795         bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14796         bitset_stats_and_or_cmp, bitset_stats_andn_or,
14797         bitset_stats_andn_or_cmp, bitset_stats_or_and,
14798         bitset_stats_or_and_cmp): Likewise.
14799         * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14800         lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14801         lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14802         lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14804         * lib/abitset.h: Include bitset.h, not bbitset.h.
14805         * lib/ebitset.h: Likewise.
14806         * lib/lbitset.h: Likewise.
14808         * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14809         All instances of parameters of type enum bitset_opts are now of
14810         type enum_bitset_opts, to conform to the C Standard, and similarly
14811         for enum_bitset_type.
14812         * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14813         * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14815         Do not use "struct bitset_struct" to mean different things in
14816         different modules.  Not only is this confusing, it violates
14817         the C Standard, which requires that structure types in different
14818         modules must be compatible if one is to be passed to the other.
14819         * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14820         All instances of "struct bitset_struct *" replaced with "bitset".
14821         * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14822         (union bitset_union, struct abitset_struct, struct ebitset_struct,
14823         struct lbitset_struct, struct bitset_stats_struct): New types.
14824         All uses of struct bitset_struct changed to union bitset_union,
14825         etc.
14826         * lib/abitset.c (struct abitset_struct, abitset,
14827         struct bitset_struct): Remove.
14828         * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14829         struct bitset_struct): Remove.
14830         * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14831         bitset_struct): Remove.
14832         * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14833         Likewise.
14835         Do not call a function of type T using a call that assumes the
14836         function is of a different type U.  Standard C requires that a
14837         function must be called with a type that is compatible with its
14838         definition.
14839         * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14840         New decls.
14841         * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14842         New functions.
14843         * lib/ebitset.c (PFV): Remove.
14844         * lib/lbitset.c (PFV): Likewise.
14845         * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14846         ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14847         decls.
14848         (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14849         (ebitset_vtable): Use them.
14850         * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14851         lbitset_xor): New functions.
14852         (lbitset_vtable): Use them.
14854         * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14855         Declare.
14857         * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14858         GCC warning.
14859         * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14860         Use offsetof, for simplicity.
14862 2002-10-06  Paul Eggert  <eggert@twinsun.com>
14864         * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14865         the same width as int.  This reapplies a hunk of the 2002-08-12 patch
14866         <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14867         which was inadvertently undone by the 2002-09-30 patch.
14868         * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14869         the same width as int.
14871 2002-10-04  Paul Eggert  <eggert@twinsun.com>
14873         Version 1.50.
14875         * configure.ac (AC_INIT), NEWS: Increment version number.
14877         * doc/bison.texinfo: Minor spelling, grammar, and white space
14878         fixes.
14879         (Symbols): Mention that any negative value returned from yylex
14880         signifies end-of-input.  Warn about negative chars.  Mention
14881         the portable Standard C character set.
14883         The GNU coding standard says CFLAGS and YFLAGS are reserved
14884         for the installer to set.
14885         * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14886         * src/Makefile.am (AM_CFLAGS): Likewise.
14887         (AM_YFLAGS): Renamed from YFLAGS.
14889         Fix some MAX and MIN problems.
14890         * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14891         * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14892         * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14893         * src/reader.c (reader): Use it.
14895         * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14896         POSIX 1003.1-2001 has removed fgrep.
14898 2002-10-04  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
14900         * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14901         interpreted as signed.
14902         * lib/ebitset.c (ebitset_list): Fix bug.
14904 2002-10-01  Paul Eggert  <eggert@twinsun.com>
14906         More fixes for 64-bit hosts and large bitsets.
14908         * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14909         abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14910         Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14911         * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14912         struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14913         bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14914         bitset_count_): Likewise.
14915         * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14916         bitset_first, bitset_last): Likewise.
14917         * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14918         bitset_stats_list_reverse, bitset_stats_size,
14919         bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14920         Likewise.
14921         * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14922         * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14923         bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14924         bitsetv_reflexive_transitive_closure): Likewise.
14925         * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14926         * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14927         Likewise.
14928         * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14929         Likewise.
14931         * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14932         Use size_t, not unsigned int, to count bytes.
14933         * lib/abitset.h (abitset_bytes): Likewise.
14934         * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14935         Likewise.
14936         * lib/bitset.h (bitset_bytes): Likewise.
14937         * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14938         * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14939         * lib/bitsetv.c (bitsetv_alloc): Likewise.
14940         * lib/ebitset.c (ebitset_bytes): Likewise.
14941         * lib/ebitset.h (ebitset_bytes): Likewise.
14942         * lib/lbitset.c (lbitset_bytes): Likewise.
14943         * lib/lbitset.h (lbitset_bytes): Likewise.
14945         * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14946         abitset_subset_p, abitset_disjoint_p, abitset_and,
14947         abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14948         abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14949         abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14950         abitset_or_and, abitset_or_and_cmp):
14951         Use bitset_windex instead of unsigned int.
14952         * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14953         * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14954         ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14955         ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14956         Likewise.
14957         * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14959         * lib/bitset.c (bitset_print):
14960         Use proper printf formats for widths of integer types.
14961         * lib/bitset_stats.c (bitset_percent_histogram_print,
14962         bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14963         * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14964         * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14965         * lib/lbitset.c (lbitset_bytes): Likewise.
14967         * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14968         BITSET_SIZE_MAX): New macros.
14969         (BITSET_INDEX_MAX): Remove.  It wasn't right, since it assumed that
14970         sizeof (bitset_word) == sizeof (bitset_windex).  All uses changed
14971         to BITSET_WINDEX_MAX.
14973         * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14974         bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14975         since we now return the bitset_bindex type (not int).
14977         * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14978         when computing sizes.
14979         * lib/ebitset.c (ebitset_elts_grow): Likewise.
14981         * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14982         and avoid cast to unsigned.
14984 2002-09-30  Akim Demaille  <akim@epita.fr>
14986         * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14987         * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14988         Updates from Michael Hayes.
14990 2002-09-30  Art Haas  <ahaas@neosoft.com>
14992         * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14993         invocations.
14994         * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14995         defined.
14997 2002-09-27  Akim Demaille  <akim@epita.fr>
14999         Version 1.49c.
15001 2002-09-27  Akim Demaille  <akim@epita.fr>
15003         * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15004         (Because of AC_LIBSOURCE).
15006 2002-09-27  Akim Demaille  <akim@epita.fr>
15008         Playing with Autoscan.
15010         * configure.ac: Remove the old LIBOBJ tweaks.
15011         (AC_REPLACE_FUNCS): Add strrchr and strtol.
15012         * lib/strrchr.c: New.
15013         * lib/strtol.c: New, from the Coreutils 4.5.1.
15015 2002-09-27  Akim Demaille  <akim@epita.fr>
15017         Playing with Autoscan.
15019         * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15020         * lib/Makefile.am (libbison_a_SOURCES): No longer include
15021         argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15022         * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15023         Coreutils 4.5.1.
15025 2002-09-24  Akim Demaille  <akim@epita.fr>
15027         * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15028         (Frequently Asked Questions, Parser Stack Overflow): New.
15030 2002-09-13  Akim Demaille  <akim@epita.fr>
15032         Playing with autoscan.
15034         * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15035         * src/files.c (skeleton_find): Remove, unused.
15036         * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15037         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15039 2002-09-13  Akim Demaille  <akim@epita.fr>
15041         * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15042         * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15044 2002-09-13  Akim Demaille  <akim@epita.fr>
15046         * configure.ac: Require 2.54.
15047         s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15048         s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15049         * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15050         Remove, provided by Autoconf macros.
15052 2002-09-12  Akim Demaille  <akim@epita.fr>
15054         * m4/prereq.m4: Update, from Coreutils 4.5.1.
15056 2002-09-12  Akim Demaille  <akim@epita.fr>
15058         * m4/prereq.m4: Update, from Fileutils 4.1.5.
15059         * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15060         Reported by Martin Mokrejs.
15062 2002-09-10  Akim Demaille  <akim@epita.fr>
15064         * src/parse-gram.y: Associate a human readable string to each
15065         token type.
15066         * tests/regression.at (Invalid inputs): Adjust.
15068 2002-09-10  Gary V. Vaughan  <gary@gnu.org>
15070         * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15071         with an Autoconf-2.5x style configure.ac.
15073 2002-09-06  Paul Eggert  <eggert@twinsun.com>
15075         * doc/bison.texinfo (Conditions): Make explicit that the GPL
15076         exception applies only to yacc.c.  This is a modification of a
15077         patch originally suggested by Akim Demaille.
15079 2002-09-06  Akim Demaille  <akim@epita.fr>
15081         * data/c.m4 (b4_copyright): Move the GPL exception comment from
15082         here to...
15083         * data/yacc.c: here.
15085         * data/lalr1.cc (struct yyltype): Don't define it, since we use
15086         LocationType.
15087         (b4_ltype): Default to yy::Location from location.hh.
15089 2002-09-04  Jim Meyering  <jim@meyering.net>
15091         * data/yacc.c: Guard the declaration of yytoknum also with
15092         `#ifdef YYPRINT', so it is declared only when used.
15094 2002-09-04  Akim Demaille  <akim@epita.fr>
15096         * configure.in: Rename as...
15097         * configure.ac: this.
15098         Bump to 1.49c.
15100 2002-09-04  Akim Demaille  <akim@epita.fr>
15102         * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15103         * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15104         translate maintainer only messages.
15106 2002-08-12  Paul Eggert  <eggert@twinsun.com>
15108         Version 1.49b.
15110         * Makefile.am (SUBDIRS): Remove intl.
15111         (DISTCLEANFILES): Remove.
15112         * NEWS: Mention that GNU M4 is now required.  Clarify what is
15113         meant by "larger grammars".  Mention the pt_BR translation.
15114         * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15115         (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15116         Bump version from 0.11.2 to 0.11.5.
15117         (BISON_PREREQ_STAGE): Remove.
15118         (AM_GNU_GETTEXT): Use external gettext.
15119         (AC_OUTPUT): Remove intl/Makefile.
15121         * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15123         * data/glr.c: Include string.h, for strlen.
15124         (yyreportParseError): Use size_t for yysize.
15125         (yy_yypstack): No longer nested inside yypstates, as nested
15126         functions are not portable.  Do not assume size_t is the
15127         same width as int.
15128         (yypstates): Do not assume that ptrdiff_t is the same width
15129         as int, and similarly for yyposn and YYINDEX.
15131         * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15133         * lib/Makefile.am (INCLUDES): Do not include from the intl
15134         directory, which has been removed.
15135         * src/Makefile.am (INCLUDES): Likewise.
15137         * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15138         (bitsets_sources, additional_bitsets_sources, timevars_sources):
15139         New vars.
15141         * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15142         * tests/Makefile.am (EXTRA_DIST): Likewise.
15144         * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15145         Do not assume that bitset_windex is the same width as unsigned.
15147         * lib/abitset.c (abitset_unused_clear): Do not assume that
15148         bitset_word is the same width as int.
15149         * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15150         * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15151         * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15152         * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15153         * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15155         * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15156         portability to one's complement hosts!).
15157         * lib/ebitset.c (ebitset_op1): Likewise.
15158         * lib/lbitset.c (lbitset_op1): Likewise.
15160         * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15161         * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15162         lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15163         Sync with fileutils.
15164         * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15165         lib/gettext.h: Sync with diffutils.
15167         * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15168         lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15170         * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15171         PROTOTYPES to check for prototypes, and "defined __STDC__" to
15172         check for void *.
15174         * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15175         size_t; the old version tried to do this but casted improperly.
15176         (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15177         (bitset_test): Now returns int, not unsigned long.
15179         * lib/bitset_stats.c: Include "gettext.h".
15180         (_): New macro.
15181         (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15182         name locals "index", as it generates unnecessary warnings on some
15183         hosts that have an "index" function.
15185         * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15186         bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15187         they need translation.
15188         * src/LR0.c (state_list_append, new_itemsets, get_state,
15189         append_states, generate_states): Likewise.
15190         * src/assoc.c (assoc_to_string): Likewise.
15191         * src/closure.c (print_closure, set_firsts, closure): Likewise.
15192         * src/gram.c (grammar_dump): Likewise.
15193         * src/injections.c (injections_compute): Likewise.
15194         * src/lalr.c (lookaheads_print): Likewise.
15195         * src/relation.c (relation_transpose): Likewise.
15196         * src/scan-gram.l: Likewise.
15197         * src/tables.c (table_grow, pack_vector): Likewise.
15199         * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15200         glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15201         * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15202         * m4/mbstate_t.m4: Sync with fileutils.
15203         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15205         * po/LINGUAS: Add pt_BR.
15206         * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15207         src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15208         lib/timevar.c.
15209         Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15210         manual recommends.
15211         Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15213         * src/complain.c (strerror_r): Remove decl; not needed.
15214         (strerror): Use same pattern as ../lib/error.c.
15216         * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15218         * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15220         * src/main.c (main): Cast result of bindtextdomain and textdomain
15221         to void, to avoid a GCC warning when --disable-nls is in effect.
15223         * src/scan-gram.l: Use strings rather than escapes when possible,
15224         to minimize the number of warnings from xgettext.
15225         (handle_action_dollar, handle_action_at): Don't use isdigit,
15226         as it mishandles negative chars and it may not work as expected
15227         outside the C locale.
15229         * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15230         this is a GCC extension and is not portable to other compilers.
15232         * src/system.h (alloca): Use same pattern as ../lib/error.c.
15233         Do not include <ctype.h>; no longer needed.
15234         Do not include <malloc.h>; no longer needed (and generates
15235         warnings on OpenBSD 3.0).
15237         * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15238         it's not portable.
15240         * tests/regression.at: Do not use 'cc -c input.c -o input';
15241         Sun C rejects this.  Instead, use 'cc -c input.c -o input.o'.
15243         * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15244         exit status as failure, not just exit status 1.  Sun C exits
15245         with status 2 sometimes.
15247         * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15248         Use it for the two large tests.
15250 2002-08-02  Akim Demaille  <akim@epita.fr>
15252         * src/conflicts.c (conflicts_output): Don't output rules never
15253         reduced here, since anyway that computation doesn't work.
15254         * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15255         (rule_useless_p, rule_never_reduced_p): New.
15256         (grammar_rules_partial_print): Use a filter instead of a range.
15257         Display the title only if needed.
15258         (grammar_rules_print): Adjust.
15259         (grammar_rules_never_reduced_report): New.
15260         * src/tables.c (action_row): Move the computation of rules never
15261         reduced to...
15262         (token_actions): here.
15263         * src/main.c (main): Make the parser before making the report, so
15264         that rules never reduced are computed.
15265         Call grammar_rules_never_reduced_report.
15266         * src/print.c (print_results): Report rules never reduced.
15267         * tests/conflicts.at, tests/reduce.at: Adjust.
15269 2002-08-01  Akim Demaille  <akim@epita.fr>
15271         Instead of attaching lookaheads and duplicating the rules being
15272         reduced by a state, attach the lookaheads to the reductions.
15274         * src/state.h (state_t): Remove the `lookaheads',
15275         `lookaheads_rule' member.
15276         (reductions_t): Add a `lookaheads' member.
15277         Use a regular array for the `rules'.
15278         * src/state.c (reductions_new): Initialize the lookaheads member
15279         to 0.
15280         (state_rule_lookaheads_print): Adjust.
15281         * src/state.h, src/state.c (state_reductions_find): New.
15282         * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15283         (count_rr_conflicts): Adjust.
15284         * src/lalr.c (LArule): Remove.
15285         (add_lookback_edge): Adjust.
15286         (state_lookaheads_count): New.
15287         (states_lookaheads_initialize): Merge into...
15288         (initialize_LA): this.
15289         (lalr_free): Adjust.
15290         * src/main.c (main): Don't free nullable and derives too early: it
15291         is used by --verbose.
15292         * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15294 2002-08-01  Akim Demaille  <akim@epita.fr>
15296         * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15297         `rule_number_t**'.
15298         (set_derives, free_derives): Rename as...
15299         (derives_compute, derives_free): this.
15300         Adjust all dependencies.
15301         * src/nullable.c (set_nullable, free_nullable): Rename as...
15302         (nullable_compute, nullable_free): these.
15303         (rule_list_t): Store rule_t *, not rule_number_t.
15304         * src/state.c (state_rule_lookaheads_print): Directly compare rule
15305         pointers, instead of their numbers.
15306         * src/main.c (main): Call nullable_free, and derives_free earlier,
15307         as they were lo longer used.
15309 2002-08-01  Akim Demaille  <akim@epita.fr>
15311         * lib/timevar.c (get_time): Include children time.
15312         * src/lalr.h (LA, LArule): Don't export them: used with the
15313         state_t.
15314         * src/lalr.c (LA, LArule): Static.
15315         * src/lalr.h, src/lalr.c (lalr_free): New.
15316         * src/main.c (main): Call it.
15317         * src/tables.c (pack_vector): Check whether loc is >= to the
15318         table_size, not >.
15319         (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15320         (tables_generate): do it, since that's also it which allocates
15321         them.
15322         Don't free LA and LArule, main does.
15324 2002-07-31  Akim Demaille  <akim@epita.fr>
15326         Separate parser tables computation and output.
15328         * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15329         (conflict_list, conflict_list_cnt, table, check, table_ninf)
15330         (yydefgoto, yydefact, high): Move to...
15331         * src/tables.h, src/tables.c: here.
15332         * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15333         (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15334         (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15335         (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15336         (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15337         (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15338         (action_row, save_row, token_actions, save_column, default_goto)
15339         (goto_actions, sort_actions, matching_state, pack_vector)
15340         (table_ninf_remap, pack_table, prepare_actions): Move to...
15341         * src/tables.c: here.
15342         * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15343         * src/output.c (token_actions, output_base, output_conflicts)
15344         (output_check): Merge into...
15345         (prepare_actions): this.
15346         (actions_output): Rename as...
15347         (user_actions_output): this.
15348         * src/main.c (main): Call tables_generate and tables_free.
15350 2002-07-31  Akim Demaille  <akim@epita.fr>
15352         Steal GCC's --time-report support.
15354         * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15355         stolen/adjusted from GCC.
15356         * m4/stage.m4: Remove time related checks.
15357         * m4/timevar.m4: New.
15358         * configure.in: Adjust.
15359         * src/system.h: Adjust to using timevar.h.
15360         * src/getargs.h, src/getargs.c: Support trace_time for
15361         --trace=time.
15362         * src/main.c (stage): Remove.
15363         (main): Replace `stage' invocations with timevar calls.
15364         * src/output.c: Insert pertinent timevar calls.
15366 2002-07-31  Akim Demaille  <akim@epita.fr>
15368         Let --trace have arguments.
15370         * src/getargs.h (enum trace_e): New.
15371         * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15372         (long_options, short_options): --trace/-T takes an optional
15373         argument.
15374         Change all the uses of trace_flag to reflect the new flags.
15375         * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15377         Strengthen `stage' portability.
15379         * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15380         * configure.in: Use it.
15381         Don't check for malloc.h and sys/times.h.
15382         * src/system.h: Include them when appropriate.
15383         * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15384         times and struct tms are available.
15386 2002-07-30  Akim Demaille  <akim@epita.fr>
15388         In verbose parse error message, don't report `error' as an
15389         expected token.
15390         * tests/actions.at (Printers and Destructors): Adjust.
15391         * tests/calc.at (Calculator $1): Adjust.
15392         * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15393         error message, do not report the parser accepts the error token in
15394         that state.
15396 2002-07-30  Akim Demaille  <akim@epita.fr>
15398         Normalize conflict related messages.
15400         * src/complain.h, src/complain.c (warn, complain): New.
15401         * src/conflicts.c (conflicts_print): Use them.
15402         (conflict_report_yacc): New, extracted from...
15403         (conflicts_print): here.
15404         * tests/conflicts.at, tests/existing.at: Adjust.
15406 2002-07-30  Akim Demaille  <akim@epita.fr>
15408         Report rules which are never reduced by the parser: those hidden
15409         by conflicts.
15411         * src/LR0.c (save_reductions): Don't make the final state too
15412         different: save its reduction (accept) instead of having a state
15413         without any action (no shift or goto, no reduce).
15414         Note: the final state is now a ``regular'' state, i.e., the
15415         parsers now contain `reduce 0' as default reduction.
15416         Nevertheless, since they decide to `accept' when yystate =
15417         final_state, they still will not reduce rule 0.
15418         * src/print.c (print_actions, print_reduction): Adjust.
15419         * src/output.c (action_row): Track reduced rules.
15420         (token_actions): Report rules never reduced.
15421         * tests/conflicts.at, tests/regression.at: Adjust.
15423 2002-07-30  Akim Demaille  <akim@epita.fr>
15425         `stage' was accidently included in a previous patch.
15426         Initiate its autoconfiscation.
15428         * configure.in: Look for malloc.h and sys/times.h.
15429         * src/main.c (stage): Adjust.
15430         Report only when trace_flag.
15432 2002-07-29  Akim Demaille  <akim@epita.fr>
15434         * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15435         state_number_t.
15436         (errs_t): symbol_t*, not symbol_number_t.
15437         (reductions_t): rule_t*, not rule_number_t.
15438         (FOR_EACH_SHIFT): New.
15439         * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15440         * src/print.c, src/print_graph.c: Adjust.
15442 2002-07-29  Akim Demaille  <akim@epita.fr>
15444         Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15446         * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15447         (endtoken, accept): these.
15448         * src/reader.c (reader): Set endtoken's default tag to "$end".
15449         Set undeftoken's tag to "$undefined" instead of "$undefined.".
15450         * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15451         Adjust.
15453 2002-07-29  Akim Demaille  <akim@epita.fr>
15455         * src/reduce.c (reduce_grammar): When the language is empty,
15456         complain about the start symbol, not the axiom.
15457         Use its location.
15458         * tests/reduce.at (Empty Language): New.
15460 2002-07-26  Akim Demaille  <akim@epita.fr>
15462         * src/reader.h, src/reader.c (gram_error): ... can't get
15463         yycontrol without making too strong assumptions on the parser
15464         itself.
15465         * src/output.c (prepare_tokens): Use the real 0th value of
15466         token_translations instead of `0'.
15467         * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15468         visible here.
15469         * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15470         for the time being: %locations ought to provide it to yyerror.
15472 2002-07-25  Akim Demaille  <akim@epita.fr>
15474         * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15475         * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15476         * tests/regression.at (Web2c Actions): Adjust.
15478 2002-07-25  Akim Demaille  <akim@epita.fr>
15480         Stop storing rules from 1 to nrules + 1.
15482         * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15483         * src/nullable.c, src/output.c, src/print.c, src/reader.c
15484         * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15485         Iterate from 0 to nrules.
15486         Use rule_number_as_item_number and item_number_as_rule_number.
15487         Adjust to `derive' now containing possibly 0.
15488         * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15489         Handle the `- 1' part in rule numbers from/to item numbers.
15490         * src/conflicts.c (log_resolution): Fix the message which reversed
15491         shift and reduce.
15492         * src/output.c (action_row): Initialize default_rule to -1.
15493         (token_actions): Adjust.
15494         * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15495         expected output.
15496         * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15498 2002-07-25  Akim Demaille  <akim@epita.fr>
15500         * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15501         (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15502         (b4_c_knr_arg_decl): New.
15503         * data/yacc.c: Use it to define yysymprint, yydestruct, and
15504         yyreport_parse_error.
15506 2002-07-25  Akim Demaille  <akim@epita.fr>
15508         * data/yacc.c (yyreport_parse_error): New, extracted from...
15509         (yyparse): here.
15510         (yydestruct, yysymprint): Move above yyparse.
15511         Be K&R compliant.
15513 2002-07-25  Akim Demaille  <akim@epita.fr>
15515         * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15516         replace...
15517         (b4_sint_type, b4_uint_type): these.
15518         * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15519         * tests/regression.at (Web2c Actions): Adjust.
15521 2002-07-25  Akim Demaille  <akim@epita.fr>
15523         * src/gram.h (TIEM_NUMBER_MAX): New.
15524         (item_number_of_rule_number, rule_number_of_item_number): Rename
15525         as...
15526         (rule_number_as_item_number, item_number_as_rule_number): these.
15527         Adjust dependencies.
15528         * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15529         (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15530         (symbol_number_to_vector_number): New.
15531         (order): Of vector_number_t* type.
15532         (base_t, BASE_MAX, BASE_MIN): New.
15533         (froms, tos, width, pos, check): Of base_t type.
15534         (action_number_t, ACTION_MIN, ACTION_MAX): New.
15535         (actrow): Of action_number_t type.
15536         (conflrow): Of unsigned int type.
15537         (table_ninf, base_ninf): New.
15538         (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15539         (muscle_insert_int_table, muscle_insert_base_table)
15540         (muscle_insert_rule_number_table): New.
15541         (prepare_tokens): Output `toknum' as int_table.
15542         (action_row): Returns a rule_number_t.
15543         Use ACTION_MIN, not SHRT_MIN.
15544         (token_actions): yydefact is rule_number_t*.
15545         (table_ninf_remap): New.
15546         (pack_table): Use it for `base' and `table'.
15547         * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15548         replaced with...
15549         (YYPACT_NINF, YYTABLE_NINF): these.
15550         (yypact, yytable): Compute their types instead of hard-coded
15551         `short'.
15552         * tests/regression.at (Web2c Actions): Adjust.
15554 2002-07-19  Akim Demaille  <akim@epita.fr>
15556         * src/scan-gram.l (id): Can start with an underscore.
15558 2002-07-16  Akim Demaille  <akim@epita.fr>
15560         * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15561         Adjust all former `associativity' dependencies.
15562         * src/symtab.c (symbol_new): Default associativity is `undef', not
15563         `right'.
15564         (symbol_check_alias_consistence): Adjust.
15566 2002-07-09  Akim Demaille  <akim@epita.fr>
15568         * doc/bison.texinfo: Properly set the ``header'' part.
15569         Use @dircategory ``GNU programming tools'' as per Texinfo's
15570         documentation.
15571         Use @copying.
15573 2002-07-09  Akim Demaille  <akim@epita.fr>
15575         * lib/quotearg.h: Protect against multiple inclusions.
15576         * src/location.h (location_t): Add a `file' member.
15577         (LOCATION_RESET, LOCATION_PRINT): Adjust.
15578         * src/complain.c (warn_at, complain_at, fatal_at): Drop
15579         `error_one_per_line' support.
15581 2002-07-09  Akim Demaille  <akim@epita.fr>
15583         * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15584         * src/reader.c (lineno): Remove.
15585         Adjust all dependencies.
15586         (get_merge_function): Take a location and use complain_at.
15587         * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15588         * tests/regression.at (Invalid inputs, Mixing %token styles):
15589         Adjust.
15591 2002-07-09  Akim Demaille  <akim@epita.fr>
15593         * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15594         recovery rule, and forbid extensions when --yacc.
15595         (gram_error): Use complain_at.
15596         * src/reader.c (reader): Exit if there were parse errors.
15598 2002-07-09  Akim Demaille  <akim@epita.fr>
15600         * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15601         (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15602         Reported by R Blake <blakers@mac.com>.
15604 2002-07-09  Akim Demaille  <akim@epita.fr>
15606         * data/yacc.c: Output the copyright notive in the header.
15608 2002-07-03  Akim Demaille  <akim@epita.fr>
15610         * src/output.c (froms, tos): Are state_number_t.
15611         (save_column): sp, sp1, and sp2 are state_number_t.
15612         (prepare): Rename `final' as `final_state_number', `nnts' as
15613         `nterms_number', `nrules' as `rules_number', `nstates' as
15614         `states_number', and `ntokens' as `tokens_number'.  Remove `nsym',
15615         unused.
15616         * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15617         * data/lalr1.cc (nsym_): Remove, unused.
15619 2002-07-03  Akim Demaille  <akim@epita.fr>
15621         * src/lalr.h, src/lalr.c (goto_number_t): New.
15622         * src/lalr.c (goto_list_t): New.
15623         Propagate them.
15624         * src/nullable.c (rule_list_t): New.
15625         Propagate.
15626         * src/types.h: Remove.
15628 2002-07-03  Akim Demaille  <akim@epita.fr>
15630         * src/closure.c (print_fderives): Use rule_rhs_print.
15631         * src/derives.c (print_derives): Use rule_rhs_print.
15632         (rule_list_t): New, replaces `shorts'.
15633         (set_derives): Add comments.
15634         * tests/sets.at (Nullable, Firsts): Adjust.
15636 2002-07-03  Akim Demaille  <akim@epita.fr>
15638         * src/output.c (prepare_actions): Free `tally' and `width'.
15639         (prepare_actions): Allocate and free `order'.
15640         * src/symtab.c (symbols_free): Free `symbols'.
15641         * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15642         * src/output.c (m4_invoke): Move to...
15643         * src/scan-skel.l: here.
15644         (<<EOF>>): Close yyout, and free its name.
15646 2002-07-03  Akim Demaille  <akim@epita.fr>
15648         Fix some memory leaks, and fix a bug: state 0 was examined twice.
15650         * src/LR0.c (new_state): Merge into...
15651         (state_list_append): this.
15652         (new_states): Merge into...
15653         (generate_states): here.
15654         (set_states): Don't ensure a proper `errs' state member here, do it...
15655         * src/conflicts.c (conflicts_solve): here.
15656         * src/state.h, src/state.c: Comment changes.
15657         (state_t): Rename member `shifts' as `transitions'.
15658         Adjust all dependencies.
15659         (errs_new): For consistency, also take the values as argument.
15660         (errs_dup): Remove.
15661         (state_errs_set): New.
15662         (state_reductions_set, state_transitions_set): Assert that no
15663         previous value was assigned.
15664         (state_free): New.
15665         (states_free): Use it.
15666         * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15667         temporary storage: use `errs' and `nerrs' as elsewhere.
15668         (set_conflicts): Allocate and free this `errs'.
15670 2002-07-02  Akim Demaille  <akim@epita.fr>
15672         * lib/libiberty.h: New.
15673         * lib: Update the bitset implementation from upstream.
15674         * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15675         * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15676         * src/main.c: Adjust bitset stats calls.
15678 2002-07-01  Paul Eggert  <eggert@twinsun.com>
15680         * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15681         char, so that negative chars don't collide with $.
15683 2002-06-30  Akim Demaille  <akim@epita.fr>
15685         Have the GLR tests be `warning' checked, and fix the warnings.
15687         * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15688         (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15689         (yyremoveDeletes): `yyi' and `yyj' are size_t.
15690         Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15691         (yyaddDeferredAction): static.
15692         (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15693         (yyreportParseError): yyprefix is const.
15694         yytokenp is used only when verbose.
15695         (yy__GNUC__): Replace with __GNUC__.
15696         (yypdumpstack): yyi is size_t.
15697         (yypreference): Un-yy local variables and arguments, to avoid
15698         clashes with `yyr1'.  Anyway, we are not in the user name space.
15699         (yytname_size): be an int, as is compared with ints.
15700         * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15701         Use them.
15702         * tests/cxx-gram.at: Use quotation to protect $1.
15703         Use AT_COMPILE to enable warnings hunts.
15704         Prototype yylex and yyerror.
15705         `Use' argc.
15706         Include `string.h', not `strings.h'.
15707         Produce and prototype stmtMerge only when used.
15708         yylex takes a location.
15710 2002-06-30  Akim Demaille  <akim@epita.fr>
15712         We spend a lot of time in quotearg, in particular when --verbose.
15714         * src/symtab.c (symbol_get): Store a quoted version of the key.
15715         (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15716         Adjust all callers.
15718 2002-06-30  Akim Demaille  <akim@epita.fr>
15720         * src/state.h (reductions_t): Rename member `nreds' as num.
15721         (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15722         * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15724 2002-06-30  Akim Demaille  <akim@epita.fr>
15726         * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15727         (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15728         (shifts_to): Rename as...
15729         (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15730         (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15731         (TRANSITION_IS_DISABLED, transitions_to): these.
15733 2002-06-30  Akim Demaille  <akim@epita.fr>
15735         * src/print.c (print_shifts, print_gotos): Merge into...
15736         (print_transitions): this.
15737         (print_transitions, print_errs, print_reductions): Align the
15738         lookaheads columns.
15739         (print_core, print_transitions, print_errs, print_state,
15740         print_grammar): Output empty lines separator before, not after.
15741         (state_default_rule_compute): Rename as...
15742         (state_default_rule): this.
15743         * tests/conflicts.at (Defaulted Conflicted Reduction),
15744         (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15745         * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15747 2002-06-30  Akim Demaille  <akim@epita.fr>
15749         Display items as we display rules.
15751         * src/gram.h, src/gram.c (rule_lhs_print): New.
15752         * src/gram.c (grammar_rules_partial_print): Use it.
15753         * src/print.c (print_core): Likewise.
15754         * tests/conflicts.at (Defaulted Conflicted Reduction),
15755         (Unresolved SR Conflicts): Adjust.
15756         (Unresolved SR Conflicts): Adjust and rename as...
15757         (Resolved SR Conflicts): this, as was meant.
15758         * tests/regression.at (Web2c Report): Adjust.
15760 2002-06-30  Akim Demaille  <akim@epita.fr>
15762         * src/print.c (state_default_rule_compute): New, extracted from...
15763         (print_reductions): here.
15764         Pessimize, but clarify the code.
15765         * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15767 2002-06-30  Akim Demaille  <akim@epita.fr>
15769         * src/output.c (action_row): Let default_rule be always a rule
15770         number.
15772 2002-06-30  Akim Demaille  <akim@epita.fr>
15774         * src/closure.c (print_firsts, print_fderives, closure):
15775         Use BITSET_EXECUTE.
15776         * src/lalr.c (lookaheads_print): Likewise.
15777         * src/state.c (state_rule_lookaheads_print): Likewise.
15778         * src/print_graph.c (print_core): Likewise.
15779         * src/print.c (print_reductions): Likewise.
15780         * src/output.c (action_row): Likewise.
15781         Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15783 2002-06-30  Akim Demaille  <akim@epita.fr>
15785         * src/print_graph.c: Use report_flag.
15787 2002-06-30  Akim Demaille  <akim@epita.fr>
15789         * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15790         to...
15791         * src/relation.h, src/relation.c (traverse, relation_digraph)
15792         (relation_print, relation_transpose): New.
15794 2002-06-30  Akim Demaille  <akim@epita.fr>
15796         * src/state.h, src/state.c (shifts_to): New.
15797         * src/lalr.c (build_relations): Use it.
15799 2002-06-30  Akim Demaille  <akim@epita.fr>
15801         * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15802         (item_number_of_rule_number, rule_number_of_item_number): New.
15803         * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15804         * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15805         * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15806         Propagate their use.
15807         Much remains to be done, in particular wrt `shorts' from types.h.
15809 2002-06-30  Akim Demaille  <akim@epita.fr>
15811         * src/symtab.c (symbol_new): Initialize the `printer' member.
15813 2002-06-30  Akim Demaille  <akim@epita.fr>
15815         * src/LR0.c (save_reductions): Remove, replaced by...
15816         * src/state.h, src/state.c (state_reductions_set): New.
15817         (reductions, errs): Rename as...
15818         (reductions_t, errs_t): these.
15819         Adjust all dependencies.
15821 2002-06-30  Akim Demaille  <akim@epita.fr>
15823         * src/LR0.c (state_list_t, state_list_append): New.
15824         (first_state, last_state): Now symbol_list_t.
15825         (this_state): Remove.
15826         (new_itemsets, append_states, save_reductions): Take a state_t as
15827         argument.
15828         (set_states, generate_states): Adjust.
15829         (save_shifts): Remove, replaced by...
15830         * src/state.h, src/state.c (state_shifts_set): New.
15831         (shifts): Rename as...
15832         (shifts_t): this.
15833         Adjust all dependencies.
15834         * src/state.h (state_t): Remove the `next' member.
15836 2002-06-30  Akim Demaille  <akim@epita.fr>
15838         * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15839         escaped in slot 0.
15841 2002-06-30  Akim Demaille  <akim@epita.fr>
15843         Use hash.h for the state hash table.
15845         * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15846         (allocate_storage): Use state_hash_new.
15847         (free_storage): Use state_hash_free.
15848         (new_state, get_state): Adjust.
15849         * src/lalr.h, src/lalr.c (states): Move to...
15850         * src/states.h (state_t): Remove the `link' member, no longer
15851         used.
15852         * src/states.h, src/states.c: here.
15853         (state_hash_new, state_hash_free, state_hash_lookup)
15854         (state_hash_insert, states_free): New.
15855         * src/states.c (state_table, state_compare, state_hash): New.
15856         * src/output.c (output_actions): Do not free states now, since we
15857         still need to know the final_state number in `prepare', called
15858         afterwards.  Do it...
15859         * src/main.c (main): here: call states_free after `output'.
15861 2002-06-30  Akim Demaille  <akim@epita.fr>
15863         * src/state.h, src/state.c (state_new): New, extracted from...
15864         * src/LR0.c (new_state): here.
15865         * src/state.h (STATE_ALLOC): Move to...
15866         * src/state.c: here.
15867         * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15868         * src/state.h, src/state.c: here.
15870 2002-06-30  Akim Demaille  <akim@epita.fr>
15872         * src/reader.c (gensym): Rename as...
15873         * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15874         (getsym): Rename as...
15875         (symbol_get): this.
15877 2002-06-30  Akim Demaille  <akim@epita.fr>
15879         * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15880         * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15881         * src/output.c, src/print.c, src/print_graph.c: Propagate.
15882         * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15884 2002-06-30  Akim Demaille  <akim@epita.fr>
15886         Make the test suite pass with warnings checked.
15888         * tests/actions.at (Printers and Destructors): Improve.
15889         Avoid unsigned vs. signed issues.
15890         * tests/calc.at: Don't exercise the scanner here, do it...
15891         * tests/input.at (Torturing the Scanner): here.
15893 2002-06-28  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
15895         * data/glr.c: Correct typo in Emacs-mode directive.  Slightly
15896         reorganize first lines parallel to yacc.c.
15898 2002-06-28  Akim Demaille  <akim@epita.fr>
15900         * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15901         (b4_token_enum, b4_token_defines): New, factored from...
15902         * data/lalr1.cc, data/yacc.c, glr.c: here.
15904 2002-06-28  Akim Demaille  <akim@epita.fr>
15906         * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15907         unused variables.
15908         * src/output.c (merger_output): static.
15910 2002-06-28  Akim Demaille  <akim@epita.fr>
15912         * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15913         * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15914         pacify GCC.
15915         * src/output.c (save_row): Initialize all the variables to pacify GCC.
15917 2002-06-27  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
15919         Accumulated changelog for new GLR parsing features.
15921         * src/conflicts.c (count_total_conflicts): Change name to
15922         conflicts_total_count.
15923         * src/conflicts.h: Ditto.
15924         * src/output.c (token_actions): Use the new name.
15925         (output_conflicts): Change conflp => conflict_list_heads, and
15926         confl => conflict_list for better readability.
15927         * data/glr.c: Use the new names.
15928         * NEWS: Add self to GLR announcement.
15930         * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15932         * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15933         Akim Demaille.
15935         * data/bison.glr: Change name to glr.c
15936         * data/glr.c: Renamed from bison.glr.
15937         * data/Makefile.am: Add glr.c
15939         * src/getargs.c:
15941         * src/symlist.h:  Add dprec and merger fields to symbol_list_s.
15942         * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15944         Originally 2002-06-16  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
15946         * data/bison.glr: Be sure to restore the
15947         current #line when returning to the skeleton contents after having
15948         exposed the input file's #line.
15950         Originally 2002-06-13  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
15952         * data/bison.glr: Bring up to date with changes to bison.simple.
15954         Originally 2002-06-03  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
15956         * data/bison.glr: Correct definitions that use b4_prefix.
15957         Various reformatting.
15958         (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15959         (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15960         yytokenp argument; now part of stack.
15961         (yychar): Define to behave as documented.
15962         (yyclearin): Ditto.
15964         Originally 2002-05-14  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
15966         * src/reader.h: Add declaration for free_merger_functions.
15968         * src/reader.c (merge_functions): New variable.
15969         (get_merge_function): New function.
15970         (free_merger_functions): New function.
15971         (readgram): Check for %prec that is not followed by a symbol.
15972         Handle %dprec and %merge declarations.
15973         (packgram): Initialize dprec and merger fields in rules array.
15975         * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15976         conflict_list_cnt, conflict_list_free): New variables.
15977         (table_grow): Also grow conflict_table.
15978         (prepare_rules): Output dprec and merger tables.
15979         (conflict_row): New function.
15980         (action_row): Output conflict lists for GLR parser.  Don't use
15981         default reduction in conflicted states for GLR parser so that there
15982         are spaces for the conflict lists.
15983         (save_row): Also save conflict information.
15984         (token_actions): Allocate conflict list.
15985         (merger_output): New function.
15986         (pack_vector): Pack conflict table, too.
15987         (output_conflicts): New function to output yyconflp and yyconfl.
15988         (output_check): Allocate conflict_tos.
15989         (output_actions): Output conflict tables, also.
15990         (output_skeleton): Output b4_mergers definition.
15991         (prepare): Output b4_max_rhs_length definition.
15992         Use 'bison.glr' as default skeleton for GLR parsers.
15994         * src/gram.c (glr_parser): New flag.
15995         (grammar_free): Call free_merger_functions.
15997         * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15998         all pairs of conflicting reductions, rather than just all tokens
15999         causing conflicts.  Needed to size conflict tables.
16000         (conflicts_output): Modify call to count_rr_conflicts for new
16001         interface.
16002         (conflicts_print): Ditto.
16003         (count_total_conflicts): New function.
16005         * src/reader.h (merger_list): New type.
16006         (merge_functions): New variable.
16008         * src/lex.h (tok_dprec, tok_merge): New token types.
16010         * src/gram.h (rule_s): Add dprec and merger fields.
16011         (glr_parser): New flag.
16013         * src/conflicts.h (count_total_conflicts): New function.
16015         * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16017         * doc/bison.texinfo (Generalized LR Parsing): New section.
16018         (GLR Parsers): New section.
16019         (Language and Grammar): Mention GLR parsing.
16020         (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16021         Correct typo ("tge" -> "the").
16023         * data/bison.glr: New skeleton for GLR parsing.
16025         * tests/cxx-gram.at: New tests for GLR parsing.
16027         * tests/testsuite.at: Include cxx-gram.at.
16029         * tests/Makefile.am: Add cxx-gram.at.
16031         * src/parse-gram.y:
16033         * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16035         * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16037 2002-06-27  Akim Demaille  <akim@epita.fr>
16039         * src/options.h, src/options.c: Remove.
16040         * src/getargs.c (short_options, long_options): New.
16042 2002-06-27  Akim Demaille  <akim@epita.fr>
16044         * data/bison.simple, data/bison.c++: Rename as...
16045         * data/yacc.c, data/lalr1.cc: these.
16046         * doc/bison.texinfo (Environment Variables): Remove.
16048 2002-06-25  Raja R Harinath  <harinath@cs.umn.edu>
16050         * src/getargs.c (report_argmatch): Initialize strtok().
16052 2002-06-20  Akim Demaille  <akim@epita.fr>
16054         * data/bison.simple (b4_symbol_actions): New, replaces...
16055         (b4_symbol_destructor, b4_symbol_printer): these.
16056         (yysymprint): Be sure to call YYPRINT only for tokens, and using
16057         user token numbers.
16059 2002-06-20  Akim Demaille  <akim@epita.fr>
16061         * data/bison.simple (yydestructor): Rename as...
16062         (yydestruct): this.
16064 2002-06-20  Akim Demaille  <akim@epita.fr>
16066         * src/symtab.h, src/symtab.c (symbol_type_set)
16067         (symbol_destructor_set, symbol_precedence_set): The location is
16068         the last argument.
16069         Adjust all callers.
16071 2002-06-20  Akim Demaille  <akim@epita.fr>
16073         * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16074         internals.
16075         * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16076         Takes a location.
16077         * src/symtab.h, src/symtab.c (symbol_class_set)
16078         (symbol_user_token_number_set): Likewise.
16079         Adjust all callers.
16080         Promote complain_at.
16081         * tests/input.at (Type Clashes): Adjust.
16083 2002-06-20  Akim Demaille  <akim@epita.fr>
16085         * data/bison.simple (YYLEX): Fix the declaration when
16086         %pure-parser.
16088 2002-06-20  Akim Demaille  <akim@epita.fr>
16090         * data/bison.simple (yysymprint): Don't print the token number,
16091         just its name.
16092         * tests/actions.at (Destructors): Rename as...
16093         (Printers and Destructors): this.
16094         Also exercise %printer.
16096 2002-06-20  Akim Demaille  <akim@epita.fr>
16098         * data/bison.simple (YYDSYMPRINT): New.
16099         Use it to remove many of the #if YYDEBUG/if (yydebug).
16101 2002-06-20  Akim Demaille  <akim@epita.fr>
16103         * src/symtab.h, src/symtab.c (symbol_t): printer and
16104         printer_location are new members.
16105         (symbol_printer_set): New.
16106         * src/parse-gram.y (PERCENT_PRINTER): New token.
16107         Handle its associated rule.
16108         * src/scan-gram.l: Adjust.
16109         (handle_destructor_at, handle_destructor_dollar): Rename as...
16110         (handle_symbol_code_at, handle_symbol_code_dollar): these.
16111         * src/output.c (symbol_printers_output): New.
16112         (output_skeleton): Call it.
16113         * data/bison.simple (yysymprint): New.  Cannot be named yyprint
16114         since there are already many grammar files with a user `yyprint'.
16115         Replace the calls to YYPRINT to calls to yysymprint.
16116         * tests/calc.at: Adjust.
16117         * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16118         taking advantage of parser very internal details (stack size!).
16120 2002-06-20  Akim Demaille  <akim@epita.fr>
16122         * src/scan-gram.l: Complete the scanner with the missing patterns
16123         to pacify Flex.
16124         Use `quote' and `symbol_tag_get' where appropriate.
16126 2002-06-19  Akim Demaille  <akim@epita.fr>
16128         * tests/actions.at (Destructors): Augment to test locations.
16129         * data/bison.simple (yydestructor): Pass it the current location
16130         if locations are enabled.
16131         Prototype only when __STDC__ or C++.
16132         Change the argument names to move into the yy name space: there is
16133         user code here.
16135 2002-06-19  Akim Demaille  <akim@epita.fr>
16137         * data/bison.simple (b4_pure_if): New.
16138         Use it instead of #ifdef YYPURE.
16140 2002-06-19  Akim Demaille  <akim@epita.fr>
16142         * data/bison.simple (b4_location_if): New.
16143         Use it instead of #ifdef YYLSP_NEEDED.
16145 2002-06-19  Akim Demaille  <akim@epita.fr>
16147         Prepare @$ in %destructor, but currently don't bind it in the
16148         skeleton, as %location use is not cleaned up yet.
16150         * src/scan-gram.l (handle_dollar, handle_destructor_at)
16151         (handle_action_at): New.
16152         (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16153         a braced_code_t and a location as additional arguments.
16154         (handle_destructor_dollar): Instead of requiring `b4_eval', just
16155         unquote one when outputting `b4_dollar_dollar'.
16156         Adjust callers.
16157         * data/bison.simple (b4_eval): Remove.
16158         (b4_symbol_destructor): Adjust.
16159         * tests/input.at (Invalid @n): Adjust.
16161 2002-06-19  Zack Weinberg  <zack@codesourcery.com>
16163         * doc/bison.texinfo: Document ability to have multiple
16164         prologue sections.
16166 2002-06-18  Akim Demaille  <akim@epita.fr>
16168         * src/files.c (compute_base_names): When computing the output file
16169         names from the input file name, strip the directory part.
16171 2002-06-18  Akim Demaille  <akim@epita.fr>
16173         * data/bison.simple.new: Comment changes.
16174         Reported by Andreas Schwab.
16176 2002-06-18  Matt Kraai  <kraai@alumni.cmu.edu>
16178         * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16179         there are no `label `yyoverflowlab' defined but not used' warnings
16180         when yyoverflow is defined.
16182 2002-06-18  Akim Demaille  <akim@epita.fr>
16184         * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16185         new member.
16186         (symbol_destructor_set): Adjust.
16187         * src/output.c (symbol_destructors_output): Output the destructor
16188         locations.
16189         Output the symbol name.
16190         * data/bison.simple (b4_symbol_destructor): Adjust.
16192 2002-06-18  Cris Bailiff  <c.bailiff@awayweb.com>
16193         and Akim Demaille  <akim@epita.fr>
16195         * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16196         what's left on the stack when the error recovery hits EOF.
16197         * tests/actions.at (Destructors): Complete to exercise this case.
16199 2002-06-17  Akim Demaille  <akim@epita.fr>
16201         * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16202         arguments is really empty, not only equal to `[]'.
16203         * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16204         member.
16205         (symbol_destructor_set): New.
16206         * src/output.c (symbol_destructors_output): New.
16207         * src/reader.h (brace_code_t, current_braced_code): New.
16208         * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16209         (handle_dollar): Rename as...
16210         (handle_action_dollar): this.
16211         (handle_destructor_dollar): New.
16212         * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16213         (grammar_declaration): Use it.
16214         * data/bison.simple (yystos): Is always defined.
16215         (yydestructor): New.
16216         * tests/actions.at (Destructors): New.
16217         * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16219 2002-06-17  Akim Demaille  <akim@epita.fr>
16221         * src/symlist.h, src/symlist.c (symbol_list_length): New.
16222         * src/scan-gram.l (handle_dollar, handle_at): Compute the
16223         rule_length only when needed.
16224         * src/output.c (actions_output, token_definitions_output): Output
16225         the full M4 block.
16226         * src/symtab.c: Don't access directly to the symbol tag, use
16227         symbol_tag_get.
16228         * src/parse-gram.y: Use symbol_list_free.
16230 2002-06-17  Akim Demaille  <akim@epita.fr>
16232         * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16233         (symbol_list_prepend, get_type_name): Move to...
16234         * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16235         (symbol_list_prepend, symbol_list_n_type_name_get): here.
16236         Adjust all callers.
16237         (symbol_list_free): New.
16238         * src/scan-gram.l (handle_dollar): Takes a location.
16239         * tests/input.at (Invalid $n): Adjust.
16241 2002-06-17  Akim Demaille  <akim@epita.fr>
16243         * src/reader.h, src/reader.c (symbol_list_new): Export it.
16244         (symbol_list_prepend): New.
16245         * src/parse-gram.y (%union): `list' is a new member.
16246         (symbols.1): New, replaces...
16247         (terms_to_prec.1, nterms_to_type.1): these.
16248         * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16249         Take a location as additional argument.
16250         Adjust all callers.
16252 2002-06-15  Akim Demaille  <akim@epita.fr>
16254         * src/parse-gram.y: Move %token in the declaration section so that
16255         we don't depend upon CVS Bison.
16257 2002-06-15  Akim Demaille  <akim@epita.fr>
16259         * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16260         * src/print.c (print_core): Use it.
16262 2002-06-15  Akim Demaille  <akim@epita.fr>
16264         * src/conflicts.c (log_resolution): Accept the rule involved in
16265         the sr conflicts instead of the lookahead number that points to
16266         that rule.
16267         (flush_reduce): Accept the current lookahead vector as argument,
16268         instead of the index in LA.
16269         (resolve_sr_conflict): Accept the current number of lookahead
16270         bitset to consider for the STATE, instead of the index in LA.
16271         (set_conflicts): Adjust.
16272         * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16274 2002-06-15  Akim Demaille  <akim@epita.fr>
16276         * src/state.h (state_t): Replace the `lookaheadsp' member, a
16277         short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16278         Adjust all dependencies.
16279         * src/lalr.c (initialize_lookaheads): Split into...
16280         (states_lookaheads_count, states_lookaheads_initialize): these.
16281         (lalr): Adjust.
16283 2002-06-15  Akim Demaille  <akim@epita.fr>
16285         * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16286         out of...
16287         (grammar_rules_print): here.
16288         * src/reduce.c (reduce_output): Use it.
16289         * tests/reduce.at (Useless Rules, Reduced Automaton)
16290         (Underivable Rules): Adjust.
16292 2002-06-15  Akim Demaille  <akim@epita.fr>
16294         Copy BYacc's nice way to report the grammar.
16296         * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16297         New.
16298         Don't print the rules' location, it is confusing and useless.
16299         (rule_print): Use grammar_rhs_print.
16300         * src/print.c (print_grammar): Use grammar_rules_print.
16302 2002-06-15  Akim Demaille  <akim@epita.fr>
16304         Complete and rationalize `useless thing' warnings.
16306         * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16307         (symbol_tag_print): New.
16308         Use them everywhere in place of accessing directly the tag member.
16309         * src/gram.h, src/gram.c (rule_print): New.
16310         Use it where a rule used to be printed `by hand'.
16311         * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16312         (reduce_grammar_tables): Report the useless rules.
16313         (reduce_print): Useless things are a warning, not an error.
16314         Report it as such.
16315         * tests/reduce.at (Useless Nonterminals, Useless Rules):
16316         (Reduced Automaton, Underivable Rules): Adjust.
16317         * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16318         * tests/conflicts.at (Unresolved SR Conflicts)
16319         (Solved SR Conflicts): Adjust.
16321 2002-06-15  Akim Demaille  <akim@epita.fr>
16323         Let symbols have a location.
16325         * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16326         (getsym): Adjust.
16327         Adjust all callers.
16328         * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16329         Use location_t, not int.
16330         * src/symtab.c (symbol_check_defined): Take advantage of the
16331         location.
16332         * tests/regression.at (Invalid inputs): Adjust.
16334 2002-06-15  Akim Demaille  <akim@epita.fr>
16336         * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16337         (input): Don't try to initialize yylloc here, do it in the
16338         scanner.
16339         * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16340         * src/gram.h (rule_t): Change line and action_line into location
16341         and action_location, of location_t type.
16342         Adjust all dependencies.
16343         * src/location.h, src/location.c (empty_location): New.
16344         * src/reader.h, src/reader.c (grammar_start_symbol_set)
16345         (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16346         (grammar_current_rule_symbol_append)
16347         (grammar_current_rule_action_append): Expect a location as argument.
16348         * src/reader.c (grammar_midrule_action): Adjust to attach an
16349         action's location as dummy symbol location.
16350         * src/symtab.h, src/symtab.c (startsymbol_location): New.
16351         * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16352         the line numbers.
16354 2002-06-14  Akim Demaille  <akim@epita.fr>
16356         Grammar declarations may be found in the grammar section.
16358         * src/parse-gram.y (rules_or_grammar_declaration): New.
16359         (declarations): Each declaration may end with a semicolon, not
16360         just...
16361         (grammar_declaration): `"%union"'.
16362         (grammar): Branch to rules_or_grammar_declaration.
16364 2002-06-14  Akim Demaille  <akim@epita.fr>
16366         * src/main.c (main): Invoke scanner_free.
16368 2002-06-14  Akim Demaille  <akim@epita.fr>
16370         * src/output.c (m4_invoke): Extracted from...
16371         (output_skeleton): here.
16372         Free tempfile.
16374 2002-06-14  Akim Demaille  <akim@epita.fr>
16376         * src/parse-gram.y (directives, directive, gram)
16377         (grammar_directives, precedence_directives, precedence_directive):
16378         Rename as...
16379         (declarations, declaration, grammar, grammar_declaration)
16380         (precedence_declaration, precedence_declarator): these.
16381         (symbol_declaration): New.
16383 2002-06-14  Akim Demaille  <akim@epita.fr>
16385         * src/files.c (action_obstack): Remove, unused.
16386         (output_obstack): Remove it, and all its dependencies, as it is no
16387         longer needed.
16388         * src/reader.c (epilogue_set): Build the epilogue in the
16389         muscle_obstack.
16390         * src/output.h, src/output.c (muscle_obstack): Move to...
16391         * src/muscle_tab.h, src/muscle_tab.h: here.
16392         (muscle_init): Initialize muscle_obstack.
16393         (muscle_free): New.
16394         * src/main.c (main): Call it.
16396 2002-06-14  Akim Demaille  <akim@epita.fr>
16398         * src/location.h: New, extracted from...
16399         * src/reader.h: here.
16400         * src/Makefile.am (noinst_HEADERS): Merge into
16401         (bison_SOURCES): this.
16402         Add location.h.
16403         * src/parse-gram.y: Use location_t instead of Bison's.
16404         * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16405         Use location_t instead of ints.
16407 2002-06-14  Akim Demaille  <akim@epita.fr>
16409         * data/bison.simple, data/bison.c++: Be sure to restore the
16410         current #line when returning to the skeleton contents after having
16411         exposed the input file's #line.
16413 2002-06-12  Akim Demaille  <akim@epita.fr>
16415         * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16416         eager.
16417         * tests/actions.at (Exotic Dollars): New.
16419 2002-06-12  Akim Demaille  <akim@epita.fr>
16421         * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16422         ['"/] too eagerly.
16423         * tests/input.at (Torturing the Scanner): New.
16425 2002-06-11  Akim Demaille  <akim@epita.fr>
16427         * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16428         [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16429         [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16430         * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16431         * src/reader.c (reader): Use it.
16433 2002-06-11  Akim Demaille  <akim@epita.fr>
16435         * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16436         Adjust all callers.
16437         (scanner_last_string_free): New.
16439 2002-06-11  Akim Demaille  <akim@epita.fr>
16441         * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16442         (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16443         (last_string, YY_OBS_FREE): New.
16444         Use them when returning an ID.
16446 2002-06-11  Akim Demaille  <akim@epita.fr>
16448         Have Bison grammars parsed by a Bison grammar.
16450         * src/reader.c, src/reader.h (prologue_augment): New.
16451         * src/reader.c (copy_definition): Remove.
16453         * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16454         (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16455         (grammar_current_rule_prec_set, grammar_current_rule_check)
16456         (grammar_current_rule_symbol_append)
16457         (grammar_current_rule_action_append): Export.
16458         * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16459         (symbol_list_action_append): Remove.
16460         Hook the routines from reader.
16461         * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16462         * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16464         * src/reader.c (read_declarations): Remove, unused.
16466         * src/parse-gram.y: Handle the epilogue.
16467         * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16468         (grammar_start_symbol_set): this.
16469         * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16470         * src/reader.c (readgram): Remove, unused.
16471         (reader): Adjust to insert eoftoken and axiom where appropriate.
16473         * src/reader.c (copy_dollar): Replace with...
16474         * src/scan-gram.h (handle_dollar): this.
16475         * src/parse-gram.y: Remove `%thong'.
16477         * src/reader.c (copy_at): Replace with...
16478         * src/scan-gram.h (handle_at): this.
16480         * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16481         New.
16483         * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16484         time being.
16486         * src/reader.h, src/reader.c (grammar_rule_end): New.
16488         * src/parse.y (current_type, current_class): New.
16489         Implement `%nterm', `%token' support.
16490         Merge `%term' into `%token'.
16491         (string_as_id): New.
16492         * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16493         type name.
16495         * src/parse-gram.y: Be sure to handle properly the beginning of
16496         rules.
16498         * src/parse-gram.y: Handle %type.
16499         * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16501         * src/parse-gram.y: More directives support.
16502         * src/options.c: No longer handle source directives.
16504         * src/parse-gram.y: Fix %output.
16506         * src/parse-gram.y: Handle %union.
16507         Use the prologue locations.
16508         * src/reader.c (parse_union_decl): Remove.
16510         * src/reader.h, src/reader.c (epilogue_set): New.
16511         * src/parse-gram.y: Use it.
16513         * data/bison.simple, data/bison.c++: b4_stype is now either not
16514         defined, then default to int, or to the contents of %union,
16515         without `union' itself.
16516         Adjust.
16517         * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16519         * src/output.c (actions_output): Don't output braces, as they are
16520         already handled by the scanner.
16522         * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16523         characters to themselves.
16525         * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16526         that the epilogue has a proper #line.
16528         * src/parse-gram.y: Handle precedence/associativity.
16530         * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16531         a terminal.
16532         * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16533         * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16534         at all to define terminals that cannot be emitted.
16536         * src/scan-gram.l: Escape M4 characters.
16538         * src/scan-gram.l: Working properly with escapes in user
16539         strings/characters.
16541         * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16542         (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16543         grammar.
16544         Use more modest sizes, as for the time being the parser does not
16545         release memory, and therefore the process swallows a huge amount
16546         of memory.
16548         * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16549         stricter %token grammar.
16551         * src/symtab.h (associativity): Add `undef_assoc'.
16552         (symbol_precedence_set): Do nothing when passed an undef_assoc.
16553         * src/symtab.c (symbol_check_alias_consistence): Adjust.
16555         * tests/regression.at (Invalid %directive): Remove, as it is now
16556         meaningless.
16557         (Invalid inputs): Adjust to the new error messages.
16558         (Token definitions): The new grammar doesn't allow too many
16559         eccentricities.
16561         * src/lex.h, src/lex.c: Remove.
16562         * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16563         (copy_character, copy_string2, copy_string, copy_identifier)
16564         (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16565         (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16566         (parse_action): Remove.
16567         * po/POTFILES.in: Adjust.
16569 2002-06-11  Akim Demaille  <akim@epita.fr>
16571         * src/reader.c (parse_action): Don't store directly into the
16572         rule's action member: return the action as a string.
16573         Don't require `rule_length' as an argument: compute it.
16574         (grammar_current_rule_symbol_append)
16575         (grammar_current_rule_action_append): New, eved out from
16576         (readgram): here.
16577         Remove `action_flag', `rulelength', unused now.
16579 2002-06-11  Akim Demaille  <akim@epita.fr>
16581         * src/reader.c (grammar_current_rule_prec_set).
16582         (grammar_current_rule_check): New, eved out from...
16583         (readgram): here.
16584         Remove `xaction', `first_rhs': useless.
16585         * tests/input.at (Type clashes): New.
16586         * tests/existing.at (GNU Cim Grammar): Adjust.
16588 2002-06-11  Akim Demaille  <akim@epita.fr>
16590         * src/reader.c (grammar_midrule_action): New, Eved out from
16591         (readgram): here.
16593 2002-06-11  Akim Demaille  <akim@epita.fr>
16595         * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16596         New.
16597         (readgram): Use them as replacement of inlined code, crule and
16598         crule1.
16600 2002-06-11  Akim Demaille  <akim@epita.fr>
16602         * src/reader.c (grammar_end, grammar_symbol_append): New.
16603         (readgram): Use them.
16604         Make the use of `p' as local as possible.
16606 2002-06-10  Akim Demaille  <akim@epita.fr>
16608         GCJ's parser requires the tokens to be defined before the prologue.
16610         * data/bison.simple: Output the token definition before the user's
16611         prologue.
16612         * tests/regression.at (Braces parsing, Duplicate string)
16613         (Mixing %token styles): Check the output from bison.
16614         (Early token definitions): New.
16616 2002-06-10  Akim Demaille  <akim@epita.fr>
16618         * src/symtab.c (symbol_user_token_number_set): Don't complain when
16619         assigning twice the same user number to a token, so that we can
16620         use it in...
16621         * src/lex.c (lex): here.
16622         Also use `symbol_class_set' instead of hand written code.
16623         * src/reader.c (parse_assoc_decl): Likewise.
16625 2002-06-10  Akim Demaille  <akim@epita.fr>
16627         * src/symtab.c, src/symtab.c (symbol_class_set)
16628         (symbol_user_token_number_set): New.
16629         * src/reader.c (parse_token_decl): Use them.
16630         Use a switch instead of ifs.
16631         Use a single argument.
16633 2002-06-10  Akim Demaille  <akim@epita.fr>
16635         Remove `%thong' support as it is undocumented, unused, duplicates
16636         `%token's job, and creates useless e-mail traffic with people who
16637         want to know what it is, why it is undocumented, unused, and
16638         duplicates `%token's job.
16640         * src/reader.c (parse_thong_decl): Remove.
16641         * src/options.c (option_table): Remove "thong".
16642         * src/lex.h (tok_thong): Remove.
16644 2002-06-10  Akim Demaille  <akim@epita.fr>
16646         * src/symtab.c, src/symtab.c (symbol_type_set)
16647         (symbol_precedence_set): New.
16648         * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16649         (value_components_used): Remove, unused.
16651 2002-06-09  Akim Demaille  <akim@epita.fr>
16653         Move symbols handling code out of the reader.
16655         * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16656         (axiom): Move to...
16657         * src/symtab.h, src/symtab.c: here.
16659         * src/gram.c (start_symbol): Remove: use startsymbol->number.
16660         * src/reader.c (startval): Rename as...
16661         * src/symtab.h, src/symtab.c (startsymbol): this.
16662         * src/reader.c: Adjust.
16664         * src/reader.c (symbol_check_defined, symbol_make_alias)
16665         (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16666         (token_translations_init)
16667         Move to...
16668         * src/symtab.c: here.
16669         * src/reader.c (packsymbols): Move to...
16670         * src/symtab.h, src/symtab.c (symbols_pack): here.
16671         * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16672         argument.
16674 2002-06-03  Akim Demaille  <akim@epita.fr>
16676         * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16677         then statements.
16679 2002-06-03  Akim Demaille  <akim@epita.fr>
16681         * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16682         structs with non literals.
16683         * src/scan-skel.l: never-interactive.
16684         * src/conflicts.c (enum conflict_resolution_e): No trailing
16685         comma.
16686         * src/getargs.c (usage): Split long literal strings.
16687         Reported by Hans Aberg.
16689 2002-05-28  Akim Demaille  <akim@epita.fr>
16691         * data/bison.c++: Use C++ ostreams.
16692         (cdebug_): New member.
16694 2002-05-28  Akim Demaille  <akim@epita.fr>
16696         * src/output.c (output_skeleton): Be sure to allocate enough room
16697         for `/' _and_ for `\0' in full_skeleton.
16699 2002-05-28  Akim Demaille  <akim@epita.fr>
16701         * data/bison.c++: Catch up with bison.simple:
16702         2002-05-24  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
16703         and Paul Eggert  <eggert@twinsun.com>: `error' handing.
16704         2002-05-26  Akim Demaille  <akim@epita.fr>: stos_, token_number_,
16705         and popping traces.
16707 2002-05-27  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
16709         * src/output.c (output_skeleton): Put an explicit path in front of
16710         the skeleton file name, rather than relying on the -I directory,
16711         to partially alleviate effects of having a skeleton file lying around
16712         in the current directory.
16714 2002-05-27  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
16716         * src/conflicts.c (log_resolution): Correct typo:
16717         obstack_printf should be obstack_fgrow1.
16719 2002-05-26  Akim Demaille  <akim@epita.fr>
16721         * src/state.h (state_t): `solved_conflicts' is a new member.
16722         * src/LR0.c (new_state): Set it to 0.
16723         * src/conflicts.h, src/conflicts.c (print_conflicts)
16724         (free_conflicts, solve_conflicts): Rename as...
16725         (conflicts_print, conflicts_free, conflicts_solve): these.
16726         Adjust callers.
16727         * src/conflicts.c (enum conflict_resolution_e)
16728         (solved_conflicts_obstack): New, used by...
16729         (log_resolution): this.
16730         Adjust to attach the conflict resolution to each state.
16731         Complete the description with the precedence/associativity
16732         information.
16733         (resolve_sr_conflict): Adjust.
16734         * src/print.c (print_state): Output its solved_conflicts.
16735         * tests/conflicts.at (Unresolved SR Conflicts)
16736         (Solved SR Conflicts): Exercise --report=all.
16738 2002-05-26  Akim Demaille  <akim@epita.fr>
16740         * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16741         * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16742         * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16743         (token_number_t, item_number_as_token_number)
16744         (token_number_as_item_number, muscle_insert_token_number_table):
16745         Rename as...
16746         (symbol_number_t, item_number_as_symbol_number)
16747         (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16748         these, since it is more appropriate.
16750 2002-05-26  Akim Demaille  <akim@epita.fr>
16752         * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16753         `Error:' lines.
16754         * data/bison.simple (yystos) [YYDEBUG]: New.
16755         (yyparse) [YYDEBUG]: Display the symbols which are popped during
16756         error recovery.
16757         * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16759 2002-05-25  Akim Demaille  <akim@epita.fr>
16761         * doc/bison.texinfo (Debugging): Split into...
16762         (Tracing): this new section, its former contents, and...
16763         (Understanding): this new section.
16764         * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16765         by...
16766         (report_flag): this.
16767         Adjust all dependencies.
16768         (report_args, report_types, report_argmatch): New.
16769         (usage, getargs): Report/support -r, --report.
16770         * src/options.h
16771         (struct option_table_struct): Rename as..,
16772         (struct option_table_s): this.
16773         Rename the `set_flag' member to `flag' to match with getopt_long's
16774         struct.
16775         * src/options.c (option_table): Split verbose into an entry for
16776         %verbose, and another for --verbose.
16777         Support --report/-r, so remove -r from the obsolete --raw.
16778         * src/print.c: Attach full item sets and lookaheads reports to
16779         report_flag instead of trace_flag.
16780         * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16782 2002-05-24  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
16783         and Paul Eggert  <eggert@twinsun.com>
16785         * data/bison.simple (yyparse): Correct error handling to conform to
16786         POSIX and yacc.  Specifically, after syntax error is discovered,
16787         do not reduce further before shifting the error token.
16788         Clean up the code a bit by removing the labels yyerrdefault,
16789         yyerrhandle, yyerrpop.
16790         * NEWS: Document the above.
16792 2002-05-20  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
16794         * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16795         type; it isn't always big enough, since it doesn't necessarily
16796         include non-terminals.
16797         (yytranslate): Expand definition of yy_token_number_type, so that
16798         the latter can be removed.
16799         (yy_token_number_type): Remove, only one use.
16800         * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16801         don't use TokenNumberType as element type.
16803         * tests/regression.at: Modify expected output to agree with change
16804         to yyr1 and yytranslate.
16806 2002-05-13  Florian Krohm  <florian@edamail.fishkill.ibm.com>
16808         * src/reader.c (parse_action): Use copy_character instead of
16809         obstack_1grow.
16811 2002-05-13  Akim Demaille  <akim@epita.fr>
16813         * tests/regression.at (Token definitions): Prototype yylex and
16814         yyerror.
16816 2002-05-12  Paul Hilfinger  <Hilfinger@CS.Berkeley.EDU>
16818         * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16819         * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16820         32-bit arithmetic.
16821         * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16823 2002-05-07  Akim Demaille  <akim@epita.fr>
16825         * tests/synclines.at: Be sure to prototype yylex and yyerror to
16826         avoid GCC warnings.
16828 2002-05-07  Akim Demaille  <akim@epita.fr>
16830         Kill GCC warnings.
16832         * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16833         over the RHS of each rule.
16834         * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16835         * src/state.h (state_t): Member `nitems' is unsigned short.
16836         * src/LR0.c (get_state): Adjust.
16837         * src/reader.c (packgram): Likewise.
16838         * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16839         `Type'.
16840         (muscle_insert_int_table): Remove, unused.
16841         (prepare_rules): Remove `max'.
16843 2002-05-06  Akim Demaille  <akim@epita.fr>
16845         * src/closure.c (print_firsts): Display of the symbol tags.
16846         (bitmatrix_print): Move to...
16847         * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16848         here.
16849         * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16851 2002-05-06  Akim Demaille  <akim@epita.fr>
16853         * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16854         hash_do_for_each.
16856 2002-05-06  Akim Demaille  <akim@epita.fr>
16858         * src/LR0.c (new_state, get_state): Instead of using the global
16859         `kernel_size' and `kernel_base', have two new arguments:
16860         `core_size' and `core'.
16861         Adjust callers.
16863 2002-05-06  Akim Demaille  <akim@epita.fr>
16865         * src/reader.c (packgram): No longer end `ritem' with a 0
16866         sentinel: it is not used.
16868 2002-05-05  Akim Demaille  <akim@epita.fr>
16870         New experimental feature: display the lookaheads in the report and
16871         graph.
16873         * src/print (print_core): When --trace-flag, display the rules
16874         lookaheads.
16875         * src/print_graph.c (print_core): Likewise.
16876         Swap the arguments.
16877         Adjust caller.
16879 2002-05-05  Akim Demaille  <akim@epita.fr>
16881         * tests/torture.at (Many lookaheads): New test.
16883 2002-05-05  Akim Demaille  <akim@epita.fr>
16885         * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16886         (GENERATE_MUSCLE_INSERT_TABLE): this.
16887         (output_int_table, output_unsigned_int_table, output_short_table)
16888         (output_token_number_table, output_item_number_table): Replace with...
16889         (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16890         (muscle_insert_short_table, muscle_insert_token_number_table)
16891         (muscle_insert_item_number_table): these.
16892         Adjust all callers.
16893         (prepare_tokens): Don't free `translations', since...
16894         * src/reader.h, src/reader.c (grammar_free): do it.
16895         Move to...
16896         * src/gram.h, src/gram.c (grammar_free): here.
16897         * data/bison.simple, data/bison.c++: b4_token_number_max is now
16898         b4_translate_max.
16900 2002-05-05  Akim Demaille  <akim@epita.fr>
16902         * src/output.c (output_unsigned_int_table): New.
16903         (prepare_rules): `i' is unsigned.
16904         `prhs', `rline', `r2' are unsigned int.
16905         Rename muscle `rhs_number_max' as `rhs_max'.
16906         Output muscles `prhs_max', `rline_max', and `r2_max'.
16907         Free rline and r1.
16908         * data/bison.simple, data/bison.c++: Adjust to use these muscles
16909         to compute types instead of constant types.
16910         * tests/regression.at (Web2c Actions): Adjust.
16912 2002-05-04  Akim Demaille  <akim@epita.fr>
16914         * src/symtab.h (SALIAS, SUNDEF): Rename as...
16915         (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16916         Adjust dependencies.
16917         * src/output.c (token_definitions_output): Be sure not to output a
16918         `#define 'a'' when fed with `%token 'a' "a"'.
16919         * tests/regression.at (Token definitions): New.
16921 2002-05-03  Paul Eggert  <eggert@twinsun.com>
16923         * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16924         for K&R C.
16926 2002-05-03  gettextize  <bug-gnu-gettext@gnu.org>
16928         * Makefile.am (SUBDIRS): Remove intl.
16929         (EXTRA_DIST): Add config/config.rpath.
16931 2002-05-03  Akim Demaille  <akim@epita.fr>
16933         * data/bison.simple (m4_if): Don't output empty enums.
16934         And actually, output valid enum definitions :(.
16936 2002-05-03  Akim Demaille  <akim@epita.fr>
16938         * configure.bat: Remove, completely obsolete.
16939         * Makefile.am (EXTRA_DIST): Adjust.
16940         Don't distribute config.rpath...
16941         * config/Makefile.am (EXTRA_DIST): Do it.
16943 2002-05-03  Akim Demaille  <akim@epita.fr>
16945         * configure.in (GETTEXT_VERSION): New.
16946         Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16948 2002-05-03  Akim Demaille  <akim@epita.fr>
16950         * data/bison.simple (b4_token_enum): New.
16951         (b4_token_defines): Use it to output tokens both as #define and
16952         enums.
16953         Suggested by Paul Eggert.
16954         * src/output.c (token_definitions_output): Don't output spurious
16955         white spaces.
16957 2002-05-03  Akim Demaille  <akim@epita.fr>
16959         * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16961 2002-05-02  Robert Anisko  <robert@lrde.epita.fr>
16963         * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16964         Update the stack class, give a try to deque as the default container.
16966 2002-05-02  Akim Demaille  <akim@epita.fr>
16968         * data/bison.simple (yyparse): Do not implement @$ = @1.
16969         (YYLLOC_DEFAULT): Adjust to do it.
16970         * doc/bison.texinfo (Location Default Action): Fix.
16972 2002-05-02  Akim Demaille  <akim@epita.fr>
16974         * src/reader.c (parse_braces): Merge into...
16975         (parse_action): this.
16977 2002-05-02  Akim Demaille  <akim@epita.fr>
16979         * configure.in (ALL_LINGUAS): Remove.
16980         * po/LINGUAS, hr.po: New.
16982 2002-05-02  Akim Demaille  <akim@epita.fr>
16984         Remove the so called hairy (semantic) parsers.
16986         * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16987         * src/gram.h, src/gram.c (semantic_parser): Remove.
16988         (rule_t): Remove the guard and guard_line members.
16989         * src/lex.h (token_t): remove tok_guard.
16990         * src/options.c (option_table): Remove %guard and %semantic_parser
16991         support.
16992         * src/output.c, src/output.h (guards_output): Remove.
16993         (prepare): Adjust.
16994         (token_definitions_output): Don't output the `T'
16995         tokens (???).
16996         (output_skeleton): Don't output the guards.
16997         * src/files.c, src/files.c (attrsfile): Remove.
16998         * src/reader.c (symbol_list): Remove the guard and guard_line
16999         members.
17000         Adjust dependencies.
17001         (parse_guard): Remove.
17002         * data/bison.hairy: Remove.
17003         * doc/bison.texinfo (Environment Variables): Remove occurrences of
17004         BISON_HAIRY.
17006 2002-05-02  Akim Demaille  <akim@epita.fr>
17008         * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17009         (parse_guard): Rename the formal argument `stack_offset' as
17010         `rule_length', which is more readable.
17011         Adjust callers.
17012         (copy_at, copy_dollar): Instead of outputting the hard coded
17013         values of $$, $n and so forth, output invocation to b4_lhs_value,
17014         b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17015         Note: this patch partially drops `semantic-parser' support: it
17016         always does `rule_length - n', where semantic parsers ought to
17017         always use `-n'.
17018         * data/bison.simple, data/bison.c++ (b4_lhs_value)
17019         (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17021 2002-05-02  Akim Demaille  <akim@epita.fr>
17023         * configure.in (AC_INIT): Bump to 1.49b.
17024         (AM_INIT_AUTOMAKE): Short invocation.
17026 2002-05-02  Akim Demaille  <akim@epita.fr>
17028         Version 1.49a.
17030 2002-05-01  Akim Demaille  <akim@epita.fr>
17032         * src/skeleton.h: Remove.
17034 2002-05-01  Akim Demaille  <akim@epita.fr>
17036         * src/skeleton.h: Fix the #endif.
17037         Reported by Magnus Fromreide.
17039 2002-04-26  Paul Eggert  <eggert@twinsun.com>
17041         * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17042         Define if we define YYSTYPE and YYLTYPE, respectively.
17043         (YYCOPY): Fix [] quoting problem in the non-GCC case.
17045 2002-04-25  Robert Anisko  <robert@lrde.epita.fr>
17047         * src/scan-skel.l: Postprocess quadrigraphs.
17049         * src/reader.c (copy_character): New function, used to output
17050         single characters while replacing `[' and `]' with quadrigraphs, to
17051         avoid troubles with M4 quotes.
17052         (copy_comment): Output characters with copy_character.
17053         (read_additionnal_code): Likewise.
17054         (copy_string2): Likewise.
17055         (copy_definition): Likewise.
17057         * tests/calc.at: Exercise M4 quoting.
17059 2002-04-25  Akim Demaille  <akim@epita.fr>
17061         * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17062         between `!' and the command.
17063         Reported by Paul Eggert.
17065 2002-04-24  Robert Anisko  <robert@lrde.epita.fr>
17067         * tests/calc.at: Exercise prologue splitting.
17069         * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17070         `b4_post_prologue' instead of `b4_prologue'.
17072         * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17073         muscles.
17074         (output): Free pre_prologue_obstack and post_prologue_obstack.
17075         * src/files.h, src/files.c (attrs_obstack): Remove.
17076         (pre_prologue_obstack, post_prologue_obstack): New.
17077         * src/reader.c (copy_definition): Add a parameter to specify the
17078         obstack to fill, instead of using attrs_obstack unconditionally.
17079         (read_declarations): Pass pre_prologue_obstack to copy_definition if
17080         `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17082 2002-04-23  Paul Eggert  <eggert@twinsun.com>
17084         * data/bison.simple: Remove unnecessary commentary and white
17085         space differences from 1_29-branch.
17086         Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17088         (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17089         YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17090         if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17091         constructors or destructors.
17093         (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17095 2002-04-23  Akim Demaille  <akim@epita.fr>
17097         * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17098         * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17099         location with columns.
17100         * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17101         All reported by Paul Eggert.
17103 2002-04-22  Akim Demaille  <akim@epita.fr>
17105         * src/reduce.c (dump_grammar): Move to...
17106         * src/gram.h, src/gram.c (grammar_dump): here.
17107         Be sure to separate long item numbers.
17108         Don't read the members of a rule's prec if its nil.
17110 2002-04-22  Akim Demaille  <akim@epita.fr>
17112         * src/output.c (table_size, table_grow): New.
17113         (MAXTABLE): Remove, replace uses with table_size.
17114         (pack_vector): Instead of dying when the table is too big, grow it.
17116 2002-04-22  Akim Demaille  <akim@epita.fr>
17118         * data/bison.simple (yyr1): Its type is that of a token number.
17119         * data/bison.c++ (r1_): Likewise.
17120         * tests/regression.at (Web2c Actions): Adjust.
17122 2002-04-22  Akim Demaille  <akim@epita.fr>
17124         * src/reader.c (token_translations_init): 256 is now the default
17125         value for the error token, i.e., it will be assigned another
17126         number if the user assigned 256 to one of her tokens.
17127         (reader): Don't force 256 to error.
17128         * doc/bison.texinfo (Symbols): Adjust.
17129         * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17130         (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17131         etc. instead of 10, 20, 30 (which was used to `jump' over error
17132         (256) and undefined (2)).
17134 2002-04-22  Akim Demaille  <akim@epita.fr>
17136         Propagate more token_number_t.
17138         * src/gram.h (token_number_as_item_number)
17139         (item_number_as_token_number): New.
17140         * src/output.c (GENERATE_OUTPUT_TABLE): New.
17141         Use it to create output_item_number_table and
17142         output_token_number_table.
17143         * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17144         * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17145         * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17146         * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17148 2002-04-22  Akim Demaille  <akim@epita.fr>
17150         * src/output.h, src/output.c (get_lines_number): Remove.
17152 2002-04-19  Akim Demaille  <akim@epita.fr>
17154         * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17155         as Lex/Flex'.
17156         (Debugging): More details about enabling the debugging features.
17157         (Table of Symbols): Describe $$, $n, @$, and @n.
17158         Suggested by Tim Josling.
17160 2002-04-19  Akim Demaille  <akim@epita.fr>
17162         * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17164 2002-04-10  Akim Demaille  <akim@epita.fr>
17166         * src/system.h: Rely on HAVE_LIMITS_H.
17167         Suggested by Paul Eggert.
17169 2002-04-09  Akim Demaille  <akim@epita.fr>
17171         * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17172         full stderr, and strip it according to the bison options, instead
17173         of composing the error message from different bits.
17174         This makes it easier to check for several error messages.
17175         Adjust all the invocations.
17176         Add an invocation exercising the error token.
17177         Add an invocation demonstrating a stupid error message.
17178         (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17179         Adjust the tests.
17180         Error message are for stderr, not stdout.
17182 2002-04-09  Akim Demaille  <akim@epita.fr>
17184         * src/gram.h, src/gram.c (error_token_number): Remove, use
17185         errtoken->number.
17186         * src/reader.c (reader): Don't specify the user token number (2)
17187         for $undefined, as it uselessly prevents using it.
17188         * src/gram.h (token_number_t): Move to...
17189         * src/symtab.h: here.
17190         (state_t.number): Is a token_number_t.
17191         * src/print.c, src/reader.c: Use undeftoken->number instead of
17192         hard coded 2.
17193         (Even though this 2 is not the same as above: the number of the
17194         undeftoken remains being 2, it is its user token number which
17195         might not be 2).
17196         * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17197         `user_token_number_max'.
17198         Output `undef_token_number'.
17199         * data/bison.simple, data/bison.c++: Use them.
17200         Be sure to map invalid yylex return values to
17201         `undef_token_number'.  This saves us from gratuitous SEGV.
17203         * tests/conflicts.at (Solved SR Conflicts)
17204         (Unresolved SR Conflicts): Adjust.
17205         * tests/regression.at (Web2c Actions): Adjust.
17207 2002-04-08  Akim Demaille  <akim@epita.fr>
17209         * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17210         Adding #line.
17211         Remove the duplicate `typedefs'.
17212         (RhsNumberType): Fix the declaration and various other typos.
17213         Use __ofile__.
17214         * data/bison.simple: Use __ofile__.
17215         * src/scan-skel.l: Handle __ofile__.
17217 2002-04-08  Akim Demaille  <akim@epita.fr>
17219         * src/gram.h (item_number_t): New, the type of item numbers in
17220         RITEM.  Note that it must be able to code symbol numbers as
17221         positive number, and the negation of rule numbers as negative
17222         numbers.
17223         Adjust all dependencies (pretty many).
17224         * src/reduce.c (rule): Remove this `short *' pointer: use
17225         item_number_t.
17226         * src/system.h (MINSHORT, MAXSHORT): Remove.
17227         Include `limits.h'.
17228         Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17229         (shortcpy): Remove.
17230         (MAXTABLE): Move to...
17231         * src/output.c (MAXTABLE): here.
17232         (prepare_rules): Use output_int_table to output rhs.
17233         * data/bison.simple, data/bison.c++: Adjust.
17234         * tests/torture.at (Big triangle): Move the limit from 254 to
17235         500.
17236         * tests/regression.at (Web2c Actions): Ajust.
17238         Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17239         of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17240         passes, but produces negative #line number, once fixed, GCC is
17241         killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17242         C), it passes.
17243         * src/state.h (state_h): Code input lines on ints, not shorts.
17245 2002-04-08  Akim Demaille  <akim@epita.fr>
17247         * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17248         and then the grammar.
17250 2002-04-08  Akim Demaille  <akim@epita.fr>
17252         * src/system.h: No longer using strndup.
17254 2002-04-07  Akim Demaille  <akim@epita.fr>
17256         * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17257         * src/output.c (output_table_data): Return the longest number.
17258         (prepare_tokens): Output `token_number_max').
17259         * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17260         New.
17261         Use them to define yy_token_number_type/TokenNumberType.
17262         Use this type for yytranslate.
17263         * tests/torture.at (Big triangle): Push the limit from 124 to
17264         253.
17265         * tests/regression.at (Web2c Actions): Adjust.
17267 2002-04-07  Akim Demaille  <akim@epita.fr>
17269         * tests/torture.at (Big triangle): New.
17270         (GNU AWK Grammar, GNU Cim Grammar): Move to...
17271         * tests/existing.at: here.
17273 2002-04-07  Akim Demaille  <akim@epita.fr>
17275         * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17276         nritems.
17277         Adjust dependencies.
17279 2002-04-07  Akim Demaille  <akim@epita.fr>
17281         * src/reader.c: Normalize increments to prefix form.
17283 2002-04-07  Akim Demaille  <akim@epita.fr>
17285         * src/reader.c, symtab.c: Remove debugging code.
17287 2002-04-07  Akim Demaille  <akim@epita.fr>
17289         Rename all the `bucket's as `symbol_t'.
17291         * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17292         * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17293         * src/symtab.c, src/symtab.h (bucket): Rename as...
17294         (symbol_t): this.
17295         (symbol_list_new, bucket_check_defined, bucket_make_alias)
17296         (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17297         (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17298         (buckets_new, buckets_free, buckets_do): Rename as...
17299         (symbol_list_new, symbol_check_defined, symbol_make_alias)
17300         (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17301         (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17302         (symbols_new, symbols_free, symbols_do): these.
17304 2002-04-07  Akim Demaille  <akim@epita.fr>
17306         Use lib/hash for the symbol table.
17308         * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17309         EOF.
17310         * src/lex.c (lex): Set the `number' member of new terminals.
17311         * src/reader.c (bucket_check_defined, bucket_make_alias)
17312         (bucket_check_alias_consistence, bucket_translation): New.
17313         (reader, grammar_free, readgram, token_translations_init)
17314         (packsymbols): Adjust.
17315         (reader): Number the predefined tokens.
17316         * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17317         for predefined tokens.
17318         * src/symtab.h (bucket): Remove all the hash table related
17319         members.
17320         * src/symtab.c (symtab): Replace by...
17321         (bucket_table): this.
17322         (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17323         (buckets_new, buckets_do): New.
17325 2002-04-07  Akim Demaille  <akim@epita.fr>
17327         * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17328         (start_symbol, max_user_token_number, semantic_parser)
17329         (error_token_number): Initialize.
17330         * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17331         Initialize.
17332         (reader): Don't.
17333         (errtoken, eoftoken, undeftoken, axiom): Extern.
17335 2002-04-07  Akim Demaille  <akim@epita.fr>
17337         * src/gram.h (rule_s): prec and precsym are now pointers
17338         to the bucket giving the priority/associativity.
17339         Member `associativity' removed: useless.
17340         * src/reduce.c, src/conflicts.c: Adjust.
17342 2002-04-07  Akim Demaille  <akim@epita.fr>
17344         * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17345         Properly escape the symbols' TAG when outputting them.
17347 2002-04-07  Akim Demaille  <akim@epita.fr>
17349         * src/lalr.h (LA): Is a bitsetv, not bitset*.
17351 2002-04-07  Akim Demaille  <akim@epita.fr>
17353         * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17354         (LArule): this, which is an array to rule_t*.
17355         * src/print.c, src/conflicts.c: Adjust.
17357 2002-04-07  Akim Demaille  <akim@epita.fr>
17359         * src/gram.h (rule_t): Rename `number' as `user_number'.
17360         `number' is a new member.
17361         Adjust dependencies.
17362         * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17364 2002-04-07  Akim Demaille  <akim@epita.fr>
17366         As a result of the previous patch, it is no longer needed
17367         to reorder ritem itself.
17369         * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17371 2002-04-07  Akim Demaille  <akim@epita.fr>
17373         Be sure never to walk through RITEMS, but use only data related to
17374         the rules themselves. RITEMS should be banished.
17376         * src/output.c (output_token_translations): Rename as...
17377         (prepare_tokens): this.
17378         In addition to `translate', prepare the muscles `tname' and
17379         `toknum', which were handled by...
17380         (output_rule_data): this.
17381         Remove, and move the remainder of its outputs into...
17382         (prepare_rules): this new routines, which also merges content from
17383         (output_gram): this.
17384         (prepare_rules): Be sure never to walk through RITEMS.
17385         (output_stos): Rename as...
17386         (prepare_stos): this.
17387         (output): Always invoke prepare_states, after all, just don't use it
17388         in the output if you don't need it.
17390 2002-04-07  Akim Demaille  <akim@epita.fr>
17392         * src/LR0.c (new_state): Display `nstates' as the name of the
17393         newly created state.
17394         Adjust to initialize first_state and last_state if needed.
17395         Be sure to distinguish the initial from the final state.
17396         (new_states): Create the itemset of the initial state, and use
17397         new_state.
17398         * src/closure.c (closure): Now that the initial state has its
17399         items properly set, there is no need for a special case when
17400         creating `ruleset'.
17402         As a result, now the rule 0, reducing to $axiom, is visible in the
17403         outputs.  Adjust the test suite.
17405         * tests/conflicts.at (Solved SR Conflicts)
17406         (Unresolved SR Conflicts): Adjust.
17407         * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17408         * tests/conflicts.at (S/R in initial): New.
17410 2002-04-07  Akim Demaille  <akim@epita.fr>
17412         * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17413         the RHS of the rules.
17414         * src/output.c (output_gram): Likewise.
17416 2002-04-07  Akim Demaille  <akim@epita.fr>
17418         * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17419         bucket.
17420         Adjust all dependencies.
17421         * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17422         `number' of the buckets too.
17423         * src/gram.h: Include `symtab.h'.
17424         (associativity): Move to...
17425         * src/symtab.h: here.
17426         No longer include `gram.h'.
17428 2002-04-07  Akim Demaille  <akim@epita.fr>
17430         * src/gram.h, src/gram.c (rules_rhs_length): New.
17431         (ritem_longest_rhs): Use it.
17432         * src/gram.h (rule_t): `number' is a new member.
17433         * src/reader.c (packgram): Set it.
17434         * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17435         the end of `rules', and count them out of `nrules'.
17436         (reduce_output, dump_grammar): Adjust.
17437         * src/print.c (print_grammar): It is no longer needed to check for
17438         the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17439         * tests/reduce.at (Reduced Automaton): New test.
17441 2002-04-07  Akim Demaille  <akim@epita.fr>
17443         * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17444         lacking `+ 1' to nrules, Bison reported as useless a token if it
17445         was used solely to set the precedence of the last rule...
17447 2002-04-07  Akim Demaille  <akim@epita.fr>
17449         * data/bison.c++, data/bison.simple: Don't output the current file
17450         name in #line, to avoid useless diffs between two identical
17451         outputs under different names.
17453 2002-04-07  Akim Demaille  <akim@epita.fr>
17455         * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17456         Normalize loops to using `< nrules + 1', not `<= nrules'.
17458 2002-04-07  Akim Demaille  <akim@epita.fr>
17460         * TODO: Update.
17462 2002-04-07  Akim Demaille  <akim@epita.fr>
17464         * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17465         bucket.value as bucket.number.
17467 2002-04-07  Akim Demaille  <akim@epita.fr>
17469         * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17470         * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17471         * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17472         RHS, instead of being an index in RITEMS.
17474 2002-04-04  Paul Eggert  <eggert@twinsun.com>
17476         * doc/bison.texinfo: Update copyright date.
17477         (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17478         (Symbols): Warn about running Bison in one character set,
17479         but compiling and/or running in an incompatible one.
17480         Warn about character code 256, too.
17482 2002-04-03  Paul Eggert  <eggert@twinsun.com>
17484         * src/bison.data (YYSTACK_ALLOC): Depend on whether
17485         YYERROR_VERBOSE is nonzero, not whether it is defined.
17487         Merge changes from bison-1_29-branch.
17489 2002-03-20  Paul Eggert  <eggert@twinsun.com>
17491         Merge fixes from Debian bison_1.34-1.diff.
17493         * configure.in (AC_PREREQ): 2.53.
17495 2002-03-20  Akim Demaille  <akim@epita.fr>
17497         * src/conflicts.c (log_resolution): Argument `resolution' is const.
17499 2002-03-19  Paul Eggert  <eggert@twinsun.com>
17501         * src/bison.simple (YYCOPY): New macro.
17502         (YYSTACK_RELOCATE): Use it.
17503         Remove Type arg; no longer needed.  All callers changed.
17504         (yymemcpy): Remove; no longer needed.
17506         * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17507         * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17509 2002-03-19  Akim Demaille  <akim@epita.fr>
17511         Test and fix the #line outputs.
17513         * tests/atlocal.at (GCC): New.
17514         * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17515         (Prologue synch line, %union synch line, Postprologue synch line)
17516         (Action synch line, Epilogue synch line): New tests.
17517         * src/reader.c (parse_union_decl): Define the muscle stype_line.
17518         * data/bison.simple, data/bison.c++: Use it.
17520 2002-03-19  Akim Demaille  <akim@epita.fr>
17522         * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17523         (Solved SR Conflicts, %expect not enough, %expect right)
17524         (%expect too much): Move to...
17525         * tests/conflicts.at: this new file.
17527 2002-03-19  Akim Demaille  <akim@epita.fr>
17529         * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17530         * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17531         that we can move to enums for instance.
17532         * src/output.c (token_definitions_output): Output a list of
17533         `token-name, token-number' instead of the #define.
17534         (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17536 2002-03-14  Akim Demaille  <akim@epita.fr>
17538         Use Gettext 0.11.1.
17540 2002-03-09  Robert Anisko  <robert@lrde.epita.fr>
17542         * data/bison.c++: Make the user able to add members to the generated
17543         parser by subclassing.
17545 2002-03-05  Robert Anisko  <robert@lrde.epita.fr>
17547         * src/reader.c (read_additionnal_code): `c' should be an integer, not
17548         a character.
17549         Reported by Nicolas Tisserand and Nicolas Burrus.
17551 2002-03-04  Robert Anisko  <robert@lrde.epita.fr>
17553         * src/reader.c: Warn about lacking semi-colons, do not complain.
17555 2002-03-04  Robert Anisko  <robert@lrde.epita.fr>
17557         * data/bison.c++: Remove a debug line.
17559 2002-03-04  Robert Anisko  <robert@lrde.epita.fr>
17561         * data/bison.c++: Unmerge value as yylval and value as yyval.  Unmerge
17562         location as yylloc and location as yyloc.  Use YYLLOC_DEFAULT, and
17563         provide a default implementation.
17565 2002-03-04  Akim Demaille  <akim@epita.fr>
17567         * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17568         * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17569         * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17570         * tests/semantic.at (Parsing Guards): Similarly.
17571         * src/reader.at (readgram): Complain if the last rule is not ended
17572         with a semi-colon.
17574 2002-03-04  Akim Demaille  <akim@epita.fr>
17576         * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17577         * src/closure.c: here.
17578         (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17579         RTC.
17580         * src/warshall.h, src/warshall.c: Remove.
17581         * tests/sets.at (Broken Closure): Adjust.
17583 2002-03-04  Akim Demaille  <akim@epita.fr>
17585         * src/output.c (output_skeleton): tempdir is const.
17586         bytes_read is unused.
17588 2002-03-04  Akim Demaille  <akim@epita.fr>
17590         * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17591         * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17592         Update.
17593         From Michael Hayes.
17595 2002-03-04  Akim Demaille  <akim@epita.fr>
17597         * src/closure.c (closure): `r' is unused.
17599 2002-03-04  Akim Demaille  <akim@epita.fr>
17601         * tests/sets.at (Broken Closure): Add the ending `;'.
17602         * src/reader.at (readgram): Complain if a rule is not ended with a
17603         semi-colon.
17605 2002-03-04  Akim Demaille  <akim@epita.fr>
17607         * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17608         (count_sr_conflicts): Use bitset_count.
17609         * src/reduce.c (inaccessable_symbols): Ditto.
17610         (bits_size): Remove.
17611         * src/warshall.h, src/warshall.c: Convert to bitsetv.
17613 2002-03-04  Akim Demaille  <akim@epita.fr>
17615         * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17616         * src/reduce.c: Remove the `bitset_zero's following the
17617         `bitset_create's, as now it is performed by the latter.
17619 2002-03-04  Akim Demaille  <akim@epita.fr>
17621         * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17622         * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17623         * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17624         latest sources from Michael.
17626 2002-03-04  Akim Demaille  <akim@epita.fr>
17628         * src/output.c (output): Don't free the grammar.
17629         * src/reader.c (grammar_free): New.
17630         * src/main.c (main): Call it and don't free symtab here.
17632 2002-03-04  Akim Demaille  <akim@epita.fr>
17634         * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17635         before returning.
17636         Reported by Benoit Perrot.
17638 2002-03-04  Akim Demaille  <akim@epita.fr>
17640         Use bitset operations when possible, not loops over bits.
17642         * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17643         bitset_or.
17644         * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17645         * src/reduce.c (useless_nonterminals): Formatting changes.
17646         * src/warshall.c (TC): Use bitset_or.
17648 2002-03-04  Akim Demaille  <akim@epita.fr>
17650         * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17651         * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17652         Ditto.
17654 2002-03-04  Akim Demaille  <akim@epita.fr>
17656         * src/lalr.c (F): Now a bitset*.
17657         Adjust all dependencies.
17659 2002-03-04  Akim Demaille  <akim@epita.fr>
17661         * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17662         Adjust all dependencies.
17664 2002-03-04  Akim Demaille  <akim@epita.fr>
17666         * src/L0.c, src/LR0.h (nstates): Be size_t.
17667         Adjust comparisons (signed vs unsigned).
17668         * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17669         bitset*.
17670         Adjust all dependencies.
17672 2002-03-04  Akim Demaille  <akim@epita.fr>
17674         * src/closure.c (firsts): Now, also a bitset.
17675         Adjust all dependencies.
17676         (varsetsize): Remove, now unused.
17677         * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17679 2002-03-04  Akim Demaille  <akim@epita.fr>
17681         * src/print.c: Convert to use bitset.h, not hand coded iterations
17682         over ints.
17684 2002-03-04  Akim Demaille  <akim@epita.fr>
17686         * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17688 2002-03-04  Akim Demaille  <akim@epita.fr>
17690         * src/closure.c (ruleset): Be a bitset.
17691         (rulesetsize): Remove.
17693 2002-03-04  Akim Demaille  <akim@epita.fr>
17695         * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17696         * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17697         * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17698         * src/closure.c (fderives): Be an array of bitsets.
17700 2002-02-28  Robert Anisko  <robert@lrde.epita.fr>
17702         * data/bison.c++: Merge the two generated headers.  Insert a copyright
17703         notice in each output file.
17705 2002-02-28  Akim Demaille  <akim@epita.fr>
17707         * data/bison.c++: Copy the prologue of bison.simple to fetch
17708         useful M4 definitions, such as b4_header_guard.
17710 2002-02-25  Akim Demaille  <akim@epita.fr>
17712         * src/getargs.c (version): Give the name of the authors, and use a
17713         translator friendly scheme for the bgr
17714         copyright notice.
17716 2002-02-25  Akim Demaille  <akim@epita.fr>
17718         * src/output.c (header_output): Remove, now handled completely via
17719         M4.
17721 2002-02-25  Akim Demaille  <akim@epita.fr>
17723         * m4/m4.m4: New, from CVS Autoconf.
17724         * configure.in: Invoke it.
17725         * src/output.c (output_skeleton): Use its result instead of the
17726         hard coded name.
17728 2002-02-25  Akim Demaille  <akim@epita.fr>
17730         * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17731         Fileutils 4.1.5.
17732         * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17733         * src/output.c (output_skeleton): Use mkstemp to create a real
17734         temporary file.
17735         Move the filling of `skeleton' and its muscle to...
17736         (prepare): here.
17737         (output): Move the definition of the prologue muscle to...
17738         (prepare): here.
17739         * src/system.h (DEFAULT_TMPDIR): New.
17741 2002-02-14  Paul Eggert  <eggert@twinsun.com>
17743         Remove the support for C++ namespace cleanliness; it was
17744         causing more problems than it was curing, since it didn't work
17745         properly on some nonstandard C++ compilers.  This can wait
17746         for a proper C++ parser.
17748         * NEWS: Document this.
17749         * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17750         of C++, as it's treated like C now.
17751         * src/bison.simple (YYSTD): Remove.
17752         (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17753         Treat C++ just like Standard C instead of trying to support
17754         namespace cleanliness.
17756 2002-02-14  Akim Demaille  <akim@epita.fr>
17758         * tests/regression.at (else): Adjust to Andreas' change.
17760 2002-02-14  Akim Demaille  <akim@epita.fr>
17762         * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17764 2002-02-13  Andreas Schwab  <schwab@suse.de>
17766         * src/output.c (output_rule_data): Don't output NULL, it might
17767         not be defined yet.
17769 2002-02-11  Robert Anisko  <robert@lrde.epita.fr>
17771         * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17772         (Copyright notice): Update.
17774 2002-02-11  Akim Demaille  <akim@epita.fr>
17776         * tests/regression.at (%nonassoc and eof): Don't include
17777         nonportable headers.
17779 2002-02-08  Robert Anisko  <robert@lrde.epita.fr>
17781         * data/bison.c++: Correct error recovery.  Make the user able to
17782         initialize the starting location.
17784 2002-02-07  Akim Demaille  <akim@epita.fr>
17786         * tests/input.at: New.
17788 2002-02-07  Robert Anisko  <robert@lrde.epita.fr>
17790         * data/bison.c++: Replace some direct m4 expansions by constants.  Be
17791         more consistent when naming methods and variables.  Put preprocessor
17792         directives around tables only needed for debugging.
17794 2002-02-07  Robert Anisko  <robert@lrde.epita.fr>
17796         * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17797         C++ parsers.
17798         (yy::b4_name::parse): Use print_.
17800 2002-02-07  Robert Anisko  <robert@lrde.epita.fr>
17802         * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17804 2002-02-07  Robert Anisko  <robert@lrde.epita.fr>
17806         * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17807         C++ parsers.
17808         (yy::b4_name::parse): Build verbose error messages, and use error_.
17810 2002-02-06  Robert Anisko  <robert@lrde.epita.fr>
17812         * data/bison.c++: Fix m4 quoting in comments.
17814 2002-02-06  Robert Anisko  <robert@lrde.epita.fr>
17816         * data/bison.c++: Adjust the parser code.  Fix some muscles that were
17817         not expanded by m4.
17819 2002-02-05  Akim Demaille  <akim@epita.fr>
17821         * data/bison.c++: Adjust to the M4 back end.
17822         More is certainly needed.
17824 2002-02-05  Akim Demaille  <akim@epita.fr>
17826         Give a try to M4 as a back end.
17828         * lib/readpipe.c: New, from wdiff.
17829         * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17830         BISON_HAIRY.
17831         * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17832         specific values.  Now it is m4 that performs the lookup.
17833         * src/parse-skel.y: Remove.
17834         * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17835         * src/output.c (actions_output, guards_output)
17836         (token_definitions_output): No longer keeps track of the output
17837         line number, hence remove the second argument.
17838         (guards_output): Check against the guard member of a rule, not the
17839         action member.
17840         Adjust callers.
17841         (output_skeleton): Don't look for the skeleton location, let m4 do
17842         that.
17843         Create `/tmp/muscles.m4'.  This is temporary, a proper temporary
17844         file will be used.
17845         Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17846         (prepare): Given that for the time being changesyntax is not
17847         usable in M4, rename the muscles using `-' to `_'.
17848         Define `defines_flag', `output_parser_name' and `output_header_name'.
17849         * src/output.h (actions_output, guards_output)
17850         (token_definitions_output): Adjust prototypes.
17851         * src/scan-skel.l: Instead of scanning the skeletons, it now
17852         processes the output of m4: `__oline__' and `#output'.
17853         * data/bison.simple: Adjust to be used by M4(sugar).
17854         * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17855         to date.
17856         * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17857         instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17858         * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17859         shamelessly stolen from CVS Autoconf.
17861 2002-02-05  Akim Demaille  <akim@epita.fr>
17863         * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17864         * configure.in: Check for the declarations of free and malloc.
17865         * src/muscle_tab.c: Adjust.
17867 2002-02-05  Akim Demaille  <akim@epita.fr>
17869         * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17870         which have no values.
17872 2002-02-05  Akim Demaille  <akim@epita.fr>
17874         * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17875         * data/: here.
17877 2002-01-29  Paul Eggert  <eggert@twinsun.com>
17879         * src/bison.simple (YYSIZE_T): Do not define merely because
17880         YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17881         On some platforms, <alloca.h> does not declare YYSTD (size_t).
17883 2002-01-27  Akim Demaille  <akim@epita.fr>
17885         Fix `%nonassoc and eof'.
17887         * src/state.c (errs_dup): Aaaah!  The failure was due to bytes
17888         which were not properly copied!  Replace
17889         memcpy (res->errs, src->errs, src->nerrs);
17890         with
17891         memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17892         !!!
17893         * tests/regression.at (%nonassoc and eof): Adjust to newest
17894         Autotest: `.' is not in the PATH.
17896 2002-01-27  Akim Demaille  <akim@epita.fr>
17898         * tests/sets.at (AT_EXTRACT_SETS): New.
17899         (Nullable): Use it.
17900         (Firsts): New.
17902 2002-01-26  Akim Demaille  <akim@epita.fr>
17904         * tests/actions.at, tests/calc.at, tests/headers.at,
17905         * tests/torture.at: Adjust to the newest Autotest which no longer
17906         forces `.' in the PATH.
17908 2002-01-25  Akim Demaille  <akim@epita.fr>
17910         * tests/regression.at (%nonassoc and eof): New.
17911         Suggested by Robert Anisko.
17913 2002-01-24  Akim Demaille  <akim@epita.fr>
17915         Bison dumps core when trying to complain about broken input files.
17916         Reported by Cris van Pelt.
17918         * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17919         * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17920         into...
17921         (Invalid inputs): Strengthen: exercise parse_percent_token.
17923 2002-01-24  Robert Anisko  <robert.anisko@epita.fr>
17925         * src/Makefile.am: Add bison.c++.
17926         * src/bison.c++: New skeleton.
17928 2002-01-21  Paolo Bonzini <bonzini@gnu.org>
17930         * po/it.po: New.
17932 2002-01-21  Kees Zeelenberg  <kzlg@users.sourceforge.net>
17934         * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17936 2002-01-20  Marc Autret  <marc@gnu.org>
17938         * src/files.c (compute_output_file_names): Fix
17940 2002-01-20  Marc Autret  <marc@gnu.org>
17942         * tests/output.at: New test.
17943         * src/files.c (compute_base_names): Don't map extensions when
17944         the YACC flag is set, use defaults.
17945         Reported by Evgeny Stambulchik.
17947 2002-01-20  Marc Autret  <marc@gnu.org>
17949         * src/system.h: Need to define __attribute__ away for non-GCC
17950         compilers as well (i.e., the vendor C compiler).
17951         Suggested by Albert Chin-A-Young.
17953 2002-01-11  Tim Van Holder  <tim.van.holder@pandora.be>
17955         * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17956         canonical definition.
17957         * src/system.h: Use the canonical definition for PARAMS (avoids
17958         a conflict with the macro from lib/hash.h).
17960 2002-01-11  Akim Demaille  <akim@epita.fr>
17962         * configure.in: Use AC_FUNC_STRNLEN.
17963         Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17965 2002-01-09  Akim Demaille  <akim@epita.fr>
17967         * src/files.c, src/files.h (output_infix): New.
17968         (tab_extension): Remove.
17969         (compute_base_names): Compute the former, drop the latter.
17970         * src/output.c (prepare): Insert the muscles `output-infix', and
17971         `output-suffix'.
17972         * src/parse-skel.y (string, string.1): New.
17973         (section.header): Use it.
17974         (section.yacc): Remove.
17975         (prefix): Remove too.
17976         * src/scan-skel.l: Adjust.
17977         * src/bison.simple, src/bison.hairy: Adjust.
17979 2002-01-09  Akim Demaille  <akim@epita.fr>
17981         * configure.in (WERROR_CFLAGS): Compute it.
17982         * src/Makefile.am (CFLAGS): Pass it.
17983         * tests/atlocal.in (CFLAGS): Idem.
17984         * src/files.c: Fix a few warnings.
17985         (get_extension_index): Remove, unused.
17987 2002-01-08  Akim Demaille  <akim@epita.fr>
17989         * src/getargs.c (AS_FILE_NAME): New.
17990         (getargs): Use it to convert DOSish file names.
17991         * src/files.c (base_name): Rename as full_base_name to avoid
17992         clashes with `base_name ()'.
17993         (filename_split): New.
17994         (compute_base_names): N-th rewrite, using filename_split.
17996 2002-01-08  Akim Demaille  <akim@epita.fr>
17998         * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17999         New, stolen from the Fileutils 4.1.
18000         * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18001         * configure.in: Check for the presence of memrchr, and of its
18002         prototype.
18004 2002-01-07  Tim Van Holder  <tim.van.holder@pandora.be>
18006         * lib/hash.h (__P): Added definition for this macro.
18007         * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18008         BUILT_SOURCES, to ensure they are generated first.
18009         * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18010         %error-verbose to allow bootstrapping with bison 1.30x.
18012 2002-01-06  Akim Demaille  <akim@epita.fr>
18014         * src/reader.c (parse_braces): Don't fetch the next char, the
18015         convention is to fetch on entry.
18016         * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18017         'switch' without a following semicolon.
18018         * tests/regression.at (braces parsing): New.
18020 2002-01-06  Akim Demaille  <akim@epita.fr>
18022         Bison is dead wrong in its RR conflict reports.
18024         * tests/torture.at (GNU Cim Grammar): New.
18025         * src/conflicts.c (count_rr_conflicts): Fix.
18027 2002-01-06  Akim Demaille  <akim@epita.fr>
18029         Creating package.m4 from configure.ac causes too many problems.
18031         * tests/Makefile.am (package.m4): Create it by hand,
18032         AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18034 2002-01-06  Akim Demaille  <akim@epita.fr>
18036         * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18037         skeleton.h.
18039 2002-01-04  Paul Eggert  <eggert@twinsun.com>
18041         * doc/bison.texinfo (Debugging):
18042         Remove YYSTDERR; it's no longer defined or used.
18043         Also, s/cstdio.h/cstdio/.
18045 2002-01-03  Akim Demaille  <akim@epita.fr>
18047         * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18049 2002-01-03  Akim Demaille  <akim@epita.fr>
18051         * src/parse-skel.y (process_skeleton): Don't bind the parser's
18052         tracing code to --trace, wait for a better --trace option, with
18053         args.
18055 2002-01-03  Akim Demaille  <akim@epita.fr>
18057         * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18058         The ISO C++ standard is extremely clear about it: stderr is
18059         considered a macro, not a regular symbol (see table 94 `Header
18060         <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18061         Therefore std:: does not apply to it.  It still does with fprintf.
18062         Also, s/cstdio.h/cstdio/.
18064 2002-01-03  Akim Demaille  <akim@epita.fr>
18066         * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18067         for non system headers.
18069 2002-01-02  Akim Demaille  <akim@epita.fr>
18071         Equip the skeleton chain with location tracking, runtime trace,
18072         pure parser and scanner.
18074         * src/parse-skel.y: Request a pure parser, locations, and prefix
18075         renaming.
18076         (%union): Having several members with the same type does not help
18077         type mismatches, simplify.
18078         (YYPRINT, yyprint): New.
18079         (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18080         (skel_error): this.
18081         Handle locations.
18082         * src/scan-skel.l: Adjust to these changes.
18083         * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18084         (LOCATION_PRINT, skel_control_t): New.
18086 2001-12-30  Akim Demaille  <akim@epita.fr>
18088         * src/parse-skel.y: Get rid of the shift/reduce conflict:
18089         replace `gb' with BLANKS.
18090         * src/scan-skel.l: Adjust.
18092 2001-12-30  Akim Demaille  <akim@epita.fr>
18094         * src/system.h: We don't need nor want bcopy.
18095         Throw away MS-DOS crap: we don't need getpid.
18096         * configure.in: We don't need strndup.  It was even causing
18097         problems: because Flex includes the headers *before* us,
18098         _GNU_SOURCE is not defined by config.h, and therefore strndup was
18099         not visible.
18100         * lib/xstrndup.c: New.
18101         * src/scan-skel.l: Use it.
18102         Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18103         * src/parse-skel.y: Use %directives instead of #defines.
18105 2001-12-30  Akim Demaille  <akim@epita.fr>
18107         * src/skeleton.h: New.
18108         * src/output.c (output_parser, output_master_parser): Remove, dead
18109         code.
18110         * src/output.h (get_lines_number, actions_output, guards_output)
18111         (token_definitions_output): Prototype them.
18112         * src/parse-skel.y: Add the license notice.
18113         Include output.h and skeleton.h.
18114         (process_skeleton): Returns void, and takes a single parameter.
18115         * src/scan-skel.l: Add the license notice.
18116         Include skeleton.h.
18117         Don't use %option yylineno: it seems that then Flex imagines
18118         REJECT has been used, and therefore it won't reallocate its
18119         buffers (which makes no other sense to me than a bug).  It results
18120         in warnings for `unused: yy_flex_realloc'.
18122 2001-12-30  Robert Anisko  <robert.anisko@epita.fr>
18124         * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18125         (MUSCLE_INSERT_PREFIX): ...to there.
18126         * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18127         (MUSCLE_INSERT_PREFIX): Move from here...
18129         * src/bison.hairy: Add a section directive.  Put braces around muscle
18130         names.  This parser skeleton is still broken, but Bison should not
18131         choke on a bad muscle 'syntax'.
18132         * src/bison.simple: Add a section directive.  Put braces around muscle
18133         names.
18135         * src/files.h (strsuffix, stringappend): Add declarations.
18136         (tab_extension): Add declaration.
18137         (short_base_name): Add declaration.
18139         * src/files.c (strsuffix, stringappend): No longer static.  These
18140         functions are used in the skeleton parser.
18141         (tab_extension): New.
18142         (compute_base_names): Use the computations done in this function
18143         to guess if the generated parsers should have '.tab' in their
18144         names.
18145         (short_base_name): No longer static.
18147         * src/output.c (output_skeleton): New.
18148         (output): Disable call to output_master_parser, and give a try to
18149         a new skeleton handling system.
18150         (guards_output, actions_output): No longer static.
18151         (token_definitions_output, get_lines_number): No longer static.
18153         * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18155         * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18156         parse-skel.y.
18158         * src/parse-skel.y: New file.
18159         * src/scan-skel.l: New file.
18161 2001-12-29  Akim Demaille  <akim@epita.fr>
18163         %name-prefix is broken.
18165         * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18166         Adjust all dependencies.
18167         * tests/headers.at (export YYLTYPE): Strengthen this test: use
18168         %name-prefix.
18170         Renaming yylval but not yylloc is not consistent.  Now we do.
18172         * src/bison.simple: Prefix yylloc if used.
18173         * doc/bison.texinfo (Decl Summary): Document that.
18175 2001-12-29  Akim Demaille  <akim@epita.fr>
18177         * doc/bison.texinfo: Promote `%long-directive' over
18178         `%long_directive'.
18179         Remove all references to fixed-output-files, yacc is enough.
18181 2001-12-29  Akim Demaille  <akim@epita.fr>
18183         * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18184         user prologue.  These are defaults.
18185         * tests/actions.at (Mid-rule actions): Make sure the user can
18186         define YYDEBUG and YYERROR_VERBOSE.
18188 2001-12-29  Akim Demaille  <akim@epita.fr>
18190         * src/output.c (header_output): Don't forget to export YYLTYPE and
18191         yylloc.
18192         * tests/headers.at (export YYLTYPE): New, make sure it does.
18193         * tests/regression.at (%union and --defines, Invalid CPP headers):
18194         Move to...
18195         * tests/headers.at: here.
18197 2001-12-29  Akim Demaille  <akim@epita.fr>
18199         * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18201 2001-12-29  Akim Demaille  <akim@epita.fr>
18203         * tests/actions.at (Mid-rule actions): Output on a single line
18204         instead of several.
18206 2001-12-29  Akim Demaille  <akim@epita.fr>
18208         * doc/bison.texinfo: Formatting changes.
18210 2001-12-29  Akim Demaille  <akim@epita.fr>
18212         Don't store the token defs in a muscle, just be ready to output it
18213         on command.  Now possible via `symbols'.  Fixes a memory leak.
18215         * src/output.c (token_definitions_output): New.
18216         (output_parser, header_output): Use it.
18217         * src/reader.c (symbols_save): Remove.
18219 2001-12-29  Akim Demaille  <akim@epita.fr>
18221         * src/bison.simple: Do not provide a default for YYSTYPE and
18222         YYLTYPE before the user's prologue.  Otherwise it's hardly... a
18223         default.
18225 2001-12-29  Akim Demaille  <akim@epita.fr>
18227         Mid-rule actions are simply... ignored!
18229         * src/reader.c (readgram): Be sure to attach mid-rule actions to
18230         the empty-rule associated to the dummy symbol, not to the host
18231         rule.
18232         * tests/actions.at (Mid-rule actions): New.
18234 2001-12-29  Akim Demaille  <akim@epita.fr>
18236         Memory leak.
18238         * src/reader.c (reader): Free grammar.
18240 2001-12-29  Akim Demaille  <akim@epita.fr>
18242         Memory leak.
18244         * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18245         since it allocates it for each state, although only one is needed.
18246         (allocate_storage): Do it here.
18248 2001-12-29  Akim Demaille  <akim@epita.fr>
18250         * src/options.h, src/options.c (create_long_option_table): Rename
18251         as...
18252         (long_option_table_new): this, with a clearer prototype.
18253         (percent_table): Remove, unused,
18254         * src/getargs.c (getargs): Adjust.
18256 2001-12-29  Akim Demaille  <akim@epita.fr>
18258         * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18259         * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18260         as states.
18262 2001-12-29  Akim Demaille  <akim@epita.fr>
18264         * src/lalr.c (build_relations): Rename `states' as `states1'.
18265         Sorry, I don't understand exactly what it is, no better name...
18267 2001-12-29  Akim Demaille  <akim@epita.fr>
18269         * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18270         * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18271         * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18272         as rules.
18274 2001-12-29  Akim Demaille  <akim@epita.fr>
18276         * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18277         ago.
18279 2001-12-29  Akim Demaille  <akim@epita.fr>
18281         * src/reader.c, src/reader.h (user_toknums): Remove.
18282         Adjust all users to use symbols[i]->user_token_number.
18284 2001-12-29  Akim Demaille  <akim@epita.fr>
18286         * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18287         Adjust all users to use symbols[i]->prec or ->assoc.
18289 2001-12-29  Akim Demaille  <akim@epita.fr>
18291         * src/reader.c, src/reader.h (tags): Remove.
18292         Adjust all users to use symbols[i]->tag.
18294 2001-12-29  Akim Demaille  <akim@epita.fr>
18296         * src/gram.h, src/gram.c (symbols): New, similar to state_table
18297         and rule_table.
18298         * src/reader.c (packsymbols): Fill this table.
18299         Drop sprec.
18300         * src/conflicts.c (resolve_sr_conflict): Adjust.
18301         * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18302         single table.
18303         Use symbols[i]->tag instead of tags[i].
18305 2001-12-29  Akim Demaille  <akim@epita.fr>
18307         * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18308         In addition, put a comment in there, to replace...
18309         * tests/regression.at (%union and C comments): Remove.
18311 2001-12-29  Akim Demaille  <akim@epita.fr>
18313         * tests/regression.at (Web2c Actions): Blindly move the actual
18314         output as expected output.  The contents *seem* right to me, but I
18315         can't pretend reading perfectly parser tables...  Nonetheless, all
18316         the other tests pass correctly, the table look OK, even though the
18317         presence of `$axiom' is to be noted: AFAICS it is useless (but
18318         harmless).
18320 2001-12-29  Akim Demaille  <akim@epita.fr>
18322         * src/reader.c (readgram): Don't add the rule 0 if there were no
18323         rules read.  In other words, add it _after_ having performed
18324         grammar sanity checks.
18325         Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18327 2001-12-29  Akim Demaille  <akim@epita.fr>
18329         * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18330         visible, and some states have now a different number.
18332 2001-12-29  Akim Demaille  <akim@epita.fr>
18334         * src/reader.c (readgram): Bind the initial rule's lineno to that
18335         of the first rule.
18336         * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18337         (Solved SR Conflicts): Adjust rule 0's line number.
18339 2001-12-29  Akim Demaille  <akim@epita.fr>
18341         Fix the `GAWK Grammar' failure.
18343         * src/LR0.c (final_state): Initialize to -1 so that we do compute
18344         the reductions of the first state which was mistakenly confused
18345         with the final state because precisely final_state was initialized
18346         to 0.
18347         * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18348         now noticed by Bison.
18349         * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18350         have a reduction on $default.
18352 2001-12-29  Akim Demaille  <akim@epita.fr>
18354         * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18355         rule line numbers.
18356         * src/closure.c (print_closure): Likewise.
18357         * src/derives.c (print_derives): Likewise.
18358         * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18359         now.
18361 2001-12-29  Akim Demaille  <akim@epita.fr>
18363         * src/lalr.c (lookaheads_print): New.
18364         (lalr): Call it when --trace-flag.
18365         * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18366         are dumped.
18368 2001-12-29  Akim Demaille  <akim@epita.fr>
18370         * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18371         when walking through ritem, even via rule->rhs.
18372         * src/reduce.c (dump_grammar, useful_production, reduce_output)
18373         (useful_production, useless_nonterminals): Likewise.
18374         (reduce_grammar_tables): Likewise, plus update nritems.
18375         * src/nullable.c (set_nullable): Likewise.
18376         * src/lalr.c (build_relations): Likewise.
18377         * tests/sets.at (Nullable): Adjust.
18378         Fortunately, now, the $axiom is no longer nullable.
18380 2001-12-29  Akim Demaille  <akim@epita.fr>
18382         * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18383         the 0-sentinel.
18384         * src/gram.c (ritem_longest_rhs): Likewise.
18385         * src/reduce.c (nonterminals_reduce): Likewise.
18386         * src/print_graph.c (print_graph): Likewise.
18387         * src/output.c (output_rule_data): Likewise.
18388         * src/nullable.c (set_nullable):  Likewise.
18390 2001-12-29  Akim Demaille  <akim@epita.fr>
18392         * src/output.c: Comment changes.
18394 2001-12-27  Paul Eggert  <eggert@twinsun.com>
18396         * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18397         cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18398         Sparc, as they were causing more porting problems than the
18399         (minor) performance improvement was worth.
18401         Also, catch up with 1.31's YYSTD.
18403 2001-12-27  Akim Demaille  <akim@epita.fr>
18405         * src/output.c (output_gram): Rely on nritems, not the
18406         0-sentinel.  See below.
18407         Use -1 as separator, not 0.
18408         * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18409         Rely on -1 as separator in yyrhs, instead of 0.
18410         * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18411         twice `Now at end of input', therefore there are two lines less to
18412         expect.
18414 2001-12-27  Akim Demaille  <akim@epita.fr>
18416         * tests/regression.at (Unresolved SR Conflicts):
18417         (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18418         below.
18420 2001-12-27  Akim Demaille  <akim@epita.fr>
18422         * src/LR0.c (new_state): Recognize the final state by the fact it
18423         is reached by eoftoken.
18424         (insert_start_shifting_state, insert_eof_shifting_state)
18425         (insert_accepting_state, augment_automaton): Remove, since now
18426         these states are automatically computed from the initial state.
18427         (generate_states): Adjust.
18428         * src/print.c: When reporting a rule number to the user, substract
18429         1, so that the axiom rule is rule 0, and the first user rule is 1.
18430         * src/reduce.c: Likewise.
18431         * src/print_graph.c (print_core): For the time being, just as for
18432         the report, depend upon --trace-flags to dump the full set of
18433         items.
18434         * src/reader.c (readgram): Once the grammar read, insert the rule
18435         0: `$axiom: START-SYMBOL $'.
18436         * tests/set.at: Adjust: rule 0 is now displayed, and since the
18437         number of the states has changed (the final state is no longer
18438         necessarily the last), catch up.
18440 2001-12-27  Akim Demaille  <akim@epita.fr>
18442         Try to make the use of the eoftoken valid.  Given that its value
18443         is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18444         is used instead of > 0 where appropriate, (ii), depend upon nritems
18445         instead of the 0-sentinel.
18447         * src/gram.h, src/gram.c (nritems): New.
18448         Expected to be duplication of nitems, but for the time being...
18449         * src/reader.c (packgram): Assert nritems and nitems are equal.
18450         * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18451         * src/closure.c (print_closure, print_fderives): Likewise.
18452         * src/gram.c (ritem_print): Likewise.
18453         * src/print.c (print_core, print_grammar): Likewise.
18454         * src/print_graph.c: Likewise.
18456 2001-12-27  Akim Demaille  <akim@epita.fr>
18458         * src/main.c (main): If there are complains after grammar
18459         reductions, then output the report anyway if requested, then die.
18460         * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18461         * src/reader.c (eoftoken): New.
18462         (parse_token_decl): If the token being defined has value `0', it
18463         is the eoftoken.
18464         (packsymbols): No longer hack `tags' to insert `$' by hand.
18465         Be sure to preserve the value of the eoftoken.
18466         (reader): Make sure eoftoken is defined.
18467         Initialize nsyms to 0: now eoftoken is created just like the others.
18468         * src/print.c (print_grammar): Don't special case the eof token.
18469         * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18470         lie anyway, albeit pleasant.
18471         * tests/calc.at: Exercise error messages with eoftoken.
18472         Change the grammar so that empty input is invalid.
18473         Adjust expectations.
18474         When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18476 2001-12-27  Akim Demaille  <akim@epita.fr>
18478         * configure.in: Check the protos of strchr ans strspn.
18479         Replace strchr if needed.
18480         * src/system.h: Provide the protos of strchr, strspn and memchr if
18481         missing.
18482         * lib/strchr.c: New.
18483         * src/reader.c (symbols_save): Use strchr.
18485 2001-12-27  Akim Demaille  <akim@epita.fr>
18487         * src/print.c, src/print_graph.c (escape): New.
18488         Use it to quote the TAGS outputs.
18489         * src/print_graph.c (print_state): Now errors are in red, and
18490         reductions in green.
18491         Prefer high to wide: output the state number on a line of its own.
18493 2001-12-27  Akim Demaille  <akim@epita.fr>
18495         * src/state.h, src/state.c (reductions_new): New.
18496         * src/LR0.c (set_state_table): Let all the states have a
18497         `reductions', even if reduced to 0.
18498         (save_reductions): Adjust.
18499         * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18500         * src/print.c (print_reductions, print_actions): Adjust.
18501         * src/output.c (action_row): Adjust.
18503 2001-12-27  Akim Demaille  <akim@epita.fr>
18505         * src/state.h, src/state.c (errs_new, errs_dup): New.
18506         * src/LR0.c (set_state_table): Let all the states have an errs,
18507         even if reduced to 0.
18508         * src/print.c (print_errs, print_reductions): Adjust.
18509         * src/output.c (output_actions, action_row): Adjust.
18510         * src/conflicts.c (resolve_sr_conflict): Adjust.
18512 2001-12-27  Akim Demaille  <akim@epita.fr>
18514         * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18516 2001-12-27  Akim Demaille  <akim@epita.fr>
18518         * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18519         * src/print.c: here.
18520         (lookaheadset, shiftset): New, used as additional storage by
18521         print_reductions.
18522         (print_results): Adjust.
18523         (print_shifts, print_gotos, print_errs): New, extracted from...
18524         (print_actions): here.
18525         * src/print_graph.c (print_actions): Remove dead code.
18527 2001-12-27  Akim Demaille  <akim@epita.fr>
18529         * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18530         `$n' and `@n'.
18532 2001-12-27  Akim Demaille  <akim@epita.fr>
18534         * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18535         (build_relations): Adjust.
18537 2001-12-27  Akim Demaille  <akim@epita.fr>
18539         * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18540         duplication.
18542 2001-12-27  Akim Demaille  <akim@epita.fr>
18544         * src/reader.c (packgram): Catch nitems overflows.
18546 2001-12-27  Akim Demaille  <akim@epita.fr>
18548         * src/files.c, src/files.h (guard_obstack): Remove.
18549         * src/output.c (output): Adjust.
18550         * src/reader.c (parse_braces): New, factoring...
18551         (copy_action, copy_guard): these two which are renamed as...
18552         (parse_action, parse_guard): these.
18553         As a voluntary consequence, using braces around guards is now
18554         mandatory.
18556 2001-12-27  Akim Demaille  <akim@epita.fr>
18558         * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18559         * src/reader.c (symbol_list): `guard' and `guard_line' are new
18560         members.
18561         (symbol_list_new): Adjust.
18562         (copy_action): action_line is the first line, not the last.
18563         (copy_guard): Just as for actions, store the `action' only, not
18564         the switch/case/break flesh.
18565         Don't parse the user action that might follow the guard, let...
18566         (readgram): do it, i.e., now, there can be an action after a
18567         guard.
18568         In other words the guard is just explicitly optional.
18569         (packgram): Adjust.
18570         * src/output.c (guards_output): New.
18571         (output_parser): Call it when needed.
18572         (output): Also free the guard and attrs obstacks.
18573         * src/files.c, src/files.h (obstack_save): Remove.
18574         (output_files): Remove.
18575         As a result, if one needs the former `.act' file, using an
18576         appropriate skeleton which requires actions and guards is now
18577         required.
18578         * src/main.c (main): Adjust.
18579         * tests/semantic.at: New.
18580         * tests/regression.at: Use `input.y' as input file name.
18581         Avoid 8+3 problems by requiring input.c when the test needs the
18582         parser.
18584 2001-12-27  Akim Demaille  <akim@epita.fr>
18586         * src/reader.c (symbol_list_new): Be sure to initialize all the
18587         fields.
18589 2001-12-27  Akim Demaille  <akim@epita.fr>
18591         All the hacks using a final pseudo state are now useless.
18593         * src/LR0.c (set_state_table): state_table holds exactly nstates.
18594         * src/lalr.c (nLA): New.
18595         (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18596         instead of lookaheadsp from the pseudo state (nstate + 1).
18598 2001-12-27  Akim Demaille  <akim@epita.fr>
18600         * src/output.c (action_row, token_actions): Use a state_t instead
18601         of a integer, and nlookaheads instead of the following state's
18602         lookaheadsp.
18604 2001-12-27  Akim Demaille  <akim@epita.fr>
18606         * src/conflicts.c (log_resolution, flush_shift)
18607         (resolve_sr_conflict, set_conflicts, solve_conflicts)
18608         (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18609         (conflicts_print, print_reductions): Use a state_t instead of an
18610         integer when referring to a state.
18611         As much as possible, depend upon nlookaheads, instead of the
18612         `lookaheadsp' member of the following state (since lookaheads of
18613         successive states are successive, the difference between state n + 1
18614         and n served as the number of lookaheads for state n).
18615         * src/lalr.c (add_lookback_edge): Likewise.
18616         * src/print.c (print_core, print_actions, print_state)
18617         (print_results): Likewise.
18618         * src/print_graph.c (print_core, print_actions, print_state)
18619         (print_graph): Likewise.
18620         * src/conflicts.h: Adjust.
18622 2001-12-27  Akim Demaille  <akim@epita.fr>
18624         * src/bison.hairy: Formatting/comment changes.
18625         ANSIfy.
18626         Remove `register' indications.
18627         Add plenty of `static'.
18629 2001-12-27  Akim Demaille  <akim@epita.fr>
18631         * src/output.c (prepare): Drop the muscle `ntbase' which
18632         duplicates ntokens.
18633         * src/bison.simple: Formatting/comment changes.
18634         Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18635         is an undocumented synonym.
18637 2001-12-22  Akim Demaille  <akim@epita.fr>
18639         * src/output.c (output_table_data): Change the prototype to use
18640         `int' for array ranges: some invocations do pass an int, not a
18641         short.
18642         Reported by Wayne Green.
18644 2001-12-22  Akim Demaille  <akim@epita.fr>
18646         Some actions of web2c.y are improperly triggered.
18647         Reported by Mike Castle.
18649         * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18650         * tests/regression.at (Web2c): Rename as...
18651         (Web2c Report): this.
18652         (Web2c Actions): New.
18654 2001-12-22  Akim Demaille  <akim@epita.fr>
18656         Reductions in web2c.y are improperly reported.
18657         Reported by Mike Castle.
18659         * src/conflicts.c (print_reductions): Fix.
18660         * tests/regression.at (Web2c): New.
18662 2001-12-18  Akim Demaille  <akim@epita.fr>
18664         Some host fail on `assert (!"foo")', which expands to
18665         ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18666         Reported by Nelson Beebee.
18668         * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18669         `#define it_succeeded 0' and `assert (it_succeeded)'.
18671 2001-12-17  Marc Autret  <autret_m@epita.fr>
18673         * src/bison.simple: Don't hard code the skeleton line and filename.
18674         * src/output.c (output_parser): Rename 'line' as 'output_line'.
18675         New line counter 'skeleton_line' (skeleton-line muscle).
18677 2001-12-17  Paul Eggert  <eggert@twinsun.com>
18679         * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18680         YYDEBUG must be defined to a nonzero value.
18682         * src/bison.simple (yytname): Do not assume that the user defines
18683         YYDEBUG to a properly parenthesized expression.
18685 2001-12-17  Akim Demaille  <akim@epita.fr>
18687         * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18688         nlookaheads is a new member.
18689         Adjust all users.
18690         * src/lalr.h (nlookaheads): Remove this orphan declaration.
18691         * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18692         state.
18694 2001-12-17  Akim Demaille  <akim@epita.fr>
18696         * src/files.h, src/files.c (open_files, close_files): Remove.
18697         * src/main.c (main): Don't open/close files, nor invoke lex_free,
18698         let...
18699         * src/reader.c (reader): Do it.
18701 2001-12-17  Akim Demaille  <akim@epita.fr>
18703         * src/conflicts.c (print_reductions): Formatting changes.
18705 2001-12-17  Akim Demaille  <akim@epita.fr>
18707         * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18708         (flush_reduce): New.
18709         (resolve_sr_conflict): Adjust.
18711 2001-12-17  Akim Demaille  <akim@epita.fr>
18713         * src/output.c (output_obstack): Be static and rename as...
18714         (format_obstack): this, to avoid any confusion with files.c's
18715         output_obstack.
18716         * src/reader.h (muscle_obstack): Move to...
18717         * src/output.h: here, since it's defined in output.c.
18719 2001-12-17  Akim Demaille  <akim@epita.fr>
18721         * src/output.c (action_row, save_column, default_goto)
18722         (sort_actions, matching_state, pack_vector): Better variable
18723         locality.
18725 2001-12-17  Akim Demaille  <akim@epita.fr>
18727         * src/output.c: Various formatting changes.
18729 2001-12-17  Akim Demaille  <akim@epita.fr>
18731         * src/files.c (output_files): Free the output_obstack.
18732         * src/main.c (main): Call print and print_graph conditionally.
18733         * src/print.c (print): Work unconditionally.
18734         * src/print_graph.c (print_graph): Work unconditionally.
18735         * src/conflicts.c (log_resolution): Output only if verbose_flag.
18737 2001-12-16  Marc Autret  <autret_m@epita.fr>
18739         * src/output.c (actions_output): Fix. When we use %no-lines,
18740         there is one less line per action.
18742 2001-12-16  Marc Autret  <autret_m@epita.fr>
18744         * src/bison.simple: Remove a useless #line directive.
18745         s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18746         * src/output.c (get_lines_number): New.
18747         (output_parser): Adjust, now takes care about the lines of a
18748         output muscles.
18749         Fix line numbering.
18750         (actions_output): Computes the number of lines taken by actions.
18751         (output_master_parser): Insert new skeleton which is the name of
18752         the output parser file name.
18754 2001-12-15  Marc Autret  <autret_m@epita.fr>
18756         * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18758 2001-12-15  Marc Autret  <autret_m@epita.fr>
18760         * src/output.c (output_gram): Keep track of the hairy one.
18762 2001-12-15  Akim Demaille  <akim@epita.fr>
18764         Make `make distcheck' work.
18766         * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18767         system.h which uses libgettext.h.
18769 2001-12-15  Akim Demaille  <akim@epita.fr>
18771         * src/nullable.c (set_nullable): Useless rules must be skipped,
18772         otherwise, since we range over their symbols, we might look at a
18773         nonterminal which no longer ``exists'', i.e., it is not counted in
18774         `nvars', hence we overflow our arrays.
18776 2001-12-15  Akim Demaille  <akim@epita.fr>
18778         The header can also be produced directly, without any obstack!
18779         Yahoo!
18781         * src/files.c, src/files.h (defines_obstack): Remove.
18782         (compute_header_macro): Global.
18783         (defines_obstack_save): Remove.
18784         * src/reader.c (parse_union_decl): No longer output to
18785         defines_obstack: its content can be found in the `stype' muscle
18786         anyway.
18787         (output_token_translations): Merge into...
18788         (symbols_output): this.
18789         Rename as...
18790         (symbols_save): this.
18791         (reader): Adjust.
18792         * src/output.c (header_output): New.
18793         (output): Call it.
18795 2001-12-15  Akim Demaille  <akim@epita.fr>
18797         * src/reader.c (parse_union_decl): Instead of handling two obstack
18798         simultaneously, use one to define the `stype' muscle, and use the
18799         value of the latter to fill defines_obstack.
18800         (copy_comment): Remove.
18801         (copy_comment2): Work for a single obstack.
18802         Rename as...
18803         (copy_comment): this.
18805 2001-12-15  Akim Demaille  <akim@epita.fr>
18807         * src/lex.c, src/lex.h (xgetc): No longer static.
18808         * src/reader.c (parse_union_decl): Revamp.
18810 2001-12-15  Akim Demaille  <akim@epita.fr>
18812         Still making progress in separating Bison into (i) input, (ii)
18813         process, (iii) output: now we can directly output the parser file
18814         without using table_obstack at all.
18816         * src/files.c, src/files.h (table_obstack): Bye bye.
18817         (parser_file_name): New.
18818         * src/files.c (compute_output_file_names): Compute it.
18819         * src/output.c (actions_output, output_parser)
18820         (output_master_parser): To a file instead of an obstack.
18822 2001-12-15  Akim Demaille  <akim@epita.fr>
18824         Attach actions to rules, instead of pre-outputting them to
18825         actions_obstack.
18827         * src/gram.h (rule_t): action and action_line are new members.
18828         * src/reader.c (symbol_list): Likewise.
18829         (copy_action): Save the actions within the rule.
18830         (packgram): Save them in rule_table.
18831         * src/output.c (actions_output): New.
18832         (output_parser): Use it on `%%actions'.
18833         (output_rule_data): Don't free rule_table.
18834         (output): Do it.
18835         (prepare): Don't save the `action' muscle.
18836         * src/bison.simple: s/%%action/%%actions/.
18838 2001-12-15  Akim Demaille  <akim@epita.fr>
18840         * src/reader.c (copy_action): When --yacc, don't append a `;'
18841         to the user action: let it fail if lacking.
18842         Suggested by Arnold Robbins and Tom Tromey.
18844 2001-12-14  Akim Demaille  <akim@epita.fr>
18846         * src/lex.c (literalchar): Simply return the char you decoded, non
18847         longer mess around with obstacks and int pointers.
18848         Adjust all callers.
18850 2001-12-14  Akim Demaille  <akim@epita.fr>
18852         * src/lex.c (literalchar): Don't escape the special characters,
18853         just decode them, and keep them as char (before, eol was output as
18854         the 2 char string `\n' etc.).
18855         * src/output.c (output_rule_data): Use quotearg to output the
18856         token strings.
18858 2001-12-13  Paul Eggert  <eggert@twinsun.com>
18860         * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18861         Do not infringe on the global user namespace when using C++.
18862         (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18863         All uses of `fprintf' and `stderr' changed.
18865         * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18867 2001-12-13  Akim Demaille  <akim@epita.fr>
18869         The computation of nullable is broken: it doesn't handle empty
18870         RHS's properly.
18872         * tests/torture.at (GNU AWK Grammar): New.
18873         * tests/sets.at (Nullable): New.
18874         * src/nullable.c (set_nullable): Instead of blindly looping over
18875         `ritems', loop over the rules, and then over their rhs's.
18877         Work around Autotest bugs.
18879         * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18880         frame, because Autotest understand lines starting with a `+' as
18881         traces from the shell.  Then, they are not processed properly.
18882         Admittedly an Autotest bug, but we don't have time to wait for
18883         Autotest to catch up.
18884         * tests/regression.at (Broken Closure): Adjust to the new table
18885         frames.
18886         Move to...
18887         * tests/sets.at: here.
18889 2001-12-13  Akim Demaille  <akim@epita.fr>
18891         * src/closure.c (closure): Use nrules instead of playing tricks
18892         with BITS_PER_WORD.
18894 2001-12-13  Akim Demaille  <akim@epita.fr>
18896         * src/print.c (print_actions): Output the handling of `$' as the
18897         traces do: shifting the token EOF.  Before EOF was treated as a
18898         nonterminal.
18899         * tests/regression.at: Adjust some tests.
18900         * src/print_graph.c (print_core): Complete the set of items via
18901         closure.  The next-to-final and final states are still unsatisfying,
18902         but that's to be addressed elsewhere.
18903         No longer output the rule numbers, but do output the state number.
18904         A single loop for the shifts + gotos is enough, but picked a
18905         distinct color for each.
18906         (print_graph): Initialize and finalize closure.
18908 2001-12-13  Akim Demaille  <akim@epita.fr>
18910         * src/reader.c (readgram): Remove dead code, an strip useless
18911         braces.
18912         (get_type): Remove, unused.
18914 2001-12-12  Akim Demaille  <akim@epita.fr>
18916         * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18917         on that of lib/error.c.
18919 2001-12-12  Akim Demaille  <akim@epita.fr>
18921         Some hosts don't like `/' in includes.
18923         * src/system.h: Include libgettext.h without qualifying the path.
18924         * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18925         $(top_srcdir).
18927 2001-12-11  Marc Autret  <autret_m@epita.fr>
18929         * src/output.c (output_parser): Remove useless muscle.
18931 2001-12-11  Marc Autret  <autret_m@epita.fr>
18933         * src/bison.simple: Remove #line just before %%epilogue. It
18934         is now handled in ...
18935         * src/reader.c (read_additionnal_code): Add the output of a
18936         #line for the epilogue.
18938 2001-12-10  Marc Autret  <autret_m@epita.fr>
18940         * src/reader.c (copy_definition): Re-use CPP-outed code which
18941         replace precedent remove.
18942         * src/bison.simple: Remove #line before %%prologue because
18943         %%input-line is wrong at this time.
18945 2001-12-10  Marc Autret  <autret_m@epita.fr>
18947         * src/reader.c (symbols_output): Clean up.
18948         * src/output.c (output_gram, output): Clean up.
18950 2001-12-10  Akim Demaille  <akim@epita.fr>
18952         * src/lalr.c (initialize_lookaheads): New.  Extracted from...
18953         * src/LR0.c (set_state_table): here.
18954         * src/lalr.c (lalr): Call it.
18956 2001-12-10  Akim Demaille  <akim@epita.fr>
18958         * src/state.h (shifts): Remove the `number' member: shifts are
18959         attached to state, hence no longer need to be labelled with a
18960         state number.
18962 2001-12-10  Akim Demaille  <akim@epita.fr>
18964         Now that states have a complete set of members, the linked list of
18965         shifts is useless: just fill directly the state's shifts member.
18967         * src/state.h (shifts): Remove the `next' member.
18968         * src/LR0.c (first_state, last_state): Remove.
18969         Adjust the callers.
18970         (augment_automaton): Don't look for the shifts that must be added
18971         a shift on EOF: it is those of the state we looked for!  But now,
18972         since shifts are attached, it is no longer needed to looking
18973         merely by its id: its number.
18975 2001-12-10  Akim Demaille  <akim@epita.fr>
18977         * src/LR0.c (augment_automaton): Better variable locality.
18978         Remove an impossible branch: if there is a state corresponding to
18979         the start symbol being shifted, then there is shift for the start
18980         symbol from the initial state.
18982 2001-12-10  Akim Demaille  <akim@epita.fr>
18984         * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18985         only when appropriate: when insert_start_shifting_state' is not
18986         invoked.
18987         * tests/regression.at (Rule Line Numbers): Adjust.
18989 2001-12-10  Akim Demaille  <akim@epita.fr>
18991         * src/LR0.c (augment_automaton): Now that all states have shifts,
18992         merge the two cases addition shifts to the initial state.
18994 2001-12-10  Akim Demaille  <akim@epita.fr>
18996         * src/lalr.c (set_state_table): Move to...
18997         * src/LR0.c: here.
18998         * src/lalr.c (lalr): Don't call it...
18999         * src/LR0.c (generate_states): do it.
19000         * src/LR0.h (first_state): Remove, only the table is used.
19002 2001-12-10  Akim Demaille  <akim@epita.fr>
19004         * src/LR0.h (first_shift, first_reduction): Remove.
19005         * src/lalr.c: Don't use first_shift: find shifts through the
19006         states.
19008 2001-12-10  Akim Demaille  <akim@epita.fr>
19010         * src/LR0.c: Attach shifts to states as soon as they are
19011         computed.
19012         * src/lalr.c (set_state_table): Instead of assigning shifts to
19013         state, just assert that the mapping was properly done.
19015 2001-12-10  Akim Demaille  <akim@epita.fr>
19017         * src/LR0.c (insert_start_shift): Rename as...
19018         (insert_start_shifting_state): this.
19019         (insert_eof_shifting_state, insert_accepting_state): New.
19020         (augment_automaton): Adjust.
19021         Better locality of the variables.
19022         When looking if the start_symbol is shifted from the initial
19023         state, using `while (... symbol != start_symbol ...)' sounds
19024         better than `while (... symbol < start_symbol ...)': If fail
19025         to see how the order between symbols could be relevant!
19027 2001-12-10  Akim Demaille  <akim@epita.fr>
19029         * src/getargs.h: Don't declare `spec_name_prefix' and
19030         `spec_file_prefix', declared by src/files.h.
19031         * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19032         * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19033         * src/output.c (prepare): Adjust.
19034         * src/reader.c (symbols_output): Likewise.
19035         * src/vmsgetargs.c: Vaguely adjust, but who cares?
19037 2001-12-10  Akim Demaille  <akim@epita.fr>
19039         * src/muscle_tab.c (muscle_init): NULL is a better default than
19040         `"0"'.
19042 2001-12-10  Akim Demaille  <akim@epita.fr>
19044         * src/reader.c (reader): Calling symbols_output once is enough.
19046 2001-12-10  Akim Demaille  <akim@epita.fr>
19048         Now that states have a complete set of members, the linked list of
19049         reductions is useless: just fill directly the state's reductions
19050         member.
19052         * src/state.h (struct reductions): Remove member `number' and
19053         `next'.
19054         * src/LR0.c (first_reduction, last_reduction): Remove.
19055         (save_reductions): Don't link the new reductions, store them in
19056         this_state.
19057         * src/lalr.c (set_state_table): No need to attach reductions to
19058         states, it's already done.
19059         * src/output.c (output_actions): No longer free the shifts, then
19060         the reductions, then the states: free all the states and their
19061         members.
19063 2001-12-10  Akim Demaille  <akim@epita.fr>
19065         * src/options.c (OPTN, DRTV, BOTH): New.
19066         (option_table): Use them.
19068         * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19069         the job of system.h.
19070         * src/options.c: Don't include stdio.h and xalloc.h for the same
19071         reasons.
19073 2001-12-10  Akim Demaille  <akim@epita.fr>
19075         * src/output.c (output, prepare): Make sure the values of the
19076         muscles `action' and `prologue' are 0-terminated.
19078 2001-12-10  Akim Demaille  <akim@epita.fr>
19080         Clean up GCC warnings.
19082         * src/reader.c (copy_action): `buf' is not used.
19083         (parse_skel_decl): Be static.
19084         * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19085         * src/options.h (create_long_option_table): Have a real prototype.
19086         * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19087         (hash_delete_at): Return const void *.
19088         Adjust casts to preserve the const.
19090 2001-12-10  Akim Demaille  <akim@epita.fr>
19092         * configure.in: Require 2.52g.
19093         M4 is not needed, but AUTOM4TE is.
19094         * m4/m4.m4: Remove.
19095         * tests/Makefile.am: Adjust.
19097 2001-12-10  Akim Demaille  <akim@epita.fr>
19099         One structure for states is enough, even though theoretically
19100         there are LR(0) states and LALR(1) states.
19102         * src/lalr.h (state_t): Remove.
19103         (state_table): Be state_t **, not state_t *.
19104         * src/state.h (core, CORE_ALLOC): Rename as...
19105         (state_t, STATE_ALLOC): this.
19106         Add the LALR(1) members: shifts, reductions, errs.
19107         * src/LR0.c (state_table): Rename as...
19108         (state_hash): this, to avoid name clashes with the global
19109         `state_table'.
19110         * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19111         * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19113 2001-12-10  Akim Demaille  <akim@epita.fr>
19115         Bison dumps core on bash.y.
19116         Reported by Pascal Bart.
19118         * src/warshall.c (bitmatrix_print): New.
19119         (TC): Use it.
19120         When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19121         j must be the outer loop.
19122         * tests/regression.at (Broken Closure): New.
19124 2001-12-05  Akim Demaille  <akim@epita.fr>
19126         * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19127         its argument.
19128         Reported by Peter Hamorsky.
19130 2001-12-05  Akim Demaille  <akim@epita.fr>
19132         * src/conflicts.c (err_table): Remove.
19133         (resolve_sr_conflict): Adjust.
19134         * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19135         Rename as...
19136         (state_t.reductions, state_t.shifts): this.
19138 2001-12-05  Akim Demaille  <akim@epita.fr>
19140         * src/reduce.c (reduce_grammar_tables): No longer disable the
19141         removal of useless rules via CPP but via `if (0)', so that the
19142         compiler still check the code is valid.
19143         For instance, it should have noticed `rline' no longer exists: use
19144         the `line' member of rule_t.
19145         * src/gram.c (dummy, rline): Remove, unused.
19147 2001-12-05  Akim Demaille  <akim@epita.fr>
19149         * src/output.c (pack_vector): Use assert, not berror.
19150         * src/main.c (berror): Remove, unused.
19152 2001-12-05  Akim Demaille  <akim@epita.fr>
19154         New experimental feature: if --verbose --trace output all the
19155         items of a state, not only its kernel.
19157         * src/print.c (print_core): If `trace_flag', then invoke closure
19158         before outputting the items of the state (print_core is no longer
19159         a correct name them).
19160         (print_results): Invoke new_closure/free_closure if needed.
19162 2001-12-05  Akim Demaille  <akim@epita.fr>
19164         * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19165         * src/closure.c, src/closure.h (itemsetsize): Rename as...
19166         (nitemset): for consistency with the rest of the project.
19168 2001-12-05  Akim Demaille  <akim@epita.fr>
19170         * src/closure.c (print_closure): Improve.
19171         (closure): Use it for printing input and output.
19173 2001-12-05  Akim Demaille  <akim@epita.fr>
19175         * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19176         indexed by nonterminals.
19178 2001-12-05  Akim Demaille  <akim@epita.fr>
19180         * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19181         what it was!).
19182         * src/warshall.h: Remove accidental duplication of the content.
19184 2001-12-05  Akim Demaille  <akim@epita.fr>
19186         * src/closure.c (set_fderives): De-obfuscate.
19188 2001-12-05  Akim Demaille  <akim@epita.fr>
19190         * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19192 2001-12-05  Akim Demaille  <akim@epita.fr>
19194         * src/closure.c (set_firsts): De-obfuscate.
19196 2001-12-05  Akim Demaille  <akim@epita.fr>
19198         * src/output.c (action_row): De-obfuscate
19199         using the good o' techniques: arrays not pointers, variable
19200         locality, BITISSET, RESETBIT etc.
19202 2001-12-05  Akim Demaille  <akim@epita.fr>
19204         Pessimize the code to simplify it: from now on, all the states
19205         have a valid SHIFTS, which NSHIFTS is possibly 0.
19207         * src/LR0.c (shifts_new): Be global and move to..
19208         * src/state.c, src/state.h: here.
19209         * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19210         * src/print_graph: Adjust.
19212 2001-12-05  Akim Demaille  <akim@epita.fr>
19214         * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19215         * src/conflicts.c: Use it.
19216         Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19217         incorrectly ``simplified''.
19219 2001-12-05  Akim Demaille  <akim@epita.fr>
19221         * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19222         using the good o' techniques: arrays not pointers, variable
19223         locality, BITISSET, RESETBIT etc.
19225 2001-12-05  Akim Demaille  <akim@epita.fr>
19227         * src/state.h (SHIFT_SYMBOL): New.
19228         * src/conflicts.c: Use it to deobfuscate.
19230 2001-12-05  Akim Demaille  <akim@epita.fr>
19232         * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19233         (print_reductions): De-obfuscate using the good o' techniques:
19234         arrays not pointers, variable locality, BITISSET.
19236 2001-12-05  Akim Demaille  <akim@epita.fr>
19238         * src/conflicts.c (print_reductions): Arrays, not pointers.
19239         Use BITISSET.
19241 2001-12-05  Akim Demaille  <akim@epita.fr>
19243         * src/conflicts.c (print_reductions): Pessimize, but clarify.
19245 2001-12-05  Akim Demaille  <akim@epita.fr>
19247         * src/conflicts.c (print_reductions): Improve variable locality.
19249 2001-12-05  Akim Demaille  <akim@epita.fr>
19251         * src/conflicts.c (print_reductions): Pessimize, but clarify.
19253 2001-12-05  Akim Demaille  <akim@epita.fr>
19255         * src/conflicts.c (print_reductions): Improve variable locality.
19257 2001-12-05  Akim Demaille  <akim@epita.fr>
19259         * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19260         * src/lalr.c: Use them.
19262 2001-12-05  Akim Demaille  <akim@epita.fr>
19264         * src/LR0.c (augment_automaton): Formatting changes.
19265         Better variable locality.
19267 2001-12-05  Akim Demaille  <akim@epita.fr>
19269         * src/lalr.c (matrix_print): New.
19270         (transpose): Use it.
19271         Use arrays instead of pointers.
19273 2001-12-05  Akim Demaille  <akim@epita.fr>
19275         * src/lalr.c (maxrhs): Move to...
19276         * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19277         * src/lalr.c (build_relations): Adjust.
19279 2001-12-05  Akim Demaille  <akim@epita.fr>
19281         * src/lalr.c (transpose): Free the memory allocated to the
19282         argument, as it is replaced by the results by the unique caller.
19283         (build_relations): Merely invoke transpose: it handles the memory
19284         deallocation.
19285         Improve variable locality.
19286         Avoid variables used as mere abbreviations.
19287         (compute_lookaheads): Use arrays instead of pointers.
19289 2001-12-05  Akim Demaille  <akim@epita.fr>
19291         * src/lalr.c (initialize_F): Improve variable locality.
19292         Avoid variables used as mere abbreviations.
19294 2001-12-05  Akim Demaille  <akim@epita.fr>
19296         * src/derives.c (print_derives): Display the ruleno.
19297         * src/lalr.c (initialize_F, transpose): Better variable locality
19298         to improve readability.
19299         Avoid variables used as mere abbreviations.
19301 2001-12-05  Akim Demaille  <akim@epita.fr>
19303         * src/lalr.c (traverse): Use arrays instead of pointers.
19305 2001-12-05  Akim Demaille  <akim@epita.fr>
19307         * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19308         the handling of squeue.
19309         `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19311 2001-12-05  Akim Demaille  <akim@epita.fr>
19313         Because useless nonterminals are now kept alive (instead of being
19314         `destroyed'), we now sometimes examine them, and store information
19315         related to them.  Hence we need to know their number, and adjust
19316         memory allocations.
19318         * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19319         static.
19320         * src/LR0.c (allocate_itemsets): The memory allocated to
19321         `symbol_count' was used for two different purpose: once to count
19322         the number of occurrences of each symbol, and later reassigned to
19323         `shift_symbol', containing the symbol that can be shifted from a
19324         given state.
19325         Deobfuscate, i.e., allocate, use and free `symbol_count' here
19326         only, and...
19327         (new_itemsets): Allocate `shift_symbol' here.
19328         (allocate_itemsets): symbol_count includes useless nonterminals.
19329         Make room for them.
19330         (free_storage): Use `free', not `XFREE', for pointers that cannot
19331         be null.
19333 2001-12-05  Akim Demaille  <akim@epita.fr>
19335         * src/nullable.c (set_nullable): Deobfuscate the handling of
19336         ritem.
19337         `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19339 2001-12-05  Akim Demaille  <akim@epita.fr>
19341         * src/gram.c, src/gram.h (ritem_print): New.
19342         * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19343         (This useless function was defined only to work around VMS linkers
19344         that can't handle compilation units with variables only).
19345         * src/reduce.c (dump_grammar): Use it to trace the construction of
19346         ritem.
19348 2001-12-04  Paul Eggert  <eggert@twinsun.com>
19350         * src/bison.simple (union yyalloc): Change member names
19351         to be the same as the stack names.
19352         (yyparse): yyptr is now union yyalloc *, not char *.
19353         (YYSTACK_RELOCATE): Likewise.  This avoids a GCC warning,
19354         and may generate better code on some machines.
19355         (yystpcpy): Use prototype if __STDC__ is defined, not just
19356         if __cplusplus is defined.
19358 2001-11-30  Akim Demaille  <akim@epita.fr>
19360         * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19361         (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19362         Gettext doesn't compile cleanly, and dies with -Werror.
19363         * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19364         Include WARNING_CFLAGS here.
19365         * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19366         before being defined.
19368 2001-11-27  Paul Eggert  <eggert@twinsun.com>
19370         * lib/quotearg.h (quotearg_n, quotearg_n_style):
19371         First arg is int, not unsigned.
19372         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19373         (SIZE_MAX, UINT_MAX): New macros.
19374         (quotearg_n_options): Abort if N is negative.
19375         Avoid overflow check on hosts where size_t is 64 bits and int
19376         is 32 bits, as overflow is impossible there.
19377         Fix off-by-one typo that caused unnecessary reallocation.
19379 2001-11-29  Paul Eggert  <eggert@twinsun.com>
19381         Name space cleanup in generated parser.
19383         * doc/bison.texinfo (Bison Parser): Discuss system headers
19384         and their effect on the user name space.
19386         * src/bison.simple:
19387         (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19388         YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19389         i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19391         (YYSIZE_T): New macro.  Use it instead of size_t, to avoid infringing
19392         on user names when possible.
19394         (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19395         Simplify test for whather <alloca.h> exists.
19397         (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19399         (<stdio.h>): Include if YYDEBUG.
19401         (yymemcpy): Renamed from __yy_memcpy.  Do not define unless
19402         ! defined (yyoverflow) && ! defined (yymemcpy).
19404         (yymemcpy, yyparse): Rename local variables as needed so that
19405         they all begin with 'yy'.
19407         (yystrlen, yystpcpy): New functions.
19409         (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19410         All uses changed.
19412         (yyparse): size_t -> YYSIZE_T.  Use yystrlen and yystpcpy
19413         instead of relying on string.h functions.  Use YYSTACK_ALLOC
19414         and YYSTACK_FREE instead of malloc and free.
19416 2001-11-30  Akim Demaille  <akim@epita.fr>
19418         * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19419         before their first uses.
19420         (YYBISON, YYPURE): Move to the top of the output.
19422 2001-11-30  Akim Demaille  <akim@epita.fr>
19424         * tests/reduce.at (Useless Nonterminals): Fix.
19426 2001-11-30  Akim Demaille  <akim@epita.fr>
19428         * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19429         if body instead of `;' to pacify GCC's warnings.
19431 2001-11-30  Akim Demaille  <akim@epita.fr>
19433         Instead of mapping the LHS of unused rules to -1, keep the LHS
19434         valid, but flag the rules as invalid.
19436         * src/gram.h (rule_t): `useful' is a new member.
19437         * src/print.c (print_grammar): Adjust.
19438         * src/derives.c (set_derives): Likewise.
19439         * src/reader.c (packgram, reduce_output): Likewise.
19440         * src/reduce.c (reduce_grammar_tables): Likewise.
19441         * tests/reduce.at (Underivable Rules, Useless Rules): New.
19443 2001-11-30  Akim Demaille  <akim@epita.fr>
19445         * src/reduce.c (reduce_output): Formatting changes.
19446         * src/print.c (print_results, print_grammar): Likewise.
19447         * tests/regression.at (Rule Line Numbers)
19448         (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19450 2001-11-30  Akim Demaille  <akim@epita.fr>
19452         * src/reduce.c (nonterminals_reduce): Instead of throwing away
19453         useless nonterminals, move them at the end of the symbol arrays.
19454         (reduce_output): Adjust.
19455         * tests/reduce.at (Useless Nonterminals): Adjust.
19457 2001-11-30  Akim Demaille  <akim@epita.fr>
19459         * src/reduce.c: Various comment/formatting changes.
19460         (nonterminals_reduce): New, extracted from...
19461         (reduce_grammar_tables): here.
19462         (reduce_grammar): Call nonterminals_reduce.
19464 2001-11-29  Paul Eggert  <eggert@twinsun.com>
19466         * src/bison.simple (YYSTACK_REALLOC): Remove.
19467         (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19468         (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19469         New macros.
19470         (union yyalloc): New type.
19471         (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19472         an arbitrary restriction on hosts where size_t is wider than int.
19474         (yyparse): Don't dump core if alloca or malloc fails; instead, report
19475         a parser stack overflow.  Allocate just one block of memory for all
19476         three stacks, instead of allocating three blocks; this typically is
19477         faster and reduces fragmentation.
19479         Do not limit the number of items in the stack to a value that fits
19480         in 'int', as this is an arbitrary limit on hosts with 64-bit
19481         size_t and 32-bit int.
19483 2001-11-29  Marc Autret  <autret_m@epita.fr>
19485         * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19486         of defining YYERROR_VERBOSE.
19487         [AT_DATA]: $4 is now out of C declarations in the prologue.
19489 2001-11-28  Marc Autret  <autret_m@epita.fr>
19491         * src/reader.c (parse_dquoted_param): New.
19492         (parse_skel_decl): Use it.
19493         * src/lex.h: Add its prototype.
19494         * src/lex.c (literalchar): Become not static.
19496 2001-11-28  Marc Autret  <autret_m@epita.fr>
19498         * src/output.h: And put its extern declaration here.
19499         * src/output.c (error_verbose): Define here.
19500         (prepare): Echo name modification.
19501         * src/getargs.h: Clean its extern declaration.
19502         * src/getargs.c (error_verbose_flag): Remove.
19503         (getargs): Remove case 'e'.
19504         * src/options.c (option_table): 'error-verbose' is now seen as simple
19505         percent option.
19506         Include output.h.
19508         * src/reader.c (read_declarations): Remove case tok_include.
19509         (parse_include_decl): Remove.
19510         * src/lex.h (token_t): Remove tok_include.
19511         * src/options.c (option_table): 'include' is now a simple command line
19512         option.
19514 2001-11-28  Marc Autret  <autret_m@epita.fr>
19516         * src/bison.simple: Adjust muscle names.
19517         * src/muscle_tab.c (muscle_init): Also rename the muscles.
19518         * src/output.c (prepare): s/_/-/ for the muscles names.
19519         (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19521 2001-11-28  Marc Autret  <autret_m@epita.fr>
19523         * src/bison.simple: Fix debug.
19524         [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19526 2001-11-28  Akim Demaille  <akim@epita.fr>
19528         * src/LR0.c (shifts_new): New.
19529         (save_shifts, insert_start_shift, augment_automaton): Use it.
19531 2001-11-28  Akim Demaille  <akim@epita.fr>
19533         * src/closure.c (closure): `b' and `ruleno' denote the same value:
19534         keep ruleno only.
19536 2001-11-28  Akim Demaille  <akim@epita.fr>
19538         * src/closure.c (closure): Instead of looping over word in array
19539         then bits in words, loop over bits in array.
19541 2001-11-28  Akim Demaille  <akim@epita.fr>
19543         * src/closure.c (closure): No longer optimize the special case
19544         where all the bits of `ruleset[r]' are set to 0, to make the code
19545         clearer.
19547 2001-11-28  Akim Demaille  <akim@epita.fr>
19549         * src/closure.c (closure): `r' and `c' are new variables, used to
19550         de-obfuscate accesses to RULESET and CORE.
19552 2001-11-28  Akim Demaille  <akim@epita.fr>
19554         * src/reduce.c (reduce_print): Use ngettext.
19555         (dump_grammar): Improve the trace accuracy.
19557 2001-11-28  Akim Demaille  <akim@epita.fr>
19559         * src/reduce.c (dump_grammar): Don't translate trace messages.
19561 2001-11-28  Akim Demaille  <akim@epita.fr>
19563         * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19564         * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19565         as all tags are free'ed afterwards.
19566         From Enrico Scholz.
19568 2001-11-27  Paul Eggert  <eggert@twinsun.com>
19570         * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19571         use alloca when we didn't want to, and vice versa.
19573 2001-11-27  Marc Autret  <autret_m@epita.fr>
19575         * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19576         initialization.
19577         * src/output.c (prepare): Remove its update.
19579 2001-11-27  Marc Autret  <autret_m@epita.fr>
19581         * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19582         Use %error-verbose.
19584 2001-11-27  Marc Autret  <autret_m@epita.fr>
19586         * src/bison.simple: Remove YYERROR_VERBOSE using.
19587         Use %%error_verbose.
19588         (yyparse): Likewise.
19589         * src/output.c (prepare): Give its final value.
19590         * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19591         * src/getargs.h: Add its extern declaration.
19592         * src/getargs.c (error_verbose_flag): New int.
19593         (getargs): Update to catch new case.
19594         * src/options.c (option_table): 'error-verbose' is a new option.
19595         (shortopts): Update.
19597 2001-11-27  Akim Demaille  <akim@epita.fr>
19599         * src/system.h: Use intl/libgettext.h.
19600         * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19602 2001-11-27  Akim Demaille  <akim@epita.fr>
19604         * tests/torture.at (Exploding the Stack Size with Malloc):
19605         s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19607 2001-11-27  Akim Demaille  <akim@epita.fr>
19609         * src/files.c: Include error.h.
19610         Reported by Hans Aberg.
19612 2001-11-26  Marc Autret  <autret_m@epita.fr>
19614         * src/reader.c (parse_include_decl): New, not yet implemented.
19615         (read_declarations): Add case tok_include.
19616         * src/getargs.h (include): Add its extern definition.
19617         * src/getargs.c (include): New const char *.
19618         (getargs): Add case '-I'.
19619         * src/options.c (option_table): Add include as command line and
19620         percent option.
19621         * src/lex.h (token_t): Add tok_include.
19623 2001-11-26  Akim Demaille  <akim@epita.fr>
19625         * src/reader.c (readgram): Make sure rules for mid-rule actions
19626         have a lineno equal to that of their host rule.
19627         Reported by Hans Aberg.
19628         * tests/regression.at (Rule Line Numbers): New.
19630 2001-11-26  Akim Demaille  <akim@epita.fr>
19632         * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19633         size_ts.
19635 2001-11-26  Akim Demaille  <akim@epita.fr>
19637         * src/complain.c, src/complain.h (error): Remove, provided by
19638         lib/error.[ch].
19640 2001-11-26  Akim Demaille  <akim@epita.fr>
19642         * src/reader.c (read_declarations): Don't abort on tok_illegal,
19643         issue an error message.
19644         * tests/regression.at (Invalid %directive): New.
19645         Reported by Hans Aberg.
19647 2001-11-26  Akim Demaille  <akim@epita.fr>
19649         * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19650         * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19652 2001-11-26  Akim Demaille  <akim@epita.fr>
19654         * src/conflicts.c (conflicts_print): Don't complain at all when
19655         there are no reduce/reduce conflicts, and as many shift/reduce
19656         conflicts as expected.
19657         * tests/regression.at (%expect right): Adjust.
19659 2001-11-23  Akim Demaille  <akim@epita.fr>
19661         * lib/alloca.c: Update, from fileutils.
19663 2001-11-23  Akim Demaille  <akim@epita.fr>
19665         * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19667 2001-11-23  Akim Demaille  <akim@epita.fr>
19669         * src/system.h: Include alloca.h.
19670         * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19672 2001-11-23  Akim Demaille  <akim@epita.fr>
19674         * src/print_graph.c (print_actions): Remove `rule', unused.
19675         * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19676         pacify GCC's signed < unsigned warnings.
19677         * src/closure.c (itemsetsize): Likewise.
19678         * src/reader.c (symbol_list_new): Static.
19680 2001-11-23  Akim Demaille  <akim@epita.fr>
19682         Attaching lineno to buckets is stupid, since only one copy of each
19683         symbol is kept, only the line of the first occurrence is kept too.
19685         * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19686         * src/reader.c (rline_allocated): Remove, unused.
19687         (symbol_list): Have a `line' member.
19688         (symbol_list_new): New.
19689         (readgram): Use it.
19690         * src/print.c (print_grammar): Output the rule line numbers.
19691         * tests/regression.at (Solved SR Conflicts)
19692         (Unresolved SR Conflicts): Adjust.
19693         Reported by Hans Aberg.
19695 2001-11-22  Marc Autret  <autret_m@epita.fr>
19697         * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19699 2001-11-22  Marc Autret  <autret_m@epita.fr>
19701         * src/muscle_tab.c (muscle_init): Remove initialization of
19702         skeleton muscle.
19703         * src/output.c (output_master_parser): Do it here.
19705 2001-11-20  Akim Demaille  <akim@epita.fr>
19707         * po/sv.po: New.
19708         * configure.in (ALL_LINGUAS): Adjust.
19709         * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19710         longer contains strings to translate.
19712 2001-11-19  Akim Demaille  <akim@epita.fr>
19714         * src/conflicts.c (conflicts_print): Add a missing \n.
19716 2001-11-19  Akim Demaille  <akim@epita.fr>
19718         * src/nullable.c (nullable_print): New.
19719         (set_nullable): Call it when tracing.
19720         Better locality of variables.
19722 2001-11-19  Akim Demaille  <akim@epita.fr>
19724         * src/print.c (print_actions): Better locality of variables.
19726 2001-11-19  Akim Demaille  <akim@epita.fr>
19728         * src/derives.c (print_derives): Fix and enrich.
19729         * src/closure.c (print_fderives): Likewise.
19731 2001-11-19  Akim Demaille  <akim@epita.fr>
19733         * src/closure.c (itemsetend): Remove, replaced with...
19734         (itemsetsize): new.
19736 2001-11-19  Akim Demaille  <akim@epita.fr>
19738         * src/LR0.c (kernel_end): Remove, replaced with...
19739         (kernel_size): new.
19741 2001-11-19  Akim Demaille  <akim@epita.fr>
19743         * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19744         to clarify.
19746 2001-11-19  Akim Demaille  <akim@epita.fr>
19748         * src/closure.c (closure): Use arrays instead of pointers to clarify.
19750 2001-11-19  Akim Demaille  <akim@epita.fr>
19752         * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19753         trace messages.
19754         * src/LR0.c: Likewise.
19755         (allocate_itemsets): Use arrays instead of pointers to clarify.
19757 2001-11-19  Akim Demaille  <akim@epita.fr>
19759         * src/getargs.c (statistics_flag): Replace with...
19760         (trace_flag): New.
19761         (longopts): Accept --trace instead of --statistics.
19762         * src/getargs.h, src/options.c: Adjust.
19763         * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19764         * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19766 2001-11-19  Akim Demaille  <akim@epita.fr>
19768         * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19769         pointers to clarify the code.
19770         (save_reductions, save_shifts): Factor common parts of alternatives.
19772 2001-11-19  Akim Demaille  <akim@epita.fr>
19774         * src/LR0.c (new_state, get_state): Complete TRACE code.
19775         * src/closure.c: Include `reader.h' to get `tags', needed by the
19776         trace code.
19777         Rename the conditional DEBUG as TRACE.
19778         Output consistently TRACEs to stderr, not stdout.
19779         * src/derives.c: Likewise.
19780         * src/reduce.c: (inaccessable_symbols): Using if is better style
19781         than goto.
19782         Use `#if TRACE' instead of `#if 0' for tracing code.
19784 2001-11-19  Akim Demaille  <akim@epita.fr>
19786         * src/system.h (LIST_FREE, shortcpy): New.
19787         * src/LR0.c: Use them.
19788         * src/output.c (free_itemsets, free_reductions, free_shifts):
19789         Remove, replaced by LIST_FREE.
19791 2001-11-19  Akim Demaille  <akim@epita.fr>
19793         * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19794         (REDUCTIONS_ALLOC):  New.
19795         * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19796         allocation.
19798 2001-11-19  Akim Demaille  <akim@epita.fr>
19800         * src/LR0.c (new_state): Complete trace code.
19801         * src/nullable.c (set_nullable): Don't translate traces.
19803 2001-11-19  Akim Demaille  <akim@epita.fr>
19805         * src/print_graph.c (print_core): Better locality of variables.
19806         * src/print.c (print_core): Likewise.
19808 2001-11-19  Akim Demaille  <akim@epita.fr>
19810         * src/vcg.c: You do the output, so you are responsible of the
19811         handling of VCG syntax, in particular: use quotearg.
19812         * src/print_graph.c: Don't.
19813         (print_actions): Don't output the actions as part of the nodes,
19814         since that's the job of the edges.
19815         (print_state): Don't output by hand: fill the node description,
19816         and ask for its output.
19818 2001-11-19  Akim Demaille  <akim@epita.fr>
19820         * src/bison.simple (yyparse): When verbosely reporting an error,
19821         no longer put additional quotes around token names.
19822         * tests/calc.at: Adjust.
19824 2001-11-19  Akim Demaille  <akim@epita.fr>
19826         * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19827         * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19828         * src/output.c: Adjust.
19830 2001-11-19  Akim Demaille  <akim@epita.fr>
19832         * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19833         (rule_t): this.
19834         * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19836 2001-11-19  Akim Demaille  <akim@epita.fr>
19838         * src/gram.h (rule_t): New.
19839         (rule_table): New.
19840         (rrhs, rlhs): Remove, part of state_t.
19841         * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19842         * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19843         * src/reader.c, src/reduce.c: Adjust.
19845 2001-11-19  Akim Demaille  <akim@epita.fr>
19847         * src/reader.c (symbols_output): New, extracted from...
19848         (packsymbols): Here.
19849         (reader): Call it.
19851 2001-11-19  Akim Demaille  <akim@epita.fr>
19853         * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19854         (maxrhs): this new function.
19856 2001-11-19  Akim Demaille  <akim@epita.fr>
19858         * src/lalr.c (F): New macro to access the variable F.
19859         Adjust.
19861 2001-11-19  Akim Demaille  <akim@epita.fr>
19863         * src/lalr.h (LA): New macro to access the variable LA.
19864         * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19865         * src/lalr.c: Adjust.
19867 2001-11-19  Akim Demaille  <akim@epita.fr>
19869         * src/lalr.c (initialize_LA): Only initialize LA.  Let...
19870         (set_state_table): handle the `lookaheads' members.
19872 2001-11-19  Akim Demaille  <akim@epita.fr>
19874         * src/lalr.h (lookaheads): Removed array, whose contents is now
19875         a member of...
19876         (state_t): this structure.
19877         * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19878         Adjust.
19880 2001-11-19  Akim Demaille  <akim@epita.fr>
19882         * src/lalr.h (consistent): Removed array, whose contents is now
19883         a member of...
19884         (state_t): this structure.
19885         * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19886         Adjust.
19888 2001-11-19  Akim Demaille  <akim@epita.fr>
19890         * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19891         contents are now members of...
19892         (state_t): this structure.
19893         * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19894         Adjust.
19896 2001-11-19  Akim Demaille  <akim@epita.fr>
19898         * src/lalr.h (state_t): New.
19899         (state_table): Be a state_t * instead of a core **.
19900         (accessing_symbol): Remove, part of state_t.
19901         * src/lalr.c: Adjust.
19902         (set_accessing_symbol): Merge into...
19903         (set_state_table): this.
19904         * src/print_graph.c, src/conflicts.c: Adjust.
19906 2001-11-14  Akim Demaille  <akim@epita.fr>
19908         * tests/calc.at, tests/output.at, tests/regression.at,
19909         * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19910         now the tests are run in private dirs, therefore AC_CLEANUP and
19911         family can be simplified to 0-ary.
19912         * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19913         use abs. path to find config.h.
19914         * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19915         stderr, there can be way too much random noise.
19916         Instead pass -Werror to GCC and rely on the exit status.
19917         Reported by Wolfram Wagner.
19919 2001-11-14  Akim Demaille  <akim@epita.fr>
19921         * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19922         defined only if yyoverflow is defined, to avoid `warning: unused
19923         variable `yyvs1''.
19924         Reported by The Test Suite.
19926 2001-11-14  Akim Demaille  <akim@epita.fr>
19928         * src/print.c: Include reduce.h.
19929         Reported by Hans Aberg.
19931 2001-11-14  Akim Demaille  <akim@epita.fr>
19933         * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19934         Revert a previous patch:  these are really const.
19935         * src/conflicts.c (conflict_report): Additional useless pair of
19936         braces to pacify GCC's warnings for `if () if () {} else {}'.
19937         * src/lex.c (parse_percent_token): Replace equal_offset with
19938         arg_offset.
19939         arg is const.
19940         Be sure to strdup `arg' when used, since there is no reason for
19941         token_buffer not to change.
19943 2001-11-14  Akim Demaille  <akim@epita.fr>
19945         * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19946         definition.
19947         * src/main.c (main): Use them.
19948         Suggested by Hans Aberg.
19950 2001-11-12  Akim Demaille  <akim@epita.fr>
19952         * src/system.h (ngettext): Now that we use ngettext, be sure to
19953         provide a default definition when NLS are not used.
19955 2001-11-12  Akim Demaille  <akim@epita.fr>
19957         * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19958         Use @kbd to denote user input.
19959         (Language and Grammar): ANSIfy the example.
19960         Adjust its layout for info/notinfo.
19961         (Location Tracking Calc): Output error messages to stderr.
19962         Output locations in a more GNUtically correct way.
19963         Fix a couple of Englishos.
19964         Adjust @group/@end group pairs.
19966 2001-11-12  Akim Demaille  <akim@epita.fr>
19968         %expect was not functioning at all.
19970         * src/conflicts.c (expected_conflicts): Set to -1.
19971         (conflict_report): Use ngettext.
19972         (conflicts_print): Check %expect and make its violation an error.
19973         * doc/bison.texinfo (Expect Decl): Adjust.
19974         * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19975         * tests/regression.at (%expect not enough, %expect right)
19976         (%expect too much): New.
19978 2001-11-12  Akim Demaille  <akim@epita.fr>
19980         * tests/regression.at (Conflicts): Rename as...
19981         (Unresolved SR Conflicts): this.
19982         (Solved SR Conflicts): New.
19984 2001-11-12  Akim Demaille  <akim@epita.fr>
19986         * src/reduce.c (print_results): Rename as...
19987         (reduce_output): This.
19988         Output to OUT, passed as argument, instead of output_obstack.
19989         (dump_grammar): Likewise.
19990         (reduce_free): New.
19991         Also free V1.
19992         (reduce_grammar): No longer call reduce_output, since...
19993         * src/print.c (print_results): do it.
19994         * src/main.c (main): Call reduce_free;
19996 2001-11-12  Akim Demaille  <akim@epita.fr>
19998         * src/conflicts.c (print_reductions): Accept OUT as argument.
19999         Output to it, not to output_obstack.
20000         * src/print.c (print_actions): Adjust.
20002 2001-11-12  Akim Demaille  <akim@epita.fr>
20004         * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20005         the result instead of using...
20006         (src_total, rrc_total, src_count, rrc_count): Remove.
20007         (any_conflicts): Remove.
20008         (print_conflicts): Split into...
20009         (conflicts_print, conflicts_output): New.
20010         * src/conflicts.h: Adjust.
20011         * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20012         * src/print.c (print_grammar): Issue `\n' between two rules.
20013         * tests/regression.at (Conflicts): New.
20014         Reported by Tom Lane.
20016 2001-11-12  Akim Demaille  <akim@epita.fr>
20018         * tests/regression.at (Invalid input): Remove, duplicate with
20019         ``Invalid input: 1''.
20021 2001-11-12  Akim Demaille  <akim@epita.fr>
20023         * tests/torture.at (AT_DATA_STACK_TORTURE)
20024         (Exploding the Stack Size with Alloca)
20025         (Exploding the Stack Size with Malloc): New.
20027 2001-11-12  Akim Demaille  <akim@epita.fr>
20029         * src/bison.simple (YYSTACK_REALLOC): New.
20030         (yyparse) [!yyoverflow]: Use it and free the old stack.
20031         Reported by Per Allansson.
20033 2001-11-12  Pascal Bart  <pascal.bart@epita.fr>
20035         * src/bison.simple: Define type yystype instead of YYSTYPE, and
20036         define CPP macro, which substitute YYSTYPE by yystype.
20037         * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20038         with yyltype/YYLTYPE.  This allows inclusion of the generated
20039         header within the parser if the compiler, such as GGC, accepts
20040         multiple equivalent #defines.
20041         From Akim.
20043 2001-11-05  Akim Demaille  <akim@epita.fr>
20045         * src/reader.c (symbols_output): New, extracted from...
20046         (packsymbols): here.
20047         (reader): Adjust.
20049 2001-11-05  Akim Demaille  <akim@epita.fr>
20051         * src/lex.c (parse_percent_token): s/quotearg/quote/.
20053 2001-11-05  Akim Demaille  <akim@epita.fr>
20055         * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20056         pattern.
20058 2001-11-05  Akim Demaille  <akim@epita.fr>
20060         * src/options.h (struct option_table_struct): set_flags is void*.
20061         * src/options.c (longopts): Support `--output' and `%output'.
20062         (usage): Adjust.
20063         * src/lex.h (tok_setopt): Remove, replaced with...
20064         (tok_intopt, tok_stropt): these new guys.
20065         * src/lex.c (getopt.h): Not needed.
20066         (token_buffer, unlexed_token_buffer): Not const.
20067         (percent_table): Promote `-' over `_' in directive names.
20068         Active `%name-prefix', `file-prefix', and `output'.
20069         (parse_percent_token): Accept possible arguments to directives.
20070         Promote `-' over `_' in directive names.
20072 2001-11-04  Akim Demaille  <akim@epita.fr>
20074         * doc/bison.texinfo (Decl Summary): Split the list into
20075         `directives for grammars' and `directives for bison'.
20076         Sort'em.
20077         Add description of `%name-prefix', `file-prefix', and `output'.
20078         Promote `-' over `_' in directive names.
20079         (Bison Options): s/%locactions/%locations/.  Nice Freudian slip.
20080         Simplify the description of `--name-prefix'.
20081         Promote `-' over `_' in directive names.
20082         Promote `--output' over `--output-file'.
20083         Fix the description of `--defines'.
20084         * tests/output.at: Exercise %file-prefix and %output.
20086 2001-11-02  Akim Demaille  <akim@epita.fr>
20088         * doc/refcard.tex: Update.
20090 2001-11-02  Akim Demaille  <akim@epita.fr>
20092         * src/symtab.h (SUNDEF): New.
20093         * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20094         stand for `uninitialized', instead of 0.
20095         * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20096         * src/lex.c (lex): Adjust.
20098         * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20099         Number it 0.
20100         Let yylex return it instead of a plain 0.
20101         Reported by Dick Streefland.
20103 2001-11-02  Akim Demaille  <akim@epita.fr>
20105         * tests/regression.at (Mixing %token styles): New test.
20107 2001-11-02  Akim Demaille  <akim@epita.fr>
20109         * src/reader.c (parse_thong_decl): Formatting changes.
20110         (token_translations_init): New, extracted from...
20111         (packsymbols): Here.
20112         Adjust.
20114 2001-11-01  Akim Demaille  <akim@epita.fr>
20116         * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20117         Check that `9foo.y' produces correct cpp guards.
20118         * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20119         guards.
20120         Reported by Wwp.
20122 2001-11-01  Akim Demaille  <akim@epita.fr>
20124         * tests/regression.at (Invalid input: 2): New.
20125         * src/lex.c (unlexed_token_buffer): New.
20126         (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20127         too.
20128         Reported by Wwp.
20130 2001-11-01  Akim Demaille  <akim@epita.fr>
20132         * tests/calc.at: Catch up with 1.30.
20133         * configure.in: Bump to 1.49a.
20134         Adjust to newer Autotest.
20136 2001-10-19  Pascal Bart  <pascal.bart@epita.fr>
20138         * src/conflicts.c: Move global variables rrc_total and src_total ...
20139         (print_conflicts): here.
20140         * src/output.c (output): Free global variable user_toknums.
20141         * src/lex.c (token_obstack): Become static.
20143 2001-10-18  Akim Demaille  <akim@epita.fr>
20145         * tests/atlocal.in (GCC): Add.
20146         * tests/calc.at: s/m4_match/m4_bmatch/.
20147         s/m4_patsubst/m4_bpatsubst/.
20148         (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20149         * configure.in: AC_SUBST(GCC).
20151 2001-10-14  Marc Autret  <autret_m@epita.fr>
20153         * src/options.c (create_long_option_table): Fix.
20155 2001-10-10  Akim Demaille  <akim@epita.fr>
20157         * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20159 2001-10-04  Akim Demaille  <akim@epita.fr>
20161         * src/reader.c (parse_union_decl): Push the caracters in
20162         union_obstack, not attrs_obstack.
20164 2001-10-04  Akim Demaille  <akim@epita.fr>
20166         Merge in the branch 1.29.
20168         * src/reader.c (packsymbols): Use a temporary obstack for
20169         `%%tokendef', since output_stack is already used elsewhere.
20171         2001-10-02  Akim Demaille  <akim@epita.fr>
20173         Bump 1.29d.
20175         2001-10-02  Akim Demaille  <akim@epita.fr>
20177         Version 1.29c.
20179         2001-10-02  Akim Demaille  <akim@epita.fr>
20181         * tests/regression.at (Invalid CPP headers): New.
20182         From Alexander Belopolsky.
20183         * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20185         2001-10-02  Akim Demaille  <akim@epita.fr>
20187         * tests/regression.at (Invalid input): New.
20188         * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20189         Reported by Shura.
20191         2001-10-02  Akim Demaille  <akim@epita.fr>
20193         * tests/calc.at: Now that --debug works, the tests must be adjusted.
20195         2001-10-02  Akim Demaille  <akim@epita.fr>
20197         * src/output.c (output_parser): Assert `skeleton'.
20198         * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20199         systems.
20200         From Shura.
20202         2001-10-01  Marc Autret  <autret_m@epita.fr>
20204         * src/lex.h: Echo modifications.
20205         * src/lex.c (unlex): Parameter is now token_t.
20206         From Hans Aberg.
20208         2001-10-01  Marc Autret  <autret_m@epita.fr>
20210         * src/main.c: Include lex.h.
20211         From Hans Aberg.
20213         2001-09-29  Akim Demaille  <akim@epita.fr>
20215         * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20217         2001-09-28  Akim Demaille  <akim@epita.fr>
20219         * tests/testsuite.at: Update to newer Autotest.
20220         * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20222         2001-09-27  Akim Demaille  <akim@epita.fr>
20224         Position independent wrapper.
20226         * tests/bison: Remove.
20227         * tests/bison.in: New.
20228         * configure.in: Adjust.
20230         2001-09-27  Paul Eggert  <eggert@twinsun.com>
20232         Port quotearg fixes from tar 1.13.24.
20234         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20235         tm to be declared.
20236         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20237         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20239         * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20240         * m4/mbrtowc.m4: New file.
20241         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20242         Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20244         2001-09-27  Akim Demaille  <akim@epita.fr>
20246         Bump to 1.29c.
20248         2001-09-27  Akim Demaille  <akim@epita.fr>
20250         Version 1.29b.
20252         2001-09-25  Akim Demaille  <akim@epita.fr>
20254         * src/system.h: Include `xalloc.h'.
20255         Remove it from the C files.
20256         * src/files.c (output_files): Free the obstacks.
20257         * src/lex.c (init_lex): Rename as...
20258         (lex_init): this.
20259         (lex_free): New.
20260         * src/main.c (main): Use it.
20262         2001-09-24  Marc Autret  <autret_m@epita.fr>
20264         * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20265         to output informations in fout (FILE*).
20266         (open_graph, close_graph): Likewise.
20267         (output_graph, output_edge, output_node): Likewise.
20268         * src/vcg.h: Update function prototypes.
20269         * src/print_graph.c (print_graph): Open output graph file.
20270         (print_actions): Adjust.
20271         * src/files.h: Remove extern declaration.
20272         * src/files.c: Remove graph_obstack declaration.
20273         (open_files): Remove graph_obstack initialization.
20274         (output_files): Remove graph_obstack saving.
20276         2001-09-24  Marc Autret  <autret_m@epita.fr>
20278         * src/files.c (compute_output_file_names): Fix.
20280         2001-09-24  Marc Autret  <autret_m@epita.fr>,
20281                     Akim Demaille  <akim@epita.fr>
20283         * src/reader.c (reader): Remove call to free_symtab ().
20284         * src/main.c (main): Call it here.
20285         Include symtab.h.
20286         * src/conflicts.c (initialize_conflicts): Rename as...
20287         (solve_conflicts): this.
20288         * src/print.c (print_core, print_actions, print_state)
20289         (print_grammar): Dump to a file instead a `output_obstack'.
20290         (print_results): Dump `output_obstack', and then proceed with the
20291         FILE *.
20292         * src/files.c (compute_output_file_names, close_files): New.
20293         (output_files): Adjust.
20294         * src/main.c (main): Adjust.
20296         2001-09-23  Marc Autret  <autret_m@epita.fr>
20298         * src/files.c (compute_header_macro): Computes header macro name
20299         from spec_defines_file when given.
20301         2001-09-23  Marc Autret  <autret_m@epita.fr>
20303         * src/files.c (output_files): Add default extensions.
20305         2001-09-22  Akim Demaille  <akim@epita.fr>
20307         * src/conflicts.c (finalize_conflicts): Rename as...
20308         (free_conflicts): this.
20310         2001-09-22  Akim Demaille  <akim@epita.fr>
20312         * src/gram.c (gram_free): Rename back as...
20313         (dummy): this.
20314         (output_token_translations): Free `token_translations'.
20315         * src/symtab.c (free_symtab): Free the tag field.
20317         2001-09-22  Akim Demaille  <akim@epita.fr>
20319         Remove `translations' as it is always set to true.
20321         * src/gram.h: Adjust.
20322         * src/reader.c (packsymbols, parse_token_decl): Adjust
20323         * src/print.c (print_grammar): Adjust.
20324         * src/output.c (output_token_translations): Adjust.
20325         * src/lex.c (lex): Adjust.
20326         * src/gram.c: Be sure the set pointers to NULL.
20327         (dummy): Rename as...
20328         (gram_free): this.
20330         2001-09-22  Akim Demaille  <akim@epita.fr>
20332         * configure.in: Invoke AM_LIB_DMALLOC.
20333         * src/system.h: Use dmalloc.
20334         * src/LR0.c: Be sure to have pointers initialized to NULL.
20335         (allocate_itemsets): Allocate kernel_items only if needed.
20337         2001-09-22  Akim Demaille  <akim@epita.fr>
20339         * configure.in: Bump to 1.29b.
20340         * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20341         * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20342         need xmalloc.c in calc.y.
20343         From Pascal Bart.
20345         2001-09-21  Akim Demaille  <akim@epita.fr>
20347         Version 1.29a.
20348         * Makefile.maint, config/config.guess, config/config.sub,
20349         * config/missing: Update from masters.
20350         * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20351         upon package.m4.
20352         * configure.in (ALL_LINGUAS): Add `tr'.
20354         2001-09-21  Akim Demaille  <akim@epita.fr>
20356         * tests/Makefile.am (package.m4): Move to...
20357         ($(srcdir)/$(TESTSUITE)): here.
20359         2001-09-20  Akim Demaille  <akim@epita.fr>
20361         * src/complain.c: No longer try to be standalone: use system.h.
20362         Don't assume __STDC__ is defined to 1. Just test if it is defined.
20363         * src/complain.h: Likewise.
20364         * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20365         Remove the unused variable `n'.
20366         From Albert Chin-A-Young.
20368         2001-09-18  Marc Autret  <autret_m@epita.fr>
20370         * doc/bison.1: Update.
20371         * doc/bison.texinfo (Bison Options): Update --defines and --graph
20372         descriptions.
20373         (Option Cross Key): Update.
20374         Add --graph.
20376         2001-09-18  Marc Autret  <autret_m@epita.fr>
20378         * tests/regression.at: New test (comment in %union).
20380         2001-09-18  Marc Autret  <autret_m@epita.fr>
20382         * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20383         do that.
20384         Reported by Keith Browne.
20386         2001-09-18  Marc Autret  <autret_m@epita.fr>
20388         * tests/output.at: Add tests for --defines and --graph.
20390         2001-09-18  Marc Autret  <autret_m@epita.fr>
20392         * tests/output.at: Removes tests of %{header,src}_extension features.
20394         2001-09-18  Akim Demaille  <akim@epita.fr>
20396         * tests/Makefile.am (package.m4): New.
20397         * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20398         (_AT_CHECK_CALC_ERROR): Likewise.
20399         Factor the `, ' part of verbose error messages.
20401         2001-09-18  Marc Autret  <autret_m@epita.fr>
20403         * src/getargs.c (longopts): Declare --defines and --graph as options
20404         with optional arguments.
20405         * src/files.h: Add extern declarations.
20406         * src/files.c (spec_graph_file, spec_defines_file): New.
20407         (output_files): Update.
20408         Remove CPP-outed code.
20410         2001-09-18  Marc Autret  <autret_m@epita.fr>
20412         Turn off %{source,header}_extension feature.
20414         * src/files.c (compute_exts_from_gf): Update.
20415         (compute_exts_from_src): Update.
20416         (output_files): CPP-out useless code.
20417         * src/files.h: Remove {header,source}_extension extern declarations.
20418         * src/reader.c (parse_dquoted_param): CPP-out.
20419         (parse_header_extension_decl): Remove.
20420         (parse_source_extension_decl): Remove.
20421         (read_declarations): Remove cases tok_{hdrext,srcext}.
20422         * src/lex.c (percent_table): Remove {header,source}_extension entries.
20423         * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20425         2001-09-10  Akim Demaille  <akim@epita.fr>
20427         * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20428         (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20429         (AT_CHECK_OUTPUT): this.
20430         Merely check ls' exit status, its output is useless.
20432         2001-09-10  Akim Demaille  <akim@epita.fr>
20434         * tests/calc.at: Use m4_match.
20435         (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20437         2001-09-10  Marc Autret  <autret_m@epita.fr>,
20438                     Akim Demaille  <akim@epita.fr>
20440         * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20441         enum color_e.
20442         * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20443         to `normal'.
20444         * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20445         * src/lex.h: Adjust prototype.
20446         (token_t): Add `tok_undef'.
20447         * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20448         (parse_percent_token): Now returns token_t.
20449         Add default statement in switch.
20450         (lex): Separate `c' as an input variable, from the token_t result
20451         part.
20452         (unlexed): Is a token_t.
20454         2001-09-10  Akim Demaille  <akim@epita.fr>
20456         * configure.in: Bump to 1.29a.
20458         2001-09-07  Akim Demaille  <akim@epita.fr>
20460         Version 1.29.
20462         2001-08-30  Akim Demaille  <akim@epita.fr>
20464         * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20465         * m4/atconfig.m4: Remove.
20466         * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20467         * tests/bison: New.
20468         * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20469         m4_if, m4_patsubst, and m4_regexp.
20470         * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20471         `input' file instead of echo.
20473         2001-08-29  Akim Demaille  <akim@epita.fr>
20475         Bump to 1.28e.
20477         2001-08-29  Akim Demaille  <akim@epita.fr>
20479         Version 1.28d.
20481         2001-08-29  Paul Eggert  <eggert@twinsun.com>
20483         * src/bison.simple (yyparse): Don't take the address of an
20484         item before the start of an array, as that doesn't conform to
20485         the C Standard.
20487         2001-08-29  Robert Anisko  <anisko_r@epita.fr>
20489         * doc/bison.texinfo (Location Tracking Calc): New node.
20491         2001-08-29  Paul Eggert  <eggert@twinsun.com>
20493         * src/output.c (output): Do not define const, as this now
20494         causes more problems than it cures.
20496         2001-08-29  Akim Demaille  <akim@epita.fr>
20498         * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20499         the nodes.
20500         Be sure to tag the `detailmenu'.
20502         2001-08-29  Akim Demaille  <akim@epita.fr>
20504         * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20505         download in a tmp dir.
20507         2001-08-28  Marc Autret  <autret_m@epita.fr>
20509         * config/depcomp: New file.
20511         2001-08-28  Marc Autret  <autret_m@epita.fr>
20513         * doc/bison.1 (mandoc): Adjust.
20514         From Juan Manuel Guerrero.
20516         2001-08-28  Marc Autret  <autret_m@epita.fr>
20518         * src/print_graph.c (print_state): Fix.
20520         2001-08-27  Marc Autret  <autret_m@epita.fr>
20522         * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20523         char * members.
20524         Echo modifications to the functions prototypes.
20525         * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20527         2001-08-27  Marc Autret  <autret_m@epita.fr>
20529         * src/vcg.c: Include `xalloc.h'.
20530         (add_colorentry): New.
20531         (add_classname): New.
20532         (add_infoname): New.
20533         * src/vcg.h: Add new prototypes.
20535         2001-08-27  Akim Demaille  <akim@epita.fr>
20537         * Makefile.maint: Sync. again with CVS Autoconf.
20539         2001-08-27  Akim Demaille  <akim@epita.fr>
20541         * Makefile.maint: Formatting changes.
20542         (po-update, cvs-update, update): New targets.
20543         (AMTAR): Remove.
20545         2001-08-27  Akim Demaille  <akim@epita.fr>
20547         * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20548         * Makefile.maint: Sync. with CVS Autoconf.
20550         2001-08-27  Marc Autret  <autret_m@epita.fr>
20552         * src/vcg.h (struct infoname_s): New.
20553         (struct colorentry_s): New.
20554         (graph_s): New fields {vertical,horizontal}_order in structure.
20555         Add `infoname' field.
20556         Add `colorentry' field;
20557         * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20558         (G_HORIZONTAL_ORDER): New.
20559         (G_INFONAME): New.
20560         (G_COLORENTRY): New.
20561         * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20562         Add output of `infoname'.
20563         Add output of `colorentry'.
20565         2001-08-27  Marc Autret  <autret_m@epita.fr>
20567         * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20568         This one shadowed a global parameter.
20570         2001-08-24  Marc Autret  <autret_m@epita.fr>
20572         * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20573         instead of `unsigned'.
20574         (print_state): Do not call obstack_object_size () in obstack_grow ()
20575         to avoid macro variables shadowing.
20577         2001-08-23  Marc Autret  <autret_m@epita.fr>
20579         * src/lex.c (percent_table): Typo: s/naem/name/.
20580         Add graph option.
20581         Normalize new options declarations.
20583         2001-08-20  Pascal Bart  <pascal.bart@epita.fr>
20585         * tests/suite.at: Exercise %header_extension and %source_extension.
20587         2001-08-16  Marc Autret  <autret_m@epita.fr>
20589         * src/reader.c (parse_dquoted_param): New.
20590         (parse_header_extension_decl): Use it.
20591         (parse_source_extension_decl): Likewise.
20593         2001-08-16  Marc Autret  <autret_m@epita.fr>
20595         * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20596         (get_xxxx_str): Use assert () instead of complain ().
20597         Remove return invokations in default cases.
20598         (get_decision_str): Modify default behaviour. Remove second argument.
20599         Echo modifications on calls.
20600         (output_graph): Fix.
20602         2001-08-16  Marc Autret  <autret_m@epita.fr>
20604         * src/getargs.c (usage): Update with ``-g, --graph''.
20606         2001-08-16  Marc Autret  <autret_m@epita.fr>
20608         * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20609         (Option Cross Key): Likewise.
20610         * doc/bison.1: Update.
20612 2001-09-25  Pascal Bart  <pascal.bart@epita.fr>
20614         * src/output.c (output_master_parser): Don't finish action_obstack.
20615         (output_parser): Don't care about the muscle action, here.
20616         (prepare): Copy the action_obstack in the action muscle.
20617         (output): Free action_obstack.
20619 2001-09-23  Pascal Bart  <pascal.bart@epita.fr>
20621         * src/reader.c (parse_union_decl): Add new obstack union_obstack.  Which
20622         will contain `%union' declaration.
20623         (parse_union_decl): Delete #line directive output.
20624         (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20625         informations about %union.
20626         (parse_union_decl): Copy the union_obstack in the muscle stype.
20627         * src/bison.simple: Add new #line directive.
20628         Add typdef %%stype YYSTYPE.
20630 2001-09-23  Pascal Bart  <pascal.bart@epita.fr>
20632         * src/bison.simple: Add new `#line' directive.
20634 2001-09-22  Pascal Bart  <pascal.bart@epita.fr>
20636         * src/bison.simple: New `#line' directive.
20637         * src/output.c (output_parser): Support new dynamic muscle input_line.
20639 2001-09-22  Marc Autret  <autret_m@epita.fr>
20641         * src/output.c (output_master_parser): New.
20642         (output_parser): Be more re-entrant.
20644 2001-09-21  Marc Autret  <autret_m@epita.fr>
20646         * src/reader.c (copy_definition, parse_union_decl): Update and use
20647         `linef' muscle.
20648         (copy_action): Likewise.
20649         Use obstack_1grow ().
20650         * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20652 2001-09-21  Marc Autret  <autret_m@epita.fr>
20654         * src/options.c (option_table): Adjust.
20655         * src/lex.c (parse_percent_token): Fix.
20657 2001-09-20  Pascal Bart  <pascal.bart@epita.fr>
20659         * src/options.c (symtab.h): Include it, need by lex.h.
20661 2001-09-20  Pascal Bart  <pascal.bart@epita.fr>
20663         * src/lex.c (parse_percent_token): Change type of variable `tx', which
20664         is now an option_table_struct*.
20665         (option_strcmp): New function option_strcmp.
20666         (parse_percent_token): Call option_strcmp.
20667         * src/getargs.c (xalloc.h, options.h): Include it.
20668         (getargs): Call create_long_option_table.
20669         (getargs): Free longopts at the end of the function.
20670         (shortopts): Move in options.c.
20671         * src/options.c (create_long_option_table): New function.  Convert
20672         information from option_table to option structure.
20673         * src/reader.c (options.h): Include it.
20675         * src/Makefile.am: Adjust.
20676         * src/options.c (option_table): Create from longopts and percent_table.
20677         * src/getargs.c (longopts): Delete.
20678         * src/lex.c (struct percent_table_struct): Delete.
20679         (percent_table): Delete.
20680         (options.h): Include it.
20681         * src/options.c: Create.
20682         * src/options.h: Create.
20683         Declare enum opt_access_e.
20684         Define struct option_table_struct.
20686 2001-09-20  Marc Autret  <autret_m@epita.fr>
20688         * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20689         sections of Bison.
20691 2001-09-19  Pascal Bart  <pascal.bart@epita.fr>
20693         * src/bison.simple: s/%%filename/%%skeleton.
20694         * src/muscle_tab.c (getargs.h): Include it.
20695         (muscle_init): Insert new muscle skeleton.
20697 2001-09-18  Pascal Bart  <pascal.bart@epita.fr>
20699         * src/output.c (output_parser): Delete unused variable actions_dumped.
20701 2001-09-07  Pascal Bart  <pascal.bart@epita.fr>
20703         * src/output.c (output): Delete call to reader_output_yylsp.
20704         * src/reader.c (reader): Likewise.
20705         * src/reader.h: Delete declaration of reader_output_yylsp.
20707 2001-09-02  Marc Autret  <autret_m@epita.fr>
20709         * src/reader.c: Include muscle_tab.h.
20710         (parse_union_decl): Update.
20711         (parse_macro_decl): Rename parse_muscle_decl.
20712         Update to use renamed functions and variable.
20713         (read_declarations, copy_action, read_additionnal_code, : Updated
20714         with correct variables and functions names.
20715         (packsymbols, reader): Likewise.
20717         * src/reader.h (muscle_obstack): Extern declaration update.
20719         * src/output.c: Include muscle_tab.h
20720         In all functions using macro_insert, change by using muscle_insert ().
20721         (macro_obstack): Rename muscle_obstack.
20722         Echo modifications in the whole file.
20723         (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20724         (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20725         (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20727         * src/muscle_tab.h: Update double inclusion macros.
20728         (macro_entry_s): Rename muscle_entry_s.
20729         Update prototypes.
20731         * src/muscle_tab.c: Include muscle_tab.h.
20732         Rename macro_tabble to muscle_table.
20733         (mhash1, mhash2, mcmp): Use muscle_entry.
20734         (macro_init): Rename muscle_init. Update.
20735         (macro_insert): Rename muscle_insert. Update.
20736         (macro_find): Rename muscle_find. Update.
20738         * src/main.c: Include muscle_tab.h.
20739         (main): Call muscle_init ().
20740         * src/Makefile.am (bison_SOURCES): Echo modifications.
20742 2001-09-02  Marc Autret  <autret_m@epita.fr>
20744         Now the files macro_tab.[ch] are named muscle_tab.[ch].
20746         * src/muscle_tab.c, src/muscle_tab.h: Add files.
20748 2001-09-02  Marc Autret  <autret_m@epita.fr>
20750         * src/macrotab.c, src/macrotab.h: Remove.
20752 2001-09-01  Pascal Bart  <pascal.bart@epita.fr>
20754         * src/reader.c (copy_guard): Use muscle to specify the `#line'
20755         filename.
20757 2001-09-01  Marc Autret  <autret_m@epita.fr>
20759         * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20760         to an explicit value to activate the feature. We do it here.
20762 2001-08-31  Pascal Bart  <pascal.bart@epita.fr>
20764         * src/output.c (prepare): Delete the `filename' muscule insertion.
20765         * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20766         (parse_union_decl): Likewise.
20767         * src/macrotab.c (macro_init): Initialize filename by infile.
20769 2001-08-31  Marc Autret  <autret_m@epita.fr>
20771         * src/bison.simple (YYLSP_NEEDED): New definition.
20772         * src/output.c (prepare): Add macro insertion of `locations_flag'
20774 2001-08-31  Pascal Bart  <pascal.bart@epita.fr>
20776         * src/output.c (prepare): Delete insertion of previous muscles,
20777         and insert the `prefix' muscles.
20778         * src/macrotab.c (macro_init): Likewise.
20779         (macro_init): Initialization prefix directive by `yy'.
20780         * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20781         %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20782         yylval, yydebug, yyerror, yynerrs and yyparse.
20783         New directive `#define' to substitute yydebug, ... with option
20784         name_prefix.
20786 2001-08-31  Pascal Bart  <pascal.bart@epita.fr>
20788         * src/main.c (main): Standardize.
20789         * src/output.c (output_table_data, output_parser): Likewise.
20790         * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20792 2001-08-31  Pascal Bart  <pascal.bart@epita.fr>, Marc Autret  <autret_m@epita.fr>
20794         * src/reader.c (read_additionnal_code): Rename %%user_code to
20795         %%epilogue.
20796         * src/output.c (output): Rename %%declarations to %%prologue.
20797         * src/bison.simple: Echo modifications.
20799 2001-08-31  Marc Autret  <autret_m@epita.fr>
20801         * src/reader.c (readgram): CleanUp.
20802         (output_token_defines): Likewise.
20803         (packsymbols): Likewise.
20804         (reader): Likewise.
20805         * src/output.c (output): CPP-out useless code.
20807 2001-08-31  Pascal Bart  <pascal.bart@epita.fr>
20809         * src/reader.c (reader): Delete obsolete call to function
20810         output_trailers and output_headers.
20811         * src/output.h: Remove obsolete functions prototypes of output_headers
20812         and output_trailers.
20814 2001-08-30  Pascal Bart  <pascal.bart@epita.fr>
20816         * src/main.c: Include macrotab.h.
20817         * src/macrotab.h (macro_entry_s): Constify fields.
20818         Adjust functions prototypes.
20819         * src/macrotab.c (macro_insert): Constify key and value.
20820         (macro_find): Constify key.
20821         (macro_insert): Include 'xalloc.h'
20822         (macro_insert): Use XMALLOC.
20823         (macro_find): Constify return value.
20824         * src/output.c (output_table_data): Rename table to table_data.
20825         (output_parser): Constify macro_key, macro_value.
20827 2001-08-30  Marc Autret  <autret_m@epita.fr>
20829         * src/reader.c (parse_skel_decl): New.
20830         (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20831         * src/lex.h (token_t): New token `tok_skel'.
20832         * src/lex.c (percent_table): Add skeleton option entry.
20833         Standardize.
20835 2001-08-29  Marc Autret  <autret_m@epita.fr>
20837         * src/bison.simple: Add %%user_code directive at the end.
20838         * src/reader.c (read_additionnal_code): New.
20839         (reader): Use it.
20840         * src/output.c (output_program): Remove.
20841         (output): Update.
20843 2001-08-28  Marc Autret  <autret_m@epita.fr>
20845         * src/output.c (output_actions): Clean up.
20846         (output_gram): CPP-out useless code.
20847         * src/reader.c (reader): Clean up, CPP-out useless code.
20849 2001-08-28  Pascal Bart  <pascal.bart@epita.fr>
20851         * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20852         directive.
20853         * src/bison.simple: Add `%%definitions'.
20855 2001-08-28  Marc Autret  <autret_m@epita.fr>
20857         * config/depcomp: New file.
20859 2001-08-27  Paul Eggert  <eggert@twinsun.com>
20861         * src/bison.simple (yyparse): Don't take the address of an
20862         item before the start of an array, as that doesn't conform to
20863         the C Standard.
20865 2001-08-27  Robert Anisko  <robert.anisko@epita.fr>
20867         * src/output.c (output): Remove the initialization of the macro
20868         obstack.  It was done too late here.
20870         * src/reader.c (parse_macro_decl): Fix.  Use of the macro obstack was
20871         completely wrong.
20872         (reader): Initialize the macro obstack here, since we need it to grow
20873         '%define' directives.
20875         * src/reader.h: Declare the macro obstack as extern.
20877 2001-08-27  Robert Anisko  <robert.anisko@epita.fr>
20879         * src/output.c (output_parser): Fix.  Store single '%' characters in
20880         the output obstack instead of throwing them away.
20882 2001-08-27  Akim Demaille  <akim@epita.fr>
20884         * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20886 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20888         * lib/Makefile.am: Adjust.
20890 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20892         * src/bison.simple: Update and add '%%' directives.
20894 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20896         * src/reader.c (reader): Remove calls to 'output_headers' and
20897         'output_trailers'. Remove some C output.
20898         (readgram): Disable a piece of code that was writing a default
20899         definition for 'YYSTYPE'.
20900         (reader_output_yylsp): Remove.
20901         (packsymbols): Output token defintions to a macro.
20902         (copy_definition): Disable C output.
20904         * src/reader.c (parse_macro_decl): New function used to parse macro
20905         declarations.
20906         (copy_string2): Put the body of copy_string into this new function.
20907         Add a parameter to let the caller choose whether he wants to copy the
20908         string delimiters or not.
20909         (copy_string): Be a simple call to copy_string2 with the last argument
20910         bound to true.
20911         (read_declarations): Add case for macro definition.
20912         (copy_identifier): New.
20913         (parse_macro_decl): Read macro identifiers using copy_identifier
20914         rather than lex.
20916 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20918         * src/output.c (prepare): Add prefixed names.
20919         (output_parser): Output semantic actions.
20920         (output_parser): Fix bug on '%%line' directives.
20922         * src/output.c (output_headers): Remove. The C code printed by this
20923         function should now be in the skeletons.
20924         (output_trailers): Remove.
20925         (output): Disable call to 'reader_output_yylsp'.
20926         (output_rule_data): Do not output tables to the table obstack.
20928         * src/output.c: Remove some C dedicated output.
20929         Improve the use of macro and output obstacks.
20930         (output_defines): Remove.
20932         * src/output.c (output_token_translations): Associate 'translate'
20933         table with a macro. No output to the table obstack.
20934         (output_gram): Same for 'rhs' and 'prhs'.
20935         (output_stos): Same for 'stos'.
20936         (output_rule_data): Same for 'r1' and 'r2'.
20937         (token_actions): Same for 'defact'.
20938         (goto_actions): Same for 'defgoto'.
20939         (output_base): Same for 'pact' and 'pgoto'.
20940         (output_table): Same for 'table'.
20941         (output_check): Same for 'check'.
20943         * src/output.c (output_table_data): New function.
20944         (output_short_table): Remove.
20945         (output_short_or_char_table): Remove.
20947         * src/output.c (output_parser): Replace most of the skeleton copy code
20948         with something new. Skeletons are now processed character by character
20949         rather than line by line, and Bison looks for '%%' macros. This is the
20950         first step in making Bison's output process (a lot) more flexible.
20951         (output_parser): Use the macro table.
20953 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20955         * src/main.c (main): Initialize the macro table.
20957 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20959         * src/lex.c (percent_table): Add tok_define.
20960         * src/lex.h: Add tok_define.
20962 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20964         * src/macrotab.c: New file.
20965         * src/macrotab.h: New file.
20966         * src/Makefile.am: Update.
20968 2001-08-25  Robert Anisko  <robert.anisko@epita.fr>
20970         * lib/hash.c: New file.
20971         * lib/hash.h: New file.
20972         * lib/Makefile.am: Update.
20974 2001-08-15  Akim Demaille  <akim@epita.fr>
20976         Version 1.28c.
20978 2001-08-15  Marc Autret  <autret_m@epita.fr>
20980         * src/reader.c (readgram): Indent output macro YYSTYPE.
20981         (packsymbols): Likewise.
20982         (output_token_defines): Likewise.
20983         * src/files.c: Standardize.
20984         (compute_header_macro): New.
20985         (defines_obstack_save): New. Use compute_header_macro.
20986         (output_files): Update. Use defines_obstack_save.
20988 2001-08-15  Akim Demaille  <akim@epita.fr>
20990         * doc/bison.texinfo (Table of Symbols): Document
20991         YYSTACK_USE_ALLOCA.
20993 2001-08-15  Akim Demaille  <akim@epita.fr>
20995         * missing: Update from CVS Automake.
20996         * config/config.guess, config/config.sub, config/texinfo.tex:
20997         Update from gnu.org.
20999 2001-08-15  Akim Demaille  <akim@epita.fr>
21001         * Makefile.maint: Sync with CVS Autoconf.
21003 2001-08-14  Pascal Bart  <pascal.bart@epita.fr>
21005         * doc/bison.texinfo: Include GNU Free Documentation License from
21006         `fdl.texi'.
21007         * doc/fdl.texi: Add to package.
21009 2001-08-14  Marc Autret  <autret_m@epita.fr>
21011         Turn on %{source,header}_extension features.
21013         * src/lex.c (percent_table): Un-CPP out header_extension and
21014         source_extension.
21015         * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21016         (compute_exts_from_src): Remove conditions. It restores priorities
21017         between options.
21019 2001-08-14  Marc Autret  <autret_m@epita.fr>
21021         * src/files.c (compute_base_names): Add extensions computing when
21022         `--file-prefix' used.
21023         Standardize function calls.
21025 2001-08-13  Marc Autret  <autret_m@epita.fr>
21027         * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21028         defining it (defined but null disables alloca).
21030 2001-08-13  Marc Autret  <autret_m@epita.fr>
21032         * src/bison.simple (_yy_memcpy): CPP reformat.
21034 2001-08-13  Pascal Bart  <pascal.bart@epita.fr>
21036         * tests/atconfig.in (CPPFLAGS): Fix.
21038 2001-08-10  Pascal Bart  <pascal.bart@epita.fr>
21040         * doc/bison.texinfo: Include GNU General Public License from
21041         `gpl.texi'.
21042         * doc/gpl.texi: Add to package.
21044 2001-08-10  Marc Autret  <autret_m@epita.fr>
21046         * src/print_graph.h: Fix.
21047         * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21049 2001-08-10  Akim Demaille  <akim@epita.fr>
21051         * src/system.h: Provide default declarations for stpcpy, strndup,
21052         and strnlen.
21054 2001-08-10  Robert Anisko  <anisko_r@epita.fr>
21056         * doc/bison.texinfo (Locations): Update @$ stuff.
21058 2001-08-09  Robert Anisko  <anisko_r@epita.fr>
21060         * src/bison.simple (YYLLOC_DEFAULT): Update.
21061         (yyparse): Adjust.
21063 2001-08-08  Marc Autret  <autret_m@epita.fr>
21065         * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21066         @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21067         Reported by Fabrice Bauzac.
21069 2001-08-08  Marc Autret  <autret_m@epita.fr>
21071         * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21072         * src/vcg.c (output_node): Fix.
21073         * src/vcg.h: Cleanup.
21074         * src/print_graph.c: Add comments.
21075         (node_output_size): New global variable. Simplify the formatting of
21076         the VCG graph output.
21077         (print_actions): Unused code is now used. It notifies the final state
21078         and no action states in the VCG graph. It also give the reduce actions.
21079         The `shift and goto' edges are red and the `go to state' edges are
21080         blue.
21081         Get the current node name and node_obstack by argument.
21082         (node_obstack): New variable.
21083         (print_state): Manage node_obstack.
21084         (print_core): Use node_obstack given by argument.
21085         A node is not only computed here but in print_actions also.
21086         (print_graph): CPP out useless code instead of commenting it.
21088 2001-08-07  Pascal Bart  <pascal.bart@epita.fr>
21090         * tests/atconfig.in (CPPFLAGS): Fix.
21092 2001-08-07  Akim Demaille  <akim@epita.fr>
21094         * src/print_graph.c (quote): New.
21095         (print_core): Use it.
21097 2001-08-06  Akim Demaille  <akim@epita.fr>, Marc Autret  <autret_m@epita.fr>
21099         * src/vcg.c (complain.h): Include it.
21100         Unepitaize `return' invocations.
21101         [NDEBUG] (main): Remove.
21102         * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21103         * src/files.c (open_files): Initialize graph_obstack.
21104         * src/print_graph.c (print_actions): CPP out useless code.
21105         (print_core): Don't output the last `\n' in labels.
21106         Use `quote'.
21107         * src/files.c (output_files): Output the VCG file.
21108         * src/main.c (main): Invoke print_graph ();
21110 2001-08-06  Marc Autret  <autret_m@epita.fr>
21112         Automaton VCG graph output.
21113         Using option ``-g'' or long option ``--graph'', you can generate
21114         a gram_filename.vcg file containing a VCG description of the LALR (1)
21115         automaton of your grammar.
21117         * src/main.c: Call to print_graph() function.
21118         * src/getargs.h: Update.
21119         * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21120         (graph_flag): New flag.
21121         (longopts): Update.
21122         (getargs): Add case `g'.
21123         * src/files.c (graph_obstack): New obstack struct.
21124         (open_files): Initialize new obstack.
21125         (output_files): Saves graph_obstack if required.
21126         * src/files.h (graph_obstack): New extern declaration.
21127         * src/Makefile.am: Add new source files.
21129 2001-08-06  Marc Autret  <autret_m@epita.fr>
21131         * src/print_graph.c, src/print_graph.h (graph): New.
21132         * src/vcg.h: New file.
21133         * src/vcg.c: New file, VCG graph handling.
21135 2001-08-06  Marc Autret  <autret_m@epita.fr>
21137         Add of %source_extension and %header_extension which specify
21138         the source or/and the header output file extension.
21140         * src/files.c (compute_base_names): Remove initialisation of
21141         src_extension and header_extension.
21142         (compute_exts_from_gf): Update.
21143         (compute_exts_from_src): Update.
21144         (output_files): Update.
21145         * src/reader.c (parse_header_extension_decl): New.
21146         (parse_source_extension_decl): New.
21147         (read_declarations): New case statements for the new tokens.
21148         * src/lex.c (percent_table): Add entries for %source_extension
21149         and %header_extension.
21150         * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21152 2001-08-06  Marc Autret  <autret_m@epita.fr>
21154         * configure.in: Bump to 1.28c.
21155         * doc/bison.texinfo: Texinfo thingies.
21157 2001-08-04  Pascal Bart  <pascal.bart@epita.fr>
21159         * tests/atconfig.in (CPPFLAGS): Add.
21160         * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21162 2001-08-03  Akim Demaille  <akim@epita.fr>
21164         Version 1.28b.
21166 2001-08-03  Akim Demaille  <akim@epita.fr>
21168         * tests/Makefile.am (check-local): Ship testsuite.
21169         * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21170         Include `string.h'.
21172 2001-08-03  Akim Demaille  <akim@epita.fr>
21174         * configure.in: Try using -Wformat when compiling.
21176 2001-08-03  Akim Demaille  <akim@epita.fr>
21178         * configure.in: Bump to 1.28b.
21180 2001-08-03  Akim Demaille  <akim@epita.fr>
21182         * src/complain.c: Adjust strerror_r portability issues.
21184 2001-08-03  Akim Demaille  <akim@epita.fr>
21186         Version 1.28a.
21188 2001-08-03  Akim Demaille  <akim@epita.fr>
21190         * src/getargs.c, src/getarg.h (skeleton)): Constify.
21191         * src/lex.c (literalchar): Avoid name clashes on `buf'.
21192         * src/getargs.c: Include complain.h.
21193         * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21194         * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21196 2001-08-03  Akim Demaille  <akim@epita.fr>
21198         * src/reader.c (readgram): Display hidden chars in error messages.
21200 2001-08-03  Akim Demaille  <akim@epita.fr>
21202         Update to gettext 0.10.39.
21204 2001-08-03  Akim Demaille  <akim@epita.fr>
21206         * lib/strspn.c: New.
21208 2001-08-01  Marc Autret  <autret_m@epita.fr>
21210         * doc/bison.texinfo: Update.
21211         * doc/bison.1 (mandoc): Update.
21212         * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21213         * src/files.c: Support output files extensions computing.
21214         (src_extension): New static variable.
21215         (header_extension): New static variable.
21216         (tr): New function.
21217         (get_extension_index): New function, gets the index of an extension
21218         filename in a string.
21219         (compute_exts_from_gf): New function, computes extensions from the
21220         grammar file extension.
21221         (compute_exts_from_src): New functions, computes extensions from the
21222         C source file extension, file given by ``-o'' option.
21223         (compute_base_names): Update.
21224         (output_files): Update.
21226 2001-08-01  Robert Anisko  <anisko_r@epita.fr>
21228         * doc/bison.texi: Document @$.
21229         (Locations): New section.
21231 2001-07-18  Akim Demaille  <akim@epita.fr>
21233         * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21234         * config/prev-version.txt, config/move-if-change: New.
21235         * Makefile.am: Adjust.
21237 2001-07-08  Pascal Bart  <pascal.bart@epita.fr>
21239         * src/bison.simple (yyparse): Suppress warning `comparaison
21240         between signed and unsigned'.
21242 2001-07-05  Pascal Bart  <pascal.bart@epita.fr>
21244         * src/getargs.h (raw_flag): Remove.
21245         * src/getargs.c: Die on `-r'/`--raw'.
21246         * src/lex.c (parse_percent_token): Die on `%raw'.
21247         * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21248         * tests/calc.at: Suppress test with option `--raw'.
21250 2001-07-14  Akim Demaille  <akim@epita.fr>
21252         * config/: New.
21253         * configure.in: Require Autoconf 2.50.
21254         Update to gettext 0.10.38.
21256 2001-03-16  Akim Demaille  <akim@epita.fr>
21258         * doc/bison.texinfo: ANSIfy the examples.
21260 2001-03-16  Akim Demaille  <akim@epita.fr>
21262         * getargs.c (skeleton): New variable.
21263         (longopts): --skeleton is a new option.
21264         (shortopts, getargs): -S is a new option.
21265         * getargs.h: Declare skeleton.
21266         * output.c (output_parser): Use it.
21268 2001-03-16  Akim Demaille  <akim@epita.fr>
21270         * m4/strerror_r.m4: New.
21271         * m4/error.m4: Run AC_FUNC_STRERROR_R.
21272         * lib/error.h, lib/error.c: Update.
21274 2001-03-16  Akim Demaille  <akim@epita.fr>
21276         * src/getargs.c (longopts): Clean up.
21278 2001-02-21  Akim Demaille  <akim@epita.fr>
21280         * src/reader.c (gensym): `gensym_count' is your own.
21281         Use a static buf to create the symbol name, as token_buffer is no
21282         longer a buffer.
21284 2001-02-08  Akim Demaille  <akim@epita.fr>
21286         * src/conflicts.c (conflict_report): Be sure not to append to res
21287         between two calls, which could happen if both first sprintf were
21288         skipped, but not the first cp += strlen.
21290 2001-02-08  Akim Demaille  <akim@epita.fr>
21292         * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21293         New, from fileutils 4.0.37.
21294         * configure.in: Require Autoconf 2.49c.  I took some time before
21295         making this decision.  This is the only way out for portability
21296         issues in Bison, it would mean way too much duplicate effort to
21297         import in Bison features implemented in 2.49c since 2.13.
21298         AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21300 2001-02-02  Akim Demaille  <akim@epita.fr>
21302         * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21303         * lib/xalloc.h, lib/xmalloc.c: Update.
21305 2001-01-19  Akim Demaille  <akim@epita.fr>
21307         Get rid of the ad hoc handling of token_buffer in the scanner: use
21308         the obstacks.
21310         * src/lex.c (token_obstack): New.
21311         (init_lex): Initialize it.  No longer call...
21312         (grow_token_buffer): this.  Remove it.
21313         Adjust all the places which used it to use the obstack.
21315 2001-01-19  Akim Demaille  <akim@epita.fr>
21317         * src/lex.h: Rename all the tokens:
21318         s/\bENDFILE\b/tok_eof/g;
21319         s/\bIDENTIFIER\b/tok_identifier/g;
21320         etc.
21321         Let them be enums, not #define, to ease debugging.
21322         Adjust all the code.
21324 2001-01-18  Akim Demaille  <akim@epita.fr>
21326         * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21327         * src/lex.c (maxtoken, grow_token_buffer): Static.
21329 2001-01-18  Akim Demaille  <akim@epita.fr>
21331         Since we now use obstacks, more % directives can be enabled.
21333         * src/lex.c (percent_table): Also accept `%yacc',
21334         `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21335         `%debug'.
21336         Handle the actions for `%semantic_parser' and `%pure_parser' here,
21337         instead of returning a token.
21338         * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21339         * src/reader.c (read_declarations): Adjust.
21340         * src/files.c (open_files): Don't call `compute_base_names', don't
21341         compute `attrsfile' since they depend upon data which might be
21342         *in* the input file now.
21343         (output_files): Do it here.
21344         * src/output.c (output_headers): Document the fact that this patch
21345         introduces a guaranteed SEGV for semantic parsers.
21346         * doc/bison.texinfo: Document them.
21347         * tests/suite.at: Exercise these %options.
21349 2000-12-20  Akim Demaille  <akim@epita.fr>
21351         Also handle the output file (--verbose) with obstacks.
21353         * files.c (foutput): Remove.
21354         (output_obstack): New.
21355         Adjust all dependencies.
21356         * src/conflicts.c: Return a string.
21357         * src/system.h (obstack_grow_string): Rename as...
21358         (obstack_sgrow): this.  Be ready to work with non literals.
21359         (obstack_fgrow4): New.
21361 2000-12-20  Akim Demaille  <akim@epita.fr>
21363         * src/files.c (open_files): Fix the computation of short_base_name
21364         in the case of `-o foo.tab.c'.
21366 2000-12-20  Akim Demaille  <akim@epita.fr>
21368         * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21369         (copy_dollar): Now that everything uses obstacks, get rid of the
21370         FILE * parameters.
21372 2000-12-20  Akim Demaille  <akim@epita.fr>
21374         * src/files.c (open_files): Actually the `.output' file is based
21375         on the short_base_name, not base_name.
21376         * tests/suite.at (Checking output file names): Adjust.
21378 2000-12-20  Akim Demaille  <akim@epita.fr>
21380         * src/bison.s1: Remove, we now use directly...
21381         * src/bison.simple: this.
21382         * src/Makefile.am: Use pkgdata instead of data.
21384 2000-12-20  Akim Demaille  <akim@epita.fr>
21386         * src/files.c (guard_obstack): New.
21387         (open_files): Initialize it.
21388         (output_files): Dump it...
21389         * src/files.h: Export it.
21390         * src/reader.c (copy_guard): Use it.
21392 2000-12-19  Akim Demaille  <akim@epita.fr>
21394         * src/files.c (outfile, defsfile, actfile): Removed as global
21395         vars.
21396         (open_files): Don't compute them.
21397         (output_files): Adjust.
21398         (base_name, short_base_name): Be global.
21399         Adjust dependencies.
21401 2000-12-19  Akim Demaille  <akim@epita.fr>
21403         * src/files.c (strsuffix): New.
21404         (stringappend): Be just like strcat but allocate.
21405         (base_names): Eve out from open_files.
21406         Try to simplify the rather hairy computation of base_name and
21407         short_base_name.
21408         (open_files): Use it.
21409         * tests/suite.at (Checking output file names): New test.
21411 2000-12-19  Akim Demaille  <akim@epita.fr>
21413         * src/system.h (obstack_grow_literal_string): Rename as...
21414         (obstack_grow_string): this.
21415         * src/output.c (output_parser): Recognize `%% actions' instead of
21416         `$'.
21417         * src/bison.s1: s/$/%% actions/.
21418         * src/bison.hairy: Likewise.
21420 2000-12-19  Akim Demaille  <akim@epita.fr>
21422         * src/output.c (output_parser): Compute the `#line' lines when
21423         there are.
21424         * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21425         Suggested by Hans Aberg.
21427 2000-12-19  Akim Demaille  <akim@epita.fr>
21429         Let the handling of the skeleton files be local to the procedures
21430         that use it.
21432         * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21433         longer static.
21434         (fparser, open_extra_files): Remove.
21435         (open_files, output_files): Don't take care of fparser.
21436         * src/files.h: Adjust.
21437         * src/output.c (output_parser): Open and close the file to the
21438         skeleton.
21439         * src/reader.c (read_declarations): When %semantic_parser, open
21440         fguard.
21442 2000-12-19  Akim Demaille  <akim@epita.fr>
21444         * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21445         * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21447 2000-12-19  Akim Demaille  <akim@epita.fr>
21449         * src/files.c (open_files): Yipee!  We no longer need all the code
21450         looking for `/tmp' since we have no tmp file.
21452 2000-12-19  Akim Demaille  <akim@epita.fr>
21454         * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21455         New macros.
21456         * src/files.c (open_files): Less dependency on MSDOS etc.
21458 2000-12-14  Akim Demaille  <akim@epita.fr>
21460         * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21461         Provide a default definition.
21462         Use it when executing the default @ action.
21463         * src/reader.c (reader_output_yylsp): No longer include
21464         `timestamp' and `text' in the default YYLTYPE.
21466 2000-12-12  Akim Demaille  <akim@epita.fr>
21468         * src/reader.c (copy_definition, parse_union_decl, copy_action)
21469         (copy_guard): Quote the file names.
21470         Reported by Laurent Mascherpa.
21472 2000-12-12  Akim Demaille  <akim@epita.fr>
21474         * src/output.c (output_headers, output_program, output): Be sure
21475         to escape special characters when outputting filenames.
21476         (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21477         (output_headers): Don't depend on them, Use ACTSTR.
21479 2000-11-17  Akim Demaille  <akim@epita.fr>
21481         * lib/obstack.h: Formatting changes.
21482         (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21483         prevents type checking.
21484         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21485         cast the value to (void *): assigning a `foo *' to a `void *'
21486         variable is valid.
21487         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21488         * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21489         append characters.
21491 2000-11-17  Akim Demaille  <akim@epita.fr>
21493         * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21494         as...
21495         (suite.m4, regression.m4, calc.m4): these.
21496         * tests/atgeneral.m4: Update from CVS Autoconf.
21498 2000-11-17  Akim Demaille  <akim@epita.fr>
21500         * tests/regression.m4 (%union and --defines): New test,
21501         demonstrating a current bug in the obstack implementation.
21503 2000-11-17  Akim Demaille  <akim@epita.fr>
21505         * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21506         macros.
21507         Use them to declare the variables which are global or local to
21508         `yyparse'.
21510 2000-11-17  Akim Demaille  <akim@epita.fr>
21512         * acconfig.h: Remove, no longer used.
21514 2000-11-07  Akim Demaille  <akim@epita.fr>
21516         * src: s/Copyright (C)/Copyright/g.
21518 2000-11-07  Akim Demaille  <akim@epita.fr>
21520         * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21521         defining.
21522         * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21524 2000-11-07  Akim Demaille  <akim@epita.fr>
21526         * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21527         Merge in a single CPP if/else.
21529 2000-11-07  Akim Demaille  <akim@epita.fr>
21531         * src/output.c (output): Remove useless variables.
21532         * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21533         argument `data' for consistency with the prototypes.
21534         Qualify it `const'.
21535         (obstack_copy, obstack_copy0): Rename the second argument as
21536         `address' for consistency.  Qualify it `const'.
21537         * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21538         (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21539         `const' their input argument (`data' or `address').
21540         Adjust the corresponding macros to include `const' in casts.
21542 2000-11-03  Akim Demaille  <akim@epita.fr>
21544         * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21545         s/PFILE1/BISON_HAIRY/.
21546         Adjust dependencies.
21548 2000-11-03  Akim Demaille  <akim@epita.fr>
21550         For some reason, this was not applied.
21552         * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21553         `unlink': it's no longer used.
21555 2000-11-03  Akim Demaille  <akim@epita.fr>
21557         * src/files.c (skeleton_find): New function, eved out of...
21558         (open_files, open_extra_files): here.
21560 2000-11-03  Akim Demaille  <akim@epita.fr>
21562         Don't use `atexit'.
21564         * src/files.c (obstack_save): New function.
21565         (done): Rename as...
21566         (output_files): this.
21567         Use `obstack_save'.
21568         * src/main.c (main): Don't use `atexit' to register `done', since
21569         it no longer has to remove tmp files, just call `output_files'
21570         when there are no errors.
21572 2000-11-02  Akim Demaille  <akim@epita.fr>
21574         * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21575         `unlink': it's no longer used.
21576         * src/files.h: Formatting changes.
21578 2000-11-02  Akim Demaille  <akim@epita.fr>
21580         Remove the last uses of mktemp and unlink/delete.
21582         * src/files.c (fdefines, ftable): Removed.
21583         (defines_ostack, table_obstack): New.
21584         Adjust dependencies of the former into uses of the latter.
21585         * src/output.c (output_short_or_char_table, output_short_table):
21586         Convert to using obstacks.
21587         * src/reader.c (copy_comment2): Accept one FILE * and two
21588         obstacks.
21589         (output_token_defines, reader_output_yylsp): Use obstacks.
21590         * src/system.h (obstack_fgrow3): New.
21591         * po/POTFILES.in: Adjust.
21593 2000-11-01  Akim Demaille  <akim@epita.fr>
21595         Change each use of `fattrs' into a use of `attrs_obstack'.
21597         * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21598         * src/files.c (fattrs): Remove.
21599         (attrs_obstack): New.
21600         Adjust all dependencies.
21601         (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21603 2000-11-01  Akim Demaille  <akim@epita.fr>
21605         Introduce obstacks.
21606         Change each use of `faction' into a use of `action_obstack'.
21608         * lib/obstack.h, lib/obstack.c: New files.
21609         * src/files.c (faction): Remove.
21610         (action_obstack): New.
21611         Adjust all dependencies.
21613 2000-10-20  Akim Demaille  <akim@epita.fr>
21615         * lib/quote.h (PARAMS): New macro.  Use it.
21617 2000-10-16  Akim Demaille  <akim@epita.fr>
21619         * src/output.c (output_short_or_char_table): New function.
21620         (output_short_table, output_token_translations): Use it.
21621         (goto_actions): Use output_short_table.
21623 2000-10-16  Akim Demaille  <akim@epita.fr>
21625         * src/symtab.c (bucket_new): New function.
21626         (getsym): Use it.
21628         * src/output.c (output_short_table): New argument to display the
21629         comment associated with the table.
21630         Adjust dependencies.
21631         (output_gram): Use it.
21632         (output_rule_data): Nicer output layout for YYTNAME.
21634 2000-10-16  Akim Demaille  <akim@epita.fr>
21636         * src/lex.c (read_typename): New function.
21637         (lex): Use it.
21638         * src/reader.c (copy_dollar): Likewise.
21640 2000-10-16  Akim Demaille  <akim@epita.fr>
21642         * src/reader.c (copy_comment2): Expect the input stream to be on
21643         the `/' which is suspected to open a comment, instead of being
21644         called after `//' or `/*' was read.
21645         (copy_comment, copy_definition, parse_union_decl, copy_action)
21646         (copy_guard): Adjust.
21648 2000-10-16  Akim Demaille  <akim@epita.fr>
21650         * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21651         `read_signed_integer'.
21653 2000-10-16  Akim Demaille  <akim@epita.fr>
21655         * src/reader.c (copy_dollar): New function.
21656         (copy_guard, copy_action): Use it.
21658 2000-10-16  Akim Demaille  <akim@epita.fr>
21660         * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21661         * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21662         New files, from Fileutils 4.0.27.
21663         * src/main.c (printable_version): Remove.
21664         * src/lex.c, src/reader.c: Use `quote'.
21666 2000-10-04  Akim Demaille  <akim@epita.fr>
21668         * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21670 2000-10-04  Akim Demaille  <akim@epita.fr>
21672         * doc/bison.texinfo: Various typos spotted by Neil Booth.
21674 2000-10-04  Akim Demaille  <akim@epita.fr>
21676         When a literal string is used to define two different tokens,
21677         `bison -v' segfaults.
21678         Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21680         * tests/regression.m4: New file.
21681         Include the core of the sample provided by Piotr Gackiewicz.
21682         * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21683         properly.
21685 2000-10-04  Akim Demaille  <akim@epita.fr>
21687         * src/reader.c (parse_expect_decl): Keep `count' within the size
21688         of `buffer'.
21689         From Neil Booth.
21691 2000-10-02  Paul Eggert  <eggert@twinsun.com>
21693         * bison.s1 (yyparse): Assign the default value
21694         unconditionally, to avoid a GCC warning and make the parser a
21695         tad smaller.
21697 2000-10-02  Akim Demaille  <akim@epita.fr>
21699         * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21700         options.
21702 2000-10-02  Akim Demaille  <akim@epita.fr>
21704         * src/derives.c, src/print.c, src/reduce.c: To ease the
21705         translation, move some `\n' out of the translated strings.
21707 2000-10-02  Akim Demaille  <akim@epita.fr>
21709         The location tracking mechanism is precious for parse error
21710         messages.  Nevertheless, it is enabled only when `@n' is used in
21711         the grammar, which is a different issue (you can use it in error
21712         message, but not in the grammar per se).  Therefore, there should
21713         be another means to enable it.
21715         * src/getargs.c (getargs): Support `--locations'.
21716         (usage): Report it.
21717         * src/getargs.h (locationsflag): Export it.
21718         * src/lex.c (percent_table): Support `%locations'.
21719         * src/reader.c (yylsp_needed): Remove this variable, now replaced
21720         with `locationsflag'.
21721         * doc/bison.texinfo: Document `--locations' and `%locations'.
21722         Sort the options.
21723         * tests/calc.m4: Test it.
21725         For regularity of the names, replace each
21726         (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21727         (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21728         In addition replace each `flag' with `_flag'.
21730 2000-10-02  Akim Demaille  <akim@epita.fr>
21732         Also test parse error messages, including with YYERROR_VERBOSE.
21734         * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21735         associative).
21736         Use it to check the computations.
21737         Use it to check `nonassoc' is honored.
21738         (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21739         `--yyerror-verbose'.
21740         (_AT_CHECK_CALC): Adjust to this option.
21741         (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21743 2000-10-02  Akim Demaille  <akim@epita.fr>
21745         Test also `--verbose', `--defines' and `--name-prefix'.  Testing
21746         the latter demonstrates a flaw in the handling of non debugging
21747         parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21748         was used in order to simplify:
21750         #if YYDEBUG
21751         if (yydebug)
21752         {
21753         ...
21754         }
21755         #endif
21757         into
21759         if (yydebug)
21760         {
21761         ...
21762         }
21764         unfortunately this leads to a CPP conflict when
21765         `--name-prefix=foo' is used since it produces `#define yydebug
21766         foodebug'.
21768         * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21769         (YYDPRINTF): New macro.
21770         Spread its use.
21771         * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21772         the bison options.
21773         Also test `--verbose', `--defines' and `--name-prefix'.
21775 2000-10-02  Akim Demaille  <akim@epita.fr>
21777         Improve the readability of the produced parsers.
21779         * src/bison.s1: Formatting changes.
21780         Improve the comment related to the `$' mark.
21781         (yydefault): Don't fall through to `yyresume': `goto' there.
21782         * src/output.c (output_parser): When the `$' is met, skip the end
21783         of its line.
21784         New variable, `number_of_dollar_signs', to check there's exactly
21785         one `$' in the parser skeleton.
21787 2000-10-02  Akim Demaille  <akim@epita.fr>
21789         * lib/xstrdup.c: New file, from the fileutils.
21790         * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21791         (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21792         instead of strlen + xmalloc + strcpy.
21793         * src/symtab.c (copys): Remove, use xstrdup instead.
21795 2000-10-02  Akim Demaille  <akim@epita.fr>
21797         * src/gram.h (associativity): New enum type which replaces the
21798         former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21799         `right_assoc', `left_assoc' and `non_assoc'.
21800         Adjust all dependencies.
21801         * src/reader.c: Formatting changes.
21802         (LTYPESTR): Don't define it, use it as a literal in
21803         `reader_output_yylsp'.
21804         * src/symtab.h (symbol_class): New enum type which replaces the
21805         former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21806         `sunknown', `stoken and `snterm'.
21808 2000-10-02  Akim Demaille  <akim@epita.fr>
21810         * src/getargs.c (fixed_outfiles): Rename as...
21811         (yaccflag): for consistency and accuracy.
21812         Adjust dependencies.
21814 2000-10-02  Akim Demaille  <akim@epita.fr>
21816         Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21817         Bison's `allocate.c' and `alloc.h'.  This patch was surprisingly
21818         difficult and introduced a lot of core dump.  It turns out that
21819         Bison used an implementation of `xmalloc' based on `calloc', and
21820         at various places it does depend upon the initialization to 0.  I
21821         have not tried to isolate the pertinent places, and all the former
21822         calls to Bison's `xmalloc' are now using `XCALLOC'.  Someday,
21823         someone should address this issue.
21825         * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21826         * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21827         files.
21828         Adjust dependencies.
21829         * src/warshall.h: New file.
21830         Propagate.
21832 2000-10-02  Akim Demaille  <akim@epita.fr>
21834         Various anti-`extern in *.c' changes.
21836         * src/system.h: Include `assert.h'.
21838 2000-10-02  Akim Demaille  <akim@epita.fr>
21840         * src/state.h (nstates, final_state, first_state, first_shift)
21841         (first_reduction): Move their exportation from here...
21842         * src/LR0.h: to here.
21843         Adjust dependencies.
21844         * src/getargs.c (statisticsflag): New variable.
21845         Add support for `--statistics'.
21846         Adjust dependencies.
21848         Remove a lot of now useless `extern' statements in most files.
21850 2000-10-02  Akim Demaille  <akim@epita.fr>
21852         * src/LR0.h: New file.
21853         Propagate its use.
21855 2000-10-02  Akim Demaille  <akim@epita.fr>
21857         * src/print.h: New file.
21858         Propagate its use.
21859         * src/print.c: Formatting and ordering changes.
21860         (verbose, terse): Replace with...
21861         (print_results): this new function.
21862         Adjust dependencies.
21864 2000-10-02  Akim Demaille  <akim@epita.fr>
21866         * src/conflicts.c (conflict_report): New function.
21867         (conflict_log, verbose_conflict_log): Replace with...
21868         (print_conflicts): this function.
21869         Adjust dependencies.
21870         * src/conflicts.h: New file.
21871         Propagate its inclusion.
21873 2000-10-02  Akim Demaille  <akim@epita.fr>
21875         * src/nullable.h: New file.
21876         Propagate its inclusion.
21877         * src/nullable.c: Formatting changes.
21879 2000-10-02  Akim Demaille  <akim@epita.fr>
21881         * src/reduce.h: New file.
21882         Propagate its inclusion.
21883         * src/reduce.c: Topological sort and other formatting changes.
21884         (bool, TRUE, FALSE): Move their definition to...
21885         * src/system.h: here.
21887 2000-10-02  Akim Demaille  <akim@epita.fr>
21889         * src/files.c: Formatting changes.
21890         (tryopen, tryclose, openfiles): Rename as...
21891         (xfopen, xfclose, open_files): this.
21892         (stringappend): static.
21893         * src/files.h: Complete the list of exported symbols.
21894         Propagate its use.
21896 2000-10-02  Akim Demaille  <akim@epita.fr>
21898         * src/reader.h: New file.
21899         Propagate its use instead of tedious list of `extern' and
21900         prototypes.
21901         * src/reader.c: Formatting changes, topological sort,
21902         s/register//.
21904 2000-10-02  Akim Demaille  <akim@epita.fr>
21906         * src/lex.h: Prototype `lex.c' exported functions.
21907         * src/reader.c: Adjust.
21908         * src/lex.c: Formatting changes.
21909         (safegetc): Rename as...
21910         (xgetc): this.
21912 2000-10-02  Akim Demaille  <akim@epita.fr>
21914         * src/lalr.h: New file.
21915         Propagate its inclusion instead of prototypes and `extern'.
21916         * src/lalr.c: Formatting changes, topological sorting etc.
21918 2000-10-02  Akim Demaille  <akim@epita.fr>
21920         * src/output.c (token_actions): Introduce a temporary array,
21921         YYDEFACT, that makes it possible for this function to use
21922         output_short_table.
21924 2000-10-02  Akim Demaille  <akim@epita.fr>
21926         `user_toknums' is output as a `short[]' in `output.c', while it is
21927         defined as a `int[]' in `reader.c'.  For consistency with the
21928         other output tables, `user_toknums' is now defined as a table of
21929         shorts.
21931         * src/reader.c (user_toknums): Be a short table instead of an int
21932         table.
21933         Adjust dependencies.
21935         Factor the short table outputs.
21937         * src/output.c (output_short_table): New function.
21938         * src/output.c (output_gram, output_stos, output_rule_data)
21939         (output_base, output_table, output_check):  Use it.
21941 2000-10-02  Akim Demaille  <akim@epita.fr>
21943         * src/output.c (output): Topological sort of the functions, in
21944         order to get rid of the `static' prototypes.
21945         No longer use `register'.
21946         * src/output.h: New file.
21947         Propagate its inclusion in files explicitly prototyping functions
21948         from output.c.
21950 2000-09-21  Akim Demaille  <akim@epita.fr>
21952         * src/atgeneral.m4: Update from Autoconf.
21954 2000-09-21  Akim Demaille  <akim@epita.fr>
21956         * src/closure.h: New file.
21957         * src/closure.c: Formatting changes, topological sort over the
21958         functions, use of closure.h.
21959         (initialize_closure, finalize_closure):  Rename as...
21960         (new_closure, free_closure): these.  Adjust dependencies.
21961         * src/LR0.c: Formatting changes, topological sort, use of
21962         cloture.h.
21963         (initialize_states): Rename as...
21964         (new_states): this.
21965         * src/Makefile.am (noinst_HEADERS): Adjust.
21967 2000-09-20  Akim Demaille  <akim@epita.fr>
21969         * src/acconfig.h: Don't protect config.h against multiple
21970         inclusion.
21971         Don't define PARAMS.
21972         * src/system.h: Define PARAMS.
21973         Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21974         purpose of config.h.  system.h must not try to fix wrong
21975         definitions in config.h.
21977 2000-09-20  Akim Demaille  <akim@epita.fr>
21979         * src/derives.h: New file.
21980         * src/main.c, src/derives.h: Use it.
21981         Formatting changes.
21982         * src/Makefile.am (noinst_HEADERS): Adjust.
21984 2000-09-20  Akim Demaille  <akim@epita.fr>
21986         * tests/atgeneral.m4: Update from Autoconf.
21987         * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21988         (AT_CHECK_CALC): New macros.
21989         Use these macros to test bison with options `', `--raw',
21990         `--debug', `--yacc', `--yacc --debug'.
21992 2000-09-19  Akim Demaille  <akim@epita.fr>
21994         * src/output.c: Formatting changes.
21995         * src/machine.h: Remove, leaving its contents in...
21996         * src/system.h: here.
21997         Include stdio.h.
21998         Adjust all dependencies on stdio.h and machine.h.
21999         * src/getargs.h: New file.
22000         Let all `extern' declarations about getargs.c be replaced with
22001         inclusion of `getargs.h'.
22002         * src/Makefile.am (noinst_HEADERS): Adjust.
22004         * tests/calc.m4 (yyin): Be initialized in main, not on the global
22005         scope.
22006         (yyerror): Returns void, not int.
22007         * doc/bison.texinfo: Formatting changes.
22009 2000-09-19  Akim Demaille  <akim@epita.fr>
22011         * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22012         portable.
22014 2000-09-18  Akim Demaille  <akim@epita.fr>
22016         * configure.in: Append WARNING_CFLAGS to CFLAGS.
22017         * src/Makefile.am (INCLUDES): Don't.
22018         Be ready to fetch headers in lib/.
22020 2000-09-18  Akim Demaille  <akim@epita.fr>
22022         * doc/bison.texinfo: Update the copyright.
22023         ANSIfy and GNUify the examples.
22024         Remove the old menu.
22026 2000-09-18  Akim Demaille  <akim@epita.fr>
22028         First set of tests: use the `calc' example from the documentation.
22030         * src/bison.s1 (yyparse): Condition the code using `yytname' which
22031         is defined only when YYDEBUG is.
22032         * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22033         * src/files.c (tryopen, tryclose): Formatting changes.
22034         Move to the top and be static.
22035         * src/reader.c (read_signed_integer): Likewise.
22036         * tests/calc.m4: New file.
22037         * Makefile.am, suite.m4: Adjust.
22038         * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22040 2000-09-18  Akim Demaille  <akim@epita.fr>
22042         Add support for an Autotest test suite for Bison.
22044         * m4/m4.m4, m4/atconfig.m4: New files.
22045         * m4/Makefile.am (EXTRA_DIST): Adjust.
22046         * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22047         files.
22048         * src/getargs.c: Display a more standard --version message.
22049         * src/reader.c (reader): Formatting changes.
22050         No longer depend upon VERSION_STRING.
22051         * configure.in: No longer use `dnl'.
22052         Set up the test suite and the new directory `tests/.
22053         (VERSION_STRING): Remove.
22055 2000-04-14  Akim Demaille  <akim@epita.fr>
22057         * src/reader.c (copy_comment2): New function, same as former
22058         `copy_comment', but outputs into two FILE *.
22059         (copy_comment): Use it.
22060         (parse_union_decl): Use it.
22061         (get_type, parse_start_decl): Use the same `invalid' message.
22062         (parse_start_decl, parse_union_decl): Use the same `multiple'
22063         message.
22064         (parse_union_decl, copy_guard, copy_action): Use the same
22065         `unmatched' message.
22066         * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22068 2000-03-31  Akim Demaille  <akim@epita.fr>
22070         * src/files.c (tryopen, tryclose): Move to the top.
22071         Be static.
22073 2000-03-31  Akim Demaille  <akim@epita.fr>
22075         * src/main.c (main): Don't call `done', exit does it.
22077 2000-03-31  Akim Demaille  <akim@epita.fr>
22079         * allocate.c: s/return (foo)/return foo/.
22080         * lalr.c: Likewise.
22081         * LR0.c: Likewise.
22082         * output.c: Likewise.
22083         * reader.c: Likewise.
22084         * symtab.c: Likewise.
22085         * vmsgetargs.c: Likewise.
22087 2000-03-31  Akim Demaille  <akim@epita.fr>
22089         Clean up the error reporting functions.
22091         * src/report.c: New file.
22092         * src/report.h: Likewise.
22093         * src/Makefile.am: Adjust.
22094         * m4/error.m4: New file.
22095         * m4/Makefile.am: Adjust.
22096         * configure.in (jm_PREREQ_ERROR): Call it.
22097         * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22098         Remove.
22099         (fatal, fatals): Remove.  All callers use complain.c::fatal.
22100         (warn, warni, warns, warnss, warnss): Remove.  All callers use
22101         complain.c::complain.
22102         (toomany): Remove, use fatal instead.
22103         * src/files.c (done): No argument, use complain_message_count.
22104         * src/main.c (main): Register `done' to `atexit'.
22106         * src/getargs.c (usage): More `fputs', less `fprintf'.
22108 2000-03-28  Akim Demaille  <akim@epita.fr>
22110         * lib/: New directory.
22111         * Makefile.am (SUBDIRS): Adjust.
22112         * configure.in: Adjust.
22113         (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22114         useless.
22115         * src/alloca.c: Moved to lib/.
22116         * src/getopt.c: Likewise.
22117         * src/getopt1.c: Likewise.
22118         * src/getopt.h: Likewise.
22119         * src/ansi2knr.c: Likewise.
22120         * src/ansi2knr.1: Likewise.
22121         * src/Makefile.am: Adjust.
22122         * lib/Makefile.am: New file.
22124 2000-03-28  Akim Demaille  <akim@epita.fr>
22126         * src/getargs.c (usage): Refresh the help message.
22128 2000-03-17  Akim Demaille  <akim@epita.fr>
22130         * src/getopt1.c: Updated from textutils 2.0e
22131         * src/getopt.c: Likewise.
22132         * src/getopt.h: Likewise.
22134 2000-03-17  Akim Demaille  <akim@epita.fr>
22136         * src/Makefile.am (bison.simple): Fix the awk program: quote only
22137         the file name, not the whole `#line LINE FILE'.
22139 2000-03-17  Akim Demaille  <akim@epita.fr>
22141         On syntax errors, report the token on which we choked.
22143         * src/bison.s1 (yyparse): In the label yyerrlab, when
22144         YYERROR_VERBOSE, add yychar in msg.
22146 2000-03-17  Akim Demaille  <akim@epita.fr>
22148         * src/reader.c (copy_at): New function.
22149         (copy_guard): Use it.
22150         (copy_action): Use it.
22152 2000-03-17  Akim Demaille  <akim@epita.fr>
22154         Be kind to translators, save some useless translations.
22156         * src/main.c (banner): New function.
22157         (fatal_banner): Use it.
22158         (warn_banner): Use it.
22160 2000-03-17  Akim Demaille  <akim@epita.fr>
22162         * src/reader.c (copy_definition): Use copy_string and
22163         copy_comment.  Removed now unused `match', `ended',
22164         `cplus_comment'.
22165         (copy_comment, copy_string): Moved, to be visible from
22166         copy_definition.
22168 2000-03-17  Akim Demaille  <akim@epita.fr>
22170         * src/reader.c (copy_string): Declare `static inline'.  No
22171         problems with inline, since it is checked by configure.
22172         (copy_comment): Likewise.
22174 2000-03-17  Akim Demaille  <akim@epita.fr>
22176         * src/reader.c (packsymbols): Formatting changes.
22178 2000-03-17  Akim Demaille  <akim@epita.fr>
22180         * src/reader.c (copy_comment): New function, factored out from:
22181         (copy_action): Use it.  Removed now unused `match', `ended',
22182         `cplus_comment'.
22183         (copy_guard): Likewise.
22185 2000-03-17  Akim Demaille  <akim@epita.fr>
22187         * src/reader.c (copy_string): New function, factored out from:
22188         (copy_action): Use it.
22189         (copy_guard): Likewise.
22191 2000-03-17  Akim Demaille  <akim@epita.fr>
22193         Change the handling of @s so that they behave exactly like $s.
22194         There is now a pseudo variable @$ (readble and writable), location
22195         of the lhs of the rule (by default ranging from the location of
22196         the first symbol of the rhs, to the location of the last symbol,
22197         or, if the rhs is empty, YYLLOC).
22199         * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22200         yyval.
22201         (yyparse): When providing a default semantic action, provide a
22202         default location action.
22203         (after the $): No longer change `*YYLSP', just stack YYLOC the
22204         same way you stack YYVAL.
22205         * src/reader.c (read_declarations): Use warns.
22206         (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22207         (copy_action, case '@'): Likewise.
22208         Use a standard error message, to save useless work from
22209         translators.
22211 2000-03-17  Akim Demaille  <akim@epita.fr>
22213         * src/bison.s1: Formatting and cosmetics changes.
22214         * src/reader.c: Likewise.
22215         Update the Copyright notice.
22217 2000-03-17  Akim Demaille  <akim@epita.fr>
22219         * src/bison.s1 (#line): All set to `#line' only, since the
22220         Makefile now handles them.
22222 2000-03-16  Akim Demaille  <akim@epita.fr>
22224         * src/output.c (output_rule_data): Output the documentation of
22225         some of the tables.
22226         (Copyright notice): Update.
22227         Formatting changes.
22229 2000-03-16  Akim Demaille  <akim@epita.fr>
22231         * src/bison.s1 [!YYDEBUG]: Define yydebug to 0.  This allows to
22232         remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22233         One `#if YYDEBUG' remains, since it uses variables which are
22234         defined only if `YYDEBUG != 0'.
22236 2000-03-16  Akim Demaille  <akim@epita.fr>
22238         * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22239         and related variables so that the similarities are highlighted.
22241 2000-03-16  Akim Demaille  <akim@epita.fr>
22243         * src/bison.s1: Properly indent CPP directives.
22245 2000-03-16  Akim Demaille  <akim@epita.fr>
22247         * src/bison.s1: Properly indent the `alloca' CPP section.
22249 2000-03-16  Akim Demaille  <akim@epita.fr>
22251         Do not hard code values of directories in `configure.in'.
22252         Update the `configure' tool chain.
22254         * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22255         src/makefile.am.
22256         (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22257         (AC_OUTPUT): Add m4/Makefile.
22258         Bump to bison 1.28a, 1.29 has never been released.
22259         * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22260         handled via src/Makefile.am.
22261         (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22262         HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22263         autoheader.
22264         * Makefile.am (SUBDIRS): Add m4.
22265         (ACLOCAL_AM_FLAGS): New variable.
22266         (AUTOMAKE_OPTIONS): Add check-news.
22267         * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22268         the proper line number and file name.
22269         (DEFS): Propagate the location of bison library files and of the
22270         locale files.
22271         (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22272         builddir.
22273         * acinclude.m4: Remove, replaced by the directory m4.
22274         * m4/Makefile.am (EXTRA_DIST): New variable.
22275         * m4/gettext.m4: New file, from the fileutils.
22276         * m4/lcmessage.m4: Likewise
22277         * m4/progtest.m4: Likewise.
22278         * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22280 2000-03-10  Akim Demaille  <akim@epita.fr>
22282         * src/closure.c:
22283         Formatting changes of various comments.
22284         Respect the GNU coding standards at various places.
22285         Don't use `_()' when no translation is needed.
22287 1999-12-13  Jesse Thilo  <jthilo@gnu.org>
22289         * src/files.c:
22290         OS/2 honors TMPDIR environment variable.
22292 1999-12-13  Jesse Thilo  <jthilo@gnu.org>
22294         * doc/bison.texinfo: Tweaked spelling and grammar.
22295         Updated ISBN.
22296         Removed reference to price of printed copy.
22297         Mention BISON_SIMPLE and BISON_HAIRY.
22299 1999-12-13  Jesse Thilo  <jthilo@gnu.org>
22301         * configure.in, NEWS:
22302         Bison 1.29 released.
22304 1999-10-27  Jesse Thilo  <jthilo@gnu.org>
22306         * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22307         Added reference card.
22309 1999-07-26  Jesse Thilo  <jthilo@gnu.org>
22311         * po/ru.po: Added Russian translation.
22313 1999-07-26  Jesse Thilo  <jthilo@gnu.org>
22315         * configure.in: Added Russian translation.
22317 1999-07-06  Jesse Thilo  <jthilo@gnu.org>
22319         * configure.in, NEWS, README:
22320         Released version 1.28.
22322 1999-06-14  Jesse Thilo  <jthilo@gnu.org>
22324         * src/system.h:
22325         Squashed redefinition warning on some systems.
22327         * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22328         Have configure build version string instead of relying on ANSI string
22329         concatentation.
22331 1999-06-14  Jesse Thilo  <jthilo@gnu.org>
22333         * po/POTFILES.in: Got rid of version.c.
22335 1999-06-14  Jesse Thilo  <jthilo@gnu.org>
22337         * acconfig.h, configure.in:
22338         Have configure build version string instead of relying on ANSI string
22339         concatentation.
22341 1999-06-08  Jesse Thilo  <jthilo@gnu.org>
22343         * doc/bison.1:
22344         Dropped mention of `+' for long-named options.
22346 1999-05-30  Jesse Thilo  <jthilo@gnu.org>
22348         * src/files.c: Added <unistd.h> for unlink().
22350         * src/Makefile.am, src/system.h:
22351         I18n fixes.
22353 1999-05-30  Jesse Thilo  <jthilo@gnu.org>
22355         * README: Added a FAQ list.
22357         * configure.in, acconfig.h:
22358         I18n fixes.
22360 1999-05-30  Jesse Thilo  <jthilo@gnu.org>
22362         * doc/FAQ, doc/Makefile.am:
22363         Added a FAQ list.
22365 1999-05-19  Jesse Thilo  <jthilo@gnu.org>
22367         * src/alloc.h, src/symtab.h, src/version.c:
22368         Protected inclusion of "config.h" with HAVE_CONFIG_H.
22370 1999-04-18  Jesse Thilo  <jthilo@gnu.org>
22372         * src/.cvsignore, src/Makefile.am:
22373         Reorganized: sources in `src', documentation in `doc'.
22375         * src/lex.c (literalchar):
22376         fixed the code for escaping double quotes (thanks
22377         Jonathan Czisny.)
22379 1999-04-18  Jesse Thilo  <jthilo@gnu.org>
22381         * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22382         Adjusted paths to reflect directory reorganization.
22384 1999-04-18  Jesse Thilo  <jthilo@gnu.org>
22386         * doc/.cvsignore, doc/Makefile.am:
22387         Reorganized: sources in `src', documentation in `doc'.
22389 1999-04-18  Jesse Thilo  <jthilo@gnu.org>
22391         * configure.in:
22392         Updated AC_INIT file to reflect directory reorganization.
22394         * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22395         Reorganized: sources in `src', documentation in `doc'.
22397 1999-04-13  Jesse Thilo  <jthilo@gnu.org>
22399         * src/allocate.c:
22400         Don't declare calloc() and realloc() if not necessary.
22402 1999-04-13  Jesse Thilo  <jthilo@gnu.org>
22404         * configure.in, acconfig.h, acinclude.m4:
22405         Don't declare calloc() and realloc() if not necessary.
22407 1999-03-23  Jesse Thilo  <jthilo@gnu.org>
22409         * po/.cvsignore: Added i18n support.
22411 1999-03-23  Jesse Thilo  <jthilo@gnu.org>
22413         * acconfig.h, configure.in, Makefile.am:
22414         Added i18n support.
22416 1999-03-22  Jesse Thilo  <jthilo@gnu.org>
22418         * src/bison.s1: Fixed #line numbers.
22420 1999-03-15  Jesse Thilo  <jthilo@gnu.org>
22422         * po/es.po, po/fr.po, po/nl.po, po/de.po:
22423         Added PO files from Translation Project.
22425 1999-03-03  Jesse Thilo  <jthilo@gnu.org>
22427         * Makefile.am:
22428         Added support for non-ANSI compilers (ansi2knr).
22430 1999-02-16  Jesse Thilo  <jthilo@gnu.org>
22432         * configure.in: Bumped version number to 1.27.
22434         * Makefile.am:
22435         Added `bison.simple' to list of files removed by `make distclean'.
22437 1999-02-12  Jesse Thilo  <jthilo@gnu.org>
22439         * src/files.c, src/files.h:
22440         Defined locations of parser files in config.h instead of Makefile.
22442 1999-02-12  Jesse Thilo  <jthilo@gnu.org>
22444         * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22445         Defined locations of parser files in config.h instead of Makefile.
22447 1999-02-09  Jesse Thilo  <jthilo@gnu.org>
22449         * Makefile.am:
22450         Removed inappropriate use of $< macro.
22452 1999-02-05  Jesse Thilo  <jthilo@gnu.org>
22454         * po/Makefile.in.in, po/POTFILES.in:
22455         Add `po' directory skeleton.
22457 1999-01-27  Jesse Thilo  <jthilo@gnu.org>
22459         * README: Document help-bison list.
22461         * configure.in: Add check for mkstemp().
22463 1999-01-20  Jesse Thilo  <jthilo@gnu.org>
22465         * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22466         Hush a few compiler warnings.
22468         * src/files.c:
22469         Add tryclose(), which verifies that fclose was successful.
22470         Hush a couple of compiler warnings.
22472 1999-01-20  Jesse Thilo  <jthilo@gnu.org>
22474         * Makefile.am, OChangeLog:
22475         ChangeLog is now automatically generated.  Include the old version as
22476         OChangeLog.
22478 1999-01-14  Jesse Thilo  <jthilo@gnu.org>
22480         * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
22481         Update FSF address.
22483 1999-01-14  Jesse Thilo  <jthilo@gnu.org>
22485         * doc/bison.texinfo: Fix formatting glitch.
22487         * doc/bison.texinfo: Update FSF address.
22489 1999-01-14  Jesse Thilo  <jthilo@gnu.org>
22491         * acconfig.h: Update FSF address.
22493 1999-01-08  Jesse Thilo  <jthilo@gnu.org>
22495         * src/system.h:
22496         Don't define PACKAGE here, since config.h defines it.
22498 1998-12-30  Jesse Thilo  <jthilo@gnu.org>
22500         * src/reader.c: Update copyright date.
22502         * src/main.c:
22503         Ditch sprintf to statically-sized buffers in fatal/warn functions in
22504         favor of output directly to stderr (avoids buffer overruns).
22506         * src/reader.c: Some checks for premature EOF.
22508         * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
22509         Use prototypes if the compiler understands them.
22511         * src/files.c: Honor TMPDIR on Unix hosts.
22512         Use prototypes if the compiler understands them.
22514         * src/reader.c:
22515         Fix a couple of buffer overrun bugs.
22516         Use prototypes if the compiler understands them.
22518         * src/system.h: Include unistd.h and ctype.h.
22519         Use #ifdef instead of #if for NLS symbols.
22521 1998-12-30  Jesse Thilo  <jthilo@gnu.org>
22523         * doc/bison.texinfo:
22524         Delete comment "consider using @set for edition number, etc..." since
22525         we now are doing so.
22527 1998-12-30  Jesse Thilo  <jthilo@gnu.org>
22529         * configure.in:
22530         Use prototypes if the compiler understands them.
22532         * NEWS: Document 1.26 highlights.
22534         * Makefile.am: Require Automake 1.3 or later.
22536         * acconfig.h:
22537         Use prototypes if the compiler understands them.
22539 1998-12-29  Jesse Thilo  <jthilo@gnu.org>
22541         * src/version.c:
22542         Use VERSION symbol from automake for version number.
22544 1998-12-29  Jesse Thilo  <jthilo@gnu.org>
22546         * acconfig.h, configure.in, version.cin:
22547         Use VERSION symbol from automake for version number.
22549 1998-11-28  Jesse Thilo  <jthilo@gnu.org>
22551         * Makefile.am:
22552         Distribute original version of simple parser (bison.s1), not built
22553         version (bison.simple).
22555 1998-11-28  Jesse Thilo  <jthilo@gnu.org>
22557         * doc/bison.texinfo: Add info dir entry.
22559         * doc/bison.texinfo:
22560         Let automake put version number into documentation.
22562 1998-11-26  Jesse Thilo  <jthilo@gnu.org>
22564         * src/bison.cld, src/build.com, src/vmshlp.mar:
22565         Add non-RCS files from /gd/gnu/bison.
22567 1998-11-26  Jesse Thilo  <jthilo@gnu.org>
22569         * doc/bison.1:
22570         Document the BISON_HAIRY and BISON_SIMPLE variables.
22572 1998-11-25  Jesse Thilo  <jthilo@gnu.org>
22574         * src/version.c: Build version.c automatically.
22576         * src/reader.c:
22577         Fix token numbering (used to start at 258, not 257).
22579         * src/system.h: Include config.h.
22581         * src/getargs.c: Update bug report address.
22583         * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22584         Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22586 1998-11-25  Jesse Thilo  <jthilo@gnu.org>
22588         * Makefile.am:
22589         Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22591         * configure.in, version.cin:
22592         Build version.c automatically.
22594         * AUTHORS: Add AUTHORS file.
22596         * README: Update bug report address.
22598         * bison.simple:
22599         Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22601         * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22602         Add automake stuff.
22604 1998-11-25  Jesse Thilo  <jthilo@gnu.org>
22606         * doc/bison.texinfo: Clean up some formatting.
22608 1998-05-05  Richard Stallman  <rms@gnu.org>
22610         * doc/bison.texinfo:
22611         Explain better why to make a pure parser.
22613 1998-01-05  Richard Stallman  <rms@gnu.org>
22615         * src/files.c (openfiles):
22616         [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22617         find a temporary directory, if possible.  Do not unlink files while
22618         they are open.
22620 1997-08-25  Richard Stallman  <rms@gnu.org>
22622         * src/reader.c (stack_offset;):
22623         Change some warni to warns.
22625         * src/lex.c (literalchar): Use warns, not warni.
22627 1997-06-28  Richard Stallman  <rms@gnu.org>
22629         * src/bison.s1: Add a Bison version comment.
22631         * src/main.c (fatal, warn, berror):
22632         Use program_name.
22634 1997-06-28  Richard Stallman  <rms@gnu.org>
22636         * Makefile.in (bison_version): New variable.
22637         (dist): Use that variable.
22638         (bison.s1): Substitute the Bison version into bison.simple.
22640         * bison.simple: Add a Bison version comment.
22642 1997-06-18  Richard Stallman  <rms@gnu.org>
22644         * src/main.c (fatal, warn, berror):
22645         Make error messages standard.
22646         (toomany): Improve error message text.
22648         * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
22649         new.h renamed to alloc.h.
22651 1997-06-18  Richard Stallman  <rms@gnu.org>
22653         * Makefile.in: new.h renamed to alloc.h.
22655 1997-05-24  Richard Stallman  <rms@gnu.org>
22657         * src/lex.c (literalchar):
22658         Fix the code for escaping \, " and '.
22660         (lex): Avoid trouble when there are many chars
22661         to discard in a char literal with just several chars in it.
22663 1997-05-17  Richard Stallman  <rms@gnu.org>
22665         * src/bison.s1:
22666         Use malloc, if using alloca is troublesome.
22667         (YYSTACK_USE_ALLOCA): New flag macro.
22668         Define it for some systems and compilers.
22669         (YYSTACK_ALLOC): New macro.
22670         (yyparse): Use YYSTACK_ALLOC to allocate stack.
22671         If it was malloc'd, free it.
22673 1997-05-17  Richard Stallman  <rms@gnu.org>
22675         * bison.simple:
22676         Use malloc, if using alloca is troublesome.
22677         (YYSTACK_USE_ALLOCA): New flag macro.
22678         Define it for some systems and compilers.
22679         (YYSTACK_ALLOC): New macro.
22680         (yyparse): Use YYSTACK_ALLOC to allocate stack.
22681         If it was malloc'd, free it.
22683 1997-04-23  Richard Stallman  <rms@gnu.org>
22685         * src/bison.s1:
22686         (alloca) [__hpux]: Always define as __builtin_alloca.
22688 1997-04-23  Richard Stallman  <rms@gnu.org>
22690         * bison.simple:
22691         (alloca) [__hpux]: Always define as __builtin_alloca.
22693 1997-04-22  Richard Stallman  <rms@gnu.org>
22695         * src/bison.s1:
22696         [__hpux]: Include alloca.h (right for HPUX 10)
22697         instead of declaring alloca (right for HPUX 9).
22699         * src/bison.s1 (__yy_memcpy):
22700         Declare arg `count' as unsigned int.
22701         (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22703 1997-04-22  Richard Stallman  <rms@gnu.org>
22705         * bison.simple:
22706         [__hpux]: Include alloca.h (right for HPUX 10)
22707         instead of declaring alloca (right for HPUX 9).
22709         * bison.simple (__yy_memcpy):
22710         Declare arg `count' as unsigned int.
22711         (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22713 1997-01-03  Richard Stallman  <rms@gnu.org>
22715         * src/allocate.c: [__STDC__ or _MSC_VER]:
22716         Declare calloc and realloc to return void *.
22718 1997-01-02  Richard Stallman  <rms@gnu.org>
22720         * src/system.h:
22721         [_MSC_VER]: Include stdlib.h and process.h.
22722         [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22724         * src/main.c (main): Return FAILURE as a value.
22725         (printable_version): Declare arg as int, not char.
22727 1997-01-02  Richard Stallman  <rms@gnu.org>
22729         * Makefile.in (dist):
22730         Explicitly check for symlinks, and copy them.
22732 1996-12-19  Richard Stallman  <rms@gnu.org>
22734         * src/files.c:
22735         [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22737 1996-12-18  Paul Eggert  <eggert@gnu.org>
22739         * src/bison.s1 (yyparse):
22740         If __GNUC__ and YYPARSE_PARAM are both defined,
22741         declare yyparse to have a void * argument.
22743 1996-12-18  Paul Eggert  <eggert@gnu.org>
22745         * bison.simple (yyparse):
22746         If __GNUC__ and YYPARSE_PARAM are both defined,
22747         declare yyparse to have a void * argument.
22749 1996-12-17  Richard Stallman  <rms@gnu.org>
22751         * src/reduce.c (nbits): Add some casts.
22753 1996-08-12  Richard Stallman  <rms@gnu.org>
22755         * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22757 1996-08-12  Richard Stallman  <rms@gnu.org>
22759         * bison.simple: Test _MSDOS as well as _MSDOS_.
22761 1996-07-31  Richard Stallman  <rms@gnu.org>
22763         * src/bison.s1:
22764         [__sun && __i386]: Include alloca.h.
22766 1996-07-31  Richard Stallman  <rms@gnu.org>
22768         * bison.simple:
22769         [__sun && __i386]: Include alloca.h.
22771 1996-07-30  Richard Stallman  <rms@gnu.org>
22773         * src/bison.s1: Comment change.
22775         * src/bison.s1: Test _MSDOS_, not MSDOS.
22777 1996-07-30  Richard Stallman  <rms@gnu.org>
22779         * bison.simple: Comment change.
22781         * bison.simple: Test _MSDOS_, not MSDOS.
22783 1996-06-01  Richard Stallman  <rms@gnu.org>
22785         * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
22786         Insert `_' macro around many string constants.
22788         * src/main.c:
22789         Insert `_' macro around many string constants.
22791         (main): Call setlocale, bindtextdomain and textdomain.
22793         * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22794         [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22795         [ENABLE_NLS]: Include libintl.h.
22796         [ENABLE_NLS] (gettext): Define.
22797         [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22798         (N_, PACKAGE, LOCALEDIR): New macros.
22800 1996-06-01  Richard Stallman  <rms@gnu.org>
22802         * POTFILES.in: New file.
22804         * Makefile.in (allocate.o):
22805         Define target explicitly.
22807         * Makefile.in (CFLAGS): Set to @CFLAGS@.
22808         (LDFLAGS): Set to @LDFLAGS@.
22809         (configure): Run autoconf only if preceding `cd' succeeds.
22810         (bison.s1): Redirect output to temporary file then move the
22811         temporary to the target, rather than redirecting directly to bison.s1.
22812         (clean): Remove config.status and config.log.
22813         (distclean): Don't remove config.status here.
22815 1996-05-12  Richard Stallman  <rms@gnu.org>
22817         * src/bison.s1:
22818         (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22820 1996-05-12  Richard Stallman  <rms@gnu.org>
22822         * bison.simple:
22823         (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22825 1996-05-11  Richard Stallman  <rms@gnu.org>
22827         * src/bison.s1 (__yy_memcpy):
22828         Really reorder the args, as was supposedly done on Feb 14 1995.
22829         (yyparse): Calls changed accordingly.
22831 1996-05-11  Richard Stallman  <rms@gnu.org>
22833         * Makefile.in (dist): Don't use $(srcdir).
22835         * bison.simple (__yy_memcpy):
22836         Really reorder the args, as was supposedly done on Feb 14 1995.
22837         (yyparse): Calls changed accordingly.
22839 1996-01-27  Richard Stallman  <rms@gnu.org>
22841         * src/output.c (output_rule_data):
22842         Test YYERROR_VERBOSE in the conditional
22843         around the definition of ttyname.
22845 1995-12-29  Richard Stallman  <rms@gnu.org>
22847         * src/bison.s1:
22848         Fix line numbers in #line commands.
22850 1995-12-29  Richard Stallman  <rms@gnu.org>
22852         * bison.simple:
22853         Fix line numbers in #line commands.
22855 1995-12-27  Richard Stallman  <rms@gnu.org>
22857         * src/bison.s1 (YYPARSE_PARAM_DECL):
22858         In C++, make it always null.
22859         (YYPARSE_PARAM_ARG): New macro.
22860         (yyparse): Use YYPARSE_PARAM_ARG.
22862 1995-12-27  Richard Stallman  <rms@gnu.org>
22864         * bison.simple (YYPARSE_PARAM_DECL):
22865         In C++, make it always null.
22866         (YYPARSE_PARAM_ARG): New macro.
22867         (yyparse): Use YYPARSE_PARAM_ARG.
22869 1995-11-29  Richard Stallman  <rms@gnu.org>
22871         * doc/bison.texinfo:
22872         Describe literal string tokens, %raw, %no_lines, %token_table.
22874 1995-11-29  Daniel Hagerty  <hag@gnu.org>
22876         * doc/bison.texinfo: Fixed update date
22878 1995-10-16  Richard Stallman  <rms@gnu.org>
22880         * src/version.c: Version 1.25.
22882 1995-10-16  Richard Stallman  <rms@gnu.org>
22884         * NEWS: *** empty log message ***
22886 1995-10-16  Richard Stallman  <rms@gnu.org>
22888         * doc/bison.1, doc/bison.rnh:
22889         Add new options.
22891 1995-10-15  Richard Stallman  <rms@gnu.org>
22893         * src/vmsgetargs.c, src/getargs.c:
22894         Added -n, -k, and -raw switches.
22895         (noparserflag, toknumflag, rawtoknumflag): New variables.
22897         * src/symtab.h (SALIAS):
22898         New #define for adding aliases to %token.
22899         (struct bucket): Added `alias' field.
22901         * src/reduce.c (reduce_grammar):
22902         Revise error message.
22903         (print_notices): Remove final `.' from error message.
22905         * src/reader.c (reader_output_yylsp):
22906         New function.
22907         (readgram): Use `#if 0' around code that accepted %command
22908         inside grammar rules:  The documentation doesn't allow it,
22909         and it will fail since the %command processors scan for the next %.
22910         (parse_token_decl):  Extended the %token
22911         declaration to allow a multi-character symbol as an alias.
22912         (parse_thong_decl): New function.
22913         (read_declarations): Added %thong declarations.
22914         (read_declarations): Handle NOOP to deal with allowing
22915         % declarations as another means to specify the flags.
22916         (readgram): Allow %prec prior to semantics embedded in a rule.
22917         (skip_to_char, read_declarations, copy_definition)
22918         (parse_token_decl, parse_start_decl, parse_type_decl)
22919         (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22920         (get_type_name, copy_guard, copy_action, readgram)
22921         (get_type, packsymbols):  Revised most error messages.
22922         Changed `fatal' to `warnxxx' to avoid aborting for error.
22923         Revised and use multiple warnxxx functions to avoid using VARARGS1.
22924         (read_declarations): Improve the error message for
22925         an invalid character.  Do not abort.
22926         (read_declarations, copy_guard, copy_action): Use
22927         printable_version to avoid unprintable characters in printed output.
22928         (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22929         (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22930         Allow the type of a non-terminal can be given
22931         more than once, as long as all specifications give the same type.
22933         * src/output.c:
22934         (output_headers, output_trailers, output, output_gram)
22935         (output_rule_data): Implement noparserflag variable.
22936         Implement toknumflag variable.
22937         (output): Call reader_output_yylsp to output LTYPESTR.
22939         * src/main.c (main):
22940          If reader sees an error, don't process the grammar.
22941         (fatals): Updated to not use VARARGS1.
22942         (printable_version, int_to_string, warn, warni, warns, warnss)
22943         (warnsss): New error reporting functions.  Avoid abort for error.
22945         * src/lex.h:
22946         Added THONG and NOOP for alias processing.
22947         Added SETOPT for the new code that allows setting options with %flags.
22949         * src/lex.c:
22950         Include getopt.h.  Add some extern decls.
22951         (safegetc): New function to deal with EOF gracefully.
22952         (literalchar); new function to deal with reading \ escapes.
22953         (lex): Use literalchar.
22954         (lex): Implemented "..." tokens.
22955         (literalchar, lex, parse_percent_token): Made tokenbuffer
22956         always contain the token.  This includes growing the token
22957         buffer while reading an integer.
22958         (parse_percent_token): Replaced if-else statement with percent_table.
22959         (parse_percent_token): Added % declarations as another
22960         way to specify the flags -n, -l, and -r.  Also added hooks for
22961         -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22962         major changes to files.c.
22963         (lex) Retain in the incoming stream a character following
22964         an incorrect '/'.
22965         (skip_white_space, lex):  Revised most error messages
22966         and changed fatal to warn to avoid aborting.
22967         (percent_table):  Added %thong declarations.
22969         * src/gram.h: Comment changes.
22971         * src/files.c (openfiles, open_extra_files, done):
22972          Add faction flag
22973         and actfile file.  Handle noparserflag.  Both for -n switch.
22975         * src/conflicts.c (resolve_sr_conflict):
22976         Remove use of alloca.
22978 1995-06-01  Jim Meyering  <meyering@gnu.org>
22980         * doc/bison.texinfo: *** empty log message ***
22982 1995-05-06  Richard Stallman  <rms@gnu.org>
22984         * src/bison.s1: Comment change.
22986 1995-05-06  Richard Stallman  <rms@gnu.org>
22988         * bison.simple: Comment change.
22990 1995-05-03  Richard Stallman  <rms@gnu.org>
22992         * src/version.c: Version now 1.24.
22994         * src/bison.s1: Change distribution terms.
22996         * src/version.c: Version now 1.23.
22998 1995-05-03  Richard Stallman  <rms@gnu.org>
23000         * doc/bison.texinfo:
23001         Rewrite "Conditions for Using Bison".
23002         Update version to 1.24.
23004 1995-05-03  Richard Stallman  <rms@gnu.org>
23006         * bison.simple: Change distribution terms.
23008 1995-02-23  Richard Stallman  <rms@gnu.org>
23010         * src/files.c: Test __VMS_POSIX as well as VMS.
23012 1995-02-14  Jim Meyering  <meyering@gnu.org>
23014         * src/bison.s1 (__yy_memcpy):
23015         Renamed from __yy_bcopy to avoid
23016         confusion.  Reverse FROM and TO arguments to be consistent with
23017         those of memcpy.
23019 1995-02-14  Jim Meyering  <meyering@gnu.org>
23021         * bison.simple (__yy_memcpy):
23022         Renamed from __yy_bcopy to avoid
23023         confusion.  Reverse FROM and TO arguments to be consistent with
23024         those of memcpy.
23026 1994-11-10  David J. MacKenzie  <djm@gnu.org>
23028         * NEWS: reformat
23030         * NEWS: New file.
23032         * Makefile.in (DISTFILES): Include NEWS.
23034         * Makefile.in (DISTFILES):
23035         Include install-sh, not install.sh.
23037         * configure.in: Update to Autoconf v2 macro names.
23039 1994-10-05  David J. MacKenzie  <djm@gnu.org>
23041         * Makefile.in: fix typo
23043         * Makefile.in (prefix, exec_prefix):
23044         Let configure set them.
23046 1994-09-28  David J. MacKenzie  <djm@gnu.org>
23048         * Makefile.in: Set datadir to $(prefix)/share.
23050 1994-09-15  Richard Stallman  <rms@gnu.org>
23052         * src/bison.s1:
23053         Update copyright notice and GPL version.
23055 1994-09-15  Richard Stallman  <rms@gnu.org>
23057         * bison.simple:
23058         Update copyright notice and GPL version.
23060 1994-07-12  Richard Stallman  <rms@gnu.org>
23062         * src/reduce.c, src/reader.c:
23063         entered into RCS
23065 1994-05-05  David J. MacKenzie  <djm@gnu.org>
23067         * Makefile.in: entered into RCS
23069 1994-03-26  Richard Stallman  <rms@gnu.org>
23071         * src/bison.s1: entered into RCS
23073 1994-03-26  Richard Stallman  <rms@gnu.org>
23075         * bison.simple: entered into RCS
23077 1994-03-25  Richard Stallman  <rms@gnu.org>
23079         * src/main.c: entered into RCS
23081 1994-03-24  Richard Stallman  <rms@gnu.org>
23083         * src/conflicts.c: entered into RCS
23085 1994-01-02  Richard Stallman  <rms@gnu.org>
23087         * Makefile.in: *** empty log message ***
23089 1993-11-21  Richard Stallman  <rms@gnu.org>
23091         * src/bison.s1: *** empty log message ***
23093 1993-11-21  Richard Stallman  <rms@gnu.org>
23095         * doc/bison.texinfo: entered into RCS
23097         * doc/bison.texinfo: *** empty log message ***
23099 1993-11-21  Richard Stallman  <rms@gnu.org>
23101         * bison.simple: *** empty log message ***
23103 1993-10-25  David J. MacKenzie  <djm@gnu.org>
23105         * doc/bison.texinfo: *** empty log message ***
23107 1993-10-19  Richard Stallman  <rms@gnu.org>
23109         * src/bison.s1: *** empty log message ***
23111 1993-10-19  Richard Stallman  <rms@gnu.org>
23113         * bison.simple: *** empty log message ***
23115 1993-10-14  Richard Stallman  <rms@gnu.org>
23117         * src/bison.s1: *** empty log message ***
23119 1993-10-14  Richard Stallman  <rms@gnu.org>
23121         * bison.simple: *** empty log message ***
23123 1993-09-14  David J. MacKenzie  <djm@gnu.org>
23125         * doc/bison.texinfo: *** empty log message ***
23127 1993-09-13  Noah Friedman  <friedman@gnu.org>
23129         * Makefile.in: *** empty log message ***
23131 1993-09-10  Richard Stallman  <rms@gnu.org>
23133         * src/conflicts.c: *** empty log message ***
23135         * src/system.h: entered into RCS
23137 1993-09-10  Richard Stallman  <rms@gnu.org>
23139         * doc/bison.1: entered into RCS
23141 1993-09-06  Noah Friedman  <friedman@gnu.org>
23143         * src/version.c: entered into RCS
23145 1993-09-06  Noah Friedman  <friedman@gnu.org>
23147         * Makefile.in: *** empty log message ***
23149 1993-07-30  David J. MacKenzie  <djm@gnu.org>
23151         * Makefile.in: *** empty log message ***
23153 1993-07-24  Richard Stallman  <rms@gnu.org>
23155         * src/bison.s1: *** empty log message ***
23157 1993-07-24  Richard Stallman  <rms@gnu.org>
23159         * bison.simple: *** empty log message ***
23161 1993-07-08  David J. MacKenzie  <djm@gnu.org>
23163         * Makefile.in: *** empty log message ***
23165 1993-07-04  Richard Stallman  <rms@gnu.org>
23167         * src/bison.s1: *** empty log message ***
23169 1993-07-04  Richard Stallman  <rms@gnu.org>
23171         * bison.simple: *** empty log message ***
23173 1993-06-26  David J. MacKenzie  <djm@gnu.org>
23175         * src/getargs.c: entered into RCS
23177 1993-06-26  David J. MacKenzie  <djm@gnu.org>
23179         * doc/bison.texinfo: *** empty log message ***
23181         * doc/bison.1: New file.
23183 1993-06-25  Richard Stallman  <rms@gnu.org>
23185         * src/getargs.c: New file.
23187 1993-06-16  Richard Stallman  <rms@gnu.org>
23189         * src/bison.s1: *** empty log message ***
23191 1993-06-16  Richard Stallman  <rms@gnu.org>
23193         * bison.simple: *** empty log message ***
23195 1993-06-03  Richard Stallman  <rms@gnu.org>
23197         * src/bison.s1: New file.
23199 1993-06-03  Richard Stallman  <rms@gnu.org>
23201         * doc/bison.texinfo: *** empty log message ***
23203 1993-06-03  Richard Stallman  <rms@gnu.org>
23205         * bison.simple: New file.
23207 1993-05-19  Richard Stallman  <rms@gnu.org>
23209         * doc/bison.texinfo: New file.
23211 1993-05-07  Noah Friedman  <friedman@gnu.org>
23213         * Makefile.in: *** empty log message ***
23215 1993-04-28  Noah Friedman  <friedman@gnu.org>
23217         * src/reader.c: *** empty log message ***
23219 1993-04-23  Noah Friedman  <friedman@gnu.org>
23221         * src/alloc.h: entered into RCS
23223 1993-04-20  David J. MacKenzie  <djm@gnu.org>
23225         * src/version.c: *** empty log message ***
23227         * src/files.c, src/allocate.c:
23228         entered into RCS
23230         * src/reader.c: *** empty log message ***
23232         * src/lex.c: entered into RCS
23234         * src/conflicts.c: New file.
23236         * src/symtab.c: entered into RCS
23238         * src/alloc.h: New file.
23240         * src/LR0.c: entered into RCS
23242 1993-04-18  Noah Friedman  <friedman@gnu.org>
23244         * src/reader.c: New file.
23246         * src/version.c: *** empty log message ***
23248 1993-04-18  Noah Friedman  <friedman@gnu.org>
23250         * Makefile.in: *** empty log message ***
23252 1993-04-17  Noah Friedman  <friedman@gnu.org>
23254         * Makefile.in: *** empty log message ***
23256 1993-04-15  Richard Stallman  <rms@gnu.org>
23258         * src/main.c, src/files.c:
23259         New file.
23261 1993-04-15  Noah Friedman  <friedman@gnu.org>
23263         * configure.in: entered into RCS
23265         * configure.in: *** empty log message ***
23267         * configure.in: New file.
23269 1993-04-14  Richard Stallman  <rms@gnu.org>
23271         * Makefile.in: New file.
23273 1993-04-13  Richard Stallman  <rms@gnu.org>
23275         * src/version.c: New file.
23277 1993-03-25  Richard Stallman  <rms@gnu.org>
23279         * src/output.c: entered into RCS
23281 1992-09-25  Richard Stallman  <rms@gnu.org>
23283         * configure.bat: entered into RCS
23285 1992-06-22  Richard Stallman  <rms@gnu.org>
23287         * src/vmsgetargs.c: entered into RCS
23289 1992-06-22  Richard Stallman  <rms@gnu.org>
23291         * doc/bison.rnh: entered into RCS
23293 1992-04-20  David J. MacKenzie  <djm@gnu.org>
23295         * README: entered into RCS
23297 1992-01-22  Richard Stallman  <rms@gnu.org>
23299         * src/machine.h: entered into RCS
23301 1991-12-21  Richard Stallman  <rms@gnu.org>
23303         * src/lalr.c, src/closure.c:
23304         entered into RCS
23306 1991-12-20  Richard Stallman  <rms@gnu.org>
23308         * src/state.h: entered into RCS
23310 1991-12-18  Richard Stallman  <rms@gnu.org>
23312         * src/print.c, src/nullable.c, src/derives.c:
23313         entered into RCS
23315 1991-11-03  David J. MacKenzie  <djm@gnu.org>
23317         * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23318         entered into RCS
23320 1988-09-09  Richard Stallman  <rms@gnu.org>
23322         * src/bison.hairy: entered into RCS
23324 1987-12-16  Richard Stallman  <rms@gnu.org>
23326         * REFERENCES: entered into RCS
23329         -----
23331         Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23332         1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23333         2008, 2009 Free Software Foundation, Inc.
23335         Copying and distribution of this file, with or without
23336         modification, are permitted provided the copyright notice and this
23337         notice are preserved.