1 2008-12-05 Eric Blake <ebb9@byu.net>
3 Build testsuite with newer autoconf.
4 * tests/output.at (m4_expand): Don't override in newer autoconf,
5 where the underlying implementation changed.
6 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
7 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
8 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
9 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
10 since some of them contain unbalanced ')'.
12 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
14 * NEWS: Clarify a little.
16 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
18 * NEWS: Update for recent changes.
20 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
22 Fix unexpanded macros in GLR defines file.
23 Reported by Csaba Raduly at
24 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
25 * THANKS (Csaba Raduly): Add.
26 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
27 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
28 lexer in a separate module that includes the defines file.
29 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
31 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
32 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
33 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
34 (AT_DATA_SOURCE_PROLOGUE): New.
35 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
36 (AT_DATA_SOURCE): New.
37 (AT_FULL_COMPILE): New, copied from master branch and extended to
38 support an additional source file.
40 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
42 Don't let maintainer-*-check targets force a version update.
43 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
46 2008-11-17 Di-an Jan <dianj@freeshell.org>
48 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
49 Align menus. Adjust word wrapping. Use node names for menu names.
50 (Examples): Don't abbreviate node names.
51 (LocalWords): Remove abbreviations.
52 (Copying): Make description a sentence.
53 (Java Action Features): Remove period to match the rest of menu.
55 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
57 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
58 * configure.ac: Adjust usage.
59 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
60 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
61 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
63 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
65 Don't add a semicolon to actions for %skeleton or %language.
66 It breaks Java test cases as reported by Akim Demaille.
67 * src/scan-code.l: Implement.
69 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
71 Clean up %skeleton and %language priority implementation.
72 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
73 remove static qualifier because others will soon need to see it.
74 (language_prio): Likewise.
75 (getargs): Use command_line_prio rather than 0.
76 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
78 (skeleton_prio): Extern it.
79 (language_prio): Extern it.
80 * src/parse-gram.y: Use grammar_prio rather than 1.
82 2008-11-04 Akim Demaille <demaille@gostai.com>
84 * NEWS: Mention the trailing semicolon in action.
86 2008-11-04 Akim Demaille <demaille@gostai.com>
89 * NEWS: Use more outline-mode markup.
90 Suggested by Jim Meyering.
92 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
94 Fix user actions without a trailing semicolon.
95 Reported by Sergei Steshenko at
96 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
97 * THANKS (Sergei Steshenko): Add.
98 * src/scan-code.l (SC_RULE_ACTION): Fix it.
99 * tests/regression.at (Fix user actions without a trailing semicolon):
102 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
104 Initiate further development.
105 * NEWS: Create an empty section for new entries.
106 * gnulib: Update submodule to HEAD.
108 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
112 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
114 Prepare for next release.
115 * NEWS: Briefly mention changes since 2.3b.
116 * README: Say GNU m4 1.4.6, which we've been requiring in release
117 announcements already, not 1.4.3, which breaks the build.
119 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
121 Say %language is experimental.
122 We're thinking of extending it's effect on output file naming. See the
124 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
125 * NEWS: Say it's experimental.
126 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
127 recommend it over %skeleton for now.
128 (Bison Options): Likewise.
129 (C++ Bison Interface): Use %skeleton not %language.
130 (Calc++ Parser): Use %skeleton not %language.
131 * src/getargs.c (usage): Say it's experimental.
133 2008-11-01 Di-an Jan <dianj@freeshell.org>
134 Paolo Bonzini <bonzini@gnu.org>
136 Support all Java parser class modifiers.
137 * data/java.m4 (b4_percent_define_get3): New.
138 (b4_final_if, b4_strictfp_if): New.
139 * data/lalr1.java (final, strictfp, extends, implements): Support.
140 * doc/bison.texinfo (final, strictfp, extends, implements): Add
142 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
143 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
144 (AT_CHECK_JAVA_GREP): New.
145 (Java parser class modifiers): New test.
146 (Java parser class extends and implements): New test.
148 Model exception propagation better with throws and lex_throws.
149 * data/java.m4 (b4_list2): New.
150 (throws): Change default.
151 * data/lalr1.java (yyaction): Add throws.
152 (parse): Add lex_throws in addition to throws.
153 * doc/bison.texinfo (throws, lex_throws): Add documentation.
154 * tests/java.at (Java throws specifications): New test.
156 Improve documentation for Java parsers.
157 * doc/bison.texinfo (Java Parsers): Add subsections.
158 Don't quote first argument of %define.
159 (Java Bison Interface): Document output files. Move documentation
160 of parser class and merge into Java Parser Interface. Document
161 features that error out. Document directives with no effect.
162 Move note about Javadoc higher.
163 (Java Semantic Values): Explicitly mention stype.
164 Document that generic types cannot be used.
165 (Java Location Values): Use @deftypeivar. Document constructors.
166 Correct return value for toString.
167 (Java Parser Interface): List undocumented constants/fields.
168 Move documentation of fields added by %parse-param closer to list
169 of members. Document that token names are added as fields.
170 Document constructors accurately. Remove error method.
171 (Java Scanner Interface): Move note on %pure-parser to Java Bison
172 Interface. Describe %code lexer and yylex accutately.
173 Remove documentation that does not match the code.
174 (Java Action Features): New.
175 (Java Differences): Add reference. Add item on semantic values.
176 Add note about @{ ... @}. Clarify %% epilogue placement.
177 (Java Declarations Summary): New.
180 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
181 (b4_remove_comma): Quote test argument.
182 (b4_identification): Remove "bison" field.
183 * tests/java.at (Java parser class and package names): New test.
184 (Java %parse-param and %lex-param): New test.
185 (Java stype, position_class and location_class): New test.
187 2008-10-31 Di-an Jan <dianj@freeshell.org>
189 * data/lalr1.jave: Update copyright years.
190 (YYParser): Correct name of "generated from" file in Javadoc:
191 use b4_file_name instead of @ofile@.
192 (Location constructor): Correct Javadoc parameter name.
193 (yylloc): Add missing opening m4 quote after b4_location_if.
194 This removes a stray [ in the Javadoc of Lexer.getStartPos.
195 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
196 (YYParser constructor): Correct Javadoc parameter name.
198 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
200 Always put auxiliary code files in the same dir as other output files.
201 * src/files.c (compute_file_name_parts): When the user specifies
202 --output but not --file-prefix, extract the directory prefix from the
203 file prefix not from the grammar file name. This affects the location
204 of files like location.hh generated by the C++ skeleton. The includes
205 in the other output files require this fix.
206 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
207 for expected output files.
208 (Output files): Add a test for the above.
210 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
212 * gnulib: Update submodule to HEAD.
214 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
216 Update copyright year.
219 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
221 Don't overwrite the input file.
222 * src/files.c (output_file_name_check): Fatal error if using input file
224 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
226 (Conflicting output files): Add test.
228 2008-10-28 Akim Demaille <demaille@gostai.com>
231 * data/lalr1.cc: Formatting changes.
233 2008-10-28 Akim Demaille <demaille@gostai.com>
235 Don't define debugging functions when !YYDEBUG.
236 * data/lalr1.cc (debug_stream, set_debug_stream)
237 (debug_level_type, debug_level, set_debug_level): Don't
238 declare them when YYDEBUG is not defined.
239 The implementation are already YYDEBUG-aware.
241 2008-10-28 Akim Demaille <demaille@gostai.com>
243 Prefer "continue" for empty loop bodies.
244 * etc/bench.pl.in: Use "continue" instead of {}.
246 2008-10-28 Akim Demaille <demaille@gostai.com>
248 Space and comments changes.
249 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
250 * data/c.m4, data/lalr1.cc: Space changes.
252 2008-10-28 Akim Demaille <demaille@gostai.com>
254 Make gnulib a submodule.
256 * .gitmodules (gnulib): New.
258 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
260 Fix yyerror_range for user-defined location type in C++. Reported by
262 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
263 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
264 * THANKS (Georg Sauthoff): Add.
266 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
268 Update several administrative files mainly to facilitate releasing.
269 * HACKING (Administrivia): Make the git-merge-changelog notes more
271 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
272 (Release Procedure): Update for git and add numerous details that were
274 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
275 * maint.mk (announcement): Don't list bison as a bootstrap tool so
276 that announcements don't claim we bootstrapped with whatever bison
277 happened to be in PATH. Add flex as a bootstrap tool.
278 * Makefile.maint: Remove, previously replaced by maint.mk.
279 * Makefile.cfg: Remove, and migrate settings to...
280 * cfg.mk: ... here for the sake of `make announcement'.
281 * bootstrap.conf (gnulib_modules): Add announce-gen.
282 * README: Say GNU Bison instead of just Bison. Suggested by Karl
285 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
287 Small but important bugfixes for the Java skeleton.
288 * data/lalr1.java (yyerror): Change Location to b4_location_type.
289 (yy_symbol_print): Call toString on yyvaluep.
291 2008-08-29 Akim Demaille <demaille@gostai.com>
294 * doc/bison.texinfo: It refers to the last edition of this file,
295 not to the release date of Bison.
296 Reported by Joel E. Denny.
298 2008-08-29 Akim Demaille <demaille@gostai.com>
300 * README: Update FAQ pointer.
301 Reported by Joel E. Denny.
303 2008-08-27 Eric Blake <ebb9@byu.net>
305 Resync m4sugar from autoconf.
306 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
307 (m4_init): Adjust to latest m4.git changes.
308 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
310 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
311 (_m4_list_cmp): Reduce side effects.
313 2008-08-27 Akim Demaille <demaille@gostai.com>
315 Check yyerrok in calc.at.
316 * tests/calc.at (calc.y): Use yyerrok on "( error )".
317 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
320 2008-08-27 Akim Demaille <demaille@gostai.com>
322 Support yyerrok in lalr1.cc.
323 YYBACKUP is still to import back into lalr1.cc.
324 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
326 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
328 For maintainer-check*, don't recompile for a $(VERSION) update.
330 (_is-dist-target): Override the one in GNUmakefile.
331 * Makefile.am (EXTRA_DIST): Add cfg.mk.
333 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
335 Update for recent change to gnulib.
336 * src/parse-gram.y: Don't include strverscmp.h. It comes from
339 2008-08-15 Eric Blake <ebb9@byu.net>
341 Remaining m4sugar merge from autoconf.
342 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
343 * data/m4sugar/foreach.m4: New file, copied from autoconf.
344 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
345 * src/output.c (output_skeleton): Tell m4 how to find it.
347 Partial m4sugar merge from autoconf: m4_map.
348 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
349 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
350 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
351 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
353 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
355 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
358 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
360 Keep .version and PACKAGE_VERSION in sync.
361 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
362 dependency, and add comments justifying this in more detail. Discussed
364 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
366 2008-08-06 Eric Blake <ebb9@byu.net>
368 Partial m4sugar merge from autoconf: m4_shiftn.
369 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
370 (m4_shift2, m4_shift3): New macros.
371 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
372 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
373 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
374 * data/java.m4 (b4_remove_comma): Likewise.
376 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
377 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
378 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
379 (m4_init): Consolidate wrapped text into single m4_wrap.
380 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
383 2008-08-05 Eric Blake <ebb9@byu.net>
385 Partial m4sugar merge from autoconf: builtins, version.m4.
386 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
387 (m4_prepend): Remove, as it is unused and inherently quadratic,
388 whereas m4_append is linear in newer m4.
389 (m4_mkstemp): New builtin.
390 (m4_symbols): Make rename conditional.
391 (m4_version_prereq): Ensure fatal error if used in bison, which
392 intentionally lacks version.m4.
394 Fix comments in m4sugar.
395 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
397 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
399 Update for recent .gitignore fix in Gnulib.
400 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
401 anchored .gitignore entries.
403 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
405 Set gnu or gnits strictness.
406 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
407 development and gnits strictness for releases. Based on Eric Blake's
409 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
411 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
413 * NEWS: Clarify documentation of %language.
415 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
417 Support usage of git-merge-changelog.
418 * .gitattributes: New.
419 * HACKING: Document usage of git-merge-changelog.
420 * bootstrap: Install git-merge-changelog entries in .git/config
423 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
425 Remove remaining dependence on CVS Id keyword.
426 * ChangeLog: For the sake of people still using CVS, don't use dollars
428 * data/xslt/bison.xsl: Remove Id from header comments, where it was
430 * data/xslt/xml2dot.xsl: Likewise.
431 * data/xslt/xml2text.xsl: Likewise.
432 * data/xslt/xml2xhtml.xsl: Likewise.
433 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
434 * doc/Makefile.am (neutralize): Remove, no longer needed.
435 (.x.1): Don't use neutralize.
436 (edit): Don't substitute for ID.
437 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
439 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
441 Fix dependence on computed configure variables.
442 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
443 $(top_srcdir)/configure.ac so that changes to computed variables, such
444 as PACKAGE_VERSION, are seen.
445 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
447 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
449 Update copyright dates for recent changes.
451 * src/Makefile.am: Here.
452 * src/reduce.c: Here.
453 * tests/reduce.at: Here.
455 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
457 Use git-version-gen for version names between releases.
458 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
459 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
460 * .prev-version: New.
461 * .version.in: Remove.
462 * ChangeLog: Remove the Id previously used for capturing the CVS
464 * GNUmakefile: Remove, now copied from Gnulib.
465 * Makefile.am: Add code suggested by comments in
466 build-aux/git-version-gen.
467 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
468 .prev-version, and .version.
469 * NEWS (2.3b+): Rename to...
470 (?.?): ... this because we're dropping the "+" version naming scheme,
471 but, in general, we still can't be sure of our next release name.
472 * bootstrap: Add a quick hack to remove from .gitignore the
473 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
474 entry. This should really be fixed in gnulib instead.
475 * bootstrap.conf (gnulib_modules): Add gnumakefile.
476 * configure.ac (AC_INIT): Set version name by invoking
477 build-aux/git-version-gen.
478 (AC_CONFIG_FILES): Remove .version, now generated by
479 build-aux/git-version-gen.
480 * maint.mk: New, copied from coreutils.
481 * doc/.cvsignore (bison.1): Add.
482 * doc/.gitignore (/bison.1): Add.
483 * doc/bison.1: Remove, generated.
484 * src/.cvsignore (revision.c): Remove.
485 * src/.gitignore (/revision.c): Remove.
486 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
487 (BUILT_SOURCES): Remove revision.c.
488 (revision.c): Remove.
489 * src/getargs.c (version): Don't print revision after the VERSION.
490 * src/revision.h: Remove.
492 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
494 Fix untranslatable composition of sentences. Reported by Goran
496 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
497 * THANKS (Goran Uddeborg): Add.
498 * src/reduce.c (reduce_print): Report the number of nonterminals and
499 rules useless in the grammar in separate sentences.
500 * tests/reduce.at (Useless Rules): Update output.
501 (Reduced Automaton): Likewise.
502 (Underivable Rules): Likewise.
503 (Empty Language): Likewise.
505 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
507 Fix some .gitignore and .cvsignore problems.
508 * bootstrap (insert_sorted_if_absent): Replace all uses with...
509 (insert_vc_ignore): ... this new function, which prepends `/' to all
510 .gitignore entries before passing them to insert_sorted_if_absent.
511 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
512 .cvsignore files are maintained even though Bison developers run
513 bootstrap while using Git.
514 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
517 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
518 unneeded. Reported by Eric Blake.
519 * lib/.gitignore (/*~): Add.
520 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
521 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
523 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
525 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
527 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
528 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
529 * bootstrap.conf (gnulib_modules): Add unsetenv.
530 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
531 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
533 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
534 the first argument because it may become position-dependent, and unset
535 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
536 Add comments explaining these issues in more detail.
538 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
540 Add .gitignore everywhere based on .cvsignore.
542 * build-aux/.gitignore: New.
543 * data/.gitignore: New.
544 * doc/.gitignore: New.
545 * etc/.gitignore: New.
546 * examples/.gitignore: New.
547 * examples/calc++/.gitignore: New.
548 * lib/.gitignore: New.
549 * m4/.gitignore: New.
550 * po/.gitignore: New.
551 * runtime-po/.gitignore: New.
552 * src/.gitignore: New.
553 * tests/.gitignore: New.
555 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
557 * NEWS (2.3b+): New section, empty for now.
558 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
560 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
562 * NEWS (2.3b): Update release date since there has been a delay in
563 getting the announcements and tarballs out.
565 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
567 * NEWS: Version 2.3b.
568 * configure.ac (AC_INIT): Likewise.
569 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
571 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
573 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
574 been doing it for years.
575 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
576 (Release Procedure): Add FIXME about make alpha being unmaintained.
578 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
580 * data/yacc.c: Reformat m4 a little for readability.
581 * src/lalr.c (build_relations): Correct comment.
583 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
585 DJGPP specific issue.
586 * djgpp/config.sed: Fixes required to run configure scripts generated
589 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
591 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
592 coordinator@translationproject.org.
594 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
596 * THANKS: Add Eric Blake.
598 2008-04-23 Eric Blake <ebb9@byu.net>
600 Revert prior patch, by working around autoconf regression.
601 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
602 ("Output file name: ("): Uncomment test.
603 ("Output file name: )"): Likewise.
604 Based on an idea from Noah Misch.
606 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
608 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
609 2.61. Reported by Juan Manuel Guerrero at
610 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
611 * tests/output.at ("Output file name: ("): Comment out test case for
613 ("Output file name: )"): Likewise.
615 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
617 * GNUmakefile: Update git-version-gen invocation so make dist
620 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
622 Update to the current gnulib CVS repository, and fix trigraph handling
624 * bootstrap: Update gnulib CVS repository URL.
625 (symlink_to_dir): Encapsulate the code that guarantees the destination
626 directory exists into...
627 (check_dst_dir): ... this new function, and...
628 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
629 fail when copying files into lib/uniwidth/.
630 * src/output.c (prepare_symbols): When writing yytname muscles, where
631 symbol names will be encoded in C-string literals, tell quotearg to
632 escape trigraphs. This used to be the default in gnulib.
633 * tests/regression.at (Token definitions): Because of the change in
634 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
635 escapes trigraphs in symbol names. Thus, yytname no longer has
636 trigraphs unnecessarily doubly escaped. Update test case output.
637 Extend test case to be sure Bison's own error messages will no longer
638 have trigraphs in symbol names unnecessarily escaped once.
640 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
642 Fix make dist infinite loop reported by Juan Manuel Guerrero at
643 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
644 * .cvsignore: Add .version.
646 * bootstrap.conf (gnulib_modules): Add git-version-gen.
647 * configure.ac (AC_CONFIG_FILES): Add .version.
648 * build-aux/.cvsignore: Add git-version-gen.
650 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
652 * NEWS (2.3a+): Mention that -g now takes an argument.
653 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
654 consistency. Update the -g and -x entries now that they take
655 arguments. Use brackets to indicate optional arguments.
656 * src/getargs.c (usage): Explain the relationship between arguments of
657 long and short options more completely. Document --defines and -d
658 separately since the former takes an argument but, for POSIX Yacc, the
660 (short_options): Let -W take an optional argument like --warnings.
661 (getargs): Sort cases.
663 2008-02-28 Akim Demaille <demaille@gostai.com>
665 * doc/bison.texinfo: Fix a few typos.
667 2008-02-28 Akim Demaille <akim@epita.fr>
669 * doc/bison.texinfo (Bison Options): Document -W.
670 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
672 2008-02-28 Akim Demaille <akim@epita.fr>
674 * src/getargs.c (short_options): Split and sort for readability.
675 -g and -x take optional arguments, just like their long options.
676 * build-aux/cross-options.pl: Use /x to make the regexp easier to
678 Fix the handling of $opt which resulted in all the argument to be
679 considered as optional.
681 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
683 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
684 say its interface is experimental.
685 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
687 (Bison Options): In the -L and --language entry, mention Java.
688 (Java Bison Interface): Say the interface is experimental.
689 * src/getargs.c (usage): Mention -L and --language.
691 * NEWS (2.3a+): Say the push parsing interface is experimental.
692 * doc/bison.texinfo (Push Decl): Likewise.
693 (Decl Summary): Likewise in the "%define api.push_pull" entry.
694 (Push Parser Function): Likewise.
695 (Pull Parser Function): Likewise.
696 (Parser Create Function): Likewise.
697 (Parser Delete Function): Likewise.
698 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
699 yypull_parse, and yypush_parse entries.
701 * NEWS (2.3a+): Mention XML support, and say the schema is
703 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
704 * src/getargs.c (usage): Say the XML schema is experimental.
706 * NEWS (2.3a+): Say option instead of flag.
708 2008-02-21 Wojciech Polak <polak@gnu.org>
710 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
713 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
715 Fix impure push parser compile error reported by Bob Rossi at
716 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
717 * data/yacc.c: Clean up whitespace in the output a little.
718 (yypstate_allocated): Define for impure push parsers regardless of
719 whether the pull interface is also requested.
720 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
721 check impure push parsers without the pull interface.
723 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
724 yyerror takes arguments specified by %parse-param while yypstate_new
726 * doc/bison.texinfo (Parser Create Function): Document that
727 yypstate_new returns 0 for multiple impure parser instances.
728 * tests/push.at (Push Parsing: Multiple impure instances): Update
729 expected stderr output.
731 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
733 * runtime-po/POTFILES.in (push.c): Remove.
735 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
737 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
738 * data/push.c: Rename to...
739 * data/yacc.c: ... this, overwriting it.
740 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
741 `%push-pull-parser' -> `%define api.push_pull "both"'.
742 Remove old yacc.c tests, and update push.c tests to yacc.c.
744 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
746 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
747 `"%code top" blocks' instead of `%code "top" blocks'.
748 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
749 Clean up whitespace in the output a little.
751 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
753 Fix documentation problems reported by Tim Josling at
754 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
755 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
756 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
757 integers. Explain the effect of literal string aliases on error
758 messages. Copy token 0 documentation from the C++ skeleton
761 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
763 Accept a token number in a %left, %right, or %nonassoc for POSIX
764 conformance. Reported by Tim Josling at
765 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
766 * NEWS (2.3a+): Mention.
767 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
768 and code numbers are treated by precedence declarations.
769 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
771 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
773 (symbol.prec): New, just like symbol but allows INT.
774 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
776 * tests/regression.at (Token number in precedence declaration): New
779 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
781 DJGPP specific issues.
782 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
783 be changed. Copyright timestamp adjusted.
784 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
785 be changed. Copyright timestamp adjusted.
786 * djgpp/config.site: Copyright timestamp adjusted.
787 * djgpp/config_h.sed: Copyright timestamp adjusted.
788 * djgpp/djunpack.bat: Copyright timestamp adjusted.
789 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
790 filename translation list.
791 * djgpp/subpipe.c (init_subpipe): Check the environment variables
792 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
793 files shall be created. Before trying to use the temp dir where the
794 environment variable points to check that the dir really exists. If
795 not default to the cwd as temp dir. Copyright timestamp adjusted.
796 * djgpp/subpipe.h: Copyright timestamp adjusted.
797 * djgpp/testsuite.sed: Copyright timestamp adjusted.
799 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
801 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
803 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
805 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
806 Problem reported by Claudio Saavedra in
807 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
809 2008-01-05 Wojciech Polak <polak@gnu.org>
811 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
812 document's title with the input grammar file name.
814 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
816 Automate regression testing of the XML/XSLT implementation. Discussed
818 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
819 * configure.ac (XSLTPROC): New substitution.
820 * Makefile.am (maintainer-xml-check): New phony target invoking...
821 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
822 invoking make maintainer-check with BISON_TEST_XML=1.
823 * tests/atlocal.in (XSLTPROC): New.
824 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
825 not to report reachable memory when Bison is expected to have a
826 non-zero exit status and (2) to compare XML/XSLT output with --graph
827 and --report=all output for every working grammar when
829 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
830 (AT_BISON_CHECK_XML): New.
831 (AT_QUELL_VALGRIND): New.
832 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
833 (AT_CHECK): ... don't redefine this since this was the old way to
835 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
836 AT_BISON_CHECK invocations.
837 * tests/c++.at: Likewise.
838 * tests/calc.at: Likewise.
839 * tests/conflicts.at: Likewise.
840 * tests/cxx-type.at: Likewise.
841 * tests/existing.at: Likewise.
842 * tests/glr-regression.at: Likewise.
843 * tests/headers.at: Likewise.
844 * tests/input.at: Likewise.
845 * tests/java.at: Likewise.
846 * tests/output.at: Likewise.
847 * tests/push.at: Likewise.
848 * tests/reduce.at: Likewise.
849 * tests/regression.at: Likewise.
850 * tests/sets.at: Likewise.
851 * tests/skeletons.at: Likewise.
852 * tests/synclines.at: Likewise.
853 * tests/torture.at: Likewise.
854 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
855 tends to hang xsltproc.
856 (Big horizontal): Likewise.
858 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
860 In XML output, remove redundant class attribute on symbol element.
861 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
862 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
863 look up a symbol to determine whether it's a nonterminal or terminal.
864 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
865 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
867 Add prec/assoc information to XML output.
868 * src/gram.c (grammar_rules_print_xml): For each rule that has a
869 %prec, add a percent_prec attribute.
870 * src/print-xml.c (print_grammar): For each terminal that has a
871 precedence or associativity, add a prec or assoc attribute.
873 (xml_puts): Use xml_indent.
874 (xml_printf): Use xml_indent.
875 * src/print-xml.h (xml_indent): Prototype.
877 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
878 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
880 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
882 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
883 (bison:ruleByNumber): ... this for clarity.
884 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
885 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
886 (xsl:template match="reduction"): Update.
887 (xsl:template match="item"): Update.
888 (xsl:template match="reduction"): Update.
890 In the XML output, don't print the list of rules where symbols appear.
891 Compute it in XSLT instead. Discussed at
892 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
893 * data/xslt/bison.xsl (bison:ruleByLhs): New.
894 (bison:ruleByRhs): New.
895 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
897 (xsl:template match="terminal/rule"): Remove.
898 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
900 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
902 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
903 bison:ruleByRhs and mode="number-link" for rule template.
904 (xsl:template match="terminal/rule"): Remove.
905 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
906 bison:ruleByRhs and mode="number-link" for rule template.
907 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
909 (xsl:template match="rule" mode="number-link"): ... this.
910 * src/print-xml.c (print_grammar): Don't print the list of rules.
912 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
914 Don't let --report affect XML output; always print all information.
916 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
917 * src/conflicts.c (log_resolution): Implement.
918 * src/print-xml.c (print_core): Implement.
919 (print_state): Implement.
920 (print_xml): Implement.
922 * NEWS (2.3a+): Fix quotes.
923 * src/parse-gram.y (prologue_declaration): For consistency with -v,
924 don't let %verbose clear the list specified by --report.
926 2007-11-26 Akim Demaille <akim@epita.fr>
928 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
930 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
932 In the XML output, list useless and unused symbols and rules with the
933 useful ones and add a "usefulness" attribute. Discussed starting at
934 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
935 * src/gram.c (grammar_rules_partial_print_xml): Remove.
936 (grammar_rules_print_xml): Print all rules instead of just those
937 useful in the grammar, and add a "usefulness" attribute.
938 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
939 * src/print-xml.c (print_rules_useless_in_parser): Remove.
940 (print_grammar): Print all nonterminals instead of just useful ones,
941 and add a "usefulness" attribute to nonterminals and terminals.
942 (print_xml): Don't print a separate "reductions" or
943 "rules-useless-in-parser" element.
944 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
945 (reduce_xml): Remove.
946 (reduce_token_unused_in_grammar): New.
947 (reduce_nonterminal_useless_in_grammar): New.
948 * src/reduce.h (reduce_xml): Remove prototype.
949 (reduce_token_unused_in_grammar): Add prototype.
950 (reduce_nonterminal_useless_in_grammar): Add prototype.
951 * data/xslt/xml2text.xsl: Update for XML changes.
952 * data/xslt/xml2xhtml.xsl: Update for XML changes.
953 * tests/reduce.at (Useless Terminals): Update output.
954 (Useless Rules): Update output.
955 (Reduced Automaton): Update output.
957 Say "Terminals unused in grammar" instead of "Unused terminals".
958 * NEWS (2.3a+): Update.
959 * doc/bison.texinfo (Understanding): Update example output.
960 * src/reduce.c (reduce_output): Implement.
961 * data/xslt/xml2text.xsl: Implement.
962 * data/xslt/xml2xhtml.xsl: Implement.
964 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
966 Accept --report-file=FILE to override the default `.output' filename.
967 * NEWS (2.3a+): Mention.
968 * doc/bison.texinfo (Bison Options): Add an entry.
969 * src/files.c (compute_output_file_names): Don't override
970 spec_verbose_file if already set.
971 * src/getargs.c (usage): Document --report-file.
972 (REPORT_FILE_OPTION): New anonymous enum member.
973 (long_options): Add entry for it.
974 (getargs): Add case for it setting spec_verbose_file.
976 * build-aux/cross-options.pl: Don't record a short option just because
978 * doc/.cvsignore: Add yacc.1.
980 2007-11-14 Akim Demaille <akim@epita.fr>
982 * doc/yacc.1.in: New.
983 * configure.ac, doc/Makefile.am: Adjust.
984 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
986 Use AC_SUBST for assignments too.
987 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
989 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
991 * src/gram.c: Remove comments that duplicate comments in gram.h.
993 When reporting useless rules and nonterminals, say "useless in grammar"
994 instead of "useless", and say "useless in parser" instead of "never
995 reduced". Discussed starting at
996 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
997 * NEWS (2.3a+): Mention this change.
998 * data/xslt/xml2text.xsl: Update output text and expected input XML
999 element names to match changes below.
1000 * data/xslt/xml2xhtml.xsl: Likewise.
1001 (xsl:template match="bison-xml-report"): Add missing entry in Table of
1002 Contents: "Rules useless in parser due to conflicts".
1003 * doc/bison.texinfo (Decl Summary): Reword a little.
1004 (Understanding): Update example output for changes below.
1005 * src/gram.c: (rule_useful_p): Rename to...
1006 (rule_useful_in_grammar_p): ... this.
1007 (rule_useless_p): Rename to...
1008 (rule_useless_in_grammar_p): ... this.
1009 (rule_never_reduced_p): Rename to...
1010 (rule_useless_in_parser_p): ... this.
1011 (grammar_rules_print): Update for renames.
1012 (grammar_rules_print_xml): Update for renames.
1013 (grammar_rules_never_reduced_report): Rename to...
1014 (grammar_rules_useless_report): ... this since it is used for either
1015 kind of useless rule.
1016 * src/gram.h: Reword comments and update function names in prototypes.
1017 * src/main.c (main): Say "rule useless in parser due to conflicts".
1018 * src/print-xml.c (print_rules_never_reduced): Rename to...
1019 (print_rules_useless_in_parser): ... this, and rename output XML
1020 element "rules-never-reduced" to "rules-useless-in-parser".
1021 (print_xml): Update for rename.
1022 * src/print.c (print_results): Say "Rules useless in parser due to
1024 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
1025 (nonterminals_reduce): Say "nonterminal useless in grammar".
1026 (reduce_output): Say "Nonterminals useless in grammar".
1027 Say "Rules useless in grammar".
1028 (reduce_xml): Rename output XML element "useless" to
1029 "useless-in-grammar".
1030 (reduce_print): Don't report the count of grammatically useless rules
1031 as "rules never reduced" just because %yacc is specified.
1032 In the correct report of this count, say nonterminal(s) and rule(s)
1033 "useless in grammar".
1034 * tests/conflicts.at (S/R in initial): Update expected output.
1035 (Defaulted Conflicted Reduction): Likewise.
1036 (Unreachable States After Conflict Resolution): Likewise.
1037 * tests/existing.at (GNU pic Grammar): Likewise.
1038 * tests/reduce.at (Useless Nonterminals): Likewise.
1039 (Useless Rules): Likewise.
1040 (Reduced Automaton): Likewise.
1041 (Underivable Rules): Likewise.
1042 (Empty Language): Likewise.
1044 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1046 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
1047 here document and before the EOF so that BSD's implementation of Bourne
1048 shell doesn't parse the delimiter as part of the here document.
1049 * doc/.cvsignore: Add cross-options.texi.
1050 * src/getargs.c (usage): Add a blank line after the warning categories.
1052 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
1054 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
1056 2007-11-05 Akim Demaille <akim@epita.fr>
1058 Remove Id: from bison.1.
1059 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
1060 (perl -0777 -pi -e 's/\.PP\nId): New.
1061 (.x.1): Use it to ignore the version control revision.
1063 2007-11-05 Akim Demaille <demaille@gostai.com>
1065 * build-aux/Makefile.am: Ship cross-options.pl.
1066 * doc/Makefile.am: Always refer to cross-options.texi with
1068 (MAINTAINERCLEANFILES): Add it.
1070 2007-11-04 Akim Demaille <demaille@gostai.com>
1072 Generate the long/short option cross-table.
1073 * build-aux/cross-options.pl: New.
1074 * doc/Makefile.am (cross-options.texi): New.
1075 * doc/bison.texinfo: Use it.
1077 2007-11-04 Akim Demaille <demaille@gostai.com>
1079 Generate bison.1 using help2man.
1080 * doc/common.x, doc/bison.x: New.
1081 * doc/Makefile.am (bison.1, .x.1): New.
1082 The code is taken from autoconf-2.61/man/Makefile.am.
1083 * configure.ac: Look for help2man.
1085 2007-11-04 Akim Demaille <demaille@gostai.com>
1088 * src/getargs.c (usage): Document -W, make it clear that -d,
1089 -g and -x have optional arguments.
1091 2007-11-04 Akim Demaille <demaille@gostai.com>
1093 Find sha1sum when named gsha1sum.
1094 * bootstrap (find_tool): New.
1097 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1099 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
1101 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
1102 * NEWS (2.3a+): Mention.
1103 * data/bison.m4 (b4_pure_if): Don't define it here.
1104 * data/c.m4 (b4_identification): Depend on individual skeletons to
1105 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
1106 values of the %define variables api.pure or api.push_pull. Define
1107 YYPURE, YYPUSH, and YYPULL accordingly.
1108 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
1109 glr.cc has already defined b4_pure_flag.
1110 * data/push.c: Define b4_pure_if based on `%define api.pure'.
1111 Remove YYPUSH and YYPULL since they're back in b4_identification again.
1112 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
1113 * doc/bison.texinfo (Pure Decl): Update.
1114 (Push Decl): Update.
1115 (Decl Summary): Add api.pure to %define entry.
1116 In %pure-parser entry, say it's deprecated and reference %define.
1117 (Pure Calling): Update.
1118 (Error Reporting): Update.
1119 (C++ Scanner Interface): Update.
1120 (How Can I Reset the Parser): Update.
1121 (Table of Symbols): In %pure-parser entry, say it's deprecated and
1123 * src/getargs.c (pure_parser): Remove global variable.
1124 * src/getargs.h (pure_parser): Remove extern.
1125 * src/output.c (prepare): Don't define pure_flag muscle.
1126 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
1127 wrapper around `%define api.pure'.
1128 * tests/calc.at (Simple LALR Calculator): Update.
1129 (Simple GLR Calculator): Update.
1130 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
1132 (GLR: Resolve ambiguity, pure, locations): Update.
1133 (GLR: Merge conflicting parses, pure, no locations): Update.
1134 (GLR: Merge conflicting parses, pure, locations): Update.
1135 * tests/glr-regression.at (Uninitialized location when reporting
1137 * tests/input.at (Unused %define api.pure): New test case.
1138 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
1139 AT_PURE_IF and AT_PURE_AND_LOC_IF.
1140 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1142 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1144 %define push_pull -> %define api.push_pull. Discussed starting at
1145 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
1146 * data/push.c: Expect the new name.
1147 * data/yacc.c: Likewise.
1148 * doc/bison.texinfo (Push Decl): Update.
1149 (Decl Summary): Update %define entry.
1150 (Push Parser Function): Update.
1151 (Pull Parser Function): Update.
1152 (Parser Create Function): Update.
1153 (Parser Delete Function): Update.
1154 * tests/calc.at (Simple LALR Calculator): Update.
1155 * tests/input.at (%define enum variables): Update.
1156 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1157 (Push Parsing: Multiple impure instances): Update.
1158 (Push Parsing: Unsupported Skeletons): Update.
1159 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
1160 (Exploding the Stack Size with Malloc): Update.
1162 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
1165 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
1167 For the XML output's terminal element, rename @number to @token-number,
1168 and add @symbol-number. In the nonterminal element, rename @number to
1169 @symbol-number. Discussed starting at
1170 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
1171 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
1173 (xsl:template match="nonterminal"): Likewise.
1174 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
1175 (xsl:template match="nonterminal"): Likewise.
1176 * src/print-xml.c (print_grammar): Implement.
1178 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1180 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
1181 2007-10-11 change, the child elements here are items not rules.
1182 (xsl:template match="item"): New.
1183 (xsl:template match="rule"): Update for new reduced itemset.
1184 (xsl:template match="point"): Remove.
1185 (xsl:template match="empty"): For consistency with --graph, don't
1186 output "/* empty */".
1187 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
1188 line-wrap, don't pass a negative value as first-line-length since this
1189 won't work with the following changes.
1190 (xsl:template name="line-wrap"): Simplify slightly.
1191 (xsl:template name="ws-search"): Eliminate recursion.
1192 * src/print_graph.c (print_core): Don't print a reduction's lookahead
1193 set next to an item whose dot is not at the end of the RHS even if it
1194 happens to be associated with the same rule.
1196 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1198 Add %define lr.keep_unreachable_states.
1199 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
1200 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
1201 * src/main.c (main): Implement it.
1202 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1203 Extend to test it, and fix a typo.
1205 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1207 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
1208 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
1209 the example .output text.
1210 * tests/regression.at (Extra lookahead sets in report): Improve wording
1213 2007-10-17 Wojciech Polak <polak@gnu.org>
1215 * src/print-xml.c (print_grammar): Renamed
1216 <terminal> and <nonterminal> attributes:
1217 "type" to "number" and "symbol" to "name".
1218 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
1219 Use new attribute names.
1220 (xsl:template match="nonterminal"): Likewise.
1221 * data/xslt/xml2xhtml.xsl: Likewise.
1223 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
1225 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
1226 (Option Cross Key): Likewise.
1228 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
1229 next to an item whose dot is not at the end of the RHS even if it
1230 happens to be associated with the same rule.
1231 * src/print.c (print_core): Likewise.
1232 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
1233 (Resolved SR Conflicts): Update output.
1234 * tests/regression.at (Extra lookahead sets in report): New test case.
1236 2007-10-11 Wojciech Polak <polak@gnu.org>
1238 * src/print-xml.c (print_core): Remove item set
1240 * data/xslt/bison.xsl (bison:ruleNumber): New key.
1241 Improve processing time. Suggested by Joel E. Denny.
1242 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
1243 Write xsl:param "required" attribute as comment.
1244 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
1245 (xsl:template match="rule"): Support new reduced itemset.
1246 (xsl:template match="point"): Remove.
1247 * data/xslt/xml2xhtml.xsl: Likewise.
1249 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1251 * src/getargs.c (version): Update copyright year.
1253 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1255 Make xml2dot.xsl and --graph produce the same output.
1256 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
1257 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
1259 (xsl:template name="output-node"): Use the new escape template instead
1260 of the string-replace template directly.
1261 (xsl:template name="output-edge"): Likewise.
1262 (xsl:template name="escape"): New, escapes backslashes and newlines in
1263 addition to quotation marks.
1264 * src/graphviz.c (start_graph, output_node, output_edge): Add
1265 whitespace to output for legibility.
1267 Make xml2text.xsl and --report produce the same output, and remove the
1268 XML "conflicts" element since a conflict summary is easily extracted
1270 * data/xslt/bison.xsl: New.
1271 (xsl:template match="state" mode="bison:count-conflicts): New.
1272 * data/xslt/xml2text.xsl: Import bison.xsl.
1273 (xsl:template match="bison-xml-report"): Instead of styling the
1274 "conflicts" element, style the "automaton" element with mode
1275 "conflicts". Unlike the former, the latter lists S/R and R/R
1276 conflicts for a state on the same line.
1277 (xsl:template match="conflicts"): Remove.
1278 (xsl:template match="conflict"): Remove.
1279 (xsl:template match="terminal"): Line-wrap the list of rules in which
1280 the terminal is used.
1281 (xsl:template match="nonterminal"): Likewise for nonterminals.
1282 (xsl:template match="automaton" mode="conflicts"): New.
1283 (xsl:template match="state" mode="conflicts"): New.
1284 (xsl:template name="line-wrap"): New.
1285 (xsl:template name="ws-search"): New.
1286 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
1287 (xsl:template match="bison-xml-report"): Instead of styling the
1288 "conflicts" element, style the "automaton" element with mode
1290 (xsl:template match="conflicts"): Remove.
1291 (xsl:template match="conflict"): Remove.
1292 (xsl:template match="automaton" mode="conflicts"): New.
1293 (xsl:template match="state" mode="conflicts): New.
1294 * src/conflicts.c (conflicts_output_xml): Remove.
1295 * src/conflicts.h (conflicts_output_xml): Remove prototype.
1296 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
1297 * src/print.c (print_grammar): Consistently wrap at the 66th column so
1298 the corresponding XSLT is easier. Also, never wrap between a word and
1299 the comma that follows it.
1301 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1303 Improve C++ namespace support. Discussed starting at
1304 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
1305 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
1306 b4_namespace_close): New macros that interpret the %define variable
1307 "namespace" so its value can contain "::" to indicate nested
1309 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
1311 * data/lalr1.cc (b4_namespace): Likewise.
1312 * data/location.cc (b4_namespace): Likewise.
1313 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
1314 inside a new table in the general %define entry. Document `%define
1315 namespace' there as well. Point the %name-prefix entry to it since it
1316 explains it more completely in the case of C++.
1317 (C++ Bison Interface): Mention `%define namespace' instead of
1319 (Table of Symbols): Remove the `%define push_pull' entry. The %define
1321 * tests/c++.at (Relative namespace references): New test case.
1322 (Absolute namespace references): New test case.
1323 (Syntactically invalid namespace references): New test case.
1324 * tests/input.at (C++ namespace reference errors): New test case.
1326 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1328 Add syncline support and location accessor to internal %define
1330 * data/bison.m4 (b4_percent_define_get_loc): New.
1331 (b4_percent_define_get_syncline): New.
1332 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
1333 (b4_percent_define_default): Record defining location as line 1 rather
1334 than 0 for the sake of synchronizing #line's, and define
1335 b4_percent_define_syncline(VARIABLE).
1336 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
1337 * src/muscle_tab.c (muscle_syncline_grow): New.
1338 (muscle_code_grow): Use muscle_syncline_grow.
1339 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
1340 define b4_percent_define_syncline(VARIABLE).
1341 (muscle_percent_define_get_loc): New.
1342 (muscle_percent_define_get_syncline): New.
1343 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
1344 remove some unused variables.
1345 (muscle_percent_define_default): Record defining location as line 1
1346 rather than 0 for the sake of synchronizing #line's, and define
1347 b4_percent_define_syncline(VARIABLE).
1348 (muscle_percent_define_check_values): Use
1349 muscle_percent_define_get_loc.
1350 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
1351 (muscle_percent_define_get_syncline): Prototype.
1352 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1353 defaults): Update output for location change.
1354 (Complaining during macro argument expansion): Extend to test
1355 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
1357 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
1359 Fix some error-reporting macro bugs.
1360 * data/bison.m4 (b4_cat): New.
1361 (b4_error, b4_error_at): Use b4_cat to send error directives directly
1362 to stdout so they don't become arguments to other macros. Update
1363 comments and add examples.
1364 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
1366 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
1367 after printing the error directive so that M4 doesn't report subsequent
1368 problems that are induced by this problem.
1369 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
1370 instead of just in them. Recognize @\n in both places. Both expand to
1371 the empty string. Needed by b4_cat.
1372 * tests/skeletons.at (Complaining during macro argument expansion):
1374 (Fatal errors make M4 exit immediately): New test case.
1376 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
1378 Implement --print-datadir.
1379 * src/getargs.c (usage): Mention.
1380 (PRINT_DATADIR_OPTION): New anonymous enum member.
1381 (long_options): Add entry for it.
1382 (getargs): Add case for it calling compute_pkgdatadir.
1383 * src/output.c (output_skeleton): Encapsulate data directory
1384 computation from here...
1385 (prepare): ... and from here...
1386 (compute_pkgdatadir): ... into this new function.
1387 * src/output.h (compute_pkgdatadir): Prototype.
1389 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
1391 * src/print-xml.c (escape_bufs): New static global variable
1393 (xml_escape_n): ... the static local variable buf here.
1394 (print_xml): Free memory for escape_bufs.
1395 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
1397 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
1399 Replace `%push-parser' and `%push-pull-parser' with
1400 `%define push_pull "push"' and `%define push_pull "both"'.
1401 `%define push_pull "pull"' is the default.
1402 * doc/bison.texinfo (Push Decl, Push Parser Function,
1403 Pull Parser Function, Parser Create Function, Parser Delete Function):
1404 Update declarations.
1405 (Decl Summary, Table of Symbols): Replace %push-parser and
1406 %push-pull-parser entries with a %define push_pull entry.
1407 * data/bison.m4 (b4_percent_define_check_values): New macro.
1408 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
1410 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
1412 * data/push.c: ... to here and compute them from the value of the
1413 %define variable push_pull.
1414 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
1415 parsing requests here...
1416 * data/yacc.c: ... hack this to switch to push.c any time
1417 b4_use_push_pull_flag or the %define variable push_pull is set. This
1418 will go away when we mv push.c yacc.c.
1419 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
1420 push parsing is not supported since unused %define variables are
1422 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
1423 * src/muscle_tab.h (muscle_percent_define_check_values): Update
1424 comments for consistency with b4_percent_define_check_values.
1425 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
1427 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
1429 (prologue_declaration): Remove %push-parser and %push-pull-parser
1431 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
1432 * tests/calc.at: Update declarations.
1433 * tests/input.at (%define enum variables): New test case.
1434 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
1436 (Push Parsing: Multiple impure instances): Update declaration.
1437 (Push Parsing: Unsupported Skeletons): New test case.
1438 * tests/torture.at (Exploding the Stack Size with Alloca): Update
1440 (Exploding the Stack Size with Malloc): Update declaration.
1442 2007-09-24 Wojciech Polak <polak@gnu.org>
1444 Add XSLT transformations.
1446 * data/xslt/xml2dot.xsl: Transform XML into DOT.
1447 * data/xslt/xml2text.xsl: Transform XML into plain text.
1448 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
1449 * data/Makefile.am (xsltdir): New variable.
1450 (dist_xslt_DATA): Add xslt/*.xsl files.
1452 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
1454 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
1455 Problem reported by Wojciech Polak.
1456 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
1457 (xml_printf): Undo change I made on 21 September; that is,
1458 indent 2 spaces, not 1.
1460 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
1462 Pacify ./configure --enable-gcc-warnings.
1463 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
1464 `char const *' instead of `char *'.
1465 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
1466 local variable `sep'.
1468 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1470 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
1472 * src/print-xml.c: Prefer "const" after types; that's more consistent.
1473 (xml_printf): Indent just 1 space for level.
1474 (e_char, xlate_char): Remove.
1475 (xml_escape_string): Rewrite to avoid undefined behavior (used
1476 storage that was freed from the stack).
1477 (xml_escape_n): Don't bother checking for subscript error.
1479 2007-09-21 Wojciech Polak <polak@gnu.org>
1481 Add Bison XML Automaton Report.
1483 Add support for an -x option to generate an XML report.
1484 It is not documented yet.
1485 * src/print-xml.c: New file.
1486 * src/print-xml.h: Likewise.
1487 * lib/timevar.def (TV_XML): New var.
1488 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
1489 * src/conflicts.c: Include print-xml.h.
1490 (solved_conflicts_xml_obstack): New var.
1491 (log_resolution, conflicts_solve, conflicts_free):
1492 Add support for XML report.
1493 (conflicts_output_val): New function.
1494 * src/conflicts.h (conflicts_output_val): New decl.
1495 * src/files.c (spec_xml_file): New var.
1496 (compute_output_file_names, output_file_names_free): Add XML support.
1497 * src/files.h (spec_xml_file): New decl.
1498 * src/getargs.c (xml_flag): New var.
1499 (usage, short_options, long_options, getargs): Add XML support.
1500 * src/getargs.h (xml_flag): New decl.
1501 * src/gram.c: Include print-xml.h.
1502 (rule_lhs_print_xml, rule_rhs_print_xml):
1503 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1505 * src/gram.h: Declare external ones.
1506 * src/main.c: Include print-xml.h.
1507 (main): Add XML support.
1508 * src/reduce.c: Include print-xml.h.
1509 (reduce_xml): New function.
1510 * src/reduce.h: Declare it.
1511 * src/state.c: Include print-xml.h.
1512 (state_new): Add XML support.
1513 (state_rule_lookahead_tokens_print_xml): New function.
1514 * src/state.h: Declare it.
1515 (struct state): New member solved_conflicts_xml.
1516 * src/symtab.c (symbol_class_get_string): New function.
1517 * src/symtab.h: Declare it.
1519 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1521 * GNUmakefile: Switch to coreutils's version.
1522 * bootstrap: Likewise.
1523 * Makefile.cfg: Adjust to new GNUmakefile.
1524 * README-hacking: Likewise.
1528 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1529 Bruno Haible <bruno@clisp.org>
1531 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1532 and is a script that invokes bison. Tighten the code. Add comments.
1534 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1536 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1537 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1538 * doc/bison.texinfo (Decl Summary): Fix.
1539 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1540 * tests/input.at (Boolean %define variables): Update output.
1541 * tests/skeletons.at (%define boolean variables: invalid skeleton
1542 defaults): Rename to...
1543 (%define Boolean variables: invalid skeleton defaults): ... this and
1546 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1548 In impure push mode, don't allow more than one yypstate to be allocated
1549 since multiple impure parsers would corrupt yynerrs.
1550 * data/push.c (yypstate_allocated): New static global variable
1552 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1553 exhaustion if yypstate_allocated is 1, but still return 2.
1554 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1555 already 1. Otherwise, set it to 1.
1556 (yypstate_delete): Set it to 0.
1557 * tests/push.at (Push Parsing: Multiple impure instances): New test
1560 2007-08-17 Bob Rossi <bob@brasko.net>
1562 * doc/bison.texinfo (Push Decl): Document the push parser.
1563 (Table of Symbols): Ditto.
1565 (Decl Summary): Ditto.
1566 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1567 Parser Create Function, Parser Delete Function):
1568 Add new push parser symbols.
1569 (Table of Symbols): Document push-parser, push-pull-parser,
1570 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1572 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1575 * doc/gpl-3.0.texi: New file.
1576 * doc/gpl.texi: Remove.
1577 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1578 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1579 * README-hacking, TODO, bootstrap, bootstrap.conf:
1580 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1581 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1582 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1583 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1584 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1585 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1586 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1587 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1588 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1589 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1590 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1591 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1592 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1593 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1594 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1595 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1596 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1597 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1598 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1599 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1600 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1601 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1602 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1603 * src/complain.c, src/complain.h, src/conflicts.c:
1604 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1605 * src/files.h, src/flex-scanner.h, src/getargs.c:
1606 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1607 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1608 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1609 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1610 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1611 * src/print.c, src/print.h, src/print_graph.c:
1612 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1613 * src/reduce.h, src/relation.c, src/relation.h:
1614 * src/revision.h, src/scan-code.h, src/scan-code.l:
1615 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1616 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1617 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1618 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1619 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1620 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1621 * tests/existing.at, tests/glr-regression.at:
1622 * tests/headers.at, tests/input.at, tests/java.at:
1623 * tests/local.at, tests/output.at, tests/push.at:
1624 * tests/reduce.at, tests/regression.at, tests/sets.at:
1625 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1629 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1631 Get rid of broken %no-parser, -n, and --no-parser implementation and
1633 * TODO: Don't mention them.
1634 * doc/bison.1: Likewise.
1635 * doc/bison.texinfo (Decl Summary): Likewise.
1636 (Bison Options): Likewise.
1637 (Option Cross Key): Likewise.
1638 * src/getargs.c (no_parser_flag): Remove global variable.
1639 (usage): Don't print description of -n and --no-parser.
1640 (long_options): Remove --no-parser entry here.
1641 (getargs): Remove -n case in the switch here.
1642 * src/getargs.h (no_parser_flag): Remove extern.
1643 * tests/regression.at (Web2c Actions): Remove comment that mentions
1646 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1648 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1649 name user variables starting with `yy'. Just pass NULL instead of a
1650 dummy local &yylval to yypush_parse.
1651 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1654 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1656 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1657 true since it's then always used regardless of whether yyoverflow is
1658 defined. Reported by Christian Burger at
1659 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1660 * THANKS: Add Christian Burger.
1662 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1663 node names: say "Decl Summary" not "Bison Declaration Summary".
1665 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1667 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1668 determine whether this function has already complained about an invalid
1669 value for a %define boolean variable, don't check whether Bison has
1670 ever examined the value. As written, the check was a tautology.
1671 Instead, record and check for this complaint using a separate muscle.
1673 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1675 Fix push parsing memory leak reported by Brandon Lucia at
1676 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1677 * THANKS: Add Brandon Lucia.
1678 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1679 but the parse never completed and thus freed it.
1680 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1681 * tests/testsuite.at: Include push.at.
1682 * test/push.at: New.
1683 (Push Parsing: Memory Leak for Early Deletion): New test case.
1685 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1687 Improve handling of multiple S/R conflicts in the same state and of S/R
1688 conflicts involving multiple reductions.
1689 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1690 set for a state here or Bison will abort if it is reassigned on a
1691 later conflicted reduction in the same state.
1692 Similarly, don't finalize and assign the solved conflicts report here
1693 or it will be lost if it is reassigned on a later conflicted reduction
1695 (set_conflicts): Instead, assign them both here after all S/R conflicts
1696 in the state have been fully examined.
1697 * src/print.c (shift_set): Rename to...
1698 (no_reduce_set): ... this.
1699 (print_reductions): Update for rename, and add %nonassoc error action
1700 tokens to no_reduce_set so that, when printing the first remaining
1701 reduction on an error action token, the reduction is enclosed in
1703 (print_results): Update for rename.
1704 * tests/conflicts.at (Solved conflicts report for multiple reductions
1705 in a state): New test case.
1706 (%nonassoc error actions for multiple reductions in a state): New test
1709 * src/main.c (main): Don't depend on C99 features.
1711 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1713 * build-aux/.cvsignore: Add compile.
1714 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1717 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1719 * bootstrap (slurp): Create target directories that don't exist.
1720 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1722 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1724 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1726 * closure.c (closure): Likewise.
1727 * state.h (reductions): Comment sorting of rules.
1728 (state): Comment sorting of items.
1730 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1732 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1733 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1734 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1735 definition in order to avoid Gnulib headers since we don't use config.h
1737 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1738 rather than AT_DATA so that config.h is included.
1740 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1742 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1743 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1744 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1745 and so that YYFPRINTF is guaranteed to be defined here.
1747 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1749 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1751 (muscle_percent_define_check_values): ... this more helpful function.
1752 Again, it's not used yet, but it will be.
1753 * src/muscle_tab.h: Likewise.
1755 Improve some comments in parser table construction.
1756 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1757 (generate_states): Don't mention ruleset, which is internal to closure.
1758 * src/closure.c (closure): Explain sorting of core and itemset, which
1759 is required for this function to behave correctly.
1760 * src/closure.h (closure): Mention sorting.
1762 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1764 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1765 move the check for disabled transitions to an aver since conflict
1766 resolution hasn't happened yet.
1768 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1769 labels a state as inconsistent just because it has error transitions.
1770 The original form of this check appeared in revision 1.1 of lalr.c,
1771 which was committed on 1991-12-21. Now (at least), changing the
1772 consistency label on such a state appears to have no useful effect in
1773 any of the places it is examined, which I enumerate below. The key
1774 point to understanding each item in this enumeration is that a state
1775 with an error transition is labelled consistent in the first place only
1776 if it has no rules, so the check cannot matter for states that have
1777 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1778 to try to identify its conflicts, and a state must have *rules* to have
1779 conflicts. (2) Labelling a state as inconsistent will affect how
1780 action_row sets the default *rule* for the state. (3) Labelling a
1781 state as inconsistent will cause build_relations to add lookback edges
1782 to *rules* in that state.
1783 * src/state.h (struct state): Word the comment for member consistent
1786 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1788 Don't depend on C99 features.
1789 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1790 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1791 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1792 * src/state.c (state_mark_reachable_states): Fix for-loop.
1793 (state_remove_unreachable_states): Fix for-loop.
1795 Don't widen struct state with member reachable just to temporarily
1796 record reachability. Instead, use a local bitset.
1797 * src/state.h (struct state): Remove member.
1798 * src/state.c (state_new): Don't initialize it.
1799 (state_mark_reachable_states): Rename to...
1800 (state_record_reachable_states): ... this, and use bitset.
1801 (state_remove_unreachable_states): Use bitset.
1803 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1805 * src/Makefile.am (yacc): Quote target action commands properly so
1806 that the yacc script isn't corrupt. Reported by Hans Aberg at
1807 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1809 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1810 the case of pure parsers. Reported by Frans Englich at
1811 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1812 * THANKS: Add Frans Englich.
1814 * NEWS (2.3a+): In the %code entry, reference section `Bison
1815 Declaration Summary' from the manual now since the %code summary has
1817 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1818 in the rules section must be terminated by semicolons.
1820 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1822 Extend the front-end API for %define variables to more completely
1823 mirror the back-end. This will be useful in the future.
1824 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1825 Update comments to mention the new front-end counterparts of these
1827 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1828 for muscle_string_decode and muscle_location_decode.
1829 (muscle_string_decode): New static function.
1830 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1831 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1833 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1834 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1835 implementation more closely.
1836 (muscle_percent_define_invalid_value): New function.
1837 * src/muscle_tab.h (muscle_percent_define_get,
1838 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1841 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1843 * NEWS (2.3a+): Mention yesterday's state-removal change.
1844 (2.3a): Remove the %language entry, which was added after 2.3a.
1845 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1846 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1847 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1848 tests/existing.at: Update copyright date.
1850 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1852 If conflict resolution makes states unreachable, remove those states,
1853 report rules that are then unused, and don't report conflicts in those
1855 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1856 New global function.
1857 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1859 * src/main.c (main): After conflict resolution, remove the unreachable
1860 states and update all data structures that reference states by number.
1861 * src/state.c (state_new): Initialize each state's reachable member to
1863 (state_mark_reachable_states): New static function.
1864 (state_remove_unreachable_states): New global function.
1865 * src/state.h (struct state): Add member bool reachable.
1866 (state_remove_unreachable_states): Prototype.
1867 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1869 * tests/existing.at (GNU pic Grammar): Update test case output now that
1870 an unused rule is discovered.
1872 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1874 Minor code cleanup in parser table construction.
1875 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1876 (new_itemsets, save_reductions): Update for rename to nitemset.
1877 * src/closure.c (nritemset): Rename to...
1878 (nitemset): ... this since the "r" appears to meaningless and isn't
1879 used in the comments.
1880 (closure): Update for rename.
1881 * src/closure.h (nritemset): Update extern to...
1882 (nitemset): ... this.
1883 * src/lalr.c (LA): Fix a typo in comments.
1884 * src/print.c (print_core): Update for rename to nitemset.
1885 * src/print_graph.c (print_graph): Likewise.
1886 * src/state.h: Fix some typos in header comments.
1888 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1890 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1891 still sticks to ASCII. Sorry!
1893 * README-hacking: New file, taken mostly from coreutils, with changes
1894 for Bison. Contains much of the contents of:
1895 * README-cvs: Remove.
1896 * bootstrap: Sync from gnulib.
1897 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1898 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1900 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1902 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1904 (Java Differences): Fix some typos.
1905 * THANKS: Add Sebastian Setzer.
1907 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
1909 * data/java.m4 (b4_single_class_if): Remove.
1910 (b4_abstract_if): Look at "%define abstract".
1912 (b4_union_name): Rename...
1913 (b4_yystype): ... to this. Map to "%define stype".
1914 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1915 b4_maybe_throws): Fix quoting.
1916 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1917 * data/lalr1.java (Lexer interface): Always define.
1918 (Lexer interface within parser class): Remove.
1919 (YYLexer class): New, used when "%code lexer" is present.
1920 (constructor): When "%code lexer" is used, pass %lex-param
1921 to the lexer constructor.
1922 (yylex, yyparse): Remove %lex-param from method invocations
1923 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1925 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1926 abstract". Rename "%define union_name" to "%define stype".
1927 Rename method names according to previous patch.
1928 (Java Scanner Interface): Describe "%code lexer" instead of
1929 "%pure-parser" and "%define single_class".
1930 (Java Differences): Mention "%code lexer".
1932 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1933 Include scanner here, using macros from tests/local.at.
1934 (AT_DATA_CALC_Y): Remove final argument.
1935 (_AT_CHECK_JAVA_CALC): Likewise.
1936 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1937 of %locations and %error-verbose.
1938 (main): Test with and without %lex-param.
1939 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1940 (AT_BISON_OPTION_POPDEFS): Pop it.
1942 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1944 DJGPP spefic issue. Inhibit the use of disallowed characters for
1945 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1946 and concern testsuite case 46.
1947 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1948 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1949 * djgpp/config.bat: Inhibit the use of disallowed characters.
1951 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1953 Miscellaneous %define and %code cleanup.
1954 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1955 values are interpreted.
1956 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1957 documentation a little more.
1958 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1959 muscle_percent_define_insert, muscle_percent_code_grow): New
1961 * src/muscle_tab.h (muscle_percent_define_insert,
1962 muscle_percent_code_grow): Prototype.
1963 * src/parse-gram.y (prologue_declaration): Use
1964 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1965 %define and %code directives.
1967 Make it easy to share %define boolean variables between the front-end
1968 and back-end. Though not used yet, this will be useful in the future.
1969 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1970 Bison uses of names rather than just skeleton uses of names.
1971 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1972 b4_percent_define_skeleton_variables(VARIABLE) to
1973 b4_percent_define_bison_variables(VARIABLE).
1974 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1975 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1976 b4_percent_code_bison_qualifiers(QUALIFIER).
1977 (b4_check_user_names_wrap): Update for renames.
1978 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1979 muscle_percent_define_default): New functions mimicking
1980 b4_percent_define_flag_if and b4_percent_define_default.
1982 For %define variables, report locations for invalid values and
1984 * data/bison.m4 (b4_percent_define_flag_if): Read
1985 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1987 (b4_percent_define_default): Save a special location in
1988 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1989 must later be reported as invalid.
1990 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1992 (muscle_percent_define_insert): Record the location of VARIABLE in
1993 muscle percent_define_loc(VARIABLE), and use it to report the previous
1994 location for a redefinition.
1995 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1996 (muscle_percent_define_default): Update like b4_percent_define_default.
1997 (muscle_grow_user_name_list): Rename to...
1998 (muscle_user_name_list_grow): ... this for consistency and use
1999 muscle_location_grow.
2000 * src/muscle_tab.h (muscle_location_grow): Prototype.
2001 * tests/input.at (%define errors): Update expected output.
2002 * tests/skeletons.at (%define boolean variables: invalid skeleton
2003 defaults): New test case.
2005 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
2007 * src/print.c (lookahead_set, state_default_rule): Remove.
2008 (print_reductions): Replace state_default_rule invocation with
2009 equivalent use of yydefact, which was computed in token_actions in
2011 (print_results): Don't allocate lookahead_set.
2013 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
2015 * data/lalr1.java: Prefix all private members with yy.
2017 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
2019 Use YYFPRINTF instead of fprintf where appropriate. Reported by
2020 Sebastien Fricker at
2021 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
2022 * THANKS: Add Sebastien Fricker.
2023 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
2024 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
2025 accept a variable number of arguments.
2027 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2029 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
2031 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2033 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
2034 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
2035 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
2037 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
2039 Undo my 2007-02-07 change, switching back to the c-strcase module
2040 introduced in the 2007-02-03 change. Bruno Haible reported that
2041 the 2007-02-07 change would be dangerous in Turkish if we add a
2042 language whose name contains "i", since "i" is not lowercase "I"
2044 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
2045 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
2046 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
2047 * m4/.cvsignore: Remove strcase.m4.
2048 * src/getargs.c: Revert 2007-02-07 change, as follows.
2049 Include c-strcase.h.
2050 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
2052 2007-02-11 Bruno Haible <bruno@clisp.org>
2054 Enable the Java related testsuite tests when the only Java compiler
2055 found is a gcj < 4.3. Discussed at
2056 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
2057 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
2059 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
2061 * data/Makefile.am: Update copyright date.
2062 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
2063 yypstate_new returns NULL.
2064 (yypstate_new): Return NULL if malloc does.
2065 * src/reader.c (packgram): Move translation of rule actions from the
2066 beginning of packgram to...
2067 (check_and_convert_grammar): ... here right before packgram is invoked
2068 so it's easier to write more complete comments, and remove redundant
2071 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
2073 As in semantic actions, make @$ in %initial-action, %destructor, and
2074 %printer imply %locations.
2075 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
2077 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
2078 (@$ in %initial-action implies %locations,
2079 @$ in %destructor implies %locations,
2080 @$ in %printer implies %locations): ... these new test cases.
2082 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
2084 Undo most of the 2007-02-03 change, switching to the strcase module
2085 now that gnulib strcase has been fixed.
2086 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
2087 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
2088 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
2089 * m4/.cvsignore: Add strcase.m4.
2090 * src/getargs.c: Revert 2007-02-03 change, as follows.
2091 Don't include c-strcase.h.
2092 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
2093 strcasecmp has "unspecified behavior" outside the POSIX locale,
2094 but it works fine in practice if at least one argument is ASCII,
2095 as is the case in Bison.
2097 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
2099 * tests/java.at: Skip tests if only one of javac/java is present.
2100 Reported by Joel E. Denny.
2101 * tests/atlocal.in: Adjust copyright years.
2103 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2105 * data/lalr1.java (Stack): Work around old verifiers that disallow
2106 access to the private fields of an inner class, from the outer class.
2107 We can make Stack's fields public because user code doesn't have access
2108 to the instance of Stack used by parse(). Reported by Paul Eggert.
2110 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
2112 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
2113 the right spot for these files?
2114 * bootstrap.conf (gnulib_modules): Add c-strcase.
2115 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
2117 * src/getargs.c: Include c-strcase.h.
2118 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
2119 to avoid unspecified behavior.
2121 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
2123 * doc/bison.texinfo (Decl Summary): Correct typo.
2125 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
2127 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
2128 Complain if the value does not match empty, "true" or "false".
2129 * data/c++.m4: Adjust default definitions of %define variables.
2130 * data/java.m4: Adjust default definitions of %define variables.
2131 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
2133 * tests/input.at (Boolean %define variables): Test new behavior.
2135 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
2137 * NEWS: Mention java.
2138 * TODO: Remove things that are done.
2139 * bootstrap.conf: Add javacomp-script and javaexec-script.
2140 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
2142 * data/Makefile.am: Add new files.
2143 * data/java-skel.m4: New.
2144 * data/java.m4: New.
2145 * data/lalr1.java: New.
2147 * doc/bison.texinfo: Put "A Complete C++ Example" under
2148 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
2149 under Other Languages.
2151 * src/getargs.c (valid_languages): Add Java.
2152 * src/getargs.h (struct bison_language): Update size of string fields.
2154 * tests/Makefile.am: Add java.at.
2155 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
2156 * tests/java.at: New.
2157 * tests/testsuite.at: Include it.
2159 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
2162 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
2163 at_directive_argv arguments so these no longer have to be global
2164 variables. Also, update the implementation for the following changes.
2165 (fail_for_at_directive_too_many_args,
2166 fail_for_at_directive_too_few_args): Add at_directive_name argument.
2167 (at_directive_name): Remove as at_directive_argv[0] will be used for
2169 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
2170 for the directive name.
2171 (at_directive_argc, at_directive_argv): Make these local within
2172 skel_lex instead of global.
2173 (INITIAL): Update directive start action for above changes.
2174 (SC_AT_DIRECTIVE_ARG): Rename to...
2175 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
2176 (SC_AT_DIRECTIVE_SKIP_WS): Update.
2177 (scan_skel): Move yylex_destroy to...
2178 (skel_scanner_free): ... here.
2179 * tests/skeletons.at (installed skeleton file name): Rename to...
2180 (installed skeleton file names): ... this.
2182 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
2184 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2185 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
2186 Summary" not "Directives".
2187 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
2188 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
2189 since the former is now the more complete one.
2190 (Prologue Alternatives): Likewise and do the same for %defines.
2191 (Table of Symbols): Add summary of %code, add summary of %define, and
2192 move full %code documentation to...
2193 (Decl Summary): ... here for consistency with other entries in these
2195 Move %define entry in order to keep this list alphabetized.
2196 Reword %define entry a little to put less emphasis on the skeleton
2197 concept, which most users shouldn't have to think about.
2199 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2201 Adjust to recent gnulib changes.
2202 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
2203 Add string.h, string_.h, unistd_.h, wchar_.h.
2204 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
2205 * src/system.h: Don't include <stpcpy.h>; this is now done by
2208 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
2210 Simplify implementation of unqualified %code, implement macros for
2211 uniform treatment of boolean %define flags. Document %define.
2212 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
2213 b4_percent_code_ifdef): New.
2214 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
2215 * data/c++.m4: Define default value for global_tokens_and_yystype.
2216 * data/glr.cc: Likewise.
2217 * data/location.cc: Use b4_percent_define_flag_if.
2219 * doc/bison.texinfo (Decl Summary): Document %define.
2221 * src/parse-gram.y (Unqualified %code): Change muscle name to
2223 (content.opt): Default to empty.
2225 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2227 Implement support for relative and absolute skeleton file names.
2228 Discussed starting at
2229 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
2230 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
2231 (Bison Options): Document in --skeleton entry.
2232 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
2233 full_skeleton can't necessarily hold all of pkgdatadir.
2234 If the specified skeleton file name contains a `/', don't prepend
2236 * src/parse-gram.y (prologue_declaration): If the specified skeleton
2237 file name contains a `/', prepend the grammar file directory.
2238 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
2239 * skeletons.at: New file.
2240 (relative skeleton file names): New test case.
2241 (installed skeleton file names): New test case.
2242 * tests/testsuite.at: Include skeletons.at.
2244 * bootstrap: Update copyright to 2007.
2246 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
2248 * bootstrap: Remove occurrences of .#bootmp from the files.
2250 2007-01-17 Akim Demaille <akim@epita.fr>
2252 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
2254 Use per-type %printer.
2256 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2258 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
2259 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2260 djgpp/config.site, src/files.c, src/files.h, src/main.c,
2261 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
2262 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
2263 tests/glr-regression.at, tests/input.at, tests/local.at,
2264 tests/output.at, tests/torture.at: Update copyright to 2007.
2266 2007-01-16 Akim Demaille <akim@epita.fr>
2268 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
2270 (Calc++ Scanner): Exit with failure if we can't open the input
2272 Accept "-" standing for stdin.
2273 (Calc++ Top Level): Print the result only if the parsing was
2276 2007-01-16 Akim Demaille <akim@epita.fr>
2278 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
2280 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
2281 and Joel E. Denny <jdenny@ces.clemson.edu>
2283 Clean up %define and %code implementation in M4 some. Most
2284 importantly, rename all related macros to be in the b4_percent_define
2285 and b4_percent_code namespaces. Also, complete support for `.' in
2286 %define variable names and %code qualifiers.
2287 * data/bison.m4 (b4_check_user_names): Check for special
2288 "SKELETON-NAMESPACE(name)" macros instead of using two nested
2290 (b4_get_percent_define, b4_get_percent_code): Rename to...
2291 (b4_percent_define_get, b4_percent_code_get): ... these.
2292 Extend documentation with examples.
2293 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
2294 b4_percent_define_skeleton_variables and
2295 b4_percent_code_skeleton_qualifiers.
2296 Expect any value for the %define variable `foo' to be stored in the
2297 macro named `b4_percent_define(foo)'; expect any %code blocks for the
2298 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
2299 expect any unqualified %code blocks to be stored in a macro named
2300 `b4_percent_code_unqualified'.
2301 Use m4_indir so that %define variable names and %code qualifiers can
2302 contain `.', which is allowed by the grammar parser.
2303 (b4_percent_define_default): New macro to set a default value for a
2305 (m4_wrap): Update wrapped code, and fix some underquoting.
2306 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
2307 Expect grammar uses of %define variables and %code qualifiers to be
2308 defined in b4_percent_define_user_variables and
2309 b4_percent_code_user_qualifiers.
2310 * data/c++.m4: Use b4_percent_define_default rather than
2311 m4_define_default. Fix some underquoting. Skeleton usage of %define
2312 variable define_location_comparison now implies skeleton usage of
2313 %define variable filename_type.
2314 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2315 data/push.c, data/yacc.c: Update macro names.
2316 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
2319 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2321 DJGPP specific issues.
2323 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
2324 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
2326 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2328 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
2329 run parsers in all tests so that Valgrind is invoked during
2330 maintainer-check-valgrind.
2331 (Duplicate representation of merged trees): Free all semantic values.
2332 (Duplicated user destructor for lookahead): Likewise.
2334 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2336 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
2337 command-line prefix.
2338 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
2339 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
2340 miss Valgrind messages.
2341 (Exploding the Stack Size with Malloc): Likewise.
2343 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2345 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
2346 locals. Reported by Juan Manuel Guerrero at
2347 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
2348 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
2349 Fix some indentation also.
2350 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
2351 explaining this issue.
2353 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
2354 and Joel E. Denny <jdenny@ces.clemson.edu>
2356 Simplify union and prologue handling, and escape union and lex/parse
2357 params with digraphs.
2358 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
2359 values to the empty string since these are no longer guaranteed
2360 initialized by the front-end.
2361 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
2362 braces around b4_user_stype since this is no longer done by the
2364 * src/files.c, src/files.h (pre_prologue_obstack,
2365 post_prologue_obstack): Remove.
2366 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
2367 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
2368 with digraphs. This fixes lex params and parse params.
2369 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
2370 * src/output.c (prepare): Remove muscle insertion of the prologues.
2371 (output): Remove freeing of pre_prologue_obstack and
2372 post_prologue_obstack.
2373 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
2374 than prologue_augment for prologue parsing so you don't need prologue
2376 (grammar_declaration): For %union RHS, use `braceless' instead of
2377 "{...}" so that braces are already stripped and code is escaped with
2379 * src/reader.c (prologue_augment): Remove.
2380 (reader): Remove initialization of pre_prologue_obstack and
2381 post_prologue_obstack.
2382 * src/reader.h (prologue_augment): Remove.
2384 * data/c.m4: Remove stray parenthesis.
2386 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2388 Remove quotes from variables names in %define directives and from
2389 qualifiers in %code directives, and restrict the characters that are
2390 allowed in them to M4-friendly ones. For %define, continue to support
2391 the quoted form as a deprecated feature. Discussed starting at
2392 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
2393 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
2395 * doc/bison.texinfo (Prologue Alternatives): Update.
2396 (Decl Summary): In %defines entry, update mention of `%code requires'
2397 and `%code provides'.
2398 (C++ Location Values): Update %define uses.
2399 (Calc++ Parser Interface): Likewise.
2400 (Calc++ Parser): Likewise, and update `%code requires' uses.
2401 (Table of Symbols): Update %code documentation.
2402 * src/parse-gram.y (prologue_declaration): For %define variables, use
2403 `variable' instead of `STRING'.
2404 (grammar_declaration): For %code qualifiers, use `ID' instead of
2406 (variable): New nonterminal that takes an `ID' or a `STRING'.
2407 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
2409 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
2410 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
2411 (%define errors): Update %define uses.
2413 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2415 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
2416 instead of muscle_insert for %define values so that M4-special
2417 characters are replaced with digraphs.
2418 * tests/input.at (%define errors): Extend to check weird values.
2420 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2422 Instead of having skeletons declare all valid %define variables and
2423 %code qualifiers, provide macros that retrieve the associated values
2424 and build these lists automatically. Thus Bison will now warn when a
2425 variable or qualifier is not used by the skeleton in the current
2426 invocation regardless of whether it might sometimes be used by that
2427 skeleton in other invocations. Also, move all %define value macros to
2428 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
2429 form, which is replaced by %code.
2430 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
2431 (b4_check_user_names): ... this, and change the series of valid name
2432 arguments to a single list argument for names used in the skeleton
2433 similar to the existing list argument for names used in the grammar.
2434 Warn instead of complaining.
2435 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
2436 values and %code code, to format %code code properly, and to build
2437 lists of all %define variables and %code qualifiers used in the
2438 skeleton: b4_skeleton_percent_define_variables and
2439 b4_skeleton_percent_code_qualifiers.
2440 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
2442 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
2443 the skeleton names lists can finish building first. In place of
2444 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
2445 expect the lists b4_user_percent_define_variables and
2446 b4_user_percent_code_qualifiers.
2447 * data/c++.m4: Where setting default values for b4_parser_class_name,
2448 b4_location_type, b4_filename_type, b4_namespace, and
2449 b4_define_location_comparison, update their names to the
2450 b4_percent_define_ namespace.
2451 * data/glr.c: Don't use b4_check_percent_define_variables and
2452 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2453 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
2454 (b4_parser_class_name, b4_namespace): Define these using
2455 b4_get_percent_define for parser_class_name and namespace.
2456 * data/location.cc: Use b4_get_percent_define.
2457 * data/push.c: Don't use b4_check_percent_define_variables and
2458 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2459 * data/yacc.c: Likewise, and don't call m4_exit in
2460 b4_use_push_for_pull_if or m4_wrap code will never execute.
2461 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
2463 (muscle_grow_user_name_list): ... this for consistency with the
2464 terminology used in bison.m4.
2465 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
2466 %define variable names, and rename muscle used_percent_define_variables
2467 to user_percent_define_variables.
2468 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
2469 user_percent_code_qualifiers.
2471 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
2472 {CODE} form is no longer accepted.
2473 * tests/input.at (Reject bad %code qualifiers): Rename to...
2474 (Reject unused %code qualifiers): ... this, and update test output.
2475 (%define error): Update test output.
2477 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
2479 Check for unrecognized %define variables similar to checking for
2480 unrecognized %code qualifiers. Check for redefined %define variables.
2481 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
2483 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
2484 (b4_check_percent_define_variables): New, also wraps it.
2485 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
2486 variables using b4_check_percent_define_variables.
2487 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
2488 all those exercised in the test suite and all those listed in the
2489 `Default values' section of c++.m4. Are there others?
2490 * data/push.c, data/yacc.c: Declare no valid %define variables.
2491 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
2492 similar to muscle_find, but it works even when the muscle stores a
2494 (muscle_grow_used_name_list): New function for constructing the used
2495 name list muscles that b4_check_for_unrecognized_names requires.
2496 * src/parse-gram.y (prologue_declaration): Warn if a variable is
2497 %define'd more than once. Define the b4_used_percent_define_variables
2498 muscle with muscle_grow_used_name_list.
2499 (grammar_declaration): Abbreviate %code code with
2500 muscle_grow_used_name_list.
2501 * tests/input.at (%define errors): New.
2503 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2505 Provide warn_at, complain_at, and fatal_at function callbacks to the
2506 skeletons, and use this for %code qualifier complaints.
2507 * data/bison.m4 (b4_error_at): New, invoked by...
2508 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2509 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2510 @fatal_at(...@) directives.
2511 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2512 qualifiers in b4_used_percent_code_qualifiers and to use
2514 * src/location.c, src/location.h (boundary_set_from_string): New global
2516 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2518 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2519 to b4_used_percent_code_qualifiers.
2520 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2522 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2523 (lineno): Rename to...
2524 (out_lineno): ... this so I don't misunderstand it again.
2525 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2526 here; these newlines are in the input but not the output file.
2527 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2528 (at_directive_perform): ... this new static function, and add handling
2529 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2531 * tests/input.at (Reject bad %code qualifiers): Update test output with
2532 locations and extend.
2534 * tests/output.at (Output file name: [, Output file name: ]): Remove
2535 bogus comment about these tests failing.
2537 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2539 Clean up b4_check_percent_code_qualifiers a little.
2540 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2541 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2542 documentation and add examples.
2543 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2546 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2548 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2549 unreliable -- especially when they're hidden inside another macro.
2550 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2551 data/c.m4: Remove m4_divert(-1).
2552 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2553 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2554 m4_divert_push(0) and m4_divert_pop(0).
2555 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
2556 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2557 pushed and popped by m4sugar, should be first on the stack.
2559 Provide warn, complain, and fatal function callbacks to the skeletons.
2560 This provides more flexibility than m4_fatal, improves the error
2561 message format, and captures messages for translation. Discussed
2563 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2564 * data/bison.m4 (b4_error): New, invoked by...
2565 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2566 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2567 directives. Because these M4 macros might be called when the current
2568 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2569 the previous removal of uses of m4_divert, which caused trouble.
2570 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2571 m4_fatal to report unrecognized %code qualifiers.
2572 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2573 push parser requests.
2574 * data/glr.c: Use b4_complain instead of m4_fatal to report
2575 non-deterministic push parser requests.
2576 Update @output usage to @output(...@) form.
2577 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2578 report missing %defines. Update @output usage to @output(...@) form.
2579 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2581 * src/main.c (main): Invoke skel_scanner_free.
2582 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2583 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2584 obstack_for_string from flex-scanner.h.
2585 (YY_DECL): Use to declare skel_lex static.
2586 (decode_at_digraphs): Remove; now handled in the new
2587 SC_AT_DIRECTIVE_ARG start condition.
2588 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2590 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2591 at_directive_argv): New static globals.
2592 (INITIAL): Use fail_for_invalid_at.
2593 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2594 recognize the start of a generalized `@directive(...@)' form and
2596 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2597 directive args (using the new obstack_for_string), to decode the
2598 contained @ diagraphs, and to perform the directive. It recognizes
2599 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2601 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2602 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2604 (scan_skel): Initialize obstack_for_string on the first call.
2605 (skel_scanner_free): New function to free obstack_for_string.
2606 * tests/input.at (Reject bad %code qualifiers): Update test output.
2608 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2610 Consolidate the 4 prologue alternative directives (%code, %requires,
2611 %provides, and %code-top) into a single %code directive with an
2612 optional qualifier field. Discussed at
2613 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2614 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2616 * doc/bison.texinfo (Prologue Alternatives): Update.
2617 (Decl Summary): Update to %code "requires" and %code "provides".
2618 (Calc++ Parser): Update to %code "requires".
2619 (Table of Symbols): Remove entries for %requires, %provides, and
2620 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2621 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2622 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2623 which are skeleton-specific.
2624 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2625 declare what %code qualifiers it supports and to complain if any other
2626 qualifiers were used in the grammar.
2627 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2628 and b4_user_code([b4_percent_code_provides]) in place of
2629 b4_user_requires and b4_user_provides.
2630 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2631 Add b4_user_code([b4_percent_code_top]) and
2632 b4_user_code([b4_percent_code]).
2633 Invoke b4_check_percent_code_qualifiers.
2634 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2635 PERCENT_REQUIRES): Remove.
2636 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2637 %requires. Rewrite the %code RHS as the unqualified form defining the
2638 muscle b4_percent_code. Add another RHS for the qualified %code form,
2639 which defines muscles of the form b4_percent_code_QUALIFIER and the
2640 b4_used_percent_code_qualifiers muscle.
2641 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2642 PERCENT_REQUIRES): Remove.
2643 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2644 %code "requires" and %code "provides".
2645 * tests/input.at (Reject bad %code qualifiers): New.
2647 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2649 Use the new code_props interface for destructors and printers.
2650 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2651 printer_location members, and change the type of the destructor and
2652 printer members to code_props.
2653 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2654 symbol_printer_get, semantic_type_destructor_set,
2655 semantic_type_printer_set, default_tagged_destructor_set,
2656 default_tagless_destructor_set, default_tagged_printer_set,
2657 default_tagless_printer_set): Use code_props in arguments and return
2658 types in place of char const * and location.
2659 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2660 since the locations are now contained in the return of
2661 symbol_destructor_get and symbol_printer_get.
2662 * src/output.c (symbol_destructors_output, symbol_printers_output):
2664 (symbol_code_props_output): ... this to eliminate duplicate code.
2665 (output_skeleton): Update to use symbol_code_props_output.
2666 * src/reader.c (symbol_should_be_used): Update use of
2667 symbol_destructor_get.
2668 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2669 Update uses of the various _destructor_set and _printer_set functions.
2670 * src/symtab.c: (default_tagged_destructor_location,
2671 default_tagless_destructor_location, default_tagged_printer_location,
2672 default_tagless_printer_location): Remove since we...
2673 (default_tagged_destructor, default_tagless_destructor,
2674 default_tagged_printer, default_tagless_printer): ... change the type
2675 of these to code_props.
2676 (symbol_new, semantic_type_new, symbol_destructor_set,
2677 semantic_type_destructor_set, symbol_destructor_get,
2678 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2679 symbol_check_alias_consistency, default_tagged_destructor_set,
2680 default_tagless_destructor_set, default_tagged_printer_set,
2681 default_tagless_printer_set): Update.
2682 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2683 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2685 (symbol_print): Use SYMBOL_CODE_PRINT.
2687 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2689 Use the new code_props interface for rule actions.
2690 * src/symlist.h (symbol_list): Replace action, action_location, and
2691 used members with a code_props action_props member.
2692 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2693 grammar_midrule_action, grammar_current_rule_merge_set,
2694 grammar_current_rule_symbol_append, packgram): Update.
2695 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2696 * src/scan-code.l (handle_action_dollar): Update.
2697 (translate_rule_action): Remove, no longer used.
2698 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2700 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2702 Use the new code_props interface in parse-gram.y.
2703 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2704 Update all uses of translate_* functions to use the new code_props
2705 interface and to use gram_scanner_last_string_free and
2706 code_scanner_last_string_free where possible.
2707 (grammar_declaration): symbol_list_destructor_set and
2708 symbol_list_printer_set now perform the translation, so don't do it
2709 here. Use gram_scanner_last_string_free where possible.
2710 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2711 translate_code): Remove, no longer used.
2712 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2713 symbol_list_printer_set): Perform code translation here rather than
2714 depending on the caller to do so.
2716 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2717 * src/scan-gram.h (gram_last_string): Remove declaration.
2718 * src/scan-gram.l (last_string): Declare it static.
2720 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2722 Encapsulate code properties and related functionality for the various
2723 destructors, printers, and actions into a code_props structure and
2724 interface. This patch merely implements code_props in scan-code.h and
2725 scan-code.l. Future patches will rewrite other modules to use it.
2726 Discussed starting at
2727 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2728 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2729 consistently initialize const structs that have an empty location
2731 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2732 to ensure consistency.
2733 * src/scan-code.h (code_props): New structure.
2734 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2735 function, macro, and const global variable for initializing a
2736 code_props with no code.
2737 (code_props_plain_init, code_props_symbol_action_init,
2738 code_props_rule_action_init, code_props_translate_code): The rest of
2739 the new code_props functional interface. Among other things, the init
2740 functions set the code_props kind field so that
2741 code_props_translate_code will know whether to behave like
2742 translate_symbol_action, translate_rule_action, or translate_code.
2743 These old translate functions must remain until all other modules are
2744 updated to use the new code_props interface.
2745 (code_scanner_last_string_free): New function similar to
2746 gram_scanner_last_string_free.
2747 (code_scanner_free): Add documentation.
2748 * src/scan-code.l: Implement the new interface.
2749 (code_lex): Make it static, add a code_props* argument, and remove the
2751 (last_string): New static global similar to the one in scan-gram.l.
2752 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2754 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2755 code_props since Bison may one day use this information for destructors
2757 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2758 (handle_action_dollar): Use symbol_list_n_get and set used flag
2759 directly since symbol_list_n_used_set is removed.
2760 (translate_action): Add a code_props* argument and remove the rule,
2761 action, and location arguments. Pass the code_props* on to code_lex.
2762 (translate_rule_action, translate_symbol_action, translate_code):
2763 Rewrite as wrappers around the new code_props interface.
2764 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2765 it would eventually need to break the encapsulation of code_props.
2767 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2769 * etc/.cvsignore: New.
2771 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2773 Add maintainer-push-check to run maintainer-check using push parsing in
2774 place of pull parsing where available.
2775 * Makefile.am (maintainer-push-check): New.
2776 * data/bison.m4 (b4_use_push_for_pull_if): New.
2777 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2778 appropriately based on their existing values.
2779 (yypush_parse): Don't print push-parser-specific diagnostics if push
2780 parsing is being used in place of pull parsing.
2781 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2783 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2784 variable, and insert b4_use_push_for_pull_flag into muscles.
2785 * tests/Makefile.am (maintainer-push-check): New.
2787 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2789 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2790 (whether successful or failed) so that yypush_parse can be invoked
2791 again to start a new parse using the same yypstate.
2792 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2793 check multiple yypull_parse invocations on the same yypstate. For pull
2794 mode, extend to check multiple yyparse invocations.
2795 (Exploding the Stack Size with Alloca): Extend to try with
2797 (Exploding the Stack Size with Malloc): Likewise.
2799 * tests/calc.at (Simple LALR Calculator): Don't specify
2800 %skeleton "push.c" since %push-pull-parser implies that now.
2801 * tests/headers.at (export YYLTYPE): Don't check for the push
2802 declarations. Otherwise, this test case can't be used to see if push
2803 mode can truly emulate pull mode.
2804 * tests/input.at (Torturing the Scanner): Likewise.
2805 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2806 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2807 AT_YACC_IF, which now includes the case of push mode since %skeleton
2808 need not be used for push mode. This will be more intuitive once
2809 push.c is renamed to yacc.c.
2811 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2813 For push mode, convert yyparse from a macro to a function, invoke yylex
2814 instead of passing a yylexp argument to yypull_parse, and don't
2815 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2816 Discussed starting at
2817 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2818 * data/bison.m4 (b4_pull_if): New.
2819 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2820 * data/push.c: Improve M4 quoting a little.
2821 (b4_generate_macro_args, b4_parenthesize): Remove.
2822 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2823 any time a pull parser is requested.
2824 Don't #define this as a wrapper around yypull_parse. Instead, when
2825 both push and pull are requested, make it a function that does that
2827 (yypull_parse): If there's a b4_prefix, #define this to
2828 b4_prefix[pull_parse] when both push and pull are requested.
2829 Don't define this as a function unless both push and pull are
2831 Remove the yylexp argument and hard-code yylex invocation instead.
2832 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2834 * src/getargs.c (pull_parser): New global initialized to true.
2835 * getargs.h (pull_parser): extern it.
2836 * src/output.c (prepare): Insert pull_flag muscle.
2837 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2838 (prologue_declaration): Set both push_parser and pull_parser = true for
2839 %push-pull-parser. Set push_parser = true and pull_parser = false for
2841 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2842 %push-parser since there's no backward-compatibility concern here.
2843 Scan %push-pull-parser.
2844 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2845 instead of %push-parser.
2846 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2847 prototype it in the module that calls yyparse.
2848 * tests/input.at (Torturing the Scanner): Likewise.
2849 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2851 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2853 Update etc/bench.pl. Optimize push mode a little (the yyn change
2854 deserves most of the credit).
2855 * Makefile.am (SUBDIRS): Add etc subdirectory.
2856 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2857 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2858 yytoken, yyval, and yyloc declarations to...
2859 (yyparse or yypush_parse): ... here to improve performance. For
2860 yypush_parse invocations after the first, be sure to assign yyn its old
2862 (yypstate_new): Don't bother initializing the yyresult field since the
2863 initial value isn't used.
2864 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2865 remove the #define that, in push mode, set it to yyps->NAME.
2866 * etc/Makefile.am: New.
2867 * etc/bench.pl: Remove and build it instead from...
2868 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2869 "tests/bison" from the build directory by default rather than just
2870 invoking "bison" from $PATH.
2871 (calc_grammar): Update push parser code: don't declare yylval globally,
2872 don't define yyparse_wrapper, and don't #define yyparse.
2873 (bench_grammar): Update to check all working combinations of yacc.c,
2874 push.c, impure, pure, pull, and push.
2876 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2878 For push mode, add pull wrappers around yypush_parse.
2879 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2880 (yypull_parse): New function wrapping yypush_parse.
2881 (yyparse): New #define wrapping yypull_parse.
2882 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2884 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2885 prototype yylex in the module that calls yyparse, and don't prototype
2886 yyparse there. Otherwise, the yyparse expansion won't compile.
2887 * tests/input.at (Torturing the Scanner): Likewise.
2889 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2891 Enable push parsers to operate in impure mode. Thus, %push-parser no
2892 longer implies %pure-parser. The point of this change is to move
2893 towards being able to test the push parser code by running the entire
2894 test suite as if %push-parser had been declared.
2895 * data/push.c (yypush_parse): For impure mode, remove the
2896 yypushed_char, yypushed_val, and yypushed_loc arguments.
2897 Instead, declare these as local variables initialized to the global
2898 yychar, yylval, and yylloc.
2899 For the first yypush_parse invocation only, restore the initial values
2900 of these global variables when it's time to read a token since they
2901 have been overwritten.
2902 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2904 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2905 %pure-parser along with %push-parser since this test case was designed
2906 for pure push parsers.
2907 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2908 (AT_YACC_OR_PUSH_IF): New.
2909 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2910 add a note that it's still wrong for some cases (as it has been for a
2912 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2913 %push-parser no longer implies %pure-parser.
2915 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2917 Remove some unnecessary differences between the pull parser code and
2918 the push parser code. This patch enables yynerrs in push mode.
2919 * data/push.c: Reformat M4 a little.
2920 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2921 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2922 because push mode is on. Instead, if pure mode is on, move yynerrs
2924 (b4_declare_parser_state_variables): ... here.
2925 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2926 to yyps->NAME so it can be used in yypush_parse.
2927 (yypush_parse): Don't omit uses of yynerrs in push mode.
2929 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2931 Fix bug such that the first pushed token's value and location are
2932 sometimes overwritten (sometimes by %initial-action) before being used.
2933 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2934 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2935 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2936 more closely mimic the pull parser logic.
2937 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2938 time to read a token, which is after any initialization of yylval and
2940 (gottoken): Rename label to...
2941 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2944 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2946 Rearrange initialization of the parser state variables so that the
2947 skeleton doesn't have to have a copy for pull mode and another for push
2948 mode. This patch also fixes at least a bug such that yylloc was not
2949 initialized (with b4_location_initial_line and
2950 b4_location_initial_column) upon calling yypush_parse. However, that
2951 initialization now overwrites the first token's location;
2952 %initial-action assigning @$ already did the same thing, and both bugs
2953 will be fixed in a later patch.
2954 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2955 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2956 yyss, yyvs, yyls, and yystacksize.
2957 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2958 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2960 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2961 yyps->NAME so it can be used in yypush_parse.
2962 (yyparse or yypush_parse): For yypush_parse, don't print the
2963 "Starting parse" diagnostic for invocations after the first.
2964 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2965 yypush_parse, only do it for the first invocation.
2966 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2967 initialization to occur in yypush_parse but only on the first
2970 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2972 * data/push.c: Add CPP guards around push parser declarations in both
2973 the header and the code file.
2974 In the code file, move the push parser declarations to the same place
2975 they appear in the header file.
2976 Clean up the M4 some, especially the inconsistent underquoting in
2977 some b4_c_function_def and b4_c_function_decl uses.
2979 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2981 Encapsulate the push parser state variables into an M4 macro so the
2982 push skeleton doesn't have to list them again for pull mode's yyparse.
2983 For push mode, remove yypush_parse's local equivalents of these
2984 variables to eliminate unnecessary copying between the two sets at
2985 run-time. This patch also fixes at least a bug related to multiple
2986 %initial-action invocations in push mode.
2987 * data/push.c (b4_declare_parser_variables): Rename to...
2988 (b4_declare_scanner_communication_variables): ... this for clarity and
2990 (b4_declare_yyparse_variables): Remove and move its contents to the one
2991 spot where it was invoked.
2992 (b4_declare_parser_state_variables): New macro containing the parser
2993 state variables required by push mode.
2994 (struct yypstate): Replace all fields but yynew with
2995 b4_declare_parser_state_variables.
2996 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2997 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2998 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2999 (yyparse or yypush_parse): For yyparse in pull mode, replace local
3000 parser state variable declarations with
3001 b4_declare_parser_state_variables.
3002 Don't initialize parser state variables when calling yypush_parse since
3003 yypstate_new already does that.
3004 Invoke the user's initial action only upon the first yypush_parse
3006 Remove all code that copies between the local parser state variables
3009 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3011 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
3012 prevent a name collision in a future patch where these names will
3013 sometimes be #define'd.
3014 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
3015 since it no longer has the same name as the existing argument.
3016 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
3018 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
3019 and Joel E. Denny <jdenny@ces.clemson.edu>
3021 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3022 that the argument is case-insensitive, and there's no `=' here.
3023 For the %skeleton entry, mention that %language is better.
3024 (Bison Options): Likewise for --language and --skeleton. Move the
3025 --skeleton entry so that the `Tuning the parser' section is sorted
3026 alphabetically on long options.
3027 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
3028 %language directive in detail here; cross-reference the %language
3029 documentation instead.
3030 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
3031 `%require "2.3b"' so that the example is always up-to-date.
3032 (Table of Symbols): Add entries for %language and %skeleton.
3033 * examples/extexi (normalize): Instead of replacing every %require
3034 argument with the current Bison version, just substitute for
3035 `@value{VERSION}'. This guarantees that we're testing what actually
3036 appears in the documentation.
3037 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
3038 rather than `@VERSION@'.
3040 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3042 * NEWS: Reword the %language news a bit, and put it earlier.
3044 * src/getargs.c (skeleton_arg): Last arg is now location const *.
3045 Rewrite to simplify the logic.
3046 (language_argmatch): Likewise.
3047 (program_name): We now own this var.
3048 * src/getargs.h (struct bison_language): Use char[] rather than
3051 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
3053 * src/complain.c (program_name): Remove decl; no longer needed.
3054 * src/main.c (program_name): Remove; now belongs to getargs.
3056 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
3058 * NEWS: Document %language.
3060 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
3062 * data/c-skel.m4, data/c++-skel.m4: New files.
3063 * data/glr.c: Complain on push parsers.
3065 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
3067 (Decl Summary): Document %language and %skeleton.
3068 (Command line): Document -L.
3070 * examples/extexi: Rewrite %require directive.
3071 * examples/calc++/Makefile.am: Pass VERSION to extexi.
3073 * src/files.c (compute_exts_from_gc): Look in language structure
3075 (compute_file_name_parts): Check whether .tab should be added.
3076 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
3077 (language, skeleton_arg, language_argmatch): New.
3078 (long_options): Add --language.
3079 (getargs): Use skeleton_arg, add -L/--language.
3080 * src/getargs.h: Include location.h.
3081 (struct bison_language, language, skeleton_arg, language_argmatch): New.
3082 * src/output.c (prepare): Pick default skeleton from struct language.
3083 Don't dispatch C skeletons here.
3084 * src/parse-gram.y (PERCENT_LANGUAGE): New.
3085 (prologue_declaration): Add "%language" rule, use skeleton_arg.
3086 * src/scan-gram.l ("%language"): New rule.
3088 * tests/calc.at: Test %skeleton and %language.
3089 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
3090 (AT_GLR_IF): Look for %skeleton "glr.cc".
3091 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
3092 (AT_YACC_IF): Reject %language.
3094 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3096 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
3097 since it wasn't used; only the typedef name 'semantic_type' is needed.
3098 Also, omit trailing white space.
3100 * bootstrap: Sync from coreutils.
3101 (gnulib_extra_files): Add build-aux/announce.gen.
3102 (slurp): Adjust .gitignore files like .cvsignore files.
3103 * build-aux/announce-gen: Remove from CVS, since bootstrap
3106 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
3108 Make %push-parser imply %pure-parser. This fixes several bugs; see
3109 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
3110 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
3112 * data/push.c: Don't bother testing b4_push_if when deciding whether
3113 to expand b4_declare_parser_variables globally.
3114 (yypush_parse): Likewise in here.
3116 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
3117 (yy_reduce_print): Reformat M4 for readability.
3119 2006-12-15 Bob Rossi <bob@brasko.net>
3120 and Joel Denny <jdenny@ces.clemson.edu>
3122 * data/push.c (yypstate): Add typedef, and update all uses of
3123 struct yypstate to just yypstate.
3124 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
3126 2006-12-14 Bob Rossi <bob@brasko.net>
3128 * data/push.c (yypush_parse): Declare prototype regardless of
3131 2006-12-14 Bob Rossi <bob@brasko.net>
3133 * data/push.c (yyparse): Remove the prototype and the #define when in
3136 2006-12-13 Bob Rossi <bob@brasko.net>
3138 * data/push.c (yypstate_init): Rename to...
3139 (yypstate_new): ... this and use b4_c_function_def.
3140 (yypstate_delete): New.
3141 (yypush_parse): Change parameters yynval and yynlloc to be const.
3142 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
3143 yypstate_delete functions.
3145 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
3147 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
3148 strange test case titles. Reported by Bob Rossi.
3150 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3152 * TODO: Add pointer to Sylvain Schmitz's work on static detection
3153 of potential ambiguities in GLR grammers.
3155 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
3157 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
3158 `bison ', use m4_index instead of m4_substr since chopping up a string
3159 containing M4-special characters causes problems here.
3161 Fix a couple of bugs related to special characters in user-specified
3162 file names, and make it easier for skeletons to compute output file
3163 names with the same file name prefix as Bison-computed output file
3165 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
3166 b4_parser_file_name and b4_spec_defines_file instead of
3167 @output_parser_name@ and @output_header_name@, which are now redundant.
3168 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
3169 b4_parser_file_name, b4_spec_defines_file, and the new
3170 @basename(FILENAME@) instead of @output_parser_name@ and
3171 @output_header_name@, which inappropriately escaped the file names as
3173 * src/files.c (all_but_ext): Remove static qualifier.
3174 (compute_output_file_names): Move `free (all_but_ext)' to...
3175 (output_file_names_free): ... here since all_but_ext is needed later.
3176 * src/files.h (all_but_ext): Extern.
3177 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
3178 exactly what MUSCLE_INSERT_STRING used to do.
3179 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
3180 characters are escaped properly.
3181 * src/output.c (prepare): Define muscle file_name_all_but_ext as
3183 For pkgdatadir muscle, maintain previous functionality by using
3184 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
3185 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
3186 digraphs would never be expanded. Hopefully no one has M4-special
3187 characters in his Bison installation path.
3188 * src/scan-skel.l: Don't parse @output_header_name@ and
3189 @output_parser_name@ anymore since they're now redundant.
3190 In @output, use decode_at_digraphs.
3191 Parse a new @basename command that invokes last_component.
3192 (decode_at_digraphs): New.
3193 (BASE_QPUTS): Remove unused.
3194 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
3195 (Output file name): New tests.
3197 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
3199 Warn about output files that are generated by the skeletons and that
3200 conflict with other output files.
3201 * data/glr.c: Don't generate the header file here when glr.cc does.
3202 * src/files.c (file_names, file_names_count): New static globals.
3203 (compute_output_file_names): Invoke output_file_name_check for files
3204 not generated by the skeletons and remove existing checks.
3205 (output_file_name_check): New function that warns about conflicting
3207 (output_file_names_free): Free file_names.
3208 * src/files.h (output_file_name_check): Declare.
3209 * src/scan-skel.l: Invoke output_file_name_check for files generated by
3211 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
3212 (Conflicting output files): New tests.
3214 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3216 * doc/bison.texinfo: Fix a couple of typos.
3218 2006-12-08 Bob Rossi <bob@brasko.net>
3220 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
3222 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
3224 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
3225 (yypush_parse): Rename yypvars argument to yyps and remove redundant
3227 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
3228 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
3230 2006-12-07 Bob Rossi <bob@brasko.net>
3231 and Joel Denny <jdenny@ces.clemson.edu>
3233 * data/push.c (yypvarsinit): Change return type from void* to struct
3234 yypvars*. No longer cast to void* on return.
3235 (struct yypvars): Remove yylen since it need not be remembered between
3236 yypushparse invocations.
3237 (yypushparse): Don't copy between yylen and pv->yylen.
3239 2006-12-05 Bob Rossi <bob@brasko.net>
3241 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
3242 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
3243 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
3244 (struct yypvars): Remove b4_declare_parser_variables.
3245 (yypvarsinit): Remove init code for removed variables.
3246 (global scope): Do not declare b4_declare_parser_variables if
3248 (yypushparse): Add b4_declare_parser_variables.
3249 Init new local variables, and remove init code for removed
3252 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
3253 and yyparse for other modes.
3254 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
3255 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
3256 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
3257 (AT_PURE_LEX_IF): True if pure or push parser.
3259 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
3261 Document Yacc prologue alternatives and default %destructor's and
3262 %printer's as experimental. Don't mention Java yet. Discussed at
3263 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
3264 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
3265 (2.3a): Annotate this entry to say the old forms of these features were
3267 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
3268 Table of Symbols): Say they're experimental. Comment out any mention
3269 of Java (we'll want this back eventually).
3271 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3273 Support a file name argument to %defines. Deprecate `=' in
3274 %file-prefix, %name-prefix, and %output. Discussed at
3275 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
3276 * NEWS (2.3a+): Mention.
3277 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
3278 form of %defines, and remove `=' from entries for %file-prefix,
3279 %name-prefix, and %output.
3280 * src/parse-gram.y (prologue_declaration): Implement.
3281 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
3282 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
3283 all but one occurrence of %name-prefix.
3284 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
3285 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
3286 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
3287 occurrence of each of %file-prefix and %output. Add check for %defines
3289 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
3290 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
3291 Remove the `=' from %output.
3293 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
3295 Don't escape $ in test case titles since Autoconf 2.61 now does that
3297 * tests/actions.at (Default %printer and %destructor are not for error
3298 or $undefined): Here.
3299 (Default %printer and %destructor are not for $accept): Here.
3300 * tests/input.at (Invalid $n and @n): Here.
3302 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
3304 Rename <!> to <>. Discussed starting at
3305 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
3306 * NEWS (2.3a+): Update.
3307 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3309 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
3310 * src/scan-gram.l (INITIAL): Implement.
3311 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
3312 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
3314 * tests/actions.at (Default tagless %printer and %destructor,
3315 Default tagged and per-type %printer and %destructor,
3316 Default %printer and %destructor are not for error or $undefined,
3317 Default %printer and %destructor are not for $accept,
3318 Default %printer and %destructor for mid-rule values): Update.
3319 * tests/input.at (Default %printer and %destructor redeclared,
3320 Unused values with default %destructor): Update.
3322 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3324 Don't let %prec take a nonterminal.
3325 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
3327 * tests/input.at (%prec takes a token): New test checking that %prec
3328 won't take a nonterminal.
3330 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3332 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
3333 it was double-quoted.
3334 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
3335 grammar is maintained with Bison's highest standards.
3336 * src/getargs.c: Fix some typos in Doxygen comments.
3338 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3340 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
3341 later. Reported by Paul Eggert in
3342 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
3343 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
3344 * src/scan-code.l (translate_action): Don't bother invoking
3345 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
3346 (code_scanner_free): Instead of invoking
3347 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
3349 * src/scan-gram.l (gram_scanner_free): Likewise.
3350 * src/scan-skel.l (scan_skel): Likewise.
3352 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3354 * src/files.c (tr): Change return type to void.
3355 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
3356 has been called previously for the same key.
3357 (muscle_find): Return storage instead of value so that
3358 --enable-gcc-warnings doesn't produce warnings that the return discards
3359 const. aver that the value and storage are the same since storage
3360 could potentially be NULL when value is not.
3361 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
3364 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3366 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
3367 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
3368 us a slightly cleaner distribution, and also works.
3369 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
3372 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
3373 and Paul Eggert <eggert@cs.ucla.edu>
3375 Don't let Bison leak memory except when it complains.
3376 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
3377 (spec_defines_file, dir_prefix): Now char *, not const char *,
3378 since they are freed.
3379 * src/files.c: Likewise.
3380 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
3382 (tr): Now operates in-place. All uses changed.
3383 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
3385 (compute_file_name_parts, compute_output_file_names): Don't store
3386 read-only data in variables that will be freed.
3387 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
3388 src_extension, and header_extension.
3389 (output_file_names_free): New public function to free
3390 spec_verbose_file, spec_graph_file, spec_defines_file,
3391 parser_file_name, and dir_prefix.
3392 * src/getargs.c (getargs): Don't store read-only data in variables that
3394 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
3395 (which previously existed but was unused), and quotearg_free.
3396 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
3397 * src/muscle_tab.c: Likewise.
3398 (muscle_entry): Make the value char const *,
3399 and add a new storage member that is char * and can be freed.
3400 (muscle_entry_free): New private function.
3401 (muscle_init): Use it instead of free.
3402 (muscle_insert, muscle_grow): Update and use new storage member.
3403 (muscle_code_grow): Free the string passed to muscle_grow
3404 since it's not needed anymore.
3405 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
3406 add a new `char *code' member.
3407 ("{...}"): Declare semantic type as code.
3408 * src/scan-code.h (translate_rule_action):
3409 (translate_symbol_action, translate_code, translate_action): Return
3410 `char const *' rather than `char *' since external code should not free
3412 * src/scan-code.l: Likewise.
3413 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
3414 which is "{...}" in the parser.
3415 * tests/Makefile.am (maintainer-check-valgrind): Set
3416 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
3418 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
3420 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
3421 expecting a non-zero exit status sets --leak-check=summary and
3422 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
3423 this case, and we don't want to hear about it.
3425 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3427 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
3428 instead of from the template, to simplify configuration a bit.
3429 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
3430 and m4/wint_t.m4, as they are needed with the latest gnulib.
3432 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3434 Disable unset/unused mid-rule value warnings by default, and recognize
3435 --warnings=midrule-values to enable them. Discussed starting at
3436 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
3437 * NEWS (2.3a+): Mention.
3438 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
3439 warnings): Add entry for midrule-values subargument.
3440 * src/reader.c (symbol_should_be_used): Don't return true just because
3441 the value is a set/used mid-rule value unless
3442 --warnings=midrule-values was specified.
3443 * tests/input.at (Unused values, Unused values before symbol
3444 declarations): Run tests with and without --warnings=midrule-values.
3446 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
3447 than LIST_FREE directly.
3449 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3451 Finish implementing --warnings=error, which should not be implied by
3452 --warnings=all (or by its synonyms -W and --warnings without
3454 * src/complain.c (set_warning_issued): New function to report that
3455 warnings are being treated as errors and to record an error if so.
3457 (warn_at, warn): ... here.
3458 * src/getargs.c (warnings_args, warnings_types): Reorder so that
3459 "error - warnings are errors" does not appear above "all - all of the
3461 (getargs): For -W and --warnings without subarguments, don't let
3462 FLAGS_ARGMATCH set warnings_error in warnings_flag.
3463 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
3465 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3467 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
3468 empty subargument list. For example: `bison --warnings= parser.y'.
3470 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3472 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
3473 the parser header file so that gcc doesn't warn.
3475 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3477 Split the default %destructor/%printer into two kinds: <*> and <!>.
3478 Discussed starting at
3479 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
3480 * NEWS (2.3a+): Mention.
3481 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
3482 previous change today related to mid-rules.
3483 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3484 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
3485 (TYPE_TAG_ANY): Add as <*>.
3486 (TYPE_TAG_NONE): Add as <!>.
3487 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
3489 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
3490 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
3491 * src/symlist.c (symbol_list_default_new): Split into tagged and
3493 (symbol_list_destructor_set, symbol_list_printer_set): Split
3494 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
3495 SYMLIST_DEFAULT_TAGLESS.
3496 * src/symlist.h: Update symbol_list_default*_new prototypes.
3497 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
3498 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
3499 * src/symtab.c (default_destructor, default_destructor_location,
3500 default_printer, default_printer_location): Split each into tagged and
3502 (symbol_destructor_get, symbol_destructor_location_get,
3503 symbol_printer_get, symbol_printer_location_get): Implement tagged
3504 default and tagless default cases.
3505 (default_destructor_set, default_printer_set): Split each into tagged
3506 and tagless versions.
3507 * src/symtab.h: Update prototypes.
3508 * tests/actions.at (Default %printer and %destructor): Rename to...
3509 (Default tagless %printer and %destructor): ... this, and extend.
3510 (Per-type %printer and %destructor): Rename to...
3511 (Default tagged and per-type %printer and %destructor): ... this, and
3513 (Default %printer and %destructor for user-defined end token): Extend.
3514 (Default %printer and %destructor are not for error or $undefined):
3516 (Default %printer and %destructor are not for $accept): Update.
3517 (Default %printer and %destructor for mid-rule values): Extend.
3518 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3519 (Unused values with default %destructor): Extend.
3521 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3523 Don't apply the default %destructor/%printer to an unreferenced midrule
3525 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3526 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3527 like $@n instead of just @n so that the default %destructor/%printer
3528 logic doesn't see them as user-defined symbols.
3529 (symbol_is_dummy): Check for both forms of the name.
3530 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3531 name for which the midrule value is referenced in any action.
3532 * tests/actions.at (Default %printer and %destructor for mid-rule
3534 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3535 for change to dummy symbol names.
3537 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3539 Warn about unset midrule $$ if the corresponding $n is used.
3540 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3542 (packgram): Before invoking grammar_rule_check on any rule, make sure
3543 all actions have already been scanned in order to set `used' flags.
3544 Otherwise, checking that a midrule's $$ is set will not always work
3545 properly because the midrule check must forward-reference the midrule's
3547 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3550 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3552 More improvements to the documentation of the prologue alternatives:
3553 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3555 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3556 some text to clarify the relative importance of the new directives and
3557 to show how these directives may be viewed as code labels.
3559 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3561 Similar to the recently removed %before-header, add %code-top as the
3562 alternative to the pre-prologue. Mentioned at
3563 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3564 Also, let the prologue alternatives appear in the grammar section.
3565 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3566 (prologue_declaration): Move the existing prologue alternatives to...
3567 (grammar_declaration): ... here and add %code-top.
3568 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3570 Clean up and extend documentation for the prologue alternatives.
3571 * NEWS (2.3a+): Describe prologue alternatives.
3572 * doc/bison.texinfo (Prologue): Move discussion of prologue
3574 (Prologue Alternatives): ... this new section, and extend it to discuss
3575 all 4 directives in detail.
3576 (Table of Symbols): Clean up discussion of prologue alternatives and
3579 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3581 DJGPP specific issues.
3583 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3584 config.bat accordingly.
3585 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3586 * djgpp/config.site: Likewise.
3588 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
3590 Replace %*-header with %provides, %requires, %code. See discussion at
3591 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3593 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3594 (b4_user_start_header): Remove.
3595 * data/glr.c: Use new macros instead of b4_*start_header
3597 * data/glr.cc: Likewise.
3598 * data/lalr1.cc: Likewise.
3599 * data/push.c: Likewise.
3600 * data/yacc.c: Likewise.
3602 * doc/bison.texinfo: Remove %before-header, rename
3603 %{start,end,after}-header to %requires, %provides, %code.
3605 * src/parse-gram.y: Likewise (also rename token names accordingly).
3606 * src/scan-gram.l: Likewise.
3607 * tests/actions.at: Likewise.
3609 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3611 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3612 Problem reported by Joel E. Denny.
3614 2006-10-14 Jim Meyering <jim@meyering.net>
3616 (Sync from coreutils.)
3617 Work also when the working directory (with e.g. coreutils sources)
3618 is version controlled with git, rather than CVS.
3619 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3621 In messages and comments, say e.g., "checked-out sources",
3622 rather than "CVS sources".
3623 (version_controlled_file): New function. Work for git as well as
3624 for CVS. Don't use grep's -q option.
3625 (slurp): Call it here, in place of CVS-specific code.
3627 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3629 Fix testsuite for ./configure --enable-gcc-warnings:
3630 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3631 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3632 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3633 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3634 * test/regression.at (Diagnostic that expects two alternatives):
3637 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3639 * bootstrap.conf (gnulib_modules): Add config-h.
3640 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3641 worry about HAVE_CONFIG_H.
3642 * lib/abitset.c: Likewise.
3643 * lib/bitset.c: Likewise.
3644 * lib/bitset_stats.c: Likewise.
3645 * lib/bitsetv-print.c: Likewise.
3646 * lib/bitsetv.c: Likewise.
3647 * lib/ebitset.c: Likewise.
3648 * lib/get-errno.c: Likewise.
3649 * lib/lbitset.c: Likewise.
3650 * lib/subpipe.c: Likewise.
3651 * lib/timevar.c: Likewise.
3652 * lib/vbitset.c: Likewise.
3653 * lib/bitset.c: Include "bitset.h" first, to test interface.
3654 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3655 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3656 * lib/bitsetv.c: Include "bitsetv.h" first.
3657 * lib/get-errno.c: Include "get-errno.h" first.
3658 * m4/.cvsignore: Add config-h.m4.
3659 * tests/actions.at (Default %printer and %destructor for ...):
3660 Adjust expected line numbers in output to reflect removal of #if
3661 HAVE_CONFIG_H lines.
3662 * tests/glr-regression.at (Missed %merge type warnings when ...):
3664 * tests/regression.at (Braced code in declaration in rules section):
3666 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3667 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3668 Include <config.h> unconditionally.
3670 * bootstrap: Sync from coreutils, as follows:
3672 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3674 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3675 variable was sometimes used without being initialized. This
3676 messed up the installation of the INSTALL file in some cases.
3678 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3680 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3681 --copy. Inspired by a suggestion from Bruno Haible.
3683 2006-10-03 Jim Meyering <jim@meyering.net>
3685 * bootstrap: Undo last change to this file, since now gnulib-tool
3686 sticks with the automake default in generating dependencies.
3688 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3690 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3691 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3693 * doc/bison.1: Add copyright notice.
3695 * data/glr.c: Don't include <stdarg.h>; not used.
3697 * NEWS: The -g and --graph options now output graphs in Graphviz
3698 DOT format, not VCG format.
3699 * doc/bison.1: Likewise.
3700 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3701 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3703 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3704 * TODO: Remove Graphviz entry.
3705 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3706 remove vcg.c, vcg.h, vcg_defaults.h.
3707 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3708 * src/graphviz.c, src/graphviz.h: New files.
3709 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3710 * src/files.h: Make comment more generic.
3711 * src/main.c (main): Likewise.
3712 * src/print_graph.h: Likewise.
3713 * src/getargs.c (usage): Make usage description more generic.
3714 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3715 (static_graph, fgraph): Remove. All uses changed to pass
3716 arguments instead of sharing a static var.
3717 (print_core, print_actions, print_state, print_graph):
3718 Output graphviz format rather than VCG format.
3719 * tests/.cvsignore: Remove *.vcg; add *.dot.
3720 * tests/output.at: Expect *.dot files, not *.vcg files.
3722 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3723 accommodates the 2006-10-08 change.
3725 2006-10-11 Bob Rossi <bob@brasko.net>
3727 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3728 (b4_yyssa, b4_yyerror_range): New macros.
3729 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3730 (yypvarsinit): Remove init of removed fields.
3731 (yypushparse): Remove use of removed fields; use new macros instead.
3733 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3735 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3736 in a push parser. Reindent slightly to match yacc.c better.
3738 2006-10-11 Bob Rossi <bob@brasko.net>
3740 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3742 (yypvarsinit, yypushparse): Remove init of removed fields.
3743 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3745 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3747 * THANKS: Add Paolo Bonzini and Bob Rossi.
3749 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
3751 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3752 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3753 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3754 b4_define_user_cde and uses): Remove.
3755 (b4_comment, b4_prefix, b4_sync_start): New.
3756 * data/bison.m4: New file, with most of the content removed from c.m4.
3757 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3758 * src/output.c (output_skeleton): Pass bison.m4.
3759 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3762 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3764 Fix test failure reported by Tom Lane in
3765 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3766 and try to make such failures easier to catch in the future.
3767 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3768 that's now the caller's responsibility.
3769 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3770 Set yychar = YYEOF if it's negative.
3771 * tests/actions.at (yylex): Abort if asked to read past EOF.
3772 * tests/conflicts.at (yylex): Likewise.
3773 * tests/cxx-type.at (yylex): Likewise.
3774 * tests/glr-regression.at (yylex): Likewise.
3775 * tests/input.at (yylex): Likewise.
3776 * tests/regression.at (yylex): Likewise.
3777 * tests/torture.at (yylex): Likewise.
3779 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3781 Fix problems with translating English-language diagnostics.
3782 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3783 respect to bison-runtime pot generation. The YY_ stuff
3784 wasn't being captured.
3785 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3786 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3787 * runtime-po/POTFILES.in: Add data/push.c.
3789 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3791 Merge bootstrap changes from coreutils.
3793 2006-09-28 Jim Meyering <jim@meyering.net>
3795 Automatically generated dependencies are important even
3796 when all of the sources in a directory come from gnulib.
3797 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3798 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3800 2006-09-23 Jim Meyering <jim@meyering.net>
3802 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3804 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3806 * bootstrap: Add support for --force.
3807 (usage): New function. Describe usage less tersely.
3808 (CVS_only_file): New var.
3810 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3812 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3813 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3814 Adjust white space and comments to match GNU style better.
3816 2006-09-20 Bob Rossi <bob@brasko.net>
3818 * data/push.c (yyresult_get): Remove function.
3819 (YYPUSH_MORE): Add #define.
3820 (yypushparse): Modify return value.
3822 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3824 * stamp-h.in: Remove; no longer needed.
3825 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3826 Remove config.h, config.hin, intl (no longer created).
3827 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3830 Sync bootstrap from coreutils, as follows:
3832 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3834 * bootstrap (symlink_to_gnulib): New function.
3835 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3836 to copies-of-gnulib.
3837 (cp_mark_as_generated, slurp, gnulib_files):
3838 Avoid making a copy if it's the same as the old version.
3839 (gnulib_files): Add support for this variable (used by Bison).
3841 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3843 * src/getargs.c (usage): Rework to use conventions similar to
3844 coreutils, to make translation a bit easier and the code a bit
3845 smaller. Problem reported by Tim Van Holder.
3847 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3849 Use some of gnulib's new modules, taken from coreutils.
3851 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3852 * bootstrap.conf: New file.
3853 (gnulib_modules): Add configmake, inttypes, unistd.
3854 (XGETTEXT_OPTIONS): Add complain, complain_at,
3855 fatal, fatal_at, warn, warn_at, unexpected_end.
3856 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3857 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3859 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3861 (GNULIB_AUTOCONF_SNIPPET): Remove.
3862 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3864 * lib/.cvsignore: Add inttypes_.h.
3865 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3866 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3867 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3868 no-longer-necessary initializations.
3869 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3870 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3871 use the unistd module.
3872 * src/system.h: Likewise.
3873 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3874 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3875 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3876 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3877 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3878 * src/system.h: Include inttypes.h unconditionally, now that we
3879 use the inttypes module. Don't bother to include stdint.h, since
3880 inttypes.h now does that for us.
3881 (LOCALEDIR): Remove, now that we use the configmake module.
3882 * src/getargs.c: Include configmake.h.
3883 * src/main.c: Likewise.
3884 * src/output.c: Likewise.
3885 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3886 not from $abs_top_builddir, since config.h moved.
3889 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3890 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3892 * src/parse-gram.y (symbol_declaration): Don't put statements
3893 before declarations; it's not portable to C89.
3894 * src/scan-code.l (handle_action_at): Likewise.
3896 * src/scan-code.l: Always initialize braces_level; the old code
3897 left it uninitialized and therefore had undefined behavior.
3899 Don't attempt to redefine 'assert', since it runs afoul of
3900 systems where standard headers (mistakenly) include <assert.h>.
3901 Instead, define and use our own alternative, called 'aver'.
3902 * src/reader.c: Don't include assert.h, since we no longer
3904 * src/scan-code.l: Likewise.
3905 * src/system.h (assert): Remove, replacing with....
3906 (aver): New function, taking a bool arg. All uses changed.
3907 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3908 not merely an integer.
3910 2006-09-15 Bob Rossi <bob@brasko.net>
3912 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3913 * data/c.m4 (YYPUSH): New.
3914 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3915 * src/getargs.c (push_parser): New var.
3916 * src/getargs.h (push_parser): New declaration.
3917 * src/output.c (prepare): Add macro insertion of `push_flag'.
3918 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3919 (prologue_declaration): Parse %push-parser.
3920 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3921 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3922 list of removed lines from the traces observed.
3923 (AT_CHECK_CALC_LALR): Added push parser tests.
3925 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3927 * NEWS: Version 2.3a.
3928 * configure.ac (AC_INIT): Likewise.
3930 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3931 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3932 due to header ordering dependencies. I don't know why the #define
3935 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3936 runtime cost when YYDEBUG is not defined, and so that some tests
3937 that used to fail now work. Problem and initial suggestion by
3939 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3940 * data/glr.cc (b4_parser_class_name):
3941 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3942 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3943 (yydebug_) [YYDEBUG]: New member.
3944 (yycdebug_): Now defined only if YYDEBUG.
3945 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3946 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3947 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3949 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3950 Define only if YYDEBUG.
3951 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3953 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3954 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3955 AT_CHECK_CALC_GLR_CC that are working now.
3957 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3959 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3960 We don't need them in glr.cc, and glr.c defines them.
3961 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3962 assumes that defining it to anything is the same as defining
3963 it to 1. Problem reported by Paolo Bonzini.
3965 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3967 * data/c.m4 (b4_null, b4_case): Define.
3968 * src/output.c (prepare_symbols): Use b4_null.
3969 (user_actions_output): Use b4_case.
3971 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3973 * data/glr.c (b4_shared_declarations): Put start-header first,
3974 before any #includes that we generate, so that feature-test
3975 macros work. Problem reported by Michael Deutschmann in
3976 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3977 * data/lalr1.cc: Likewise.
3978 * doc/bison.texinfo (Prologue): Document that feature-test macros
3979 should be defined before any Bison declarations.
3980 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3981 that depend on location.hh after, not before, Bison decls, since
3982 we now include location.hh after the first user prologue.
3984 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3985 Sander Brandenburg in
3986 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3987 Also, fix minor white space and comment issues.
3988 (Prologue): Mention that it's better to define feature-test macros
3989 before Bison declarations. Problem reported by Michael Deutschmann.
3991 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3993 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3994 This adjusts to recent gnulib changes.
3996 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3998 Finish implementation of per-type %destructor/%printer. Discussed
4000 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
4002 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
4003 * NEWS (2.3+): Add a description of this feature to the default
4004 %destructor/%printer description.
4005 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
4006 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4007 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
4008 list node contains a semantic type.
4009 * src/symtab.c, src/symtab.h: Extend with a table that associates
4010 semantic types with their %destructor's and %printer's.
4011 (semantic_type_from_uniqstr, semantic_type_get,
4012 semantic_type_destructor_set, semantic_type_printer_set): New functions
4013 composing the public interface of that table.
4014 (symbol_destructor_get, symbol_destructor_location_get,
4015 symbol_printer_get, symbol_printer_location_get): If there's no
4016 per-symbol %destructor/%printer, look up the per-type before trying
4018 * tests/actions.at (Per-type %printer and %destructor): New test case.
4019 * tests/input.at (Default %printer and %destructor redeclared):
4020 Extend to check that multiple occurrences of %symbol-default in a
4021 single %destructor/%printer declaration is an error.
4022 (Per-type %printer and %destructor redeclared, Unused values with
4023 per-type %destructor): New test cases.
4025 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4027 Require default %destructor/%printer to be declared using
4028 %symbol-default instead of an empty symbol list, and start working on
4029 new per-type %destructor/%printer. Discussed at
4030 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
4031 * NEWS (2.3+): Add %symbol-default to example.
4032 * bison.texinfo (Freeing Discarded Symbols): Likewise.
4033 (Table of Symbols): Add entry for %symbol-default.
4034 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
4035 (generic_symlist, generic_symlist_item): New nonterminals for creating
4036 a list in which each item is a symbol, semantic type, or
4038 (grammar_declaration): Use generic_symlist in %destructor and %printer
4039 declarations instead of symbols.1 or an empty list.
4040 (symbol_declaration, precedence_declaration, symbols.1): Update actions
4041 for changes to symbol_list.
4042 * src/reader.c: Update for changes to symbol_list.
4043 * src/scan-code.l: Likewise.
4044 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
4045 * src/symlist.c, src/symlist.h: Extend such that a list node may
4046 represent a semantic type or a %symbol-default in addition to just an
4047 ordinary symbol. Add switched functions for setting %destructor's and
4049 * tests/actions.at, tests/input.at: Add %symbol-default to all default
4050 %destructor/%printer declarations.
4052 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
4054 Whether the default %destructor/%printer applies to a particular symbol
4055 isn't a question of whether the user *declares* that symbol (in %token,
4056 for example). It's a question of whether the user by any means
4057 *defines* the symbol at all (by simply using a char token, for
4058 example). $end is defined by Bison whereas any other token with token
4059 number 0 is defined by the user. The error token is always defined by
4060 Bison regardless of whether the user declares it with %token, but we
4061 may one day let the user define error as a nonterminal instead.
4062 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
4063 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
4064 the meaning of "user-defined".
4065 * tests/actions.at (Default %printer and %destructor for user-declared
4066 end token): Rename to...
4067 (Default %printer and %destructor for user-defined end token): ...
4070 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
4071 computation of whether to apply the default, don't maintain a list of
4072 every Bison-defined symbol. Instead, just check for a first character
4073 of '$', which a user symbol cannot have, and check for the error token.
4075 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
4077 Don't apply the default %destructor or %printer to the error token,
4078 $undefined, or $accept. This change fits the general rule that the
4079 default %destructor and %printer are only for user-declared symbols,
4080 and it solves several difficulties that are described in the new test
4082 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
4083 * tests/actions.at (Default %printer and %destructor are not for error
4084 or $undefined, Default %printer and %destructor are not for $accept):
4087 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
4089 Allow %start after the first rule.
4090 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
4091 when parsing the first rule.
4092 (check_and_convert_grammar): Search for it here after all grammar
4093 declarations have been parsed. Skip midrules, which have dummy LHS
4095 * src/symtab.c (symbol_is_dummy): New function.
4096 * src/symtab.h (symbol_is_dummy): Declare it.
4097 * tests/input.at (%start after first rule): New test.
4099 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4101 Redo some of the previous commit: add back the ability to use
4102 non-aliased/undeclared string literals since it might be useful to
4103 those declaring %token-table.
4104 * src/reader.c (check_and_convert_grammar): Undo changes in previous
4105 commit: don't worry about complaints from symbols_pack.
4106 * src/symtab.c (symbol_new, symbol_class_set,
4107 symbol_check_alias_consistency): Undo changes in previous commit: count
4108 each string literal as a new symbol and token, assign it a symbol
4109 number, and don't complain about non-aliased string literals.
4110 (symbols_pack): Since symbol_make_alias still does not decrement symbol
4111 and token counts but does still set aliased tokens to the same number,
4112 symbol_pack_processor now leaves empty slots in the symbols array.
4114 * tests/regression.at (Undeclared string literal): Remove test case
4115 added in previous commit since non-aliased string literals are allowed
4117 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
4118 remove unnecessary string literal declarations.
4119 * tests/sets.at (Firsts): Likewise.
4121 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4123 Don't allow an undeclared string literal, but allow a string literal to
4124 be used before its declaration.
4125 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
4126 symbols_pack complained.
4127 * src/symtab.c (symbol_new): Don't count a string literal as a new
4129 (symbol_class_set): Don't count a string literal as a new token, and
4130 don't assign it a symbol number since symbol_make_alias does that.
4131 (symbol_make_alias): It's not necessary to decrement the symbol and
4132 token counts anymore. Don't assume that an alias declaration occurs
4133 before any uses of the identifier or string, and thus don't assert that
4134 one of them has the highest symbol number so far.
4135 (symbol_check_alias_consistency): Complain if there's a string literal
4136 that wasn't declared as an alias.
4137 (symbols_pack): Bail if symbol_check_alias_consistency failed since
4138 symbol_pack asserts that every token has been assigned a symbol number
4139 although undeclared string literals have not.
4140 * tests/regression.at (String alias declared after use, Undeclared
4141 string literal): New test cases.
4142 (Characters Escapes, Web2c Actions): Declare string literals as
4144 * tests/sets.at (Firsts): Likewise.
4146 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
4148 In the grammar scanner, STRING_FINISH unclosed constructs and return
4149 them to the parser in order to improve error messages.
4150 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
4151 SC_BRACED_CODE, SC_PROLOGUE): Implement.
4152 * tests/input.at (Unclosed constructs): New test case.
4153 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
4156 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
4159 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
4161 Handle string aliases for character tokens correctly.
4162 * src/symtab.c (symbol_user_token_number_set): If the token has an
4163 alias, check and set its alias's user token number instead of its own,
4164 which is set to indicate the alias. Previously, every occurrence of
4165 the character token in the grammar overwrote that alias indicator with
4167 * tests/input.at (String aliases for character tokens): New test.
4169 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
4171 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
4173 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4175 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4176 to prevent failures when building on older platforms.
4177 Check for autopoint failure.
4178 Set XGETTEXT_OPTIONS to values that check for C format strings,
4179 so that translators are warned about them (this also helps
4180 prevent core dumps).
4182 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
4183 function, since it simplifies our code a bit.
4185 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
4186 rather than -W, so we don't get bogus warnings about sign comparisons.
4187 Add -Wpointer-arith, since that warning is useful (it reports code
4188 that does not conform to C89 and that some compilers reject).
4189 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
4190 since it's no longer needed.
4192 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
4194 Clean up scanners a bit.
4195 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
4196 definitions so gcc won't warn when obstack_for_string is unused.
4197 * src/scan-code.l: config.h and system.h are already #include'd by
4198 scan-code-c.c, so get rid of them here.
4199 * src/scan-gram.l: Likewise.
4200 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
4201 definitions rather than duplicating the rest of it.
4202 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
4204 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
4206 Suppress signed/unsigned comparison warnings for yycheck.
4207 * data/c.m4 (b4_safest_int_type): New macro.
4208 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
4209 a signed int type, cast it to b4_safest_int_type first.
4210 * data/yacc.c: Likewise.
4211 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
4214 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
4216 * doc/bison.texinfo: Fix some typos.
4218 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
4220 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
4221 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
4223 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
4224 the latest gnulib does this a different way.
4225 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
4226 translation was patched, so stop omitting it.
4228 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4230 Enable declaration of default %printer/%destructor. Make the parser
4231 use these for all user-declared grammar symbols for which the user does
4232 not declare a specific %printer/%destructor. Thus, the parser uses it
4233 for token 0 if the user declares it but not if Bison generates it as
4234 $end. Discussed starting at
4235 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
4236 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
4238 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
4239 * NEWS (2.3+): Mention.
4240 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
4241 declare a %destructor for a mid-rule's semantic value. It's just
4242 impossible to declare one specific to it.
4243 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
4244 code. Describe default %destructor form.
4245 * src/parse-gram.y (grammar_declaration): Parse default
4246 %printer/%destructor declarations.
4247 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
4248 and symbol_destructor_location_get rather than accessing the destructor
4249 and destructor_location members of struct symbol.
4250 (symbol_printers_output): Likewise but for %printer's.
4251 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
4253 * src/symtab.c (default_destructor, default_destructor_location,
4254 default_printer, default_printer_location): New static global
4255 variables to record the default %destructor and %printer.
4256 (symbol_destructor_get, symbol_destructor_location_get,
4257 symbol_printer_get, symbol_printer_location_get): New functions to
4258 compute the appropriate %destructor and %printer for a symbol.
4259 (default_destructor_set, default_printer_set): New functions to set the
4260 default %destructor and %printer.
4261 * src/symtab.h: Prototype all those new functions.
4262 * tests/actions.at (Default %printer and %destructor): New test to
4263 check that the right %printer and %destructor are called, that they're
4264 not called for $end, and that $$ and @$ work correctly.
4265 (Default %printer and %destructor for user-declared end token): New
4266 test to check that the default %printer and %destructor are called for
4267 a user-declared end token.
4268 * tests/input.at (Default %printer and %destructor redeclared, Unused
4269 values with default %destructor): New tests to check related grammar
4270 warnings and errors.
4272 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4274 Clean up handling of %destructor for the end token (token 0).
4275 Discussed starting at
4276 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
4278 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
4280 Make the skeletons consistent in how they pop the end token and invoke
4282 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
4283 state, which has token number 0, since this would invoke the
4284 %destructor for the end token.
4285 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
4286 until after shifting the end token, or else it won't be popped.
4287 * data/yacc.c (yyparse): Likewise.
4289 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
4290 it's the end token. Upon termination, destroy an unshifted lookahead
4291 even when it's the end token.
4292 * data/lalr1.cc (yy::parser::parse): Likewise.
4293 * data/yacc.c (yyparse): Likewise.
4295 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
4296 value warnings for the end token when the user gives the end token a
4299 * tests/actions.at (Printers and Destructors): Test all the above.
4301 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
4303 Update to latest gnulib and gettext versions.
4304 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
4306 (gnulib_files): Add m4/warning.m4. Don't worry about files
4307 overwritten by autopoint.
4308 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
4309 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
4311 Don't use autoreconf; instead, invoke autopoint etc. by hand,
4312 so that we can remove the intl files at a better time.
4313 (intl_files_to_remove): Remove aclocal.m4, since it gets
4314 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
4315 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
4316 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4317 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
4318 Remove datarootdir hack; no longer needed.
4319 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
4320 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
4321 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
4323 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
4324 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
4326 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4328 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4329 it with --assume-autoconf='latest-stable'.
4331 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
4333 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
4334 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
4336 * src/muscle_tab.h (muscle_grow): Replace the header comments with
4337 those from muscle_tab.c since the old ones are misleading.
4339 2006-07-13 Akim Demaille <akim@epita.fr>
4341 Support %define "KEY" {VALUE}.
4342 * src/scan-code.h, src/scan-code.l (translate_action)
4343 (translate_rule_action, translate_symbol_action, translate_code):
4344 Return char *, not const char *.
4345 * src/parse-gram.y (declaration): Rename as...
4346 (prologue_declaration): this.
4347 (string_content): Remove this nonterminal, use STRING.
4348 (braceless, content, content.opt): New nonterminal.
4350 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
4352 * src/scan-gram.l (getargs.h): Don't include it.
4354 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
4356 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
4357 rather than a for-loop that declares a local bool variable. This
4358 should work around a compatibility problem with a Cray x1e C++
4359 compiler reported by Hung Nguyen in
4360 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
4361 The for-loop was introduced in the 2004-11-17 change but I don't
4362 know why it was needed.
4364 2006-07-12 Akim Demaille <akim@epita.fr>
4366 * data/c.m4: Comment changes.
4368 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
4370 * src/complain.c (error_message, ERROR_MESSAGE): New.
4372 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
4373 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
4375 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4377 * NEWS: Instead of %union, you can define and use your own union type
4378 YYSTYPE if your grammar contains at least one <type> tag.
4379 Your YYSTYPE need not be a macro; it can be a typedef.
4380 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
4381 (Union Decl, Decl Summary): Document this.
4382 * data/glr.c (YYSTYPE): Implement this.
4383 * data/glr.cc (YYSTYPE): Likewise.
4384 * data/lalr1.cc (YYSTYPE): Likewise.
4385 * data/yacc.c (YYSTYPE): Likewise.
4386 * src/output.c (prepare): Output tag_seen_flag.
4387 * src/parse-gram.y (declaration, grammar_declaration):
4388 Use 'union_seen' rather than 'typed' to determine whether
4389 %union has been seen, since grammars can now be typed without
4391 (symbol_declaration, type.opt, symbol_def):
4392 Keep track of whether a tag has been seen.
4393 * src/reader.c (union_seen, tag_seen): New vars.
4395 * src/reader.h (union_seen, tag_seen, typed): Likewise.
4396 * src/scan-code.l (untyped_var_seen): New variable.
4397 (handle_action_dollar): Adjust to above changes.
4398 (handle_action_dollar, handle_action_at):
4399 Improve overflow checking for outlandish numbers.
4400 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
4401 avoid new diagnostics generated by above changes.
4402 * tests/regression.at (YYSTYPE typedef): Add test to check
4403 for type tags without %union.
4405 * src/symlist.c (symbol_list_length): Return int, not unsigned
4406 int, since callers expect int. This may need to get revisited
4407 once we have proper integer overflow checking.
4409 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
4410 object is now static.
4412 * src/getargs.c (flags_argmatch): Return void, not int,
4413 to pacify ./configure --enable-gcc-warnings.
4415 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
4416 since last_string is already defined to FLEX_PREFIX (last_string).
4418 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
4420 Implement --warnings/-W.
4421 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
4423 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
4425 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
4426 (warnings_args, warnings_types): New.
4427 (getargs, short_options, long_options): Accept -W/--warnings.
4428 Sort the options by alphabetical order, upper case letter right
4429 before its lower case.
4431 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4433 Change %merge result type clash warnings to errors. Discussed at
4434 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
4435 * src/reader.c (record_merge_function_type): Use complain_at.
4436 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4437 declared later): Update test case results.
4439 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
4441 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
4442 to be in alphabetical order.
4443 (trace_args): Spelling fixes.
4445 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4447 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
4448 so they don't collide with user-defined macros.
4449 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
4450 this was never guaranteed, and now that we're using gnulib stdint,
4451 which defines int_fast16_t to long int, the problem is exposed.
4453 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
4455 * data/c.m4 (b4_basename): Simplify a bit, since we don't
4456 need the full POSIX semantics (and weren't implementing them
4459 Adjust to Autoconf 2.60 and today's gnulib.
4460 * bootstrap (gnulib_modules): Add stdint.
4461 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
4462 no longer copies it.
4463 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
4464 since stdint needs the former and wcwidth (which is now required
4465 by mbswidth) needs the latter.
4466 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
4467 work around a compatibility glitch between gettext 0.14.6 and
4469 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
4470 Do not check for uintptr_t, since new stdint module does the right
4472 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
4473 Add stdint.h, stdint_.h, wcwidth.h.
4474 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
4475 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
4476 stdint.m4, wchar_t.m4, wcwidth.m4.
4477 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
4478 usual order for ../lib/*.h files.
4479 (file_name_split): Use last_component, not base_name, to adjust
4481 * src/parse-gram.h: Include <strverscmp.h> in the usual order
4482 for ../lib/*.h files.
4483 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
4484 Define unconditionally, since we now assume the stdint module.
4485 * src/scan-skel.l: Include <dirname.h>.
4486 (BASE_QPUTS): Use last_component, not base_name.
4487 * src/system.h: Include <unlocked-io.h> in the usual order
4488 for ../lib/*.h files. Include <stdint.h> unconditionally,
4489 since we now use the stdint module.
4490 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
4491 HAVE_UINTPTR_T, since we now use the stdint module.
4492 (base_name): Remove decl, since files now include <dirname.h>
4495 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
4497 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
4499 * data/yacc.c, data/glr.c, data/location.cc: Use them.
4500 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
4502 * tests/calc.at: Adjust.
4504 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
4506 * data/c.m4 (b4_basename): New.
4507 (b4_syncline): Also output the location of its invocation (from
4509 (b4_user_action, b4_define_user_action, b4_user_actions)
4510 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4511 (b4_user_stype): New.
4512 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4514 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4516 In the grammar file, the first column is 1 not 0 on the first line as
4517 on every other line.
4518 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4519 * tests/input.at (Torturing the Scanner): Update output.
4521 * src/scan-gram.l (scanner_cursor): Declare it static.
4523 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4525 In warnings, say "previous declaration" rather than "first
4527 * src/symtab.c (redeclaration): Do that here.
4528 * src/reader.c (record_merge_function_type): In the case of a result
4529 type clash, report the previous declaration rather than the very first
4530 one in the grammar file.
4531 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4532 declared later): Add a third declaration to check this behavior.
4533 * tests/input.at (Incompatible Aliases): Update output.
4535 2006-06-27 Akim Demaille <akim@epita.fr>
4537 * doc/Doxyfile.in: New.
4538 * doc/Makefile.am: Use it.
4539 * src/lalr.h, src/symtab.h: Initial doxygenation.
4541 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4543 Don't miss %merge result type warnings just because the LHS types are
4544 declared after the %merge. This continues the effort of the previous
4546 * src/reader.c (get_merge_function): Don't set the merger type yet.
4547 (record_merge_function_type): New function for setting the merger type
4548 and checking for clashes.
4549 (grammar_current_rule_merge_set): Set the location of the %merge for
4551 (packgram): Invoke record_merge_function_type for each rule now that
4552 all symbol type declarations have been parsed.
4553 * src/reader.h (merger_list.type_declaration_location): New member
4554 storing the location of the first %merge from which the type for this
4555 merging function was derived.
4556 * src/symlist.h (symbol_list.merger_declaration_location): New member
4557 storing the location of a rule's %merge, if any.
4558 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4559 declared later): New test to catch the error fixed by the above patch.
4561 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4563 Get action warnings (grammar_rule_check) right even when symbol
4564 declarations appear after the rules. Discussed at
4565 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4567 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4568 Don't mistake the type of $$ in a midrule to be that of its parent
4570 * src/reader.c (grammar_current_rule_end): Don't invoke
4571 grammar_rule_check yet since not all symbol declarations may have been
4573 (grammar_midrule_action): Likewise.
4574 Don't record whether the midrule's $$ has been used yet since actions
4575 haven't been translated yet.
4576 Record the midrule's parent rule and its RHS index within the parent
4578 (grammar_current_rule_action_append): Don't translate the action yet
4579 since not all symbol declarations may have been parsed yet and, thus,
4580 warnings about types for $$, $n, @$, and @n can't be reported yet.
4581 (packgram): Translate the action and invoke grammar_rule_check now that
4582 all symbol declarations have been parsed.
4583 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4584 after parsing the entire grammar file, the symbol list here in the case
4585 of a midrule is actually the midrule's empty RHS, so reference its
4586 parent rule's RHS where necessary.
4587 On the other hand, now that you can already know it's a midrule, you
4588 aren't forced to think $$ has the same type as its parent rule's $$.
4589 (handle_action_at): In the case of a midrule, reference the parent rule
4591 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4593 (symbol_list_length): Now that this is invoked after all rules have
4594 been parsed, a NULL symbol (rather than a NULL symbol list node)
4595 terminates a rule. symbol_list_print already does this correctly.
4596 * src/symlist.h (symbol_list.midrule_parent_rule,
4597 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4598 remember their relationships with their parents.
4599 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4600 fixed by the above patch.
4601 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4603 (Unused values): ... this old test case and...
4604 (Unused values before symbol declarations): ... this new test case.
4605 This one is the same as `Unused values' except that all symbol
4606 declarations appear after the rules in order to catch the rest of the
4607 errors fixed by the above patch.
4609 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4612 * src/reader.c (current_rule): Declare it static since it's no longer
4613 used outside this file.
4614 (grammar_current_rule_action_append): Remove redundant arguments from
4615 translate_rule_action invocation.
4616 * src/reader.h (current_rule): Remove this unused extern.
4617 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4618 * src/scan-code.l (translate_rule_action): Likewise.
4620 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4622 Clean up yesterday's patch.
4623 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4625 * src/reader.c (grammar_current_rule_action_append): ... here for
4626 consistency with grammar_current_rule_symbol_append.
4627 * tests/regression.at (Braced code in declaration in rules section):
4628 Make yyerror and yylex static as usual.
4630 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4632 Fix bug that mistakes braced code in a declaration in the rules section
4633 to be a rule action. Mentioned at
4634 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4635 * src/scan-gram.l: Move midrule action detection from the start of the
4636 scanning of any braced code to...
4637 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4638 action. For readability, use $2 and @2 rather than the equivalent
4640 * tests/regression.at (Braced code in declaration in rules section):
4641 New test to catch the error fixed by the above patch.
4643 Work on code readability some.
4644 * src/scan-code.l (current_rule): Get rid of this misleading and
4645 redundant declaration: it's actually extern'ed in reader.h.
4646 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4647 translate_action): Add a rule argument and use it instead of the global
4649 (translate_rule_action): This already receives current_rule through an
4650 argument, so pass it on to translate_action instead of assigning
4651 current_rule to current_rule.
4652 (translate_symbol_action, translate_code): Pass rule = NULL to
4655 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4657 Rename %before-definitions to %start-header and %after-definitions to
4658 %end-header. Don't use these declarations to separate pre-prologue
4659 blocks from post-prologue blocks. Add new order-independent
4660 declarations %before-header and %after-header as alternatives to the
4661 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4662 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4663 * NEWS (2.3+): Update for these changes.
4664 * data/glr.c (b4_before_definitions): Update to...
4665 (b4_start_header): ... this.
4666 (b4_after_definitions): Update to...
4667 (b4_end_header): ... this.
4668 * data/glr.cc: Likewise.
4669 * data/lalr1.cc: Likewise.
4670 * data/yacc.c: Likewise.
4671 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4672 prologue blocks with %*-header declarations.
4673 (Calc++ Parser): Likewise.
4674 (Decl Summary): Update names.
4675 (Table of Symbols): Update description.
4676 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4677 (PERCENT_END_HEADER): ... this.
4678 (PERCENT_BEFORE_DEFINITIONS): Update to...
4679 (PERCENT_START_HEADER): ... this.
4680 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4681 (declaration): Update token names and m4 macro names.
4682 When parsing %end-header and %start-header, invoke translate_code
4683 before muscle_code_grow, and no longer set global booleans to remember
4684 whether these declarations have been seen.
4685 Parse new %after-header and %before-header.
4686 * src/reader.c (before_definitions, after_definitions): Remove.
4687 (prologue_augment): Accept a new bool argument to specify whether to
4688 augment the pre-prologue or post-prologue.
4689 * src/reader.h (before_definitions, after_definitions): Remove these
4691 (prologue_augment): Add new bool argument.
4692 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4693 (PERCENT_END_HEADER): ... this.
4694 (PERCENT_BEFORE_DEFINITIONS): Update to...
4695 (PERCENT_START_HEADER): ... this.
4696 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4697 * tests/actions.at (Printers and Destructors): Update names.
4699 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4701 Add comparison operators for C++ location classes. Discussed at
4702 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4703 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4704 declaration indicating whether filename_type has an operator==. If
4705 filename_type is `std::string', it defaults to `1', `0' otherwise.
4706 * data/location.cc: Iff b4_define_location_comparison is `1', add
4707 operator== and operator!= for class position and for class location.
4710 * src/scan-action.l: Remove unused file.
4711 * src/symtab.c (symbol_printer_set): Use printer_location not
4712 destructor_location.
4713 * src/symtab.h (struct symbol): Replace incorrect source comment for
4715 * tests/input.at (Incompatible Aliases): Update output with correct
4718 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4720 Don't put the pre-prologue in the header file. For the yacc.c code
4721 file and the glr.c header and code files, move the pre-prologue before
4722 the token definitions. Add new %before-definitions and
4723 %after-definitions to declare code that will go in both the header file
4724 and code file. Discussed at
4725 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4726 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4728 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4729 * NEWS (2.3+): Describe these changes.
4730 * data/glr.c (b4_pre_prologue): Move from within to before...
4731 (b4_shared_declarations): ... this.
4732 Add new b4_before_definitions before b4_token_enums.
4733 Add new b4_after_definitions at the end.
4734 * data/glr.cc (b4_pre_prologue): Replace with...
4735 (b4_before_definitions): ... this in the header file.
4736 (b4_after_definitions): New near the end of the header file.
4737 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4738 code file right before including the header file.
4739 (b4_before_definitions): New in the previous position of
4740 b4_pre_prologue in the header file.
4741 (b4_after_definitions): New near the end of the header file.
4742 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4743 (b4_token_enums_defines): In the code file, move to right before
4744 YYSTYPE for consistency with the header file.
4745 (b4_before_definitions): New right before b4_token_enums_defines in
4746 both the header and code file.
4747 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4748 header and code file.
4749 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4750 of prologues for %union dependencies.
4751 (Decl Summary): In %defines description, mention the effect of
4752 %before-definitions and %after-definitions on the header file.
4753 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4754 than in the pre-prologue so that make check succeeds.
4755 (Table of Symbols): Add entries for %before-definitions and
4757 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4758 %before-definitions.
4759 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4760 (declaration): Parse those declarations and append to
4761 b4_before_definitions and b4_after_definitions, respectively.
4762 * src/reader.c (before_definitions, after_definitions): New bools to
4763 track whether those declarations have been seen.
4764 (prologue_augment): Add to the post-prologue if %union,
4765 %before-definitions, or %after-definitions has been seen.
4766 * src/reader.h (before_definitions, after_definitions): New extern's.
4767 * src/scan-gram.l: Scan the new declarations.
4768 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4769 prologue block in a %before-definitions or a %after-definitions based
4770 on whether the %union is declared.
4771 * tests/regression.at (Early token definitions with --yacc, Early token
4772 definitions without --yacc): Move tests for token definitions into the
4773 post-prologue since token names are no longer defined in the
4776 2006-06-20 Akim Demaille <akim@epita.fr>
4778 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4779 (symbol_get): Use it.
4780 * src/parse-gram.y: Use it.
4782 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4784 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4785 build succeeds when configured with --enable-gcc-warnings.
4787 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4789 * src/parse-gram.y (char_name): New function.
4790 (CHAR, STRING, string_content): For %printer, properly escape.
4791 (ID): Prefer fputs to fprintf.
4792 (id): Reindent to be consistent with other rules.
4793 Properly quote char.
4795 The Translation Project changed its way of publishing translations
4796 to maintainers. I haven't received any responses to my request
4797 for supporting the old way, or for documenting the new way. I
4798 have modified 'bootstrap' to use screen scraping
4799 (in this case, HTML scraping). This is unreliable and inelegant,
4800 but I don't see any better way. Yuck.
4801 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4802 (get_translations): New function, which uses HTML scraping to
4803 deduce locations of latest translations.
4804 Use this function to grab both bison and bison-runtime .po files.
4805 Don't bother priming the pump for the runtime-po domain any more,
4806 as it's now translated better than bison is.
4808 2006-06-19 Akim Demaille <akim@epita.fr>
4810 * src/scan-gram.l: No longer "parse" things after `%union' until
4811 `{'. Rather, return a single "%union" token.
4812 No longer make symbols: return strings, and leave the conversion
4813 to symbols to the parser.
4814 (SC_PRE_CODE, token_type): Remove.
4815 * src/parse-gram.y (%union): New field `character'.
4818 (ID, ID_COLON): Now that the scanner no longer makes them
4819 identifiers, adjust all uses to invoke symbol_get.
4820 (id_colon): New, wraps the conversion from string to symbol.
4821 (%union): Accept a possible union_name.
4822 (symbol): Now can be a char.
4823 * data/c.m4 (b4_union_name): Leave a default value.
4824 * data/glr.c, data/yacc.c: Use it.
4826 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4828 For associating token numbers with token names for "yacc.c", don't use
4829 #define statements unless `--yacc' is specified; always use enum
4830 yytokentype. Most important discussions start at:
4831 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4832 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4834 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4835 * NEWS (2.3+): Mention.
4836 * data/c.m4 (b4_yacc_if): New.
4837 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4839 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4840 on token name definitions.
4841 * src/getargs.c (usage): Capitalize `Yacc' in English.
4842 * src/output.c (prepare): Define b4_yacc_flag.
4843 * tests/regression.at (Early token definitions): Test that tokens names
4844 are defined before the pre-prologue not just before the post-prologue.
4845 Remove this test case and copy to...
4846 (Early token definitions with --yacc): ... this to test #define's.
4847 (Early token definitions without --yacc): ... and this to test enums.
4849 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4851 * NEWS: Reword the post-2.3 change to not be so optimistic about
4852 removing the old "look-ahead" spelling.
4853 Update previous look-ahead/lookahead change reports.
4854 * REFERENCES: look-ahead -> lookahead (since that's
4855 what he actually wrote).
4856 * doc/refcard.tex: look ahead -> lookahead,
4857 look-ahead -> lookahead
4859 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4861 For consistency, use `lookahead' instead of `look-ahead' or
4862 `look_ahead'. Discussed starting at
4863 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4865 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4866 * NEWS: For the next release, note the change to `--report'.
4867 * TODO, doc/bison.1: Update English.
4868 * doc/bison.texinfo: Update English.
4869 (Understanding Your Parser, Bison Options): Document as
4870 `--report=lookahead' rather than `--report=look-ahead'.
4871 * src/conflicts.c: Update English in comments.
4872 (lookahead_set): Rename from look_ahead_set.
4873 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4874 (resolve_sr_conflict): Rename local look_ahead_tokens to
4875 lookahead_tokens, and update other uses.
4876 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4877 count_rr_conflicts, conflicts_free): Update uses.
4878 * src/getargs.c (report_args): Move "lookahead" before alternate
4880 (report_types): Update uses.
4881 (usage): For `--report' usage description, state `lookahead' spelling
4882 rather than `look-ahead'.
4883 * src/getargs.h (report.report_lookahead_tokens): Rename from
4884 report_look_ahead_tokens.
4885 * src/lalr.c: Update English in comments.
4886 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4887 (state_lookahead_tokens_count): Rename from
4888 state_look_ahead_tokens_count.
4889 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4890 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4891 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4893 Update English in output.
4894 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4895 * src/print.c: Update English in comments.
4896 (lookahead_set): Rename from look_ahead_set.
4897 (print_reduction): Rename argument lookahead_token from
4899 (print_core, state_default_rule, print_reductions, print_results):
4901 * src/print_graph.c: Update English in comments.
4902 (print_core): Update uses.
4903 * src/state.c: Update English in comments.
4904 (reductions_new): Update uses.
4905 (state_rule_lookahead_tokens_print): Rename from
4906 state_rule_look_ahead_tokens_print, and update other uses.
4907 * src/state.h: Update English in comments.
4908 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4909 (state_rule_lookahead_tokens_print): Rename from
4910 state_rule_look_ahead_tokens_print.
4911 * src/tables.c: Update English in comments.
4912 (conflict_row, action_row): Update uses.
4913 * tests/glr-regression.at
4914 (Incorrect lookahead during deterministic GLR,
4915 Incorrect lookahead during nondeterministic GLR): Rename
4916 print_look_ahead to print_lookahead.
4917 * tests/torture.at: Update English in comments.
4918 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4919 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4920 (Many lookahead tokens): Update uses.
4921 * data/glr.c: Update English in comments.
4922 * lalr1.cc: Likewise.
4924 * src/conflicts.h: Likewise.
4925 * src/lalr.h: Likewise.
4926 * src/main.c: Likewise.
4927 * src/output.c: Likewise.
4928 * src/parse-gram.c: Likewise.
4929 * src/tables.h: Likewise.
4930 * tests/calc.at: Likewise.
4932 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4934 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4936 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4938 * TODO: Add request from Nelson H. F. Beebe to be able to install
4939 Bison without installing the yacc script.
4941 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4943 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4944 and yytext if they're already #define'd.
4945 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4946 * src/scan-code-c.c: ... here.
4947 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4950 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4952 Get Bison to build again when configured with --enable-gcc-warnings.
4953 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4955 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4956 loc argument as it shadows a global.
4957 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4960 * src/.cvsignore: Add scan-code.c.
4962 2006-06-07 Akim Demaille <akim@epita.fr>
4964 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4966 * src/scan-code.l: here.
4967 * tests/input.at (Torturing the Scanner): Fix another location
4970 2006-06-07 Akim Demaille <akim@epita.fr>
4972 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4974 2006-06-06 Akim Demaille <akim@epita.fr>
4976 Extract the parsing of user actions from the grammar scanner.
4977 As a consequence, the relation between the grammar scanner and
4978 parser is much simpler. We can also split "composite tokens" back
4980 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4981 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4983 * src/location.h, src/location.c (add_column_width)
4984 (location_compute): these.
4985 Fix the column count: the initial column is 0.
4986 (location_print): Be robust to ending column being 0.
4987 * src/location.h (boundary_set): New.
4988 * src/main.c: Adjust to scanner_free being renamed as
4990 * src/output.c: Include scan-code.h.
4991 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4993 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4994 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4995 which is now, again, a separate token.
4996 Adjust all dependencies.
4997 Whereever actions with $ and @ are used, use translate_code.
4998 (action): Remove this nonterminal which is now useless.
4999 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
5000 (grammar_current_rule_action_append): Use translate_code.
5001 (packgram): Bound check ruleno, itemno, and rule_length.
5002 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
5003 (last_string, last_braced_code_loc, max_left_semantic_context)
5004 (scanner_initialize, scanner_free, scanner_last_string_free)
5005 (gram_out, gram_lineno, YY_DECL_): Move to...
5006 * src/scan-gram.h: this new file.
5007 (YY_DECL): Rename as...
5009 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
5010 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5011 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5012 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5013 Move these declarations, and...
5014 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
5016 * src/flex-scanner.h: this new file.
5017 * src/scan-gram.l (rule_length, rule_length_overflow)
5018 (increment_rule_length): Remove.
5019 (last_braced_code_loc): Rename as...
5020 (gram_last_braced_code_loc): this.
5021 Adjust to the changes of the parser.
5022 Move all the handling of $ and @ into...
5023 * src/scan-code.l: here.
5024 * src/scan-gram.l (handle_dollar, handle_at): Remove.
5025 (handle_action_dollar, handle_action_at): Move to...
5026 * src/scan-code.l: here.
5027 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
5028 scan-code.h, scan-code-c.c, scan-gram.h.
5029 (EXTRA_bison_SOURCES): Add scan-code.l.
5030 (BUILT_SOURCES): Add scan-code.c.
5031 (yacc): Be robust to white spaces.
5033 * tests/conflicts.at, tests/input.at, tests/reduce.at,
5034 * tests/regression.at: Adjust the column numbers.
5035 * tests/regression.at: Adjust the error message.
5037 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5039 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5040 Use Akim's wording from
5041 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
5043 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5045 Between Bison releases, manually append `+' to the previous Bison
5046 release number, and use that as a signal to automatically print the
5047 ChangeLog's CVS Id keyword from --version. Discussed starting at
5048 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
5049 * ChangeLog: Add Id header.
5050 * configure.ac (AC_INIT): Append `+' to `2.3'.
5051 * src/.cvsignore: Add revision.c.
5052 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
5053 (BUILT_SOURCES): Add revision.c.
5054 (revision.c): New target rule. This file defines a new global variable
5055 named revision. It initializes it with either the Id from ChangeLog
5056 or, if VERSION doesn't contain `+', with the empty string.
5057 * src/getargs.c (version): Print the value of revision.
5058 * src/revision.h: Extern revision.
5060 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5062 * NEWS: Version 2.3.
5063 * configure.ac (AC_INIT): Likewise.
5065 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
5067 * data/glr.c (YYRECOVERING): Define to be a function-like macro
5068 with no arguments, not as an object-like macro. This is for
5069 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
5070 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
5071 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
5074 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
5076 * src/getargs.c (usage): Back out yesterday's modification of the
5077 --help output so that we don't have to wait for translation before
5080 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
5082 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
5083 Problem reported by Akim Demaille.
5085 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5087 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5089 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
5091 * data/yacc.c (yy_reduce_print): Omit trailing white space in
5092 generated source code. Problem reported by Frans Englich in
5093 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
5095 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
5097 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
5098 shell, not within 'make', so that 'make' by an ordinary builder
5099 (using GNU make) does not worry about configuring gzip. This also
5100 works around a bug reported independently by Keith Thompson and by
5101 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
5102 stderr rather than stdout, messing up the build logs.
5104 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5106 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
5107 to make sure that YYID will never be unused. This fixes a 'make
5108 maintainer-check' failure caused by the recent changes to the 'Trivial
5109 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
5111 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
5113 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5115 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
5116 state before an empty RHS is always resolved here. Only the location
5117 of that state is guaranteed to be resolved, and that's enough. This
5118 fixes the remaining bug reported by Derek M. Jones in
5119 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5120 * tests/glr-regression.at (Uninitialized location when reporting
5121 ambiguity): Test the above case.
5122 Also, the embedded comments in this test case claim it checks the case
5123 of an empty RHS that has inherited the initial location. However, the
5124 corresponding LHS was already resolved, so yyresolveLocations didn't
5125 actually have reason to modify it. Fix this by forcing
5126 nondeterministic operation at the beginning of the parse.
5128 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
5130 * data/c.m4 (b4_yy_symbol_print_generate):
5131 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
5132 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
5133 of the bugs reported today by Derek M Jones in
5134 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5135 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
5136 defined to be a type name without parens or brackets.
5137 (Location Type): Similarly for YYLTYPE.
5138 * tests/regression.at (Trivial grammars): Put in a test for this
5139 bug that will be caught by 'make maintainer-check' (though not,
5140 alas, by 'make check' unless your compiler is picky).
5142 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
5144 * NEWS: Version 2.2.
5145 * configure.ac (AC_INIT): Likewise.
5147 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
5149 * data/glr.c (yyreportTree): Make room in yystates for the state
5150 preceding the RHS. This fixes the segmentation fault reported by Derek
5152 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
5153 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
5154 to the user. Reported for yyreportTree by Derek M. Jones later in the
5156 * THANKS: Add Derek M. Jones.
5157 Update my email address.
5158 Fix typo in Steve Murphy's name.
5160 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
5162 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
5163 checking against YYLAST that caused the parser to miss a potential
5164 alternative in its diagnostic.
5165 Problem reported by Maria Jose Moron Fernandez in
5166 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
5167 * data/lalr1.cc (yysyntax_error_): Likewise.
5168 * data/yacc.c (yysyntax_error): Likewise.
5169 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
5170 tokens, in case we run into an older C compiler.
5171 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
5172 Use them to check for the off-by-one error fixed above.
5174 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
5175 YYSIZE_T, not size_t.
5176 * tests/regression.at (Trivial grammars): New test, to catch
5177 the error fixed by the above patch.
5179 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5181 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
5183 Reported by Steve Murphy.
5185 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5187 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
5188 * data/glr.cc: b4_location_flag is now b4_locations_flag.
5190 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5192 Implement --trace=m4.
5193 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
5194 * src/output.c (output_skeleton): When set, pass -dV to m4.
5196 Factor the handling of flags in m4.
5197 * src/output.c (prepare): Rename the muscle names debug, defines,
5198 error_verbose to debug_flag, defines_flag, error_verbose_flag.
5199 * data/c.m4: Adjust.
5200 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
5201 Use b4_define_flag_if to define other b4_FLAG_if macros.
5202 (b4_location_if): As a consequence, rename as...
5203 (b4_locations_if): this, for consistency.
5204 Adjust all the skeletons.
5206 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5208 * etc/bench.pm: Shorten bench names.
5210 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5212 * src/output.h, src/output.c (error_verbose): Move to...
5213 * src/getargs.h, src/getargs.c: here.
5215 Adjust dependencies.
5217 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
5219 * data/c.m4 (b4_copyright): Put the special exception for Bison
5220 skeletons here, so we don't have to put it in each skeleton. All
5221 uses changed. Suggested by Akim Demaille. Also, wrap the
5222 copyright notice, in case it is longer than 80 columns. Replace
5223 comma by newline after title.
5225 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
5227 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
5228 incompatibility, not a bug. Mention that it wasn't fixed as of
5231 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
5233 * examples/extexi: Enforce the precedence of concatenation over
5235 Reported by Tommy Nordgren.
5237 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
5239 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
5240 with the member "token".
5241 Reported by Martin Nylin.
5243 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
5245 * data/glr.c: Switch to Bison 2.2 special-exception language in
5246 the copyright notice. Use more-regular format for titles and
5248 * data/glr.cc: Likewise.
5249 * data/location.cc: Likewise.
5250 * data/yacc.cc: Likewise.
5251 * doc/bison.texinfo (Conditions): Document this.
5252 * NEWS: likewise. Upgrade version to 2.2.
5254 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
5256 * data/glr.cc: Remove dead code.
5258 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5260 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
5261 that variable and the line breaks the bootstrap. Problem reported
5262 by Juan M. Guerrero.
5264 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
5266 * doc/bison.texinfo (Multiple start-symbols): New.
5268 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
5270 * etc/README, etc/bench.pl: New.
5272 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
5274 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
5276 Reported by Mickael Labau.
5277 * tests/input.at (Torturing the Scanner): Test it.
5279 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
5281 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
5282 Problem reported by Bob Rossi.
5284 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
5286 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
5287 and didn't really work.
5288 For the index, use @ifnotinfo, not @iftex.
5289 Minor cleanups of spacing and terminology.
5291 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
5293 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
5294 of AT_NAME_PREFIX when %name-prefix is not used.
5296 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
5298 Apply --prefix to C++ skeletons too: they change the namespace.
5299 The test suite already exercize these cases.
5300 * data/c++.m4 (b4_namespace): New.
5301 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
5302 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
5303 * data/yacc.c, data/glr.c: Remove a useless `[]'.
5304 * doc/bison.texinfo: Document it.
5305 (Option Cross Key): Use @multitable in all formats. It looks
5306 nicer, even in TeX outputs.
5307 (Rules): Use the same code whatever the output type is.
5308 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
5309 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
5310 * tests/calc.at: Use it, instead of hard coding `yy'.
5312 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5314 * TODO: Remove dead items.
5316 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5318 * doc/FAQ: Remove, merged into...
5319 * doc/bison.texinfo (FAQ): this.
5320 * doc/Makefile.am (EXTRA_DIST): Adjust.
5322 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5324 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
5326 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
5327 * doc/bison.texinfo (Calc++ Scanner): Use it.
5329 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
5331 Fix two nits reported by twlevo, plus one more that I discovered.
5333 * src/assoc.h (assoc_to_string): Give a name to the arg, as
5334 this is the usual Bison style.
5335 * src/location.h (location_print): Likewise.
5337 * src/reader.h (token_name): Likewise.
5339 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5341 Fix some nits reported by twlevo.
5342 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
5343 and "POSIX". Use more-modern syntax for URLs. Mention C++
5344 and ask for Java. Don't hardwire OS version numbers. Add
5346 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
5347 * src/conflicts.c (solved_conflicts_obstack): Now static.
5349 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5351 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
5352 page. Say "you can use it" not "you may use it" as on the web page;
5353 we're describing capabilities not granting permission.
5355 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
5357 * data/glr.c (yyresolveLocations): Rename local variables to avoid
5358 shadowing warnings. Use usual patter for iterating through RHS.
5359 * tests/glr-regression.at
5360 (Uninitialized location when reporting ambiguity):
5361 Modify yylex so that it uses its argument, rather than trying
5362 to rely on ARGSUSED (which doesn't work for gcc with warnings).
5363 const char -> char const.
5365 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
5366 Don't use tabs inside commands; it messes up 'ps'.
5367 Problem reported by twlevo.
5369 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
5371 * tests/glr-regression.at (Uninitialized location when reporting
5372 ambiguity): New test case.
5373 * data/glr.c (yyresolveLocations): New function, which uses
5375 (yyresolveValue): Invoke yyresolveLocations before reporting an
5377 * doc/bison.texinfo (Default Action for Locations): Note
5378 YYLLOC_DEFAULT's usage for ambiguity locations.
5379 (GLR Semantic Actions): Cross-reference those notes.
5381 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
5383 * tests/glr-regression.at (Leaked semantic values when reporting
5384 ambiguity): Remove unnecessary union and type declarations.
5385 (Leaked lookahead after nondeterministic parse syntax error): New test
5387 * data/glr.c (yyparse): Check for zero stacks remaining before
5388 attempting to shift the lookahead so that you don't lose it.
5390 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5392 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
5393 * tests/glr-regression.at (Leaked semantic values when reporting
5394 ambiguity): New test case.
5395 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
5396 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
5397 now unnecessary yystackp parameter.
5398 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
5399 destructors can be called.
5401 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
5402 in existing testcases.
5404 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5406 Don't leak semantic values for parent RHS when a user action cuts the
5407 parser, and clean up related code a bit.
5408 * tests/glr-regression.at (Leaked merged semantic value if user action
5409 cuts parse): Rename to...
5410 (Leaked semantic values if user action cuts parse): ... this. Add check
5411 for leaked parent RHS values.
5412 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
5413 between an unresolved state (non-empty chain of semantic options) and
5414 an incomplete one (signaled by an empty chain).
5415 (yyresolveStates): Document the interface. Move all manipulation of a
5416 successfully or unsuccessfully resolved yyGLRState to...
5417 (yyresolveValue): ... here so that yyresolveValue always leaves a
5418 yyGLRState with consistent data and thus is easier to understand.
5419 Remove the yyvalp and yylocp parameters since they are always just
5420 taken from the yys parameter. When reporting a discarded merged value
5421 in debugging output, note that it is incompletely merged. Document the
5423 (yyresolveAction): If resolving any of the RHS states fails, destroy
5424 them all rather than leaking them. Thus, as long as user actions are
5425 written to clean up the RHS correctly, yyresolveAction always cleans up
5426 the RHS of a semantic option. Document the interface.
5428 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
5430 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
5431 led to a segmentation fault in GNU Pascal. Problem reported
5434 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
5436 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
5437 mid-rule action inside a nonterminal symbol in order to declare a
5438 destructor for its semantic value.
5440 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
5442 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
5443 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
5444 __cplusplus && ! defined _STDLIB_H && !
5445 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
5446 defined free))]: Include <stdlib.h> rather than rolling our own
5447 declarations of malloc and free, to avoid problems with
5448 incompatible declarations (using 'throw') C++'s stdlib.h. This
5449 should fix Debian bug 340012
5450 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
5451 reported by Guillaume Melquiond.
5453 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5455 * NEWS: Clarify symbols versus types in unused-value warnings.
5457 * configure.ac (AC_INIT): Bump version number.
5459 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5461 * NEWS: Version 2.1a.
5462 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
5463 since C99 requires this.
5465 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
5467 * m4/c-working.m4: New file.
5468 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
5470 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5472 * Makefile.maint: Merge from coreutils.
5474 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
5476 More portability fixes for problems summarized by Nelson H. F. Beebe.
5478 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
5479 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
5480 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
5481 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
5482 messes up because C++ code is compiled in 32-bit mode but linked
5485 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
5487 More portability fixes for problems summarized by Nelson H. F. Beebe.
5489 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
5490 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
5492 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
5493 nodist_PROGRAMS, since we don't need to actually compile the
5494 example if we're just doing a plain 'make'. This avoids bothering
5495 the installer unnecessarily about problems due to weird C++
5498 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
5500 More portability fixes for problems summarized by Nelson H. F. Beebe.
5502 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
5503 than #include "...", and compile with -I'.'. The old method was
5504 not portable, according to Posix and the C standard, and it does
5505 not work with Sun C 5.7, where previous #line directives affect
5506 the working directory used in later #include "..." directives.
5508 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5510 Various DJGGP specific issues in /djgpp
5512 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5514 More portability fixes for problems summarized by Nelson H. F. Beebe.
5516 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5517 '#include <map>' works and that you can apply ++ to iterators.
5519 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5521 Work around portability problems summarized by Nelson H. F. Beebe in
5522 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5524 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5525 that '#include <string>' works.
5527 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5528 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5529 "warning: sorry: semantics of inline function static data `const
5530 unsigned char translate_table[262]' are wrong (you'll wind up with
5533 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5534 or, xor to not_, and_, or_, and xor_, respectively. This works
5535 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5536 random system header somewhere that includes the equivalent of
5539 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5540 -E" works; it apparently doesn't work with PathScale EKO Compiler
5543 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5545 During deterministic GLR operation, user actions should be able to
5546 influence the parse by changing yychar. To make this easier to fix and
5547 to make glr.c easier to evolve in general, don't maintain yytoken in
5548 parallel with yychar; just compute yytoken when needed.
5549 * tests/glr-regression.at (Incorrect lookahead during deterministic
5550 GLR): Check that setting yychar in a user action has the intended
5552 * data/glr.c (yyGLRStack): Remove yytokenp member.
5553 (yyclearin): Don't set *yytokenp.
5554 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5555 yychar rather than *yytokenp to determine the current lookahead.
5556 Compute yytoken locally when needed.
5557 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5560 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5561 after `--report' documentation.
5563 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5565 * src/parse-gram.y (grammar_declaration): Location of printer
5566 symbol is @1, not list->location. Bug reported by twlevo.
5567 * tests/input.at (Incompatible Aliases): Adjust to above change.
5569 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5571 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5572 all the test at once. This makes the output easier to read in the
5575 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5576 got from <http://bro-ids.org/download.html>. The bug is that
5577 when two actions appeared in succession, the second one was
5578 scanned before the first one was added to the grammar rule
5579 as a midrule action. Bison then output the incorrect warning
5580 "parse.y:905.17-906.36: warning: unused value: $3".
5581 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5582 associated with a value.
5583 (rhs): Don't invoke grammar_current_rule_action_append.
5584 (action): Invoke it here instead.
5585 * src/reader.c (grammar_midrule_action): Now extern.
5586 (grammar_current_rule_action_append): Don't invoke
5587 grammar_midrule_action; that is now the scanner's job.
5588 * src/reader.h (last_string, last_braced_code_loc):
5589 (grammar_midrule_action): New decls.
5590 * src/scan-gram.l (last_string): Now extern, sigh.
5591 (last_braced_code_loc): New extern variable.
5592 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5593 rule already has an action.
5594 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5595 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5596 Add some tests to check that the above changes fixed the bug.
5598 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5600 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5601 All used changed. Check whether the symbol has a destructor,
5602 not whether it is typed.
5603 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5604 that the values are still reported as unused. All line numbers
5607 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5609 Work around a bug in bro 0.8, which underparenthesizes its
5610 definition of YYLLOC_DEFAULT.
5611 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5613 * data/lalr1.cc: Likewise.
5614 * data/yacc.cc: Likewise.
5616 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5618 Work around a bug in Pike 7.0, and give the Pike folks a
5619 better way to override the usual int widths.
5620 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5621 user can override the types.
5622 (short): #undef, to work around a bug in Pike 7.0.
5623 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5624 (union yyalloc.yyss): Use yytype_int16 rather than short.
5626 (yysigned_char): Remove.
5627 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5628 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5629 * tests/regression.at (Web2c Actions): Adjust to above changes.
5631 * src/reader.c (check_and_convert_grammar): New function.
5632 (reader): Close the input file even if something went wrong during
5633 parsing. Minor file descriptor leak reported by twlevo.
5635 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5636 to pacify gcc -Wswitch-default.
5637 * src/scan-gram.l (adjust_location): Use a default: break; case
5638 to pacify gcc -Wswitch-default.
5639 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5640 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5641 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5642 Move these decls to scan-skel.l, since they don't need to be
5644 * src/scan-skel.l: Accept the above decls.
5645 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5648 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5650 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5651 since we don't want to insist on a version number at the start
5652 of the changelog every time.
5653 * Makefile.maint: Sync from coreutils a bit better.
5654 (sc_trailing_blank): Renamed from sc_trailing_space.
5656 (sc_no_if_have_config_h, sc_require_config_h):
5657 (sc_prohibit_assert_without_use): New rules.
5658 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5659 (sc_dd_max_sym_length): Fix leading spaces in rule.
5660 (sc_system_h_headers): Prefix with @.
5661 (sc_useless_cpp_parens, m4-check): Output line numbers.
5662 (changelog-check): Allow version only in head.
5663 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5664 satisfy new Makefile.maint rule.
5665 * data/glr.c: Likewise.
5666 * data/glr.cc: Likewise.
5667 * data/lalr1.cc: Likewise.
5668 * data/yacc.c: Likewise.
5669 * lib/ebitsetv.c: Likewise.
5670 * lib/lbitset.c: Likewise.
5671 * lib/subpipe.c: Likewise.
5672 * lib/timevar.c: Likewise.
5673 * src/system.h: Likewise.
5674 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5675 * djgpp/Makefile.maint: Add copyright notice.
5676 * djgpp/README.in: Likewise.
5677 * djgpp/config.bat: Likewise.
5678 * djgpp/config.site: Likewise.
5679 * djgpp/config_h.sed: Likewise.
5680 * djgpp/djunpack.bat: Likewise.
5681 * djgpp/config.sed: Fix copyright notice to match standard format.
5682 * djgpp/subpipe.h: Likewise.
5683 * lib/bitsetv-print.c: Likewise.
5684 * lib/bitsetv.c: Likewise.
5685 * lib/subpipe.h: Likewise.
5686 * lib/timevar.c: Likewise.
5687 * lib/timevar.h: Likewise.
5688 * djgpp/subpipe.c: Use standard recipe for config.h.
5689 * lib/abitset.c: Likewise.
5690 * lib/bitset.c: Likewise.
5691 * lib/bitset_stats.c: Likewise.
5692 * lib/bitsetv-print.c: Likewise.
5693 * lib/bitsetv.c: Likewise.
5694 * lib/ebitsetv.c: Likewise.
5695 * lib/get-errno.c: Likewise.
5696 * lib/lbitset.c: Likewise.
5697 * lib/subpipe.c: Likewise.
5698 * lib/timevar.c: Likewise.
5699 * lib/vbitset.c: Likewise.
5700 * tests/local.at: Likewise.
5701 * src/scan-gram.l: Don't include verify.h, since system.h does
5703 * .x-sc_require_config_h: New file.
5704 * .x-sc_unmarked_diagnostics: New file.
5706 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5708 Be a bit more systematic about using 'abort'.
5709 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5710 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5711 Put 'default: abort ();' before some other case, to satisfy older
5713 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5714 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5715 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5716 * src/conflicts.c (resolve_sr_conflict): Likewise.
5717 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5718 (get_decision_str, get_orientation_str, get_node_alignment_str):
5719 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5720 (get_linestyle_str, get_arrowstyle_str): Likewise.
5721 * src/conflicts.c (resolve_sr_conflict):
5722 Use a default case rather than one for the one remaining enum
5723 value, to catch invalid enum values as well.
5724 * src/lalr.c (set_goto_map, map_goto):
5725 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5726 * src/nullable.c (nullable_compute, token_definitions_output):
5728 * src/reader.c (packgram, reader): Likewise.
5729 * src/state.c (transitions_to, state_new, state_reduction_find):
5731 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5732 (symbol_pack): Likewise.
5733 * src/tables.c (conflict_row, pack_vector): Likewise.
5734 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5735 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5736 * src/system.h: Don't include <assert.h>.
5737 (assert): New macro.
5739 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5740 (Destructor Decl, Parser Function, Pure Calling):
5741 Describe rules for braces inside C code more carefully.
5743 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5745 Fix some porting glitches found by Nelson H. F. Beebe.
5746 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5747 compilers that don't understand that abort () does not return.
5748 * src/state.c (transitions_to): Likewise.
5749 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5750 that '#include <cstdlib>' works.
5751 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5752 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5753 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5754 for the benefit of some pre-C99 compilers.
5756 * bootstrap: Undo changes to gnulib files that autoreconf made.
5758 Minor fixups to get 'make maintainer-check' to work.
5759 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5760 with the new verify.h implementation.
5761 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5762 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5763 * data/yacc.c (YYUSE): Likewise.
5764 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5765 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5766 * src/parse-gram.y (declaration): Don't pass a string constant
5767 to a function that expects char *, since GCC might complain
5768 about the constant value.
5769 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5770 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5771 before #defining them.
5772 * tests/glr-regression.at
5773 (Incorrectly initialized location for empty right-hand side in GLR):
5774 In yyerror, use the msg arg.
5775 (Corrupted semantic options if user action cuts parse):
5776 (Incorrect lookahead during deterministic GLR):
5777 (Incorrect lookahead during nondeterministic GLR):
5778 Don't name a local var 'index'; it shadows string.h's 'index'.
5780 2006-01-19 Akim Demaille <akim@epita.fr>
5782 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5783 location, not just parts of it.
5785 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5787 * NEWS: Document the fact that multiple %unions are now allowed.
5788 * doc/bison.texinfo (Union Decl): Likewise.
5789 * TODO: This feature is now implemented, so remove it from
5792 * Makefile.maint: Merge with coreutils Makefile.maint.
5793 (CVS_LIST): Use build-aux version if available.
5794 (VERSION_REGEXP): New macro.
5795 (syntax-check-rules): Add sc_no_if_have_config_h,
5796 sc_prohibit_assert_without_use, sc_require_config_h,
5797 sc_useless_cpp_parens.
5798 (sc_obsolete_symbols): Check for O_NDELAY.
5799 (sc_dd_max_sym_length): Track coreutils.
5800 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5801 (sc_useless_cpp_parens): New rule.
5802 (news-date-check): Look for version or today's date.
5803 (changelog-check): Don't require version number near head.
5804 (copyright-check): Use current year instead of hardwiring 2005.
5805 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5806 (announcement): Add --gpg-key-ID.
5808 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5811 Avoid undefined behavior that addressed just before the start of an
5812 array. Problem reported by twlevo.
5813 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5814 * src/lalr.c (build_relations): Rely on new sentinel.
5815 * src/gram.c (gram_free): Adjust to new sentinel.
5817 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5819 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5820 yylookaheadNeeds. All uses updated.
5821 (yysplitStack): Rename local yynewLookaheadStatuses to
5822 yynewLookaheadNeeds.
5823 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5824 GLR): In comments, change `lookahead status' to `lookahead need'.
5826 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5828 * data/glr.c (yysplitStack): A little stylistic rewrite.
5830 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5832 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5834 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5836 * doc/bison.texinfo: Fix some typos.
5837 (GLR Semantic Actions): New subsection discussing special
5838 considerations because GLR semantic actions might be deferred.
5839 (Actions): Mention look-ahead usage of yylval.
5840 (Actions and Locations): Mention look-ahead usage of yylloc.
5841 (Special Features for Use in Actions): Add YYEOF entry and mention it
5842 in the yychar entry.
5843 In the yychar entry, remove mention of the local yychar case (pure
5844 parser) since this is irrelevant information when writing semantic
5845 actions and since it's already discussed in `Table of Symbols' where
5846 yychar is otherwise described as an external variable.
5847 In the yychar entry, don't call it the `current' look-ahead since it
5848 isn't when semantic actions are deferred.
5849 In the yychar and yyclearin entries, add note about deferred semantic
5851 Add yylloc and yylval entries discussing look-ahead usage.
5852 (Look-Ahead Tokens): When discussing yychar, don't call it the
5853 `current' look-ahead, and do mention yylval and yylloc.
5854 (Error Recovery): Cross-reference `Action Features' when mentioning
5856 (Table of Symbols): In the yychar entry, don't call it the `current'
5858 In the yylloc and yylval entries, mention look-ahead usage.
5860 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5862 * tests/glr-regression.at: Update copyright year to 2006.
5864 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5866 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5867 use during nondeterministic operation to track which stacks have
5868 actually needed the current lookahead.
5869 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5870 Allocate, deallocate, resize, and otherwise shuffle space for
5871 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5872 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5873 appropriately during nondeterministic operation.
5874 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5875 members to store the current lookahead to be used by the deferred
5877 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5878 from which the RHS is taken. Set the lookahead members of the new
5879 yySemanticOption according to the lookahead status for stack yyk.
5880 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5881 yyaddDeferredAction.
5882 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5883 members of yySemanticOption before invoking yyuserAction, and then set
5884 them back to their current values afterward.
5885 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5886 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5887 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5888 titles for consistency.
5889 (Leaked merged semantic value if user action cuts parse): In order to
5890 suppress lint warnings, use arguments in merge function, and assign
5891 char value < 128 in main.
5892 (Incorrect lookahead during deterministic GLR): New test case.
5893 (Incorrect lookahead during nondeterministic GLR): New test case.
5895 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5897 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5898 !yyvaluep as signal that no semantic value is available to print.
5899 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5900 to print a semantic value.
5902 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5904 * tests/glr-regression.at: For consistency with my newer test cases,
5907 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5909 * data/glr.c (yyresolveValue): When merging semantic options, if at
5910 least one user action succeeds but a later one cuts the parse, then
5911 destroy the semantic value before returning rather than leaking it.
5912 (yyresolveStates): If a user action cuts the parse and thus
5913 yyresolveValue fails, ignore the (unset) semantic value rather than
5914 corrupting the yyGLRState, and empty the semantic options list since
5915 the user actions should have called all necessary destructors.
5916 Simplify code with YYCHK.
5917 * tests/glr-regression.at (Corrupted semantic options if user action
5918 cuts parse): New test case.
5919 (Undesirable destructors if user action cuts parse): New test case.
5920 Before applying any of this patch, this test case never actually failed
5921 for me... but only because the corrupted semantic options usually
5923 (Leaked merged semantic value if user action cuts parse): New test
5926 2006-01-05 Akim Demaille <akim@epita.fr>
5928 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5930 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5932 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5933 _MSC_VER. Problem reported by Cenzato Marco.
5934 (b4_c_function_def): Use it.
5935 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5937 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5938 than rolling our own.
5940 2006-01-04 Akim Demaille <akim@epita.fr>
5942 Also warn about non-used mid-rule values.
5943 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5945 (symbol_list_new): Adjust.
5946 * src/reader.c (symbol_typed_p): New.
5947 (grammar_rule_check): Use it.
5948 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5950 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5952 * tests/actions.at (Exotic Dollars): Adjust.
5954 2006-01-04 Akim Demaille <akim@epita.fr>
5956 * src/reader.c (grammar_midrule_action): If $$ is set in a
5957 mid-rule, move the `used' bit to its lhs.
5958 * tests/input.at (Unused values): New.
5959 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5961 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5963 * doc/bison.texinfo (Bison Options): Say more accurately what
5965 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5966 about declarations in the grammar when in Yacc mode, as POSIX does
5967 not require a diagnostic when the grammar uses extensions.
5969 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5971 Warn about dubious constructions like "%token T T".
5973 * src/symtab.h (struct symbol.declared): New member.
5974 * src/symtab.c (symbol_new): Initialize it to false.
5975 (symbol_class_set): New arg DECLARING, specifying whether
5976 this is a declaration that we want to warn about, if there
5977 is more than one of them. All uses changed.
5979 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5980 Allow multiple %union directives, whose contents concatenate.
5981 * src/parse-gram.y (grammar_declaration): Likewise.
5982 Use muscle_code_grow, so that we don't need stype_line any more.
5985 * src/muscle_tab.c (muscle_grow): Fix comment.
5987 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5988 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5989 Update copyright year to 2006.
5991 2006-01-03 Akim Demaille <akim@epita.fr>
5993 Have glr.cc pass (some of) the calc.at tests.
5994 * data/glr.cc (b4_parse_param_orig): New.
5995 (b4_parse_param): Improve its definition, and bound it more
5996 clearly in the skeleton.
5997 (b4_epilogue): Append, instead of prepending, in order to keep
5999 Simplify the generation of auxiliary functions: locations and
6000 purity are mandated.
6001 (b4_global_tokens_and_yystype): Honor it.
6002 * data/location.cc (c++.m4): Don't include it.
6003 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
6005 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
6007 Be sure to initialize the first position's filename.
6008 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
6010 (AT_CHECK_CALC_GLR_CC): New.
6011 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
6013 2006-01-02 Akim Demaille <akim@epita.fr>
6015 * src/output.c (output_skeleton): Don't hard wire the inclusion of
6017 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
6018 * data/glr.cc: Do not include stack.hh.
6020 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6022 * data/glr.c: Reformat whitespace with tabs.
6023 (b4_lpure_formals): Remove this unused m4 macro.
6024 * tests/cxx-type.at: Reformat whitespace with tabs.
6025 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
6026 since it's a member. Rename type to isNterm for clarity.
6028 2005-12-29 Akim <akim@sulaco.local>
6030 Let glr.cc catch up with symbol_value_print.
6031 * data/glr.cc (b4_yysymprint_generate): Replace by...
6032 (b4_yy_symbol_print_generate): this.
6033 (yy_symbol_print, yy_symbol_value_print): Declare them.
6035 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
6037 * src/location.h (boundary): Note that a line or column equal
6038 to INT_MAX indicates an overflow.
6039 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
6040 (rule_length_overflow, increment_rule_length, add_column_width):
6042 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
6043 (<SC_BRACED_CODE>"}"):
6044 Use increment_rule_length rather than incrementing it by hand.
6045 (adjust_location, handle_syncline): Diagnose overflow.
6046 (handle_action_dollar, handle_action_at):
6047 Fix bug with monstrosities like $-2147483648.
6048 Remove now-unnecessary checks.
6049 (scan_integer): Verify assumptions and remove now-unnecessary checks.
6050 (convert_ucn_to_byte): Verify assumptions.
6051 (handle_syncline): New arg LOC. All callers changed.
6052 Don't store through a value derived from char const * pointer.
6054 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
6057 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
6059 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
6060 Remove unnecessary forward static decls.
6062 2005-12-27 Akim Demaille <akim@epita.fr>
6064 * src/reader.c (grammar_current_rule_check): Also check that $$
6066 Take the rule to check as argument, hence rename as...
6067 (grammar_rule_check): this.
6068 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
6070 (grammar_rule_begin, grammar_rule_end): these, for consistency.
6071 (grammar_midrule_action, grammar_symbol_append): Now static.
6072 * tests/torture.at (input): Don't rely on the default action
6073 being always performed.
6074 * tests/calc.at: "Set" $$ even when the action is "cut" with
6076 * tests/actions.at (Exotic Dollars): Instead of using unused
6077 values, check that the warning is issued.
6079 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
6081 * NEWS: Improve wording for unused-value warnings.
6083 2005-12-22 Akim Demaille <akim@epita.fr>
6085 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
6086 (b4_yysymprint_generate): Rename as...
6087 (b4_yy_symbol_print_generate): this.
6088 Generate yy_symbol_print instead of yysymprint.
6089 Generate also yy_symbol_value_print, and use it.
6091 2005-12-22 Akim Demaille <akim@epita.fr>
6093 * NEWS: Warn about unused values.
6094 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
6096 (symbol_list_n_get, symbol_list_n_used_set): New.
6097 (symbol_list_n_type_name_get): Use symbol_list_n_get.
6098 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
6099 * src/reader.c (grammar_current_rule_check): Check that values are
6101 * src/symtab.c (symbol_print): Accept 0.
6102 * tests/existing.at: Remove the type information.
6104 Remove useless actions (beware of mid-rule actions: perl -000
6105 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
6106 * tests/actions.at (Exotic Dollars): Use unused values.
6107 * tests/calc.at: Likewise.
6108 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6111 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
6114 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
6116 Undo 2005-12-01 tentative license wording change. The wording is
6117 still being reviewed by the lawyers, and we don't want to wait for
6118 them before publishing a test release. For now, revert to the
6120 * NEWS: Undo 2005-12-01 change.
6121 * data/glr.c: Revert to previous license wording.
6122 * data/glr.cc: Likewise.
6123 * data/lalr1.cc: Likewise.
6124 * data/location.cc: Likewise.
6125 * data/yacc.c: Likewise.
6127 * NEWS: Reword %destructor vs YYABORT etc.
6128 * data/glr.c: Use American spacing, for consistency.
6129 * data/glr.cc: Likewise.
6130 * data/lalr1.cc: Likewise.
6131 * data/yacc.c: Likewise.
6132 * data/yacc.c: Reformat comments slightly.
6133 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
6134 for consistency. Fix some spelling errors and reword recently-included
6136 * tests/cxx-type.at: Cast results of malloc, for C++.
6138 2005-12-21 Joel E. Denny <address@hidden>
6140 * tests/cxx-type.at: Construct a tree, count the parents of shared
6141 nodes, and free each node once and only once. Previously, the memory
6142 for semantic values was leaked instead.
6144 2005-12-21 Joel E. Denny <address@hidden>
6146 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
6147 (yylval, yylloc): If pure, #define to yystackp->yyval and
6148 yystackp->yyloc similar to yychar and yynerrs.
6149 (yyparse): If pure, remove local yylval and yylloc. Add local
6150 yystackp to accommodate pure definitions of yylval and yylloc.
6151 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
6152 yylvalp and yyllocp to &yylval and &yylloc.
6153 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
6154 namespace. Previously, nerrs and char were missing, but lval and lloc
6156 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
6157 yylvalp and yyllocp parameters since, if pure, these are now always
6158 accessible through yystackp. If not pure, they are still accessible
6160 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
6161 `if (YYID (N))' to pacify lint.
6163 2005-12-21 Akim Demaille <akim@epita.fr>
6165 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
6166 destroy the RHS symbols of a rule.
6167 * data/yacc.c (yylen): Initialize to 0.
6168 Keep its value to the number of items to possibly shift.
6169 In particular, a regular successful parse that ends on YYFINAL by
6170 a (internal) YYACCEPT must not have yylen != 0.
6171 (yyerrorlab, yyreturn): Pop the RHS.
6172 Reorder a bit to emphasize the `shifting' bits of code.
6173 (YYPOPSTACK): Now accept a number of items to pop.
6174 * data/lalr1.cc: Likewise.
6175 * data/glr.c: Formatting changes.
6176 Use goto instead of fall through.
6177 * doc/bison.texinfo (Destructor Decl): Complete.
6179 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6181 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6182 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
6183 * djgpp/config.bat: Replace every occurence of the file name
6184 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6185 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6186 * djgpp/config.sed: Replace every occurence of the file name
6187 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6188 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6189 * djgpp/djunpack.bat: DJGPP specific file.
6190 * djgpp/fnchange.lst: DJGPP specific file.
6191 * djgpp/README.in: Add new information about how to unpack the bison
6192 source on MSDOS and other systems which have 8.3 file name restrictions
6193 using djunpack.bat and fnchange.lst.
6195 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6197 * bootstrap (build_cvs_prefix): Remove; unused.
6198 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
6199 when getting gnulib.
6201 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
6203 * data/glr.c: Reorder typedef declarations for structs to match order
6204 of struct declarations.
6205 Rename yystack everywhere to yystackp except in yyparse where it's not
6207 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
6209 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
6210 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
6211 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
6214 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6216 * tests/sets.at (Accept): Fix typos in regular expression used to
6217 sed out the final state number.
6219 Work around portability problem on Solaris 10: flex-generated
6220 files include <stdio.h> before <config.h>, which messes up
6221 because the latter defines __EXTENSIONS__. Address the problem
6222 by creating two new little files that include <config.h> first,
6223 then include the flex-generated files. Rewrite everyone else
6224 to include <config.h> first, as well.
6225 * lib/timevar.c: Always include "config.h".
6226 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
6227 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
6228 (EXTRA_bison_SOURCES): New macro.
6229 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
6230 * src/system.h: Don't include config.h.
6231 * src/LR0.c: Include <config.h> first.
6232 * src/assoc.c: Likewise.
6233 * src/closure.c: Likewise.
6234 * src/complain.c: Likewise.
6235 * src/conflicts.c: Likewise.
6236 * src/derives.c: Likewise.
6237 * src/files.c: Likewise.
6238 * src/getargs.c: Likewise.
6239 * src/gram.c: Likewise.
6240 * src/lalr.c: Likewise.
6241 * src/location.c: Likewise.
6242 * src/main.c: Likewise.
6243 * src/muscle_tab.c: Likewise.
6244 * src/nullable.c: Likewise.
6245 * src/output.c: Likewise.
6246 * src/parse-gram.y: Likewise.
6247 * src/print.c: Likewise.
6248 * src/print_graph.c: Likewise.
6249 * src/reader.c: Likewise.
6250 * src/reduce.c: Likewise.
6251 * src/relation.c: Likewise.
6252 * src/state.c: Likewise.
6253 * src/symlist.c: Likewise.
6254 * src/symtab.c: Likewise.
6255 * src/tables.c: Likewise.
6256 * src/uniqstr.c: Likewise.
6257 * src/vcg.c: Likewise.
6259 * src/parse-gram.y: Fix minor problems uncovered by lint.
6260 (current_lhs, current_lhs_location): Now static.
6261 (current_assoc): Remove unused variable.
6263 Cleanups so that Bison-generated parsers have less lint.
6264 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
6265 Prepend /*ARGSUSED*/, for lint's sake.
6266 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
6267 definition if 'lint' is defined.
6268 (YYID): New macro (or function, if lint).
6269 All uses of /*CONSTCOND*/0 replaced by YYID(0).
6270 * data/yacc.c: Likewise.
6271 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
6272 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
6273 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
6275 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
6276 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
6277 Use YYID(0) rather than 0, for lint.
6278 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
6279 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
6281 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6283 * tests/glr-regression.at
6284 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6285 Close memory leak reported by twlevo.
6287 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
6289 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
6291 (yyparse): Iterate another stack in order to call user destructors.
6292 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6294 (Duplicated user destructor for lookahead): This test now is expected
6297 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
6299 * NEWS: Document the following change.
6300 * data/yacc.c: Say "parser skeleton" rather than "file", since
6301 it's no longer just a file.
6302 * data/glr.c: Grant a special exception for C GLR parsers, that
6303 reads like the already-existing exception for C LALR(1) parsers.
6304 * data/glr.cc: Likewise.
6305 * data/lalr1.cc: Likewise.
6306 * data/location.cc: Likewise.
6307 * data/yacc.c: Reword the "written by" statement to clarify that
6308 it was the parser skeleton, not the entire output file.
6309 * data/glr.c: Written by Paul Hilfinger.
6310 * data/glr.cc: Written by Akim Demaille.
6311 * data/lalr1.cc: Likewise.
6313 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6315 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
6316 Fix typos in previous change that broke 'make check'.
6317 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
6319 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
6320 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
6321 We can revert this once things settle down.
6323 * src/conflicts.c (conflicts_print): Don't print file name twice
6324 when %expect fails because there were no conflicts.
6325 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
6327 * tests/conflicts.at (%expect not enough, %expect too much):
6328 (%expect with reduce conflicts): Adjust to new behavior.
6330 2005-11-18 Akim Demaille <akim@epita.fr>
6332 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
6334 * NEWS: Document this.
6335 * doc/bison.texinfo (Expect Decl): Likewise.
6337 2005-11-16 Akim Demaille <akim@epita.fr>
6339 Generalize the display of semantic values and locations in traces.
6340 * data/glr.c (yy_reduce_print): Fix indices (again).
6341 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6343 * data/lalr1.cc (yyreduce_print): Rename as...
6344 (yy_reduce_print): this.
6345 Display values and locations.
6346 * data/yacc.c (yy_reduce_print): Likewise.
6347 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
6348 (yysymprint): Move higher to be visible from yy_reduce_print).
6350 * tests/calc.at: Adjust the expected length of the traces.
6352 2005-11-14 Akim Demaille <akim@epita.fr>
6354 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
6355 from 1 to N, while values and location start at 0.
6356 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
6358 2005-11-14 Akim Demaille <akim@epita.fr>
6360 * data/glr.c (yy_reduce_print): Fix the $ number.
6362 2005-11-14 Akim Demaille <akim@epita.fr>
6364 "Use" parse parameters.
6365 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
6366 * data/glr.c, data/glr.cc: Use them.
6367 * data/glr.c (YYUSE): Have a C++ definition that supports
6370 2005-11-14 Akim Demaille <akim@epita.fr>
6372 * data/glr.c (yyexpandGLRStack): Declare only if defined.
6374 2005-11-14 Akim Demaille <akim@epita.fr>
6377 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
6379 2005-11-12 Akim Demaille <akim@epita.fr>
6381 Let position and location be PODs.
6382 * data/location.cc (position::initialize, location::initialize): New.
6383 (position::position, location::location): Define only if
6384 b4_location_constructors is defined.
6385 * data/lalr1.cc (b4_location_constructors): Define it for backward
6387 * doc/bison.texinfo (Initial Action Decl): Use initialize.
6389 2005-11-12 Akim Demaille <akim@epita.fr>
6391 * data/lalr1.cc: Move the body of the ctor and dtor into the
6392 parser file (instead of the header).
6393 Wrap the implementations in a "namespace yy".
6395 2005-11-12 Akim Demaille <akim@epita.fr>
6397 Have glr.c include its header file when created.
6398 * data/glr.c (b4_shared_declarations): New.
6399 Output them verbatim in the parser if !%defines, otherwise
6400 output then in the header file, and include it instead.
6402 2005-11-11 Akim Demaille <akim@epita.fr>
6404 * data/glr.c: Comment changes.
6406 2005-11-11 Akim Demaille <akim@epita.fr>
6408 When yydebug, report semantic and location values for reductions.
6409 * data/glr.c (yy_reduce_print): Report the semantic values and the
6411 (YY_REDUCE_PRINT): Adjust.
6412 (yyglrReduce): Use them.
6413 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
6414 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
6415 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
6418 2005-11-10 Akim Demaille <akim@epita.fr>
6420 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
6421 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
6422 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
6424 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
6426 * m4/cxx.m4, examples/Makefile.am: Don't build
6427 examples/calc++ if no C++ compiler is available. (trivial change)
6429 2005-11-09 Akim Demaille <akim@epita.fr>
6431 * src/scan-skel.l: Use a couple of asserts.
6433 2005-11-03 Akim Demaille <akim@epita.fr>
6435 In some (weird) cases, the final state number is incorrect.
6436 Reported by Alexandre Duret-Lutz.
6437 * src/LR0.c (state_list_append): Remove the computation of
6439 (save_reductions): Do it here.
6440 (get_state): Alpha conversion.
6441 (generate_states): Use a for loop.
6442 * src/gram.h (item_number_is_rule_number)
6443 (item_number_is_symbol_number): New.
6444 * src/state.c: Use assert.
6445 * src/system.h: Include assert.h.
6446 * tests/sets.at (Accept): New.
6448 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6450 * data/glr.c (yyfill): Adjust comment.
6451 (yyresolveAction): Initialize default location properly
6452 for empty right-hand sides.
6453 (yydoAction): Ditto.
6454 Add comment explaining apparently dead code.
6455 * tests/glr-regression.at
6456 (Incorrectly initialized location for empty right-hand side in GLR):
6459 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6461 * bootstrap (cleanup_gnulib): New function. Use it to clean up
6462 gnulib when interrupted. This fixes some race conditions and
6463 works around some portability problems (one noted by Paul
6466 2005-10-22 Akim <akim@epita.fr>
6468 * Makefile.cfg: Adjust to config -> build-aux.
6471 2005-10-21 Akim Demaille <akim@epita.fr>
6473 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
6475 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
6476 * data/yacc.c (b4_Pure_if): Rename as...
6477 (b4_yacc_pure_if): this.
6478 (YY_SYMBOL_PRINT, yyparse): Adjust.
6479 * doc/bison.texinfo: Formatting changes.
6481 2005-10-21 Akim Demaille <akim@epita.fr>
6483 Finish the transition config -> build-aux.
6484 * configure.ac, Makefile.am: Use build-aux.
6485 * config/prev-version, config/announce-gen, config/Makefile.am:
6487 * build-aux/prev-version, build-aux/announce-gen,
6488 * build-aux/Makefile.am: here.
6490 2005-10-14 Akim Demaille <akim@epita.fr>
6492 * examples/calc++/test: Use set -x only when VERBOSE.
6494 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
6496 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
6497 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
6499 2005-10-13 Akim Demaille <akim@epita.fr>
6501 * src/scan-skel.l: Output the base name parts of the parser and
6503 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
6505 Use this to exercise C++ outputs in subdirs.
6506 Reported by Oleg Smolsky.
6508 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6510 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6511 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6512 Problem reported by John P. Hartmann.
6513 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6516 2005-10-12 Akim Demaille <akim@epita.fr>
6518 * src/parse-gram.y (version_check): Exit 63 to please missing
6519 (stands for "version mismatch).
6520 * tests/input.at, doc/bison.texinfo: Adjust.
6522 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6524 Work around portability problems with Visual Age C compiler
6525 (xlc and xlC_r) reported by John P. Hartmann.
6526 * data/location.cc (initial_column, initial_line): Remove.
6527 All uses replaced by 0 and 1.
6528 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6529 that xlc complains about.
6530 * src/scan-skel.l (skel_wrap): Likewise.
6531 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
6533 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6534 __STDC_VERSION__. Use it everywhere instead of looking at
6535 __STDC__ and __cplusplus.
6537 2005-10-10 Akim Demaille <akim@epita.fr>
6539 * examples/calc++/test: Be quiet unless VERBOSE.
6541 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6543 * data/c.m4 (yydestruct, yysymprint):
6544 Use YYUSE instead of casting to void.
6545 * data/glr.c (YYUSE): New macro.
6546 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6547 Use it instead of rolling our own.
6548 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6550 Use /*CONSTCOND*/ to suppress lint warnings.
6551 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6552 (YY_STACK_PRINT): Use 'false' not '0'.
6554 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6555 * data/yacc.c (YYUSE): New macro.
6556 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6557 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6558 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6561 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6562 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6564 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6566 Undo the parts of the unlocked-I/O change that substituted
6567 putc or puts for printf. This might hurt performance a bit,
6568 but some people prefer the printf style.
6569 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6570 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6571 All uses replaced by YYFPRINTF and YYDPRINTF.
6572 * data/yacc.c: Likewise.
6573 * lib/bitset.c (bitset_print): Likewise.
6574 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6576 * lib/lbitset.c (debug_lbitset): Likewise.
6577 * src/closure.c (print_firsts, print_fderives): Likewise.
6578 * src/gram.c (grammar_dump): Likewise.
6579 * src/lalr.c (look_ahead_tokens_print): Likewise.
6580 * src/output.c (escaped_output): Likewise.
6581 (user_actions_output): Break apart two printfs.
6582 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6583 * src/reduce.c (reduce_print): Likewise.
6584 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6585 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6587 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6588 Use assignments rather than casts-to-void to suppress
6589 unused-variable warnings. This pacifies 'lint'.
6590 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6591 unused-variable warnings.
6593 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6595 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6597 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6599 Use unlocked I/O for a minor performance improvement on hosts like
6600 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6601 is to use the gnlib unlocked-io module, and to prefer putc and
6602 puts to printf when either will work (since the latter doesn't
6603 come in an unlocked flavor).
6604 * bootstrap (gnulib_modules): Add unlocked-io.
6605 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6606 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6607 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6608 and similarly for puts and putc and printf.
6609 * data/yacc.c: Likewise.
6610 * lib/bitset.c (bitset_print): Likewise.
6611 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6612 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6614 * lib/lbitset.c (debug_lbitset): Likewise.
6615 * src/closure.c (print_firsts, print_fderives): Likewise.
6616 * src/gram.c (grammar_dump): Likewise.
6617 * src/lalr.c (look_ahead_tokens_print): Likewise.
6618 * src/output.c (escaped_output): Likewise.
6619 (user_actions_output): Coalesce two printfs.
6620 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
6621 * src/reduce.c (reduce_print): Likewise.
6622 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6623 * src/system.h: Include unlocked-io.h rather than stdio.h.
6625 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6626 this confuses xgettext.
6628 2005-10-02 Akim Demaille <akim@epita.fr>
6630 * bootstrap (gnulib_modules): Add strverscmp.
6631 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6632 * m4/.cvsignore: Add strverscmp.m4.
6633 * src/parse-gram.y (%require): New token, new rule.
6634 (version_check): New.
6635 * src/scan-gram.l (%require): Adjust.
6636 * tests/input.at (AT_REQUIRE): New.
6638 * doc/bison.texinfo (Require Decl): New.
6639 (Calc++ Parser): Use %require.
6641 2005-10-02 Akim Demaille <akim@epita.fr>
6643 * data/location.cc: New.
6645 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6646 Akim Demaille <akim@epita.fr>
6648 Make sure -odir/foo.cc creates dir/location.hh etc.
6649 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6650 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6651 (spec_defines_file): Now const.
6653 (short_base_name): Remove.
6654 * src/files.c: Adjust.
6655 (dirname.h): Include.
6656 (base_name): Don't prototype it.
6657 (finput): Remove, duplicates gram_in.
6658 (full_base_name, short_base_name): Replace by...
6659 (all_but_ext, all_but_tab_ext): these.
6660 (compute_base_names): Rename as...
6661 (compute_file_name_parts): this.
6662 Update to compute the new variables, including dir_prefix.
6663 Adjust dependencies.
6664 * src/output.c (prepare): Output them.
6665 * src/reader.c: Adjust to use gram_in, not finput.
6666 * src/scan-skel.l (@dir_prefix@): New.
6668 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6670 * lib/subpipe.c: New function end_of_output_subpipe() added
6671 to allow support for non-posix systems. This is a no-op function
6674 * lib/subpipe.h: New function end_of_output_subpipe() added
6675 to allow support for non-posix systems. This is a no-op function
6678 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6679 handle the lack of pipe/fork functionality on non-posix systems.
6681 * djgpp/Makefile.maint: DJGPP specific file.
6683 * djgpp/README.in: DJGPP specific file.
6685 * djgpp/config.bat: DJGPP specific configuration file.
6687 * djgpp/config.sed: DJGPP specific configuration file.
6689 * djgpp/config.site: DJGPP specific configuration file.
6691 * djgpp/config_h.sed: DJGPP specific configuration file.
6693 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6695 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6697 2005-10-02 Akim Demaille <akim@epita.fr>
6699 * data/location.cc: New, extract from...
6700 * data/lalr1.cc: here.
6701 (location.hh): Include it after the user prologue, in case the
6702 filename type is defined by the user.
6703 Forward declation location and position before the pre-prologue.
6704 (yyresult_): Rename as...
6705 (yyresult): this, it's a local variable, not an attribute.
6706 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6708 2005-10-01 Akim Demaille <akim@epita.fr>
6710 * examples/extexi: Restore the #line generation.
6712 2005-09-30 Akim Demaille <akim@epita.fr>,
6713 Alexandre Duret-Lutz <adl@gnu.org>
6715 Move the token type and YYSTYPE in the parser class.
6716 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6717 (parser::token): New, from the moved free definition of tokens.
6718 (parser::semantic_value): Now a full definition instead of an
6719 indirection to YYSTYPE.
6720 (b4_post_prologue): No longer included in the header file, but
6721 in the implementation file.
6722 * doc/bison.texi (C+ Language Interface): Update.
6723 * src/parse-gram.y: Support unary %define.
6724 * tests/actions.at: Define global_tokens_and_yystype for backward
6725 compatibility until we update the tests.
6726 * tests/calc.at: Idem.
6727 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6728 to simplify the code.
6730 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6732 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6733 Ah, the good old days! Problem reported by Peter Klein.
6734 * bootstrap (gnulib_modules): Add strerror, strtoul.
6735 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6736 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6738 2005-09-29 Akim Demaille <akim@epita.fr>
6740 * data/c.m4 (b4_error_verbose_if): New.
6741 * data/lalr1.cc: Use it.
6742 (YYERROR_VERBOSE_IF): Remove.
6743 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6744 parser members, replaced by...
6745 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6747 (yysyntax_error_): Takes the state number as argument.
6748 (yyreduce_print_): Use the argument yyrule, not the former
6751 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6753 * bootstrap (gnulib_modules): Add verify.
6754 * lib/.cvsignore: Add verify.h.
6755 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6756 * src/system.h (verify): Remove.
6757 Include verify.h instead.
6758 * src/tables.c (tables_generate): Use new API for 'verify'.
6760 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6762 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6763 local variables whose names begin with 'yy'.
6764 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6765 Trivial changes from Joel E. Denny.
6767 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6769 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6770 don't use alloca any more.
6772 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6773 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6774 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6775 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6776 to match yacc.c, to test more hosts.
6778 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6780 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6781 doesn't affect behavior.
6782 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6784 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6785 This works a bit better with glibc, if user code has already included
6787 * doc/bison.texinfo (Bison Parser): Document that users can't
6788 arbitrarily use malloc and free for other purposes. Document
6789 that <alloca.h> and <malloc.h> might be included.
6790 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6791 user must declare alloca.
6793 * HACKING (release): Forwarn the Translation Project about
6796 2005-09-20 Akim Demaille <akim@epita.fr>
6798 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6800 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6802 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6803 (YYSTACK_ALLOC_MAXIMUM): Use it.
6804 (yysyntax_error): New function.
6805 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6806 multiple syntax errors are reported, and alloca is being used.
6807 Instead, reallocate buffers twice as big each time, so that
6808 we waste at most half the allocated memory. Start with a small
6809 (128-byte) buffer that will suffice in most cases anyway.
6810 Use yysyntax_error to do most of the work.
6812 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6813 yynerrs is the number of errors reported, not the number of
6816 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6817 Mark it as expected to fail.
6818 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6819 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6820 Don't start user-code symbols with "yy", to avoid name space problems.
6822 2005-09-19 Akim Demaille <akim@epita.fr>
6824 Remove the traits, failed experiment.
6825 It never proved useful, and anyway because of the current
6826 definition, it was not possible to have several specialization of
6827 this traits, making it useless.
6828 * data/lalr1.cc (yy:traits): Remove.
6829 Inline its definitions in the parser class.
6831 2005-09-19 Akim Demaille <akim@epita.fr>
6833 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6834 least Mac OSX with a /usr/local install of gettext.
6836 2005-09-19 Akim Demaille <akim@epita.fr>
6838 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6839 and yytoken for similarity with the other skeletons.
6841 2005-09-19 Akim Demaille <akim@epita.fr>
6843 * NEWS, configure.ac: update version number to 2.1a.
6845 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6847 * NEWS: Version 2.1.
6849 * NEWS: Remove notice of yytname change, since it was never in an
6851 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6853 * src/output.c (prepare): Likewise.
6854 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6855 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6856 is not defined. This is an awful hack, but it's enough for now.
6857 All callers changed.
6858 * tests/glr-regression-at (make_value): Args are const pointers now,
6859 to avoid GCC warning.
6860 (Duplicated user destructor for lookahead): New test. Currently
6861 skipped. It fails on my host but I'm not sure it'll always fail.
6863 2005-09-16 Akim Demaille <akim@epita.fr>
6865 * src/symtab.h (struct symbol): Declare the printer and destructor
6866 as const, to avoid accidental calls to free.
6867 (symbol_destructor_set, symbol_printer_set): Adjust.
6868 * src/symtab.c: Adjust.
6870 2005-09-16 Akim Demaille <akim@epita.fr>
6872 * data/c.m4 (b4_token_enums): New.
6873 (b4_token_defines): Rename as...
6874 (b4_token_enums_defines): this.
6875 (b4_token_defines): New, output only the #defines.
6876 * data/yacc.c, data/glr.c: Adjust.
6877 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6878 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6881 2005-09-16 Akim Demaille <akim@epita.fr>
6883 * data/lalr1.cc (yylex_): Remove, inline its code.
6884 (yyreport_syntax_error_): Remove, replaced by...
6885 (yysyntax_error_): this which returns a string and leaves to the
6886 caller the call to the users' error function.
6887 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6888 Move from members of the parser object...
6889 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6890 to local variables of the parse function.
6892 2005-09-16 Akim Demaille <akim@epita.fr>
6894 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6895 since it's in Bison's name space.
6897 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6899 * data/glr.c (yyresolveValue): Add default case to pacify
6900 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6902 * NEWS: Document when yyparse started to return 2.
6903 * doc/bison.texinfo (Parser Function): Document when yyparse
6906 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6907 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6909 (class position): file_name -> filename (reverting). All uses changed.
6911 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6913 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6914 do anything if $@ exists. This reverts part of the 2005-07-07
6917 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6919 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6920 contains obsolete information and isn't worth distributing as a
6921 separate file anyway.
6922 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6923 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6924 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6925 (yyparse): Abort if user code uses longjmp to throw an unexpected
6928 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6930 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6931 Suggested by twlevo@xs4all.nl.
6933 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6934 This avoids a diagnostic from gcc -Wswitch-enum.
6935 Problem reported by twlevo@xs4all.nl.
6937 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6938 standards. Use "file name" or "file" or "name", depending on
6940 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6941 not to hack/foo.tab.c.
6942 (Calc++ Top Level): 2nd arg of main is not const.
6943 * data/glr.c: b4_filename -> b4_file_name.
6944 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6946 (class position): filename -> file_name. All uses changed.
6947 * data/yacc.c: b4_filename -> b4_file_name.
6948 * lib/bitset.h: filename -> file_name in local vars.
6949 * lib/bitset_stats.c: Likewise.
6950 * src/files.c: Likewise.
6951 * src/scan-skel.l ("@output ".*\n): Likewise.
6952 * src/files.c (file_name_split): Renamed from filename_split.
6953 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6955 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6957 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6958 to accommodate latest gnulib.
6960 * tests/glr-regression.at (Duplicate representation of merged trees):
6961 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6963 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6966 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6968 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6969 All uses changed. Invoke user destructor after an error during a
6970 split parse (trivial change from Joel E. Denny).
6972 * tests/glr-regression.at
6973 (User destructor after an error during a split parse): New test case.
6974 Problem reported by Joel E. Denny in:
6975 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6977 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6979 * README-cvs: Give URLs for recommended tools.
6980 Mention Gzip version problem, and bootstrapping issues.
6981 Remove troubleshooting section, as it's somewhat obsolete.
6983 * bootstrap (no_cache): New var, to accommodate different wget
6984 variants. Use it instead of '-C off'. Problem reported by
6987 * data/glr.c (yydestroyStackItem): New function.
6988 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6989 debugging information. Problem reported by Joel E. Denny.
6991 2005-08-25 Akim Demaille <akim@epita.fr>
6993 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6995 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6997 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6998 Don't invoke destructor on unresolved entries.
6999 * tests/glr-regression.at
7000 (User destructor for unresolved GLR semantic value): New test case.
7001 Problem reported by Joel E. Denny in:
7002 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
7004 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
7006 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
7008 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
7009 lib-prefix.m4, po.m4.
7011 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
7012 in yydestruct diagnostic, since it might not be an error.
7013 Problem reported by Joel Denny near end of
7014 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7015 * data/lalr1.cc (yyerturn): Likewise.
7016 * data/yacc.c (yyreturn): Likewise.
7017 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
7019 * src/files.c: Remove obsolete FIXME comment.
7021 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
7022 with the other templates, and to fix bogus run-on messages such
7023 as the one reported at the end of
7024 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7025 All callers changed to avoid the newline.
7026 (yyprocessOneStack): Output two lines rather than one, to accommodate
7027 the above change. This changes the debug output format slightly.
7029 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
7030 reported by Joel E. Denny in
7031 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
7033 * tests/glr-regression.at (Duplicate representation of merged trees):
7034 New test, from Joel E. Denny in:
7035 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
7036 * THANKS: Add Joel E. Denny.
7038 * configure.ac (AC_INIT): Bump to 2.0c.
7040 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
7042 * NEWS: Version 2.0b.
7044 * Makefile.am (SUBDIRS): Put examples before tests, so that
7045 "make check" doesn't finish with "All 1 tests passed".
7047 * tests/regression.at (Token definitions): Don't rely on
7048 AT_PARSER_CHECK for data that contains backslashes. It currently
7049 uses 'echo', and 'echo' isn't portable if its argument contains
7050 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
7051 that the byte '\0xff' is not printable in the C locale; it is,
7052 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
7053 not printable, so use '\0x81' to test.
7055 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
7056 version of GCC, since the macro is used with non-GCC compilers.
7058 Fix core dump reported by Pablo De Napoli in
7059 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
7060 * tests/regression.at (Invalid inputs with {}): New test.
7061 * src/parse-gram.y (token_name): Translate type before using
7064 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
7065 the user's name space. All uses changed to __attribute__
7067 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
7068 Add __attribute__ ((__noreturn__)).
7070 * etc/clcommit: Remove. We weren't using it, and it failed
7071 "make maintainer-distcheck".
7072 * Makefile.maint: Merge from coreutils.
7073 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
7074 (syntax-check-rules): Change list of rules as described below.
7075 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
7076 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
7077 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
7078 (sc_trailing_space): New rules.
7079 (sc_xalloc_h_in_src): Remove.
7080 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7081 (sc_space_tab, sc_error_exit_success, sc_changelog):
7082 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
7083 (makefile-check, po-check, author_mark_check):
7084 (makefile_path_separator_check, copyright-check):
7085 Use grep -n, to make it easier to find violations.
7086 Use CVS_LIST and CVS_LIST_EXCEPT.
7087 (header_regexp, h_re): Remove.
7089 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
7090 (my-distcheck): Use more-modern GCC flags.
7091 (signatures, %.asc): Remove.
7092 (rel-files, announcement): Remove signatures.
7093 Restore old updating code, even though we don't use it, so
7094 that we're the same as coreutils.
7095 (alpha, beta, major): Depend on news-date-check.
7096 Make the upload commands.
7098 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
7099 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
7100 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
7101 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
7102 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
7103 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
7104 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
7105 * tests/sets.at: Likewise.
7107 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
7108 we comment out the Autoconf version number.
7109 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
7110 it's error-prone and "make maintainer-distcheck" rejects it.
7112 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
7113 Indent calls to "error" to pacify "make maintainer-distcheck",
7114 when the calls are not intended to be translated.
7115 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
7117 * src/Makefile.am (DEFS): Use +=, to pacify
7118 "make maintainer-distcheck".
7119 (bison_SOURCES): Add scan-skel.h.
7120 (sc_tight_scope): New rule, from coreutils.
7122 * src/files.c (src_extension, header_extension):
7123 Now static, not extern.
7124 * src/getargs.c (short_options): Likewise.
7125 * src/muscle_tab.c (muscle_table): Likewise.
7126 * src/parse-gram.y (current_class, current_type, current_prec):
7128 * src/reader.c (grammar_end, previous_rule_end): Likewise.
7129 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
7130 * src/main.c (main): Cast bindtextdomain and textdomain calls to
7131 void, to avoid warning when NLS is disabled.
7132 * src/output.c: Include scan-skel.h.
7133 (scan_skel): Remove decl, since scan-skel.h does this.
7135 Indent calls to "error" to pacify "make maintainer-distcheck".
7136 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
7137 * src/reader.h (gram_end, gram_lineno): New decls to pacify
7138 "make maintainer-distcheck".
7139 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
7140 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
7141 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
7142 (skel_lex_destroy, scan_skel): Move these decls to...
7143 * src/scan-skel.h: New file.
7144 * src/uniqstr.c (uniqstr_assert):
7145 Indent calls to "error" to pacify "make maintainer-distcheck".
7147 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
7150 * tests/torture.at: Revamp to avoid misuse of atoi that
7151 "make maintainer-distcheck" complained about.
7153 * examples/extexi (message): Don't print a message more than once,
7154 and omit line-number decoration that makes Emacs compile think
7155 that informative messages are worth worrying about.
7157 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
7159 * configure.ac: Update version number.
7161 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
7163 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
7164 autogenerated by the maintainer.
7165 * examples/calc++/.cvsignore: Add *.yy.
7167 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
7168 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7169 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7171 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
7173 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
7174 from maintainer-distcheck about casting the argument of 'free'.
7176 * NEWS: Mention recent yytname changes.
7177 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
7179 * bootstrap: For translations that have not yet been upgraded to
7180 the new runtime-po domain, prime the pump by extracting the
7181 relevant strings from the obsolete translations. This code can be
7182 removed once the bison-runtime domain has been translated by each
7185 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
7186 now that token names are already quoted.
7188 Fix problem reported by Anthony Heading.
7189 * data/glr.c (YYTOKEN_TABLE): New macro.
7190 (yytname): Define if YYTOKEN_TABLE.
7191 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
7192 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
7193 (YYERROR_VERBOSE): Define the same way the other skeletons do.
7194 * src/output.c (prepare_symbols): Output token_table_flag.
7196 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
7198 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
7199 again if the first call fails.
7201 * data/glr.c (yytnamerr): New function.
7202 (yyreportSyntaxError): Use it to dequote most string literals.
7203 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
7204 with other skeletons. All uses changed.
7205 (yytnameerr_): New function.
7206 (yyreport_syntax_error): Use it to dequote most string literals.
7207 * data/yacc.c (yytnamerr): New function.
7208 (yyerrlab): Use it to decode most string literals.
7209 * doc/bison.texinfo (Decl Summary, Calling Convention):
7210 Clarify quoting convention of yytname.
7211 * src/output.c (prepare_symbols): Quote all names. This undoes
7212 the 2005-04-17 change, which is now accomplished (mostly) via
7213 changes in the parsers as described above.
7214 * tests/regression.at (Token definitions, Web2c Actions):
7215 Undo most 2005-04-17 change here, too.
7217 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
7219 Fix more problems reported by twlevo@xs4all.nl.
7220 * tests/cxx-type.at: Don't pipe output of ./types through sed to
7221 remove trailing spaces. This loses the exit status of ./types,
7222 and isn't needed since ./types shouldn't be emitting trailing
7224 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
7225 as the stack isn't valid in that case.
7227 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7228 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7229 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7230 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
7232 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
7233 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7234 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7237 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
7238 overly-picky compilers that reject 'char *foo = "bar";'.
7240 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
7241 to FILE * parameter, not to stderr. This fixes a typo introduced
7242 in the 2005-07-12 change.
7244 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
7245 warnings from GCC 4.
7247 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
7248 (yyglrShiftDefer, yysplitStack):
7249 Remove unused parameters b4_pure_formals. All uses changed.
7250 (yyglrShift): Remove unused parameters b4_user_formals.
7252 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
7254 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
7256 Destructor cleanups and regularization among the three skeletons.
7257 * NEWS: Document the behavior changes.
7258 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
7259 stack before failing, as the cleanup code will do it for us now.
7260 * data/lalr1.cc (yyerrlab): Likewise.
7261 * data/glr.c (yyparse): Pop everything off the stack before
7262 freeing it, so that destructors get called properly.
7263 * data/lalr1.cc (yyreturn): Likewise.
7264 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
7265 This is more consistent.
7266 * doc/bison.texinfo (Destructor Decl): Mention more reasons
7267 why destructors might be called. 1.875 -> 2.1.
7268 (Destructor Decl, Decl Summary, Table of Symbols):
7269 Some English-language cleanups for %destructor.
7270 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7271 Add output line for destructor of start symbol.
7272 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
7273 because of that same extra output line.
7275 * NEWS: Document minor wording changes in diagnostics of
7276 Bison-generated parsers.
7277 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
7278 Remove unused formals. All uses changed.
7279 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
7280 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
7281 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
7282 Rename yyoverflowab to yyexhaustedlab.
7283 When memory exhaustion occurs during syntax-error reporting,
7284 report it separately rather than in a single diagnostic; this
7286 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
7287 (Memory Exhausted): Renamed from Parser Stack Overflow.
7288 Revamp wording slightly to prefer "memory exhaustion".
7289 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
7291 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
7293 Add i18n support to the GLR skeleton. Partially fix the C++
7294 skeleton; a C++ expert needs to finish this. Remove debugging
7295 msgids; there's little point to having them translated, since they
7296 can be understood only by someone who can read the
7297 (English-language) source code.
7299 Generate runtime-po/bison-runtime.pot automatically, so that we
7300 don't have to worry about garbage getting in that file. We'll
7301 make sure after the next official release that old msgids don't
7303 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
7305 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
7307 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
7308 Fix typos in explanations of the runtime file.
7309 * bootstrap: Change gettext keyword from YYI18N to YY_.
7310 Use standard Makefile.in.in in runtime-po, since we'll arrange
7311 for backward-compatible bison-runtime.po files in a different way.
7312 * data/glr.c (YY_): New macro, from yacc.c.
7313 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
7314 Translate messages intended for users.
7315 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
7316 the wording in the other skeletons. We don't know that the memory
7318 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
7319 Use same method that yacc.c uses.
7320 Don't translate debugging messages.
7321 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
7322 it doesn't work (yet), and requires C++ expertise to fix.
7323 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
7324 Move defn to a more logical place, to be consistent with other
7326 Don't translate debugging messages.
7327 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
7328 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
7329 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
7330 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
7332 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
7333 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
7335 * tests/glr-regression.at (Badly Collapsed GLR States):
7337 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7338 yylex should return 0 at EOF rather than aborting.
7340 Improve tests for stack overflow in GLR parser.
7341 Problem reported by twlevo@xs4all.nl.
7342 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
7344 (yyStackOverflow): Just longjmp, but with value 2 so that caller
7345 can handle the problem.
7346 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
7347 (yyparse): New local variable yyresult to record the result.
7348 Use result of setjmp to set it, rather than storing itinto
7350 (yyDone): Remove label.
7351 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
7352 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
7353 if YYABORT is used).
7354 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
7355 yyparse status; put status > 1 into diagnostic.
7356 Check that status==2 works.
7357 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
7358 Use exit status 3 for failure to open (which shouldn't happen).
7360 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
7362 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
7363 1 on syntax error; just let yyparse do its thing.
7364 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
7365 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
7366 (Exploding the Stack Size with Alloca):
7367 (Exploding the Stack Size with Malloc):
7368 Expect exit status 2, not 1, since the parser is supposed to blow
7369 its stack. Problem reported by twlevo@xs4all.nl.
7371 * data/glr.c (yyparse): Don't assume that the initial calls
7372 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
7373 Print a stack-overflow message and fail instead.
7374 Initialize the line-number information before creating the stack,
7375 so that the stack-overflow message can report line zero safely.
7377 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
7379 Fix problems reported by twlevo@xs4all.nl.
7380 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
7381 (yyuserMerge): Provide a default case if b4_mergers is empty.
7382 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
7383 * tests/glr-regression.at
7384 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7385 Add casts to pacify C++ compilers.
7386 * tests/glr-regression.at (Improper merging of GLR delayed action
7387 sets): Declare yylex before using it.
7388 * tests/Makefile.am (maintainer-check-g++): Fix a stray
7389 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
7390 test for valgrind; valgrind is independent of g++.
7391 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
7392 for compatibility with POSIX 1003.1-2001 (if running coreutils).
7393 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
7394 Use a destructor, so that we can expand the stack. Change
7395 YYSTYPE to char * so that we can free it. Cast result of malloc.
7397 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7399 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
7400 a valgrind failure. Problem reported by twlevo@xs4all.nl.
7402 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
7404 * PACKAGING: New file, suggested by Bruno Haible and taken from
7405 similar wording in gettext's PACKAGING file.
7406 * NEWS: Mention PACKAGING.
7407 * Makefile.am (EXTRA_DIST): Add PACKAGING.
7409 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
7411 * NEWS: Document recent i18n improvements.
7412 * bootstrap: Get runtime translations into runtime-po.
7413 Create runtime-po files automatically, if possible.
7414 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
7415 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
7416 does not infringe on the user's name space.
7417 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
7418 * doc/bison.texinfo (Internationalization): Revamp the English
7419 and Texinfo syntax a bit, to try to make it clearer.
7420 (Bison Options, Option Cross Key): Mention --print-localedir.
7421 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
7422 YYENABLE_NLS. Quote a bit more.
7423 * runtime-po/.cvsignore: New file.
7424 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
7425 * runtime-po/Rules-quot: Remove; now created by bootstrap.
7426 * runtime-po/quot.sed: Likewise.
7427 * runtime-po/boldquot.sed: Likewise.
7428 * runtime-po/en@quot.header: Likewise.
7429 * runtime-po/en@boldquot.header: Likewise.
7430 * runtime-po/insert-header.sin: Likewise.
7431 * runtime-po/remove-potcdate.sin: Likewise.
7432 * runtime-po/Makevars: Likewise.
7433 * runtime-po/LINGUAS: Likewise.
7434 * runtime-po/de.po: Likewise; we will rely on the translation project
7435 to maintain this, so "bootstrap" should get it.
7436 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
7438 * src/main.c (main): Bind the bison-runtime domain, too.
7440 2005-07-12 Bruno Haible <bruno@clisp.org>
7442 * data/yacc.c: Include <libintl.h> when NLS is enabled.
7443 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
7444 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
7445 * runtime-po: New directory.
7446 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
7447 $(DOMAIN).pot-update rule, so that old messages are never dropped.
7448 * runtime-po/Rules-quot: New file, copied from po/.
7449 * runtime-po/quot.sed: Likewise.
7450 * runtime-po/boldquot.sed: Likewise.
7451 * runtime-po/en@quot.header: Likewise.
7452 * runtime-po/en@boldquot.header: Likewise.
7453 * runtime-po/insert-header.sin: Likewise.
7454 * runtime-po/remove-potcdate.sin: Likewise.
7455 * runtime-po/Makevars: New file.
7456 * runtime-po/POTFILES.in: New file.
7457 * runtime-po/LINGUAS: New file.
7458 * runtime-po/bison-runtime.pot: New file.
7459 * runtime-po/de.po: New file.
7460 * m4/bison.m4: New file.
7461 * Makefile.am (SUBDIRS): Add runtime-po.
7462 (aclocaldir, aclocal_DATA): New variables.
7463 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
7465 * src/getargs.c (usage): Document --print-localedir option.
7466 (PRINT_LOCALEDIR_OPTION): New enum item.
7467 (long_options): Add --print-localedir option.
7468 (getargs): Handle --print-localedir option.
7469 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
7470 (Internationalization): New section.
7472 2005-07-12 Akim Demaille <akim@epita.fr>
7474 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
7475 for consistency with the rest of the code.
7476 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
7479 2005-07-12 Akim Demaille <akim@epita.fr>
7481 * src/parse-gram.y: Use %printer instead of YYPRINT.
7483 2005-07-12 Akim Demaille <akim@epita.fr>
7485 * src/symtab.h, src/symtab.c (symbol_print): New.
7486 * src/symlist.h, src/symlist.c (symbol_list_print): New.
7487 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
7489 2005-07-12 Akim Demaille <akim@epita.fr>
7491 * data/glr.c (b4_syncline): Fix (swap) the definitions of
7492 b4_at_dollar and b4_dollar_dollar.
7494 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
7496 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
7497 and Pennello's paper.
7499 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
7501 * data/yacc.c (yyparse): Undo previous patch. Instead,
7502 set yylsp[0] and yyvsp[0] only if the initial action
7503 sets yylloc and yylval, respectively.
7505 * data/yacc.c (yyparse): In the initial action, set
7506 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7507 This avoids the use of undefined variables if the initial
7508 action does not set yylloc and/or yylval.
7510 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7512 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7513 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7514 Remove from CVS. These files are automatically generated.
7515 * examples/extexi: Clarify that this file is now part of Bison,
7516 not GNU M4, and that it works with any POSIX-compatible Awk.
7517 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7518 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7519 so that we also get calc++-parser.yy. Geneate it.
7520 Use $(AWK), not gawk, since any conforming Awk will do.
7521 Put comment before action, since older 'make' can't handle comment
7523 $(BUILT_SOURCES): List all built sources, not just some of them.
7524 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7525 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7526 $($(calc_sources_generated)): Remove unnecessary test for existence
7527 of target. (This had a shell syntax error anyway; a stray "x".)
7528 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7530 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7532 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7533 implied by the other modules.
7535 2005-07-06 Akim Demaille <akim@epita.fr>
7537 Bind examples/calc++ to the package.
7538 * examples/calc++/Makefile: Remove, replaced by...
7539 * examples/calc++/Makefile.am: ... this new file.
7540 * examples/calc++/test: Remove input.
7541 * examples/calc++/compile: Remove.
7542 * examples/Makefile.am: New.
7543 * configure.ac, Makefile.am: Adjust.
7544 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7546 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7548 * data/glr.c (yyFail): Drastically simplify; since the format argument
7549 never had any % directives, we can simply pass it to yyerror.
7550 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7551 be modified later, as that is the usual style in glr.c.
7552 Problems reported by Paul Hilfinger.
7554 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7555 and size overflow errors.
7556 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7557 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7558 (YYSIZEMAX): New macro.
7559 (yystpcpy): New function, taken from yacc.c.
7560 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7561 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7562 so that we don't have to maintain their signatures.
7563 (yyFail): Check for buffer overflow, by using vsnprintf rather
7564 than vsprintf. Allocate a bigger buffer if possible.
7565 Report an error if buffer allocation fails.
7566 (yyStackOverflow): New function.
7567 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7568 the initialization was successful. It might fail if storage was
7570 (yyexpandGLRStack): Add more checks for storage allocation failure.
7571 Use yyStackOverflow to report failures.
7572 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7573 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7574 Don't assume stack number fits in int.
7575 (yysplitStack): Check for storage allocation failure.
7576 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7577 can print diagnostics on storage allocation failure. All callers
7579 (yyresolveValue): Use yybool for boolean.
7580 (yyreportSyntaxError): Check for size-calculation overflow.
7581 This code is taken from yacc.c.
7582 (yyparse): Check for storage allocation errors when allocating
7585 2005-07-05 Akim Demaille <akim@epita.fr>
7587 Extract calc++ from the documentation.
7588 * doc/bison.texinfo (Calc++): Add the extraction marks.
7589 * examples/extexi: New, from the aborted GNU Programming 2E.
7590 Separate the different paragraph of a file with empty lines.
7591 * examples/Makefile: Use it to extract the whole calc++ example.
7593 2005-06-24 Akim Demaille <akim@epita.fr>
7595 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7598 2005-06-22 Akim Demaille <akim@epita.fr>
7600 * doc/bison.texinfo (C++ Language Interface): First stab.
7601 (C++ Parsers): Remove.
7603 2005-06-22 Akim Demaille <akim@epita.fr>
7605 * data/lalr1.cc (yylex_): Honor %lex-param.
7607 2005-06-22 Akim Demaille <akim@epita.fr>
7609 Start a set of simple examples.
7610 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7611 * examples/calc++/calc++-driver.hh,
7612 * examples/calc++/calc++-parser.yy,
7613 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7614 * examples/calc++/compile, examples/calc++/test: New.
7616 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7618 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7619 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7620 which stems from the 2005-05-27 patch.
7622 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7624 * data/glr.c: Modify treatment of unused parameters to permit use
7625 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7627 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7629 Fix infringement on user name space reported by Janos Zoltan Szabo.
7630 * data/yacc.c (yyparse): strlen -> yystrlen.
7632 2005-05-30 Akim Demaille <akim@epita.fr>
7634 * data/lalr1.cc (_): New.
7635 Translate the various messages.
7637 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7639 Fix infringement on user name space reported by Bruno Haible.
7640 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7641 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7642 the user's name space.
7643 (alloca): Include <stdlib.h> to get it, if it's not built in.
7644 (YYMALLOC, YYFREE): Define only if needed.
7645 (malloc, free): Declare, but only if needed, as this infringes on
7646 the user name space.
7648 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7650 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7651 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7653 * lib/ebitset.c (min, max): Undef before defining.
7654 * lib/vbitset.c (min, max): Likewise.
7655 * lib/subpipe.c (create_subpipe): Save local variables in case
7656 vfork clobbers them.
7658 2005-05-24 Bruno Haible <bruno@clisp.org>
7660 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7661 error message syntax used by gcc-4.0.
7663 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7665 * README: Mention m4 1.4.3. Remove obsolete advice about
7666 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7668 * bootstrap: Remove workaround for problem I encountered with
7669 gettext 0.14.1; it seems to be fixed now.
7671 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7673 * NEWS: Version 2.0a.
7675 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7676 the previous change.
7678 Various maintainer cleanups.
7679 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7680 conftest*, for benefit of CVS commands run at the same time as
7681 "configure". Add build-aux, since "bootstrap" now creates it and
7683 * Makefile.cfg (move_if_change): Remove.
7684 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7685 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7686 (po_repo, do-po-update, po-update, wget_files, get-targets):
7687 (config.guess-url_prefix, config.sub-url_prefix):
7688 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7689 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7690 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7692 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7693 this is now the recommended name.
7694 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7695 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7696 ylwrap. These files now go into build-aux.
7697 * config/move-if-change: Remove.
7698 * config/prev-version.txt: Bump from 1.75 to 2.0.
7700 * bootstrap: Add stdio-safer, unistd-safer modules.
7701 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7703 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7704 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7705 * lib/subpipe.c: Include "unistd-safer.h".
7706 (create_subpipe): Make sure all the newly-created
7707 file descriptors are > 2, so that diagnostics don't
7708 get sent down them (which might cause Bison to hang, in theory).
7709 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7710 * src/files.c (xfopen): Use fopen_safer, not fopen.
7712 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7713 yesterday's yacc.c fix.
7715 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7717 * data/glr.c, data/lalr1.cc: Update copyright date.
7719 Fix a destructor bug reported by Wolfgang Spraul in
7720 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7721 * data/yacc.c (yyabortlab): Don't call destructor, and
7722 don't set yychar to EMPTY.
7723 (yyoverflowlab): Don't call destructor.
7724 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7725 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7726 since we no longer output the message "discarding lookahead token
7729 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7731 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7732 fix a small glitch in debugging output.
7733 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7734 after YY_SYMBOL_PRINT where needed.
7736 (struct yyGLRState): Add some comments.
7737 (struct yySemanticOption): Add some comments.
7738 (union yyGLRStackItem): Add comment.
7740 (yymergeOptionSets): Correct this to properly perform the union,
7741 avoiding infinite reported by Michael Rosien.
7744 * tests/glr-regression.at: Add test for GLR merging error reported
7747 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7749 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7750 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7751 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7752 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7753 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7754 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7755 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7756 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7757 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7758 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7759 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7760 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7761 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7762 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7763 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7764 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7765 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7766 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7767 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7768 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7769 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7770 src/output.h, src/parse-gram.c, src/parse-gram.h,
7771 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7772 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7773 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7774 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7775 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7776 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7777 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7778 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7779 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7780 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7781 tests/reduce.at, tests/regression.at, tests/sets.at,
7782 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7783 Update FSF postal mail address.
7785 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7787 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7788 Problem reported by Ralf Menzel.
7790 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7792 * tests/actions.at: Test that stack overflow invokes destructors.
7793 From Marcus Holland-Moritz.
7794 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7796 (yyreturn): to here. That way, destructors are called properly
7797 even if the stack overflows, or the user calls YYACCEPT or
7798 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7799 (yyoverflowlab): Destroy the lookahead.
7801 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7803 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7805 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7807 * NEWS: Bison-generated C parsers no longer quote literal strings
7808 associated with tokens.
7809 * src/output.c (prepare_symbols): Don't escape strings,
7810 since users don't want to see C escapes.
7811 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7813 * tests/input.at (Torturing the Scanner): Likewise.
7814 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7816 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7818 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7819 the data size is known to be too small and we can't increase it.
7820 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7822 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7824 * src/parse-gram.y: Include quotearg.h.
7825 (string_as_id): Quote $1 before using it as a key, since the
7826 lexer no longer quotes it for us.
7827 (string_content): Don't strip quotes, since lexer no longer
7829 * src/scan-gram.l: Include quotearg.h.
7831 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7832 a key, since the rest of the lexer doesn't quote it.
7833 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7834 * tests/regression.at (Token definitions): Check for backslashes
7837 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7838 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7839 (yyparse): Revamp code to generate long syntax error message, to
7840 make it easier to translate, and to avoid problems with arithmetic
7841 overflow. Change "virtual memory" to "memory" in diagnostic, since
7842 we don't know whether the memory is virtual.
7844 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7846 * NEWS: Bison-generated C parsers now use the _ macro to
7848 * data/yacc.c (_) [!defined _]: New macro.
7849 All English strings wrapped inside this macro.
7850 * doc/bison.texinfo (Bison Parser): Document _.
7851 * po/POTFILES.in: Include src/parse-gram.c, since it now
7852 includes translateable strings that parse-gram.y doesn't.
7854 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7856 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7857 reverting the 2004-10-11 change to this function.
7858 (symbol_check_alias_consistency): Don't call symbol_type_set
7859 if the type name is already correct.
7860 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7862 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7864 * tests/regression.at (Token definitions): Don't use a token named
7865 c, as that generates a "#define c ..." that runs afoul of buggy
7866 stdlib.h that uses the identifier c as a member of struct
7867 drand48_data. Problem reported by Horst Wente.
7869 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7871 * bootstrap: Change translation URL from
7872 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7873 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7874 redirection glitches. Problem reported by twlevo@xs4all.nl.
7876 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7878 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7879 after operands; POSIX says this isn't portable for the c99 command.
7881 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7883 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7884 immediately if a data overrun has occurred; this may help us track
7885 down what may be a spurious failure on MacOS.
7887 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7889 Respond to problems reported by twlevo@xs4all.nl.
7891 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7893 * src/vcg.h: Comment fix.
7894 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7895 (G_CMAX): Change to -1 instead of INT_MAX.
7897 * data/yacc.c (yyparse): Omit spaces before #line.
7899 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7901 * src/tables.c (state_number_to_vector_number): Put it inside an
7902 "#if 0", since it's not currently used. Problem reported by
7905 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7907 * src/output.c (escaped_output): Renamed from
7908 escaped_file_name_output, since we now use it for symbol tags as
7909 well. All uses changed.
7910 (symbol_destructors_output, symbol_printers_output):
7911 Escape symbol tags too.
7912 Problem reported by Matyas Forstner in
7913 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7915 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7917 * src/output.c (user_actions_output, token_definitions_output,
7918 symbol_destructors_output, symbol_printers_output): Likewise.
7919 * src/reader.c (prologue_augment): Likewise.
7920 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7922 * src/vcg.c (output_edge): Don't quote linestyle arg.
7923 Problem reported by twlevo@xs4all.nl.
7925 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7927 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7928 example, reported by Derek M Jones. Also, make the example even
7929 more outrageous, to better illustrate how bad the problem is.
7931 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7933 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7934 putsym. Typo reported by Sebastian Piping.
7936 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7938 * doc/bison.texinfo (Language and Grammar): some -> same
7939 (Epilogue): int he -> in the
7940 Typos reported by Sebastian Piping via Justin Pence.
7942 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7944 * tests/glr-regression.at (Improper handling of embedded actions
7945 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7946 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7947 with dollar signs in test names.
7948 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7949 for a similar reason.
7951 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7953 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7954 wants to redefine G_VIEW.
7956 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7958 * src/vcg.c (get_view_str): Remove case for normal_view.
7959 Problem reported by twlevo@xs4all.nl.
7961 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7963 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7964 Problem reported by twlevo@xs4all.nl.
7966 * doc/bison.texinfo: Change @dircategory from "GNU programming
7967 tools" to "Software development". Requested by Richard Stallman
7970 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7972 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7973 Problem reported by twlevo@xs4all.nl.
7975 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7977 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7978 keyword; it's not needed with modern compilers, and it doesn't
7979 affect correctness with older compilers. Suggested by
7982 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7984 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7985 gcc -Wswitch-default.
7986 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7987 * data/yacc.c (yyparse): Likewise.
7989 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7991 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7992 already. Let config.h define any nonstandard values.
7994 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7996 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7997 for the benefit of slower hosts. Problem reported by
8000 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
8002 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
8003 being defined and not used.
8004 * data/lalr1.cc (yyparse): Likewise.
8005 Use "if (false)" rather than "if (0)".
8007 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
8009 * TODO: Mention that we should allow NUL bytes in tokens.
8011 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
8013 * src/scan-skel.l (<<EOF>>): Don't close standard output.
8014 Problem reported by Hans Aberg.
8016 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
8018 * src/getargs.c (version): Happy new year; update overall
8019 program copyright date from 2004 to 2005.
8021 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
8022 Problem reported by Hans Aberg.
8023 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
8024 (Output file names.): Add a test for the case when standard output
8027 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
8029 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
8030 to fix an oversight in the Bison 2.0 manual.
8032 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
8034 * NEWS: Version 2.0. Reformat the existing news items since
8035 1.875, so that related items are grouped together.
8036 * configure.ac (AC_INIT): Bump version to 2.0.
8037 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
8039 * tests/torture.at (Exploding the Stack Size with Alloca): Set
8040 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
8041 otherwise, we're not testing alloca. Unfortunately there's no
8042 simple way to consult HAVE_ALLOCA here.
8044 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
8047 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
8048 hand. This avoids a warning about comparing int to size_t when
8049 GCC warnings are enabled.
8051 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
8053 * NEWS: Bison-generated parsers no longer default to using the
8054 alloca function (when available) to extend the parser stack, due
8055 to widespread problems in unchecked stack-overflow detection.
8056 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
8057 responsibility to set it to a positive value. This lets the user
8058 specify a value that is not a preprocessor constant.
8059 * data/yacc.c (YYMAXDEPTH): Likewise.
8060 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
8061 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
8062 to be a compile-time constant. However, explain the constraints on it.
8063 Also, explain the constraints on YYINITDEPTH.
8064 (Table of Symbols): Explain that alloca is no longer the default.
8065 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
8068 * doc/bison.texinfo (Location Default Action): Mention that n must
8069 be zero when k is zero. Suggested by Frank Heckenbach.
8071 2004-12-22 Akim Demaille <akim@epita.fr>
8073 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
8074 (parser::state_type, parser::semantic_type, parser::location_type):
8075 Private, not public.
8076 (parser::parse): Return ints, not bool.
8077 Returning a bool introduces a problem: 0 corresponds to false, and
8078 it seems weird to return false on success. Returning true changes
8079 the conventions for yyparse.
8080 Alternatively we could return void and send an exception.
8081 There is no clear consensus (yet?).
8082 (state_stack, semantic_stack, location_stack): Rename as...
8083 (state_stack_type, semantic_stack_type, location_stack_type): these.
8084 Private, not public.
8085 * tests/c++.at: New.
8086 * tests/testsuite.at, tests/Makefile.am: Adjust.
8088 2004-12-21 Akim Demaille <akim@epita.fr>
8090 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
8092 2004-12-21 Akim Demaille <akim@epita.fr>
8094 Don't impose std::string for filenames.
8096 * data/lalr1.cc (b4_filename_type): New.
8097 (position::filename): Use it.
8098 (parser.hh): Move the inclusion of stack.hh and location.hh below
8099 the user code, so that needed headers for the filename type can be
8101 Forward declare them before the user code.
8102 * tests/Makefile.am (check-local, installcheck-local): Pass
8103 TESTSUITEFLAGS to the TESTSUITE.
8105 2004-12-20 Akim Demaille <akim@epita.fr>
8107 Use more STL like names: my_class instead of MyClass.
8109 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
8110 (SemanticStack, SemanticType, StateStack, StateType)
8111 (TokenNumberType, Stack, Slice, Traits, Parser::location)
8112 (Parser::value): Rename as...
8113 (location_stack, location_type, rhs_number_type, semantic_stack)
8114 (semantic_type, state_stack, state_type, token_number_type, stack)
8115 (slice, traits, parser::yylloc, parser::yylval): these.
8117 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
8119 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
8121 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
8122 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8124 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
8126 Remove uses of 'short int' and 'unsigned short int'. This raises
8127 some arbitrary limits. It uses more memory but nowadays that's
8128 not much of an issue.
8130 This change does not affect the generated parsers; that's a different
8131 task, as some users will want to conserve memory there.
8133 Ideally we should use size_t to represent all object counts, and
8134 something like ptrdiff_t to represent signed differences of object
8135 counts; but that will require more code-cleanup than I have the
8136 time to do right now.
8138 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
8139 Use size_t, not int or short int, to count objects.
8140 * src/closure.c (nritemset, closure): Likewise.
8141 * src/closure.h (nritemset, closure): Likewise.
8142 * src/nullable.c (nullable_compute): Likewise.
8143 * src/print.c (print_core): Likewise.
8144 * src/print_graph.c (print_core): Likewise.
8145 * src/state.c (state_compare, state_hash): Likewise.
8146 * src/state.h (struct state): Likewise.
8147 * src/tables.c (default_goto, goto_actions): Likewise.
8149 * src/gram.h (rule_number, rule): Use int, not short int.
8150 * src/output.c (prepare_rules): Likewise.
8151 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
8152 errs, reductions): Likewise.
8153 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
8155 * src/tables.c (vector_number, tally, action_number,
8156 ACTION_NUMBER_MINIMUM): Likewise.
8157 * src/output.c (muscle_insert_short_int_table): Remove.
8159 2004-12-17 Akim Demaille <akim@epita.fr>
8161 * data/lalr1.cc: Extensive Doxygenation.
8162 (error_): Rename as...
8163 (error): this, since it is visible to the user.
8165 (Parser::message): Now an automatic variable from...
8166 (Parser::yyreport_syntax_error_): here.
8167 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
8169 * tests/input.at: Escape $.
8171 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
8173 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
8174 Parenthesize rhs to avoid obscure problems with mistakes like
8175 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
8176 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8177 b4_rhs_location): Likewise.
8178 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8179 b4_rhs_location): Likewise.
8181 2004-12-16 Akim Demaille <akim@epita.fr>
8183 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
8184 yacc.c: be sure to stay within yycheck_.
8185 * tests/actions.at: Re-enable C++ tests.
8187 2004-12-16 Akim Demaille <akim@epita.fr>
8189 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
8192 2004-12-16 Akim Demaille <akim@epita.fr>
8194 Use #define to handle the %name-prefix.
8196 * data/glr.c, data/yacc.c: Comment changes.
8197 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
8198 so that one can refer to yylex in the parser file, and have it
8199 renamed, as is the case with other skeletons.
8201 2004-12-16 Akim Demaille <akim@epita.fr>
8203 Move lalr1.cc internals into yy*.
8205 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
8206 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
8207 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
8208 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
8209 (empty_, final_, terror_, errcode_, ntokens_)
8210 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
8211 (looka_, ilooka_, error_range_, nerrs_):
8213 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
8214 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
8215 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
8216 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
8217 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
8218 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
8219 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
8220 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
8223 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
8225 Fix some problems reported by twlevo at xs4all.
8226 * src/symtab.c (symbol_new): Report an error if the input grammar
8227 contains too many symbols. This is better than calling abort() later.
8228 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
8229 (struct node, struct graph):
8230 Rename member expand to stretch. All uses changed.
8231 (struct graph): Remove member layoutalgorithm. All uses removed.
8232 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
8233 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
8235 (N_STRETCH): Rename from N_EXPAND. All uses changed.
8237 2004-12-15 Akim Demaille <akim@epita.fr>
8239 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
8240 Add more Doxygen comments.
8241 (symprint_, stack_print_, reduce_print_, destruct_, pop)
8242 (report_syntax_error_, translate_): Rename as...
8243 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
8244 (yypop_, yyreport_syntax_error_, yytranslate_): this.
8246 2004-12-15 Akim Demaille <akim@epita.fr>
8248 * data/lalr1.cc (lex_): Rename as...
8250 Move the trace here.
8251 Take the %name-prefix into account.
8252 Reported by Alexandre Duret-Lutz.
8254 2004-12-15 Akim Demaille <akim@epita.fr>
8256 Simplify the C++ parser constructor.
8258 * data/lalr1.cc (debug_): Rename as...
8259 (yydebug_): so that the parser's internals are always in the yy*
8262 (b4_parse_param_decl): Remove the leading comma as it is now only
8263 called as unique argument list.
8264 (Parser::Parser): Remove the constructor accepting a location and
8265 an initial debugging level.
8266 Remove from the other ctor the argument for the debugging level.
8267 (debug_level_type, debug_level, set_debug_level): New.
8269 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
8272 2004-12-15 Akim Demaille <akim@epita.fr>
8274 Remove b4_root related material: failure experiment
8275 (which goal was to allow to derive from a class).
8277 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
8278 definitions and uses.
8280 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
8282 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
8283 not 2, since it's not portable to subtract 1 from the start of an
8284 array. The new item 0 is never set or used. All uses changed.
8286 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
8287 the default definition of YYLLOC_DEFAULT. Problem reported
8288 by Frank Heckenbach.
8290 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
8292 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
8293 the normal case and one for the error case. Just use the
8294 first one uniformly. Problem reported by Frank Heckenbach.
8295 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
8296 use exactly the same macro in both places.
8297 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
8298 so that the normal-case YYRHSLOC works for the error case too.
8300 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
8301 (YYLLOC_DEFAULT): Use the same macro as glr.c.
8302 * doc/bison.texinfo (Location Default Action): Don't claim that
8303 we have an array of locations. Use the same macro for both glr
8304 and lalr parsers. Mention YYRHSLOC. Mention what happens when
8307 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8309 * HACKING: Update email addresses to send announcements to.
8311 * configure.ac (AC_INIT): Bump version to 1.875f.
8313 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8315 * NEWS: Version 1.875e.
8316 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
8318 * src/scan-skel.l: Include "complain.h", for "fatal".
8320 * src/relation.h (relation_print, relation_digraph):
8321 Relation sizes are of type relation_node, not size_t (this is
8322 merely a doc fix, since the two types are equivalent).
8323 (relation_transpose): Relation sizes are of type relation_node,
8325 * src/relation.c: Likewise.
8326 (top, infinity): Now of type relation_node, not int.
8327 (traverse, relation_transpose): Use relation_node, not int.
8329 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
8330 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
8331 (yyparse): Remove unused local introduced in 2004-10-25 patch.
8333 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
8334 specifying whether the test should be skipped. Use it tp
8335 specify that the [%defines %skeleton "lalr1.cc"] tests currently
8336 fail on some hosts, and should be skipped.
8338 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
8340 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
8341 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
8342 unless otherwise specified below.
8344 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
8345 to allocate kernel_base, kernel_items, kernel_size, since
8346 they needn't be initialized to 0.
8347 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
8348 * src/closure.c (new_closure): Likewise, for itemset.
8349 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
8350 * src/lalr.c (set_goto_map): Likewise, for temp_map.
8351 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
8352 (build_relations): Likewise for edge, states1, includes.
8353 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
8354 * src/reader.c (packgram): Likewise, for ritem, rules.
8355 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
8356 * src/relation.c (relation_digraph): Likewise for VERTICES.
8357 (relation_transpose): Likewise for new_R, end_R.
8358 * src/symtab.c (symbols_token_translations_init): Likewise for
8360 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
8361 (token_actions): Likewise for yydefact, actrow, conflrow,
8363 (save_column): Likewise for froms[symno], tos[symno].
8364 (goto_actions): Likewise for state_count.
8365 (pack_table): Likewise for base, pos, check.
8366 (tables_generate): Likewise for width.
8368 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
8369 for initial core. Just have a separate core, so we needn't worry
8370 about whether kernel_size and kernel_base are initialized.
8372 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
8373 kernel_size, kernel_items): Remove unnecessary initialization.
8374 * src/conflicts.c (conflicts): Likewise.
8375 * src/derives.c (derives): Likewise.
8376 * src/muscle_tablc (muscle_insert): Likewise.
8377 * src/relation.c (relation_digraph): Likewise.
8378 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
8379 conflrow, conflict_table, conflict_list, table, check):
8382 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
8383 This is because all callers pass unsigned int.
8384 * src/closure.h (new_closure): Likewise.
8386 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
8387 (build_relations): Initialize includes[i] in all cases.
8388 * src/reader.c (packgram): Always initialize rules[ruleno].prec
8389 and rules[ruleno].precsym. Initialize members in order.
8390 * src/relation.c (relation_transpose): Always initialize new_R[i]
8392 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
8394 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
8395 conflict_list[0] was always 0, but now it isn't initialized.
8397 * src/table.c (table_grow): When conflict_table grew, the grown
8398 area wasn't cleared. Fix this.
8400 * lib/.cvsignore: Add strdup.c, strdup.h.
8401 * m4/.cvsignore: Add strdup.m4.
8403 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
8405 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
8406 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
8407 GOTO_NUMBER_MAXIMUM, since we occasionally compute
8408 ngotos + 1 without checking for overflow.
8409 (build_relations): Use END_NODE, not -1, to denote end of edges.
8410 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
8411 build_relations): Use goto_number, not int, for goto numbers.
8412 * src/tables.c (save_column, default_goto): Likewise.
8414 2004-11-23 Akim Demaille <akim@epita.fr>
8416 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
8417 of #defining from yystype.
8418 Don't typedef yystype, C++ does not need it.
8419 This lets it possible to forward declare it as union.
8421 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
8423 * bootstrap (gnulib_modules): Add extensions.
8424 Problem reported by Jim Meyering.
8426 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
8428 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
8429 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
8430 src/system.h, src/tables.c: XFREE -> free, to accommodate
8431 recent change to gnulib xalloc.h.
8432 Problem reported by Jim Meyering.
8434 2004-11-17 Akim Demaille <akim@epita.fr>
8436 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
8438 2004-11-17 Akim Demaille <akim@epita.fr>,
8439 Alexandre Duret-Lutz <adl@gnu.org>
8441 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
8444 Use it instead of cdebug_.
8445 (Parser::debug_stream, Parser::set_debug_stream): New.
8446 (Parser::symprint_): Define cdebug_ for temporary backward
8448 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
8451 2004-11-17 Akim Demaille <akim@epita.fr>
8453 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
8454 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
8455 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
8456 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8458 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
8460 * data/glr.c (yyloc_default): Remove; not used.
8461 Problem reported by Frank Heckenbach.
8463 2004-10-25 Akim Demaille <akim@epita.fr>
8465 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
8466 Introduce another definition to address simple location arrays.
8467 (yyGLRStack): New member: yyerror_range.
8468 (yyrecoverSyntaxError, yyparse): Update it.
8469 (yyrecoverSyntaxError): Use it when shifting the error token to
8470 have an accurate range, equivalent to the one computed by both
8471 yacc.c and lalr1.cc.
8472 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
8473 that column numbers start at column 0, as per GNU Coding
8474 Standards, the others tests, and the doc.
8475 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
8476 Adjust to the above change (first column is 0).
8477 And adjust the location of the "<error>", now covering the whole
8480 2004-10-22 Akim Demaille <akim@epita.fr>
8481 and Paul Eggert <eggert@cs.ucla.edu>
8483 Remove some arbitrary limits on goto numbers and relations.
8484 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
8485 initial values, since they're never used.
8486 (set_goto_map): ngotos is now unsigned, so test for overflow
8487 by seeing whether it wraps around to zero.
8488 * src/lalr.h (goto_number): Now size_t, not short int.
8489 (GOTO_NUMBER_MAXIMUM): Remove.
8490 * src/relation.c (relation_print, traverse, relation_transpose):
8491 Check for END_NODE rather than looking at sign.
8492 * src/relation.h (END_NODE): New macro.
8493 (relation_node): Now size_t, not short int.
8495 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
8497 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
8498 keyword, not an identifier. Problem reported by Baron Schwartz in
8499 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
8501 2004-10-11 Akim Demaille <akim@epita.fr>
8503 * src/symtab.c (symbol_check_alias_consistency): Also check
8504 type names, destructors, and printers.
8505 Reported by Alexandre Duret-Lutz.
8506 Recode the handling of associativity and precedence in terms
8507 of symbol_precedence_set.
8508 Accept no redeclaration at all, not even equal to the previous
8510 (redeclaration): New.
8511 Use it to factor redeclaration complaints.
8512 (symbol_make_alias): Don't set the type of the alias, let
8513 symbol_check_alias_consistency do it as for other features.
8514 * src/symtab.h (symbol): Add new member prec_location, and
8516 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8517 * tests/input.at (Incompatible Aliases): New.
8519 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8521 .cvsignore fixes to accommodate gnulib changes,
8522 and the practice of naming build directories "_build".
8523 * .cvsignore: Add "_*". Sort.
8524 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8525 * m4/.cvsignore: Add "*_gl.m4".
8527 2004-10-06 Akim Demaille <akim@epita.fr>
8529 * src/parse-gram.y (add_param): Fix the truncation of trailing
8532 2004-10-05 Akim Demaille <akim@epita.fr>
8534 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8535 whether the reducion was empty or not. This leaves room to
8536 improve the use of YYLLOC_DEFAULT in such a case.
8537 lalr1.cc is still experimental, so changing this is acceptable.
8538 And finally, there are probably not many users who changed the
8539 handling of locations in GLR, so changing is admissible too.
8541 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8542 empty reduction, set @$ to an empty location ending the previously
8544 Adjust uses to make sure the code is triggered on empty
8546 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8547 expected output: empty reductions have empty locations.
8549 2004-09-29 Akim Demaille <akim@epita.fr>
8551 * data/lalr1.cc: Move towards a more standard C++ coding style
8552 for templates: Class < T > -> Class<T>.
8554 2004-09-29 Akim Demaille <akim@epita.fr>
8556 * data/lalr1.cc: Reinstall the former ctor, for sake of
8557 compatibility, but warn it will be removed.
8558 Move towards a more standard C++ coding style (i.e., type *var ->
8561 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8563 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8564 since it's less likely to work if NULs are involved in the future.
8566 2004-09-27 Akim Demaille <akim@epita.fr>
8568 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8570 2004-09-27 Akim Demaille <akim@epita.fr>
8572 * data/lalr1.cc (b4_parse_param_decl_1): New.
8573 (b4_parse_param_decl): Use it to have different names between attribute
8575 (b4_cc_constructor_call): Likewise.
8577 2004-09-24 Akim Demaille <akim@epita.fr>
8579 * src/parse-gram.y (add_param): Strip the leading and trailing
8580 blanks from a formal argument declaration.
8581 (YY_LOCATION_PRINT): New.
8583 2004-09-24 Akim Demaille <akim@epita.fr>
8585 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8588 2004-09-24 Akim Demaille <akim@epita.fr>
8590 * doc/bison.texinfo (Table of Symbols): Sort.
8592 2004-09-21 Akim Demaille <akim@epita.fr>
8594 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8595 the useless parentheses.
8596 Suggested by Paul Eggert.
8598 2004-09-20 Akim Demaille <akim@epita.fr>
8600 Let the initial-action act on the look-ahead, and use it for the
8601 "initial push" (corresponding to an hypothetical beginning-of-file).
8602 And let lalr1.cc honor %initial-action.
8604 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8606 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8607 (Parser::Parser): Remove the ctor that used to initialize it.
8608 (Parser::parse): Like in the other skeletons, issue the "starting
8609 parse" message before any action.
8610 Honor %initial-action.
8611 Initialize the stacks with the lookahead.
8612 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8614 Push them in the stacks.
8615 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8617 2004-09-20 Akim Demaille <akim@epita.fr>
8619 * doc/bison.texinfo (Initial Action Decl): New.
8621 2004-09-20 Akim Demaille <akim@epita.fr>
8623 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8624 clearer criterion to define it.
8625 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8626 When reducing on an empty RHS, use the latest stacked location as
8628 yylloc is not always available.
8629 * data/glr.c: Likewise.
8630 Also, honor initial-actions.
8632 2004-09-20 Akim Demaille <akim@epita.fr>
8634 * data/yacc.c (YY_LOCATION_PRINT): New.
8635 Define when we know YYLTYPE's structure, i.e., when the default
8636 YYLLOC_DEFAULT is used.
8637 * data/c.m4 (b4_yysymprint_generate): Use it.
8638 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8639 value of the result.
8640 (error_start_): Replace with...
8641 (error_range_): this location array.
8642 This allows to replace code relying on the implementation of
8643 locations by portable code.
8644 * data/yacc.c (yylerrsp): Replace with...
8645 (yyerror_range): this.
8646 Every time a token is popped, update yyerror_range[0], to have an
8647 accurate location for the error token.
8648 * data/glr.c (YY_LOCATION_PRINT): New.
8649 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8650 deference a pointer.
8651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8652 report the location in %printers.
8654 * src/scan-skel.l: Instead of abort, report error messages to ease
8655 understanding skeleton scanning failures.
8657 2004-09-16 Akim Demaille <akim@epita.fr>
8659 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8660 (iterator, const_iterator): these, to be more in the C++ spirit.
8661 Also, return reverse iterators so that when displaying the stack
8662 we display its bottom first.
8663 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8665 We should probably use vector here though.
8667 2004-09-16 Akim Demaille <akim@epita.fr>
8669 Have more complete shift traces.
8671 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8672 to report Shifts instead of ad hoc YYDPRINTF invocations,
8673 including for the error token.
8674 * data/lalr1.cc (symprint_): Output the location.
8675 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8676 output the location within the %printer.
8677 Activate GLR tests, at least to make sure they compile properly.
8678 They still don't pass though.
8679 * tests/calc.at: Adjust expect verbose output, since now "Entering
8680 state..." is on a different line than the "Shifting" message.
8682 2004-09-08 Akim Demaille <akim@epita.fr>
8684 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8685 Bison directive from the Bison file to the invocation of this
8686 macro, so that these directives are passed to
8687 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8688 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8689 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8690 the extra Bison directives instead of the whole series.
8691 Change the grammar so that there are recoverable errors, and
8692 unrecoverable errors. Now we can have the parser give up before
8693 consuming the whole input. As a result we now can observe that
8694 the lookahead is freed when needed.
8695 Change the parser source to parse argv[1] instead of a hard coded
8697 Simplify yylex, and give a value and location to EOF.
8698 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8699 passed directives already coded in the file.
8700 Add some tests to check the location of "error".
8701 For some tests, the C++ parser is correct, and not yacc.c.
8702 For other tests, they provide different, but unsatisfying, values,
8703 so keep the C++ value so that at least one parser is "correct"
8704 according to the test suite.
8705 (Actions after errors): Remove, this is subsumed by the
8706 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8708 2004-09-06 Akim Demaille <akim@epita.fr>
8710 * data/lalr1.cc: Adjust the indentation of the labels.
8714 2004-09-06 Akim Demaille <akim@epita.fr>
8716 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8717 argument, an informative message.
8718 Call YY_SYMBOL_PRINT.
8719 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8720 * data/lalr1.cc (destruct_): Likewise.
8721 In addition, no longer depend on b4_yysymprint_generate and
8722 b4_yydestruct_generate to generate these functions, do it "by
8725 2004-09-03 Akim Demaille <akim@epita.fr>
8727 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8728 invoked, yydestruct the lookahead.
8729 * tests/calc.at (Calculator $1): Update the expected lengths of
8730 traces: there is an added line for the discarded lookahead.
8731 * doc/bison.texinfo (Destructor Decl): Some rewording.
8732 Define "discarded" symbols.
8734 2004-09-02 Akim Demaille <akim@epita.fr>
8736 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8738 2004-09-02 Akim Demaille <akim@epita.fr>
8740 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8741 (YYDSYMPRINTF): Rename as...
8742 (YY_SYMBOL_PRINT): this.
8743 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8745 Use it instead of direct symprint_ calls.
8746 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8749 2004-09-02 Akim Demaille <akim@epita.fr>
8751 * data/lalr1.cc (b4_yysymprint_generate): New.
8752 (symprint_): New member function, defined when YYDEBUG.
8753 Use it consistently instead of token/nterm debugging output by
8755 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8756 %printer calls to use cdebug_ when using lalr1.cc.
8758 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8760 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8761 with #ifdef YYDEBUG.
8763 2004-08-26 Akim Demaille <akim@epita.fr>
8765 * doc/bison.texinfo (Implementing Loops): Rename as...
8766 (Implementing Gotos/Loops): this.
8768 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8770 Adjust to latest gnulib.
8771 * bootstrap (gnulib_modules): Add xalloc-die.
8772 Set LC_ALL=C so that file names sort consistently.
8773 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8774 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8775 uintmax_t.m4, ulonglong.m4.
8776 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8777 po.m4 since we are now using _gl.m4 instead.
8779 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8781 * src/scan-action.l: Remove. Scanning of semantic actions is
8782 handled in scan-gram.l.
8784 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8786 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8788 * src/location.h (struct): The file member is a uniqstr.
8789 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8791 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8793 Fix bug with non-%union parsers that have printers or destructors,
8794 which led to a Bison core dump. Reported by Peter Fales in
8795 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8797 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8798 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8799 not to our own type.
8800 * src/output.c (symbol_destructors_output, symbol_printers_output):
8801 Don't assume %union.
8802 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8803 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8804 UNION-FLAG. All callers changed.
8805 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8806 Use type char, not unsigned int, when declaring an array of char;
8807 this lets us remove a cast.
8808 (Printers and Destructors): Add non-%union test cases.
8810 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8812 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8813 GLR writeups. E.g., avoid frenchspacing and the future tense,
8814 change "lookahead" to "look-ahead", and change "wrt" to "with
8817 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8819 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8820 New sections, split off from the GLR Parsers section. Put the new
8821 Simple GLR Parser near the start of the GLR section, for clarity.
8822 Rewrite connective text.
8824 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
8826 * doc/bison.texinfo (Simple GLR Parsers): New section.
8828 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8830 * NEWS, TODO, doc/bison.texinfo:
8831 Use "look-ahead" instead of "lookahead", to be consistent.
8832 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8833 while we're fixing "look-ahead".
8834 * src/conflicts.c (shift_set): Renamed from shiftset.
8835 (look_ahead_set): Renamed from lookaheadset.
8836 * src/print.c: Likewise.
8837 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8838 name for "lookahead".
8839 (report_types, usage): Likewise.
8840 * src/getargs.h (report_look_ahead_tokens): Renamed from
8842 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8844 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8845 (look_ahead_tokens_print): Renamed from lookaheads_print.
8846 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8847 state_rule_lookaheads_print.
8848 * src/state.h: Likewise.
8849 (reductions.look_ahead_tokens): Renamed from lookaheads.
8850 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8851 AT_DATA_LOOKAHEADS_GRAMMAR.
8853 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8855 * README: Update location of patched M4 distribution.
8857 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8859 Don't assume the C++ compiler takes the same arguments as the C compiler
8861 * configure.ac (O0CXXFLAGS): New var.
8862 * tests/atlocal.in (CXXFLAGS): Use it.
8864 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8866 Fix some "make check" problems with C++ reported by
8867 Albert Chin-A-Young for Tru64 C++ in this thread:
8868 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8870 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8871 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8872 Output to a .cc file for C++, not to a .c file.
8873 * tests/calc.at (AT_CHECK_CALC): Likewise.
8874 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8875 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8877 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8879 * tests/calc.at, tests/actions.at: Workaround for SGI
8880 C++ compiler. (trivial change)
8882 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8884 Spent a few hours checking out which prerequisite versions the
8885 current sources actually require. I went all the way back to
8886 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8887 a seemingly endless set of combinations of versions more recent
8888 than that. The bottom line is that the current sources require
8889 fairly recent versions of the build tools, and it'll be some work
8891 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8892 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8893 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8894 Add comments explaining why those particular versions are
8897 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8898 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8899 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8901 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8902 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8904 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8906 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8907 0.11.5. Suggested by Bruno Haible.
8908 * bootstrap: Remove gettext version checking.
8910 * doc/bison.texinfo (Decl Summary): Also mention that %union
8911 can depend on prerequisite types. Problem reported by Tim
8914 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8916 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8917 * README-alpha: Don't tell people not to package this.
8919 * bootstrap: Don't assume $(...) works; use `...` instead.
8920 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8923 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8924 put into the -d output file, and mention what to do if YYSTYPE is
8927 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8929 Undo change made earlier today: it caused autopoint to not bring
8930 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8933 * bootstrap: Check that gettext version matches what's in
8934 configure.ac. Warn users to ignore robots.txt ERROR 404.
8935 * bootstrap: Undo today's earlier change (logged below).
8936 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8938 The gettext version checking is causing more trouble than it's
8939 curing; remove it. Problem reported by Paul Hilfinger.
8941 * bootstrap: Issue a warning that one can expect a message
8942 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8943 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8945 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8947 Ensure that the C++ compiler used for testing actually works on a
8948 simple test program; if not, skip the C++-related tests. Problem
8949 reported by Vin Shelton in:
8950 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8952 * m4/cxx.m4: New file.
8953 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8954 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8955 * tests/local.at (AT_COMPILE_CXX): Use it.
8957 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8959 * data/glr.c (yylloc): Output this macro even if locations are not
8960 being generated, as the GLR parser needs it even in that case.
8961 Problem reported by Troy A. Johnson
8962 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8964 * configure.ac (AC_INIT): Update to 1.875e.
8966 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8968 * NEWS: Version 1.875d.
8969 * configure.ac (AC_INIT): Likewise.
8970 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8972 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8973 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8974 lalr1.cc runs afoul of the first, and the last two are no longer
8975 supported by GCC 3.4.0.
8976 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8977 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8979 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8981 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8982 unsigned int, for compatibility with latest gnulib hash module.
8983 * src/state.c (state_hash, state_hasher): Likewise.
8984 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8985 * src/uniqstr.c (hash_uniqstr): Likewise.
8987 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8989 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8991 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8992 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8993 character and string literals.
8994 (unexpected_end): New function.
8995 (unexpected_eof): Use it.
8996 (unexpected_newline): New function.
8997 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
9000 * NEWS: Document %expect-rr.
9002 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
9003 Fix typo by replacing $1 with $option.
9004 Remove more 'intl'-related files.
9005 Don't DEFUN AM_INTL_SUBDIR twice.
9007 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
9008 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
9010 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
9011 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
9012 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
9013 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
9014 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
9015 * src/.cvsignore: Add *.output.
9017 * src/parse-gram.y: Put copyright notice inside %{ %} so it
9018 gets copied to the output file.
9020 2004-04-28 Paul Eggert <eggert@twinsun.com>
9022 Get files from the gnulib and po repositories, instead of relying
9023 on them being in our CVS. Upgrade to latest versions of gnulib
9026 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
9027 * bootstrap: Bootstrap from gnulib and po repositories.
9028 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
9029 * README-cvs: Document these changes. Remove version numbers from
9030 mentions of build tools, since they change so often. Mention Flex.
9032 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
9033 (gl_USE_SYSTEM_EXTENSIONS): Add.
9034 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
9035 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
9037 (AC_ISC_POSIX): Remove; we no longer support this
9038 ancient OS, as it gets in the way of latest Autoconf & gnulib.
9039 (AC_HEADER_STDC): Remove: we now assume C89 or better.
9040 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
9041 Do not check for C89 headers, except for locale.h which is used
9042 by the Yacc library and must port to K&R hosts.
9043 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
9044 Do not check for C89 functions, except for setlocale which is
9045 used by the Yacc library.
9046 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
9047 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
9048 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
9049 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
9050 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
9051 AM_GNU_GETTEXT): Remove; now done by:
9052 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
9053 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
9056 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
9057 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
9058 Define to empty, as gnulib.mk will do the rest for us.
9059 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
9061 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
9062 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
9064 * src/files.c: Include gnulib's xstrndup.h.
9066 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
9067 (REALLOC): Use xnrealloc, for likewise.
9068 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
9069 (strnlen, memrchr): Remove decls; functions no longer used.
9072 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
9073 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9074 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
9075 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
9076 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
9077 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
9078 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
9079 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
9080 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
9081 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
9082 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
9083 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9084 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
9085 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
9086 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
9087 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
9088 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
9089 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
9090 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
9091 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
9092 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
9093 Remove, as these files are now generated automatically
9094 by bootstrap or automake.
9096 * po/ChangeLog: Remove: all but one entry was a duplicate
9097 of this file, and I moved that 2000-11-02 entry here.
9099 * config/.cvsignore: Add Makefile, depcomp, install-sh.
9100 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
9101 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
9102 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
9103 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
9104 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
9105 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
9106 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
9107 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
9108 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
9109 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
9111 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
9112 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
9113 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
9114 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
9115 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
9116 * src/.cvsignore: Remove *_.c.
9119 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
9120 support it. (The latest stable gzip doesn't.)
9122 2004-04-27 Paul Eggert <eggert@twinsun.com>
9124 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
9125 case, as stos_ is now used by destructors due to the 2004-02-09
9128 Remove more K&R C support.
9129 * lib/libiberty.y (PARAMS): Remove. All uses removed.
9130 * lib/subpipe.c (errno): Remove decl.
9131 Include <stdlib.h> unconditionally.
9132 (EXIT_FAILURE): Remove macro.
9133 * src/complain.c (vfprintf, strerror): Remove.
9134 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
9136 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
9137 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
9138 (strchr, strspn, memchr): Remove decls.
9139 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
9140 unconditionally. Do not declare perror.
9141 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
9144 * src/complain.c (_): Remove useless defn, as system.h defines this.
9146 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
9147 with latest obstack.h.
9148 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
9149 to procedure types, as obstack.h now does that for us.
9150 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
9152 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
9153 so that this include file can stand alone.
9154 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
9155 does this now. Include subpipe.h first after config.h, to
9156 test whether it can stand alone.
9158 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
9159 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
9162 * tests/synclines.at (%union synch line): Put a dummy member in
9163 the union, because empty unions aren't allowed in C. Caught
9166 2004-04-13 Jim Meyering <jim@meyering.net>
9168 * src/conflicts.c (conflicts_print): Correct format string typo:
9169 use `%%' to produce literal `%'. (trivial change)
9171 2004-03-30 Paul Eggert <eggert@twinsun.com>
9173 * src/getargs.c (version): Update copyright year to 2004.
9175 * data/c.m4 (b4_int_type): Use 'short int' rather than
9176 'short', and similarly for 'long', 'unsigned', etc.
9177 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
9178 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
9179 yy_yypstack, yydumpstack): Likewise.
9180 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
9181 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
9183 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
9184 yy_stack_print, yyparse): Likewise.
9185 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
9186 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
9187 * lib/bitset.c (bitset_print): Likewise.
9188 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
9189 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9190 * lib/bitsetv.c (bitsetv_dump): Likewise.
9191 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
9192 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
9194 * src/LR0.c (allocate_itemsets): Likewise.
9195 * src/gram.h (rule_number, rule): Likewise.
9196 * src/lalr.h (goto_number): Likewise.
9197 * src/nullable.c (nullable_compute): Likewise.
9198 * src/output.c (prepare_rules): Likewise.
9199 * src/relation.c (relation_print, relation_digraph): Likewise.
9200 * src/relation.h (relation_node): Likewise.
9201 * src/state.h (state_number, transitions, errs, reductions,
9202 struct state): Likewise.
9203 * src/symtab.h (symbol_number, struct symbol): Likewise.
9204 * src/tables.c (vector_number, tally, action_number,
9205 default_goto, goto_actions): Likewise.
9206 * tests/existing.at (GNU Cim Grammar): Likewise.
9207 * tests/regression.at (Web2c Actions): Likewise.
9209 * src/output.c (muscle_insert_short_int_table): Renamed from
9210 muscle_insert_short_table. All uses changed.
9212 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9214 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
9215 (declaration): Replace expected_conflicts with expected_sr_conflicts.
9216 Add %expect-rr rule.
9218 * src/scan-gram.l: Recognize %expect-rr.
9220 * src/conflicts.h (expected_sr_conflicts): Rename from
9222 (expected_rr_conflicts): Declare.
9224 * src/conflicts.c (expected_sr_conflicts): Rename from
9226 (expected_rr_conflicts): Define.
9227 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
9229 Use expected_sr_conflicts in place of expected_conflicts.
9230 Warn if expected_rr_conflicts used in non-GLR parser.
9232 * doc/bison.texinfo: Add documentation for %expect-rr.
9234 2004-03-08 Paul Eggert <eggert@gnu.org>
9236 Add support for hex token numbers. Suggested by Odd Arild Olsen in
9237 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
9239 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
9241 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
9242 * src/scan-gram.l (scan_integer): New function.
9244 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
9245 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
9246 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
9247 Say "long int", not "long", for uniformity with GNU style.
9249 2004-02-25 Paul Eggert <eggert@twinsun.com>
9251 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
9252 compilers. This fixes a problem with Intel's C++ compiler being
9253 chatty, reported by Guido Trentalancia in
9254 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
9256 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
9258 Support %destructor and merge error locations in lalr1.cc.
9260 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
9261 (Parser::stos_): Define unconditionally.
9262 (Parser::destruct_): New method. Generate its body with
9263 b4_yydestruct_generate.
9264 (Parser::error_start_): New attribute.
9265 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
9266 token which are discarded.
9267 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
9268 error_start_ when erroneous token are discarded.
9269 (Parser::parse) <yyerrlab1>: Compute the location of the error
9270 token so that it covers all the discarded tokens.
9271 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
9272 it can be called with `%skeleton "lalr1.cc"', and do that.
9274 2004-02-02 Paul Eggert <eggert@twinsun.com>
9276 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
9277 $(top_srcdir)/lib and ../lib. This fixes a bug reported
9278 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
9279 There's no need to mention top_builddir since Automake does that
9281 (INCLUDES): Remove, as Automake says it's obsolescent.
9282 Contents migrated into AM_CPPFLAGS as described above.
9283 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
9285 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9287 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
9288 (yyreportSyntaxError): Handle case where lookahead token is
9291 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9293 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
9294 resulting parsers are compilable with C++.
9296 2003-12-23 Paul Eggert <eggert@twinsun.com>
9298 * config/depcomp, config/install-sh: Sync with Automake 1.8.
9299 * src/output.c (output_skeleton): Rename local var.
9300 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
9301 Bison tokens, as this runs afoul of the 2003-10-07 change that
9302 disallowed NUL bytes in character constants or string literals.
9304 * tests/local.at: Require Autoconf 2.59's Autotest.
9305 * tests/testsuite.at: Don't include local.at, since we now assume
9306 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
9308 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
9309 multiple inclusion warnings.
9311 2003-12-02 Akim Demaille <akim@epita.fr>
9313 * doc/bison.texinfo (How Can I Reset the Parser): More about start
9317 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
9319 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
9321 2003-10-07 Paul Eggert <eggert@twinsun.com>
9323 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
9324 if testsuite doesn't exist.
9326 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
9327 literals, unfortunately.
9328 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
9329 Complain about NUL bytes in character constants or string literals.
9331 2003-10-05 Paul Eggert <eggert@twinsun.com>
9333 * NEWS: Don't document %no-default-prec, as it's still
9335 * doc/bison.texinfo: Document %no-default-prec only if
9336 the defaultprec flag is set. Normally it's not.
9338 2003-10-04 Paul Eggert <eggert@twinsun.com>
9340 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
9341 non-modifiable lvalue, instead of a modifiable one.
9342 * doc/bison.texinfo (Actions): Document that $$ can
9343 be assigned to. Do not claim that $$ and $N are
9344 array element references: user code should not rely on this.
9346 2003-10-01 Paul Eggert <eggert@twinsun.com>
9348 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
9349 (grammar_declaration): Use it.
9350 * src/scan-gram.l: New token %no-default-prec.
9351 * tests/conflicts.at: Revamp tests to use %no-default-prec.
9352 * NEWS, doc/bison.texinfo: Document the above.
9354 2003-10-01 Akim Demaille <akim@epita.fr>
9356 VCG no longer supports long_straight_phase.
9358 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
9359 * src/print_graph.c (print_graph): Adjust.
9361 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
9362 and Paul Eggert <eggert@twinsun.com>
9364 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
9365 Table of Symbols): Document %default-prec.
9366 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
9367 (grammar_declaration): Set default_prec on %default-prec.
9368 * src/scan-gram.l (%default-prec): New token.
9369 * src/reader.h (default_prec): New flag.
9370 * src/reader.c: Likewise.
9371 (packgram): Handle it.
9372 * tests/conflicts.at (%default-prec without %prec,
9373 %default-prec with %prec, %default-prec 1): New tests.
9375 2003-09-30 Paul Eggert <eggert@twinsun.com>
9377 * tests/testsuite.at: Include local.at, not input.at, fixing
9378 a typo in the 2003-08-25 patch.
9380 2003-08-27 Akim Demaille <akim@epita.fr>
9382 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
9385 2003-08-26 Akim Demaille <akim@epita.fr>
9387 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
9388 "<\#" to avoid magic from Gnus when posting parts of this script.
9390 2003-08-26 Akim Demaille <akim@epita.fr>
9392 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
9393 (Parser::parse): here.
9394 Adjust: nerrs and errstatus is now replaced by...
9395 (Parser::nerrs_, Parser::errstatus_): New.
9397 2003-08-25 Akim Demaille <akim@epita.fr>
9399 * config/announce-gen, Makefile.cfg: New.
9400 * Makefile.am: Adjust.
9401 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
9402 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
9404 2003-08-25 Akim Demaille <akim@epita.fr>
9406 When reducing initial empty rules, Bison parser read an initial
9407 location that is not defined. This results in garbage, and that
9408 affects Bison's own parser. Therefore we need (i) to extend Bison
9409 to support a means to initialize this location, and (ii) to use
9410 this CVS Bison to fix CVS Bison's parser.
9412 * src/reader.h, reader.c (epilogue_augment): Remove, replace
9414 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
9415 * src/parse-gram.y: Adjust.
9416 (%initial-action): New.
9417 (%error-verbose): Since we require CVS Bison, there is no reason
9419 * src/scan-gram.l: Adjust.
9420 * src/Makefile.am (YACC): New, to make sure we use our own parser.
9421 * data/yacc.c (yyparse): Use b4_initial_action.
9423 2003-08-25 Akim Demaille <akim@epita.fr>
9425 * doc/bison.texinfo: Don't promote stdout for error messages.
9427 2003-08-25 Akim Demaille <akim@epita.fr>
9429 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
9430 From Alexandre Duret-Lutz.
9432 2003-08-25 Akim Demaille <akim@epita.fr>
9436 2003-08-25 Akim Demaille <akim@epita.fr>
9438 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
9441 2003-08-25 Akim Demaille <akim@epita.fr>
9443 * data/lalr1.cc (Parser::reduce_print_): New.
9446 2003-08-25 Akim Demaille <akim@epita.fr>
9448 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
9449 error recovery loops. This patch is based on
9450 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
9451 Also, augment the similarity between lalr1.cc and yacc.c.
9452 Note: the locations of error recovery rules are not correct yet.
9454 * data/lalr1.cc: Comment changes to augment the similarity between
9455 lalr1.cc and yacc.c.
9456 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
9457 (yyerrlab1): Remove, but where it used to be (now the bottom part of
9458 yyerrlab), when hitting EOF, pop the whole stack here instead of
9459 merely falling thru the default error handling mechanism.
9460 (yyerrorlab): New label, with the old contents of YYERROR,
9461 plus the following change: pop the stack of rhs corresponding
9462 to the production that invoked YYERROR. That is how Yacc
9463 behaves (required by POSIX).
9464 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
9467 2003-08-25 Akim Demaille <akim@epita.fr>
9469 Tune local.at so that people can "autom4te -l autotest calc.at -o
9470 calc" for instance, to extract a sub test suite.
9472 * tests/testsuite.at: Move the initialization, Autotest version
9473 requirement, and AT_TESTED invocation into...
9474 * tests/local.at: here.
9475 * tests/testsuite.at: Include it for compatibility with Autoconf
9477 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
9480 2003-08-04 Paul Eggert <eggert@twinsun.com>
9482 Rework code slightly to avoid gcc -Wtraditional warnings.
9483 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
9484 The returned value is now stored in *YY0. All callers changed.
9485 * src/output.c (merge_output): Adjust to the above change.
9487 2003-07-26 Paul Eggert <eggert@twinsun.com>
9489 * data/glr.c (YYASSERT): New macro.
9490 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
9491 yyresolveStates, yyprocessOneStack):
9492 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
9493 Derived from a suggestion by Frank Heckenbach.
9495 2003-07-25 Paul Eggert <eggert@twinsun.com>
9497 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
9498 for portability to K&R C (after ansi2knr, presumably). See
9499 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
9500 by Frank Heckenbach, though I have omitted the structure-initialization
9501 part of his glr-knr.diff patch since I recall that the Portable
9502 C Compiler didn't require that change.
9504 Let the user specify how to allocate and free memory.
9505 Derived from a suggestion by Frank Heckenbach in
9506 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
9507 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9508 All uses of free, malloc, realloc changed to use these macros,
9509 and unnecessary casts removed.
9510 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9512 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9514 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9515 use s.empty() rather than s == "" to test for empty string; see
9516 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
9519 2003-06-25 Akim Demaille <akim@epita.fr>
9521 * config/depcomp, config/install-sh: Update from masters.
9523 2003-06-20 Paul Eggert <eggert@twinsun.com>
9525 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9526 and return properly parenthesized result.
9527 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9528 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9529 Remove unnecessary parentheses from uses.
9530 * doc/bison.texinfo (Location Default Action): Describe the
9531 conventions for parentheses.
9533 2003-06-19 Paul Eggert <eggert@twinsun.com>
9535 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9536 yyreportTree): Do not assume that size_t is the same width as int,
9537 when printing sizes. Print sizes using an unsigned format.
9538 Problem reported by Frank Heckenbach in
9539 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
9541 Port to Forte Developer 7 C compiler.
9542 * data/glr.c (struct YYLTYPE): If locations are not being used,
9543 declare a single dummy member, as empty structs do not conform
9545 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9546 the Forte Developer 7 C compiler complains that end-of-loop
9547 code is not reached.
9549 2003-06-17 Paul Eggert <eggert@twinsun.com>
9551 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9552 avoid warnings from picky compilers about redefinition of PARAMS.
9554 2003-06-17 Paul Eggert <eggert@twinsun.com>
9558 * NEWS: Document 1.875b.
9560 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9561 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9562 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9563 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9564 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9565 per recent gettext manual's suggestion.
9566 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9567 Use prototypes, not old-style definitions.
9568 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9569 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9570 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9571 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9572 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9573 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9574 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9575 vbitset_or_and_cmp, vbitset_copy): Likewise.
9577 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9578 Do not include <stdlib.h>.
9579 (PARAMS): Define unconditionally for C89.
9580 (ATTRIBUTE_NORETURN): Remove.
9581 (ATTRIBUTE_UNUSED): Define unconditionally.
9583 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9584 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9585 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9586 * lib/vbitset.c, lib/vbitset.h: New files.
9587 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9588 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9591 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9592 `How Can I Reset @code{yyparse}', since texinfo does not allow
9593 arbitrary @ in node names.
9595 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9596 shouldn't be needed according to the gettext 0.12.1 documentation
9597 but which seem to be needed anyway: codeset.m4 glibc21.m4
9598 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9599 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
9600 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
9602 * lib/.cvsignore: Add stdbool.h.
9603 * m4/.cvsignore: Add nls.m4, po.m4.
9605 Upgrade to CVS gnulib.
9606 * stdbool_.h: File renamed from stdbool.h.in.
9607 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9609 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9610 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9611 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9612 (MOSTLYCLEANFILES): New var.
9613 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9614 (stdbool.h): New rule.
9615 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9616 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9617 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9618 m4/quote.m4: Upgrade to today's gnulib.
9620 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9621 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9622 the tests right now.
9623 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9624 yyerror are declared before use; C99 requires this.
9626 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9628 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9630 (yyrecoverSyntaxError): Correct the logic for setting and testing
9632 Correct comment on handling EOF.
9633 Allow states with only a default reduction, rather than failing
9634 (I can't quite reconstruct why these were not allowed before).
9636 Fixes to avoid problem that $-N rules in GLR parsers can cause
9637 buffer overruns, corrupting state.
9639 * src/output.c (prepare_rules): Output max_left_semantic_context
9641 * src/reader.h (max_left_semantic_context): New variable declaration.
9642 * src/scan-gram.l (max_left_semantic_context): Define.
9643 (handle_action_dollar): Update max_left_semantic_context.
9644 * data/glr.c (YYMAXLEFT): New definition.
9645 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9646 (yyresolveAction): Ditto.
9648 Fixes to problems with location handling in GLR parsers reported by
9649 Frank Heckenbach (2003/06/05).
9651 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9652 (YYRHSLOC): Add parentheses, and define only if locations used.
9653 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9655 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9656 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
9658 * tests/cxx-type.at: Exercise location information; update tests
9659 to differentiate output with and without locations.
9660 Remove forward declarations of yylex and yyerror---caused errors
9661 because default YYLTYPE not yet defined.
9662 Change semantic actions to compute strings, rather than printing
9663 them directly (to test proper passing of semantics values). Change
9664 output to prefix notation and update test data and expected results.
9665 (yylex): Track locations.
9666 (stmtMerge): Return value rather than printing, and include arguments
9669 2003-06-03 Paul Eggert <eggert@twinsun.com>
9671 Avoid warnings generated by GCC 2.95.4 when Bison is
9672 configured with --enable-gcc-warnings.
9673 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9674 yy::]b4_parser_class_name[::translate_,
9675 yy::Stack::operator[] (unsigned),
9676 yy::Stack::operator[] (unsigned) const,
9677 yy::Slice::operator[] (unsigned),
9678 yy::Slice::operator[] (unsigned) const):
9679 Rename local vars to avoid warnings.
9680 * tests/glr-regression.at (Improper handling of embedded actions
9681 and $-N in GLR parsers): Remove unused local variable from yylex.
9682 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9683 (void) as arg when not pure, since we now assume C89 when building
9684 Bison. Pacify GCC by using parameter.
9686 2003-06-02 Paul Eggert <eggert@twinsun.com>
9688 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9689 yy::Location::lines, yy::Location::columns): Rename arguments
9690 to avoid shadowing; this removes a warning generated by GCC 3.3.
9692 2003-06-01 Paul Eggert <eggert@twinsun.com>
9694 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9695 to g++, as GCC 3.3 complains if you do it.
9696 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9697 everything that WARNING_CFLAGS has, except omit warnings
9698 not suitable for C++.
9699 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9700 * tests/atlocal.in (CXXFLAGS): New var.
9701 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9703 Fix a GLR parser bug I reported in February; see
9704 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9705 The problem was that GLR parsers did not conform to the C standard,
9706 because actions like { $1 = $2 + $3; } expanded to expressions
9707 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9708 to a local variable. The C standard says that expressions
9709 like (var = f ()) + (var = f ()) have undefined behavior.
9710 Another problem was that GCC sometimes issues warnings that
9711 yyfill and its parameters are unused.
9713 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9715 (yyfill): New function.
9717 (yyuserAction): Change type of yynormal to bool, so that it matches
9718 the new yyfill signature. Mark it as possibly unused.
9721 Follow up on a bug I reported in February, where a Bison-generated
9722 parser can loop. Provide a test case and a fix for yacc.c. I
9723 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9724 The original bug report is in:
9725 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9727 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9728 macro's size was becoming unwieldy.
9729 (yyerrlab): Do not discard an empty lookahead symbol, as this
9730 might destroy garbage.
9731 (yyerrorlab): New label, with the old contents of YYERROR,
9732 plus the following change: pop the stack of rhs corresponding
9733 to the production that invoked YYERROR. That is how Yacc
9734 behaves, and POSIX requires this behavior.
9735 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9736 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9737 Define 'alarm' to do nothing if unistd.h is not available.
9738 Add a new rule "exp: '-' error;" to test the above change to
9739 data/yacc.c. Use 'alarm' to abort any test taking longer than
9740 10 seconds, as it's probably looping.
9741 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9742 Also, the new yacc.c generates two fewer diagnostics for an
9745 2003-05-24 Paul Eggert <eggert@twinsun.com>
9747 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9748 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9749 This fixes a problem reported by John Bowman when the Compaq/HP
9750 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9752 * data/yacc.c (union yyalloc): Likewise.
9753 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9755 Switch from 'int' to 'bool' where that makes sense.
9757 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9758 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9759 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9760 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9761 Return or accept bool, not int. All callers changed.
9762 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9763 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9764 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9765 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9766 bitset_or_and_cmp_): Likewise.
9767 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9768 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9769 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9770 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9771 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9772 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9773 bitset_stats_or_and_cmp): Likewise.
9774 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9775 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9776 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9777 ebitset_xor_cmp): Likewise.
9778 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9779 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9780 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9781 lbitset_xor_cmp): Likewise.
9782 * lib/bbitset.h: Include <stdbool.h>.
9783 (struct bitset_vtable): The following members now return bool, not
9784 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9785 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9787 * src/conflicts.c (count_rr_conflicts): Likewise.
9788 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9790 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9791 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9792 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9793 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9794 graph_flag): Likewise.
9795 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9796 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9797 graph_flag): Likewise.
9798 * src/output.c (error_verbose): Likewise.
9799 * src/output.h (error_verbose): Likewise.
9800 * src/reader.c (start_flag, typed): Likewise.
9801 * src/reader.h (typed): Likewise.
9802 * src/getargs.c (LOCATIONS_OPTION): New constant.
9803 (long_options, getargs): Use it.
9804 * src/lalr.c (build_relations): Use bool, not int.
9805 * src/nullable.c (nullable_compute): Likewise.
9806 * src/print.c (print_reductions): Likewise.
9807 * src/tables.c (action_row, pack_vector): Likewise.
9808 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9809 * src/output.c (prepare): Use it.
9810 * src/output.c (token_definitions_output,
9811 symbol_destructors_output, symbol_destructors_output): Use string,
9812 not boolean integer, to keep track of whether to output separator.
9813 * src/print_graph.c (print_core): Likewise.
9814 * src/state.c (state_rule_lookaheads_print): Likewise.
9816 * config/install-sh: Sync from automake 1.7.5.
9818 2003-05-14 Paul Eggert <eggert@twinsun.com>
9820 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9821 semicolon after a grammar declaration, in the interest of possible
9822 future changes to the Bison input language.
9823 Do not allow a stray semicolon at the start of the grammar.
9824 (rhses.1): Allow one or more semicolons after any rule, including
9825 just before "|" as required by POSIX.
9826 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9829 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9831 %parse-param support for lalr1.cc.
9833 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9834 b4_cc_constructor_calls, b4_cc_constructor_call,
9835 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9837 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9838 parse-param arguments.
9839 (yy::b4_parser_class_name): Declare instance variables to
9840 hold parse-param arguments.
9841 * tests/calc.at: s/value/semantic_value/ because value clashes
9842 with a member of yy::b4_parser_class_name. Adjust C++ code
9843 to handle %parse-param. Enable %parse-param test in C++.
9845 2003-05-12 Paul Eggert <eggert@twinsun.com>
9847 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9848 English a bit. Fix fclose typo. Change "const char" to "char
9849 const", and use ANSI C rather than K&R for "main". Suggest
9850 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9851 and suggest yy_switch_to_buffer.
9853 2003-05-05 Paul Eggert <eggert@twinsun.com>
9855 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9856 C89. This avoids a diagnostic on compilers that define __STDC__
9857 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9858 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9860 2003-05-03 Paul Eggert <eggert@twinsun.com>
9862 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9863 Do not overrun array bounds.
9864 This should fix a bug reported today by Olatunji Oluwabukunmi in
9865 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9867 2003-04-29 Akim Demaille <akim@epita.fr>
9869 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9870 * src/getargs.c, src/getargs.h: here, as bool, not int.
9871 (nondeterministic_parser): New.
9872 * src/parse-gram.y, src/scan-gram.l: Support
9873 %nondeterministic-parser.
9874 * src/output.c (prepare): Use nondeterministic_parser instead
9875 of glr_parser where appropriate.
9876 * src/tables.c (conflict_row, action_row, save_row)
9877 (token_actions, token_actions, pack_vector): Ditto.
9879 2003-04-29 Akim Demaille <akim@epita.fr>
9881 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9883 2003-04-29 Akim Demaille <akim@epita.fr>
9885 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9886 with %pure-parser and %locations to exercise the patch from Yakov
9889 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9891 * data/yacc.c: (b4_lex_param): Corrected for the case where
9892 %lex-param is provided and %pure-parser isn't.
9894 2003-04-27 Paul Eggert <eggert@twinsun.com>
9896 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9897 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9898 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9899 if it is not defined.
9900 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9902 2003-04-26 Paul Eggert <eggert@twinsun.com>
9904 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9905 Declare to be of type suitable for the ninf value itself, not of
9906 type suitable for the corresponding table, since the latter might
9907 be unsigned but the ninf value might be negative. This fixes a
9908 bug reported by Alexandre Duret-Lutz in
9909 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9911 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9912 invokes it. We shouldn't invoke it twice because it will attempt
9913 to put error.o in the archive twice. This fixes a glitch reported
9914 by Martin Mokrejs in
9915 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9917 2003-04-21 Paul Eggert <eggert@twinsun.com>
9919 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9922 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9924 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9925 Fix obvious typo that results in uncompilable GLR parsers
9926 when both %pure-parser and %locations are used. (trivial change)
9928 2003-04-17 Paul Eggert <eggert@twinsun.com>
9930 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9931 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9932 Do not insert the expected token via unput, as this runs afoul
9933 of a POSIX-compatibility bug in flex 2.5.31.
9934 All uses changed to BEGIN the parent state,
9935 since we no longer insert the expected token via unput.
9936 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9937 that is no longer emitted after the above change.
9939 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9940 the first one. This change is from Paul Hilfinger, and it fixes
9941 regression reported by Werner Lemberg in
9942 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9944 (resolve_sr_conflict): Don't invoke state_errs_set
9945 unless one or more tokens have been explicitly made errors.
9946 Otherwise, the above change causes Bison to abort.
9948 * tests/existing.at (GNU pic Grammar): New test case, taken from
9951 2003-03-31 Akim Demaille <akim@epita.fr>
9953 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9955 2003-03-31 Akim Demaille <akim@epita.fr>
9957 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9960 2003-03-31 Akim Demaille <akim@epita.fr>
9962 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9963 From Paul Hilfinger.
9965 2003-03-29 Akim Demaille <akim@epita.fr>
9967 * m4/error.m4: Do not put under dynamic conditions some code which
9968 expansion is under static control.
9970 2003-03-29 Akim Demaille <akim@epita.fr>
9972 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9974 2003-03-29 Akim Demaille <akim@epita.fr>
9976 * doc/bison.texinfo (Strings are Destroyed): New.
9978 2003-03-13 Paul Eggert <eggert@twinsun.com>
9980 * .cvsignore: Add configure.lineno.
9981 * src/.cvsignore: Add yacc.
9982 * tests/.cvsignore: Add testsuite.log.
9983 * doc/fdl.texi: Sync with latest FSF version.
9985 2003-03-12 Paul Eggert <eggert@twinsun.com>
9987 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9988 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9989 cursor, instead of leaving it undefined. This fixes a bug
9990 reported by Tim Van Holder in
9991 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9992 * tests/input.at (Torturing the Scanner): Test the scanner on
9993 an empty input file, which was Tim Van Holder's test case.
9995 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9996 <sys/resource.h> can be included, include sys/time.h and
9997 sys/times.h first, if available. This works around the SunOS
9998 4.1.4 porting bug reported by Bruce Becker in
9999 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
10001 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
10002 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
10003 AC_HEADER_SYS_WAIT.
10005 Merge changes from gnulib. This was prompted because the CVS
10006 snapshot didn't build on Solaris 7 due to strnlen problems.
10008 These changes need to be merged back into gnulib:
10009 * lib/hash.c: Include <stdbool.h> unconditionally.
10010 * m4/onceonly.m4 (m4_quote): New macro.
10011 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
10012 Quote AC_FOREACH variable-expansions properly.
10013 The 2003-01-03 obstack.h change also needs merging.
10014 {end of changes requiring merging}
10016 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10017 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
10018 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
10019 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
10020 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
10021 New files, imported from gnulib.
10022 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
10025 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
10026 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
10029 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
10031 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
10032 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
10033 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
10034 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
10035 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
10036 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
10037 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
10038 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
10039 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
10040 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
10041 (jm_PREREQ_ARGMATCH): Remove.
10042 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
10043 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
10045 * src/system.h: Include <stdbool.h> unconditionally.
10047 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
10048 assuming at least C89 in the bitset code for some time now.
10050 2003-03-03 Akim Demaille <akim@epita.fr>
10054 2003-03-02 Akim Demaille <akim@epita.fr>
10056 * doc/bison.texinfo (Table of Symbols): Reactivate the
10057 documentation for %lex-param, and %parse-param.
10059 2003-03-02 Akim Demaille <akim@epita.fr>
10061 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
10062 generate verbose error messages.
10063 Use the number of tokens as an upper bound in yytname, as it
10064 cannot be a non terminal.
10066 2003-03-02 Akim Demaille <akim@epita.fr>
10068 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
10071 2003-03-02 Akim Demaille <akim@epita.fr>
10073 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
10074 Use them to exercise yycheck overrun.
10075 Based on Andrew Suffield's grammar.
10077 2003-03-02 Akim Demaille <akim@epita.fr>
10079 Create tests/local.at for Bison generic testing macros.
10081 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
10082 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
10084 * tests/calc.at (AT_CHECK_CALC): Adjust.
10085 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
10086 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
10087 * tests/local.at: here.
10088 (AT_COMPILE_CXX): Tags the tests using it as c++.
10089 Ignore the test if CXX is not functional.
10091 2003-03-01 Paul Eggert <eggert@twinsun.com>
10093 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
10094 not loc->end, since loc->end might contain garbage and this leads
10095 to undefined behavior on some platforms.
10096 (id_loc, token_start): Use (IF_LINTed) initial values that do not
10097 depend on *loc, so that the reader doesn't give the the false
10098 impression that *loc is initialized.
10099 (<INITIAL>"%%"): Do not bother setting code_start, since its value
10100 does not survive the return.
10102 2003-03-01 Akim Demaille <akim@epita.fr>
10104 * src/scan-gram.l (code_start): Always initialize it when entering
10105 into yylex, as SC_EPILOGUE is activated *before* the corresponding
10106 yylex invocation. An alternative would be making it static, but
10107 then it starts with the second %%'s beginning, instead of its end.
10109 2003-02-28 Paul Eggert <eggert@twinsun.com>
10111 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
10112 around a UnixWare 7.1.1 porting bug reported by John Hughes in
10113 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
10115 2003-02-26 Paul Eggert <eggert@twinsun.com>
10117 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
10118 Remove Sequent/Pyramid discussion (nobody uses them any more).
10119 Merge VMS and MS-DOS discussion; these ports may well be dead
10120 but let's keep mentioning them for now. Put <> around email
10121 addresses. Add copyright notice.
10123 2003-02-24 Paul Eggert <eggert@twinsun.com>
10125 * data/glr.c (yy_reduce_print): yylineno -> yylno,
10126 to avoid collision with flex use of yylineno.
10127 Problem reported by Bruce Lilly in
10128 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
10129 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10130 * data/yacc.c (yy_reduce_print): Likewise.
10132 * config/depcomp: Sync with Automake 1.7.3.
10134 2003-02-21 Akim Demaille <akim@epita.fr>
10136 * data/lalr1.cc: Use temporary variables instead of casts to
10137 change integer types.
10138 Suggested by Paul Eggert.
10140 2003-02-21 Akim Demaille <akim@epita.fr>
10142 * doc/bison.texinfo: Use "location" consistently to refer to @n,
10143 to avoid confusions with lalr1.cc's notion of Position.
10144 Suggested by Paul Eggert.
10146 2003-02-20 Akim Demaille <akim@epita.fr>
10148 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
10149 before initial_columns.
10150 (location.hh): Use consistent variable names when defining the
10152 Use "last" so that we subtract from Positions, not from unsigned.
10154 2003-02-20 Akim Demaille <akim@epita.fr>
10156 * data/lalr1.cc (position.hh): New subfile, including the extended
10157 and Doxygen'ed documentation of class Position.
10158 (location.hh): Use it.
10159 Document a` la Doxygen.
10160 With the help of Benoit Perrot.
10162 2003-02-20 Akim Demaille <akim@epita.fr>
10164 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
10166 Redefine AT_YYERROR_SEES_LOC_IF using it.
10167 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
10169 Don't use the location in yy::Parser::error_ and
10170 yy::Parser::print_ when not %locations.
10171 Activate more lalr1.cc tests.
10173 2003-02-19 Akim Demaille <akim@epita.fr>
10175 * data/lalr1.cc: When displaying a line number, be sure to make it
10178 2003-02-19 Akim Demaille <akim@epita.fr>
10180 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
10182 (YYABORT, YYACCEPT, YYERROR): New.
10183 * tests/calc.at: Renable the lalr1.cc test.
10185 2003-02-19 Akim Demaille <akim@epita.fr>
10187 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
10188 error recovery, mixing with/without pops and discarding of the
10191 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
10193 2003-02-17 Paul Eggert <eggert@twinsun.com>
10195 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
10196 * tests/testsuite.at (AT_COMPILE): Use them.
10197 This fixes the testsuite problem reported by Robert Lentz in
10198 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
10200 2003-02-12 Paul Eggert <eggert@twinsun.com>
10202 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
10203 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
10204 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
10205 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
10206 Check for malloc failure, for consistency with yacc.c.
10207 (yytname_size): Remove, for consistency with yacc.c.
10209 The bug still remains in data/lalr1.cc, as I didn't have time
10212 2003-02-06 Akim Demaille <akim@epita.fr>
10214 * configure.ac (GXX): Rename as...
10215 (CXX): this, to keep the original Autoconf semantics.
10217 * data/lalr1.cc: Fix b4_copyright invocations.
10218 If YYDEBUG is not defined, don't depend upon name_ being defined.
10219 (location.hh): Include string and iostream.
10220 (Position::filename): New member.
10221 (Position::Position ()): New.
10222 (operator<< (Position)): New.
10223 (operator- (Position, int)): New.
10224 (Location::first, Location::last): Rename as...
10225 (Location::begin, Location::end): these, to mock the conventional
10227 (operator<< (Location)): New.
10228 * tests/atlocal.in (CXX): New.
10229 * tests/testsuite.at (AT_COMPILE_CXX): New.
10230 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
10231 locations in a more synthetic way.
10232 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
10234 Adjust the C locations to match those from Emacs: first column is
10236 Change all the expected results.
10237 Conform to the GCS: simplify the locations when applicable.
10238 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
10239 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
10240 these CPP macros with the m4 macros new defined by...
10241 (AT_CHECK_PUSHDEFS): this, i.e.:
10242 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
10243 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
10245 (AT_CHECK_POPDEFS): Undefine them.
10246 (AT_CHECK_CALC_LALR1_CC): New.
10247 Use it for the first lalr1.cc test.
10249 2003-02-04 Akim Demaille <akim@epita.fr>
10251 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
10252 Location as is defined.
10254 2003-02-04 Akim Demaille <akim@epita.fr>
10256 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
10257 name_ being defined.
10259 2003-02-03 Paul Eggert <eggert@twinsun.com>
10261 * src/gram.h (start_symbol): Remove unused decl.
10263 Use more-consistent naming conventions for local vars.
10265 * src/derives.c (derives_compute): Change type of local var from
10266 int to rule_number.
10267 * src/gram.c (grammar_rules_partial_print): Likewise.
10268 * src/print.c (print_core): Likewise.
10269 * src/reduce.c (reduce_grammar_tables): Likewise.
10271 * src/gram.c (grammar_dump): Change name of item_number *
10272 local var from r to rp.
10273 * src/nullable.c (nullable_compute): Likewise.
10275 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
10277 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
10278 for symbol or symbol_number var.
10279 * src/reader.c (grammar_start_symbol_set): Likewise.
10280 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
10282 * src/state.c (transitions_to): Likewise.
10283 * src/state.h: Likewise.
10284 * src/tables.c (symbol_number_to_vector_number): Likewise.
10286 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
10289 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
10292 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
10295 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
10296 Use str, not s, for char * var. Use ch, not c, for character var.
10297 Use size for size var.
10299 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
10301 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
10303 * src/uniqstr.h: Likewise.
10305 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10306 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10307 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
10308 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
10309 param to have same name as that of enum, so that we don't use
10310 "s" to stand for a non-state.
10312 2003-02-02 Akim Demaille <akim@epita.fr>
10314 * src/scan-skel.l: Scan more than one inert character per yylex
10317 2003-02-01 Paul Eggert <eggert@twinsun.com>
10321 * po/LINGUAS: Add ms.
10323 2003-01-30 Akim Demaille <akim@epita.fr>
10325 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
10327 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10329 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
10332 Changes in response to error report by S. Eken: GLR mode does not
10333 handle negative $ indices or $ indices in embedded rules correctly.
10334 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
10336 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
10337 (b4_rhs_location): Ditto.
10338 (yyfill): New function to copy from stack tree into array
10340 (yyuserAction): Modify to allow incremental move of semantic values
10341 to rhs array when in GLR mode.
10342 Define YYFILL to use in user-defined actions to fill semantic array
10344 Remove dummy use of yystack, as there is now a guaranteed use.
10345 (yydoAction): Modify to allow incremental move of semantic values
10346 to rhs array when in GLR mode.
10347 (yyresolveAction): Ditto.
10348 (yyglrShiftDefer): Update comment.
10349 (yyresolveStates): Use X == NULL for pointers, not !X.
10350 (yyglrReduce): Ditto.
10351 (yydoAction): Ditto
10353 * tests/glr-regr1.at: Rename to ...
10354 * tests/glr-regression.at: Add new regression test for the problems
10355 described above (adapted from S. Eken).
10356 Update copyright notice.
10357 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
10358 * tests/Makefile.am: Ditto.
10360 2003-01-28 Paul Eggert <eggert@twinsun.com>
10362 * data/lalr1.cc: Do not use @output_header_name@ unless
10363 b4_defines_flag is set. This fixes two bugs reported by
10365 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
10366 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
10368 2003-01-21 Paul Eggert <eggert@twinsun.com>
10370 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
10371 we don't need to worry about yyerrlab1 being reported as an
10372 "unused label" by non-GCC C compilers. The downside is that if
10373 locations are used then a couple of statements are duplicated each
10374 time YYERROR is invoked, but the upside is that the warnings
10376 (yyerrlab1): Move code to YERROR.
10377 (yyerrlab2): Remove. Change uses back to yyerrlab1.
10378 This reverts some of the 2002-12-27 change.
10380 2003-01-17 Paul Eggert <eggert@twinsun.com>
10382 * src/output.c (symbol_printers_output): Fix typo that led
10383 to core dump. Problem reported by Antonio Rus in
10384 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
10386 2003-01-13 Akim Demaille <akim@epita.fr>,
10387 Quoc Peyrot <chojin@lrde.epita.fr>,
10388 Robert Anisko <anisko_r@lrde.epita.fr>
10390 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
10391 when the stacks contain one element, as the loop would otherwise
10392 free the last state, and then use the top state (the one we just
10393 popped). This means that the initial elements will not be freed
10394 explicitly, as is the case in yacc.c; it is not a problem, as
10395 these elements have fake values.
10397 2003-01-11 Paul Eggert <eggert@twinsun.com>
10399 * NEWS: %expect-violations are now just warnings, reverting
10400 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
10401 bootstrapping problem reported by Matthias Klose; see
10402 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
10403 * src/conflicts.c (conflicts_print): Likewise.
10404 * tests/conflicts.at (%expect not enough, %expect too much,
10405 %expect with reduce conflicts): Likewise.
10406 * doc/bison.texinfo (Expect Decl): Document this. Also mention
10407 that the warning is enabled if the number of conflicts changes
10408 (not necessarily increases).
10410 * src/getargs.c (version): Update copyright year.
10412 2003-01-09 Akim Demaille <akim@epita.fr>
10414 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
10416 2003-01-08 Paul Eggert <eggert@twinsun.com>
10418 * Makefile.maint (WGETFLAGS):
10419 New macro, containing "-C off" to disable proxy caches.
10420 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
10421 (rel-check): Use $(WGET) instead of wget.
10423 2003-01-06 Paul Eggert <eggert@twinsun.com>
10425 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
10426 the GLR paper of Scott, Johnstone and Hussain.
10428 2003-01-04 Paul Eggert <eggert@twinsun.com>
10430 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
10431 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
10432 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
10433 (EXTRA_LIBRARIES): New var, for liby.a.
10434 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
10435 (EXTRA_SCRIPTS): New var, for yacc.
10437 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
10438 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
10439 Problem reported by Nelson H. F. Beebe.
10441 2003-01-03 Paul Eggert <eggert@twinsun.com>
10443 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
10444 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
10445 when compiling Bison 1.875's `bitset bset = obstack_alloc
10446 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
10448 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
10449 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
10450 grow to a huge size with typical invocation.
10452 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
10453 Use the pattern recommended by Autoconf 2.57, except also protect
10454 against double-definition.
10455 * src/system.h: Likewise.
10456 Portability issues reported by Nelson H. F. Beebe.
10458 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
10459 All uses changed. Provide a definition in both C and C++.
10460 (yytrue, yyfalse): Define even if defined (__cplusplus).
10462 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
10463 Reported by Nelson H. F. Beebe.
10465 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
10467 2003-01-02 Paul Eggert <eggert@twinsun.com>
10469 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
10470 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
10471 Bug reported by Nelson H. F. Beebe.
10473 2003-01-01 Paul Eggert <eggert@twinsun.com>
10477 2002-12-30 Paul Eggert <eggert@twinsun.com>
10479 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
10481 (<INITIAL>","): Here. This causes stray "," to be treated
10484 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
10485 last brace in braced code when not in Yacc mode, for compatibility
10486 with Bison 1.35. This resurrects the 2001-12-15 patch to
10489 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
10490 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
10492 2002-12-28 Paul Eggert <eggert@twinsun.com>
10494 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
10495 that of SYM's type. This fixes Debian bug 168069, reported by
10498 2002-12-28 Paul Eggert <eggert@twinsun.com>
10502 Switch back to the Yacc style of conflict reports, undoing some
10503 of the 2002-07-30 change.
10504 * doc/bison.texinfo (Understanding): Use Yacc style for
10505 conflict reports. Also, use new way of locating rules.
10506 * src/conflicts.c (conflict_report):
10507 Renamed from conflict_report_yacc, removing the old
10508 'conflict_report'. Translate the entire conflict report at once,
10509 so that we don't assume that "," has the same interpretation in
10511 (conflicts_output): Use Yacc-style conflict report for each state,
10512 instead of our more-complicated style.
10513 (conflicts_print): Use Yacc-style conflict report, except print
10514 the input file name when not emulating Yacc.
10515 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10516 Conflicted Reduction, %expect not enough, %expect too much,
10517 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10518 * tests/existing.at (GNU Cim Grammar): Likewise.
10519 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10521 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10522 fatal): Don't invoke fflush; it's not needed and it might even be
10523 harmful for stdout, as stdout might not be open.
10524 * src/reduce.c (reduce_print): Likewise.
10526 2002-12-27 Paul Eggert <eggert@twinsun.com>
10528 Fix a bug where error locations were not being recorded correctly.
10529 This problem was originally reported by Paul Hilfinger in
10530 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
10532 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10533 top of the location stack's error locations.
10534 (yyerrlab): Set it. When discarding a token, push its location
10535 onto yylerrsp so that we don't lose track of the error's end.
10536 (yyerrlab1): Now is only the target of YYERROR, so that we can
10537 properly record the location of the action that failed. For GCC
10538 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10539 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10540 (yyerrlab2): New label, which yyerrlab now falls through to.
10541 Compute the error's location by applying YYLLOC_DEFAULT to
10542 the locations of all the symbols that went into the error.
10543 * doc/bison.texinfo (Location Default Action): Mention that
10544 YYLLOC_DEFAULT is also invoked for syntax errors.
10545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10546 Error locations include the locations of all the tokens that were
10547 discarded, not just the last token.
10549 2002-12-26 Paul Eggert <eggert@twinsun.com>
10551 * src/files.c: Include quote.h.
10552 (compute_output_file_names): Warn if we detect conflicting
10553 outputs to the same file. This should catch the misunderstanding
10554 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10556 * src/conflicts.c (conflicts_print): If the user specifies
10557 "%expect N", report an error if there are any reduce/reduce
10558 conflicts. This is what the manual says should happen.
10559 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10560 * tests/conflicts.at (%expect with reduce conflicts): New test.
10562 Don't use m4_include on relative file names, as it doesn't work as
10563 desired if there happens to be a file with that name under ".".
10565 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10566 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10567 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10568 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10569 * src/output.c (output_skeleton): Use full path names when
10570 specifying a file to include; don't rely on include path, as
10571 it's unreliable when the working file contains a file with
10574 2002-12-25 Paul Eggert <eggert@twinsun.com>
10576 Remove obsolete references to bison.simple and bison.hairy.
10577 Problem mentioned by Aubin Mahe in
10578 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10579 * data/glr.c: Comment fix.
10580 * doc/bison.1: Remove references. Also, mention "yacc".
10582 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10585 * src/parse-gram.y (declaration): Use enum "report_states" rather
10586 than its numeric value 1.
10588 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10589 opening a new one. This fixes Debian bug 165349, reported by
10592 2002-12-24 Paul Eggert <eggert@twinsun.com>
10596 * Makefile.maint (cvs-update): Don't assume that the shell
10597 supports $(...), as Solaris sh doesn't.
10599 * src/parse-gram.y (lloc_default): Remove test for empty
10600 nonterminals at the end, since it didn't change the result.
10602 2002-12-24 Paul Eggert <eggert@twinsun.com>
10604 If the user does not define YYSTYPE as a macro, Bison now declares it
10605 using typedef instead of defining it as a macro. POSIX requires this.
10606 For consistency, YYLTYPE is also declared instead of defined.
10608 %union directives can now have a tag before the `{', e.g., the
10609 directive `%union foo {...}' now generates the C code
10610 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10611 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10612 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10613 instead of `yyltype'.
10615 `yystype' and `yyltype' are now obsolescent macros instead of being
10616 typedefs or tags; they are no longer documented and will be
10617 withdrawn in a future release.
10619 * data/glr.c (b4_location_type): Remove.
10620 (YYSTYPE): Renamed from yystype.
10621 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10622 (struct YYLTYPE): Renamed from struct yyltype.
10623 (YYLTYPE): Renamed from yyltype.
10624 (yyltype, yystype): New (and obsolescent) macros,
10625 for backward compatibility.
10626 * data/yacc.c: Likewise.
10628 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10629 does not specify a union tag. This is for compatibility with
10632 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10633 const *, since it is now modified by stripping surrounding { }.
10634 (current_braced_code): Remove.
10635 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10636 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10637 trailing " {...}". Now of type <chars>.
10638 (grammar_declaration): Adjust to bundled tokens.
10639 (code_content): Remove; stripping is now done by add_param.
10640 (print_token_value): Print contents of bundled tokens.
10641 (token_name): New function.
10643 * src/reader.h (braced_code, current_braced_code): Remove.
10644 (token_name): New decl.
10646 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10647 token_type, not braced_code code_kind. All uses changed.
10648 (SC_PRE_CODE): New state, for scanning after a keyword that
10649 has (or usually has) an immediately-following braced code.
10650 (token_type): New local var, to keep track of which token type
10651 to return when scanning braced code.
10652 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
10653 <INITIAL>"%parse-param", <INITIAL>"%printer",
10654 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10655 instead of returning a token type immediately.
10656 (<INITIAL>"{"): Set token type.
10657 (<SC_BRACED_CODE>"}"): Use it.
10658 (handle_action_dollar, handle_action_at): Now returns bool
10659 indicating success. Fail if ! current_rule; this prevents a core dump.
10660 (handle_symbol_code_dollar, handle_symbol_code_at):
10661 Remove; merge body into caller.
10662 (handle_dollar, handle_at): Complain in invalid contexts.
10664 * NEWS, doc/bison.texinfo: Document the above.
10665 * NEWS: Fix years and program names in copyright notice.
10667 2002-12-17 Paul Eggert <eggert@twinsun.com>
10669 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10670 Reporting, Table of Symbols): Omit mentions of %lex-param and
10671 %parse-param from the documentation for now.
10673 2002-12-15 Paul Eggert <eggert@twinsun.com>
10675 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10676 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10677 lookahead symbol, and which sets yychar in parser actions) and it
10678 disagreed with the Bison documentation. Bug
10679 reported by Andrew Walrond.
10681 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10682 as the caller now does that.
10683 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10684 (YYEMPTY): Parenthesize right hand side, since others use it.
10685 (yyparse): Don't assume that our generated code is the only code
10688 2002-12-13 Paul Eggert <eggert@twinsun.com>
10692 POSIX requires a "yacc" command.
10693 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10694 (MOSTLYCLEANFILES): Add yacc.
10696 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10697 as an alias for bison y.
10699 * po/LINGUAS: Add da.
10701 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10702 problem with latest <getopt.h>.
10703 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10705 * doc/fdl.texi: Upgrade to 1.2.
10706 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10707 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10708 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10710 * config/install-sh: Sync with autotools.
10712 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10713 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10714 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10715 locations are requested.
10716 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10717 locations are requested.
10719 2002-12-12 Paul Eggert <eggert@twinsun.com>
10721 Remove unportable casts and storage allocation tricks.
10722 While we're at it, remove almost all casts, since they
10723 usually aren't needed and are a sign of trouble.
10725 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10727 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10728 the pointer DSET returned by malloc; this isn't portable.
10729 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10730 Similarly for DERIVES.
10731 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10732 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10733 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10735 * src/derives.c (derives_compute): Do not bother invoking
10736 int_of_rule_number, since rule numbers are integers.
10738 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10739 rather than XMALLOC (char, N).
10741 * src/files.c (filename_split): Rewrite to avoid cast.
10743 * src/gram.h (symbol_number_as_item_number,
10744 item_number_as_symbol_number, rule_number_as_item_number,
10745 item_number_as_rule_number):
10746 Now inline functions rather than macros, to avoid casts.
10747 * src/state.h (state_number_as_int): Likewise.
10748 * src/tables.c (state_number_to_vector_number,
10749 symbol_number_to_vector_number): Likewise.
10751 * src/gram.h (int_of_rule_number): Remove; no longer used.
10753 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10754 since the resulting storage is always stored into.
10756 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10759 * src/muscle_tab.c (muscle_m4_output):
10760 Now inline. Return bool, not int.
10761 * src/state.c (state_compare): Likewise.
10762 * src/symtab.c (symbol_check_defined,
10763 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10764 hash_compare_symbol, hash_symbol):
10766 * src/uniqstr.c (uniqstr_print): Likewise.
10767 * src/muscle_tab.c (muscle_m4_output_processor):
10768 New function, to avoid casts.
10769 * src/state.c (state_comparator, stage_hasher): Likewise.
10770 * src/symtab.c (symbol_check_defined_processor,
10771 symbol_check_alias_consistency_processor, symbol_pack_processor,
10772 symbol_translation_processor, hash_symbol_comparator,
10773 hash_symbol_hasher): Likewise.
10774 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10775 * src/muscle_tab.c (muscles_m4_output):
10776 Use new functions instead of casting old functions unportably.
10777 * src/state.c (state_hash_new): Likewise.
10778 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10779 symbols_token_translations_init):
10781 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10783 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10784 var instead of casting to long, to avoid casts.
10785 (prepare_states): Use MALLOC rather than alloca, so that we don't
10786 have to worry about alloca.
10787 * src/state.c (state_hash_lookup): Likewise.
10789 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10790 local var instead of casting to unsigned char, to avoid casts.
10792 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10793 STATE_ALLOC): Remove.
10794 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10795 rather than calloc, and use offsetof to avoid allocating slightly
10797 (state_new): Initialize all members.
10799 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10801 * src/symtab.c (symbol_free): Remove; unused.
10802 (symbol_get): Remove cast in lhs of assignment.
10803 (symbols_do): Now static. Accept generic arguments, not
10804 hashing-related ones.
10806 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10807 (symbol_processor): Remove.
10808 (symbols_do): Remove decl; now static.
10810 * src/system.h (alloca): Remove; decl no longer needed.
10811 (<stddef.h>): Include, for offsetof.
10812 (<inttypes.>, <stdint.h>): Include if available.
10813 (uintptr_t): New type, if system lacks it.
10814 (CALLOC, MALLOC, REALLOC): New macros.
10815 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10818 * src/tables.c (table_size): Now int, to pacify GCC.
10819 (table_grow, table_ninf_remap): Use signed table size.
10820 (save_row): Don't bother initializing locals when not needed.
10821 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10822 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10824 * src/vcg.h: Correct misspellings.
10826 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10829 * src/getargs.c (getargs): Don't assume EOF == -1.
10831 2002-12-09 Paul Eggert <eggert@twinsun.com>
10833 Change identifier spellings to avoid collisions with names
10834 that are reserved by POSIX.
10836 Don't use names ending in _t, since POSIX reserves them.
10837 For consistency, remove _e and _s endings -- they're weren't
10838 needed to remove ambiguity. All uses changed.
10839 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10840 turn was just renamed from struniq_t.
10841 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10842 which in turn was just renamed from struniq_processor_t.
10843 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10844 in turn was renamed from hash_compare_struniq_t.
10845 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10846 (state_list): Renamed from state_list_t.
10847 * src/assoc.h (assoc): Renamed from assoc_t.
10848 * src/conflicts.c (enum conflict_resolution): Renamed from
10849 enum conflict_resolution_e.
10850 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10851 (rule_list): Renamed from rule_list_t.
10852 * src/getargs.h (enum trace): Renamed from enum trace_e.
10853 (enum report): Renamed from enum report_e.
10854 * src/gram.h (item_number): Renamed from item_number_t.
10855 (rule_number): Renamed from rule_number_t.
10856 (struct rule_s): Remove the "rule_s" part; not used.
10857 (rule): Renamed from rule_t.
10858 (rule_filter): Renamed from rule_filter_t.
10859 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10860 (goto_list): Renamed from goto_list_t.
10861 * src/lalr.h (goto_number): Renamed from goto_number_t.
10862 * src/location.h (location): Renamed from location_t.
10863 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10864 and moved here from:
10865 * src/muscle_tab.h (muscle_entry_t): here.
10866 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10867 (rule_list): Renamed from rule_list_t.
10868 * src/print_graph.c (static_graph): Renamed from graph.
10869 * src/reader.h (braced_code): Renamed from braced_code_t.
10870 Remove brace_code_e tag.
10871 * src/relation.h (relation_node): Renamed from relation_node_t.
10872 (relation_nodes): Renamed from relation_nodes_t.
10873 (relation): Renamed from relation_t.
10874 * src/state.h (state_number): Renamed from state_number_t.
10875 (struct state): Renamed from struct state_s.
10876 (state): Renamed from state_t.
10877 (transitions): Renamed from transitions_t. Unused (and
10878 misspelled) transtion_s tag removed.
10879 (errs): Renamed from errs_t. Unused errs_s tag removed.
10880 (reductions): Renamed from reductions_t. Unused tag
10881 reductions_s removed.
10882 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10883 (struct symbol_list): Renamed from struct symbol_list_s.
10884 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10885 (struct symbol): Renamed from struct symbol_s.
10886 (symbol): Renamed from symbol_t.
10887 * src/tables.c (vector_number): Renamed from vector_number_t.
10888 (action_number): Renamed from action_t.
10889 * src/tables.h (base_number): Renamed from base_t.
10890 * src/vcg.h (enum color): Renamed from enum color_e.
10891 (enum textmode): Renamed from enum textmode_e.
10892 (enum shape): Renamed from enum shape_e.
10893 (struct colorentry): Renamed from struct colorentry_s.
10894 (struct classname): Renamed from struct classname_s.
10895 (struct infoname): Renamed from struct infoname_s.
10896 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10897 (enum decision): Renamed from enum decision_e.
10898 (enum orientation): Renamed from enum orientation_e.
10899 (enum alignment): Renamed from enum alignment_e.
10900 (enum arrow_mode): Renamed from enum arrow_mode_e.
10901 (enum crossing_type): Renamed from enum crossing_type_e.
10902 (enum view): Renamed from enum view_e.
10903 (struct node): Renamed from struct node_s.
10904 (node): Renamed from node_t.
10905 (enum linestyle): Renamed from enum linestyle_e.
10906 (enum arrowstyle): Renamed from enum arrowstyle_e.
10907 (struct edge): Renamed from struct edge.
10908 (edge): Renamed from edge_t.
10909 (struct graph): Renamed from struct graph_s.
10910 (graph): Renamed from graph_t.
10911 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10912 Rename value_t -> value.
10913 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10914 value_t_as_yystype -> value_as_yystype.
10916 Don't include <errno.h> in the mainstream code, since it
10917 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10918 * lib/get-errno.c, lib/get-errno.h: New files.
10919 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10921 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10922 * src/output.c (output_skeleton): Likewise.
10923 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10925 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10927 (handle_action_dollar, handle_action_at): Likewise.
10928 * src/system.h: Do not include <errno.h>.
10929 (TAB_EXT): Renamed from EXT_TAB.
10930 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10932 Avoid str[a-z]*, since <string.h> reserves that name space.
10933 Change all instances of "struniq" in names to "uniqstr", and
10934 likewise for "STRUNIQ" and "UNIQSTR".
10935 * src/uniqstr.c: Renamed from src/struniq.c.
10936 * src/uniqstr.h: Renamed from src/struniq.h.
10937 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10938 * src/files.c (strsuffix): Remove; unused.
10939 (concat2): Renamed from stringappend. Now static.
10940 * src/files.h (strsuffix, stringappend): Remove; unused.
10941 * src/parse-gram.y (<chars>): Renamed from <string>.
10942 (<uniqstr>): Renamed from <struniq>.
10943 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10944 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10945 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10946 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10947 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10948 (N_EXPAND): Renamed from N_STRETCH.
10950 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10951 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10952 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10954 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10955 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10956 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10957 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10958 (BASE_MAXIMUM): Renamed from BASE_MAX.
10959 (BASE_MINIMUM): Renamed from BASE_MIN.
10960 (ACTION_MAX): Remove; unused.
10961 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10962 Unnecessary casts removed from above defines.
10965 Fix misspelling in names.
10966 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10967 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10971 * lib/timevar.c (timevar_report): Renamed from time_report,
10972 for consistency with other names.
10973 * lib/timevar.h (timevar_report): New decl.
10974 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10977 Sort include-file uses.
10979 Reorder all include files under src to be in the order "system.h".
10980 then the ../lib include files in angle brackets (alphabetized),
10981 then the . include files in double-quotes (alphabetized). Fix
10982 dependency breakages encountered in this process, as follows:
10983 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10984 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10985 * src/state.h: Include "symtab.h".
10987 2002-12-08 Paul Eggert <eggert@twinsun.com>
10989 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10990 since this causes problems when __file__ contains character
10991 sequences like "@" that are treated specially by src/scan-skel.l.
10992 Instead, just use the file's basename. This fixes the bug
10993 reported by Martin Mokrejs in
10994 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10996 2002-12-06 Paul Eggert <eggert@twinsun.com>
10998 Add support for rules that do not have trailing semicolons, as
10999 POSIX requires. Improve the quality of locations in Bison
11002 * src/location.c: Include <quotearg.h>.
11003 (empty_location): Now const.
11004 (location_print): New function. Follow the recommendation of the
11005 GNU Coding Standards for locations that span file boundaries.
11006 * src/location.h: Do not include <quotearg.h>; no longer needed.
11007 (boundary): New type.
11008 (location_t): Use it. This allows locations to span file boundaries.
11009 All member uses changed: file -> start.file or end.file (as needed),
11010 first_line -> start.line, first_column -> start.column,
11011 last_line -> end.line, last_column -> end.column.
11012 (equal_boundaries): New function.
11013 (LOCATION_RESET, LOCATION_STEP): Remove.
11014 (LOCATION_PRINT): Remove. All callers changed to use location_print.
11015 (empty_location): Now const.
11016 (location_print): New decl.
11017 * src/parse-gram.y (lloc_default): New function, which handles
11018 empty locations more accurately.
11019 (YYLLOC_DEFAULT): Use it.
11020 (%token COLON): Remove.
11021 (%token ID_COLON): New token.
11023 (declarations, rules): Remove trailing semicolon.
11024 (declaration, rules_or_grammar_declaration):
11025 Allow empty (";") declaration.
11026 (symbol_def): Remove empty actions; no longer needed.
11027 (rules_or_grammar_declaration): Remove trailing semicolon.
11028 (semi_colon.opt): Remove.
11029 * src/reader.h: Include location.h.
11030 (scanner_cursor): New decl.
11031 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
11033 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
11035 (STEP): Remove. No longer needed, now that adjust_location does
11036 the work. All uses removed.
11037 (scanner_cursor): New var.
11038 (adjust_location): Renamed from extend_location. It now sets
11039 *loc and adjusts the scanner cursor. All uses changed.
11040 Don't bother testing for CR.
11041 (handle_syncline): Remove location arg; now updates scanner cursor.
11042 All callers changed.
11043 (unexpected_end_of_file): Now accepts start boundary of token or
11044 comment, not location. All callers changed. Update scanner cursor,
11046 (SC_AFTER_IDENTIFIER): New state.
11047 (context_state): Renamed from c_context. All uses changed.
11048 (id_loc, code_start, token_start): New local vars.
11049 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
11050 processing of Yacc white space and equivalents here.
11051 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
11052 instead of returning ID immediately, since we need to search for
11053 a subsequent colon.
11054 (<INITIAL>"'", "\""): Save token_start.
11055 (<INITIAL>"%{", "{", "%%"): Save code_start.
11056 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
11057 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
11058 BEGIN context_state at end, not INITIAL.
11059 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
11060 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
11061 Return correct token start.
11062 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
11063 the start of a character, string or multiline comment is found.
11064 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
11065 Reduction): Adjust reported locations to match the more-precise
11066 results now expected.
11067 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
11068 * tests/reduce.at (Useless Rules, Reduced Automaton,
11069 Underivable Rules): Likewise.
11070 * tests/regression.at (Invalid inputs): No longer `expecting ";"
11071 or "|"' now that so many other tokens are allowed by the new grammar.
11073 * src/complain.h (current_file): Remove duplicate decl;
11074 current_file is now owned by files.h.
11075 * src/complain.c, src/scan-gram.l: Include files.h.
11077 2002-12-06 Paul Eggert <eggert@twinsun.com>
11079 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
11080 promotes to int; it might be unsigned int.
11081 * data/yacc.c (yy_reduce_print): Likewise.
11083 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
11084 be #defined in the prologue, not in the Bison declarations.
11085 This fixes Debian Bug 102878, reported by Shaul Karl.
11087 2002-12-02 Paul Eggert <eggert@twinsun.com>
11089 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
11090 * lib/strtoul.c: New file, from gnulib.
11091 This fixes a porting bug reported by Peter Klein in
11092 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
11094 2002-11-30 Paul Eggert <eggert@twinsun.com>
11096 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
11097 and put only a forward declaration in the prologue. This is for
11098 consistency with the other scanner helper functions.
11100 Type clashes now generate warnings, not errors, since it
11101 appears that POSIX may allow some grammars with type clashes.
11102 * src/reader.c (grammar_current_rule_check): Warn about
11103 type clashes instead of complaining.
11104 * tests/input.at (Type Clashes): Expect warnings, not complaints.
11106 Add Yacc library, since POSIX requires it.
11107 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
11108 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
11109 * lib/main.c, lib/yyerror.c: New files.
11111 gram_error can be static; it need not be extern.
11112 * src/reader.h (gram_error): Remove decl.
11113 * src/parse-gram.y (gram_error): Now static. Add static decl.
11114 (print_token_value): Omit parameter names from forward decl,
11117 2002-11-29 Paul Eggert <eggert@twinsun.com>
11119 * doc/bison.texinfo: Emphasize that yylex and yyerror must
11120 be declared before being used. E.g., one should typically
11121 declare them in the prologue. Use GNU coding style in examples.
11122 Put "const" consistently after the type it modifies. Mention
11123 that C99 supports "inline". Mention that yyerror traditionally
11126 %parse-param and %lex-param now take just one argument, the
11127 declaration; the argument name is deduced from the declaration.
11129 * doc/bison.texinfo (Parser Function, Pure Calling, Error
11130 Reporting, Table of Symbols): Document this.
11131 * src/parse-gram.y (add_param): New function.
11133 (declaration): Implement new rule for %parse-param and %lex-param.
11134 * src/scan-gram.l: "," now elicits a warning, rather than being
11135 a token; this is more compatible with byacc.
11136 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
11138 2002-11-27 Paul Eggert <eggert@twinsun.com>
11140 Rename identifiers to avoid real and potential collisions.
11142 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
11143 to avoid collision with lex macro described by Bruce Lilly in
11144 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11145 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11146 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
11147 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11149 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
11150 The name "yycontrol" violates the name space rules, and this stuff
11151 wasn't being used anyway.
11152 (input): Remove action; this stuff wasn't being used.
11153 (gram_error): Rename local variable yylloc -> loc.
11154 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
11155 (YY_DECL): Don't use "yy" at start of local variables.
11156 All uses changed, e.g., yylloc -> loc.
11157 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
11158 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
11159 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
11160 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
11162 * src/parse-gram.y (gram_error): loc is now const *.
11163 * src/reader.h (gram_error): Likewise.
11165 2002-11-24 Paul Eggert <eggert@twinsun.com>
11169 * tests/actions.at (Actions after errors): Use an output format
11170 more similar to that of the Printers and Destructors test.
11171 Test the position of the ';' token too.
11172 (Printers and Destructors): Likewise.
11173 (Printers and Destructors: %glr-parser): Remove for now, to avoid
11174 unnecessarily alarming people when the test fails.
11176 * data/yacc.c (yyerrlab1): Move this label down, so that the
11177 parser does not discard the lookahead token if the user code
11178 invokes YYERROR. This change is required for POSIX conformance.
11180 * lib/error.c: Sync with gnulib.
11182 2002-11-22 Paul Eggert <eggert@twinsun.com>
11184 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
11185 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
11186 * lib/xmalloc.c: Likewise.
11188 2002-11-20 Paul Eggert <eggert@twinsun.com>
11190 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
11192 2002-11-20 Paul Eggert <eggert@twinsun.com>
11194 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
11195 should use `if (! x) abort ();' rather than `assert (x);', and
11196 anyway it's one less thing to worry about configuring.
11198 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
11199 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
11200 and replace all instances of assert with abort.
11201 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11202 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
11204 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
11205 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
11206 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
11207 hash_find_entry, hash_rehash, hash_insert): Likewise.
11208 * src/conflicts.c (resolve_sr_conflict): Likewise.
11209 * src/lalr.c (set_goto_map, map_goto): Likewise.
11210 * src/nullable.c (nullable_compute): Likewise.
11211 * src/output.c (prepare_rules, token_definitions_output): Likewise.
11212 * src/reader.c (packgram, reader): Likewise.
11213 * src/state.c (state_new, state_free, state_transitions_set,
11214 state_reduction_find): Likewise.
11215 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
11216 symbol_pack): Likewise.
11217 * src/tables.c (conflict_row, pack_vector): Likewise.
11218 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11219 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11220 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
11221 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
11223 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
11224 (ARGMATCH_CONSTRAINT): New macro.
11225 (ARGMATCH_ASSERT): Use it.
11227 * src/system.h (verify): New macro.
11228 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
11229 rather than assert.
11230 * src/tables.c (tables_generate): Likewise.
11232 * src/struniq.c (struniq_assert): Now returns void, and aborts
11233 if the assertion is false.
11234 (struniq_assert_p): Remove.
11235 * src/struniq.h: Likewise.
11237 2002-11-18 Paul Eggert <eggert@twinsun.com>
11239 * data/glr.c (yygetLRActions): Replace `yyindex' with
11240 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
11241 This fixes the regression with Sun ONE Studio 7 cc that I reported in
11242 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
11244 2002-11-18 Akim Demaille <akim@epita.fr>
11246 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
11248 From Tim Van Holder.
11250 2002-11-17 Paul Eggert <eggert@twinsun.com>
11252 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
11253 to "SyntaxError" for consistency with my 2002-11-15 change.
11255 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
11256 not define to {}, since this breaks the common use of `YYDPRINTF
11257 ((...));' if a single statement is desired (e.g. before `else').
11258 Work around GCC warnings by surrounding corresponding calls with
11260 (yyhasResolvedValue): Remove unused function.
11261 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
11263 (yyreportSyntaxError): Renamed from yyreportParseError.
11264 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
11266 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
11267 extern when possible. Remove unused initializations.
11269 2002-11-16 Akim Demaille <akim@epita.fr>
11271 Augment the similarity between GLR and LALR traces.
11273 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
11274 (YY_REDUCE_PRINT): New.
11275 (yyparse): Use them.
11276 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
11278 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
11279 state reached after the reduction/recovery, since...
11280 (yyparse, yyprocessOneStack): Report the state we are entering in.
11282 2002-11-16 Akim Demaille <akim@epita.fr>
11284 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
11285 Add support for --trace=skeleton.
11286 * src/scan-skel.l: %option debug.
11287 Scan strings of non-@ or \n instead of character by character.
11288 (scan_skel): Handle trace_skeleton.
11290 (@output_parser_name@, @output_header_name@): ``Restore'' their
11291 support (used to be M4 macros).
11292 * data/yacc.c: Quote larger chunks, a la glr.c.
11293 * data/lalr1.cc: Likewise.
11294 The header guards are no longer available, so use some other
11295 string than `YYLSP_NEEDED'.
11297 2002-11-16 Akim Demaille <akim@epita.fr>
11299 Make the ``Printers and Destructors'' test more verbose, taking
11300 `yacc.c''s behavior as (possibly wrong) reference.
11302 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
11303 instead of fprint on stdout.
11304 Set and report the last_line of the symbols.
11305 Consistently display values and locations.
11307 2002-11-16 Paul Eggert <eggert@twinsun.com>
11309 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
11311 2002-11-15 Paul Eggert <eggert@twinsun.com>
11313 * tests/actions.at (Actions after errors): New test case.
11315 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
11316 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
11317 tests/action.at, tests/calc.at, tests/conflicts.at,
11318 tests/cxx-type.at, tests/regression.at:
11319 "parse error" -> "syntax error" for POSIX compatibility.
11320 "parsing stack overflow..." -> "parser stack overflow" so
11321 that code matches Bison documentation.
11323 2002-11-15 Akim Demaille <akim@epita.fr>
11325 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
11326 take two BRACED_CODE, not two string_content.
11327 Free the scanner's obstack when we are done.
11328 (code_content): New.
11329 * tests/calc.at: Adjust.
11330 * doc/bison.texinfo: Adjust.
11331 Also, make sure to include the `,' for these declarations.
11333 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
11335 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
11336 definition; avoids potential autoreconf problems.
11338 2002-11-15 Akim Demaille <akim@epita.fr>
11340 Always check the value returned by yyparse.
11342 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
11343 returned by yyparse.
11344 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
11346 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
11347 returned by yyparse.
11349 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11351 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
11354 2002-11-14 Paul Eggert <eggert@twinsun.com>
11356 * src/output.c (output_skeleton): Call xfopen instead of
11357 duplicating xfopen's body.
11359 Fix bugs reported by Nelson H. F. Beebe in
11360 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
11362 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
11363 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
11364 Group compiler. Instead, use "$CC -E bar.c". Include the .h
11365 file twice in the grammar, as an extra check.
11367 * tests/input.at (Torturing the Scanner): Surround the
11368 backslash-newline tests with "#if 0", to make it less likely that
11369 we'll run into compiler bugs. Bring back solitary \ inside
11370 comment, but add a closing comment to work around HP C bug. Don't
11371 test backslash-newline in C character constant.
11373 2002-11-14 Akim Demaille <akim@epita.fr>
11375 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
11376 status of the compiler.
11377 Calling `exit 1' is no longer needed.
11378 Reported by Nelson H. F. Beebe.
11380 2002-11-14 Akim Demaille <akim@epita.fr>
11382 * tests/atlocal.in (CPPFLAGS): We have config.h.
11383 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
11385 * tests/actions.at, tests/calc.at, tests/conflicts.at,
11386 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
11387 * tests/regression.at, tests/torture.at: Use them for all the
11388 grammars that are to be compiled.
11389 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
11390 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
11391 * doc/bison.texinfo (GLR Parsers): Document `inline'.
11393 2002-11-14 Akim Demaille <akim@epita.fr>
11395 * doc/bison.texinfo: Various formatting changes (alignments in
11396 samples, additional @group/@end group, GCS in samples.
11397 Use @deffn instead of simple @table to define the directives,
11398 macros, variables etc.
11400 2002-11-13 Paul Eggert <eggert@twinsun.com>
11402 Fix some bugs reported by Albert Chin-A-Young in
11403 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
11405 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
11406 -o c"; the HP C compiler chatters during compilation.
11407 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
11408 * tests/headers.at (export YYLTYPE): Likewise.
11410 * tests/input.at (Torturing the Scanner): Remove lines containing
11411 solitary backslashes, as they tickle a bug in the HP C compiler.
11413 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
11414 comments, since they're not portable. Use GNU coding style.
11416 2002-11-13 Akim Demaille <akim@epita.fr>
11418 * data/yacc.c: Leave bigger chunks of quoted text.
11419 (YYDSYMPRINTF): New.
11420 Use it to report symbol activities.
11421 * data/glr.c (YYDSYMPRINTF): New.
11424 2002-11-12 Paul Eggert <eggert@twinsun.com>
11428 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
11429 (yyglrReduce): Return yyok, not 0.
11430 This should avoid the enumerated-type warnings reported
11431 by Nelson H. F. Beebe in
11432 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
11434 * lib/bbitset.h (BITSET_INLINE): Remove.
11435 * lib/bitset.h [! BITSET_INLINE]: Remove.
11436 (bitset_set, bitset_reset, bitset_test): Rename local vars
11437 to avoid shadowing warnings by GCC.
11439 * data/glr.c (inline): Remove #define. It's the user's
11440 responsibility to #define it away, just like 'const'.
11441 This fixes one of the bugs reported by Nelson H. F. Beebe in
11442 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
11444 * Makefile.maint (po-check): Scan .l and .y files instead of the
11445 .c and the .h files that they generate. This fixes the bug
11446 reported by Tim Van Holder in:
11447 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
11448 Look for N_ as well as for _. Try to avoid matching #define for
11450 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
11451 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
11452 * src/scan-gram.l: Revamp regular expressions so that " and '
11453 do not confuse xgettext.
11455 * src/struniq.h (struniq_new): Do not declare the return type
11456 to be 'const'; this violates the C standard.
11457 * src/struniq.c (struniq_new): Likewise.
11459 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
11461 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
11462 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
11465 2002-11-12 Akim Demaille <akim@epita.fr>
11467 * Makefile.maint: Sync with Autoconf:
11468 (local_updates): New.
11470 2002-11-12 Akim Demaille <akim@epita.fr>
11472 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
11474 2002-11-12 Akim Demaille <akim@epita.fr>
11476 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
11479 2002-11-12 Akim Demaille <akim@epita.fr>
11481 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
11484 2002-11-12 Akim Demaille <akim@epita.fr>
11486 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
11487 Use it to test the GLR parser.
11489 2002-11-12 Akim Demaille <akim@epita.fr>
11491 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
11493 * data/glr.c (yystos): New.
11494 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
11495 (YYDSYMPRINT): New.
11496 (yyval): Don't define it, it is handled via M4.
11497 (yyrecoverParseError): Free verbosely the discarded symbols.
11498 * data/yacc.c (yysymprint): Remove, rather...
11499 (b4_yysymprint_generate): invoke.
11500 * data/c.m4 (b4_yysymprint_generate): New.
11501 Accept pointers as arguments, as opposed to the version from
11503 (b4_yydestruct_generate): Likewise.
11504 * tests/cations.at (Printers and Destructors): Use Bison directives
11505 instead of CPP macros.
11506 Don't rely on internal details.
11508 2002-11-12 Akim Demaille <akim@epita.fr>
11510 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11511 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11512 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11513 it against YYEMPTY and so forth), work on yytoken (i.e., set
11514 it to YYEMPTY etc.).
11515 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11516 (b4_symbol_actions): Remove.
11517 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11518 for 0, end-of-input.
11520 2002-11-12 Akim Demaille <akim@epita.fr>
11522 * doc/bison.texinfo (Destructor Decl): New.
11524 2002-11-12 Akim Demaille <akim@epita.fr>
11526 * src/tables.c (tables_generate): Use free for pointers that
11527 cannot be NULL, not XFREE.
11528 (pack_vector): Use assert, not fatal, for bound violations.
11529 * src/state.c (state_new): Likewise.
11530 * src/reader.c (reader): Likewise.
11531 * src/lalr.c (set_goto_map): Likewise.
11532 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
11535 2002-11-12 Akim Demaille <akim@epita.fr>
11537 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11539 * src/scan-gram.l (last_string): Is global to the file, not to
11541 * src/parse-gram.y (input): Don't append the epilogue here,
11542 (epilogue.opt): do it here, and free the scanner's obstack.
11543 * src/reader.c (epilogue_set): Rename as...
11544 (epilogue_augment): this.
11545 * data/c.m4 (b4_epilogue): Defaults to empty.
11547 2002-11-12 Akim Demaille <akim@epita.fr>
11549 * src/getargs.c (long_options): Remove duplicates.
11550 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11552 * doc/bison.rnh: Remove.
11553 * doc/bison.texinfo (VMS Invocation): Remove.
11555 2002-11-12 Akim Demaille <akim@epita.fr>
11557 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11558 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11560 Use struniq for symbols.
11562 * src/symtab.h (symbol_t): The tag member is a struniq.
11563 (symbol_type_set): Adjust.
11564 * src/symtab.c (symbol_new): Takes a struniq.
11565 (symbol_free): Don't free the tag member.
11566 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11567 (hash_compare_symbol, hash_symbol): these.
11568 Use the fact that tags as struniqs.
11569 (symbol_get): Use struniq_new.
11570 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11572 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11573 and type members are struniqs.
11574 * src/reader.c (get_merge_function)
11575 (grammar_current_rule_merge_set): Adjust.
11576 (TYPE, current_type): Are struniq.
11578 Use struniq for file names.
11580 * src/files.h, src/files.c (infile): Split into...
11581 (grammar_file, current_file): these.
11582 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11583 * src/reduce.c (reduce_print): Likewise.
11584 * src/getargs.c (getargs): Likewise.
11585 * src/complain.h, src/complain.c: Likewise.
11586 * src/main.c (main): Call struniqs_new early enough to use it for
11588 Don't free the input file name.
11590 2002-11-12 Akim Demaille <akim@epita.fr>
11592 * src/symtab.c (symbol_free): Remove dead deactivated code:
11593 type_name are properly removed.
11594 Don't use XFREE to free items that cannot be NULL.
11595 * src/struniq.h, src/struniq.c: New.
11596 * src/main.c (main): Initialize/free struniqs.
11597 * src/parse-gram.y (%union): Add astruniq member.
11599 * src/scan-gram.l (<{tag}>): Return a struniq.
11600 Free the obstack bit that used to store it.
11601 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11603 2002-11-11 Paul Eggert <eggert@twinsun.com>
11605 Revamp to fix many (but not all) of the C- and M4-related quoting
11606 problems. Among other things, this fixes the Bison bug reported
11607 by Jan Hubicka when processing the Bash grammar; see:
11608 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
11610 Use new @ escapes consistently. Represent brackets with @{ and @}
11611 rather than @<:@ and @:>@, since this works a bit better with dumb
11612 editors like vi. Represent @ with @@, since @ is now consistently
11613 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11614 __ofile__, to avoid unexpected expansions. Similarly, use @output
11615 rather than #output.
11617 * data/c.m4 (b4_copyright): Omit file name from comment, since
11618 the file name could contain "*/".
11619 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11620 be quoted. All uses changed.
11622 * data/glr.c: Use new @ escapes consistently.
11623 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11624 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11625 Remove, since they couldn't handle arbitrary characters in file
11627 * data/lalr1.cc: Likewise.
11628 * data/yacc.c: Likewise.
11630 * src/files.c (output_infix): Remove; all uses removed.
11631 * src/files.h: Likewise.
11633 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11634 mishandled funny characters in file names, and anyway it isn't
11636 * data/yacc.c: Likewise.
11637 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11639 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11640 * data/yacc.c: Likewise.
11642 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11644 (muscle_init): Quote filename as a C string.
11645 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11646 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11647 * src/output.c (escaped_file_name_output): New function.
11648 (prepare_symbols): Quote tokens for M4.
11649 (prepare): Don't insert output_infix, output_prefix,
11650 output_parser_name, output_header_name; this is now down by scan-skel.
11651 Insert skeleton as a C string.
11653 * src/output.c (user_actions_output, symbol_destructors_output,
11654 symbol_printers_output): Quote filenames for C and M4.
11655 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11657 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11658 escapes other than \\ and \'; this simplifies the code.
11659 (<SC_STRING>): Likewise, for \\ and \".
11660 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11661 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11662 Use new escapes @{ and @} for [ and ].
11664 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11665 them with auto vars.
11666 Switch to new escape scheme, where @ is the escape character uniformly.
11667 Abort if a stray escape character is found. Avoid unbounded input
11668 buffer when parsing non-escaped text.
11670 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11671 __oline__, #output, $@, and @{ do not have unintended meanings.
11673 2002-11-09 Paul Eggert <eggert@twinsun.com>
11675 Fix the test failure due to GCC warnings described in
11676 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11677 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11678 evaluate to 0 if it's impossible for NINF to be in the respective
11680 (yygetLRActions, yyrecoverParseError): Use them.
11682 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11683 counted in the token inserted at end of file. Now takes
11684 location_t *, not location_t, so that the location can be
11685 adjusted. All uses changed.
11687 * tests/regression.at (Invalid inputs): Adjust wording in
11688 diagnostic to match the new behavior.
11690 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11691 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11692 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11693 abort ();'. This reduces the runtime of the "Many lookaheads"
11694 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11697 2002-11-07 Paul Eggert <eggert@twinsun.com>
11699 * src/parse-gram.y (CHARACTER): Remove unused token.
11702 * src/scan-gram.l: Remove stack option. We no longer use the
11703 stack, since the stack was never deeper than 1; instead, use the
11704 new auto var c_context to record the stacked value.
11706 Remove nounput option. At an unexpected end of file, we now unput
11707 the minimal input necessary to end cleanly; this simplifies the
11710 Avoid unbounded token sizes where this is easy.
11712 (unexpected_end_of_file): New function.
11713 Use it to systematize the error message on unexpected EOF.
11714 (last-string): Now auto, not static.
11715 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11716 (scanner_last_string_free): Remove; not used.
11717 (percent_percent_count): Move decl to just before use.
11718 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11719 not the (never otherwised-used) CHARACTER.
11721 2002-11-07 Akim Demaille <akim@epita.fr>
11723 Let yyerror always receive the msg as last argument, so that
11724 yyerror can be variadic.
11726 * data/yacc.c (b4_yyerror_args): New.
11727 Use it when calling yyerror.
11728 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11729 Use it when calling yyerror.
11730 * doc/bison.texinfo (Error Reporting): Adjust.
11731 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11732 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11734 2002-11-06 Akim Demaille <akim@epita.fr>
11736 #line should have quoted strings.
11737 Ideally, this should be done by m4_quotearg.
11739 * src/scan-skel.l: Include quotearg.h.
11741 * src/output.c (symbol_printers_output)
11742 (symbol_destructors_output): Quote the file name.
11744 2002-11-06 Akim Demaille <akim@epita.fr>
11746 * tests/regression.at (Invalid inputs): Adjust to the recent
11749 2002-11-06 Akim Demaille <akim@epita.fr>
11751 Restore --no-lines.
11752 Reported by Jim Kent.
11754 * data/c.m4 (b4_syncline): New.
11755 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11756 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11757 * src/output.c (user_actions_output): Likewise.
11758 (prepare): Define 'b4_synclines_flag'.
11759 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11761 2002-11-06 Akim Demaille <akim@epita.fr>
11763 * src/main.c (main): Free `infile'.
11764 * src/scan-gram.l (handle_syncline): New.
11766 * src/output.c (user_actions_output, symbol_destructors_output)
11767 (symbol_printers_output): Use the location's file name, not
11769 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11771 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11773 * src/tables.c (matching_state): Don't allow states to match if
11774 either has GLR conflict entries.
11776 2002-11-05 Paul Eggert <eggert@twinsun.com>
11778 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11779 "integer out of range" rather than "invalid value".
11780 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11783 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11784 Also, remove one static variable in the scanner.
11786 * src/scan-gram.l (braces_level): Now auto, not static.
11787 Initialize to zero if the compiler is being picky.
11788 (INITIAL): Clear braces_level instead of incrementing it.
11789 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11790 as POSIX 1003.1-2001 requires.
11791 * src/system.h (IF_LINT): New macro, taken from coreutils.
11792 * configure.ac: Define "lint" if --enable-gcc-warnings.
11794 2002-11-05 Akim Demaille <akim@epita.fr>
11796 * src/scan-gram.l: When it starts with `%', complain about the
11797 whole directive, not just that `invalid character: %'.
11799 2002-11-04 Akim Demaille <akim@epita.fr>
11801 * Makefile.maint: Update from Autoconf.
11802 (update, cvs-update, po-update, do-po-update): New.
11804 2002-11-04 Akim Demaille <akim@epita.fr>
11806 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11808 Have yyerror `use' its arguments.
11809 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11810 returns true when location & yacc & pure & parse-param.
11811 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11813 2002-11-04 Akim Demaille <akim@epita.fr>
11815 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11817 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11820 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11823 2002-11-03 Paul Eggert <eggert@twinsun.com>
11825 * src/reader.c (get_merge_function, grammar_current_rule_check):
11826 Use consistent diagnostics for reporting type name clashes.
11827 Quote the types with <>, for consistency with Yacc.
11828 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11830 2002-11-03 Akim Demaille <akim@epita.fr>
11832 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11834 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11835 (b4_parse_param): Remove.
11836 Use b4_identification.
11837 Propagate b4_pure_args where needed to pass them to yyerror.
11838 * data/glr.m4 (b4_parse_param): Remove.
11839 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11840 (b4_lpure_formals): New.
11841 Use b4_identification.
11842 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11843 b4_user_formals and b4_user_args.
11844 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11845 (yyreportAmbiguity): When using a pure parser, also need
11846 the location, and the parse-params.
11848 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11849 When using a pure parser, also need the parse-params.
11851 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11852 (%pure-parser + %parse-param) LALR and GLR parsers.
11853 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11854 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11855 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11856 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11857 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11858 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11859 * doc/bison.texinfo: Untabify the whole file.
11860 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11861 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11862 (Error Reporting): Adjust to these new directives.
11863 Document %error-verbose, deprecate YYERROR_VERBOSE.
11865 2002-11-03 Akim Demaille <akim@epita.fr>
11867 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11868 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11869 command line options.
11870 * tests/cxx-type.at: Formatting changes.
11872 2002-11-03 Paul Eggert <eggert@twinsun.com>
11874 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11875 to count columns correctly, and to check for invalid inputs.
11877 Use mbsnwidth to count columns correctly. Account for tabs, too.
11878 Include mbswidth.h.
11879 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11880 (extend_location): New function.
11881 (YY_LINES): Remove.
11883 Handle CRLF in C code rather than in Lex code.
11884 (YY_INPUT): New macro.
11885 (no_cr_read): New function.
11887 Scan UCNs, even though we don't fully handle them yet.
11888 (convert_ucn_to_byte): New function.
11890 Handle backslash-newline correctly in C code.
11891 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11892 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11894 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11895 Use {splice} wherever C allows backslash-newline.
11896 YY_STEP after space, newline, vertical-tab.
11897 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11899 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11901 ({int}, handle_action_dollar, handle_action_at): Check for integer
11904 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11906 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11907 as well as \000. Check for UCHAR_MAX, not 255.
11908 Allow \x with an arbitrary positive number of digits, as in C.
11909 Check for overflow here.
11910 Allow \? and UCNs, for compatibility with C.
11912 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11913 with quote slot used by complain_at.
11915 * tests/input.at: Add tests for backslash-newline, m4 quotes
11916 in symbols, long literals, and funny escapes in strings.
11918 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11919 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11920 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11921 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11922 * m4/mbswidth.m4: New file, from GNU coreutils.
11924 * doc/bison.texinfo (Grammar Outline): Document // comments.
11925 (Symbols): Document that trigraphs have no special meaning in Bison,
11926 nor is backslash-newline allowed.
11927 (Actions): Document that trigraphs have no special meaning.
11929 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11932 2002-11-02 Paul Eggert <eggert@twinsun.com>
11934 * src/reader.c: Don't include quote.h; not needed.
11935 (get_merge_function): Reword warning to be consistent with
11936 type clash diagnostic in grammar_current_rule_check.
11938 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11939 bug in trigraph handling.
11941 * src/output.c (prepare_symbols): When printing token names,
11942 escape "[" as "@<:@" and likewise for "]".
11944 * src/system.h (errno): Remove declaration, as we are now
11945 assuming C89 or better, and C89 guarantees errno.
11947 2002-10-30 Paul Eggert <eggert@twinsun.com>
11949 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11950 Check for close failures.
11951 * src/files.h (xfclose): Return void, not int, since it always
11953 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11955 * src/output.c (output_skeleton): Use xfclose rather than fclose
11956 and ferror. xfclose now checks ferror.
11958 * data/glr.c (YYLEFTMOST_STATE): Remove.
11959 (yyreportTree): Use a stack-based leftmost state. This avoids
11960 our continuing battles with bogus warnings about initializers.
11962 2002-10-30 Akim Demaille <akim@epita.fr>
11964 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11967 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11969 * tests/glr-regr1.at: New test for reported regressions.
11970 * tests/testsuite.at: Add glr-regr1.at test.
11971 * tests/Makefile.am: Add glr-regr1.at test.
11973 2002-10-24 Paul Eggert <eggert@twinsun.com>
11977 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11978 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11979 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11980 Don't assume strdup exists; POSIX says its an XSI extension.
11981 Check for buffer overflow on input.
11983 2002-10-24 Akim Demaille <akim@epita.fr>
11985 * src/output.c (output_skeleton): Don't disable M4sugar comments
11986 too soon: it results in comments being expanded.
11987 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11990 2002-10-24 Akim Demaille <akim@epita.fr>
11992 * data/yacc.c (m4_int_type): New.
11993 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11994 char' as only yacc.c wants K&R portability.
11995 * data/glr.c (yysigned_char): Remove.
11996 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11997 Reported by Quoc Peyrot.
11999 2002-10-23 Paul Eggert <eggert@twinsun.com>
12001 * src/main.c (main): With --trace=time, report times even if a
12002 non-fatal error occurs. Formerly, the times were reported in some
12003 such cases but not in others.
12004 * src/reader.c (reader): Just return if a complaint has been issued,
12005 instead of exiting, so that 'main' can report times.
12007 2002-10-22 Akim Demaille <akim@epita.fr>
12009 * src/system.h: Include sys/types.
12010 Reported by Bert Deknuydt.
12012 2002-10-23 Paul Eggert <eggert@twinsun.com>
12014 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
12015 Suggested by Art Haas.
12017 2002-10-22 Paul Eggert <eggert@twinsun.com>
12019 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
12020 decl; not needed any more.
12021 * src/main.c (main): Use return to exit, undoing yesterday's change.
12022 The last OS that we could find where this wouldn't work is
12023 SunOS 3.5, and that's too old to worry about now.
12025 * data/glr.c (struct yyltype): Define members even when not
12026 doing locations. This is more consistent with yacc.c, and it
12027 works around the following bug reports:
12028 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
12029 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
12031 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
12032 @acronym consistently. Standardize on "Yacc" instead of "YACC",
12033 "Algol" instead of "ALGOL". Give a bit more history about BNF.
12035 2002-10-22 Akim Demaille <akim@epita.fr>
12037 * data/README: New.
12039 2002-10-21 Paul Eggert <eggert@twinsun.com>
12041 Be consistent about 'bool'; the old code used an enum in one
12042 module and an int in another, and this violates the C standard.
12043 * m4/stdbool.m4: New file, from coreutils 4.5.3.
12044 * configure.ac (AC_HEADER_STDBOOL): Add.
12045 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
12046 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
12047 * src/symtab.c (hash_compare_symbol_t): Likewise.
12048 * src/system.h (bool, false, true): Use a definition consistent
12049 with ../lib/hash.c. All uses changed.
12051 * src/complain.c (warning_issued): Renamed from warn_message_count,
12052 so that we needn't worry about integer overflow (!).
12053 Now of type bool. All uses changed.
12054 (complaint_issued): Renamed from complain_message_count; likewise.
12056 * src/main.c (main): Use exit to exit with failure.
12058 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
12059 rather than 1 and 0.
12060 * src/main.c (main): Likewise.
12061 * src/getargs.c (getargs): Likewise.
12062 * src/reader.c (reader): Likewise.
12064 * src/getarg.c (getargs): Remove duplicate code for
12065 "Try `bison --help'".
12067 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
12068 What was that "2" for?
12070 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
12071 * src/getargs.c (usage): Likewise.
12073 * src/getargs.c (getargs): When there are too few operands, report
12074 the last one. When there are too many, report the first extra
12075 one. This is how diffutils does it.
12077 2002-10-20 Paul Eggert <eggert@twinsun.com>
12079 Remove K&R vestiges.
12080 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
12081 * src/complain.c (VA_START): Remove. Assume prototypes.
12082 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
12083 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
12084 fatal): Assume prototypes.
12085 * src/complain.h: Assume prototypes.
12086 * src/system.h (PARAMS): Remove.
12087 Include <limits.h> unconditionally, since it's guaranteeed even
12088 for a freestanding C89 compiler.
12089 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
12090 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
12092 2002-10-20 Akim Demaille <akim@epita.fr>
12094 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
12095 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
12096 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
12097 (yyresolveStates, yyresolveAction, yyresolveStack)
12098 (yyprocessOneStack): Use them.
12099 (yy_reduce_print): New.
12100 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
12102 2002-10-20 Akim Demaille <akim@epita.fr>
12104 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
12105 arguments and output `void'.
12106 (b4_c_function): Rename as...
12107 (b4_c_function_def): this.
12108 (b4_c_function_decl, b4_c_ansi_function_def)
12109 (b4_c_ansi_function_decl): New.
12110 Change the interpretation of the arguments: before `int, foo', now
12112 * data/yacc.c (yyparse): Prototype and define thanks to these.
12113 Adjust b4_c_function_def uses.
12114 * data/glr.c (yyparse): Likewise, but ANSI only.
12116 2002-10-20 Akim Demaille <akim@epita.fr>
12118 * src/output.c (prepare): Move the definition of `tokens_number',
12119 `nterms_number', `undef_token_number', `user_token_number_max'
12121 (prepare_tokens): Here.
12122 (prepare_tokens): Rename as...
12123 (prepare_symbols): this.
12124 (prepare): Move the definition of `rules_number' to...
12125 (prepare_rules): here.
12126 (prepare): Move the definition of `last', `final_state_number',
12127 `states_number' to...
12128 (prepare_states): here.
12129 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
12131 2002-10-20 Akim Demaille <akim@epita.fr>
12133 * src/tables.h, src/tables.c, src/output.c: Comment changes.
12135 2002-10-20 Akim Demaille <akim@epita.fr>
12137 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
12140 2002-10-20 Akim Demaille <akim@epita.fr>
12142 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
12143 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
12145 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
12147 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
12148 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
12151 2002-10-19 Paul Eggert <eggert@twinsun.com>
12153 Do not create a temporary file, as that involves security and
12154 cleanup headaches. Instead, use a pair of pipes.
12155 Derived from a suggestion by Florian Krohm.
12156 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
12157 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
12158 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
12159 (BISON_PREREQ_SUBPIPE): Add.
12160 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
12161 Add subpipe.h, subpipe.c.
12162 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
12163 * po/POTFILES.in: Add lib/subpipe.c.
12164 * src/output.c: Include "subpipe.h".
12165 (m4_invoke): Remove decl.
12166 (scan_skel): New decl.
12167 (output_skeleton): Use pipe rather than temporary file for m4 input.
12168 Check that m4sugar.m4 is readable, to avoid deadlock.
12169 Check for pipe I/O error.
12170 * src/scan-skel.l (readpipe): Remove decl.
12171 (scan_skel): New function, to be used in place of m4_invoke.
12172 Read from stream rather than file.
12174 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
12175 float, as this generates a warning on Solaris 8 + GCC 3.2 with
12176 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
12177 this generates a more-accurate value anyway.
12179 * lib/timevar.c (timervar_accumulate): Rename locals to
12180 avoid confusion with similarly-named more-global.
12181 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
12183 * src/output.c (prepare): Use xstrdup to convert char const *
12184 to char *, to avoid GCC warning.
12186 2002-10-19 Akim Demaille <akim@epita.fr>
12188 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
12189 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
12190 Use them to have `calc.y' ready for %pure-parser.
12191 * data/yacc.c (YYLEX): Pass a yylex return type to
12192 b4_c_function_call.
12194 2002-10-19 Akim Demaille <akim@epita.fr>
12196 Prototype support of %lex-param and %parse-param.
12198 * src/parse-gram.y: Add the definition of the %lex-param and
12199 %parse-param tokens, plus their rules.
12200 Drop the `_' version of %glr-parser.
12202 * src/scan-gram.l (INITIAL): Scan them.
12203 * src/muscle_tab.c: Comment changes.
12204 (muscle_insert, muscle_find): Rename `pair' as `probe'.
12205 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
12206 (muscle_entry_s): The `value' member is no longer const.
12207 Adjust all dependencies.
12208 * src/muscle_tab.c (muscle_init): Adjust: use
12209 MUSCLE_INSERT_STRING.
12210 Initialize the obstack earlier.
12211 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
12212 (muscle_pair_list_grow): New.
12213 * data/c.m4 (b4_c_function_call, b4_c_args): New.
12214 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
12215 * tests/calc.at: Use %locations, not --locations.
12216 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
12218 2002-10-19 Akim Demaille <akim@epita.fr>
12220 * src/getargs.c (usage): Take status as argument and exit
12222 Report the traditional `Try ... --help' message when status != 0.
12223 (usage, version): Don't take a FILE * as arg, it is pointless.
12224 (getargs): When there is an incorrect number of arguments, make it
12225 an error, and report it GNUlically thanks to `usage ()'.
12227 2002-10-18 Paul Eggert <eggert@twinsun.com>
12229 * data/glr.c (yyreportParseError): Don't assume that sprintf
12230 yields the length of the printed string, as this is not true
12231 on SunOS 4.1.4. Reported by Peter Klein.
12233 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
12234 * tests/conflicts.at (%nonassoc and eof): Likewise.
12235 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
12237 2002-10-17 Akim Demaille <akim@epita.fr>
12239 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
12240 * src/getargs.c (trace_types, trace_args): Adjust.
12241 * src/reader.c (grammar_current_rule_prec_set)
12242 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
12243 Standardize error messages.
12244 And s/@prec/%prec/!
12245 (reader): Use trace_flag to enable scanner/parser debugging,
12246 instead of an adhoc scheme.
12247 * src/scan-gram.l: Remove trailing debugging code.
12249 2002-10-16 Paul Eggert <eggert@twinsun.com>
12251 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
12254 * NEWS: Officially drop support for building Bison with K&R C,
12255 since it didn't work anyway and it's not worth worrying about.
12256 * Makefile.maint (wget_files): Remove ansi2knr.c.
12257 (ansi2knr.c-url_prefix): Remove.
12258 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
12259 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12260 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12262 2002-10-15 Paul Eggert <eggert@twinsun.com>
12264 Stop using the "enum_" trick for K&R-style function definitions;
12265 it confused me, and I was the author! Instead, assume that people
12266 who want to use K&R C compilers (when using these modules in GCC,
12267 perhaps?) will run ansi2knr.
12269 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
12270 All uses of "enum_" changed to "enum ".
12271 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12272 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12274 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
12275 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
12276 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
12277 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
12278 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
12279 abitset_not, abitset_ones, abitset_or, abitset_or_and,
12280 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
12281 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
12282 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
12283 Use function prototypes; this removes the need for declaring
12284 static functions simply to provide their prototypes.
12285 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
12286 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
12287 bitset_count_, bitset_create, bitset_dump, bitset_first,
12288 bitset_free, bitset_init, bitset_last, bitset_next,
12289 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
12290 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
12291 bitset_print, bitset_release_memory, bitset_toggle_,
12292 bitset_type_choose, bitset_type_get, bitset_type_name_get,
12293 debug_bitset): Likewise.
12294 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
12295 * lib/bitset_stats.c (bitset_log_histogram_print,
12296 bitset_percent_histogram_print, bitset_stats_and,
12297 bitset_stats_and_cmp, bitset_stats_and_or,
12298 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
12299 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
12300 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
12301 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
12302 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
12303 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
12304 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
12305 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
12306 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
12307 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
12308 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
12309 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
12310 bitset_stats_zero): Likewise.
12311 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12312 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12313 bitsetv_dump, debug_bitsetv): Likewise.
12314 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
12315 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
12316 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
12317 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
12318 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
12319 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
12320 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
12321 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
12322 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
12323 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
12324 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
12326 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
12327 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
12328 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
12329 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
12330 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
12331 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
12332 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
12333 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
12334 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
12335 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
12336 lbitset_xor_cmp, lbitset_zero): Likewise.
12338 2002-10-14 Akim Demaille <akim@epita.fr>
12342 2002-10-14 Akim Demaille <akim@epita.fr>
12344 * tests/Makefile.am (maintainer-check-posix): New.
12346 2002-10-14 Akim Demaille <akim@epita.fr>
12348 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
12351 2002-10-14 Akim Demaille <akim@epita.fr>
12353 * src/tables.c (table_ninf_remap): base -> tab.
12354 Reported by Matt Rosing.
12356 2002-10-14 Paul Eggert <eggert@twinsun.com>
12358 * tests/action.at, tests/calc.at, tests/conflicts.at,
12359 tests/cxx-type.at, tests/headers.at, tests/input.at,
12360 tests/regression.at, tests/synclines.at, tests/torture.at:
12361 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
12362 so that the tests still work even if POSIXLY_CORRECT is set.
12363 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
12365 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
12366 for portability to K&R hosts. Fix typo: signed char is guaranteed
12367 only to 127, not to 128.
12368 * data/glr.c (yysigned_char): New type.
12369 * data/yacc.c (yysigned_char): Likewise.
12370 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
12372 2002-10-13 Paul Eggert <eggert@twinsun.com>
12374 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
12375 true due to limited range of data type" warning from GCC.
12377 * data/c.m4 (b4_token_defines): Protect against double-inclusion
12378 by wrapping enum yytokentype's definition inside #ifndef
12379 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
12381 2002-10-13 Akim Demaille <akim@epita.fr>
12383 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
12384 Un yy- yyrhs to avoid the name clash with the global YYRHS.
12386 2002-10-13 Akim Demaille <akim@epita.fr>
12388 * Makefile.maint: Update from Autoconf 2.54.
12389 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
12391 2002-10-13 Akim Demaille <akim@epita.fr>
12393 * src/print.c (print_state): Separate the list of solved conflicts
12394 from the other items.
12395 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
12397 2002-10-13 Akim Demaille <akim@epita.fr>
12399 Let nondeterministic skeletons be usable with deterministic
12402 With the patch, GAWK compiled by GCC without -O2 passes its test
12403 suite using a GLR parser driven by LALR tables. It fails with -O2
12404 because `struct stat' gives two different answers on my machine:
12405 88 (definition of an auto var) and later 96 (memset on this var).
12406 Hence the stack is badly corrumpted. The headers inclusion is to
12407 blame: if I move the awk.h inclusion before GLR's system header
12408 inclusion, the two struct stat have the same size.
12410 * src/tables.c (pack_table): Always create conflict_table.
12411 (token_actions): Always create conflict_list.
12412 * data/glr.c (YYFLAG): Remove, unused.
12414 2002-10-13 Akim Demaille <akim@epita.fr>
12416 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
12418 (VALGRIND, GXX): New.
12419 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
12420 * tests/bison.in: Run $PREBISON a pre-command.
12421 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
12422 (maintainer-check-g++): New.
12423 * Makefile.am (maintainer-check): New.
12425 2002-10-13 Akim Demaille <akim@epita.fr>
12427 * data/glr.c: Formatting changes.
12428 Tweak some trace messages to match yacc.c's.
12430 2002-10-13 Akim Demaille <akim@epita.fr>
12432 GLR parsers sometimes raise parse errors instead of performing the
12434 Reported by Charles-Henry de Boysson.
12436 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
12437 check the length of the traces when %glr.
12438 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
12440 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
12442 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
12443 (yyltype): Remove the yy prefix from the member names.
12444 (yytable): Complete its comment.
12445 (yygetLRActions): Map error action number from YYTABLE from
12447 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
12448 (which was a bug: it should have been YYTABEL_NINF, and yet it was
12449 not satisfying as we could compare an YYACTION computed from
12450 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
12451 only value for error actions.
12452 (yyreportParseError): In verbose parse error messages, don't issue
12453 `error' in the list of expected tokens.
12454 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
12455 next action to perform to match glr.c's decoding.
12456 (yytable): Complete its comment.
12458 2002-10-13 Paul Eggert <eggert@twinsun.com>
12460 Fix problem reported by Henrik Grubbstroem in
12461 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
12462 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
12463 because the Bison parser reads the second action before reducing
12465 * src/scan-gram.l (rule_length): New static var.
12466 Use it to keep track of the rule length in the scanner, since
12467 we can't expect the parser to be in lock-step sync with the scanner.
12468 (handle_action_dollar, handle_action_at): Use this var.
12469 * tests/actions.at (Exotic Dollars): Test for the problem.
12471 2002-10-12 Paul Eggert <eggert@twinsun.com>
12473 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
12474 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
12475 Include <sys/time.h> when checking for clock_t and struct tms.
12476 Use same include order as source.
12477 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
12478 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
12480 * lib/timevar.c: Update copyright date and clarify comments.
12481 (get_time) [IN_GCC]: Keep the GCC version for reference.
12483 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
12484 GCC version as of today, then merge Bison's changes.
12485 Change "GCC" to "Bison" in copyright notice. timevar.def's
12486 author is Akim, so change that too.
12488 * src/reader.c (grammar_current_rule_check):
12489 Don't worry about the default action if $$ is untyped.
12490 Prevents bogus warnings reported by Jim Gifford in
12491 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
12493 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
12494 * data/glr.c, data/lalr1.cc, data/yacc.c:
12495 Output token definitions before the first part of user declarations.
12496 Fixes compatibility problem reported by Jim Gifford for kbd in
12497 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
12499 2002-10-11 Paul Eggert <eggert@twinsun.com>
12501 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
12502 (yyparse): here. This undoes some of the 2002-07-25 change.
12503 Compatibility problem reported by Ralf S. Engelschall with
12504 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12506 2002-10-11 Akim Demaille <akim@epita.fr>
12508 * tests/regression.at Characters Escapes): New.
12509 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12511 Reported by Jan Nieuwenhuizen.
12513 2002-10-11 Akim Demaille <akim@epita.fr>
12517 2002-10-10 Paul Eggert <eggert@twinsun.com>
12519 Portability fixes for bitsets; this also avoids several GCC
12522 * lib/abitset.c: Include <stddef.h>, for offsetof.
12523 * lib/lbitset.c: Likewise.
12525 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12526 properly for vectors of objects. Do not assume that adding a
12527 header size to a multiple of a word size yields a value that is
12528 properly aligned for the whole union.
12529 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12531 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12532 unique names for structures.
12533 * lib/ebitset.c (ebitset_bytes): Likewise.
12534 * lib/lbitset.c (lbitset_bytes): Likewise.
12536 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12537 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12538 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12539 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12540 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12541 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12542 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12543 to improve the type-checking that GCC can do.
12544 * lib/bitset.c (bitset_op4_cmp): Likewise.
12545 * lib/bitset_stats.c (bitset_stats_count,
12546 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12547 bitset_stats_copy, bitset_stats_disjoint_p,
12548 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12549 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12550 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12551 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12552 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12553 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12554 bitset_stats_or_and_cmp): Likewise.
12555 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12556 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12557 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12558 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12560 * lib/abitset.h: Include bitset.h, not bbitset.h.
12561 * lib/ebitset.h: Likewise.
12562 * lib/lbitset.h: Likewise.
12564 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12565 All instances of parameters of type enum bitset_opts are now of
12566 type enum_bitset_opts, to conform to the C Standard, and similarly
12567 for enum_bitset_type.
12568 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12569 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12571 Do not use "struct bitset_struct" to mean different things in
12572 different modules. Not only is this confusing, it violates
12573 the C Standard, which requires that structure types in different
12574 modules must be compatible if one is to be passed to the other.
12575 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12576 All instances of "struct bitset_struct *" replaced with "bitset".
12577 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12578 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12579 struct lbitset_struct, struct bitset_stats_struct): New types.
12580 All uses of struct bitset_struct changed to union bitset_union,
12582 * lib/abitset.c (struct abitset_struct, abitset,
12583 struct bitset_struct): Remove.
12584 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12585 struct bitset_struct): Remove.
12586 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12587 bitset_struct): Remove.
12588 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12591 Do not call a function of type T using a call that assumes the
12592 function is of a different type U. Standard C requires that a
12593 function must be called with a type that is compatible with its
12595 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12597 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12599 * lib/ebitset.c (PFV): Remove.
12600 * lib/lbitset.c (PFV): Likewise.
12601 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12602 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12604 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12605 (ebitset_vtable): Use them.
12606 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12607 lbitset_xor): New functions.
12608 (lbitset_vtable): Use them.
12610 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12613 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12615 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12616 Use offsetof, for simplicity.
12618 2002-10-06 Paul Eggert <eggert@twinsun.com>
12620 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12621 the same width as int. This reapplies a hunk of the 2002-08-12 patch
12622 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
12623 which was inadvertently undone by the 2002-09-30 patch.
12624 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12625 the same width as int.
12627 2002-10-04 Paul Eggert <eggert@twinsun.com>
12631 * configure.ac (AC_INIT), NEWS: Increment version number.
12633 * doc/bison.texinfo: Minor spelling, grammar, and white space
12635 (Symbols): Mention that any negative value returned from yylex
12636 signifies end-of-input. Warn about negative chars. Mention
12637 the portable Standard C character set.
12639 The GNU coding standard says CFLAGS and YFLAGS are reserved
12640 for the installer to set.
12641 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12642 * src/Makefile.am (AM_CFLAGS): Likewise.
12643 (AM_YFLAGS): Renamed from YFLAGS.
12645 Fix some MAX and MIN problems.
12646 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12647 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12648 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12649 * src/reader.c (reader): Use it.
12651 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12652 POSIX 1003.1-2001 has removed fgrep.
12654 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12656 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12657 interpreted as signed.
12658 * lib/ebitset.c (ebitset_list): Fix bug.
12660 2002-10-01 Paul Eggert <eggert@twinsun.com>
12662 More fixes for 64-bit hosts and large bitsets.
12664 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12665 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12666 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12667 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12668 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12669 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12670 bitset_count_): Likewise.
12671 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12672 bitset_first, bitset_last): Likewise.
12673 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12674 bitset_stats_list_reverse, bitset_stats_size,
12675 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12677 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12678 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12679 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12680 bitsetv_reflexive_transitive_closure): Likewise.
12681 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12682 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12684 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12687 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12688 Use size_t, not unsigned int, to count bytes.
12689 * lib/abitset.h (abitset_bytes): Likewise.
12690 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12692 * lib/bitset.h (bitset_bytes): Likewise.
12693 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12694 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12695 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12696 * lib/ebitset.c (ebitset_bytes): Likewise.
12697 * lib/ebitset.h (ebitset_bytes): Likewise.
12698 * lib/lbitset.c (lbitset_bytes): Likewise.
12699 * lib/lbitset.h (lbitset_bytes): Likewise.
12701 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12702 abitset_subset_p, abitset_disjoint_p, abitset_and,
12703 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12704 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12705 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12706 abitset_or_and, abitset_or_and_cmp):
12707 Use bitset_windex instead of unsigned int.
12708 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12709 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12710 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12711 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12713 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12715 * lib/bitset.c (bitset_print):
12716 Use proper printf formats for widths of integer types.
12717 * lib/bitset_stats.c (bitset_percent_histogram_print,
12718 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12719 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12720 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12721 * lib/lbitset.c (lbitset_bytes): Likewise.
12723 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12724 BITSET_SIZE_MAX): New macros.
12725 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12726 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12727 to BITSET_WINDEX_MAX.
12729 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12730 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12731 since we now return the bitset_bindex type (not int).
12733 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12734 when computing sizes.
12735 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12737 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12738 and avoid cast to unsigned.
12740 2002-09-30 Akim Demaille <akim@epita.fr>
12742 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12743 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12744 Updates from Michael Hayes.
12746 2002-09-30 Art Haas <ahaas@neosoft.com>
12748 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12750 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12753 2002-09-27 Akim Demaille <akim@epita.fr>
12757 2002-09-27 Akim Demaille <akim@epita.fr>
12759 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12760 (Because of AC_LIBSOURCE).
12762 2002-09-27 Akim Demaille <akim@epita.fr>
12764 Playing with Autoscan.
12766 * configure.ac: Remove the old LIBOBJ tweaks.
12767 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12768 * lib/strrchr.c: New.
12769 * lib/strtol.c: New, from the Coreutils 4.5.1.
12771 2002-09-27 Akim Demaille <akim@epita.fr>
12773 Playing with Autoscan.
12775 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12776 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12777 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12778 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12781 2002-09-24 Akim Demaille <akim@epita.fr>
12783 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12784 (Frequently Asked Questions, Parser Stack Overflow): New.
12786 2002-09-13 Akim Demaille <akim@epita.fr>
12788 Playing with autoscan.
12790 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12791 * src/files.c (skeleton_find): Remove, unused.
12792 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12793 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12795 2002-09-13 Akim Demaille <akim@epita.fr>
12797 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12798 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12800 2002-09-13 Akim Demaille <akim@epita.fr>
12802 * configure.ac: Require 2.54.
12803 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12804 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12805 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12806 Remove, provided by Autoconf macros.
12808 2002-09-12 Akim Demaille <akim@epita.fr>
12810 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12812 2002-09-12 Akim Demaille <akim@epita.fr>
12814 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12815 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12816 Reported by Martin Mokrejs.
12818 2002-09-10 Akim Demaille <akim@epita.fr>
12820 * src/parse-gram.y: Associate a human readable string to each
12822 * tests/regression.at (Invalid inputs): Adjust.
12824 2002-09-10 Gary V. Vaughan <gary@gnu.org>
12826 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12827 with an Autoconf-2.5x style configure.ac.
12829 2002-09-06 Paul Eggert <eggert@twinsun.com>
12831 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12832 exception applies only to yacc.c. This is a modification of a
12833 patch originally suggested by Akim Demaille.
12835 2002-09-06 Akim Demaille <akim@epita.fr>
12837 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12839 * data/yacc.c: here.
12841 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12843 (b4_ltype): Default to yy::Location from location.hh.
12845 2002-09-04 Jim Meyering <jim@meyering.net>
12847 * data/yacc.c: Guard the declaration of yytoknum also with
12848 `#ifdef YYPRINT', so it is declared only when used.
12850 2002-09-04 Akim Demaille <akim@epita.fr>
12852 * configure.in: Rename as...
12853 * configure.ac: this.
12856 2002-09-04 Akim Demaille <akim@epita.fr>
12858 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12859 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12860 translate maintainer only messages.
12862 2002-08-12 Paul Eggert <eggert@twinsun.com>
12866 * Makefile.am (SUBDIRS): Remove intl.
12867 (DISTCLEANFILES): Remove.
12868 * NEWS: Mention that GNU M4 is now required. Clarify what is
12869 meant by "larger grammars". Mention the pt_BR translation.
12870 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12871 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12872 Bump version from 0.11.2 to 0.11.5.
12873 (BISON_PREREQ_STAGE): Remove.
12874 (AM_GNU_GETTEXT): Use external gettext.
12875 (AC_OUTPUT): Remove intl/Makefile.
12877 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12879 * data/glr.c: Include string.h, for strlen.
12880 (yyreportParseError): Use size_t for yysize.
12881 (yy_yypstack): No longer nested inside yypstates, as nested
12882 functions are not portable. Do not assume size_t is the
12884 (yypstates): Do not assume that ptrdiff_t is the same width
12885 as int, and similarly for yyposn and YYINDEX.
12887 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12889 * lib/Makefile.am (INCLUDES): Do not include from the intl
12890 directory, which has been removed.
12891 * src/Makefile.am (INCLUDES): Likewise.
12893 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12894 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12897 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12898 * tests/Makefile.am (EXTRA_DIST): Likewise.
12900 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12901 Do not assume that bitset_windex is the same width as unsigned.
12903 * lib/abitset.c (abitset_unused_clear): Do not assume that
12904 bitset_word is the same width as int.
12905 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12906 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12907 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12908 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12909 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12911 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12912 portability to one's complement hosts!).
12913 * lib/ebitset.c (ebitset_op1): Likewise.
12914 * lib/lbitset.c (lbitset_op1): Likewise.
12916 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12917 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12918 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12919 Sync with fileutils.
12920 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12921 lib/gettext.h: Sync with diffutils.
12923 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12924 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12926 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12927 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12930 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12931 size_t; the old version tried to do this but casted improperly.
12932 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12933 (bitset_test): Now returns int, not unsigned long.
12935 * lib/bitset_stats.c: Include "gettext.h".
12937 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12938 name locals "index", as it generates unnecessary warnings on some
12939 hosts that have an "index" function.
12941 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12942 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12943 they need translation.
12944 * src/LR0.c (state_list_append, new_itemsets, get_state,
12945 append_states, generate_states): Likewise.
12946 * src/assoc.c (assoc_to_string): Likewise.
12947 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12948 * src/gram.c (grammar_dump): Likewise.
12949 * src/injections.c (injections_compute): Likewise.
12950 * src/lalr.c (lookaheads_print): Likewise.
12951 * src/relation.c (relation_transpose): Likewise.
12952 * src/scan-gram.l: Likewise.
12953 * src/tables.c (table_grow, pack_vector): Likewise.
12955 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12956 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12957 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12958 * m4/mbstate_t.m4: Sync with fileutils.
12959 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12961 * po/LINGUAS: Add pt_BR.
12962 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12963 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12965 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12967 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12969 * src/complain.c (strerror_r): Remove decl; not needed.
12970 (strerror): Use same pattern as ../lib/error.c.
12972 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12974 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12976 * src/main.c (main): Cast result of bindtextdomain and textdomain
12977 to void, to avoid a GCC warning when --disable-nls is in effect.
12979 * src/scan-gram.l: Use strings rather than escapes when possible,
12980 to minimize the number of warnings from xgettext.
12981 (handle_action_dollar, handle_action_at): Don't use isdigit,
12982 as it mishandles negative chars and it may not work as expected
12983 outside the C locale.
12985 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12986 this is a GCC extension and is not portable to other compilers.
12988 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12989 Do not include <ctype.h>; no longer needed.
12990 Do not include <malloc.h>; no longer needed (and generates
12991 warnings on OpenBSD 3.0).
12993 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12996 * tests/regression.at: Do not use 'cc -c input.c -o input';
12997 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12999 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
13000 exit status as failure, not just exit status 1. Sun C exits
13001 with status 2 sometimes.
13003 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
13004 Use it for the two large tests.
13006 2002-08-02 Akim Demaille <akim@epita.fr>
13008 * src/conflicts.c (conflicts_output): Don't output rules never
13009 reduced here, since anyway that computation doesn't work.
13010 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
13011 (rule_useless_p, rule_never_reduced_p): New.
13012 (grammar_rules_partial_print): Use a filter instead of a range.
13013 Display the title only if needed.
13014 (grammar_rules_print): Adjust.
13015 (grammar_rules_never_reduced_report): New.
13016 * src/tables.c (action_row): Move the computation of rules never
13018 (token_actions): here.
13019 * src/main.c (main): Make the parser before making the report, so
13020 that rules never reduced are computed.
13021 Call grammar_rules_never_reduced_report.
13022 * src/print.c (print_results): Report rules never reduced.
13023 * tests/conflicts.at, tests/reduce.at: Adjust.
13025 2002-08-01 Akim Demaille <akim@epita.fr>
13027 Instead of attaching lookaheads and duplicating the rules being
13028 reduced by a state, attach the lookaheads to the reductions.
13030 * src/state.h (state_t): Remove the `lookaheads',
13031 `lookaheads_rule' member.
13032 (reductions_t): Add a `lookaheads' member.
13033 Use a regular array for the `rules'.
13034 * src/state.c (reductions_new): Initialize the lookaheads member
13036 (state_rule_lookaheads_print): Adjust.
13037 * src/state.h, src/state.c (state_reductions_find): New.
13038 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
13039 (count_rr_conflicts): Adjust.
13040 * src/lalr.c (LArule): Remove.
13041 (add_lookback_edge): Adjust.
13042 (state_lookaheads_count): New.
13043 (states_lookaheads_initialize): Merge into...
13044 (initialize_LA): this.
13045 (lalr_free): Adjust.
13046 * src/main.c (main): Don't free nullable and derives too early: it
13047 is used by --verbose.
13048 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
13050 2002-08-01 Akim Demaille <akim@epita.fr>
13052 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
13054 (set_derives, free_derives): Rename as...
13055 (derives_compute, derives_free): this.
13056 Adjust all dependencies.
13057 * src/nullable.c (set_nullable, free_nullable): Rename as...
13058 (nullable_compute, nullable_free): these.
13059 (rule_list_t): Store rule_t *, not rule_number_t.
13060 * src/state.c (state_rule_lookaheads_print): Directly compare rule
13061 pointers, instead of their numbers.
13062 * src/main.c (main): Call nullable_free, and derives_free earlier,
13063 as they were lo longer used.
13065 2002-08-01 Akim Demaille <akim@epita.fr>
13067 * lib/timevar.c (get_time): Include children time.
13068 * src/lalr.h (LA, LArule): Don't export them: used with the
13070 * src/lalr.c (LA, LArule): Static.
13071 * src/lalr.h, src/lalr.c (lalr_free): New.
13072 * src/main.c (main): Call it.
13073 * src/tables.c (pack_vector): Check whether loc is >= to the
13075 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
13076 (tables_generate): do it, since that's also it which allocates
13078 Don't free LA and LArule, main does.
13080 2002-07-31 Akim Demaille <akim@epita.fr>
13082 Separate parser tables computation and output.
13084 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
13085 (conflict_list, conflict_list_cnt, table, check, table_ninf)
13086 (yydefgoto, yydefact, high): Move to...
13087 * src/tables.h, src/tables.c: here.
13088 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13089 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13090 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
13091 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
13092 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
13093 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
13094 (action_row, save_row, token_actions, save_column, default_goto)
13095 (goto_actions, sort_actions, matching_state, pack_vector)
13096 (table_ninf_remap, pack_table, prepare_actions): Move to...
13097 * src/tables.c: here.
13098 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
13099 * src/output.c (token_actions, output_base, output_conflicts)
13100 (output_check): Merge into...
13101 (prepare_actions): this.
13102 (actions_output): Rename as...
13103 (user_actions_output): this.
13104 * src/main.c (main): Call tables_generate and tables_free.
13106 2002-07-31 Akim Demaille <akim@epita.fr>
13108 Steal GCC's --time-report support.
13110 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
13111 stolen/adjusted from GCC.
13112 * m4/stage.m4: Remove time related checks.
13113 * m4/timevar.m4: New.
13114 * configure.in: Adjust.
13115 * src/system.h: Adjust to using timevar.h.
13116 * src/getargs.h, src/getargs.c: Support trace_time for
13118 * src/main.c (stage): Remove.
13119 (main): Replace `stage' invocations with timevar calls.
13120 * src/output.c: Insert pertinent timevar calls.
13122 2002-07-31 Akim Demaille <akim@epita.fr>
13124 Let --trace have arguments.
13126 * src/getargs.h (enum trace_e): New.
13127 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
13128 (long_options, short_options): --trace/-T takes an optional
13130 Change all the uses of trace_flag to reflect the new flags.
13131 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
13133 Strengthen `stage' portability.
13135 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
13136 * configure.in: Use it.
13137 Don't check for malloc.h and sys/times.h.
13138 * src/system.h: Include them when appropriate.
13139 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
13140 times and struct tms are available.
13142 2002-07-30 Akim Demaille <akim@epita.fr>
13144 In verbose parse error message, don't report `error' as an
13146 * tests/actions.at (Printers and Destructors): Adjust.
13147 * tests/calc.at (Calculator $1): Adjust.
13148 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
13149 error message, do not report the parser accepts the error token in
13152 2002-07-30 Akim Demaille <akim@epita.fr>
13154 Normalize conflict related messages.
13156 * src/complain.h, src/complain.c (warn, complain): New.
13157 * src/conflicts.c (conflicts_print): Use them.
13158 (conflict_report_yacc): New, extracted from...
13159 (conflicts_print): here.
13160 * tests/conflicts.at, tests/existing.at: Adjust.
13162 2002-07-30 Akim Demaille <akim@epita.fr>
13164 Report rules which are never reduced by the parser: those hidden
13167 * src/LR0.c (save_reductions): Don't make the final state too
13168 different: save its reduction (accept) instead of having a state
13169 without any action (no shift or goto, no reduce).
13170 Note: the final state is now a ``regular'' state, i.e., the
13171 parsers now contain `reduce 0' as default reduction.
13172 Nevertheless, since they decide to `accept' when yystate =
13173 final_state, they still will not reduce rule 0.
13174 * src/print.c (print_actions, print_reduction): Adjust.
13175 * src/output.c (action_row): Track reduced rules.
13176 (token_actions): Report rules never reduced.
13177 * tests/conflicts.at, tests/regression.at: Adjust.
13179 2002-07-30 Akim Demaille <akim@epita.fr>
13181 `stage' was accidently included in a previous patch.
13182 Initiate its autoconfiscation.
13184 * configure.in: Look for malloc.h and sys/times.h.
13185 * src/main.c (stage): Adjust.
13186 Report only when trace_flag.
13188 2002-07-29 Akim Demaille <akim@epita.fr>
13190 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
13192 (errs_t): symbol_t*, not symbol_number_t.
13193 (reductions_t): rule_t*, not rule_number_t.
13194 (FOR_EACH_SHIFT): New.
13195 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
13196 * src/print.c, src/print_graph.c: Adjust.
13198 2002-07-29 Akim Demaille <akim@epita.fr>
13200 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
13202 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
13203 (endtoken, accept): these.
13204 * src/reader.c (reader): Set endtoken's default tag to "$end".
13205 Set undeftoken's tag to "$undefined" instead of "$undefined.".
13206 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
13209 2002-07-29 Akim Demaille <akim@epita.fr>
13211 * src/reduce.c (reduce_grammar): When the language is empty,
13212 complain about the start symbol, not the axiom.
13214 * tests/reduce.at (Empty Language): New.
13216 2002-07-26 Akim Demaille <akim@epita.fr>
13218 * src/reader.h, src/reader.c (gram_error): ... can't get
13219 yycontrol without making too strong assumptions on the parser
13221 * src/output.c (prepare_tokens): Use the real 0th value of
13222 token_translations instead of `0'.
13223 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
13225 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
13226 for the time being: %locations ought to provide it to yyerror.
13228 2002-07-25 Akim Demaille <akim@epita.fr>
13230 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
13231 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
13232 * tests/regression.at (Web2c Actions): Adjust.
13234 2002-07-25 Akim Demaille <akim@epita.fr>
13236 Stop storing rules from 1 to nrules + 1.
13238 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
13239 * src/nullable.c, src/output.c, src/print.c, src/reader.c
13240 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
13241 Iterate from 0 to nrules.
13242 Use rule_number_as_item_number and item_number_as_rule_number.
13243 Adjust to `derive' now containing possibly 0.
13244 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
13245 Handle the `- 1' part in rule numbers from/to item numbers.
13246 * src/conflicts.c (log_resolution): Fix the message which reversed
13248 * src/output.c (action_row): Initialize default_rule to -1.
13249 (token_actions): Adjust.
13250 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
13252 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
13254 2002-07-25 Akim Demaille <akim@epita.fr>
13256 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
13257 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
13258 (b4_c_knr_arg_decl): New.
13259 * data/yacc.c: Use it to define yysymprint, yydestruct, and
13260 yyreport_parse_error.
13262 2002-07-25 Akim Demaille <akim@epita.fr>
13264 * data/yacc.c (yyreport_parse_error): New, extracted from...
13266 (yydestruct, yysymprint): Move above yyparse.
13269 2002-07-25 Akim Demaille <akim@epita.fr>
13271 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
13273 (b4_sint_type, b4_uint_type): these.
13274 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
13275 * tests/regression.at (Web2c Actions): Adjust.
13277 2002-07-25 Akim Demaille <akim@epita.fr>
13279 * src/gram.h (TIEM_NUMBER_MAX): New.
13280 (item_number_of_rule_number, rule_number_of_item_number): Rename
13282 (rule_number_as_item_number, item_number_as_rule_number): these.
13283 Adjust dependencies.
13284 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13285 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13286 (symbol_number_to_vector_number): New.
13287 (order): Of vector_number_t* type.
13288 (base_t, BASE_MAX, BASE_MIN): New.
13289 (froms, tos, width, pos, check): Of base_t type.
13290 (action_number_t, ACTION_MIN, ACTION_MAX): New.
13291 (actrow): Of action_number_t type.
13292 (conflrow): Of unsigned int type.
13293 (table_ninf, base_ninf): New.
13294 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
13295 (muscle_insert_int_table, muscle_insert_base_table)
13296 (muscle_insert_rule_number_table): New.
13297 (prepare_tokens): Output `toknum' as int_table.
13298 (action_row): Returns a rule_number_t.
13299 Use ACTION_MIN, not SHRT_MIN.
13300 (token_actions): yydefact is rule_number_t*.
13301 (table_ninf_remap): New.
13302 (pack_table): Use it for `base' and `table'.
13303 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
13305 (YYPACT_NINF, YYTABLE_NINF): these.
13306 (yypact, yytable): Compute their types instead of hard-coded
13308 * tests/regression.at (Web2c Actions): Adjust.
13310 2002-07-19 Akim Demaille <akim@epita.fr>
13312 * src/scan-gram.l (id): Can start with an underscore.
13314 2002-07-16 Akim Demaille <akim@epita.fr>
13316 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
13317 Adjust all former `associativity' dependencies.
13318 * src/symtab.c (symbol_new): Default associativity is `undef', not
13320 (symbol_check_alias_consistence): Adjust.
13322 2002-07-09 Akim Demaille <akim@epita.fr>
13324 * doc/bison.texinfo: Properly set the ``header'' part.
13325 Use @dircategory ``GNU programming tools'' as per Texinfo's
13329 2002-07-09 Akim Demaille <akim@epita.fr>
13331 * lib/quotearg.h: Protect against multiple inclusions.
13332 * src/location.h (location_t): Add a `file' member.
13333 (LOCATION_RESET, LOCATION_PRINT): Adjust.
13334 * src/complain.c (warn_at, complain_at, fatal_at): Drop
13335 `error_one_per_line' support.
13337 2002-07-09 Akim Demaille <akim@epita.fr>
13339 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
13340 * src/reader.c (lineno): Remove.
13341 Adjust all dependencies.
13342 (get_merge_function): Take a location and use complain_at.
13343 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
13344 * tests/regression.at (Invalid inputs, Mixing %token styles):
13347 2002-07-09 Akim Demaille <akim@epita.fr>
13349 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
13350 recovery rule, and forbid extensions when --yacc.
13351 (gram_error): Use complain_at.
13352 * src/reader.c (reader): Exit if there were parse errors.
13354 2002-07-09 Akim Demaille <akim@epita.fr>
13356 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
13357 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
13358 Reported by R Blake <blakers@mac.com>.
13360 2002-07-09 Akim Demaille <akim@epita.fr>
13362 * data/yacc.c: Output the copyright notive in the header.
13364 2002-07-03 Akim Demaille <akim@epita.fr>
13366 * src/output.c (froms, tos): Are state_number_t.
13367 (save_column): sp, sp1, and sp2 are state_number_t.
13368 (prepare): Rename `final' as `final_state_number', `nnts' as
13369 `nterms_number', `nrules' as `rules_number', `nstates' as
13370 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
13372 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
13373 * data/lalr1.cc (nsym_): Remove, unused.
13375 2002-07-03 Akim Demaille <akim@epita.fr>
13377 * src/lalr.h, src/lalr.c (goto_number_t): New.
13378 * src/lalr.c (goto_list_t): New.
13380 * src/nullable.c (rule_list_t): New.
13382 * src/types.h: Remove.
13384 2002-07-03 Akim Demaille <akim@epita.fr>
13386 * src/closure.c (print_fderives): Use rule_rhs_print.
13387 * src/derives.c (print_derives): Use rule_rhs_print.
13388 (rule_list_t): New, replaces `shorts'.
13389 (set_derives): Add comments.
13390 * tests/sets.at (Nullable, Firsts): Adjust.
13392 2002-07-03 Akim Demaille <akim@epita.fr>
13394 * src/output.c (prepare_actions): Free `tally' and `width'.
13395 (prepare_actions): Allocate and free `order'.
13396 * src/symtab.c (symbols_free): Free `symbols'.
13397 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
13398 * src/output.c (m4_invoke): Move to...
13399 * src/scan-skel.l: here.
13400 (<<EOF>>): Close yyout, and free its name.
13402 2002-07-03 Akim Demaille <akim@epita.fr>
13404 Fix some memory leaks, and fix a bug: state 0 was examined twice.
13406 * src/LR0.c (new_state): Merge into...
13407 (state_list_append): this.
13408 (new_states): Merge into...
13409 (generate_states): here.
13410 (set_states): Don't ensure a proper `errs' state member here, do it...
13411 * src/conflicts.c (conflicts_solve): here.
13412 * src/state.h, src/state.c: Comment changes.
13413 (state_t): Rename member `shifts' as `transitions'.
13414 Adjust all dependencies.
13415 (errs_new): For consistency, also take the values as argument.
13416 (errs_dup): Remove.
13417 (state_errs_set): New.
13418 (state_reductions_set, state_transitions_set): Assert that no
13419 previous value was assigned.
13421 (states_free): Use it.
13422 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
13423 temporary storage: use `errs' and `nerrs' as elsewhere.
13424 (set_conflicts): Allocate and free this `errs'.
13426 2002-07-02 Akim Demaille <akim@epita.fr>
13428 * lib/libiberty.h: New.
13429 * lib: Update the bitset implementation from upstream.
13430 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
13431 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
13432 * src/main.c: Adjust bitset stats calls.
13434 2002-07-01 Paul Eggert <eggert@twinsun.com>
13436 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
13437 char, so that negative chars don't collide with $.
13439 2002-06-30 Akim Demaille <akim@epita.fr>
13441 Have the GLR tests be `warning' checked, and fix the warnings.
13443 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
13444 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
13445 (yyremoveDeletes): `yyi' and `yyj' are size_t.
13446 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
13447 (yyaddDeferredAction): static.
13448 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
13449 (yyreportParseError): yyprefix is const.
13450 yytokenp is used only when verbose.
13451 (yy__GNUC__): Replace with __GNUC__.
13452 (yypdumpstack): yyi is size_t.
13453 (yypreference): Un-yy local variables and arguments, to avoid
13454 clashes with `yyr1'. Anyway, we are not in the user name space.
13455 (yytname_size): be an int, as is compared with ints.
13456 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
13458 * tests/cxx-gram.at: Use quotation to protect $1.
13459 Use AT_COMPILE to enable warnings hunts.
13460 Prototype yylex and yyerror.
13462 Include `string.h', not `strings.h'.
13463 Produce and prototype stmtMerge only when used.
13464 yylex takes a location.
13466 2002-06-30 Akim Demaille <akim@epita.fr>
13468 We spend a lot of time in quotearg, in particular when --verbose.
13470 * src/symtab.c (symbol_get): Store a quoted version of the key.
13471 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
13472 Adjust all callers.
13474 2002-06-30 Akim Demaille <akim@epita.fr>
13476 * src/state.h (reductions_t): Rename member `nreds' as num.
13477 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
13478 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
13480 2002-06-30 Akim Demaille <akim@epita.fr>
13482 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
13483 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
13484 (shifts_to): Rename as...
13485 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
13486 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
13487 (TRANSITION_IS_DISABLED, transitions_to): these.
13489 2002-06-30 Akim Demaille <akim@epita.fr>
13491 * src/print.c (print_shifts, print_gotos): Merge into...
13492 (print_transitions): this.
13493 (print_transitions, print_errs, print_reductions): Align the
13494 lookaheads columns.
13495 (print_core, print_transitions, print_errs, print_state,
13496 print_grammar): Output empty lines separator before, not after.
13497 (state_default_rule_compute): Rename as...
13498 (state_default_rule): this.
13499 * tests/conflicts.at (Defaulted Conflicted Reduction),
13500 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
13501 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
13503 2002-06-30 Akim Demaille <akim@epita.fr>
13505 Display items as we display rules.
13507 * src/gram.h, src/gram.c (rule_lhs_print): New.
13508 * src/gram.c (grammar_rules_partial_print): Use it.
13509 * src/print.c (print_core): Likewise.
13510 * tests/conflicts.at (Defaulted Conflicted Reduction),
13511 (Unresolved SR Conflicts): Adjust.
13512 (Unresolved SR Conflicts): Adjust and rename as...
13513 (Resolved SR Conflicts): this, as was meant.
13514 * tests/regression.at (Web2c Report): Adjust.
13516 2002-06-30 Akim Demaille <akim@epita.fr>
13518 * src/print.c (state_default_rule_compute): New, extracted from...
13519 (print_reductions): here.
13520 Pessimize, but clarify the code.
13521 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13523 2002-06-30 Akim Demaille <akim@epita.fr>
13525 * src/output.c (action_row): Let default_rule be always a rule
13528 2002-06-30 Akim Demaille <akim@epita.fr>
13530 * src/closure.c (print_firsts, print_fderives, closure):
13531 Use BITSET_EXECUTE.
13532 * src/lalr.c (lookaheads_print): Likewise.
13533 * src/state.c (state_rule_lookaheads_print): Likewise.
13534 * src/print_graph.c (print_core): Likewise.
13535 * src/print.c (print_reductions): Likewise.
13536 * src/output.c (action_row): Likewise.
13537 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13539 2002-06-30 Akim Demaille <akim@epita.fr>
13541 * src/print_graph.c: Use report_flag.
13543 2002-06-30 Akim Demaille <akim@epita.fr>
13545 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13547 * src/relation.h, src/relation.c (traverse, relation_digraph)
13548 (relation_print, relation_transpose): New.
13550 2002-06-30 Akim Demaille <akim@epita.fr>
13552 * src/state.h, src/state.c (shifts_to): New.
13553 * src/lalr.c (build_relations): Use it.
13555 2002-06-30 Akim Demaille <akim@epita.fr>
13557 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13558 (item_number_of_rule_number, rule_number_of_item_number): New.
13559 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13560 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13561 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13562 Propagate their use.
13563 Much remains to be done, in particular wrt `shorts' from types.h.
13565 2002-06-30 Akim Demaille <akim@epita.fr>
13567 * src/symtab.c (symbol_new): Initialize the `printer' member.
13569 2002-06-30 Akim Demaille <akim@epita.fr>
13571 * src/LR0.c (save_reductions): Remove, replaced by...
13572 * src/state.h, src/state.c (state_reductions_set): New.
13573 (reductions, errs): Rename as...
13574 (reductions_t, errs_t): these.
13575 Adjust all dependencies.
13577 2002-06-30 Akim Demaille <akim@epita.fr>
13579 * src/LR0.c (state_list_t, state_list_append): New.
13580 (first_state, last_state): Now symbol_list_t.
13581 (this_state): Remove.
13582 (new_itemsets, append_states, save_reductions): Take a state_t as
13584 (set_states, generate_states): Adjust.
13585 (save_shifts): Remove, replaced by...
13586 * src/state.h, src/state.c (state_shifts_set): New.
13587 (shifts): Rename as...
13589 Adjust all dependencies.
13590 * src/state.h (state_t): Remove the `next' member.
13592 2002-06-30 Akim Demaille <akim@epita.fr>
13594 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13597 2002-06-30 Akim Demaille <akim@epita.fr>
13599 Use hash.h for the state hash table.
13601 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13602 (allocate_storage): Use state_hash_new.
13603 (free_storage): Use state_hash_free.
13604 (new_state, get_state): Adjust.
13605 * src/lalr.h, src/lalr.c (states): Move to...
13606 * src/states.h (state_t): Remove the `link' member, no longer
13608 * src/states.h, src/states.c: here.
13609 (state_hash_new, state_hash_free, state_hash_lookup)
13610 (state_hash_insert, states_free): New.
13611 * src/states.c (state_table, state_compare, state_hash): New.
13612 * src/output.c (output_actions): Do not free states now, since we
13613 still need to know the final_state number in `prepare', called
13614 afterwards. Do it...
13615 * src/main.c (main): here: call states_free after `output'.
13617 2002-06-30 Akim Demaille <akim@epita.fr>
13619 * src/state.h, src/state.c (state_new): New, extracted from...
13620 * src/LR0.c (new_state): here.
13621 * src/state.h (STATE_ALLOC): Move to...
13622 * src/state.c: here.
13623 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13624 * src/state.h, src/state.c: here.
13626 2002-06-30 Akim Demaille <akim@epita.fr>
13628 * src/reader.c (gensym): Rename as...
13629 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13630 (getsym): Rename as...
13631 (symbol_get): this.
13633 2002-06-30 Akim Demaille <akim@epita.fr>
13635 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13636 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13637 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13638 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13640 2002-06-30 Akim Demaille <akim@epita.fr>
13642 Make the test suite pass with warnings checked.
13644 * tests/actions.at (Printers and Destructors): Improve.
13645 Avoid unsigned vs. signed issues.
13646 * tests/calc.at: Don't exercise the scanner here, do it...
13647 * tests/input.at (Torturing the Scanner): here.
13649 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13651 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
13652 reorganize first lines parallel to yacc.c.
13654 2002-06-28 Akim Demaille <akim@epita.fr>
13656 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13657 (b4_token_enum, b4_token_defines): New, factored from...
13658 * data/lalr1.cc, data/yacc.c, glr.c: here.
13660 2002-06-28 Akim Demaille <akim@epita.fr>
13662 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13664 * src/output.c (merger_output): static.
13666 2002-06-28 Akim Demaille <akim@epita.fr>
13668 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13669 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13671 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13673 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13675 Accumulated changelog for new GLR parsing features.
13677 * src/conflicts.c (count_total_conflicts): Change name to
13678 conflicts_total_count.
13679 * src/conflicts.h: Ditto.
13680 * src/output.c (token_actions): Use the new name.
13681 (output_conflicts): Change conflp => conflict_list_heads, and
13682 confl => conflict_list for better readability.
13683 * data/glr.c: Use the new names.
13684 * NEWS: Add self to GLR announcement.
13686 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13688 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13691 * data/bison.glr: Change name to glr.c
13692 * data/glr.c: Renamed from bison.glr.
13693 * data/Makefile.am: Add glr.c
13697 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13698 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13700 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13702 * data/bison.glr: Be sure to restore the
13703 current #line when returning to the skeleton contents after having
13704 exposed the input file's #line.
13706 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13708 * data/bison.glr: Bring up to date with changes to bison.simple.
13710 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13712 * data/bison.glr: Correct definitions that use b4_prefix.
13713 Various reformatting.
13714 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13715 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13716 yytokenp argument; now part of stack.
13717 (yychar): Define to behave as documented.
13718 (yyclearin): Ditto.
13720 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13722 * src/reader.h: Add declaration for free_merger_functions.
13724 * src/reader.c (merge_functions): New variable.
13725 (get_merge_function): New function.
13726 (free_merger_functions): New function.
13727 (readgram): Check for %prec that is not followed by a symbol.
13728 Handle %dprec and %merge declarations.
13729 (packgram): Initialize dprec and merger fields in rules array.
13731 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13732 conflict_list_cnt, conflict_list_free): New variables.
13733 (table_grow): Also grow conflict_table.
13734 (prepare_rules): Output dprec and merger tables.
13735 (conflict_row): New function.
13736 (action_row): Output conflict lists for GLR parser. Don't use
13737 default reduction in conflicted states for GLR parser so that there
13738 are spaces for the conflict lists.
13739 (save_row): Also save conflict information.
13740 (token_actions): Allocate conflict list.
13741 (merger_output): New function.
13742 (pack_vector): Pack conflict table, too.
13743 (output_conflicts): New function to output yyconflp and yyconfl.
13744 (output_check): Allocate conflict_tos.
13745 (output_actions): Output conflict tables, also.
13746 (output_skeleton): Output b4_mergers definition.
13747 (prepare): Output b4_max_rhs_length definition.
13748 Use 'bison.glr' as default skeleton for GLR parsers.
13750 * src/gram.c (glr_parser): New flag.
13751 (grammar_free): Call free_merger_functions.
13753 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13754 all pairs of conflicting reductions, rather than just all tokens
13755 causing conflicts. Needed to size conflict tables.
13756 (conflicts_output): Modify call to count_rr_conflicts for new
13758 (conflicts_print): Ditto.
13759 (count_total_conflicts): New function.
13761 * src/reader.h (merger_list): New type.
13762 (merge_functions): New variable.
13764 * src/lex.h (tok_dprec, tok_merge): New token types.
13766 * src/gram.h (rule_s): Add dprec and merger fields.
13767 (glr_parser): New flag.
13769 * src/conflicts.h (count_total_conflicts): New function.
13771 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13773 * doc/bison.texinfo (Generalized LR Parsing): New section.
13774 (GLR Parsers): New section.
13775 (Language and Grammar): Mention GLR parsing.
13776 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13777 Correct typo ("tge" -> "the").
13779 * data/bison.glr: New skeleton for GLR parsing.
13781 * tests/cxx-gram.at: New tests for GLR parsing.
13783 * tests/testsuite.at: Include cxx-gram.at.
13785 * tests/Makefile.am: Add cxx-gram.at.
13787 * src/parse-gram.y:
13789 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13791 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13793 2002-06-27 Akim Demaille <akim@epita.fr>
13795 * src/options.h, src/options.c: Remove.
13796 * src/getargs.c (short_options, long_options): New.
13798 2002-06-27 Akim Demaille <akim@epita.fr>
13800 * data/bison.simple, data/bison.c++: Rename as...
13801 * data/yacc.c, data/lalr1.cc: these.
13802 * doc/bison.texinfo (Environment Variables): Remove.
13804 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13806 * src/getargs.c (report_argmatch): Initialize strtok().
13808 2002-06-20 Akim Demaille <akim@epita.fr>
13810 * data/bison.simple (b4_symbol_actions): New, replaces...
13811 (b4_symbol_destructor, b4_symbol_printer): these.
13812 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13813 user token numbers.
13815 2002-06-20 Akim Demaille <akim@epita.fr>
13817 * data/bison.simple (yydestructor): Rename as...
13818 (yydestruct): this.
13820 2002-06-20 Akim Demaille <akim@epita.fr>
13822 * src/symtab.h, src/symtab.c (symbol_type_set)
13823 (symbol_destructor_set, symbol_precedence_set): The location is
13825 Adjust all callers.
13827 2002-06-20 Akim Demaille <akim@epita.fr>
13829 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13831 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13833 * src/symtab.h, src/symtab.c (symbol_class_set)
13834 (symbol_user_token_number_set): Likewise.
13835 Adjust all callers.
13836 Promote complain_at.
13837 * tests/input.at (Type Clashes): Adjust.
13839 2002-06-20 Akim Demaille <akim@epita.fr>
13841 * data/bison.simple (YYLEX): Fix the declaration when
13844 2002-06-20 Akim Demaille <akim@epita.fr>
13846 * data/bison.simple (yysymprint): Don't print the token number,
13848 * tests/actions.at (Destructors): Rename as...
13849 (Printers and Destructors): this.
13850 Also exercise %printer.
13852 2002-06-20 Akim Demaille <akim@epita.fr>
13854 * data/bison.simple (YYDSYMPRINT): New.
13855 Use it to remove many of the #if YYDEBUG/if (yydebug).
13857 2002-06-20 Akim Demaille <akim@epita.fr>
13859 * src/symtab.h, src/symtab.c (symbol_t): printer and
13860 printer_location are new members.
13861 (symbol_printer_set): New.
13862 * src/parse-gram.y (PERCENT_PRINTER): New token.
13863 Handle its associated rule.
13864 * src/scan-gram.l: Adjust.
13865 (handle_destructor_at, handle_destructor_dollar): Rename as...
13866 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13867 * src/output.c (symbol_printers_output): New.
13868 (output_skeleton): Call it.
13869 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13870 since there are already many grammar files with a user `yyprint'.
13871 Replace the calls to YYPRINT to calls to yysymprint.
13872 * tests/calc.at: Adjust.
13873 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13874 taking advantage of parser very internal details (stack size!).
13876 2002-06-20 Akim Demaille <akim@epita.fr>
13878 * src/scan-gram.l: Complete the scanner with the missing patterns
13880 Use `quote' and `symbol_tag_get' where appropriate.
13882 2002-06-19 Akim Demaille <akim@epita.fr>
13884 * tests/actions.at (Destructors): Augment to test locations.
13885 * data/bison.simple (yydestructor): Pass it the current location
13886 if locations are enabled.
13887 Prototype only when __STDC__ or C++.
13888 Change the argument names to move into the yy name space: there is
13891 2002-06-19 Akim Demaille <akim@epita.fr>
13893 * data/bison.simple (b4_pure_if): New.
13894 Use it instead of #ifdef YYPURE.
13896 2002-06-19 Akim Demaille <akim@epita.fr>
13898 * data/bison.simple (b4_location_if): New.
13899 Use it instead of #ifdef YYLSP_NEEDED.
13901 2002-06-19 Akim Demaille <akim@epita.fr>
13903 Prepare @$ in %destructor, but currently don't bind it in the
13904 skeleton, as %location use is not cleaned up yet.
13906 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13907 (handle_action_at): New.
13908 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13909 a braced_code_t and a location as additional arguments.
13910 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13911 unquote one when outputting `b4_dollar_dollar'.
13913 * data/bison.simple (b4_eval): Remove.
13914 (b4_symbol_destructor): Adjust.
13915 * tests/input.at (Invalid @n): Adjust.
13917 2002-06-19 Zack Weinberg <zack@codesourcery.com>
13919 * doc/bison.texinfo: Document ability to have multiple
13922 2002-06-18 Akim Demaille <akim@epita.fr>
13924 * src/files.c (compute_base_names): When computing the output file
13925 names from the input file name, strip the directory part.
13927 2002-06-18 Akim Demaille <akim@epita.fr>
13929 * data/bison.simple.new: Comment changes.
13930 Reported by Andreas Schwab.
13932 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13934 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13935 there are no `label `yyoverflowlab' defined but not used' warnings
13936 when yyoverflow is defined.
13938 2002-06-18 Akim Demaille <akim@epita.fr>
13940 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13942 (symbol_destructor_set): Adjust.
13943 * src/output.c (symbol_destructors_output): Output the destructor
13945 Output the symbol name.
13946 * data/bison.simple (b4_symbol_destructor): Adjust.
13948 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13949 and Akim Demaille <akim@epita.fr>
13951 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13952 what's left on the stack when the error recovery hits EOF.
13953 * tests/actions.at (Destructors): Complete to exercise this case.
13955 2002-06-17 Akim Demaille <akim@epita.fr>
13957 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13958 arguments is really empty, not only equal to `[]'.
13959 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13961 (symbol_destructor_set): New.
13962 * src/output.c (symbol_destructors_output): New.
13963 * src/reader.h (brace_code_t, current_braced_code): New.
13964 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13965 (handle_dollar): Rename as...
13966 (handle_action_dollar): this.
13967 (handle_destructor_dollar): New.
13968 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13969 (grammar_declaration): Use it.
13970 * data/bison.simple (yystos): Is always defined.
13971 (yydestructor): New.
13972 * tests/actions.at (Destructors): New.
13973 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13975 2002-06-17 Akim Demaille <akim@epita.fr>
13977 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13978 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13979 rule_length only when needed.
13980 * src/output.c (actions_output, token_definitions_output): Output
13982 * src/symtab.c: Don't access directly to the symbol tag, use
13984 * src/parse-gram.y: Use symbol_list_free.
13986 2002-06-17 Akim Demaille <akim@epita.fr>
13988 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13989 (symbol_list_prepend, get_type_name): Move to...
13990 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13991 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13992 Adjust all callers.
13993 (symbol_list_free): New.
13994 * src/scan-gram.l (handle_dollar): Takes a location.
13995 * tests/input.at (Invalid $n): Adjust.
13997 2002-06-17 Akim Demaille <akim@epita.fr>
13999 * src/reader.h, src/reader.c (symbol_list_new): Export it.
14000 (symbol_list_prepend): New.
14001 * src/parse-gram.y (%union): `list' is a new member.
14002 (symbols.1): New, replaces...
14003 (terms_to_prec.1, nterms_to_type.1): these.
14004 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
14005 Take a location as additional argument.
14006 Adjust all callers.
14008 2002-06-15 Akim Demaille <akim@epita.fr>
14010 * src/parse-gram.y: Move %token in the declaration section so that
14011 we don't depend upon CVS Bison.
14013 2002-06-15 Akim Demaille <akim@epita.fr>
14015 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
14016 * src/print.c (print_core): Use it.
14018 2002-06-15 Akim Demaille <akim@epita.fr>
14020 * src/conflicts.c (log_resolution): Accept the rule involved in
14021 the sr conflicts instead of the lookahead number that points to
14023 (flush_reduce): Accept the current lookahead vector as argument,
14024 instead of the index in LA.
14025 (resolve_sr_conflict): Accept the current number of lookahead
14026 bitset to consider for the STATE, instead of the index in LA.
14027 (set_conflicts): Adjust.
14028 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
14030 2002-06-15 Akim Demaille <akim@epita.fr>
14032 * src/state.h (state_t): Replace the `lookaheadsp' member, a
14033 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
14034 Adjust all dependencies.
14035 * src/lalr.c (initialize_lookaheads): Split into...
14036 (states_lookaheads_count, states_lookaheads_initialize): these.
14039 2002-06-15 Akim Demaille <akim@epita.fr>
14041 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
14043 (grammar_rules_print): here.
14044 * src/reduce.c (reduce_output): Use it.
14045 * tests/reduce.at (Useless Rules, Reduced Automaton)
14046 (Underivable Rules): Adjust.
14048 2002-06-15 Akim Demaille <akim@epita.fr>
14050 Copy BYacc's nice way to report the grammar.
14052 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
14054 Don't print the rules' location, it is confusing and useless.
14055 (rule_print): Use grammar_rhs_print.
14056 * src/print.c (print_grammar): Use grammar_rules_print.
14058 2002-06-15 Akim Demaille <akim@epita.fr>
14060 Complete and rationalize `useless thing' warnings.
14062 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
14063 (symbol_tag_print): New.
14064 Use them everywhere in place of accessing directly the tag member.
14065 * src/gram.h, src/gram.c (rule_print): New.
14066 Use it where a rule used to be printed `by hand'.
14067 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
14068 (reduce_grammar_tables): Report the useless rules.
14069 (reduce_print): Useless things are a warning, not an error.
14071 * tests/reduce.at (Useless Nonterminals, Useless Rules):
14072 (Reduced Automaton, Underivable Rules): Adjust.
14073 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
14074 * tests/conflicts.at (Unresolved SR Conflicts)
14075 (Solved SR Conflicts): Adjust.
14077 2002-06-15 Akim Demaille <akim@epita.fr>
14079 Let symbols have a location.
14081 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
14083 Adjust all callers.
14084 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
14085 Use location_t, not int.
14086 * src/symtab.c (symbol_check_defined): Take advantage of the
14088 * tests/regression.at (Invalid inputs): Adjust.
14090 2002-06-15 Akim Demaille <akim@epita.fr>
14092 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
14093 (input): Don't try to initialize yylloc here, do it in the
14095 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
14096 * src/gram.h (rule_t): Change line and action_line into location
14097 and action_location, of location_t type.
14098 Adjust all dependencies.
14099 * src/location.h, src/location.c (empty_location): New.
14100 * src/reader.h, src/reader.c (grammar_start_symbol_set)
14101 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
14102 (grammar_current_rule_symbol_append)
14103 (grammar_current_rule_action_append): Expect a location as argument.
14104 * src/reader.c (grammar_midrule_action): Adjust to attach an
14105 action's location as dummy symbol location.
14106 * src/symtab.h, src/symtab.c (startsymbol_location): New.
14107 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
14110 2002-06-14 Akim Demaille <akim@epita.fr>
14112 Grammar declarations may be found in the grammar section.
14114 * src/parse-gram.y (rules_or_grammar_declaration): New.
14115 (declarations): Each declaration may end with a semicolon, not
14117 (grammar_declaration): `"%union"'.
14118 (grammar): Branch to rules_or_grammar_declaration.
14120 2002-06-14 Akim Demaille <akim@epita.fr>
14122 * src/main.c (main): Invoke scanner_free.
14124 2002-06-14 Akim Demaille <akim@epita.fr>
14126 * src/output.c (m4_invoke): Extracted from...
14127 (output_skeleton): here.
14130 2002-06-14 Akim Demaille <akim@epita.fr>
14132 * src/parse-gram.y (directives, directive, gram)
14133 (grammar_directives, precedence_directives, precedence_directive):
14135 (declarations, declaration, grammar, grammar_declaration)
14136 (precedence_declaration, precedence_declarator): these.
14137 (symbol_declaration): New.
14139 2002-06-14 Akim Demaille <akim@epita.fr>
14141 * src/files.c (action_obstack): Remove, unused.
14142 (output_obstack): Remove it, and all its dependencies, as it is no
14144 * src/reader.c (epilogue_set): Build the epilogue in the
14146 * src/output.h, src/output.c (muscle_obstack): Move to...
14147 * src/muscle_tab.h, src/muscle_tab.h: here.
14148 (muscle_init): Initialize muscle_obstack.
14149 (muscle_free): New.
14150 * src/main.c (main): Call it.
14152 2002-06-14 Akim Demaille <akim@epita.fr>
14154 * src/location.h: New, extracted from...
14155 * src/reader.h: here.
14156 * src/Makefile.am (noinst_HEADERS): Merge into
14157 (bison_SOURCES): this.
14159 * src/parse-gram.y: Use location_t instead of Bison's.
14160 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
14161 Use location_t instead of ints.
14163 2002-06-14 Akim Demaille <akim@epita.fr>
14165 * data/bison.simple, data/bison.c++: Be sure to restore the
14166 current #line when returning to the skeleton contents after having
14167 exposed the input file's #line.
14169 2002-06-12 Akim Demaille <akim@epita.fr>
14171 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
14173 * tests/actions.at (Exotic Dollars): New.
14175 2002-06-12 Akim Demaille <akim@epita.fr>
14177 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
14179 * tests/input.at (Torturing the Scanner): New.
14181 2002-06-11 Akim Demaille <akim@epita.fr>
14183 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
14184 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
14185 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
14186 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
14187 * src/reader.c (reader): Use it.
14189 2002-06-11 Akim Demaille <akim@epita.fr>
14191 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
14192 Adjust all callers.
14193 (scanner_last_string_free): New.
14195 2002-06-11 Akim Demaille <akim@epita.fr>
14197 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
14198 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
14199 (last_string, YY_OBS_FREE): New.
14200 Use them when returning an ID.
14202 2002-06-11 Akim Demaille <akim@epita.fr>
14204 Have Bison grammars parsed by a Bison grammar.
14206 * src/reader.c, src/reader.h (prologue_augment): New.
14207 * src/reader.c (copy_definition): Remove.
14209 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
14210 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
14211 (grammar_current_rule_prec_set, grammar_current_rule_check)
14212 (grammar_current_rule_symbol_append)
14213 (grammar_current_rule_action_append): Export.
14214 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
14215 (symbol_list_action_append): Remove.
14216 Hook the routines from reader.
14217 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
14218 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
14220 * src/reader.c (read_declarations): Remove, unused.
14222 * src/parse-gram.y: Handle the epilogue.
14223 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
14224 (grammar_start_symbol_set): this.
14225 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
14226 * src/reader.c (readgram): Remove, unused.
14227 (reader): Adjust to insert eoftoken and axiom where appropriate.
14229 * src/reader.c (copy_dollar): Replace with...
14230 * src/scan-gram.h (handle_dollar): this.
14231 * src/parse-gram.y: Remove `%thong'.
14233 * src/reader.c (copy_at): Replace with...
14234 * src/scan-gram.h (handle_at): this.
14236 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
14239 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
14242 * src/reader.h, src/reader.c (grammar_rule_end): New.
14244 * src/parse.y (current_type, current_class): New.
14245 Implement `%nterm', `%token' support.
14246 Merge `%term' into `%token'.
14247 (string_as_id): New.
14248 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
14251 * src/parse-gram.y: Be sure to handle properly the beginning of
14254 * src/parse-gram.y: Handle %type.
14255 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
14257 * src/parse-gram.y: More directives support.
14258 * src/options.c: No longer handle source directives.
14260 * src/parse-gram.y: Fix %output.
14262 * src/parse-gram.y: Handle %union.
14263 Use the prologue locations.
14264 * src/reader.c (parse_union_decl): Remove.
14266 * src/reader.h, src/reader.c (epilogue_set): New.
14267 * src/parse-gram.y: Use it.
14269 * data/bison.simple, data/bison.c++: b4_stype is now either not
14270 defined, then default to int, or to the contents of %union,
14271 without `union' itself.
14273 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
14275 * src/output.c (actions_output): Don't output braces, as they are
14276 already handled by the scanner.
14278 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
14279 characters to themselves.
14281 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
14282 that the epilogue has a proper #line.
14284 * src/parse-gram.y: Handle precedence/associativity.
14286 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
14288 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
14289 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
14290 at all to define terminals that cannot be emitted.
14292 * src/scan-gram.l: Escape M4 characters.
14294 * src/scan-gram.l: Working properly with escapes in user
14295 strings/characters.
14297 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
14298 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
14300 Use more modest sizes, as for the time being the parser does not
14301 release memory, and therefore the process swallows a huge amount
14304 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
14305 stricter %token grammar.
14307 * src/symtab.h (associativity): Add `undef_assoc'.
14308 (symbol_precedence_set): Do nothing when passed an undef_assoc.
14309 * src/symtab.c (symbol_check_alias_consistence): Adjust.
14311 * tests/regression.at (Invalid %directive): Remove, as it is now
14313 (Invalid inputs): Adjust to the new error messages.
14314 (Token definitions): The new grammar doesn't allow too many
14317 * src/lex.h, src/lex.c: Remove.
14318 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
14319 (copy_character, copy_string2, copy_string, copy_identifier)
14320 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
14321 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
14322 (parse_action): Remove.
14323 * po/POTFILES.in: Adjust.
14325 2002-06-11 Akim Demaille <akim@epita.fr>
14327 * src/reader.c (parse_action): Don't store directly into the
14328 rule's action member: return the action as a string.
14329 Don't require `rule_length' as an argument: compute it.
14330 (grammar_current_rule_symbol_append)
14331 (grammar_current_rule_action_append): New, eved out from
14333 Remove `action_flag', `rulelength', unused now.
14335 2002-06-11 Akim Demaille <akim@epita.fr>
14337 * src/reader.c (grammar_current_rule_prec_set).
14338 (grammar_current_rule_check): New, eved out from...
14340 Remove `xaction', `first_rhs': useless.
14341 * tests/input.at (Type clashes): New.
14342 * tests/existing.at (GNU Cim Grammar): Adjust.
14344 2002-06-11 Akim Demaille <akim@epita.fr>
14346 * src/reader.c (grammar_midrule_action): New, Eved out from
14349 2002-06-11 Akim Demaille <akim@epita.fr>
14351 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
14353 (readgram): Use them as replacement of inlined code, crule and
14356 2002-06-11 Akim Demaille <akim@epita.fr>
14358 * src/reader.c (grammar_end, grammar_symbol_append): New.
14359 (readgram): Use them.
14360 Make the use of `p' as local as possible.
14362 2002-06-10 Akim Demaille <akim@epita.fr>
14364 GCJ's parser requires the tokens to be defined before the prologue.
14366 * data/bison.simple: Output the token definition before the user's
14368 * tests/regression.at (Braces parsing, Duplicate string)
14369 (Mixing %token styles): Check the output from bison.
14370 (Early token definitions): New.
14372 2002-06-10 Akim Demaille <akim@epita.fr>
14374 * src/symtab.c (symbol_user_token_number_set): Don't complain when
14375 assigning twice the same user number to a token, so that we can
14377 * src/lex.c (lex): here.
14378 Also use `symbol_class_set' instead of hand written code.
14379 * src/reader.c (parse_assoc_decl): Likewise.
14381 2002-06-10 Akim Demaille <akim@epita.fr>
14383 * src/symtab.c, src/symtab.c (symbol_class_set)
14384 (symbol_user_token_number_set): New.
14385 * src/reader.c (parse_token_decl): Use them.
14386 Use a switch instead of ifs.
14387 Use a single argument.
14389 2002-06-10 Akim Demaille <akim@epita.fr>
14391 Remove `%thong' support as it is undocumented, unused, duplicates
14392 `%token's job, and creates useless e-mail traffic with people who
14393 want to know what it is, why it is undocumented, unused, and
14394 duplicates `%token's job.
14396 * src/reader.c (parse_thong_decl): Remove.
14397 * src/options.c (option_table): Remove "thong".
14398 * src/lex.h (tok_thong): Remove.
14400 2002-06-10 Akim Demaille <akim@epita.fr>
14402 * src/symtab.c, src/symtab.c (symbol_type_set)
14403 (symbol_precedence_set): New.
14404 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
14405 (value_components_used): Remove, unused.
14407 2002-06-09 Akim Demaille <akim@epita.fr>
14409 Move symbols handling code out of the reader.
14411 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
14412 (axiom): Move to...
14413 * src/symtab.h, src/symtab.c: here.
14415 * src/gram.c (start_symbol): Remove: use startsymbol->number.
14416 * src/reader.c (startval): Rename as...
14417 * src/symtab.h, src/symtab.c (startsymbol): this.
14418 * src/reader.c: Adjust.
14420 * src/reader.c (symbol_check_defined, symbol_make_alias)
14421 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14422 (token_translations_init)
14424 * src/symtab.c: here.
14425 * src/reader.c (packsymbols): Move to...
14426 * src/symtab.h, src/symtab.c (symbols_pack): here.
14427 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
14430 2002-06-03 Akim Demaille <akim@epita.fr>
14432 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
14435 2002-06-03 Akim Demaille <akim@epita.fr>
14437 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
14438 structs with non literals.
14439 * src/scan-skel.l: never-interactive.
14440 * src/conflicts.c (enum conflict_resolution_e): No trailing
14442 * src/getargs.c (usage): Split long literal strings.
14443 Reported by Hans Aberg.
14445 2002-05-28 Akim Demaille <akim@epita.fr>
14447 * data/bison.c++: Use C++ ostreams.
14448 (cdebug_): New member.
14450 2002-05-28 Akim Demaille <akim@epita.fr>
14452 * src/output.c (output_skeleton): Be sure to allocate enough room
14453 for `/' _and_ for `\0' in full_skeleton.
14455 2002-05-28 Akim Demaille <akim@epita.fr>
14457 * data/bison.c++: Catch up with bison.simple:
14458 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14459 and Paul Eggert <eggert@twinsun.com>: `error' handing.
14460 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
14461 and popping traces.
14463 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14465 * src/output.c (output_skeleton): Put an explicit path in front of
14466 the skeleton file name, rather than relying on the -I directory,
14467 to partially alleviate effects of having a skeleton file lying around
14468 in the current directory.
14470 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14472 * src/conflicts.c (log_resolution): Correct typo:
14473 obstack_printf should be obstack_fgrow1.
14475 2002-05-26 Akim Demaille <akim@epita.fr>
14477 * src/state.h (state_t): `solved_conflicts' is a new member.
14478 * src/LR0.c (new_state): Set it to 0.
14479 * src/conflicts.h, src/conflicts.c (print_conflicts)
14480 (free_conflicts, solve_conflicts): Rename as...
14481 (conflicts_print, conflicts_free, conflicts_solve): these.
14483 * src/conflicts.c (enum conflict_resolution_e)
14484 (solved_conflicts_obstack): New, used by...
14485 (log_resolution): this.
14486 Adjust to attach the conflict resolution to each state.
14487 Complete the description with the precedence/associativity
14489 (resolve_sr_conflict): Adjust.
14490 * src/print.c (print_state): Output its solved_conflicts.
14491 * tests/conflicts.at (Unresolved SR Conflicts)
14492 (Solved SR Conflicts): Exercise --report=all.
14494 2002-05-26 Akim Demaille <akim@epita.fr>
14496 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14497 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14498 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
14499 (token_number_t, item_number_as_token_number)
14500 (token_number_as_item_number, muscle_insert_token_number_table):
14502 (symbol_number_t, item_number_as_symbol_number)
14503 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14504 these, since it is more appropriate.
14506 2002-05-26 Akim Demaille <akim@epita.fr>
14508 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14510 * data/bison.simple (yystos) [YYDEBUG]: New.
14511 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14513 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14515 2002-05-25 Akim Demaille <akim@epita.fr>
14517 * doc/bison.texinfo (Debugging): Split into...
14518 (Tracing): this new section, its former contents, and...
14519 (Understanding): this new section.
14520 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14522 (report_flag): this.
14523 Adjust all dependencies.
14524 (report_args, report_types, report_argmatch): New.
14525 (usage, getargs): Report/support -r, --report.
14527 (struct option_table_struct): Rename as..,
14528 (struct option_table_s): this.
14529 Rename the `set_flag' member to `flag' to match with getopt_long's
14531 * src/options.c (option_table): Split verbose into an entry for
14532 %verbose, and another for --verbose.
14533 Support --report/-r, so remove -r from the obsolete --raw.
14534 * src/print.c: Attach full item sets and lookaheads reports to
14535 report_flag instead of trace_flag.
14536 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14538 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14539 and Paul Eggert <eggert@twinsun.com>
14541 * data/bison.simple (yyparse): Correct error handling to conform to
14542 POSIX and yacc. Specifically, after syntax error is discovered,
14543 do not reduce further before shifting the error token.
14544 Clean up the code a bit by removing the labels yyerrdefault,
14545 yyerrhandle, yyerrpop.
14546 * NEWS: Document the above.
14548 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14550 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14551 type; it isn't always big enough, since it doesn't necessarily
14552 include non-terminals.
14553 (yytranslate): Expand definition of yy_token_number_type, so that
14554 the latter can be removed.
14555 (yy_token_number_type): Remove, only one use.
14556 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14557 don't use TokenNumberType as element type.
14559 * tests/regression.at: Modify expected output to agree with change
14560 to yyr1 and yytranslate.
14562 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14564 * src/reader.c (parse_action): Use copy_character instead of
14567 2002-05-13 Akim Demaille <akim@epita.fr>
14569 * tests/regression.at (Token definitions): Prototype yylex and
14572 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14574 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
14575 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14577 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14579 2002-05-07 Akim Demaille <akim@epita.fr>
14581 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14582 avoid GCC warnings.
14584 2002-05-07 Akim Demaille <akim@epita.fr>
14588 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14589 over the RHS of each rule.
14590 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14591 * src/state.h (state_t): Member `nitems' is unsigned short.
14592 * src/LR0.c (get_state): Adjust.
14593 * src/reader.c (packgram): Likewise.
14594 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14596 (muscle_insert_int_table): Remove, unused.
14597 (prepare_rules): Remove `max'.
14599 2002-05-06 Akim Demaille <akim@epita.fr>
14601 * src/closure.c (print_firsts): Display of the symbol tags.
14602 (bitmatrix_print): Move to...
14603 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14605 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14607 2002-05-06 Akim Demaille <akim@epita.fr>
14609 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14612 2002-05-06 Akim Demaille <akim@epita.fr>
14614 * src/LR0.c (new_state, get_state): Instead of using the global
14615 `kernel_size' and `kernel_base', have two new arguments:
14616 `core_size' and `core'.
14619 2002-05-06 Akim Demaille <akim@epita.fr>
14621 * src/reader.c (packgram): No longer end `ritem' with a 0
14622 sentinel: it is not used.
14624 2002-05-05 Akim Demaille <akim@epita.fr>
14626 New experimental feature: display the lookaheads in the report and
14629 * src/print (print_core): When --trace-flag, display the rules
14631 * src/print_graph.c (print_core): Likewise.
14632 Swap the arguments.
14635 2002-05-05 Akim Demaille <akim@epita.fr>
14637 * tests/torture.at (Many lookaheads): New test.
14639 2002-05-05 Akim Demaille <akim@epita.fr>
14641 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14642 (GENERATE_MUSCLE_INSERT_TABLE): this.
14643 (output_int_table, output_unsigned_int_table, output_short_table)
14644 (output_token_number_table, output_item_number_table): Replace with...
14645 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14646 (muscle_insert_short_table, muscle_insert_token_number_table)
14647 (muscle_insert_item_number_table): these.
14648 Adjust all callers.
14649 (prepare_tokens): Don't free `translations', since...
14650 * src/reader.h, src/reader.c (grammar_free): do it.
14652 * src/gram.h, src/gram.c (grammar_free): here.
14653 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14656 2002-05-05 Akim Demaille <akim@epita.fr>
14658 * src/output.c (output_unsigned_int_table): New.
14659 (prepare_rules): `i' is unsigned.
14660 `prhs', `rline', `r2' are unsigned int.
14661 Rename muscle `rhs_number_max' as `rhs_max'.
14662 Output muscles `prhs_max', `rline_max', and `r2_max'.
14664 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14665 to compute types instead of constant types.
14666 * tests/regression.at (Web2c Actions): Adjust.
14668 2002-05-04 Akim Demaille <akim@epita.fr>
14670 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14671 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14672 Adjust dependencies.
14673 * src/output.c (token_definitions_output): Be sure not to output a
14674 `#define 'a'' when fed with `%token 'a' "a"'.
14675 * tests/regression.at (Token definitions): New.
14677 2002-05-03 Paul Eggert <eggert@twinsun.com>
14679 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14682 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14684 * Makefile.am (SUBDIRS): Remove intl.
14685 (EXTRA_DIST): Add config/config.rpath.
14687 2002-05-03 Akim Demaille <akim@epita.fr>
14689 * data/bison.simple (m4_if): Don't output empty enums.
14690 And actually, output valid enum definitions :(.
14692 2002-05-03 Akim Demaille <akim@epita.fr>
14694 * configure.bat: Remove, completely obsolete.
14695 * Makefile.am (EXTRA_DIST): Adjust.
14696 Don't distribute config.rpath...
14697 * config/Makefile.am (EXTRA_DIST): Do it.
14699 2002-05-03 Akim Demaille <akim@epita.fr>
14701 * configure.in (GETTEXT_VERSION): New.
14702 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14704 2002-05-03 Akim Demaille <akim@epita.fr>
14706 * data/bison.simple (b4_token_enum): New.
14707 (b4_token_defines): Use it to output tokens both as #define and
14709 Suggested by Paul Eggert.
14710 * src/output.c (token_definitions_output): Don't output spurious
14713 2002-05-03 Akim Demaille <akim@epita.fr>
14715 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14717 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
14719 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14720 Update the stack class, give a try to deque as the default container.
14722 2002-05-02 Akim Demaille <akim@epita.fr>
14724 * data/bison.simple (yyparse): Do not implement @$ = @1.
14725 (YYLLOC_DEFAULT): Adjust to do it.
14726 * doc/bison.texinfo (Location Default Action): Fix.
14728 2002-05-02 Akim Demaille <akim@epita.fr>
14730 * src/reader.c (parse_braces): Merge into...
14731 (parse_action): this.
14733 2002-05-02 Akim Demaille <akim@epita.fr>
14735 * configure.in (ALL_LINGUAS): Remove.
14736 * po/LINGUAS, hr.po: New.
14738 2002-05-02 Akim Demaille <akim@epita.fr>
14740 Remove the so called hairy (semantic) parsers.
14742 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14743 * src/gram.h, src/gram.c (semantic_parser): Remove.
14744 (rule_t): Remove the guard and guard_line members.
14745 * src/lex.h (token_t): remove tok_guard.
14746 * src/options.c (option_table): Remove %guard and %semantic_parser
14748 * src/output.c, src/output.h (guards_output): Remove.
14750 (token_definitions_output): Don't output the `T'
14752 (output_skeleton): Don't output the guards.
14753 * src/files.c, src/files.c (attrsfile): Remove.
14754 * src/reader.c (symbol_list): Remove the guard and guard_line
14756 Adjust dependencies.
14757 (parse_guard): Remove.
14758 * data/bison.hairy: Remove.
14759 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14762 2002-05-02 Akim Demaille <akim@epita.fr>
14764 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14765 (parse_guard): Rename the formal argument `stack_offset' as
14766 `rule_length', which is more readable.
14768 (copy_at, copy_dollar): Instead of outputting the hard coded
14769 values of $$, $n and so forth, output invocation to b4_lhs_value,
14770 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14771 Note: this patch partially drops `semantic-parser' support: it
14772 always does `rule_length - n', where semantic parsers ought to
14774 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14775 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14777 2002-05-02 Akim Demaille <akim@epita.fr>
14779 * configure.in (AC_INIT): Bump to 1.49b.
14780 (AM_INIT_AUTOMAKE): Short invocation.
14782 2002-05-02 Akim Demaille <akim@epita.fr>
14786 2002-05-01 Akim Demaille <akim@epita.fr>
14788 * src/skeleton.h: Remove.
14790 2002-05-01 Akim Demaille <akim@epita.fr>
14792 * src/skeleton.h: Fix the #endif.
14793 Reported by Magnus Fromreide.
14795 2002-04-26 Paul Eggert <eggert@twinsun.com>
14797 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14798 Define if we define YYSTYPE and YYLTYPE, respectively.
14799 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14801 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
14803 * src/scan-skel.l: Postprocess quadrigraphs.
14805 * src/reader.c (copy_character): New function, used to output
14806 single characters while replacing `[' and `]' with quadrigraphs, to
14807 avoid troubles with M4 quotes.
14808 (copy_comment): Output characters with copy_character.
14809 (read_additionnal_code): Likewise.
14810 (copy_string2): Likewise.
14811 (copy_definition): Likewise.
14813 * tests/calc.at: Exercise M4 quoting.
14815 2002-04-25 Akim Demaille <akim@epita.fr>
14817 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14818 between `!' and the command.
14819 Reported by Paul Eggert.
14821 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
14823 * tests/calc.at: Exercise prologue splitting.
14825 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14826 `b4_post_prologue' instead of `b4_prologue'.
14828 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14830 (output): Free pre_prologue_obstack and post_prologue_obstack.
14831 * src/files.h, src/files.c (attrs_obstack): Remove.
14832 (pre_prologue_obstack, post_prologue_obstack): New.
14833 * src/reader.c (copy_definition): Add a parameter to specify the
14834 obstack to fill, instead of using attrs_obstack unconditionally.
14835 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14836 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14838 2002-04-23 Paul Eggert <eggert@twinsun.com>
14840 * data/bison.simple: Remove unnecessary commentary and white
14841 space differences from 1_29-branch.
14842 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14844 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14845 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14846 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14847 constructors or destructors.
14849 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14851 2002-04-23 Akim Demaille <akim@epita.fr>
14853 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14854 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14855 location with columns.
14856 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14857 All reported by Paul Eggert.
14859 2002-04-22 Akim Demaille <akim@epita.fr>
14861 * src/reduce.c (dump_grammar): Move to...
14862 * src/gram.h, src/gram.c (grammar_dump): here.
14863 Be sure to separate long item numbers.
14864 Don't read the members of a rule's prec if its nil.
14866 2002-04-22 Akim Demaille <akim@epita.fr>
14868 * src/output.c (table_size, table_grow): New.
14869 (MAXTABLE): Remove, replace uses with table_size.
14870 (pack_vector): Instead of dying when the table is too big, grow it.
14872 2002-04-22 Akim Demaille <akim@epita.fr>
14874 * data/bison.simple (yyr1): Its type is that of a token number.
14875 * data/bison.c++ (r1_): Likewise.
14876 * tests/regression.at (Web2c Actions): Adjust.
14878 2002-04-22 Akim Demaille <akim@epita.fr>
14880 * src/reader.c (token_translations_init): 256 is now the default
14881 value for the error token, i.e., it will be assigned another
14882 number if the user assigned 256 to one of her tokens.
14883 (reader): Don't force 256 to error.
14884 * doc/bison.texinfo (Symbols): Adjust.
14885 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14886 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14887 etc. instead of 10, 20, 30 (which was used to `jump' over error
14888 (256) and undefined (2)).
14890 2002-04-22 Akim Demaille <akim@epita.fr>
14892 Propagate more token_number_t.
14894 * src/gram.h (token_number_as_item_number)
14895 (item_number_as_token_number): New.
14896 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14897 Use it to create output_item_number_table and
14898 output_token_number_table.
14899 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14900 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14901 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14902 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14904 2002-04-22 Akim Demaille <akim@epita.fr>
14906 * src/output.h, src/output.c (get_lines_number): Remove.
14908 2002-04-19 Akim Demaille <akim@epita.fr>
14910 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14912 (Debugging): More details about enabling the debugging features.
14913 (Table of Symbols): Describe $$, $n, @$, and @n.
14914 Suggested by Tim Josling.
14916 2002-04-19 Akim Demaille <akim@epita.fr>
14918 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14920 2002-04-10 Akim Demaille <akim@epita.fr>
14922 * src/system.h: Rely on HAVE_LIMITS_H.
14923 Suggested by Paul Eggert.
14925 2002-04-09 Akim Demaille <akim@epita.fr>
14927 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14928 full stderr, and strip it according to the bison options, instead
14929 of composing the error message from different bits.
14930 This makes it easier to check for several error messages.
14931 Adjust all the invocations.
14932 Add an invocation exercising the error token.
14933 Add an invocation demonstrating a stupid error message.
14934 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14936 Error message are for stderr, not stdout.
14938 2002-04-09 Akim Demaille <akim@epita.fr>
14940 * src/gram.h, src/gram.c (error_token_number): Remove, use
14942 * src/reader.c (reader): Don't specify the user token number (2)
14943 for $undefined, as it uselessly prevents using it.
14944 * src/gram.h (token_number_t): Move to...
14945 * src/symtab.h: here.
14946 (state_t.number): Is a token_number_t.
14947 * src/print.c, src/reader.c: Use undeftoken->number instead of
14949 (Even though this 2 is not the same as above: the number of the
14950 undeftoken remains being 2, it is its user token number which
14952 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14953 `user_token_number_max'.
14954 Output `undef_token_number'.
14955 * data/bison.simple, data/bison.c++: Use them.
14956 Be sure to map invalid yylex return values to
14957 `undef_token_number'. This saves us from gratuitous SEGV.
14959 * tests/conflicts.at (Solved SR Conflicts)
14960 (Unresolved SR Conflicts): Adjust.
14961 * tests/regression.at (Web2c Actions): Adjust.
14963 2002-04-08 Akim Demaille <akim@epita.fr>
14965 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14967 Remove the duplicate `typedefs'.
14968 (RhsNumberType): Fix the declaration and various other typos.
14970 * data/bison.simple: Use __ofile__.
14971 * src/scan-skel.l: Handle __ofile__.
14973 2002-04-08 Akim Demaille <akim@epita.fr>
14975 * src/gram.h (item_number_t): New, the type of item numbers in
14976 RITEM. Note that it must be able to code symbol numbers as
14977 positive number, and the negation of rule numbers as negative
14979 Adjust all dependencies (pretty many).
14980 * src/reduce.c (rule): Remove this `short *' pointer: use
14982 * src/system.h (MINSHORT, MAXSHORT): Remove.
14983 Include `limits.h'.
14984 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14985 (shortcpy): Remove.
14986 (MAXTABLE): Move to...
14987 * src/output.c (MAXTABLE): here.
14988 (prepare_rules): Use output_int_table to output rhs.
14989 * data/bison.simple, data/bison.c++: Adjust.
14990 * tests/torture.at (Big triangle): Move the limit from 254 to
14992 * tests/regression.at (Web2c Actions): Ajust.
14994 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14995 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14996 passes, but produces negative #line number, once fixed, GCC is
14997 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14999 * src/state.h (state_h): Code input lines on ints, not shorts.
15001 2002-04-08 Akim Demaille <akim@epita.fr>
15003 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
15004 and then the grammar.
15006 2002-04-08 Akim Demaille <akim@epita.fr>
15008 * src/system.h: No longer using strndup.
15010 2002-04-07 Akim Demaille <akim@epita.fr>
15012 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
15013 * src/output.c (output_table_data): Return the longest number.
15014 (prepare_tokens): Output `token_number_max').
15015 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
15017 Use them to define yy_token_number_type/TokenNumberType.
15018 Use this type for yytranslate.
15019 * tests/torture.at (Big triangle): Push the limit from 124 to
15021 * tests/regression.at (Web2c Actions): Adjust.
15023 2002-04-07 Akim Demaille <akim@epita.fr>
15025 * tests/torture.at (Big triangle): New.
15026 (GNU AWK Grammar, GNU Cim Grammar): Move to...
15027 * tests/existing.at: here.
15029 2002-04-07 Akim Demaille <akim@epita.fr>
15031 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
15033 Adjust dependencies.
15035 2002-04-07 Akim Demaille <akim@epita.fr>
15037 * src/reader.c: Normalize increments to prefix form.
15039 2002-04-07 Akim Demaille <akim@epita.fr>
15041 * src/reader.c, symtab.c: Remove debugging code.
15043 2002-04-07 Akim Demaille <akim@epita.fr>
15045 Rename all the `bucket's as `symbol_t'.
15047 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
15048 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
15049 * src/symtab.c, src/symtab.h (bucket): Rename as...
15051 (symbol_list_new, bucket_check_defined, bucket_make_alias)
15052 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
15053 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15054 (buckets_new, buckets_free, buckets_do): Rename as...
15055 (symbol_list_new, symbol_check_defined, symbol_make_alias)
15056 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15057 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
15058 (symbols_new, symbols_free, symbols_do): these.
15060 2002-04-07 Akim Demaille <akim@epita.fr>
15062 Use lib/hash for the symbol table.
15064 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
15066 * src/lex.c (lex): Set the `number' member of new terminals.
15067 * src/reader.c (bucket_check_defined, bucket_make_alias)
15068 (bucket_check_alias_consistence, bucket_translation): New.
15069 (reader, grammar_free, readgram, token_translations_init)
15070 (packsymbols): Adjust.
15071 (reader): Number the predefined tokens.
15072 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
15073 for predefined tokens.
15074 * src/symtab.h (bucket): Remove all the hash table related
15076 * src/symtab.c (symtab): Replace by...
15077 (bucket_table): this.
15078 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15079 (buckets_new, buckets_do): New.
15081 2002-04-07 Akim Demaille <akim@epita.fr>
15083 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
15084 (start_symbol, max_user_token_number, semantic_parser)
15085 (error_token_number): Initialize.
15086 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
15089 (errtoken, eoftoken, undeftoken, axiom): Extern.
15091 2002-04-07 Akim Demaille <akim@epita.fr>
15093 * src/gram.h (rule_s): prec and precsym are now pointers
15094 to the bucket giving the priority/associativity.
15095 Member `associativity' removed: useless.
15096 * src/reduce.c, src/conflicts.c: Adjust.
15098 2002-04-07 Akim Demaille <akim@epita.fr>
15100 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
15101 Properly escape the symbols' TAG when outputting them.
15103 2002-04-07 Akim Demaille <akim@epita.fr>
15105 * src/lalr.h (LA): Is a bitsetv, not bitset*.
15107 2002-04-07 Akim Demaille <akim@epita.fr>
15109 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
15110 (LArule): this, which is an array to rule_t*.
15111 * src/print.c, src/conflicts.c: Adjust.
15113 2002-04-07 Akim Demaille <akim@epita.fr>
15115 * src/gram.h (rule_t): Rename `number' as `user_number'.
15116 `number' is a new member.
15117 Adjust dependencies.
15118 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
15120 2002-04-07 Akim Demaille <akim@epita.fr>
15122 As a result of the previous patch, it is no longer needed
15123 to reorder ritem itself.
15125 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
15127 2002-04-07 Akim Demaille <akim@epita.fr>
15129 Be sure never to walk through RITEMS, but use only data related to
15130 the rules themselves. RITEMS should be banished.
15132 * src/output.c (output_token_translations): Rename as...
15133 (prepare_tokens): this.
15134 In addition to `translate', prepare the muscles `tname' and
15135 `toknum', which were handled by...
15136 (output_rule_data): this.
15137 Remove, and move the remainder of its outputs into...
15138 (prepare_rules): this new routines, which also merges content from
15139 (output_gram): this.
15140 (prepare_rules): Be sure never to walk through RITEMS.
15141 (output_stos): Rename as...
15142 (prepare_stos): this.
15143 (output): Always invoke prepare_states, after all, just don't use it
15144 in the output if you don't need it.
15146 2002-04-07 Akim Demaille <akim@epita.fr>
15148 * src/LR0.c (new_state): Display `nstates' as the name of the
15149 newly created state.
15150 Adjust to initialize first_state and last_state if needed.
15151 Be sure to distinguish the initial from the final state.
15152 (new_states): Create the itemset of the initial state, and use
15154 * src/closure.c (closure): Now that the initial state has its
15155 items properly set, there is no need for a special case when
15156 creating `ruleset'.
15158 As a result, now the rule 0, reducing to $axiom, is visible in the
15159 outputs. Adjust the test suite.
15161 * tests/conflicts.at (Solved SR Conflicts)
15162 (Unresolved SR Conflicts): Adjust.
15163 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
15164 * tests/conflicts.at (S/R in initial): New.
15166 2002-04-07 Akim Demaille <akim@epita.fr>
15168 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
15169 the RHS of the rules.
15170 * src/output.c (output_gram): Likewise.
15172 2002-04-07 Akim Demaille <akim@epita.fr>
15174 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
15176 Adjust all dependencies.
15177 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
15178 `number' of the buckets too.
15179 * src/gram.h: Include `symtab.h'.
15180 (associativity): Move to...
15181 * src/symtab.h: here.
15182 No longer include `gram.h'.
15184 2002-04-07 Akim Demaille <akim@epita.fr>
15186 * src/gram.h, src/gram.c (rules_rhs_length): New.
15187 (ritem_longest_rhs): Use it.
15188 * src/gram.h (rule_t): `number' is a new member.
15189 * src/reader.c (packgram): Set it.
15190 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
15191 the end of `rules', and count them out of `nrules'.
15192 (reduce_output, dump_grammar): Adjust.
15193 * src/print.c (print_grammar): It is no longer needed to check for
15194 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
15195 * tests/reduce.at (Reduced Automaton): New test.
15197 2002-04-07 Akim Demaille <akim@epita.fr>
15199 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
15200 lacking `+ 1' to nrules, Bison reported as useless a token if it
15201 was used solely to set the precedence of the last rule...
15203 2002-04-07 Akim Demaille <akim@epita.fr>
15205 * data/bison.c++, data/bison.simple: Don't output the current file
15206 name in #line, to avoid useless diffs between two identical
15207 outputs under different names.
15209 2002-04-07 Akim Demaille <akim@epita.fr>
15211 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
15212 Normalize loops to using `< nrules + 1', not `<= nrules'.
15214 2002-04-07 Akim Demaille <akim@epita.fr>
15218 2002-04-07 Akim Demaille <akim@epita.fr>
15220 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15221 bucket.value as bucket.number.
15223 2002-04-07 Akim Demaille <akim@epita.fr>
15225 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15226 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15227 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
15228 RHS, instead of being an index in RITEMS.
15230 2002-04-04 Paul Eggert <eggert@twinsun.com>
15232 * doc/bison.texinfo: Update copyright date.
15233 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
15234 (Symbols): Warn about running Bison in one character set,
15235 but compiling and/or running in an incompatible one.
15236 Warn about character code 256, too.
15238 2002-04-03 Paul Eggert <eggert@twinsun.com>
15240 * src/bison.data (YYSTACK_ALLOC): Depend on whether
15241 YYERROR_VERBOSE is nonzero, not whether it is defined.
15243 Merge changes from bison-1_29-branch.
15245 2002-03-20 Paul Eggert <eggert@twinsun.com>
15247 Merge fixes from Debian bison_1.34-1.diff.
15249 * configure.in (AC_PREREQ): 2.53.
15251 2002-03-20 Akim Demaille <akim@epita.fr>
15253 * src/conflicts.c (log_resolution): Argument `resolution' is const.
15255 2002-03-19 Paul Eggert <eggert@twinsun.com>
15257 * src/bison.simple (YYCOPY): New macro.
15258 (YYSTACK_RELOCATE): Use it.
15259 Remove Type arg; no longer needed. All callers changed.
15260 (yymemcpy): Remove; no longer needed.
15262 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
15263 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15265 2002-03-19 Akim Demaille <akim@epita.fr>
15267 Test and fix the #line outputs.
15269 * tests/atlocal.at (GCC): New.
15270 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
15271 (Prologue synch line, %union synch line, Postprologue synch line)
15272 (Action synch line, Epilogue synch line): New tests.
15273 * src/reader.c (parse_union_decl): Define the muscle stype_line.
15274 * data/bison.simple, data/bison.c++: Use it.
15276 2002-03-19 Akim Demaille <akim@epita.fr>
15278 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
15279 (Solved SR Conflicts, %expect not enough, %expect right)
15280 (%expect too much): Move to...
15281 * tests/conflicts.at: this new file.
15283 2002-03-19 Akim Demaille <akim@epita.fr>
15285 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15286 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
15287 that we can move to enums for instance.
15288 * src/output.c (token_definitions_output): Output a list of
15289 `token-name, token-number' instead of the #define.
15290 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
15292 2002-03-14 Akim Demaille <akim@epita.fr>
15294 Use Gettext 0.11.1.
15296 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
15298 * data/bison.c++: Make the user able to add members to the generated
15299 parser by subclassing.
15301 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
15303 * src/reader.c (read_additionnal_code): `c' should be an integer, not
15305 Reported by Nicolas Tisserand and Nicolas Burrus.
15307 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15309 * src/reader.c: Warn about lacking semi-colons, do not complain.
15311 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15313 * data/bison.c++: Remove a debug line.
15315 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15317 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
15318 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
15319 provide a default implementation.
15321 2002-03-04 Akim Demaille <akim@epita.fr>
15323 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
15324 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
15325 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
15326 * tests/semantic.at (Parsing Guards): Similarly.
15327 * src/reader.at (readgram): Complain if the last rule is not ended
15330 2002-03-04 Akim Demaille <akim@epita.fr>
15332 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
15333 * src/closure.c: here.
15334 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
15336 * src/warshall.h, src/warshall.c: Remove.
15337 * tests/sets.at (Broken Closure): Adjust.
15339 2002-03-04 Akim Demaille <akim@epita.fr>
15341 * src/output.c (output_skeleton): tempdir is const.
15342 bytes_read is unused.
15344 2002-03-04 Akim Demaille <akim@epita.fr>
15346 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15347 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
15349 From Michael Hayes.
15351 2002-03-04 Akim Demaille <akim@epita.fr>
15353 * src/closure.c (closure): `r' is unused.
15355 2002-03-04 Akim Demaille <akim@epita.fr>
15357 * tests/sets.at (Broken Closure): Add the ending `;'.
15358 * src/reader.at (readgram): Complain if a rule is not ended with a
15361 2002-03-04 Akim Demaille <akim@epita.fr>
15363 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
15364 (count_sr_conflicts): Use bitset_count.
15365 * src/reduce.c (inaccessable_symbols): Ditto.
15366 (bits_size): Remove.
15367 * src/warshall.h, src/warshall.c: Convert to bitsetv.
15369 2002-03-04 Akim Demaille <akim@epita.fr>
15371 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
15372 * src/reduce.c: Remove the `bitset_zero's following the
15373 `bitset_create's, as now it is performed by the latter.
15375 2002-03-04 Akim Demaille <akim@epita.fr>
15377 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
15378 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
15379 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
15380 latest sources from Michael.
15382 2002-03-04 Akim Demaille <akim@epita.fr>
15384 * src/output.c (output): Don't free the grammar.
15385 * src/reader.c (grammar_free): New.
15386 * src/main.c (main): Call it and don't free symtab here.
15388 2002-03-04 Akim Demaille <akim@epita.fr>
15390 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
15392 Reported by Benoit Perrot.
15394 2002-03-04 Akim Demaille <akim@epita.fr>
15396 Use bitset operations when possible, not loops over bits.
15398 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
15400 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
15401 * src/reduce.c (useless_nonterminals): Formatting changes.
15402 * src/warshall.c (TC): Use bitset_or.
15404 2002-03-04 Akim Demaille <akim@epita.fr>
15406 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
15407 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
15410 2002-03-04 Akim Demaille <akim@epita.fr>
15412 * src/lalr.c (F): Now a bitset*.
15413 Adjust all dependencies.
15415 2002-03-04 Akim Demaille <akim@epita.fr>
15417 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
15418 Adjust all dependencies.
15420 2002-03-04 Akim Demaille <akim@epita.fr>
15422 * src/L0.c, src/LR0.h (nstates): Be size_t.
15423 Adjust comparisons (signed vs unsigned).
15424 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
15426 Adjust all dependencies.
15428 2002-03-04 Akim Demaille <akim@epita.fr>
15430 * src/closure.c (firsts): Now, also a bitset.
15431 Adjust all dependencies.
15432 (varsetsize): Remove, now unused.
15433 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
15435 2002-03-04 Akim Demaille <akim@epita.fr>
15437 * src/print.c: Convert to use bitset.h, not hand coded iterations
15440 2002-03-04 Akim Demaille <akim@epita.fr>
15442 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
15444 2002-03-04 Akim Demaille <akim@epita.fr>
15446 * src/closure.c (ruleset): Be a bitset.
15447 (rulesetsize): Remove.
15449 2002-03-04 Akim Demaille <akim@epita.fr>
15451 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15452 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15453 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
15454 * src/closure.c (fderives): Be an array of bitsets.
15456 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
15458 * data/bison.c++: Merge the two generated headers. Insert a copyright
15459 notice in each output file.
15461 2002-02-28 Akim Demaille <akim@epita.fr>
15463 * data/bison.c++: Copy the prologue of bison.simple to fetch
15464 useful M4 definitions, such as b4_header_guard.
15466 2002-02-25 Akim Demaille <akim@epita.fr>
15468 * src/getargs.c (version): Give the name of the authors, and use a
15469 translator friendly scheme for the bgr
15472 2002-02-25 Akim Demaille <akim@epita.fr>
15474 * src/output.c (header_output): Remove, now handled completely via
15477 2002-02-25 Akim Demaille <akim@epita.fr>
15479 * m4/m4.m4: New, from CVS Autoconf.
15480 * configure.in: Invoke it.
15481 * src/output.c (output_skeleton): Use its result instead of the
15484 2002-02-25 Akim Demaille <akim@epita.fr>
15486 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
15488 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
15489 * src/output.c (output_skeleton): Use mkstemp to create a real
15491 Move the filling of `skeleton' and its muscle to...
15493 (output): Move the definition of the prologue muscle to...
15495 * src/system.h (DEFAULT_TMPDIR): New.
15497 2002-02-14 Paul Eggert <eggert@twinsun.com>
15499 Remove the support for C++ namespace cleanliness; it was
15500 causing more problems than it was curing, since it didn't work
15501 properly on some nonstandard C++ compilers. This can wait
15502 for a proper C++ parser.
15504 * NEWS: Document this.
15505 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15506 of C++, as it's treated like C now.
15507 * src/bison.simple (YYSTD): Remove.
15508 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15509 Treat C++ just like Standard C instead of trying to support
15510 namespace cleanliness.
15512 2002-02-14 Akim Demaille <akim@epita.fr>
15514 * tests/regression.at (else): Adjust to Andreas' change.
15516 2002-02-14 Akim Demaille <akim@epita.fr>
15518 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15520 2002-02-13 Andreas Schwab <schwab@suse.de>
15522 * src/output.c (output_rule_data): Don't output NULL, it might
15523 not be defined yet.
15525 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
15527 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15528 (Copyright notice): Update.
15530 2002-02-11 Akim Demaille <akim@epita.fr>
15532 * tests/regression.at (%nonassoc and eof): Don't include
15533 nonportable headers.
15535 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
15537 * data/bison.c++: Correct error recovery. Make the user able to
15538 initialize the starting location.
15540 2002-02-07 Akim Demaille <akim@epita.fr>
15542 * tests/input.at: New.
15544 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15546 * data/bison.c++: Replace some direct m4 expansions by constants. Be
15547 more consistent when naming methods and variables. Put preprocessor
15548 directives around tables only needed for debugging.
15550 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15552 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15554 (yy::b4_name::parse): Use print_.
15556 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15558 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15560 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15562 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15564 (yy::b4_name::parse): Build verbose error messages, and use error_.
15566 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15568 * data/bison.c++: Fix m4 quoting in comments.
15570 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15572 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15573 not expanded by m4.
15575 2002-02-05 Akim Demaille <akim@epita.fr>
15577 * data/bison.c++: Adjust to the M4 back end.
15578 More is certainly needed.
15580 2002-02-05 Akim Demaille <akim@epita.fr>
15582 Give a try to M4 as a back end.
15584 * lib/readpipe.c: New, from wdiff.
15585 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15587 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15588 specific values. Now it is m4 that performs the lookup.
15589 * src/parse-skel.y: Remove.
15590 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15591 * src/output.c (actions_output, guards_output)
15592 (token_definitions_output): No longer keeps track of the output
15593 line number, hence remove the second argument.
15594 (guards_output): Check against the guard member of a rule, not the
15597 (output_skeleton): Don't look for the skeleton location, let m4 do
15599 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15601 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15602 (prepare): Given that for the time being changesyntax is not
15603 usable in M4, rename the muscles using `-' to `_'.
15604 Define `defines_flag', `output_parser_name' and `output_header_name'.
15605 * src/output.h (actions_output, guards_output)
15606 (token_definitions_output): Adjust prototypes.
15607 * src/scan-skel.l: Instead of scanning the skeletons, it now
15608 processes the output of m4: `__oline__' and `#output'.
15609 * data/bison.simple: Adjust to be used by M4(sugar).
15610 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15612 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15613 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15614 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15615 shamelessly stolen from CVS Autoconf.
15617 2002-02-05 Akim Demaille <akim@epita.fr>
15619 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15620 * configure.in: Check for the declarations of free and malloc.
15621 * src/muscle_tab.c: Adjust.
15623 2002-02-05 Akim Demaille <akim@epita.fr>
15625 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15626 which have no values.
15628 2002-02-05 Akim Demaille <akim@epita.fr>
15630 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15633 2002-01-29 Paul Eggert <eggert@twinsun.com>
15635 * src/bison.simple (YYSIZE_T): Do not define merely because
15636 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15637 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15639 2002-01-27 Akim Demaille <akim@epita.fr>
15641 Fix `%nonassoc and eof'.
15643 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15644 which were not properly copied! Replace
15645 memcpy (res->errs, src->errs, src->nerrs);
15647 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15649 * tests/regression.at (%nonassoc and eof): Adjust to newest
15650 Autotest: `.' is not in the PATH.
15652 2002-01-27 Akim Demaille <akim@epita.fr>
15654 * tests/sets.at (AT_EXTRACT_SETS): New.
15655 (Nullable): Use it.
15658 2002-01-26 Akim Demaille <akim@epita.fr>
15660 * tests/actions.at, tests/calc.at, tests/headers.at,
15661 * tests/torture.at: Adjust to the newest Autotest which no longer
15662 forces `.' in the PATH.
15664 2002-01-25 Akim Demaille <akim@epita.fr>
15666 * tests/regression.at (%nonassoc and eof): New.
15667 Suggested by Robert Anisko.
15669 2002-01-24 Akim Demaille <akim@epita.fr>
15671 Bison dumps core when trying to complain about broken input files.
15672 Reported by Cris van Pelt.
15674 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15675 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15677 (Invalid inputs): Strengthen: exercise parse_percent_token.
15679 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
15681 * src/Makefile.am: Add bison.c++.
15682 * src/bison.c++: New skeleton.
15684 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
15688 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15690 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15692 2002-01-20 Marc Autret <marc@gnu.org>
15694 * src/files.c (compute_output_file_names): Fix
15696 2002-01-20 Marc Autret <marc@gnu.org>
15698 * tests/output.at: New test.
15699 * src/files.c (compute_base_names): Don't map extensions when
15700 the YACC flag is set, use defaults.
15701 Reported by Evgeny Stambulchik.
15703 2002-01-20 Marc Autret <marc@gnu.org>
15705 * src/system.h: Need to define __attribute__ away for non-GCC
15706 compilers as well (i.e., the vendor C compiler).
15707 Suggested by Albert Chin-A-Young.
15709 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15711 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15712 canonical definition.
15713 * src/system.h: Use the canonical definition for PARAMS (avoids
15714 a conflict with the macro from lib/hash.h).
15716 2002-01-11 Akim Demaille <akim@epita.fr>
15718 * configure.in: Use AC_FUNC_STRNLEN.
15719 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15721 2002-01-09 Akim Demaille <akim@epita.fr>
15723 * src/files.c, src/files.h (output_infix): New.
15724 (tab_extension): Remove.
15725 (compute_base_names): Compute the former, drop the latter.
15726 * src/output.c (prepare): Insert the muscles `output-infix', and
15728 * src/parse-skel.y (string, string.1): New.
15729 (section.header): Use it.
15730 (section.yacc): Remove.
15731 (prefix): Remove too.
15732 * src/scan-skel.l: Adjust.
15733 * src/bison.simple, src/bison.hairy: Adjust.
15735 2002-01-09 Akim Demaille <akim@epita.fr>
15737 * configure.in (WERROR_CFLAGS): Compute it.
15738 * src/Makefile.am (CFLAGS): Pass it.
15739 * tests/atlocal.in (CFLAGS): Idem.
15740 * src/files.c: Fix a few warnings.
15741 (get_extension_index): Remove, unused.
15743 2002-01-08 Akim Demaille <akim@epita.fr>
15745 * src/getargs.c (AS_FILE_NAME): New.
15746 (getargs): Use it to convert DOSish file names.
15747 * src/files.c (base_name): Rename as full_base_name to avoid
15748 clashes with `base_name ()'.
15749 (filename_split): New.
15750 (compute_base_names): N-th rewrite, using filename_split.
15752 2002-01-08 Akim Demaille <akim@epita.fr>
15754 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15755 New, stolen from the Fileutils 4.1.
15756 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15757 * configure.in: Check for the presence of memrchr, and of its
15760 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15762 * lib/hash.h (__P): Added definition for this macro.
15763 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15764 BUILT_SOURCES, to ensure they are generated first.
15765 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15766 %error-verbose to allow bootstrapping with bison 1.30x.
15768 2002-01-06 Akim Demaille <akim@epita.fr>
15770 * src/reader.c (parse_braces): Don't fetch the next char, the
15771 convention is to fetch on entry.
15772 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15773 'switch' without a following semicolon.
15774 * tests/regression.at (braces parsing): New.
15776 2002-01-06 Akim Demaille <akim@epita.fr>
15778 Bison is dead wrong in its RR conflict reports.
15780 * tests/torture.at (GNU Cim Grammar): New.
15781 * src/conflicts.c (count_rr_conflicts): Fix.
15783 2002-01-06 Akim Demaille <akim@epita.fr>
15785 Creating package.m4 from configure.ac causes too many problems.
15787 * tests/Makefile.am (package.m4): Create it by hand,
15788 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15790 2002-01-06 Akim Demaille <akim@epita.fr>
15792 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15795 2002-01-04 Paul Eggert <eggert@twinsun.com>
15797 * doc/bison.texinfo (Debugging):
15798 Remove YYSTDERR; it's no longer defined or used.
15799 Also, s/cstdio.h/cstdio/.
15801 2002-01-03 Akim Demaille <akim@epita.fr>
15803 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15805 2002-01-03 Akim Demaille <akim@epita.fr>
15807 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15808 tracing code to --trace, wait for a better --trace option, with
15811 2002-01-03 Akim Demaille <akim@epita.fr>
15813 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15814 The ISO C++ standard is extremely clear about it: stderr is
15815 considered a macro, not a regular symbol (see table 94 `Header
15816 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15817 Therefore std:: does not apply to it. It still does with fprintf.
15818 Also, s/cstdio.h/cstdio/.
15820 2002-01-03 Akim Demaille <akim@epita.fr>
15822 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15823 for non system headers.
15825 2002-01-02 Akim Demaille <akim@epita.fr>
15827 Equip the skeleton chain with location tracking, runtime trace,
15828 pure parser and scanner.
15830 * src/parse-skel.y: Request a pure parser, locations, and prefix
15832 (%union): Having several members with the same type does not help
15833 type mismatches, simplify.
15834 (YYPRINT, yyprint): New.
15835 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15836 (skel_error): this.
15838 * src/scan-skel.l: Adjust to these changes.
15839 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15840 (LOCATION_PRINT, skel_control_t): New.
15842 2001-12-30 Akim Demaille <akim@epita.fr>
15844 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15845 replace `gb' with BLANKS.
15846 * src/scan-skel.l: Adjust.
15848 2001-12-30 Akim Demaille <akim@epita.fr>
15850 * src/system.h: We don't need nor want bcopy.
15851 Throw away MS-DOS crap: we don't need getpid.
15852 * configure.in: We don't need strndup. It was even causing
15853 problems: because Flex includes the headers *before* us,
15854 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15856 * lib/xstrndup.c: New.
15857 * src/scan-skel.l: Use it.
15858 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15859 * src/parse-skel.y: Use %directives instead of #defines.
15861 2001-12-30 Akim Demaille <akim@epita.fr>
15863 * src/skeleton.h: New.
15864 * src/output.c (output_parser, output_master_parser): Remove, dead
15866 * src/output.h (get_lines_number, actions_output, guards_output)
15867 (token_definitions_output): Prototype them.
15868 * src/parse-skel.y: Add the license notice.
15869 Include output.h and skeleton.h.
15870 (process_skeleton): Returns void, and takes a single parameter.
15871 * src/scan-skel.l: Add the license notice.
15872 Include skeleton.h.
15873 Don't use %option yylineno: it seems that then Flex imagines
15874 REJECT has been used, and therefore it won't reallocate its
15875 buffers (which makes no other sense to me than a bug). It results
15876 in warnings for `unused: yy_flex_realloc'.
15878 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
15880 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15881 (MUSCLE_INSERT_PREFIX): ...to there.
15882 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15883 (MUSCLE_INSERT_PREFIX): Move from here...
15885 * src/bison.hairy: Add a section directive. Put braces around muscle
15886 names. This parser skeleton is still broken, but Bison should not
15887 choke on a bad muscle 'syntax'.
15888 * src/bison.simple: Add a section directive. Put braces around muscle
15891 * src/files.h (strsuffix, stringappend): Add declarations.
15892 (tab_extension): Add declaration.
15893 (short_base_name): Add declaration.
15895 * src/files.c (strsuffix, stringappend): No longer static. These
15896 functions are used in the skeleton parser.
15897 (tab_extension): New.
15898 (compute_base_names): Use the computations done in this function
15899 to guess if the generated parsers should have '.tab' in their
15901 (short_base_name): No longer static.
15903 * src/output.c (output_skeleton): New.
15904 (output): Disable call to output_master_parser, and give a try to
15905 a new skeleton handling system.
15906 (guards_output, actions_output): No longer static.
15907 (token_definitions_output, get_lines_number): No longer static.
15909 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15911 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15914 * src/parse-skel.y: New file.
15915 * src/scan-skel.l: New file.
15917 2001-12-29 Akim Demaille <akim@epita.fr>
15919 %name-prefix is broken.
15921 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15922 Adjust all dependencies.
15923 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15926 Renaming yylval but not yylloc is not consistent. Now we do.
15928 * src/bison.simple: Prefix yylloc if used.
15929 * doc/bison.texinfo (Decl Summary): Document that.
15931 2001-12-29 Akim Demaille <akim@epita.fr>
15933 * doc/bison.texinfo: Promote `%long-directive' over
15935 Remove all references to fixed-output-files, yacc is enough.
15937 2001-12-29 Akim Demaille <akim@epita.fr>
15939 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15940 user prologue. These are defaults.
15941 * tests/actions.at (Mid-rule actions): Make sure the user can
15942 define YYDEBUG and YYERROR_VERBOSE.
15944 2001-12-29 Akim Demaille <akim@epita.fr>
15946 * src/output.c (header_output): Don't forget to export YYLTYPE and
15948 * tests/headers.at (export YYLTYPE): New, make sure it does.
15949 * tests/regression.at (%union and --defines, Invalid CPP headers):
15951 * tests/headers.at: here.
15953 2001-12-29 Akim Demaille <akim@epita.fr>
15955 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15957 2001-12-29 Akim Demaille <akim@epita.fr>
15959 * tests/actions.at (Mid-rule actions): Output on a single line
15960 instead of several.
15962 2001-12-29 Akim Demaille <akim@epita.fr>
15964 * doc/bison.texinfo: Formatting changes.
15966 2001-12-29 Akim Demaille <akim@epita.fr>
15968 Don't store the token defs in a muscle, just be ready to output it
15969 on command. Now possible via `symbols'. Fixes a memory leak.
15971 * src/output.c (token_definitions_output): New.
15972 (output_parser, header_output): Use it.
15973 * src/reader.c (symbols_save): Remove.
15975 2001-12-29 Akim Demaille <akim@epita.fr>
15977 * src/bison.simple: Do not provide a default for YYSTYPE and
15978 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15981 2001-12-29 Akim Demaille <akim@epita.fr>
15983 Mid-rule actions are simply... ignored!
15985 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15986 the empty-rule associated to the dummy symbol, not to the host
15988 * tests/actions.at (Mid-rule actions): New.
15990 2001-12-29 Akim Demaille <akim@epita.fr>
15994 * src/reader.c (reader): Free grammar.
15996 2001-12-29 Akim Demaille <akim@epita.fr>
16000 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
16001 since it allocates it for each state, although only one is needed.
16002 (allocate_storage): Do it here.
16004 2001-12-29 Akim Demaille <akim@epita.fr>
16006 * src/options.h, src/options.c (create_long_option_table): Rename
16008 (long_option_table_new): this, with a clearer prototype.
16009 (percent_table): Remove, unused,
16010 * src/getargs.c (getargs): Adjust.
16012 2001-12-29 Akim Demaille <akim@epita.fr>
16014 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
16015 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
16018 2001-12-29 Akim Demaille <akim@epita.fr>
16020 * src/lalr.c (build_relations): Rename `states' as `states1'.
16021 Sorry, I don't understand exactly what it is, no better name...
16023 2001-12-29 Akim Demaille <akim@epita.fr>
16025 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
16026 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
16027 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
16030 2001-12-29 Akim Demaille <akim@epita.fr>
16032 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
16035 2001-12-29 Akim Demaille <akim@epita.fr>
16037 * src/reader.c, src/reader.h (user_toknums): Remove.
16038 Adjust all users to use symbols[i]->user_token_number.
16040 2001-12-29 Akim Demaille <akim@epita.fr>
16042 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
16043 Adjust all users to use symbols[i]->prec or ->assoc.
16045 2001-12-29 Akim Demaille <akim@epita.fr>
16047 * src/reader.c, src/reader.h (tags): Remove.
16048 Adjust all users to use symbols[i]->tag.
16050 2001-12-29 Akim Demaille <akim@epita.fr>
16052 * src/gram.h, src/gram.c (symbols): New, similar to state_table
16054 * src/reader.c (packsymbols): Fill this table.
16056 * src/conflicts.c (resolve_sr_conflict): Adjust.
16057 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
16059 Use symbols[i]->tag instead of tags[i].
16061 2001-12-29 Akim Demaille <akim@epita.fr>
16063 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
16064 In addition, put a comment in there, to replace...
16065 * tests/regression.at (%union and C comments): Remove.
16067 2001-12-29 Akim Demaille <akim@epita.fr>
16069 * tests/regression.at (Web2c Actions): Blindly move the actual
16070 output as expected output. The contents *seem* right to me, but I
16071 can't pretend reading perfectly parser tables... Nonetheless, all
16072 the other tests pass correctly, the table look OK, even though the
16073 presence of `$axiom' is to be noted: AFAICS it is useless (but
16076 2001-12-29 Akim Demaille <akim@epita.fr>
16078 * src/reader.c (readgram): Don't add the rule 0 if there were no
16079 rules read. In other words, add it _after_ having performed
16080 grammar sanity checks.
16081 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
16083 2001-12-29 Akim Demaille <akim@epita.fr>
16085 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
16086 visible, and some states have now a different number.
16088 2001-12-29 Akim Demaille <akim@epita.fr>
16090 * src/reader.c (readgram): Bind the initial rule's lineno to that
16092 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
16093 (Solved SR Conflicts): Adjust rule 0's line number.
16095 2001-12-29 Akim Demaille <akim@epita.fr>
16097 Fix the `GAWK Grammar' failure.
16099 * src/LR0.c (final_state): Initialize to -1 so that we do compute
16100 the reductions of the first state which was mistakenly confused
16101 with the final state because precisely final_state was initialized
16103 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
16104 now noticed by Bison.
16105 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
16106 have a reduction on $default.
16108 2001-12-29 Akim Demaille <akim@epita.fr>
16110 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
16112 * src/closure.c (print_closure): Likewise.
16113 * src/derives.c (print_derives): Likewise.
16114 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
16117 2001-12-29 Akim Demaille <akim@epita.fr>
16119 * src/lalr.c (lookaheads_print): New.
16120 (lalr): Call it when --trace-flag.
16121 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
16124 2001-12-29 Akim Demaille <akim@epita.fr>
16126 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
16127 when walking through ritem, even via rule->rhs.
16128 * src/reduce.c (dump_grammar, useful_production, reduce_output)
16129 (useful_production, useless_nonterminals): Likewise.
16130 (reduce_grammar_tables): Likewise, plus update nritems.
16131 * src/nullable.c (set_nullable): Likewise.
16132 * src/lalr.c (build_relations): Likewise.
16133 * tests/sets.at (Nullable): Adjust.
16134 Fortunately, now, the $axiom is no longer nullable.
16136 2001-12-29 Akim Demaille <akim@epita.fr>
16138 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
16140 * src/gram.c (ritem_longest_rhs): Likewise.
16141 * src/reduce.c (nonterminals_reduce): Likewise.
16142 * src/print_graph.c (print_graph): Likewise.
16143 * src/output.c (output_rule_data): Likewise.
16144 * src/nullable.c (set_nullable): Likewise.
16146 2001-12-29 Akim Demaille <akim@epita.fr>
16148 * src/output.c: Comment changes.
16150 2001-12-27 Paul Eggert <eggert@twinsun.com>
16152 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
16153 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
16154 Sparc, as they were causing more porting problems than the
16155 (minor) performance improvement was worth.
16157 Also, catch up with 1.31's YYSTD.
16159 2001-12-27 Akim Demaille <akim@epita.fr>
16161 * src/output.c (output_gram): Rely on nritems, not the
16162 0-sentinel. See below.
16163 Use -1 as separator, not 0.
16164 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
16165 Rely on -1 as separator in yyrhs, instead of 0.
16166 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
16167 twice `Now at end of input', therefore there are two lines less to
16170 2001-12-27 Akim Demaille <akim@epita.fr>
16172 * tests/regression.at (Unresolved SR Conflicts):
16173 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
16176 2001-12-27 Akim Demaille <akim@epita.fr>
16178 * src/LR0.c (new_state): Recognize the final state by the fact it
16179 is reached by eoftoken.
16180 (insert_start_shifting_state, insert_eof_shifting_state)
16181 (insert_accepting_state, augment_automaton): Remove, since now
16182 these states are automatically computed from the initial state.
16183 (generate_states): Adjust.
16184 * src/print.c: When reporting a rule number to the user, substract
16185 1, so that the axiom rule is rule 0, and the first user rule is 1.
16186 * src/reduce.c: Likewise.
16187 * src/print_graph.c (print_core): For the time being, just as for
16188 the report, depend upon --trace-flags to dump the full set of
16190 * src/reader.c (readgram): Once the grammar read, insert the rule
16191 0: `$axiom: START-SYMBOL $'.
16192 * tests/set.at: Adjust: rule 0 is now displayed, and since the
16193 number of the states has changed (the final state is no longer
16194 necessarily the last), catch up.
16196 2001-12-27 Akim Demaille <akim@epita.fr>
16198 Try to make the use of the eoftoken valid. Given that its value
16199 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
16200 is used instead of > 0 where appropriate, (ii), depend upon nritems
16201 instead of the 0-sentinel.
16203 * src/gram.h, src/gram.c (nritems): New.
16204 Expected to be duplication of nitems, but for the time being...
16205 * src/reader.c (packgram): Assert nritems and nitems are equal.
16206 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
16207 * src/closure.c (print_closure, print_fderives): Likewise.
16208 * src/gram.c (ritem_print): Likewise.
16209 * src/print.c (print_core, print_grammar): Likewise.
16210 * src/print_graph.c: Likewise.
16212 2001-12-27 Akim Demaille <akim@epita.fr>
16214 * src/main.c (main): If there are complains after grammar
16215 reductions, then output the report anyway if requested, then die.
16216 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
16217 * src/reader.c (eoftoken): New.
16218 (parse_token_decl): If the token being defined has value `0', it
16220 (packsymbols): No longer hack `tags' to insert `$' by hand.
16221 Be sure to preserve the value of the eoftoken.
16222 (reader): Make sure eoftoken is defined.
16223 Initialize nsyms to 0: now eoftoken is created just like the others.
16224 * src/print.c (print_grammar): Don't special case the eof token.
16225 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
16226 lie anyway, albeit pleasant.
16227 * tests/calc.at: Exercise error messages with eoftoken.
16228 Change the grammar so that empty input is invalid.
16229 Adjust expectations.
16230 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
16232 2001-12-27 Akim Demaille <akim@epita.fr>
16234 * configure.in: Check the protos of strchr ans strspn.
16235 Replace strchr if needed.
16236 * src/system.h: Provide the protos of strchr, strspn and memchr if
16238 * lib/strchr.c: New.
16239 * src/reader.c (symbols_save): Use strchr.
16241 2001-12-27 Akim Demaille <akim@epita.fr>
16243 * src/print.c, src/print_graph.c (escape): New.
16244 Use it to quote the TAGS outputs.
16245 * src/print_graph.c (print_state): Now errors are in red, and
16246 reductions in green.
16247 Prefer high to wide: output the state number on a line of its own.
16249 2001-12-27 Akim Demaille <akim@epita.fr>
16251 * src/state.h, src/state.c (reductions_new): New.
16252 * src/LR0.c (set_state_table): Let all the states have a
16253 `reductions', even if reduced to 0.
16254 (save_reductions): Adjust.
16255 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
16256 * src/print.c (print_reductions, print_actions): Adjust.
16257 * src/output.c (action_row): Adjust.
16259 2001-12-27 Akim Demaille <akim@epita.fr>
16261 * src/state.h, src/state.c (errs_new, errs_dup): New.
16262 * src/LR0.c (set_state_table): Let all the states have an errs,
16263 even if reduced to 0.
16264 * src/print.c (print_errs, print_reductions): Adjust.
16265 * src/output.c (output_actions, action_row): Adjust.
16266 * src/conflicts.c (resolve_sr_conflict): Adjust.
16268 2001-12-27 Akim Demaille <akim@epita.fr>
16270 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
16272 2001-12-27 Akim Demaille <akim@epita.fr>
16274 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
16275 * src/print.c: here.
16276 (lookaheadset, shiftset): New, used as additional storage by
16278 (print_results): Adjust.
16279 (print_shifts, print_gotos, print_errs): New, extracted from...
16280 (print_actions): here.
16281 * src/print_graph.c (print_actions): Remove dead code.
16283 2001-12-27 Akim Demaille <akim@epita.fr>
16285 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
16288 2001-12-27 Akim Demaille <akim@epita.fr>
16290 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
16291 (build_relations): Adjust.
16293 2001-12-27 Akim Demaille <akim@epita.fr>
16295 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
16298 2001-12-27 Akim Demaille <akim@epita.fr>
16300 * src/reader.c (packgram): Catch nitems overflows.
16302 2001-12-27 Akim Demaille <akim@epita.fr>
16304 * src/files.c, src/files.h (guard_obstack): Remove.
16305 * src/output.c (output): Adjust.
16306 * src/reader.c (parse_braces): New, factoring...
16307 (copy_action, copy_guard): these two which are renamed as...
16308 (parse_action, parse_guard): these.
16309 As a voluntary consequence, using braces around guards is now
16312 2001-12-27 Akim Demaille <akim@epita.fr>
16314 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
16315 * src/reader.c (symbol_list): `guard' and `guard_line' are new
16317 (symbol_list_new): Adjust.
16318 (copy_action): action_line is the first line, not the last.
16319 (copy_guard): Just as for actions, store the `action' only, not
16320 the switch/case/break flesh.
16321 Don't parse the user action that might follow the guard, let...
16322 (readgram): do it, i.e., now, there can be an action after a
16324 In other words the guard is just explicitly optional.
16325 (packgram): Adjust.
16326 * src/output.c (guards_output): New.
16327 (output_parser): Call it when needed.
16328 (output): Also free the guard and attrs obstacks.
16329 * src/files.c, src/files.h (obstack_save): Remove.
16330 (output_files): Remove.
16331 As a result, if one needs the former `.act' file, using an
16332 appropriate skeleton which requires actions and guards is now
16334 * src/main.c (main): Adjust.
16335 * tests/semantic.at: New.
16336 * tests/regression.at: Use `input.y' as input file name.
16337 Avoid 8+3 problems by requiring input.c when the test needs the
16340 2001-12-27 Akim Demaille <akim@epita.fr>
16342 * src/reader.c (symbol_list_new): Be sure to initialize all the
16345 2001-12-27 Akim Demaille <akim@epita.fr>
16347 All the hacks using a final pseudo state are now useless.
16349 * src/LR0.c (set_state_table): state_table holds exactly nstates.
16350 * src/lalr.c (nLA): New.
16351 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
16352 instead of lookaheadsp from the pseudo state (nstate + 1).
16354 2001-12-27 Akim Demaille <akim@epita.fr>
16356 * src/output.c (action_row, token_actions): Use a state_t instead
16357 of a integer, and nlookaheads instead of the following state's
16360 2001-12-27 Akim Demaille <akim@epita.fr>
16362 * src/conflicts.c (log_resolution, flush_shift)
16363 (resolve_sr_conflict, set_conflicts, solve_conflicts)
16364 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
16365 (conflicts_print, print_reductions): Use a state_t instead of an
16366 integer when referring to a state.
16367 As much as possible, depend upon nlookaheads, instead of the
16368 `lookaheadsp' member of the following state (since lookaheads of
16369 successive states are successive, the difference between state n + 1
16370 and n served as the number of lookaheads for state n).
16371 * src/lalr.c (add_lookback_edge): Likewise.
16372 * src/print.c (print_core, print_actions, print_state)
16373 (print_results): Likewise.
16374 * src/print_graph.c (print_core, print_actions, print_state)
16375 (print_graph): Likewise.
16376 * src/conflicts.h: Adjust.
16378 2001-12-27 Akim Demaille <akim@epita.fr>
16380 * src/bison.hairy: Formatting/comment changes.
16382 Remove `register' indications.
16383 Add plenty of `static'.
16385 2001-12-27 Akim Demaille <akim@epita.fr>
16387 * src/output.c (prepare): Drop the muscle `ntbase' which
16388 duplicates ntokens.
16389 * src/bison.simple: Formatting/comment changes.
16390 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
16391 is an undocumented synonym.
16393 2001-12-22 Akim Demaille <akim@epita.fr>
16395 * src/output.c (output_table_data): Change the prototype to use
16396 `int' for array ranges: some invocations do pass an int, not a
16398 Reported by Wayne Green.
16400 2001-12-22 Akim Demaille <akim@epita.fr>
16402 Some actions of web2c.y are improperly triggered.
16403 Reported by Mike Castle.
16405 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
16406 * tests/regression.at (Web2c): Rename as...
16407 (Web2c Report): this.
16408 (Web2c Actions): New.
16410 2001-12-22 Akim Demaille <akim@epita.fr>
16412 Reductions in web2c.y are improperly reported.
16413 Reported by Mike Castle.
16415 * src/conflicts.c (print_reductions): Fix.
16416 * tests/regression.at (Web2c): New.
16418 2001-12-18 Akim Demaille <akim@epita.fr>
16420 Some host fail on `assert (!"foo")', which expands to
16421 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
16422 Reported by Nelson Beebee.
16424 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
16425 `#define it_succeeded 0' and `assert (it_succeeded)'.
16427 2001-12-17 Marc Autret <autret_m@epita.fr>
16429 * src/bison.simple: Don't hard code the skeleton line and filename.
16430 * src/output.c (output_parser): Rename 'line' as 'output_line'.
16431 New line counter 'skeleton_line' (skeleton-line muscle).
16433 2001-12-17 Paul Eggert <eggert@twinsun.com>
16435 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
16436 YYDEBUG must be defined to a nonzero value.
16438 * src/bison.simple (yytname): Do not assume that the user defines
16439 YYDEBUG to a properly parenthesized expression.
16441 2001-12-17 Akim Demaille <akim@epita.fr>
16443 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
16444 nlookaheads is a new member.
16446 * src/lalr.h (nlookaheads): Remove this orphan declaration.
16447 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
16450 2001-12-17 Akim Demaille <akim@epita.fr>
16452 * src/files.h, src/files.c (open_files, close_files): Remove.
16453 * src/main.c (main): Don't open/close files, nor invoke lex_free,
16455 * src/reader.c (reader): Do it.
16457 2001-12-17 Akim Demaille <akim@epita.fr>
16459 * src/conflicts.c (print_reductions): Formatting changes.
16461 2001-12-17 Akim Demaille <akim@epita.fr>
16463 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
16464 (flush_reduce): New.
16465 (resolve_sr_conflict): Adjust.
16467 2001-12-17 Akim Demaille <akim@epita.fr>
16469 * src/output.c (output_obstack): Be static and rename as...
16470 (format_obstack): this, to avoid any confusion with files.c's
16472 * src/reader.h (muscle_obstack): Move to...
16473 * src/output.h: here, since it's defined in output.c.
16475 2001-12-17 Akim Demaille <akim@epita.fr>
16477 * src/output.c (action_row, save_column, default_goto)
16478 (sort_actions, matching_state, pack_vector): Better variable
16481 2001-12-17 Akim Demaille <akim@epita.fr>
16483 * src/output.c: Various formatting changes.
16485 2001-12-17 Akim Demaille <akim@epita.fr>
16487 * src/files.c (output_files): Free the output_obstack.
16488 * src/main.c (main): Call print and print_graph conditionally.
16489 * src/print.c (print): Work unconditionally.
16490 * src/print_graph.c (print_graph): Work unconditionally.
16491 * src/conflicts.c (log_resolution): Output only if verbose_flag.
16493 2001-12-16 Marc Autret <autret_m@epita.fr>
16495 * src/output.c (actions_output): Fix. When we use %no-lines,
16496 there is one less line per action.
16498 2001-12-16 Marc Autret <autret_m@epita.fr>
16500 * src/bison.simple: Remove a useless #line directive.
16501 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
16502 * src/output.c (get_lines_number): New.
16503 (output_parser): Adjust, now takes care about the lines of a
16505 Fix line numbering.
16506 (actions_output): Computes the number of lines taken by actions.
16507 (output_master_parser): Insert new skeleton which is the name of
16508 the output parser file name.
16510 2001-12-15 Marc Autret <autret_m@epita.fr>
16512 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16514 2001-12-15 Marc Autret <autret_m@epita.fr>
16516 * src/output.c (output_gram): Keep track of the hairy one.
16518 2001-12-15 Akim Demaille <akim@epita.fr>
16520 Make `make distcheck' work.
16522 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16523 system.h which uses libgettext.h.
16525 2001-12-15 Akim Demaille <akim@epita.fr>
16527 * src/nullable.c (set_nullable): Useless rules must be skipped,
16528 otherwise, since we range over their symbols, we might look at a
16529 nonterminal which no longer ``exists'', i.e., it is not counted in
16530 `nvars', hence we overflow our arrays.
16532 2001-12-15 Akim Demaille <akim@epita.fr>
16534 The header can also be produced directly, without any obstack!
16537 * src/files.c, src/files.h (defines_obstack): Remove.
16538 (compute_header_macro): Global.
16539 (defines_obstack_save): Remove.
16540 * src/reader.c (parse_union_decl): No longer output to
16541 defines_obstack: its content can be found in the `stype' muscle
16543 (output_token_translations): Merge into...
16544 (symbols_output): this.
16546 (symbols_save): this.
16548 * src/output.c (header_output): New.
16551 2001-12-15 Akim Demaille <akim@epita.fr>
16553 * src/reader.c (parse_union_decl): Instead of handling two obstack
16554 simultaneously, use one to define the `stype' muscle, and use the
16555 value of the latter to fill defines_obstack.
16556 (copy_comment): Remove.
16557 (copy_comment2): Work for a single obstack.
16559 (copy_comment): this.
16561 2001-12-15 Akim Demaille <akim@epita.fr>
16563 * src/lex.c, src/lex.h (xgetc): No longer static.
16564 * src/reader.c (parse_union_decl): Revamp.
16566 2001-12-15 Akim Demaille <akim@epita.fr>
16568 Still making progress in separating Bison into (i) input, (ii)
16569 process, (iii) output: now we can directly output the parser file
16570 without using table_obstack at all.
16572 * src/files.c, src/files.h (table_obstack): Bye bye.
16573 (parser_file_name): New.
16574 * src/files.c (compute_output_file_names): Compute it.
16575 * src/output.c (actions_output, output_parser)
16576 (output_master_parser): To a file instead of an obstack.
16578 2001-12-15 Akim Demaille <akim@epita.fr>
16580 Attach actions to rules, instead of pre-outputting them to
16583 * src/gram.h (rule_t): action and action_line are new members.
16584 * src/reader.c (symbol_list): Likewise.
16585 (copy_action): Save the actions within the rule.
16586 (packgram): Save them in rule_table.
16587 * src/output.c (actions_output): New.
16588 (output_parser): Use it on `%%actions'.
16589 (output_rule_data): Don't free rule_table.
16591 (prepare): Don't save the `action' muscle.
16592 * src/bison.simple: s/%%action/%%actions/.
16594 2001-12-15 Akim Demaille <akim@epita.fr>
16596 * src/reader.c (copy_action): When --yacc, don't append a `;'
16597 to the user action: let it fail if lacking.
16598 Suggested by Arnold Robbins and Tom Tromey.
16600 2001-12-14 Akim Demaille <akim@epita.fr>
16602 * src/lex.c (literalchar): Simply return the char you decoded, non
16603 longer mess around with obstacks and int pointers.
16604 Adjust all callers.
16606 2001-12-14 Akim Demaille <akim@epita.fr>
16608 * src/lex.c (literalchar): Don't escape the special characters,
16609 just decode them, and keep them as char (before, eol was output as
16610 the 2 char string `\n' etc.).
16611 * src/output.c (output_rule_data): Use quotearg to output the
16614 2001-12-13 Paul Eggert <eggert@twinsun.com>
16616 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16617 Do not infringe on the global user namespace when using C++.
16618 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16619 All uses of `fprintf' and `stderr' changed.
16621 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16623 2001-12-13 Akim Demaille <akim@epita.fr>
16625 The computation of nullable is broken: it doesn't handle empty
16628 * tests/torture.at (GNU AWK Grammar): New.
16629 * tests/sets.at (Nullable): New.
16630 * src/nullable.c (set_nullable): Instead of blindly looping over
16631 `ritems', loop over the rules, and then over their rhs's.
16633 Work around Autotest bugs.
16635 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16636 frame, because Autotest understand lines starting with a `+' as
16637 traces from the shell. Then, they are not processed properly.
16638 Admittedly an Autotest bug, but we don't have time to wait for
16639 Autotest to catch up.
16640 * tests/regression.at (Broken Closure): Adjust to the new table
16643 * tests/sets.at: here.
16645 2001-12-13 Akim Demaille <akim@epita.fr>
16647 * src/closure.c (closure): Use nrules instead of playing tricks
16648 with BITS_PER_WORD.
16650 2001-12-13 Akim Demaille <akim@epita.fr>
16652 * src/print.c (print_actions): Output the handling of `$' as the
16653 traces do: shifting the token EOF. Before EOF was treated as a
16655 * tests/regression.at: Adjust some tests.
16656 * src/print_graph.c (print_core): Complete the set of items via
16657 closure. The next-to-final and final states are still unsatisfying,
16658 but that's to be addressed elsewhere.
16659 No longer output the rule numbers, but do output the state number.
16660 A single loop for the shifts + gotos is enough, but picked a
16661 distinct color for each.
16662 (print_graph): Initialize and finalize closure.
16664 2001-12-13 Akim Demaille <akim@epita.fr>
16666 * src/reader.c (readgram): Remove dead code, an strip useless
16668 (get_type): Remove, unused.
16670 2001-12-12 Akim Demaille <akim@epita.fr>
16672 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16673 on that of lib/error.c.
16675 2001-12-12 Akim Demaille <akim@epita.fr>
16677 Some hosts don't like `/' in includes.
16679 * src/system.h: Include libgettext.h without qualifying the path.
16680 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16683 2001-12-11 Marc Autret <autret_m@epita.fr>
16685 * src/output.c (output_parser): Remove useless muscle.
16687 2001-12-11 Marc Autret <autret_m@epita.fr>
16689 * src/bison.simple: Remove #line just before %%epilogue. It
16690 is now handled in ...
16691 * src/reader.c (read_additionnal_code): Add the output of a
16692 #line for the epilogue.
16694 2001-12-10 Marc Autret <autret_m@epita.fr>
16696 * src/reader.c (copy_definition): Re-use CPP-outed code which
16697 replace precedent remove.
16698 * src/bison.simple: Remove #line before %%prologue because
16699 %%input-line is wrong at this time.
16701 2001-12-10 Marc Autret <autret_m@epita.fr>
16703 * src/reader.c (symbols_output): Clean up.
16704 * src/output.c (output_gram, output): Clean up.
16706 2001-12-10 Akim Demaille <akim@epita.fr>
16708 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16709 * src/LR0.c (set_state_table): here.
16710 * src/lalr.c (lalr): Call it.
16712 2001-12-10 Akim Demaille <akim@epita.fr>
16714 * src/state.h (shifts): Remove the `number' member: shifts are
16715 attached to state, hence no longer need to be labelled with a
16718 2001-12-10 Akim Demaille <akim@epita.fr>
16720 Now that states have a complete set of members, the linked list of
16721 shifts is useless: just fill directly the state's shifts member.
16723 * src/state.h (shifts): Remove the `next' member.
16724 * src/LR0.c (first_state, last_state): Remove.
16725 Adjust the callers.
16726 (augment_automaton): Don't look for the shifts that must be added
16727 a shift on EOF: it is those of the state we looked for! But now,
16728 since shifts are attached, it is no longer needed to looking
16729 merely by its id: its number.
16731 2001-12-10 Akim Demaille <akim@epita.fr>
16733 * src/LR0.c (augment_automaton): Better variable locality.
16734 Remove an impossible branch: if there is a state corresponding to
16735 the start symbol being shifted, then there is shift for the start
16736 symbol from the initial state.
16738 2001-12-10 Akim Demaille <akim@epita.fr>
16740 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16741 only when appropriate: when insert_start_shifting_state' is not
16743 * tests/regression.at (Rule Line Numbers): Adjust.
16745 2001-12-10 Akim Demaille <akim@epita.fr>
16747 * src/LR0.c (augment_automaton): Now that all states have shifts,
16748 merge the two cases addition shifts to the initial state.
16750 2001-12-10 Akim Demaille <akim@epita.fr>
16752 * src/lalr.c (set_state_table): Move to...
16754 * src/lalr.c (lalr): Don't call it...
16755 * src/LR0.c (generate_states): do it.
16756 * src/LR0.h (first_state): Remove, only the table is used.
16758 2001-12-10 Akim Demaille <akim@epita.fr>
16760 * src/LR0.h (first_shift, first_reduction): Remove.
16761 * src/lalr.c: Don't use first_shift: find shifts through the
16764 2001-12-10 Akim Demaille <akim@epita.fr>
16766 * src/LR0.c: Attach shifts to states as soon as they are
16768 * src/lalr.c (set_state_table): Instead of assigning shifts to
16769 state, just assert that the mapping was properly done.
16771 2001-12-10 Akim Demaille <akim@epita.fr>
16773 * src/LR0.c (insert_start_shift): Rename as...
16774 (insert_start_shifting_state): this.
16775 (insert_eof_shifting_state, insert_accepting_state): New.
16776 (augment_automaton): Adjust.
16777 Better locality of the variables.
16778 When looking if the start_symbol is shifted from the initial
16779 state, using `while (... symbol != start_symbol ...)' sounds
16780 better than `while (... symbol < start_symbol ...)': If fail
16781 to see how the order between symbols could be relevant!
16783 2001-12-10 Akim Demaille <akim@epita.fr>
16785 * src/getargs.h: Don't declare `spec_name_prefix' and
16786 `spec_file_prefix', declared by src/files.h.
16787 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16788 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16789 * src/output.c (prepare): Adjust.
16790 * src/reader.c (symbols_output): Likewise.
16791 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16793 2001-12-10 Akim Demaille <akim@epita.fr>
16795 * src/muscle_tab.c (muscle_init): NULL is a better default than
16798 2001-12-10 Akim Demaille <akim@epita.fr>
16800 * src/reader.c (reader): Calling symbols_output once is enough.
16802 2001-12-10 Akim Demaille <akim@epita.fr>
16804 Now that states have a complete set of members, the linked list of
16805 reductions is useless: just fill directly the state's reductions
16808 * src/state.h (struct reductions): Remove member `number' and
16810 * src/LR0.c (first_reduction, last_reduction): Remove.
16811 (save_reductions): Don't link the new reductions, store them in
16813 * src/lalr.c (set_state_table): No need to attach reductions to
16814 states, it's already done.
16815 * src/output.c (output_actions): No longer free the shifts, then
16816 the reductions, then the states: free all the states and their
16819 2001-12-10 Akim Demaille <akim@epita.fr>
16821 * src/options.c (OPTN, DRTV, BOTH): New.
16822 (option_table): Use them.
16824 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16825 the job of system.h.
16826 * src/options.c: Don't include stdio.h and xalloc.h for the same
16829 2001-12-10 Akim Demaille <akim@epita.fr>
16831 * src/output.c (output, prepare): Make sure the values of the
16832 muscles `action' and `prologue' are 0-terminated.
16834 2001-12-10 Akim Demaille <akim@epita.fr>
16836 Clean up GCC warnings.
16838 * src/reader.c (copy_action): `buf' is not used.
16839 (parse_skel_decl): Be static.
16840 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16841 * src/options.h (create_long_option_table): Have a real prototype.
16842 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16843 (hash_delete_at): Return const void *.
16844 Adjust casts to preserve the const.
16846 2001-12-10 Akim Demaille <akim@epita.fr>
16848 * configure.in: Require 2.52g.
16849 M4 is not needed, but AUTOM4TE is.
16850 * m4/m4.m4: Remove.
16851 * tests/Makefile.am: Adjust.
16853 2001-12-10 Akim Demaille <akim@epita.fr>
16855 One structure for states is enough, even though theoretically
16856 there are LR(0) states and LALR(1) states.
16858 * src/lalr.h (state_t): Remove.
16859 (state_table): Be state_t **, not state_t *.
16860 * src/state.h (core, CORE_ALLOC): Rename as...
16861 (state_t, STATE_ALLOC): this.
16862 Add the LALR(1) members: shifts, reductions, errs.
16863 * src/LR0.c (state_table): Rename as...
16864 (state_hash): this, to avoid name clashes with the global
16866 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16867 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16869 2001-12-10 Akim Demaille <akim@epita.fr>
16871 Bison dumps core on bash.y.
16872 Reported by Pascal Bart.
16874 * src/warshall.c (bitmatrix_print): New.
16876 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16877 j must be the outer loop.
16878 * tests/regression.at (Broken Closure): New.
16880 2001-12-05 Akim Demaille <akim@epita.fr>
16882 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16884 Reported by Peter Hamorsky.
16886 2001-12-05 Akim Demaille <akim@epita.fr>
16888 * src/conflicts.c (err_table): Remove.
16889 (resolve_sr_conflict): Adjust.
16890 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16892 (state_t.reductions, state_t.shifts): this.
16894 2001-12-05 Akim Demaille <akim@epita.fr>
16896 * src/reduce.c (reduce_grammar_tables): No longer disable the
16897 removal of useless rules via CPP but via `if (0)', so that the
16898 compiler still check the code is valid.
16899 For instance, it should have noticed `rline' no longer exists: use
16900 the `line' member of rule_t.
16901 * src/gram.c (dummy, rline): Remove, unused.
16903 2001-12-05 Akim Demaille <akim@epita.fr>
16905 * src/output.c (pack_vector): Use assert, not berror.
16906 * src/main.c (berror): Remove, unused.
16908 2001-12-05 Akim Demaille <akim@epita.fr>
16910 New experimental feature: if --verbose --trace output all the
16911 items of a state, not only its kernel.
16913 * src/print.c (print_core): If `trace_flag', then invoke closure
16914 before outputting the items of the state (print_core is no longer
16915 a correct name them).
16916 (print_results): Invoke new_closure/free_closure if needed.
16918 2001-12-05 Akim Demaille <akim@epita.fr>
16920 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16921 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16922 (nitemset): for consistency with the rest of the project.
16924 2001-12-05 Akim Demaille <akim@epita.fr>
16926 * src/closure.c (print_closure): Improve.
16927 (closure): Use it for printing input and output.
16929 2001-12-05 Akim Demaille <akim@epita.fr>
16931 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16932 indexed by nonterminals.
16934 2001-12-05 Akim Demaille <akim@epita.fr>
16936 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16938 * src/warshall.h: Remove accidental duplication of the content.
16940 2001-12-05 Akim Demaille <akim@epita.fr>
16942 * src/closure.c (set_fderives): De-obfuscate.
16944 2001-12-05 Akim Demaille <akim@epita.fr>
16946 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16948 2001-12-05 Akim Demaille <akim@epita.fr>
16950 * src/closure.c (set_firsts): De-obfuscate.
16952 2001-12-05 Akim Demaille <akim@epita.fr>
16954 * src/output.c (action_row): De-obfuscate
16955 using the good o' techniques: arrays not pointers, variable
16956 locality, BITISSET, RESETBIT etc.
16958 2001-12-05 Akim Demaille <akim@epita.fr>
16960 Pessimize the code to simplify it: from now on, all the states
16961 have a valid SHIFTS, which NSHIFTS is possibly 0.
16963 * src/LR0.c (shifts_new): Be global and move to..
16964 * src/state.c, src/state.h: here.
16965 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16966 * src/print_graph: Adjust.
16968 2001-12-05 Akim Demaille <akim@epita.fr>
16970 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16971 * src/conflicts.c: Use it.
16972 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16973 incorrectly ``simplified''.
16975 2001-12-05 Akim Demaille <akim@epita.fr>
16977 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16978 using the good o' techniques: arrays not pointers, variable
16979 locality, BITISSET, RESETBIT etc.
16981 2001-12-05 Akim Demaille <akim@epita.fr>
16983 * src/state.h (SHIFT_SYMBOL): New.
16984 * src/conflicts.c: Use it to deobfuscate.
16986 2001-12-05 Akim Demaille <akim@epita.fr>
16988 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16989 (print_reductions): De-obfuscate using the good o' techniques:
16990 arrays not pointers, variable locality, BITISSET.
16992 2001-12-05 Akim Demaille <akim@epita.fr>
16994 * src/conflicts.c (print_reductions): Arrays, not pointers.
16997 2001-12-05 Akim Demaille <akim@epita.fr>
16999 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17001 2001-12-05 Akim Demaille <akim@epita.fr>
17003 * src/conflicts.c (print_reductions): Improve variable locality.
17005 2001-12-05 Akim Demaille <akim@epita.fr>
17007 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17009 2001-12-05 Akim Demaille <akim@epita.fr>
17011 * src/conflicts.c (print_reductions): Improve variable locality.
17013 2001-12-05 Akim Demaille <akim@epita.fr>
17015 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
17016 * src/lalr.c: Use them.
17018 2001-12-05 Akim Demaille <akim@epita.fr>
17020 * src/LR0.c (augment_automaton): Formatting changes.
17021 Better variable locality.
17023 2001-12-05 Akim Demaille <akim@epita.fr>
17025 * src/lalr.c (matrix_print): New.
17026 (transpose): Use it.
17027 Use arrays instead of pointers.
17029 2001-12-05 Akim Demaille <akim@epita.fr>
17031 * src/lalr.c (maxrhs): Move to...
17032 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
17033 * src/lalr.c (build_relations): Adjust.
17035 2001-12-05 Akim Demaille <akim@epita.fr>
17037 * src/lalr.c (transpose): Free the memory allocated to the
17038 argument, as it is replaced by the results by the unique caller.
17039 (build_relations): Merely invoke transpose: it handles the memory
17041 Improve variable locality.
17042 Avoid variables used as mere abbreviations.
17043 (compute_lookaheads): Use arrays instead of pointers.
17045 2001-12-05 Akim Demaille <akim@epita.fr>
17047 * src/lalr.c (initialize_F): Improve variable locality.
17048 Avoid variables used as mere abbreviations.
17050 2001-12-05 Akim Demaille <akim@epita.fr>
17052 * src/derives.c (print_derives): Display the ruleno.
17053 * src/lalr.c (initialize_F, transpose): Better variable locality
17054 to improve readability.
17055 Avoid variables used as mere abbreviations.
17057 2001-12-05 Akim Demaille <akim@epita.fr>
17059 * src/lalr.c (traverse): Use arrays instead of pointers.
17061 2001-12-05 Akim Demaille <akim@epita.fr>
17063 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
17064 the handling of squeue.
17065 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17067 2001-12-05 Akim Demaille <akim@epita.fr>
17069 Because useless nonterminals are now kept alive (instead of being
17070 `destroyed'), we now sometimes examine them, and store information
17071 related to them. Hence we need to know their number, and adjust
17072 memory allocations.
17074 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
17076 * src/LR0.c (allocate_itemsets): The memory allocated to
17077 `symbol_count' was used for two different purpose: once to count
17078 the number of occurrences of each symbol, and later reassigned to
17079 `shift_symbol', containing the symbol that can be shifted from a
17081 Deobfuscate, i.e., allocate, use and free `symbol_count' here
17083 (new_itemsets): Allocate `shift_symbol' here.
17084 (allocate_itemsets): symbol_count includes useless nonterminals.
17085 Make room for them.
17086 (free_storage): Use `free', not `XFREE', for pointers that cannot
17089 2001-12-05 Akim Demaille <akim@epita.fr>
17091 * src/nullable.c (set_nullable): Deobfuscate the handling of
17093 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17095 2001-12-05 Akim Demaille <akim@epita.fr>
17097 * src/gram.c, src/gram.h (ritem_print): New.
17098 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
17099 (This useless function was defined only to work around VMS linkers
17100 that can't handle compilation units with variables only).
17101 * src/reduce.c (dump_grammar): Use it to trace the construction of
17104 2001-12-04 Paul Eggert <eggert@twinsun.com>
17106 * src/bison.simple (union yyalloc): Change member names
17107 to be the same as the stack names.
17108 (yyparse): yyptr is now union yyalloc *, not char *.
17109 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
17110 and may generate better code on some machines.
17111 (yystpcpy): Use prototype if __STDC__ is defined, not just
17112 if __cplusplus is defined.
17114 2001-11-30 Akim Demaille <akim@epita.fr>
17116 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
17117 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
17118 Gettext doesn't compile cleanly, and dies with -Werror.
17119 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
17120 Include WARNING_CFLAGS here.
17121 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
17122 before being defined.
17124 2001-11-27 Paul Eggert <eggert@twinsun.com>
17126 * lib/quotearg.h (quotearg_n, quotearg_n_style):
17127 First arg is int, not unsigned.
17128 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
17129 (SIZE_MAX, UINT_MAX): New macros.
17130 (quotearg_n_options): Abort if N is negative.
17131 Avoid overflow check on hosts where size_t is 64 bits and int
17132 is 32 bits, as overflow is impossible there.
17133 Fix off-by-one typo that caused unnecessary reallocation.
17135 2001-11-29 Paul Eggert <eggert@twinsun.com>
17137 Name space cleanup in generated parser.
17139 * doc/bison.texinfo (Bison Parser): Discuss system headers
17140 and their effect on the user name space.
17142 * src/bison.simple:
17143 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
17144 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
17145 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
17147 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
17148 on user names when possible.
17150 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
17151 Simplify test for whather <alloca.h> exists.
17153 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
17155 (<stdio.h>): Include if YYDEBUG.
17157 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
17158 ! defined (yyoverflow) && ! defined (yymemcpy).
17160 (yymemcpy, yyparse): Rename local variables as needed so that
17161 they all begin with 'yy'.
17163 (yystrlen, yystpcpy): New functions.
17165 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
17168 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
17169 instead of relying on string.h functions. Use YYSTACK_ALLOC
17170 and YYSTACK_FREE instead of malloc and free.
17172 2001-11-30 Akim Demaille <akim@epita.fr>
17174 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
17175 before their first uses.
17176 (YYBISON, YYPURE): Move to the top of the output.
17178 2001-11-30 Akim Demaille <akim@epita.fr>
17180 * tests/reduce.at (Useless Nonterminals): Fix.
17182 2001-11-30 Akim Demaille <akim@epita.fr>
17184 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
17185 if body instead of `;' to pacify GCC's warnings.
17187 2001-11-30 Akim Demaille <akim@epita.fr>
17189 Instead of mapping the LHS of unused rules to -1, keep the LHS
17190 valid, but flag the rules as invalid.
17192 * src/gram.h (rule_t): `useful' is a new member.
17193 * src/print.c (print_grammar): Adjust.
17194 * src/derives.c (set_derives): Likewise.
17195 * src/reader.c (packgram, reduce_output): Likewise.
17196 * src/reduce.c (reduce_grammar_tables): Likewise.
17197 * tests/reduce.at (Underivable Rules, Useless Rules): New.
17199 2001-11-30 Akim Demaille <akim@epita.fr>
17201 * src/reduce.c (reduce_output): Formatting changes.
17202 * src/print.c (print_results, print_grammar): Likewise.
17203 * tests/regression.at (Rule Line Numbers)
17204 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
17206 2001-11-30 Akim Demaille <akim@epita.fr>
17208 * src/reduce.c (nonterminals_reduce): Instead of throwing away
17209 useless nonterminals, move them at the end of the symbol arrays.
17210 (reduce_output): Adjust.
17211 * tests/reduce.at (Useless Nonterminals): Adjust.
17213 2001-11-30 Akim Demaille <akim@epita.fr>
17215 * src/reduce.c: Various comment/formatting changes.
17216 (nonterminals_reduce): New, extracted from...
17217 (reduce_grammar_tables): here.
17218 (reduce_grammar): Call nonterminals_reduce.
17220 2001-11-29 Paul Eggert <eggert@twinsun.com>
17222 * src/bison.simple (YYSTACK_REALLOC): Remove.
17223 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
17224 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
17226 (union yyalloc): New type.
17227 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
17228 an arbitrary restriction on hosts where size_t is wider than int.
17230 (yyparse): Don't dump core if alloca or malloc fails; instead, report
17231 a parser stack overflow. Allocate just one block of memory for all
17232 three stacks, instead of allocating three blocks; this typically is
17233 faster and reduces fragmentation.
17235 Do not limit the number of items in the stack to a value that fits
17236 in 'int', as this is an arbitrary limit on hosts with 64-bit
17237 size_t and 32-bit int.
17239 2001-11-29 Marc Autret <autret_m@epita.fr>
17241 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
17242 of defining YYERROR_VERBOSE.
17243 [AT_DATA]: $4 is now out of C declarations in the prologue.
17245 2001-11-28 Marc Autret <autret_m@epita.fr>
17247 * src/reader.c (parse_dquoted_param): New.
17248 (parse_skel_decl): Use it.
17249 * src/lex.h: Add its prototype.
17250 * src/lex.c (literalchar): Become not static.
17252 2001-11-28 Marc Autret <autret_m@epita.fr>
17254 * src/output.h: And put its extern declaration here.
17255 * src/output.c (error_verbose): Define here.
17256 (prepare): Echo name modification.
17257 * src/getargs.h: Clean its extern declaration.
17258 * src/getargs.c (error_verbose_flag): Remove.
17259 (getargs): Remove case 'e'.
17260 * src/options.c (option_table): 'error-verbose' is now seen as simple
17264 * src/reader.c (read_declarations): Remove case tok_include.
17265 (parse_include_decl): Remove.
17266 * src/lex.h (token_t): Remove tok_include.
17267 * src/options.c (option_table): 'include' is now a simple command line
17270 2001-11-28 Marc Autret <autret_m@epita.fr>
17272 * src/bison.simple: Adjust muscle names.
17273 * src/muscle_tab.c (muscle_init): Also rename the muscles.
17274 * src/output.c (prepare): s/_/-/ for the muscles names.
17275 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
17277 2001-11-28 Marc Autret <autret_m@epita.fr>
17279 * src/bison.simple: Fix debug.
17280 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
17282 2001-11-28 Akim Demaille <akim@epita.fr>
17284 * src/LR0.c (shifts_new): New.
17285 (save_shifts, insert_start_shift, augment_automaton): Use it.
17287 2001-11-28 Akim Demaille <akim@epita.fr>
17289 * src/closure.c (closure): `b' and `ruleno' denote the same value:
17292 2001-11-28 Akim Demaille <akim@epita.fr>
17294 * src/closure.c (closure): Instead of looping over word in array
17295 then bits in words, loop over bits in array.
17297 2001-11-28 Akim Demaille <akim@epita.fr>
17299 * src/closure.c (closure): No longer optimize the special case
17300 where all the bits of `ruleset[r]' are set to 0, to make the code
17303 2001-11-28 Akim Demaille <akim@epita.fr>
17305 * src/closure.c (closure): `r' and `c' are new variables, used to
17306 de-obfuscate accesses to RULESET and CORE.
17308 2001-11-28 Akim Demaille <akim@epita.fr>
17310 * src/reduce.c (reduce_print): Use ngettext.
17311 (dump_grammar): Improve the trace accuracy.
17313 2001-11-28 Akim Demaille <akim@epita.fr>
17315 * src/reduce.c (dump_grammar): Don't translate trace messages.
17317 2001-11-28 Akim Demaille <akim@epita.fr>
17319 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
17320 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
17321 as all tags are free'ed afterwards.
17322 From Enrico Scholz.
17324 2001-11-27 Paul Eggert <eggert@twinsun.com>
17326 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
17327 use alloca when we didn't want to, and vice versa.
17329 2001-11-27 Marc Autret <autret_m@epita.fr>
17331 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
17333 * src/output.c (prepare): Remove its update.
17335 2001-11-27 Marc Autret <autret_m@epita.fr>
17337 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
17338 Use %error-verbose.
17340 2001-11-27 Marc Autret <autret_m@epita.fr>
17342 * src/bison.simple: Remove YYERROR_VERBOSE using.
17343 Use %%error_verbose.
17344 (yyparse): Likewise.
17345 * src/output.c (prepare): Give its final value.
17346 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
17347 * src/getargs.h: Add its extern declaration.
17348 * src/getargs.c (error_verbose_flag): New int.
17349 (getargs): Update to catch new case.
17350 * src/options.c (option_table): 'error-verbose' is a new option.
17351 (shortopts): Update.
17353 2001-11-27 Akim Demaille <akim@epita.fr>
17355 * src/system.h: Use intl/libgettext.h.
17356 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
17358 2001-11-27 Akim Demaille <akim@epita.fr>
17360 * tests/torture.at (Exploding the Stack Size with Malloc):
17361 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
17363 2001-11-27 Akim Demaille <akim@epita.fr>
17365 * src/files.c: Include error.h.
17366 Reported by Hans Aberg.
17368 2001-11-26 Marc Autret <autret_m@epita.fr>
17370 * src/reader.c (parse_include_decl): New, not yet implemented.
17371 (read_declarations): Add case tok_include.
17372 * src/getargs.h (include): Add its extern definition.
17373 * src/getargs.c (include): New const char *.
17374 (getargs): Add case '-I'.
17375 * src/options.c (option_table): Add include as command line and
17377 * src/lex.h (token_t): Add tok_include.
17379 2001-11-26 Akim Demaille <akim@epita.fr>
17381 * src/reader.c (readgram): Make sure rules for mid-rule actions
17382 have a lineno equal to that of their host rule.
17383 Reported by Hans Aberg.
17384 * tests/regression.at (Rule Line Numbers): New.
17386 2001-11-26 Akim Demaille <akim@epita.fr>
17388 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
17391 2001-11-26 Akim Demaille <akim@epita.fr>
17393 * src/complain.c, src/complain.h (error): Remove, provided by
17396 2001-11-26 Akim Demaille <akim@epita.fr>
17398 * src/reader.c (read_declarations): Don't abort on tok_illegal,
17399 issue an error message.
17400 * tests/regression.at (Invalid %directive): New.
17401 Reported by Hans Aberg.
17403 2001-11-26 Akim Demaille <akim@epita.fr>
17405 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
17406 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17408 2001-11-26 Akim Demaille <akim@epita.fr>
17410 * src/conflicts.c (conflicts_print): Don't complain at all when
17411 there are no reduce/reduce conflicts, and as many shift/reduce
17412 conflicts as expected.
17413 * tests/regression.at (%expect right): Adjust.
17415 2001-11-23 Akim Demaille <akim@epita.fr>
17417 * lib/alloca.c: Update, from fileutils.
17419 2001-11-23 Akim Demaille <akim@epita.fr>
17421 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
17423 2001-11-23 Akim Demaille <akim@epita.fr>
17425 * src/system.h: Include alloca.h.
17426 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
17428 2001-11-23 Akim Demaille <akim@epita.fr>
17430 * src/print_graph.c (print_actions): Remove `rule', unused.
17431 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
17432 pacify GCC's signed < unsigned warnings.
17433 * src/closure.c (itemsetsize): Likewise.
17434 * src/reader.c (symbol_list_new): Static.
17436 2001-11-23 Akim Demaille <akim@epita.fr>
17438 Attaching lineno to buckets is stupid, since only one copy of each
17439 symbol is kept, only the line of the first occurrence is kept too.
17441 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
17442 * src/reader.c (rline_allocated): Remove, unused.
17443 (symbol_list): Have a `line' member.
17444 (symbol_list_new): New.
17445 (readgram): Use it.
17446 * src/print.c (print_grammar): Output the rule line numbers.
17447 * tests/regression.at (Solved SR Conflicts)
17448 (Unresolved SR Conflicts): Adjust.
17449 Reported by Hans Aberg.
17451 2001-11-22 Marc Autret <autret_m@epita.fr>
17453 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
17455 2001-11-22 Marc Autret <autret_m@epita.fr>
17457 * src/muscle_tab.c (muscle_init): Remove initialization of
17459 * src/output.c (output_master_parser): Do it here.
17461 2001-11-20 Akim Demaille <akim@epita.fr>
17464 * configure.in (ALL_LINGUAS): Adjust.
17465 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
17466 longer contains strings to translate.
17468 2001-11-19 Akim Demaille <akim@epita.fr>
17470 * src/conflicts.c (conflicts_print): Add a missing \n.
17472 2001-11-19 Akim Demaille <akim@epita.fr>
17474 * src/nullable.c (nullable_print): New.
17475 (set_nullable): Call it when tracing.
17476 Better locality of variables.
17478 2001-11-19 Akim Demaille <akim@epita.fr>
17480 * src/print.c (print_actions): Better locality of variables.
17482 2001-11-19 Akim Demaille <akim@epita.fr>
17484 * src/derives.c (print_derives): Fix and enrich.
17485 * src/closure.c (print_fderives): Likewise.
17487 2001-11-19 Akim Demaille <akim@epita.fr>
17489 * src/closure.c (itemsetend): Remove, replaced with...
17490 (itemsetsize): new.
17492 2001-11-19 Akim Demaille <akim@epita.fr>
17494 * src/LR0.c (kernel_end): Remove, replaced with...
17495 (kernel_size): new.
17497 2001-11-19 Akim Demaille <akim@epita.fr>
17499 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
17502 2001-11-19 Akim Demaille <akim@epita.fr>
17504 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17506 2001-11-19 Akim Demaille <akim@epita.fr>
17508 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17510 * src/LR0.c: Likewise.
17511 (allocate_itemsets): Use arrays instead of pointers to clarify.
17513 2001-11-19 Akim Demaille <akim@epita.fr>
17515 * src/getargs.c (statistics_flag): Replace with...
17517 (longopts): Accept --trace instead of --statistics.
17518 * src/getargs.h, src/options.c: Adjust.
17519 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17520 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17522 2001-11-19 Akim Demaille <akim@epita.fr>
17524 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
17525 pointers to clarify the code.
17526 (save_reductions, save_shifts): Factor common parts of alternatives.
17528 2001-11-19 Akim Demaille <akim@epita.fr>
17530 * src/LR0.c (new_state, get_state): Complete TRACE code.
17531 * src/closure.c: Include `reader.h' to get `tags', needed by the
17533 Rename the conditional DEBUG as TRACE.
17534 Output consistently TRACEs to stderr, not stdout.
17535 * src/derives.c: Likewise.
17536 * src/reduce.c: (inaccessable_symbols): Using if is better style
17538 Use `#if TRACE' instead of `#if 0' for tracing code.
17540 2001-11-19 Akim Demaille <akim@epita.fr>
17542 * src/system.h (LIST_FREE, shortcpy): New.
17543 * src/LR0.c: Use them.
17544 * src/output.c (free_itemsets, free_reductions, free_shifts):
17545 Remove, replaced by LIST_FREE.
17547 2001-11-19 Akim Demaille <akim@epita.fr>
17549 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17550 (REDUCTIONS_ALLOC): New.
17551 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17554 2001-11-19 Akim Demaille <akim@epita.fr>
17556 * src/LR0.c (new_state): Complete trace code.
17557 * src/nullable.c (set_nullable): Don't translate traces.
17559 2001-11-19 Akim Demaille <akim@epita.fr>
17561 * src/print_graph.c (print_core): Better locality of variables.
17562 * src/print.c (print_core): Likewise.
17564 2001-11-19 Akim Demaille <akim@epita.fr>
17566 * src/vcg.c: You do the output, so you are responsible of the
17567 handling of VCG syntax, in particular: use quotearg.
17568 * src/print_graph.c: Don't.
17569 (print_actions): Don't output the actions as part of the nodes,
17570 since that's the job of the edges.
17571 (print_state): Don't output by hand: fill the node description,
17572 and ask for its output.
17574 2001-11-19 Akim Demaille <akim@epita.fr>
17576 * src/bison.simple (yyparse): When verbosely reporting an error,
17577 no longer put additional quotes around token names.
17578 * tests/calc.at: Adjust.
17580 2001-11-19 Akim Demaille <akim@epita.fr>
17582 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17583 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17584 * src/output.c: Adjust.
17586 2001-11-19 Akim Demaille <akim@epita.fr>
17588 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17590 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17592 2001-11-19 Akim Demaille <akim@epita.fr>
17594 * src/gram.h (rule_t): New.
17596 (rrhs, rlhs): Remove, part of state_t.
17597 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17598 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17599 * src/reader.c, src/reduce.c: Adjust.
17601 2001-11-19 Akim Demaille <akim@epita.fr>
17603 * src/reader.c (symbols_output): New, extracted from...
17604 (packsymbols): Here.
17607 2001-11-19 Akim Demaille <akim@epita.fr>
17609 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17610 (maxrhs): this new function.
17612 2001-11-19 Akim Demaille <akim@epita.fr>
17614 * src/lalr.c (F): New macro to access the variable F.
17617 2001-11-19 Akim Demaille <akim@epita.fr>
17619 * src/lalr.h (LA): New macro to access the variable LA.
17620 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17621 * src/lalr.c: Adjust.
17623 2001-11-19 Akim Demaille <akim@epita.fr>
17625 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17626 (set_state_table): handle the `lookaheads' members.
17628 2001-11-19 Akim Demaille <akim@epita.fr>
17630 * src/lalr.h (lookaheads): Removed array, whose contents is now
17632 (state_t): this structure.
17633 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17636 2001-11-19 Akim Demaille <akim@epita.fr>
17638 * src/lalr.h (consistent): Removed array, whose contents is now
17640 (state_t): this structure.
17641 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17644 2001-11-19 Akim Demaille <akim@epita.fr>
17646 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17647 contents are now members of...
17648 (state_t): this structure.
17649 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17652 2001-11-19 Akim Demaille <akim@epita.fr>
17654 * src/lalr.h (state_t): New.
17655 (state_table): Be a state_t * instead of a core **.
17656 (accessing_symbol): Remove, part of state_t.
17657 * src/lalr.c: Adjust.
17658 (set_accessing_symbol): Merge into...
17659 (set_state_table): this.
17660 * src/print_graph.c, src/conflicts.c: Adjust.
17662 2001-11-14 Akim Demaille <akim@epita.fr>
17664 * tests/calc.at, tests/output.at, tests/regression.at,
17665 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17666 now the tests are run in private dirs, therefore AC_CLEANUP and
17667 family can be simplified to 0-ary.
17668 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17669 use abs. path to find config.h.
17670 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17671 stderr, there can be way too much random noise.
17672 Instead pass -Werror to GCC and rely on the exit status.
17673 Reported by Wolfram Wagner.
17675 2001-11-14 Akim Demaille <akim@epita.fr>
17677 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17678 defined only if yyoverflow is defined, to avoid `warning: unused
17680 Reported by The Test Suite.
17682 2001-11-14 Akim Demaille <akim@epita.fr>
17684 * src/print.c: Include reduce.h.
17685 Reported by Hans Aberg.
17687 2001-11-14 Akim Demaille <akim@epita.fr>
17689 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17690 Revert a previous patch: these are really const.
17691 * src/conflicts.c (conflict_report): Additional useless pair of
17692 braces to pacify GCC's warnings for `if () if () {} else {}'.
17693 * src/lex.c (parse_percent_token): Replace equal_offset with
17696 Be sure to strdup `arg' when used, since there is no reason for
17697 token_buffer not to change.
17699 2001-11-14 Akim Demaille <akim@epita.fr>
17701 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17703 * src/main.c (main): Use them.
17704 Suggested by Hans Aberg.
17706 2001-11-12 Akim Demaille <akim@epita.fr>
17708 * src/system.h (ngettext): Now that we use ngettext, be sure to
17709 provide a default definition when NLS are not used.
17711 2001-11-12 Akim Demaille <akim@epita.fr>
17713 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17714 Use @kbd to denote user input.
17715 (Language and Grammar): ANSIfy the example.
17716 Adjust its layout for info/notinfo.
17717 (Location Tracking Calc): Output error messages to stderr.
17718 Output locations in a more GNUtically correct way.
17719 Fix a couple of Englishos.
17720 Adjust @group/@end group pairs.
17722 2001-11-12 Akim Demaille <akim@epita.fr>
17724 %expect was not functioning at all.
17726 * src/conflicts.c (expected_conflicts): Set to -1.
17727 (conflict_report): Use ngettext.
17728 (conflicts_print): Check %expect and make its violation an error.
17729 * doc/bison.texinfo (Expect Decl): Adjust.
17730 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17731 * tests/regression.at (%expect not enough, %expect right)
17732 (%expect too much): New.
17734 2001-11-12 Akim Demaille <akim@epita.fr>
17736 * tests/regression.at (Conflicts): Rename as...
17737 (Unresolved SR Conflicts): this.
17738 (Solved SR Conflicts): New.
17740 2001-11-12 Akim Demaille <akim@epita.fr>
17742 * src/reduce.c (print_results): Rename as...
17743 (reduce_output): This.
17744 Output to OUT, passed as argument, instead of output_obstack.
17745 (dump_grammar): Likewise.
17746 (reduce_free): New.
17748 (reduce_grammar): No longer call reduce_output, since...
17749 * src/print.c (print_results): do it.
17750 * src/main.c (main): Call reduce_free;
17752 2001-11-12 Akim Demaille <akim@epita.fr>
17754 * src/conflicts.c (print_reductions): Accept OUT as argument.
17755 Output to it, not to output_obstack.
17756 * src/print.c (print_actions): Adjust.
17758 2001-11-12 Akim Demaille <akim@epita.fr>
17760 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17761 the result instead of using...
17762 (src_total, rrc_total, src_count, rrc_count): Remove.
17763 (any_conflicts): Remove.
17764 (print_conflicts): Split into...
17765 (conflicts_print, conflicts_output): New.
17766 * src/conflicts.h: Adjust.
17767 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17768 * src/print.c (print_grammar): Issue `\n' between two rules.
17769 * tests/regression.at (Conflicts): New.
17770 Reported by Tom Lane.
17772 2001-11-12 Akim Demaille <akim@epita.fr>
17774 * tests/regression.at (Invalid input): Remove, duplicate with
17775 ``Invalid input: 1''.
17777 2001-11-12 Akim Demaille <akim@epita.fr>
17779 * tests/torture.at (AT_DATA_STACK_TORTURE)
17780 (Exploding the Stack Size with Alloca)
17781 (Exploding the Stack Size with Malloc): New.
17783 2001-11-12 Akim Demaille <akim@epita.fr>
17785 * src/bison.simple (YYSTACK_REALLOC): New.
17786 (yyparse) [!yyoverflow]: Use it and free the old stack.
17787 Reported by Per Allansson.
17789 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
17791 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17792 define CPP macro, which substitute YYSTYPE by yystype.
17793 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17794 with yyltype/YYLTYPE. This allows inclusion of the generated
17795 header within the parser if the compiler, such as GGC, accepts
17796 multiple equivalent #defines.
17799 2001-11-05 Akim Demaille <akim@epita.fr>
17801 * src/reader.c (symbols_output): New, extracted from...
17802 (packsymbols): here.
17805 2001-11-05 Akim Demaille <akim@epita.fr>
17807 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17809 2001-11-05 Akim Demaille <akim@epita.fr>
17811 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17814 2001-11-05 Akim Demaille <akim@epita.fr>
17816 * src/options.h (struct option_table_struct): set_flags is void*.
17817 * src/options.c (longopts): Support `--output' and `%output'.
17819 * src/lex.h (tok_setopt): Remove, replaced with...
17820 (tok_intopt, tok_stropt): these new guys.
17821 * src/lex.c (getopt.h): Not needed.
17822 (token_buffer, unlexed_token_buffer): Not const.
17823 (percent_table): Promote `-' over `_' in directive names.
17824 Active `%name-prefix', `file-prefix', and `output'.
17825 (parse_percent_token): Accept possible arguments to directives.
17826 Promote `-' over `_' in directive names.
17828 2001-11-04 Akim Demaille <akim@epita.fr>
17830 * doc/bison.texinfo (Decl Summary): Split the list into
17831 `directives for grammars' and `directives for bison'.
17833 Add description of `%name-prefix', `file-prefix', and `output'.
17834 Promote `-' over `_' in directive names.
17835 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17836 Simplify the description of `--name-prefix'.
17837 Promote `-' over `_' in directive names.
17838 Promote `--output' over `--output-file'.
17839 Fix the description of `--defines'.
17840 * tests/output.at: Exercise %file-prefix and %output.
17842 2001-11-02 Akim Demaille <akim@epita.fr>
17844 * doc/refcard.tex: Update.
17846 2001-11-02 Akim Demaille <akim@epita.fr>
17848 * src/symtab.h (SUNDEF): New.
17849 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17850 stand for `uninitialized', instead of 0.
17851 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17852 * src/lex.c (lex): Adjust.
17854 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17856 Let yylex return it instead of a plain 0.
17857 Reported by Dick Streefland.
17859 2001-11-02 Akim Demaille <akim@epita.fr>
17861 * tests/regression.at (Mixing %token styles): New test.
17863 2001-11-02 Akim Demaille <akim@epita.fr>
17865 * src/reader.c (parse_thong_decl): Formatting changes.
17866 (token_translations_init): New, extracted from...
17867 (packsymbols): Here.
17870 2001-11-01 Akim Demaille <akim@epita.fr>
17872 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17873 Check that `9foo.y' produces correct cpp guards.
17874 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17878 2001-11-01 Akim Demaille <akim@epita.fr>
17880 * tests/regression.at (Invalid input: 2): New.
17881 * src/lex.c (unlexed_token_buffer): New.
17882 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17886 2001-11-01 Akim Demaille <akim@epita.fr>
17888 * tests/calc.at: Catch up with 1.30.
17889 * configure.in: Bump to 1.49a.
17890 Adjust to newer Autotest.
17892 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
17894 * src/conflicts.c: Move global variables rrc_total and src_total ...
17895 (print_conflicts): here.
17896 * src/output.c (output): Free global variable user_toknums.
17897 * src/lex.c (token_obstack): Become static.
17899 2001-10-18 Akim Demaille <akim@epita.fr>
17901 * tests/atlocal.in (GCC): Add.
17902 * tests/calc.at: s/m4_match/m4_bmatch/.
17903 s/m4_patsubst/m4_bpatsubst/.
17904 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17905 * configure.in: AC_SUBST(GCC).
17907 2001-10-14 Marc Autret <autret_m@epita.fr>
17909 * src/options.c (create_long_option_table): Fix.
17911 2001-10-10 Akim Demaille <akim@epita.fr>
17913 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17915 2001-10-04 Akim Demaille <akim@epita.fr>
17917 * src/reader.c (parse_union_decl): Push the caracters in
17918 union_obstack, not attrs_obstack.
17920 2001-10-04 Akim Demaille <akim@epita.fr>
17922 Merge in the branch 1.29.
17924 * src/reader.c (packsymbols): Use a temporary obstack for
17925 `%%tokendef', since output_stack is already used elsewhere.
17927 2001-10-02 Akim Demaille <akim@epita.fr>
17931 2001-10-02 Akim Demaille <akim@epita.fr>
17935 2001-10-02 Akim Demaille <akim@epita.fr>
17937 * tests/regression.at (Invalid CPP headers): New.
17938 From Alexander Belopolsky.
17939 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17941 2001-10-02 Akim Demaille <akim@epita.fr>
17943 * tests/regression.at (Invalid input): New.
17944 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17947 2001-10-02 Akim Demaille <akim@epita.fr>
17949 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17951 2001-10-02 Akim Demaille <akim@epita.fr>
17953 * src/output.c (output_parser): Assert `skeleton'.
17954 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17958 2001-10-01 Marc Autret <autret_m@epita.fr>
17960 * src/lex.h: Echo modifications.
17961 * src/lex.c (unlex): Parameter is now token_t.
17964 2001-10-01 Marc Autret <autret_m@epita.fr>
17966 * src/main.c: Include lex.h.
17969 2001-09-29 Akim Demaille <akim@epita.fr>
17971 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17973 2001-09-28 Akim Demaille <akim@epita.fr>
17975 * tests/testsuite.at: Update to newer Autotest.
17976 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17978 2001-09-27 Akim Demaille <akim@epita.fr>
17980 Position independent wrapper.
17982 * tests/bison: Remove.
17983 * tests/bison.in: New.
17984 * configure.in: Adjust.
17986 2001-09-27 Paul Eggert <eggert@twinsun.com>
17988 Port quotearg fixes from tar 1.13.24.
17990 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17992 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17993 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17995 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17996 * m4/mbrtowc.m4: New file.
17997 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17998 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
18000 2001-09-27 Akim Demaille <akim@epita.fr>
18004 2001-09-27 Akim Demaille <akim@epita.fr>
18008 2001-09-25 Akim Demaille <akim@epita.fr>
18010 * src/system.h: Include `xalloc.h'.
18011 Remove it from the C files.
18012 * src/files.c (output_files): Free the obstacks.
18013 * src/lex.c (init_lex): Rename as...
18016 * src/main.c (main): Use it.
18018 2001-09-24 Marc Autret <autret_m@epita.fr>
18020 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
18021 to output informations in fout (FILE*).
18022 (open_graph, close_graph): Likewise.
18023 (output_graph, output_edge, output_node): Likewise.
18024 * src/vcg.h: Update function prototypes.
18025 * src/print_graph.c (print_graph): Open output graph file.
18026 (print_actions): Adjust.
18027 * src/files.h: Remove extern declaration.
18028 * src/files.c: Remove graph_obstack declaration.
18029 (open_files): Remove graph_obstack initialization.
18030 (output_files): Remove graph_obstack saving.
18032 2001-09-24 Marc Autret <autret_m@epita.fr>
18034 * src/files.c (compute_output_file_names): Fix.
18036 2001-09-24 Marc Autret <autret_m@epita.fr>,
18037 Akim Demaille <akim@epita.fr>
18039 * src/reader.c (reader): Remove call to free_symtab ().
18040 * src/main.c (main): Call it here.
18042 * src/conflicts.c (initialize_conflicts): Rename as...
18043 (solve_conflicts): this.
18044 * src/print.c (print_core, print_actions, print_state)
18045 (print_grammar): Dump to a file instead a `output_obstack'.
18046 (print_results): Dump `output_obstack', and then proceed with the
18048 * src/files.c (compute_output_file_names, close_files): New.
18049 (output_files): Adjust.
18050 * src/main.c (main): Adjust.
18052 2001-09-23 Marc Autret <autret_m@epita.fr>
18054 * src/files.c (compute_header_macro): Computes header macro name
18055 from spec_defines_file when given.
18057 2001-09-23 Marc Autret <autret_m@epita.fr>
18059 * src/files.c (output_files): Add default extensions.
18061 2001-09-22 Akim Demaille <akim@epita.fr>
18063 * src/conflicts.c (finalize_conflicts): Rename as...
18064 (free_conflicts): this.
18066 2001-09-22 Akim Demaille <akim@epita.fr>
18068 * src/gram.c (gram_free): Rename back as...
18070 (output_token_translations): Free `token_translations'.
18071 * src/symtab.c (free_symtab): Free the tag field.
18073 2001-09-22 Akim Demaille <akim@epita.fr>
18075 Remove `translations' as it is always set to true.
18077 * src/gram.h: Adjust.
18078 * src/reader.c (packsymbols, parse_token_decl): Adjust
18079 * src/print.c (print_grammar): Adjust.
18080 * src/output.c (output_token_translations): Adjust.
18081 * src/lex.c (lex): Adjust.
18082 * src/gram.c: Be sure the set pointers to NULL.
18083 (dummy): Rename as...
18086 2001-09-22 Akim Demaille <akim@epita.fr>
18088 * configure.in: Invoke AM_LIB_DMALLOC.
18089 * src/system.h: Use dmalloc.
18090 * src/LR0.c: Be sure to have pointers initialized to NULL.
18091 (allocate_itemsets): Allocate kernel_items only if needed.
18093 2001-09-22 Akim Demaille <akim@epita.fr>
18095 * configure.in: Bump to 1.29b.
18096 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
18097 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
18098 need xmalloc.c in calc.y.
18101 2001-09-21 Akim Demaille <akim@epita.fr>
18104 * Makefile.maint, config/config.guess, config/config.sub,
18105 * config/missing: Update from masters.
18106 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
18108 * configure.in (ALL_LINGUAS): Add `tr'.
18110 2001-09-21 Akim Demaille <akim@epita.fr>
18112 * tests/Makefile.am (package.m4): Move to...
18113 ($(srcdir)/$(TESTSUITE)): here.
18115 2001-09-20 Akim Demaille <akim@epita.fr>
18117 * src/complain.c: No longer try to be standalone: use system.h.
18118 Don't assume __STDC__ is defined to 1. Just test if it is defined.
18119 * src/complain.h: Likewise.
18120 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
18121 Remove the unused variable `n'.
18122 From Albert Chin-A-Young.
18124 2001-09-18 Marc Autret <autret_m@epita.fr>
18126 * doc/bison.1: Update.
18127 * doc/bison.texinfo (Bison Options): Update --defines and --graph
18129 (Option Cross Key): Update.
18132 2001-09-18 Marc Autret <autret_m@epita.fr>
18134 * tests/regression.at: New test (comment in %union).
18136 2001-09-18 Marc Autret <autret_m@epita.fr>
18138 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
18140 Reported by Keith Browne.
18142 2001-09-18 Marc Autret <autret_m@epita.fr>
18144 * tests/output.at: Add tests for --defines and --graph.
18146 2001-09-18 Marc Autret <autret_m@epita.fr>
18148 * tests/output.at: Removes tests of %{header,src}_extension features.
18150 2001-09-18 Akim Demaille <akim@epita.fr>
18152 * tests/Makefile.am (package.m4): New.
18153 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
18154 (_AT_CHECK_CALC_ERROR): Likewise.
18155 Factor the `, ' part of verbose error messages.
18157 2001-09-18 Marc Autret <autret_m@epita.fr>
18159 * src/getargs.c (longopts): Declare --defines and --graph as options
18160 with optional arguments.
18161 * src/files.h: Add extern declarations.
18162 * src/files.c (spec_graph_file, spec_defines_file): New.
18163 (output_files): Update.
18164 Remove CPP-outed code.
18166 2001-09-18 Marc Autret <autret_m@epita.fr>
18168 Turn off %{source,header}_extension feature.
18170 * src/files.c (compute_exts_from_gf): Update.
18171 (compute_exts_from_src): Update.
18172 (output_files): CPP-out useless code.
18173 * src/files.h: Remove {header,source}_extension extern declarations.
18174 * src/reader.c (parse_dquoted_param): CPP-out.
18175 (parse_header_extension_decl): Remove.
18176 (parse_source_extension_decl): Remove.
18177 (read_declarations): Remove cases tok_{hdrext,srcext}.
18178 * src/lex.c (percent_table): Remove {header,source}_extension entries.
18179 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
18181 2001-09-10 Akim Demaille <akim@epita.fr>
18183 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
18184 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
18185 (AT_CHECK_OUTPUT): this.
18186 Merely check ls' exit status, its output is useless.
18188 2001-09-10 Akim Demaille <akim@epita.fr>
18190 * tests/calc.at: Use m4_match.
18191 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
18193 2001-09-10 Marc Autret <autret_m@epita.fr>,
18194 Akim Demaille <akim@epita.fr>
18196 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
18198 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
18200 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
18201 * src/lex.h: Adjust prototype.
18202 (token_t): Add `tok_undef'.
18203 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
18204 (parse_percent_token): Now returns token_t.
18205 Add default statement in switch.
18206 (lex): Separate `c' as an input variable, from the token_t result
18208 (unlexed): Is a token_t.
18210 2001-09-10 Akim Demaille <akim@epita.fr>
18212 * configure.in: Bump to 1.29a.
18214 2001-09-07 Akim Demaille <akim@epita.fr>
18218 2001-08-30 Akim Demaille <akim@epita.fr>
18220 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
18221 * m4/atconfig.m4: Remove.
18222 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
18223 * tests/bison: New.
18224 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
18225 m4_if, m4_patsubst, and m4_regexp.
18226 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
18227 `input' file instead of echo.
18229 2001-08-29 Akim Demaille <akim@epita.fr>
18233 2001-08-29 Akim Demaille <akim@epita.fr>
18237 2001-08-29 Paul Eggert <eggert@twinsun.com>
18239 * src/bison.simple (yyparse): Don't take the address of an
18240 item before the start of an array, as that doesn't conform to
18243 2001-08-29 Robert Anisko <anisko_r@epita.fr>
18245 * doc/bison.texinfo (Location Tracking Calc): New node.
18247 2001-08-29 Paul Eggert <eggert@twinsun.com>
18249 * src/output.c (output): Do not define const, as this now
18250 causes more problems than it cures.
18252 2001-08-29 Akim Demaille <akim@epita.fr>
18254 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
18256 Be sure to tag the `detailmenu'.
18258 2001-08-29 Akim Demaille <akim@epita.fr>
18260 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
18261 download in a tmp dir.
18263 2001-08-28 Marc Autret <autret_m@epita.fr>
18265 * config/depcomp: New file.
18267 2001-08-28 Marc Autret <autret_m@epita.fr>
18269 * doc/bison.1 (mandoc): Adjust.
18270 From Juan Manuel Guerrero.
18272 2001-08-28 Marc Autret <autret_m@epita.fr>
18274 * src/print_graph.c (print_state): Fix.
18276 2001-08-27 Marc Autret <autret_m@epita.fr>
18278 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
18280 Echo modifications to the functions prototypes.
18281 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
18283 2001-08-27 Marc Autret <autret_m@epita.fr>
18285 * src/vcg.c: Include `xalloc.h'.
18286 (add_colorentry): New.
18287 (add_classname): New.
18288 (add_infoname): New.
18289 * src/vcg.h: Add new prototypes.
18291 2001-08-27 Akim Demaille <akim@epita.fr>
18293 * Makefile.maint: Sync. again with CVS Autoconf.
18295 2001-08-27 Akim Demaille <akim@epita.fr>
18297 * Makefile.maint: Formatting changes.
18298 (po-update, cvs-update, update): New targets.
18301 2001-08-27 Akim Demaille <akim@epita.fr>
18303 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18304 * Makefile.maint: Sync. with CVS Autoconf.
18306 2001-08-27 Marc Autret <autret_m@epita.fr>
18308 * src/vcg.h (struct infoname_s): New.
18309 (struct colorentry_s): New.
18310 (graph_s): New fields {vertical,horizontal}_order in structure.
18311 Add `infoname' field.
18312 Add `colorentry' field;
18313 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
18314 (G_HORIZONTAL_ORDER): New.
18316 (G_COLORENTRY): New.
18317 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
18318 Add output of `infoname'.
18319 Add output of `colorentry'.
18321 2001-08-27 Marc Autret <autret_m@epita.fr>
18323 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
18324 This one shadowed a global parameter.
18326 2001-08-24 Marc Autret <autret_m@epita.fr>
18328 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
18329 instead of `unsigned'.
18330 (print_state): Do not call obstack_object_size () in obstack_grow ()
18331 to avoid macro variables shadowing.
18333 2001-08-23 Marc Autret <autret_m@epita.fr>
18335 * src/lex.c (percent_table): Typo: s/naem/name/.
18337 Normalize new options declarations.
18339 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
18341 * tests/suite.at: Exercise %header_extension and %source_extension.
18343 2001-08-16 Marc Autret <autret_m@epita.fr>
18345 * src/reader.c (parse_dquoted_param): New.
18346 (parse_header_extension_decl): Use it.
18347 (parse_source_extension_decl): Likewise.
18349 2001-08-16 Marc Autret <autret_m@epita.fr>
18351 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
18352 (get_xxxx_str): Use assert () instead of complain ().
18353 Remove return invokations in default cases.
18354 (get_decision_str): Modify default behaviour. Remove second argument.
18355 Echo modifications on calls.
18356 (output_graph): Fix.
18358 2001-08-16 Marc Autret <autret_m@epita.fr>
18360 * src/getargs.c (usage): Update with ``-g, --graph''.
18362 2001-08-16 Marc Autret <autret_m@epita.fr>
18364 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
18365 (Option Cross Key): Likewise.
18366 * doc/bison.1: Update.
18368 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
18370 * src/output.c (output_master_parser): Don't finish action_obstack.
18371 (output_parser): Don't care about the muscle action, here.
18372 (prepare): Copy the action_obstack in the action muscle.
18373 (output): Free action_obstack.
18375 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
18377 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
18378 will contain `%union' declaration.
18379 (parse_union_decl): Delete #line directive output.
18380 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
18381 informations about %union.
18382 (parse_union_decl): Copy the union_obstack in the muscle stype.
18383 * src/bison.simple: Add new #line directive.
18384 Add typdef %%stype YYSTYPE.
18386 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
18388 * src/bison.simple: Add new `#line' directive.
18390 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
18392 * src/bison.simple: New `#line' directive.
18393 * src/output.c (output_parser): Support new dynamic muscle input_line.
18395 2001-09-22 Marc Autret <autret_m@epita.fr>
18397 * src/output.c (output_master_parser): New.
18398 (output_parser): Be more re-entrant.
18400 2001-09-21 Marc Autret <autret_m@epita.fr>
18402 * src/reader.c (copy_definition, parse_union_decl): Update and use
18404 (copy_action): Likewise.
18405 Use obstack_1grow ().
18406 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
18408 2001-09-21 Marc Autret <autret_m@epita.fr>
18410 * src/options.c (option_table): Adjust.
18411 * src/lex.c (parse_percent_token): Fix.
18413 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
18415 * src/options.c (symtab.h): Include it, need by lex.h.
18417 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
18419 * src/lex.c (parse_percent_token): Change type of variable `tx', which
18420 is now an option_table_struct*.
18421 (option_strcmp): New function option_strcmp.
18422 (parse_percent_token): Call option_strcmp.
18423 * src/getargs.c (xalloc.h, options.h): Include it.
18424 (getargs): Call create_long_option_table.
18425 (getargs): Free longopts at the end of the function.
18426 (shortopts): Move in options.c.
18427 * src/options.c (create_long_option_table): New function. Convert
18428 information from option_table to option structure.
18429 * src/reader.c (options.h): Include it.
18431 * src/Makefile.am: Adjust.
18432 * src/options.c (option_table): Create from longopts and percent_table.
18433 * src/getargs.c (longopts): Delete.
18434 * src/lex.c (struct percent_table_struct): Delete.
18435 (percent_table): Delete.
18436 (options.h): Include it.
18437 * src/options.c: Create.
18438 * src/options.h: Create.
18439 Declare enum opt_access_e.
18440 Define struct option_table_struct.
18442 2001-09-20 Marc Autret <autret_m@epita.fr>
18444 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
18447 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
18449 * src/bison.simple: s/%%filename/%%skeleton.
18450 * src/muscle_tab.c (getargs.h): Include it.
18451 (muscle_init): Insert new muscle skeleton.
18453 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
18455 * src/output.c (output_parser): Delete unused variable actions_dumped.
18457 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
18459 * src/output.c (output): Delete call to reader_output_yylsp.
18460 * src/reader.c (reader): Likewise.
18461 * src/reader.h: Delete declaration of reader_output_yylsp.
18463 2001-09-02 Marc Autret <autret_m@epita.fr>
18465 * src/reader.c: Include muscle_tab.h.
18466 (parse_union_decl): Update.
18467 (parse_macro_decl): Rename parse_muscle_decl.
18468 Update to use renamed functions and variable.
18469 (read_declarations, copy_action, read_additionnal_code, : Updated
18470 with correct variables and functions names.
18471 (packsymbols, reader): Likewise.
18473 * src/reader.h (muscle_obstack): Extern declaration update.
18475 * src/output.c: Include muscle_tab.h
18476 In all functions using macro_insert, change by using muscle_insert ().
18477 (macro_obstack): Rename muscle_obstack.
18478 Echo modifications in the whole file.
18479 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
18480 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
18481 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
18483 * src/muscle_tab.h: Update double inclusion macros.
18484 (macro_entry_s): Rename muscle_entry_s.
18487 * src/muscle_tab.c: Include muscle_tab.h.
18488 Rename macro_tabble to muscle_table.
18489 (mhash1, mhash2, mcmp): Use muscle_entry.
18490 (macro_init): Rename muscle_init. Update.
18491 (macro_insert): Rename muscle_insert. Update.
18492 (macro_find): Rename muscle_find. Update.
18494 * src/main.c: Include muscle_tab.h.
18495 (main): Call muscle_init ().
18496 * src/Makefile.am (bison_SOURCES): Echo modifications.
18498 2001-09-02 Marc Autret <autret_m@epita.fr>
18500 Now the files macro_tab.[ch] are named muscle_tab.[ch].
18502 * src/muscle_tab.c, src/muscle_tab.h: Add files.
18504 2001-09-02 Marc Autret <autret_m@epita.fr>
18506 * src/macrotab.c, src/macrotab.h: Remove.
18508 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
18510 * src/reader.c (copy_guard): Use muscle to specify the `#line'
18513 2001-09-01 Marc Autret <autret_m@epita.fr>
18515 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18516 to an explicit value to activate the feature. We do it here.
18518 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18520 * src/output.c (prepare): Delete the `filename' muscule insertion.
18521 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18522 (parse_union_decl): Likewise.
18523 * src/macrotab.c (macro_init): Initialize filename by infile.
18525 2001-08-31 Marc Autret <autret_m@epita.fr>
18527 * src/bison.simple (YYLSP_NEEDED): New definition.
18528 * src/output.c (prepare): Add macro insertion of `locations_flag'
18530 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18532 * src/output.c (prepare): Delete insertion of previous muscles,
18533 and insert the `prefix' muscles.
18534 * src/macrotab.c (macro_init): Likewise.
18535 (macro_init): Initialization prefix directive by `yy'.
18536 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
18537 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18538 yylval, yydebug, yyerror, yynerrs and yyparse.
18539 New directive `#define' to substitute yydebug, ... with option
18542 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18544 * src/main.c (main): Standardize.
18545 * src/output.c (output_table_data, output_parser): Likewise.
18546 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18548 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18550 * src/reader.c (read_additionnal_code): Rename %%user_code to
18552 * src/output.c (output): Rename %%declarations to %%prologue.
18553 * src/bison.simple: Echo modifications.
18555 2001-08-31 Marc Autret <autret_m@epita.fr>
18557 * src/reader.c (readgram): CleanUp.
18558 (output_token_defines): Likewise.
18559 (packsymbols): Likewise.
18560 (reader): Likewise.
18561 * src/output.c (output): CPP-out useless code.
18563 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18565 * src/reader.c (reader): Delete obsolete call to function
18566 output_trailers and output_headers.
18567 * src/output.h: Remove obsolete functions prototypes of output_headers
18568 and output_trailers.
18570 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
18572 * src/main.c: Include macrotab.h.
18573 * src/macrotab.h (macro_entry_s): Constify fields.
18574 Adjust functions prototypes.
18575 * src/macrotab.c (macro_insert): Constify key and value.
18576 (macro_find): Constify key.
18577 (macro_insert): Include 'xalloc.h'
18578 (macro_insert): Use XMALLOC.
18579 (macro_find): Constify return value.
18580 * src/output.c (output_table_data): Rename table to table_data.
18581 (output_parser): Constify macro_key, macro_value.
18583 2001-08-30 Marc Autret <autret_m@epita.fr>
18585 * src/reader.c (parse_skel_decl): New.
18586 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18587 * src/lex.h (token_t): New token `tok_skel'.
18588 * src/lex.c (percent_table): Add skeleton option entry.
18591 2001-08-29 Marc Autret <autret_m@epita.fr>
18593 * src/bison.simple: Add %%user_code directive at the end.
18594 * src/reader.c (read_additionnal_code): New.
18596 * src/output.c (output_program): Remove.
18599 2001-08-28 Marc Autret <autret_m@epita.fr>
18601 * src/output.c (output_actions): Clean up.
18602 (output_gram): CPP-out useless code.
18603 * src/reader.c (reader): Clean up, CPP-out useless code.
18605 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
18607 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
18609 * src/bison.simple: Add `%%definitions'.
18611 2001-08-28 Marc Autret <autret_m@epita.fr>
18613 * config/depcomp: New file.
18615 2001-08-27 Paul Eggert <eggert@twinsun.com>
18617 * src/bison.simple (yyparse): Don't take the address of an
18618 item before the start of an array, as that doesn't conform to
18621 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18623 * src/output.c (output): Remove the initialization of the macro
18624 obstack. It was done too late here.
18626 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18628 (reader): Initialize the macro obstack here, since we need it to grow
18629 '%define' directives.
18631 * src/reader.h: Declare the macro obstack as extern.
18633 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18635 * src/output.c (output_parser): Fix. Store single '%' characters in
18636 the output obstack instead of throwing them away.
18638 2001-08-27 Akim Demaille <akim@epita.fr>
18640 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18642 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18644 * lib/Makefile.am: Adjust.
18646 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18648 * src/bison.simple: Update and add '%%' directives.
18650 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18652 * src/reader.c (reader): Remove calls to 'output_headers' and
18653 'output_trailers'. Remove some C output.
18654 (readgram): Disable a piece of code that was writing a default
18655 definition for 'YYSTYPE'.
18656 (reader_output_yylsp): Remove.
18657 (packsymbols): Output token defintions to a macro.
18658 (copy_definition): Disable C output.
18660 * src/reader.c (parse_macro_decl): New function used to parse macro
18662 (copy_string2): Put the body of copy_string into this new function.
18663 Add a parameter to let the caller choose whether he wants to copy the
18664 string delimiters or not.
18665 (copy_string): Be a simple call to copy_string2 with the last argument
18667 (read_declarations): Add case for macro definition.
18668 (copy_identifier): New.
18669 (parse_macro_decl): Read macro identifiers using copy_identifier
18672 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18674 * src/output.c (prepare): Add prefixed names.
18675 (output_parser): Output semantic actions.
18676 (output_parser): Fix bug on '%%line' directives.
18678 * src/output.c (output_headers): Remove. The C code printed by this
18679 function should now be in the skeletons.
18680 (output_trailers): Remove.
18681 (output): Disable call to 'reader_output_yylsp'.
18682 (output_rule_data): Do not output tables to the table obstack.
18684 * src/output.c: Remove some C dedicated output.
18685 Improve the use of macro and output obstacks.
18686 (output_defines): Remove.
18688 * src/output.c (output_token_translations): Associate 'translate'
18689 table with a macro. No output to the table obstack.
18690 (output_gram): Same for 'rhs' and 'prhs'.
18691 (output_stos): Same for 'stos'.
18692 (output_rule_data): Same for 'r1' and 'r2'.
18693 (token_actions): Same for 'defact'.
18694 (goto_actions): Same for 'defgoto'.
18695 (output_base): Same for 'pact' and 'pgoto'.
18696 (output_table): Same for 'table'.
18697 (output_check): Same for 'check'.
18699 * src/output.c (output_table_data): New function.
18700 (output_short_table): Remove.
18701 (output_short_or_char_table): Remove.
18703 * src/output.c (output_parser): Replace most of the skeleton copy code
18704 with something new. Skeletons are now processed character by character
18705 rather than line by line, and Bison looks for '%%' macros. This is the
18706 first step in making Bison's output process (a lot) more flexible.
18707 (output_parser): Use the macro table.
18709 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18711 * src/main.c (main): Initialize the macro table.
18713 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18715 * src/lex.c (percent_table): Add tok_define.
18716 * src/lex.h: Add tok_define.
18718 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18720 * src/macrotab.c: New file.
18721 * src/macrotab.h: New file.
18722 * src/Makefile.am: Update.
18724 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18726 * lib/hash.c: New file.
18727 * lib/hash.h: New file.
18728 * lib/Makefile.am: Update.
18730 2001-08-15 Akim Demaille <akim@epita.fr>
18734 2001-08-15 Marc Autret <autret_m@epita.fr>
18736 * src/reader.c (readgram): Indent output macro YYSTYPE.
18737 (packsymbols): Likewise.
18738 (output_token_defines): Likewise.
18739 * src/files.c: Standardize.
18740 (compute_header_macro): New.
18741 (defines_obstack_save): New. Use compute_header_macro.
18742 (output_files): Update. Use defines_obstack_save.
18744 2001-08-15 Akim Demaille <akim@epita.fr>
18746 * doc/bison.texinfo (Table of Symbols): Document
18747 YYSTACK_USE_ALLOCA.
18749 2001-08-15 Akim Demaille <akim@epita.fr>
18751 * missing: Update from CVS Automake.
18752 * config/config.guess, config/config.sub, config/texinfo.tex:
18753 Update from gnu.org.
18755 2001-08-15 Akim Demaille <akim@epita.fr>
18757 * Makefile.maint: Sync with CVS Autoconf.
18759 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
18761 * doc/bison.texinfo: Include GNU Free Documentation License from
18763 * doc/fdl.texi: Add to package.
18765 2001-08-14 Marc Autret <autret_m@epita.fr>
18767 Turn on %{source,header}_extension features.
18769 * src/lex.c (percent_table): Un-CPP out header_extension and
18771 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18772 (compute_exts_from_src): Remove conditions. It restores priorities
18775 2001-08-14 Marc Autret <autret_m@epita.fr>
18777 * src/files.c (compute_base_names): Add extensions computing when
18778 `--file-prefix' used.
18779 Standardize function calls.
18781 2001-08-13 Marc Autret <autret_m@epita.fr>
18783 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18784 defining it (defined but null disables alloca).
18786 2001-08-13 Marc Autret <autret_m@epita.fr>
18788 * src/bison.simple (_yy_memcpy): CPP reformat.
18790 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
18792 * tests/atconfig.in (CPPFLAGS): Fix.
18794 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
18796 * doc/bison.texinfo: Include GNU General Public License from
18798 * doc/gpl.texi: Add to package.
18800 2001-08-10 Marc Autret <autret_m@epita.fr>
18802 * src/print_graph.h: Fix.
18803 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18805 2001-08-10 Akim Demaille <akim@epita.fr>
18807 * src/system.h: Provide default declarations for stpcpy, strndup,
18810 2001-08-10 Robert Anisko <anisko_r@epita.fr>
18812 * doc/bison.texinfo (Locations): Update @$ stuff.
18814 2001-08-09 Robert Anisko <anisko_r@epita.fr>
18816 * src/bison.simple (YYLLOC_DEFAULT): Update.
18819 2001-08-08 Marc Autret <autret_m@epita.fr>
18821 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18822 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18823 Reported by Fabrice Bauzac.
18825 2001-08-08 Marc Autret <autret_m@epita.fr>
18827 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18828 * src/vcg.c (output_node): Fix.
18829 * src/vcg.h: Cleanup.
18830 * src/print_graph.c: Add comments.
18831 (node_output_size): New global variable. Simplify the formatting of
18832 the VCG graph output.
18833 (print_actions): Unused code is now used. It notifies the final state
18834 and no action states in the VCG graph. It also give the reduce actions.
18835 The `shift and goto' edges are red and the `go to state' edges are
18837 Get the current node name and node_obstack by argument.
18838 (node_obstack): New variable.
18839 (print_state): Manage node_obstack.
18840 (print_core): Use node_obstack given by argument.
18841 A node is not only computed here but in print_actions also.
18842 (print_graph): CPP out useless code instead of commenting it.
18844 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
18846 * tests/atconfig.in (CPPFLAGS): Fix.
18848 2001-08-07 Akim Demaille <akim@epita.fr>
18850 * src/print_graph.c (quote): New.
18851 (print_core): Use it.
18853 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18855 * src/vcg.c (complain.h): Include it.
18856 Unepitaize `return' invocations.
18857 [NDEBUG] (main): Remove.
18858 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18859 * src/files.c (open_files): Initialize graph_obstack.
18860 * src/print_graph.c (print_actions): CPP out useless code.
18861 (print_core): Don't output the last `\n' in labels.
18863 * src/files.c (output_files): Output the VCG file.
18864 * src/main.c (main): Invoke print_graph ();
18866 2001-08-06 Marc Autret <autret_m@epita.fr>
18868 Automaton VCG graph output.
18869 Using option ``-g'' or long option ``--graph'', you can generate
18870 a gram_filename.vcg file containing a VCG description of the LALR (1)
18871 automaton of your grammar.
18873 * src/main.c: Call to print_graph() function.
18874 * src/getargs.h: Update.
18875 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18876 (graph_flag): New flag.
18877 (longopts): Update.
18878 (getargs): Add case `g'.
18879 * src/files.c (graph_obstack): New obstack struct.
18880 (open_files): Initialize new obstack.
18881 (output_files): Saves graph_obstack if required.
18882 * src/files.h (graph_obstack): New extern declaration.
18883 * src/Makefile.am: Add new source files.
18885 2001-08-06 Marc Autret <autret_m@epita.fr>
18887 * src/print_graph.c, src/print_graph.h (graph): New.
18888 * src/vcg.h: New file.
18889 * src/vcg.c: New file, VCG graph handling.
18891 2001-08-06 Marc Autret <autret_m@epita.fr>
18893 Add of %source_extension and %header_extension which specify
18894 the source or/and the header output file extension.
18896 * src/files.c (compute_base_names): Remove initialisation of
18897 src_extension and header_extension.
18898 (compute_exts_from_gf): Update.
18899 (compute_exts_from_src): Update.
18900 (output_files): Update.
18901 * src/reader.c (parse_header_extension_decl): New.
18902 (parse_source_extension_decl): New.
18903 (read_declarations): New case statements for the new tokens.
18904 * src/lex.c (percent_table): Add entries for %source_extension
18905 and %header_extension.
18906 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18908 2001-08-06 Marc Autret <autret_m@epita.fr>
18910 * configure.in: Bump to 1.28c.
18911 * doc/bison.texinfo: Texinfo thingies.
18913 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
18915 * tests/atconfig.in (CPPFLAGS): Add.
18916 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18918 2001-08-03 Akim Demaille <akim@epita.fr>
18922 2001-08-03 Akim Demaille <akim@epita.fr>
18924 * tests/Makefile.am (check-local): Ship testsuite.
18925 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18926 Include `string.h'.
18928 2001-08-03 Akim Demaille <akim@epita.fr>
18930 * configure.in: Try using -Wformat when compiling.
18932 2001-08-03 Akim Demaille <akim@epita.fr>
18934 * configure.in: Bump to 1.28b.
18936 2001-08-03 Akim Demaille <akim@epita.fr>
18938 * src/complain.c: Adjust strerror_r portability issues.
18940 2001-08-03 Akim Demaille <akim@epita.fr>
18944 2001-08-03 Akim Demaille <akim@epita.fr>
18946 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18947 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18948 * src/getargs.c: Include complain.h.
18949 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18950 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18952 2001-08-03 Akim Demaille <akim@epita.fr>
18954 * src/reader.c (readgram): Display hidden chars in error messages.
18956 2001-08-03 Akim Demaille <akim@epita.fr>
18958 Update to gettext 0.10.39.
18960 2001-08-03 Akim Demaille <akim@epita.fr>
18962 * lib/strspn.c: New.
18964 2001-08-01 Marc Autret <autret_m@epita.fr>
18966 * doc/bison.texinfo: Update.
18967 * doc/bison.1 (mandoc): Update.
18968 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18969 * src/files.c: Support output files extensions computing.
18970 (src_extension): New static variable.
18971 (header_extension): New static variable.
18972 (tr): New function.
18973 (get_extension_index): New function, gets the index of an extension
18974 filename in a string.
18975 (compute_exts_from_gf): New function, computes extensions from the
18976 grammar file extension.
18977 (compute_exts_from_src): New functions, computes extensions from the
18978 C source file extension, file given by ``-o'' option.
18979 (compute_base_names): Update.
18980 (output_files): Update.
18982 2001-08-01 Robert Anisko <anisko_r@epita.fr>
18984 * doc/bison.texi: Document @$.
18985 (Locations): New section.
18987 2001-07-18 Akim Demaille <akim@epita.fr>
18989 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18990 * config/prev-version.txt, config/move-if-change: New.
18991 * Makefile.am: Adjust.
18993 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
18995 * src/bison.simple (yyparse): Suppress warning `comparaison
18996 between signed and unsigned'.
18998 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
19000 * src/getargs.h (raw_flag): Remove.
19001 * src/getargs.c: Die on `-r'/`--raw'.
19002 * src/lex.c (parse_percent_token): Die on `%raw'.
19003 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
19004 * tests/calc.at: Suppress test with option `--raw'.
19006 2001-07-14 Akim Demaille <akim@epita.fr>
19009 * configure.in: Require Autoconf 2.50.
19010 Update to gettext 0.10.38.
19012 2001-03-16 Akim Demaille <akim@epita.fr>
19014 * doc/bison.texinfo: ANSIfy the examples.
19016 2001-03-16 Akim Demaille <akim@epita.fr>
19018 * getargs.c (skeleton): New variable.
19019 (longopts): --skeleton is a new option.
19020 (shortopts, getargs): -S is a new option.
19021 * getargs.h: Declare skeleton.
19022 * output.c (output_parser): Use it.
19024 2001-03-16 Akim Demaille <akim@epita.fr>
19026 * m4/strerror_r.m4: New.
19027 * m4/error.m4: Run AC_FUNC_STRERROR_R.
19028 * lib/error.h, lib/error.c: Update.
19030 2001-03-16 Akim Demaille <akim@epita.fr>
19032 * src/getargs.c (longopts): Clean up.
19034 2001-02-21 Akim Demaille <akim@epita.fr>
19036 * src/reader.c (gensym): `gensym_count' is your own.
19037 Use a static buf to create the symbol name, as token_buffer is no
19040 2001-02-08 Akim Demaille <akim@epita.fr>
19042 * src/conflicts.c (conflict_report): Be sure not to append to res
19043 between two calls, which could happen if both first sprintf were
19044 skipped, but not the first cp += strlen.
19046 2001-02-08 Akim Demaille <akim@epita.fr>
19048 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
19049 New, from fileutils 4.0.37.
19050 * configure.in: Require Autoconf 2.49c. I took some time before
19051 making this decision. This is the only way out for portability
19052 issues in Bison, it would mean way too much duplicate effort to
19053 import in Bison features implemented in 2.49c since 2.13.
19054 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
19056 2001-02-02 Akim Demaille <akim@epita.fr>
19058 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
19059 * lib/xalloc.h, lib/xmalloc.c: Update.
19061 2001-01-19 Akim Demaille <akim@epita.fr>
19063 Get rid of the ad hoc handling of token_buffer in the scanner: use
19066 * src/lex.c (token_obstack): New.
19067 (init_lex): Initialize it. No longer call...
19068 (grow_token_buffer): this. Remove it.
19069 Adjust all the places which used it to use the obstack.
19071 2001-01-19 Akim Demaille <akim@epita.fr>
19073 * src/lex.h: Rename all the tokens:
19074 s/\bENDFILE\b/tok_eof/g;
19075 s/\bIDENTIFIER\b/tok_identifier/g;
19077 Let them be enums, not #define, to ease debugging.
19078 Adjust all the code.
19080 2001-01-18 Akim Demaille <akim@epita.fr>
19082 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
19083 * src/lex.c (maxtoken, grow_token_buffer): Static.
19085 2001-01-18 Akim Demaille <akim@epita.fr>
19087 Since we now use obstacks, more % directives can be enabled.
19089 * src/lex.c (percent_table): Also accept `%yacc',
19090 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
19092 Handle the actions for `%semantic_parser' and `%pure_parser' here,
19093 instead of returning a token.
19094 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
19095 * src/reader.c (read_declarations): Adjust.
19096 * src/files.c (open_files): Don't call `compute_base_names', don't
19097 compute `attrsfile' since they depend upon data which might be
19098 *in* the input file now.
19099 (output_files): Do it here.
19100 * src/output.c (output_headers): Document the fact that this patch
19101 introduces a guaranteed SEGV for semantic parsers.
19102 * doc/bison.texinfo: Document them.
19103 * tests/suite.at: Exercise these %options.
19105 2000-12-20 Akim Demaille <akim@epita.fr>
19107 Also handle the output file (--verbose) with obstacks.
19109 * files.c (foutput): Remove.
19110 (output_obstack): New.
19111 Adjust all dependencies.
19112 * src/conflicts.c: Return a string.
19113 * src/system.h (obstack_grow_string): Rename as...
19114 (obstack_sgrow): this. Be ready to work with non literals.
19115 (obstack_fgrow4): New.
19117 2000-12-20 Akim Demaille <akim@epita.fr>
19119 * src/files.c (open_files): Fix the computation of short_base_name
19120 in the case of `-o foo.tab.c'.
19122 2000-12-20 Akim Demaille <akim@epita.fr>
19124 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
19125 (copy_dollar): Now that everything uses obstacks, get rid of the
19128 2000-12-20 Akim Demaille <akim@epita.fr>
19130 * src/files.c (open_files): Actually the `.output' file is based
19131 on the short_base_name, not base_name.
19132 * tests/suite.at (Checking output file names): Adjust.
19134 2000-12-20 Akim Demaille <akim@epita.fr>
19136 * src/bison.s1: Remove, we now use directly...
19137 * src/bison.simple: this.
19138 * src/Makefile.am: Use pkgdata instead of data.
19140 2000-12-20 Akim Demaille <akim@epita.fr>
19142 * src/files.c (guard_obstack): New.
19143 (open_files): Initialize it.
19144 (output_files): Dump it...
19145 * src/files.h: Export it.
19146 * src/reader.c (copy_guard): Use it.
19148 2000-12-19 Akim Demaille <akim@epita.fr>
19150 * src/files.c (outfile, defsfile, actfile): Removed as global
19152 (open_files): Don't compute them.
19153 (output_files): Adjust.
19154 (base_name, short_base_name): Be global.
19155 Adjust dependencies.
19157 2000-12-19 Akim Demaille <akim@epita.fr>
19159 * src/files.c (strsuffix): New.
19160 (stringappend): Be just like strcat but allocate.
19161 (base_names): Eve out from open_files.
19162 Try to simplify the rather hairy computation of base_name and
19164 (open_files): Use it.
19165 * tests/suite.at (Checking output file names): New test.
19167 2000-12-19 Akim Demaille <akim@epita.fr>
19169 * src/system.h (obstack_grow_literal_string): Rename as...
19170 (obstack_grow_string): this.
19171 * src/output.c (output_parser): Recognize `%% actions' instead of
19173 * src/bison.s1: s/$/%% actions/.
19174 * src/bison.hairy: Likewise.
19176 2000-12-19 Akim Demaille <akim@epita.fr>
19178 * src/output.c (output_parser): Compute the `#line' lines when
19180 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
19181 Suggested by Hans Aberg.
19183 2000-12-19 Akim Demaille <akim@epita.fr>
19185 Let the handling of the skeleton files be local to the procedures
19188 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
19190 (fparser, open_extra_files): Remove.
19191 (open_files, output_files): Don't take care of fparser.
19192 * src/files.h: Adjust.
19193 * src/output.c (output_parser): Open and close the file to the
19195 * src/reader.c (read_declarations): When %semantic_parser, open
19198 2000-12-19 Akim Demaille <akim@epita.fr>
19200 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
19201 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
19203 2000-12-19 Akim Demaille <akim@epita.fr>
19205 * src/files.c (open_files): Yipee! We no longer need all the code
19206 looking for `/tmp' since we have no tmp file.
19208 2000-12-19 Akim Demaille <akim@epita.fr>
19210 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
19212 * src/files.c (open_files): Less dependency on MSDOS etc.
19214 2000-12-14 Akim Demaille <akim@epita.fr>
19216 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
19217 Provide a default definition.
19218 Use it when executing the default @ action.
19219 * src/reader.c (reader_output_yylsp): No longer include
19220 `timestamp' and `text' in the default YYLTYPE.
19222 2000-12-12 Akim Demaille <akim@epita.fr>
19224 * src/reader.c (copy_definition, parse_union_decl, copy_action)
19225 (copy_guard): Quote the file names.
19226 Reported by Laurent Mascherpa.
19228 2000-12-12 Akim Demaille <akim@epita.fr>
19230 * src/output.c (output_headers, output_program, output): Be sure
19231 to escape special characters when outputting filenames.
19232 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
19233 (output_headers): Don't depend on them, Use ACTSTR.
19235 2000-11-17 Akim Demaille <akim@epita.fr>
19237 * lib/obstack.h: Formatting changes.
19238 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
19239 prevents type checking.
19240 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
19241 cast the value to (void *): assigning a `foo *' to a `void *'
19243 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
19244 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
19247 2000-11-17 Akim Demaille <akim@epita.fr>
19249 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
19251 (suite.m4, regression.m4, calc.m4): these.
19252 * tests/atgeneral.m4: Update from CVS Autoconf.
19254 2000-11-17 Akim Demaille <akim@epita.fr>
19256 * tests/regression.m4 (%union and --defines): New test,
19257 demonstrating a current bug in the obstack implementation.
19259 2000-11-17 Akim Demaille <akim@epita.fr>
19261 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
19263 Use them to declare the variables which are global or local to
19266 2000-11-17 Akim Demaille <akim@epita.fr>
19268 * acconfig.h: Remove, no longer used.
19270 2000-11-07 Akim Demaille <akim@epita.fr>
19272 * src: s/Copyright (C)/Copyright/g.
19274 2000-11-07 Akim Demaille <akim@epita.fr>
19276 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
19278 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
19280 2000-11-07 Akim Demaille <akim@epita.fr>
19282 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
19283 Merge in a single CPP if/else.
19285 2000-11-07 Akim Demaille <akim@epita.fr>
19287 * src/output.c (output): Remove useless variables.
19288 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
19289 argument `data' for consistency with the prototypes.
19290 Qualify it `const'.
19291 (obstack_copy, obstack_copy0): Rename the second argument as
19292 `address' for consistency. Qualify it `const'.
19293 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
19294 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
19295 `const' their input argument (`data' or `address').
19296 Adjust the corresponding macros to include `const' in casts.
19298 2000-11-03 Akim Demaille <akim@epita.fr>
19300 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
19301 s/PFILE1/BISON_HAIRY/.
19302 Adjust dependencies.
19304 2000-11-03 Akim Demaille <akim@epita.fr>
19306 For some reason, this was not applied.
19308 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19309 `unlink': it's no longer used.
19311 2000-11-03 Akim Demaille <akim@epita.fr>
19313 * src/files.c (skeleton_find): New function, eved out of...
19314 (open_files, open_extra_files): here.
19316 2000-11-03 Akim Demaille <akim@epita.fr>
19318 Don't use `atexit'.
19320 * src/files.c (obstack_save): New function.
19321 (done): Rename as...
19322 (output_files): this.
19323 Use `obstack_save'.
19324 * src/main.c (main): Don't use `atexit' to register `done', since
19325 it no longer has to remove tmp files, just call `output_files'
19326 when there are no errors.
19328 2000-11-02 Akim Demaille <akim@epita.fr>
19330 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19331 `unlink': it's no longer used.
19332 * src/files.h: Formatting changes.
19334 2000-11-02 Akim Demaille <akim@epita.fr>
19336 Remove the last uses of mktemp and unlink/delete.
19338 * src/files.c (fdefines, ftable): Removed.
19339 (defines_ostack, table_obstack): New.
19340 Adjust dependencies of the former into uses of the latter.
19341 * src/output.c (output_short_or_char_table, output_short_table):
19342 Convert to using obstacks.
19343 * src/reader.c (copy_comment2): Accept one FILE * and two
19345 (output_token_defines, reader_output_yylsp): Use obstacks.
19346 * src/system.h (obstack_fgrow3): New.
19347 * po/POTFILES.in: Adjust.
19349 2000-11-01 Akim Demaille <akim@epita.fr>
19351 Change each use of `fattrs' into a use of `attrs_obstack'.
19353 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
19354 * src/files.c (fattrs): Remove.
19355 (attrs_obstack): New.
19356 Adjust all dependencies.
19357 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
19359 2000-11-01 Akim Demaille <akim@epita.fr>
19361 Introduce obstacks.
19362 Change each use of `faction' into a use of `action_obstack'.
19364 * lib/obstack.h, lib/obstack.c: New files.
19365 * src/files.c (faction): Remove.
19366 (action_obstack): New.
19367 Adjust all dependencies.
19369 2000-10-20 Akim Demaille <akim@epita.fr>
19371 * lib/quote.h (PARAMS): New macro. Use it.
19373 2000-10-16 Akim Demaille <akim@epita.fr>
19375 * src/output.c (output_short_or_char_table): New function.
19376 (output_short_table, output_token_translations): Use it.
19377 (goto_actions): Use output_short_table.
19379 2000-10-16 Akim Demaille <akim@epita.fr>
19381 * src/symtab.c (bucket_new): New function.
19384 * src/output.c (output_short_table): New argument to display the
19385 comment associated with the table.
19386 Adjust dependencies.
19387 (output_gram): Use it.
19388 (output_rule_data): Nicer output layout for YYTNAME.
19390 2000-10-16 Akim Demaille <akim@epita.fr>
19392 * src/lex.c (read_typename): New function.
19394 * src/reader.c (copy_dollar): Likewise.
19396 2000-10-16 Akim Demaille <akim@epita.fr>
19398 * src/reader.c (copy_comment2): Expect the input stream to be on
19399 the `/' which is suspected to open a comment, instead of being
19400 called after `//' or `/*' was read.
19401 (copy_comment, copy_definition, parse_union_decl, copy_action)
19402 (copy_guard): Adjust.
19404 2000-10-16 Akim Demaille <akim@epita.fr>
19406 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
19407 `read_signed_integer'.
19409 2000-10-16 Akim Demaille <akim@epita.fr>
19411 * src/reader.c (copy_dollar): New function.
19412 (copy_guard, copy_action): Use it.
19414 2000-10-16 Akim Demaille <akim@epita.fr>
19416 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
19417 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
19418 New files, from Fileutils 4.0.27.
19419 * src/main.c (printable_version): Remove.
19420 * src/lex.c, src/reader.c: Use `quote'.
19422 2000-10-04 Akim Demaille <akim@epita.fr>
19424 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
19426 2000-10-04 Akim Demaille <akim@epita.fr>
19428 * doc/bison.texinfo: Various typos spotted by Neil Booth.
19430 2000-10-04 Akim Demaille <akim@epita.fr>
19432 When a literal string is used to define two different tokens,
19433 `bison -v' segfaults.
19434 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
19436 * tests/regression.m4: New file.
19437 Include the core of the sample provided by Piotr Gackiewicz.
19438 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
19441 2000-10-04 Akim Demaille <akim@epita.fr>
19443 * src/reader.c (parse_expect_decl): Keep `count' within the size
19447 2000-10-02 Paul Eggert <eggert@twinsun.com>
19449 * bison.s1 (yyparse): Assign the default value
19450 unconditionally, to avoid a GCC warning and make the parser a
19453 2000-10-02 Akim Demaille <akim@epita.fr>
19455 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
19458 2000-10-02 Akim Demaille <akim@epita.fr>
19460 * src/derives.c, src/print.c, src/reduce.c: To ease the
19461 translation, move some `\n' out of the translated strings.
19463 2000-10-02 Akim Demaille <akim@epita.fr>
19465 The location tracking mechanism is precious for parse error
19466 messages. Nevertheless, it is enabled only when `@n' is used in
19467 the grammar, which is a different issue (you can use it in error
19468 message, but not in the grammar per se). Therefore, there should
19469 be another means to enable it.
19471 * src/getargs.c (getargs): Support `--locations'.
19472 (usage): Report it.
19473 * src/getargs.h (locationsflag): Export it.
19474 * src/lex.c (percent_table): Support `%locations'.
19475 * src/reader.c (yylsp_needed): Remove this variable, now replaced
19476 with `locationsflag'.
19477 * doc/bison.texinfo: Document `--locations' and `%locations'.
19479 * tests/calc.m4: Test it.
19481 For regularity of the names, replace each
19482 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
19483 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
19484 In addition replace each `flag' with `_flag'.
19486 2000-10-02 Akim Demaille <akim@epita.fr>
19488 Also test parse error messages, including with YYERROR_VERBOSE.
19490 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
19492 Use it to check the computations.
19493 Use it to check `nonassoc' is honored.
19494 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
19495 `--yyerror-verbose'.
19496 (_AT_CHECK_CALC): Adjust to this option.
19497 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
19499 2000-10-02 Akim Demaille <akim@epita.fr>
19501 Test also `--verbose', `--defines' and `--name-prefix'. Testing
19502 the latter demonstrates a flaw in the handling of non debugging
19503 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19504 was used in order to simplify:
19520 unfortunately this leads to a CPP conflict when
19521 `--name-prefix=foo' is used since it produces `#define yydebug
19524 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19525 (YYDPRINTF): New macro.
19527 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19529 Also test `--verbose', `--defines' and `--name-prefix'.
19531 2000-10-02 Akim Demaille <akim@epita.fr>
19533 Improve the readability of the produced parsers.
19535 * src/bison.s1: Formatting changes.
19536 Improve the comment related to the `$' mark.
19537 (yydefault): Don't fall through to `yyresume': `goto' there.
19538 * src/output.c (output_parser): When the `$' is met, skip the end
19540 New variable, `number_of_dollar_signs', to check there's exactly
19541 one `$' in the parser skeleton.
19543 2000-10-02 Akim Demaille <akim@epita.fr>
19545 * lib/xstrdup.c: New file, from the fileutils.
19546 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19547 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19548 instead of strlen + xmalloc + strcpy.
19549 * src/symtab.c (copys): Remove, use xstrdup instead.
19551 2000-10-02 Akim Demaille <akim@epita.fr>
19553 * src/gram.h (associativity): New enum type which replaces the
19554 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19555 `right_assoc', `left_assoc' and `non_assoc'.
19556 Adjust all dependencies.
19557 * src/reader.c: Formatting changes.
19558 (LTYPESTR): Don't define it, use it as a literal in
19559 `reader_output_yylsp'.
19560 * src/symtab.h (symbol_class): New enum type which replaces the
19561 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19562 `sunknown', `stoken and `snterm'.
19564 2000-10-02 Akim Demaille <akim@epita.fr>
19566 * src/getargs.c (fixed_outfiles): Rename as...
19567 (yaccflag): for consistency and accuracy.
19568 Adjust dependencies.
19570 2000-10-02 Akim Demaille <akim@epita.fr>
19572 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19573 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19574 difficult and introduced a lot of core dump. It turns out that
19575 Bison used an implementation of `xmalloc' based on `calloc', and
19576 at various places it does depend upon the initialization to 0. I
19577 have not tried to isolate the pertinent places, and all the former
19578 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19579 someone should address this issue.
19581 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19582 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19584 Adjust dependencies.
19585 * src/warshall.h: New file.
19588 2000-10-02 Akim Demaille <akim@epita.fr>
19590 Various anti-`extern in *.c' changes.
19592 * src/system.h: Include `assert.h'.
19594 2000-10-02 Akim Demaille <akim@epita.fr>
19596 * src/state.h (nstates, final_state, first_state, first_shift)
19597 (first_reduction): Move their exportation from here...
19598 * src/LR0.h: to here.
19599 Adjust dependencies.
19600 * src/getargs.c (statisticsflag): New variable.
19601 Add support for `--statistics'.
19602 Adjust dependencies.
19604 Remove a lot of now useless `extern' statements in most files.
19606 2000-10-02 Akim Demaille <akim@epita.fr>
19608 * src/LR0.h: New file.
19611 2000-10-02 Akim Demaille <akim@epita.fr>
19613 * src/print.h: New file.
19615 * src/print.c: Formatting and ordering changes.
19616 (verbose, terse): Replace with...
19617 (print_results): this new function.
19618 Adjust dependencies.
19620 2000-10-02 Akim Demaille <akim@epita.fr>
19622 * src/conflicts.c (conflict_report): New function.
19623 (conflict_log, verbose_conflict_log): Replace with...
19624 (print_conflicts): this function.
19625 Adjust dependencies.
19626 * src/conflicts.h: New file.
19627 Propagate its inclusion.
19629 2000-10-02 Akim Demaille <akim@epita.fr>
19631 * src/nullable.h: New file.
19632 Propagate its inclusion.
19633 * src/nullable.c: Formatting changes.
19635 2000-10-02 Akim Demaille <akim@epita.fr>
19637 * src/reduce.h: New file.
19638 Propagate its inclusion.
19639 * src/reduce.c: Topological sort and other formatting changes.
19640 (bool, TRUE, FALSE): Move their definition to...
19641 * src/system.h: here.
19643 2000-10-02 Akim Demaille <akim@epita.fr>
19645 * src/files.c: Formatting changes.
19646 (tryopen, tryclose, openfiles): Rename as...
19647 (xfopen, xfclose, open_files): this.
19648 (stringappend): static.
19649 * src/files.h: Complete the list of exported symbols.
19652 2000-10-02 Akim Demaille <akim@epita.fr>
19654 * src/reader.h: New file.
19655 Propagate its use instead of tedious list of `extern' and
19657 * src/reader.c: Formatting changes, topological sort,
19660 2000-10-02 Akim Demaille <akim@epita.fr>
19662 * src/lex.h: Prototype `lex.c' exported functions.
19663 * src/reader.c: Adjust.
19664 * src/lex.c: Formatting changes.
19665 (safegetc): Rename as...
19668 2000-10-02 Akim Demaille <akim@epita.fr>
19670 * src/lalr.h: New file.
19671 Propagate its inclusion instead of prototypes and `extern'.
19672 * src/lalr.c: Formatting changes, topological sorting etc.
19674 2000-10-02 Akim Demaille <akim@epita.fr>
19676 * src/output.c (token_actions): Introduce a temporary array,
19677 YYDEFACT, that makes it possible for this function to use
19678 output_short_table.
19680 2000-10-02 Akim Demaille <akim@epita.fr>
19682 `user_toknums' is output as a `short[]' in `output.c', while it is
19683 defined as a `int[]' in `reader.c'. For consistency with the
19684 other output tables, `user_toknums' is now defined as a table of
19687 * src/reader.c (user_toknums): Be a short table instead of an int
19689 Adjust dependencies.
19691 Factor the short table outputs.
19693 * src/output.c (output_short_table): New function.
19694 * src/output.c (output_gram, output_stos, output_rule_data)
19695 (output_base, output_table, output_check): Use it.
19697 2000-10-02 Akim Demaille <akim@epita.fr>
19699 * src/output.c (output): Topological sort of the functions, in
19700 order to get rid of the `static' prototypes.
19701 No longer use `register'.
19702 * src/output.h: New file.
19703 Propagate its inclusion in files explicitly prototyping functions
19706 2000-09-21 Akim Demaille <akim@epita.fr>
19708 * src/atgeneral.m4: Update from Autoconf.
19710 2000-09-21 Akim Demaille <akim@epita.fr>
19712 * src/closure.h: New file.
19713 * src/closure.c: Formatting changes, topological sort over the
19714 functions, use of closure.h.
19715 (initialize_closure, finalize_closure): Rename as...
19716 (new_closure, free_closure): these. Adjust dependencies.
19717 * src/LR0.c: Formatting changes, topological sort, use of
19719 (initialize_states): Rename as...
19720 (new_states): this.
19721 * src/Makefile.am (noinst_HEADERS): Adjust.
19723 2000-09-20 Akim Demaille <akim@epita.fr>
19725 * src/acconfig.h: Don't protect config.h against multiple
19727 Don't define PARAMS.
19728 * src/system.h: Define PARAMS.
19729 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19730 purpose of config.h. system.h must not try to fix wrong
19731 definitions in config.h.
19733 2000-09-20 Akim Demaille <akim@epita.fr>
19735 * src/derives.h: New file.
19736 * src/main.c, src/derives.h: Use it.
19737 Formatting changes.
19738 * src/Makefile.am (noinst_HEADERS): Adjust.
19740 2000-09-20 Akim Demaille <akim@epita.fr>
19742 * tests/atgeneral.m4: Update from Autoconf.
19743 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19744 (AT_CHECK_CALC): New macros.
19745 Use these macros to test bison with options `', `--raw',
19746 `--debug', `--yacc', `--yacc --debug'.
19748 2000-09-19 Akim Demaille <akim@epita.fr>
19750 * src/output.c: Formatting changes.
19751 * src/machine.h: Remove, leaving its contents in...
19752 * src/system.h: here.
19754 Adjust all dependencies on stdio.h and machine.h.
19755 * src/getargs.h: New file.
19756 Let all `extern' declarations about getargs.c be replaced with
19757 inclusion of `getargs.h'.
19758 * src/Makefile.am (noinst_HEADERS): Adjust.
19760 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19762 (yyerror): Returns void, not int.
19763 * doc/bison.texinfo: Formatting changes.
19765 2000-09-19 Akim Demaille <akim@epita.fr>
19767 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19770 2000-09-18 Akim Demaille <akim@epita.fr>
19772 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19773 * src/Makefile.am (INCLUDES): Don't.
19774 Be ready to fetch headers in lib/.
19776 2000-09-18 Akim Demaille <akim@epita.fr>
19778 * doc/bison.texinfo: Update the copyright.
19779 ANSIfy and GNUify the examples.
19780 Remove the old menu.
19782 2000-09-18 Akim Demaille <akim@epita.fr>
19784 First set of tests: use the `calc' example from the documentation.
19786 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19787 is defined only when YYDEBUG is.
19788 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19789 * src/files.c (tryopen, tryclose): Formatting changes.
19790 Move to the top and be static.
19791 * src/reader.c (read_signed_integer): Likewise.
19792 * tests/calc.m4: New file.
19793 * Makefile.am, suite.m4: Adjust.
19794 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19796 2000-09-18 Akim Demaille <akim@epita.fr>
19798 Add support for an Autotest test suite for Bison.
19800 * m4/m4.m4, m4/atconfig.m4: New files.
19801 * m4/Makefile.am (EXTRA_DIST): Adjust.
19802 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19804 * src/getargs.c: Display a more standard --version message.
19805 * src/reader.c (reader): Formatting changes.
19806 No longer depend upon VERSION_STRING.
19807 * configure.in: No longer use `dnl'.
19808 Set up the test suite and the new directory `tests/.
19809 (VERSION_STRING): Remove.
19811 2000-04-14 Akim Demaille <akim@epita.fr>
19813 * src/reader.c (copy_comment2): New function, same as former
19814 `copy_comment', but outputs into two FILE *.
19815 (copy_comment): Use it.
19816 (parse_union_decl): Use it.
19817 (get_type, parse_start_decl): Use the same `invalid' message.
19818 (parse_start_decl, parse_union_decl): Use the same `multiple'
19820 (parse_union_decl, copy_guard, copy_action): Use the same
19821 `unmatched' message.
19822 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19824 2000-03-31 Akim Demaille <akim@epita.fr>
19826 * src/files.c (tryopen, tryclose): Move to the top.
19829 2000-03-31 Akim Demaille <akim@epita.fr>
19831 * src/main.c (main): Don't call `done', exit does it.
19833 2000-03-31 Akim Demaille <akim@epita.fr>
19835 * allocate.c: s/return (foo)/return foo/.
19836 * lalr.c: Likewise.
19838 * output.c: Likewise.
19839 * reader.c: Likewise.
19840 * symtab.c: Likewise.
19841 * vmsgetargs.c: Likewise.
19843 2000-03-31 Akim Demaille <akim@epita.fr>
19845 Clean up the error reporting functions.
19847 * src/report.c: New file.
19848 * src/report.h: Likewise.
19849 * src/Makefile.am: Adjust.
19850 * m4/error.m4: New file.
19851 * m4/Makefile.am: Adjust.
19852 * configure.in (jm_PREREQ_ERROR): Call it.
19853 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19855 (fatal, fatals): Remove. All callers use complain.c::fatal.
19856 (warn, warni, warns, warnss, warnss): Remove. All callers use
19857 complain.c::complain.
19858 (toomany): Remove, use fatal instead.
19859 * src/files.c (done): No argument, use complain_message_count.
19860 * src/main.c (main): Register `done' to `atexit'.
19862 * src/getargs.c (usage): More `fputs', less `fprintf'.
19864 2000-03-28 Akim Demaille <akim@epita.fr>
19866 * lib/: New directory.
19867 * Makefile.am (SUBDIRS): Adjust.
19868 * configure.in: Adjust.
19869 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19871 * src/alloca.c: Moved to lib/.
19872 * src/getopt.c: Likewise.
19873 * src/getopt1.c: Likewise.
19874 * src/getopt.h: Likewise.
19875 * src/ansi2knr.c: Likewise.
19876 * src/ansi2knr.1: Likewise.
19877 * src/Makefile.am: Adjust.
19878 * lib/Makefile.am: New file.
19880 2000-03-28 Akim Demaille <akim@epita.fr>
19882 * src/getargs.c (usage): Refresh the help message.
19884 2000-03-17 Akim Demaille <akim@epita.fr>
19886 * src/getopt1.c: Updated from textutils 2.0e
19887 * src/getopt.c: Likewise.
19888 * src/getopt.h: Likewise.
19890 2000-03-17 Akim Demaille <akim@epita.fr>
19892 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19893 the file name, not the whole `#line LINE FILE'.
19895 2000-03-17 Akim Demaille <akim@epita.fr>
19897 On syntax errors, report the token on which we choked.
19899 * src/bison.s1 (yyparse): In the label yyerrlab, when
19900 YYERROR_VERBOSE, add yychar in msg.
19902 2000-03-17 Akim Demaille <akim@epita.fr>
19904 * src/reader.c (copy_at): New function.
19905 (copy_guard): Use it.
19906 (copy_action): Use it.
19908 2000-03-17 Akim Demaille <akim@epita.fr>
19910 Be kind to translators, save some useless translations.
19912 * src/main.c (banner): New function.
19913 (fatal_banner): Use it.
19914 (warn_banner): Use it.
19916 2000-03-17 Akim Demaille <akim@epita.fr>
19918 * src/reader.c (copy_definition): Use copy_string and
19919 copy_comment. Removed now unused `match', `ended',
19921 (copy_comment, copy_string): Moved, to be visible from
19924 2000-03-17 Akim Demaille <akim@epita.fr>
19926 * src/reader.c (copy_string): Declare `static inline'. No
19927 problems with inline, since it is checked by configure.
19928 (copy_comment): Likewise.
19930 2000-03-17 Akim Demaille <akim@epita.fr>
19932 * src/reader.c (packsymbols): Formatting changes.
19934 2000-03-17 Akim Demaille <akim@epita.fr>
19936 * src/reader.c (copy_comment): New function, factored out from:
19937 (copy_action): Use it. Removed now unused `match', `ended',
19939 (copy_guard): Likewise.
19941 2000-03-17 Akim Demaille <akim@epita.fr>
19943 * src/reader.c (copy_string): New function, factored out from:
19944 (copy_action): Use it.
19945 (copy_guard): Likewise.
19947 2000-03-17 Akim Demaille <akim@epita.fr>
19949 Change the handling of @s so that they behave exactly like $s.
19950 There is now a pseudo variable @$ (readble and writable), location
19951 of the lhs of the rule (by default ranging from the location of
19952 the first symbol of the rhs, to the location of the last symbol,
19953 or, if the rhs is empty, YYLLOC).
19955 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19957 (yyparse): When providing a default semantic action, provide a
19958 default location action.
19959 (after the $): No longer change `*YYLSP', just stack YYLOC the
19960 same way you stack YYVAL.
19961 * src/reader.c (read_declarations): Use warns.
19962 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19963 (copy_action, case '@'): Likewise.
19964 Use a standard error message, to save useless work from
19967 2000-03-17 Akim Demaille <akim@epita.fr>
19969 * src/bison.s1: Formatting and cosmetics changes.
19970 * src/reader.c: Likewise.
19971 Update the Copyright notice.
19973 2000-03-17 Akim Demaille <akim@epita.fr>
19975 * src/bison.s1 (#line): All set to `#line' only, since the
19976 Makefile now handles them.
19978 2000-03-16 Akim Demaille <akim@epita.fr>
19980 * src/output.c (output_rule_data): Output the documentation of
19981 some of the tables.
19982 (Copyright notice): Update.
19983 Formatting changes.
19985 2000-03-16 Akim Demaille <akim@epita.fr>
19987 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19988 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19989 One `#if YYDEBUG' remains, since it uses variables which are
19990 defined only if `YYDEBUG != 0'.
19992 2000-03-16 Akim Demaille <akim@epita.fr>
19994 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19995 and related variables so that the similarities are highlighted.
19997 2000-03-16 Akim Demaille <akim@epita.fr>
19999 * src/bison.s1: Properly indent CPP directives.
20001 2000-03-16 Akim Demaille <akim@epita.fr>
20003 * src/bison.s1: Properly indent the `alloca' CPP section.
20005 2000-03-16 Akim Demaille <akim@epita.fr>
20007 Do not hard code values of directories in `configure.in'.
20008 Update the `configure' tool chain.
20010 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
20012 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
20013 (AC_OUTPUT): Add m4/Makefile.
20014 Bump to bison 1.28a, 1.29 has never been released.
20015 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
20016 handled via src/Makefile.am.
20017 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
20018 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
20020 * Makefile.am (SUBDIRS): Add m4.
20021 (ACLOCAL_AM_FLAGS): New variable.
20022 (AUTOMAKE_OPTIONS): Add check-news.
20023 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
20024 the proper line number and file name.
20025 (DEFS): Propagate the location of bison library files and of the
20027 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
20029 * acinclude.m4: Remove, replaced by the directory m4.
20030 * m4/Makefile.am (EXTRA_DIST): New variable.
20031 * m4/gettext.m4: New file, from the fileutils.
20032 * m4/lcmessage.m4: Likewise
20033 * m4/progtest.m4: Likewise.
20034 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
20036 2000-03-10 Akim Demaille <akim@epita.fr>
20039 Formatting changes of various comments.
20040 Respect the GNU coding standards at various places.
20041 Don't use `_()' when no translation is needed.
20043 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20046 OS/2 honors TMPDIR environment variable.
20048 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20050 * doc/bison.texinfo: Tweaked spelling and grammar.
20052 Removed reference to price of printed copy.
20053 Mention BISON_SIMPLE and BISON_HAIRY.
20055 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20057 * configure.in, NEWS:
20058 Bison 1.29 released.
20060 1999-10-27 Jesse Thilo <jthilo@gnu.org>
20062 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
20063 Added reference card.
20065 1999-07-26 Jesse Thilo <jthilo@gnu.org>
20067 * po/ru.po: Added Russian translation.
20069 1999-07-26 Jesse Thilo <jthilo@gnu.org>
20071 * configure.in: Added Russian translation.
20073 1999-07-06 Jesse Thilo <jthilo@gnu.org>
20075 * configure.in, NEWS, README:
20076 Released version 1.28.
20078 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20081 Squashed redefinition warning on some systems.
20083 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
20084 Have configure build version string instead of relying on ANSI string
20087 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20089 * po/POTFILES.in: Got rid of version.c.
20091 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20093 * acconfig.h, configure.in:
20094 Have configure build version string instead of relying on ANSI string
20097 1999-06-08 Jesse Thilo <jthilo@gnu.org>
20100 Dropped mention of `+' for long-named options.
20102 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20104 * src/files.c: Added <unistd.h> for unlink().
20106 * src/Makefile.am, src/system.h:
20109 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20111 * README: Added a FAQ list.
20113 * configure.in, acconfig.h:
20116 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20118 * doc/FAQ, doc/Makefile.am:
20121 1999-05-19 Jesse Thilo <jthilo@gnu.org>
20123 * src/alloc.h, src/symtab.h, src/version.c:
20124 Protected inclusion of "config.h" with HAVE_CONFIG_H.
20126 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20128 * src/.cvsignore, src/Makefile.am:
20129 Reorganized: sources in `src', documentation in `doc'.
20131 * src/lex.c (literalchar):
20132 fixed the code for escaping double quotes (thanks
20135 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20137 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
20138 Adjusted paths to reflect directory reorganization.
20140 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20142 * doc/.cvsignore, doc/Makefile.am:
20143 Reorganized: sources in `src', documentation in `doc'.
20145 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20148 Updated AC_INIT file to reflect directory reorganization.
20150 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
20151 Reorganized: sources in `src', documentation in `doc'.
20153 1999-04-13 Jesse Thilo <jthilo@gnu.org>
20156 Don't declare calloc() and realloc() if not necessary.
20158 1999-04-13 Jesse Thilo <jthilo@gnu.org>
20160 * configure.in, acconfig.h, acinclude.m4:
20161 Don't declare calloc() and realloc() if not necessary.
20163 1999-03-23 Jesse Thilo <jthilo@gnu.org>
20165 * po/.cvsignore: Added i18n support.
20167 1999-03-23 Jesse Thilo <jthilo@gnu.org>
20169 * acconfig.h, configure.in, Makefile.am:
20170 Added i18n support.
20172 1999-03-22 Jesse Thilo <jthilo@gnu.org>
20174 * src/bison.s1: Fixed #line numbers.
20176 1999-03-15 Jesse Thilo <jthilo@gnu.org>
20178 * po/es.po, po/fr.po, po/nl.po, po/de.po:
20179 Added PO files from Translation Project.
20181 1999-03-03 Jesse Thilo <jthilo@gnu.org>
20184 Added support for non-ANSI compilers (ansi2knr).
20186 1999-02-16 Jesse Thilo <jthilo@gnu.org>
20188 * configure.in: Bumped version number to 1.27.
20191 Added `bison.simple' to list of files removed by `make distclean'.
20193 1999-02-12 Jesse Thilo <jthilo@gnu.org>
20195 * src/files.c, src/files.h:
20196 Defined locations of parser files in config.h instead of Makefile.
20198 1999-02-12 Jesse Thilo <jthilo@gnu.org>
20200 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
20201 Defined locations of parser files in config.h instead of Makefile.
20203 1999-02-09 Jesse Thilo <jthilo@gnu.org>
20206 Removed inappropriate use of $< macro.
20208 1999-02-05 Jesse Thilo <jthilo@gnu.org>
20210 * po/Makefile.in.in, po/POTFILES.in:
20211 Add `po' directory skeleton.
20213 1999-01-27 Jesse Thilo <jthilo@gnu.org>
20215 * README: Document help-bison list.
20217 * configure.in: Add check for mkstemp().
20219 1999-01-20 Jesse Thilo <jthilo@gnu.org>
20221 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
20222 Hush a few compiler warnings.
20225 Add tryclose(), which verifies that fclose was successful.
20226 Hush a couple of compiler warnings.
20228 1999-01-20 Jesse Thilo <jthilo@gnu.org>
20230 * Makefile.am, OChangeLog:
20231 ChangeLog is now automatically generated. Include the old version as
20234 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20236 * 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:
20237 Update FSF address.
20239 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20241 * doc/bison.texinfo: Fix formatting glitch.
20243 * doc/bison.texinfo: Update FSF address.
20245 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20247 * acconfig.h: Update FSF address.
20249 1999-01-08 Jesse Thilo <jthilo@gnu.org>
20252 Don't define PACKAGE here, since config.h defines it.
20254 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20256 * src/reader.c: Update copyright date.
20259 Ditch sprintf to statically-sized buffers in fatal/warn functions in
20260 favor of output directly to stderr (avoids buffer overruns).
20262 * src/reader.c: Some checks for premature EOF.
20264 * 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:
20265 Use prototypes if the compiler understands them.
20267 * src/files.c: Honor TMPDIR on Unix hosts.
20268 Use prototypes if the compiler understands them.
20271 Fix a couple of buffer overrun bugs.
20272 Use prototypes if the compiler understands them.
20274 * src/system.h: Include unistd.h and ctype.h.
20275 Use #ifdef instead of #if for NLS symbols.
20277 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20279 * doc/bison.texinfo:
20280 Delete comment "consider using @set for edition number, etc..." since
20281 we now are doing so.
20283 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20286 Use prototypes if the compiler understands them.
20288 * NEWS: Document 1.26 highlights.
20290 * Makefile.am: Require Automake 1.3 or later.
20293 Use prototypes if the compiler understands them.
20295 1998-12-29 Jesse Thilo <jthilo@gnu.org>
20298 Use VERSION symbol from automake for version number.
20300 1998-12-29 Jesse Thilo <jthilo@gnu.org>
20302 * acconfig.h, configure.in, version.cin:
20303 Use VERSION symbol from automake for version number.
20305 1998-11-28 Jesse Thilo <jthilo@gnu.org>
20308 Distribute original version of simple parser (bison.s1), not built
20309 version (bison.simple).
20311 1998-11-28 Jesse Thilo <jthilo@gnu.org>
20313 * doc/bison.texinfo: Add info dir entry.
20315 * doc/bison.texinfo:
20316 Let automake put version number into documentation.
20318 1998-11-26 Jesse Thilo <jthilo@gnu.org>
20320 * src/bison.cld, src/build.com, src/vmshlp.mar:
20321 Add non-RCS files from /gd/gnu/bison.
20323 1998-11-26 Jesse Thilo <jthilo@gnu.org>
20326 Document the BISON_HAIRY and BISON_SIMPLE variables.
20328 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20330 * src/version.c: Build version.c automatically.
20333 Fix token numbering (used to start at 258, not 257).
20335 * src/system.h: Include config.h.
20337 * src/getargs.c: Update bug report address.
20339 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
20340 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
20342 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20345 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20347 * configure.in, version.cin:
20348 Build version.c automatically.
20350 * AUTHORS: Add AUTHORS file.
20352 * README: Update bug report address.
20355 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20357 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
20358 Add automake stuff.
20360 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20362 * doc/bison.texinfo: Clean up some formatting.
20364 1998-05-05 Richard Stallman <rms@gnu.org>
20366 * doc/bison.texinfo:
20367 Explain better why to make a pure parser.
20369 1998-01-05 Richard Stallman <rms@gnu.org>
20371 * src/files.c (openfiles):
20372 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
20373 find a temporary directory, if possible. Do not unlink files while
20376 1997-08-25 Richard Stallman <rms@gnu.org>
20378 * src/reader.c (stack_offset;):
20379 Change some warni to warns.
20381 * src/lex.c (literalchar): Use warns, not warni.
20383 1997-06-28 Richard Stallman <rms@gnu.org>
20385 * src/bison.s1: Add a Bison version comment.
20387 * src/main.c (fatal, warn, berror):
20390 1997-06-28 Richard Stallman <rms@gnu.org>
20392 * Makefile.in (bison_version): New variable.
20393 (dist): Use that variable.
20394 (bison.s1): Substitute the Bison version into bison.simple.
20396 * bison.simple: Add a Bison version comment.
20398 1997-06-18 Richard Stallman <rms@gnu.org>
20400 * src/main.c (fatal, warn, berror):
20401 Make error messages standard.
20402 (toomany): Improve error message text.
20404 * 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:
20405 new.h renamed to alloc.h.
20407 1997-06-18 Richard Stallman <rms@gnu.org>
20409 * Makefile.in: new.h renamed to alloc.h.
20411 1997-05-24 Richard Stallman <rms@gnu.org>
20413 * src/lex.c (literalchar):
20414 Fix the code for escaping \, " and '.
20416 (lex): Avoid trouble when there are many chars
20417 to discard in a char literal with just several chars in it.
20419 1997-05-17 Richard Stallman <rms@gnu.org>
20422 Use malloc, if using alloca is troublesome.
20423 (YYSTACK_USE_ALLOCA): New flag macro.
20424 Define it for some systems and compilers.
20425 (YYSTACK_ALLOC): New macro.
20426 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20427 If it was malloc'd, free it.
20429 1997-05-17 Richard Stallman <rms@gnu.org>
20432 Use malloc, if using alloca is troublesome.
20433 (YYSTACK_USE_ALLOCA): New flag macro.
20434 Define it for some systems and compilers.
20435 (YYSTACK_ALLOC): New macro.
20436 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20437 If it was malloc'd, free it.
20439 1997-04-23 Richard Stallman <rms@gnu.org>
20442 (alloca) [__hpux]: Always define as __builtin_alloca.
20444 1997-04-23 Richard Stallman <rms@gnu.org>
20447 (alloca) [__hpux]: Always define as __builtin_alloca.
20449 1997-04-22 Richard Stallman <rms@gnu.org>
20452 [__hpux]: Include alloca.h (right for HPUX 10)
20453 instead of declaring alloca (right for HPUX 9).
20455 * src/bison.s1 (__yy_memcpy):
20456 Declare arg `count' as unsigned int.
20457 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20459 1997-04-22 Richard Stallman <rms@gnu.org>
20462 [__hpux]: Include alloca.h (right for HPUX 10)
20463 instead of declaring alloca (right for HPUX 9).
20465 * bison.simple (__yy_memcpy):
20466 Declare arg `count' as unsigned int.
20467 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20469 1997-01-03 Richard Stallman <rms@gnu.org>
20471 * src/allocate.c: [__STDC__ or _MSC_VER]:
20472 Declare calloc and realloc to return void *.
20474 1997-01-02 Richard Stallman <rms@gnu.org>
20477 [_MSC_VER]: Include stdlib.h and process.h.
20478 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
20480 * src/main.c (main): Return FAILURE as a value.
20481 (printable_version): Declare arg as int, not char.
20483 1997-01-02 Richard Stallman <rms@gnu.org>
20485 * Makefile.in (dist):
20486 Explicitly check for symlinks, and copy them.
20488 1996-12-19 Richard Stallman <rms@gnu.org>
20491 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
20493 1996-12-18 Paul Eggert <eggert@gnu.org>
20495 * src/bison.s1 (yyparse):
20496 If __GNUC__ and YYPARSE_PARAM are both defined,
20497 declare yyparse to have a void * argument.
20499 1996-12-18 Paul Eggert <eggert@gnu.org>
20501 * bison.simple (yyparse):
20502 If __GNUC__ and YYPARSE_PARAM are both defined,
20503 declare yyparse to have a void * argument.
20505 1996-12-17 Richard Stallman <rms@gnu.org>
20507 * src/reduce.c (nbits): Add some casts.
20509 1996-08-12 Richard Stallman <rms@gnu.org>
20511 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20513 1996-08-12 Richard Stallman <rms@gnu.org>
20515 * bison.simple: Test _MSDOS as well as _MSDOS_.
20517 1996-07-31 Richard Stallman <rms@gnu.org>
20520 [__sun && __i386]: Include alloca.h.
20522 1996-07-31 Richard Stallman <rms@gnu.org>
20525 [__sun && __i386]: Include alloca.h.
20527 1996-07-30 Richard Stallman <rms@gnu.org>
20529 * src/bison.s1: Comment change.
20531 * src/bison.s1: Test _MSDOS_, not MSDOS.
20533 1996-07-30 Richard Stallman <rms@gnu.org>
20535 * bison.simple: Comment change.
20537 * bison.simple: Test _MSDOS_, not MSDOS.
20539 1996-06-01 Richard Stallman <rms@gnu.org>
20541 * 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:
20542 Insert `_' macro around many string constants.
20545 Insert `_' macro around many string constants.
20547 (main): Call setlocale, bindtextdomain and textdomain.
20549 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20550 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20551 [ENABLE_NLS]: Include libintl.h.
20552 [ENABLE_NLS] (gettext): Define.
20553 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20554 (N_, PACKAGE, LOCALEDIR): New macros.
20556 1996-06-01 Richard Stallman <rms@gnu.org>
20558 * POTFILES.in: New file.
20560 * Makefile.in (allocate.o):
20561 Define target explicitly.
20563 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20564 (LDFLAGS): Set to @LDFLAGS@.
20565 (configure): Run autoconf only if preceding `cd' succeeds.
20566 (bison.s1): Redirect output to temporary file then move the
20567 temporary to the target, rather than redirecting directly to bison.s1.
20568 (clean): Remove config.status and config.log.
20569 (distclean): Don't remove config.status here.
20571 1996-05-12 Richard Stallman <rms@gnu.org>
20574 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20576 1996-05-12 Richard Stallman <rms@gnu.org>
20579 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20581 1996-05-11 Richard Stallman <rms@gnu.org>
20583 * src/bison.s1 (__yy_memcpy):
20584 Really reorder the args, as was supposedly done on Feb 14 1995.
20585 (yyparse): Calls changed accordingly.
20587 1996-05-11 Richard Stallman <rms@gnu.org>
20589 * Makefile.in (dist): Don't use $(srcdir).
20591 * bison.simple (__yy_memcpy):
20592 Really reorder the args, as was supposedly done on Feb 14 1995.
20593 (yyparse): Calls changed accordingly.
20595 1996-01-27 Richard Stallman <rms@gnu.org>
20597 * src/output.c (output_rule_data):
20598 Test YYERROR_VERBOSE in the conditional
20599 around the definition of ttyname.
20601 1995-12-29 Richard Stallman <rms@gnu.org>
20604 Fix line numbers in #line commands.
20606 1995-12-29 Richard Stallman <rms@gnu.org>
20609 Fix line numbers in #line commands.
20611 1995-12-27 Richard Stallman <rms@gnu.org>
20613 * src/bison.s1 (YYPARSE_PARAM_DECL):
20614 In C++, make it always null.
20615 (YYPARSE_PARAM_ARG): New macro.
20616 (yyparse): Use YYPARSE_PARAM_ARG.
20618 1995-12-27 Richard Stallman <rms@gnu.org>
20620 * bison.simple (YYPARSE_PARAM_DECL):
20621 In C++, make it always null.
20622 (YYPARSE_PARAM_ARG): New macro.
20623 (yyparse): Use YYPARSE_PARAM_ARG.
20625 1995-11-29 Richard Stallman <rms@gnu.org>
20627 * doc/bison.texinfo:
20628 Describe literal string tokens, %raw, %no_lines, %token_table.
20630 1995-11-29 Daniel Hagerty <hag@gnu.org>
20632 * doc/bison.texinfo: Fixed update date
20634 1995-10-16 Richard Stallman <rms@gnu.org>
20636 * src/version.c: Version 1.25.
20638 1995-10-16 Richard Stallman <rms@gnu.org>
20640 * NEWS: *** empty log message ***
20642 1995-10-16 Richard Stallman <rms@gnu.org>
20644 * doc/bison.1, doc/bison.rnh:
20647 1995-10-15 Richard Stallman <rms@gnu.org>
20649 * src/vmsgetargs.c, src/getargs.c:
20650 Added -n, -k, and -raw switches.
20651 (noparserflag, toknumflag, rawtoknumflag): New variables.
20653 * src/symtab.h (SALIAS):
20654 New #define for adding aliases to %token.
20655 (struct bucket): Added `alias' field.
20657 * src/reduce.c (reduce_grammar):
20658 Revise error message.
20659 (print_notices): Remove final `.' from error message.
20661 * src/reader.c (reader_output_yylsp):
20663 (readgram): Use `#if 0' around code that accepted %command
20664 inside grammar rules: The documentation doesn't allow it,
20665 and it will fail since the %command processors scan for the next %.
20666 (parse_token_decl): Extended the %token
20667 declaration to allow a multi-character symbol as an alias.
20668 (parse_thong_decl): New function.
20669 (read_declarations): Added %thong declarations.
20670 (read_declarations): Handle NOOP to deal with allowing
20671 % declarations as another means to specify the flags.
20672 (readgram): Allow %prec prior to semantics embedded in a rule.
20673 (skip_to_char, read_declarations, copy_definition)
20674 (parse_token_decl, parse_start_decl, parse_type_decl)
20675 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20676 (get_type_name, copy_guard, copy_action, readgram)
20677 (get_type, packsymbols): Revised most error messages.
20678 Changed `fatal' to `warnxxx' to avoid aborting for error.
20679 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20680 (read_declarations): Improve the error message for
20681 an invalid character. Do not abort.
20682 (read_declarations, copy_guard, copy_action): Use
20683 printable_version to avoid unprintable characters in printed output.
20684 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20685 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20686 Allow the type of a non-terminal can be given
20687 more than once, as long as all specifications give the same type.
20690 (output_headers, output_trailers, output, output_gram)
20691 (output_rule_data): Implement noparserflag variable.
20692 Implement toknumflag variable.
20693 (output): Call reader_output_yylsp to output LTYPESTR.
20695 * src/main.c (main):
20696 If reader sees an error, don't process the grammar.
20697 (fatals): Updated to not use VARARGS1.
20698 (printable_version, int_to_string, warn, warni, warns, warnss)
20699 (warnsss): New error reporting functions. Avoid abort for error.
20702 Added THONG and NOOP for alias processing.
20703 Added SETOPT for the new code that allows setting options with %flags.
20706 Include getopt.h. Add some extern decls.
20707 (safegetc): New function to deal with EOF gracefully.
20708 (literalchar); new function to deal with reading \ escapes.
20709 (lex): Use literalchar.
20710 (lex): Implemented "..." tokens.
20711 (literalchar, lex, parse_percent_token): Made tokenbuffer
20712 always contain the token. This includes growing the token
20713 buffer while reading an integer.
20714 (parse_percent_token): Replaced if-else statement with percent_table.
20715 (parse_percent_token): Added % declarations as another
20716 way to specify the flags -n, -l, and -r. Also added hooks for
20717 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20718 major changes to files.c.
20719 (lex) Retain in the incoming stream a character following
20721 (skip_white_space, lex): Revised most error messages
20722 and changed fatal to warn to avoid aborting.
20723 (percent_table): Added %thong declarations.
20725 * src/gram.h: Comment changes.
20727 * src/files.c (openfiles, open_extra_files, done):
20729 and actfile file. Handle noparserflag. Both for -n switch.
20731 * src/conflicts.c (resolve_sr_conflict):
20732 Remove use of alloca.
20734 1995-06-01 Jim Meyering <meyering@gnu.org>
20736 * doc/bison.texinfo: *** empty log message ***
20738 1995-05-06 Richard Stallman <rms@gnu.org>
20740 * src/bison.s1: Comment change.
20742 1995-05-06 Richard Stallman <rms@gnu.org>
20744 * bison.simple: Comment change.
20746 1995-05-03 Richard Stallman <rms@gnu.org>
20748 * src/version.c: Version now 1.24.
20750 * src/bison.s1: Change distribution terms.
20752 * src/version.c: Version now 1.23.
20754 1995-05-03 Richard Stallman <rms@gnu.org>
20756 * doc/bison.texinfo:
20757 Rewrite "Conditions for Using Bison".
20758 Update version to 1.24.
20760 1995-05-03 Richard Stallman <rms@gnu.org>
20762 * bison.simple: Change distribution terms.
20764 1995-02-23 Richard Stallman <rms@gnu.org>
20766 * src/files.c: Test __VMS_POSIX as well as VMS.
20768 1995-02-14 Jim Meyering <meyering@gnu.org>
20770 * src/bison.s1 (__yy_memcpy):
20771 Renamed from __yy_bcopy to avoid
20772 confusion. Reverse FROM and TO arguments to be consistent with
20775 1995-02-14 Jim Meyering <meyering@gnu.org>
20777 * bison.simple (__yy_memcpy):
20778 Renamed from __yy_bcopy to avoid
20779 confusion. Reverse FROM and TO arguments to be consistent with
20782 1994-11-10 David J. MacKenzie <djm@gnu.org>
20788 * Makefile.in (DISTFILES): Include NEWS.
20790 * Makefile.in (DISTFILES):
20791 Include install-sh, not install.sh.
20793 * configure.in: Update to Autoconf v2 macro names.
20795 1994-10-05 David J. MacKenzie <djm@gnu.org>
20797 * Makefile.in: fix typo
20799 * Makefile.in (prefix, exec_prefix):
20800 Let configure set them.
20802 1994-09-28 David J. MacKenzie <djm@gnu.org>
20804 * Makefile.in: Set datadir to $(prefix)/share.
20806 1994-09-15 Richard Stallman <rms@gnu.org>
20809 Update copyright notice and GPL version.
20811 1994-09-15 Richard Stallman <rms@gnu.org>
20814 Update copyright notice and GPL version.
20816 1994-07-12 Richard Stallman <rms@gnu.org>
20818 * src/reduce.c, src/reader.c:
20821 1994-05-05 David J. MacKenzie <djm@gnu.org>
20823 * Makefile.in: entered into RCS
20825 1994-03-26 Richard Stallman <rms@gnu.org>
20827 * src/bison.s1: entered into RCS
20829 1994-03-26 Richard Stallman <rms@gnu.org>
20831 * bison.simple: entered into RCS
20833 1994-03-25 Richard Stallman <rms@gnu.org>
20835 * src/main.c: entered into RCS
20837 1994-03-24 Richard Stallman <rms@gnu.org>
20839 * src/conflicts.c: entered into RCS
20841 1994-01-02 Richard Stallman <rms@gnu.org>
20843 * Makefile.in: *** empty log message ***
20845 1993-11-21 Richard Stallman <rms@gnu.org>
20847 * src/bison.s1: *** empty log message ***
20849 1993-11-21 Richard Stallman <rms@gnu.org>
20851 * doc/bison.texinfo: entered into RCS
20853 * doc/bison.texinfo: *** empty log message ***
20855 1993-11-21 Richard Stallman <rms@gnu.org>
20857 * bison.simple: *** empty log message ***
20859 1993-10-25 David J. MacKenzie <djm@gnu.org>
20861 * doc/bison.texinfo: *** empty log message ***
20863 1993-10-19 Richard Stallman <rms@gnu.org>
20865 * src/bison.s1: *** empty log message ***
20867 1993-10-19 Richard Stallman <rms@gnu.org>
20869 * bison.simple: *** empty log message ***
20871 1993-10-14 Richard Stallman <rms@gnu.org>
20873 * src/bison.s1: *** empty log message ***
20875 1993-10-14 Richard Stallman <rms@gnu.org>
20877 * bison.simple: *** empty log message ***
20879 1993-09-14 David J. MacKenzie <djm@gnu.org>
20881 * doc/bison.texinfo: *** empty log message ***
20883 1993-09-13 Noah Friedman <friedman@gnu.org>
20885 * Makefile.in: *** empty log message ***
20887 1993-09-10 Richard Stallman <rms@gnu.org>
20889 * src/conflicts.c: *** empty log message ***
20891 * src/system.h: entered into RCS
20893 1993-09-10 Richard Stallman <rms@gnu.org>
20895 * doc/bison.1: entered into RCS
20897 1993-09-06 Noah Friedman <friedman@gnu.org>
20899 * src/version.c: entered into RCS
20901 1993-09-06 Noah Friedman <friedman@gnu.org>
20903 * Makefile.in: *** empty log message ***
20905 1993-07-30 David J. MacKenzie <djm@gnu.org>
20907 * Makefile.in: *** empty log message ***
20909 1993-07-24 Richard Stallman <rms@gnu.org>
20911 * src/bison.s1: *** empty log message ***
20913 1993-07-24 Richard Stallman <rms@gnu.org>
20915 * bison.simple: *** empty log message ***
20917 1993-07-08 David J. MacKenzie <djm@gnu.org>
20919 * Makefile.in: *** empty log message ***
20921 1993-07-04 Richard Stallman <rms@gnu.org>
20923 * src/bison.s1: *** empty log message ***
20925 1993-07-04 Richard Stallman <rms@gnu.org>
20927 * bison.simple: *** empty log message ***
20929 1993-06-26 David J. MacKenzie <djm@gnu.org>
20931 * src/getargs.c: entered into RCS
20933 1993-06-26 David J. MacKenzie <djm@gnu.org>
20935 * doc/bison.texinfo: *** empty log message ***
20937 * doc/bison.1: New file.
20939 1993-06-25 Richard Stallman <rms@gnu.org>
20941 * src/getargs.c: New file.
20943 1993-06-16 Richard Stallman <rms@gnu.org>
20945 * src/bison.s1: *** empty log message ***
20947 1993-06-16 Richard Stallman <rms@gnu.org>
20949 * bison.simple: *** empty log message ***
20951 1993-06-03 Richard Stallman <rms@gnu.org>
20953 * src/bison.s1: New file.
20955 1993-06-03 Richard Stallman <rms@gnu.org>
20957 * doc/bison.texinfo: *** empty log message ***
20959 1993-06-03 Richard Stallman <rms@gnu.org>
20961 * bison.simple: New file.
20963 1993-05-19 Richard Stallman <rms@gnu.org>
20965 * doc/bison.texinfo: New file.
20967 1993-05-07 Noah Friedman <friedman@gnu.org>
20969 * Makefile.in: *** empty log message ***
20971 1993-04-28 Noah Friedman <friedman@gnu.org>
20973 * src/reader.c: *** empty log message ***
20975 1993-04-23 Noah Friedman <friedman@gnu.org>
20977 * src/alloc.h: entered into RCS
20979 1993-04-20 David J. MacKenzie <djm@gnu.org>
20981 * src/version.c: *** empty log message ***
20983 * src/files.c, src/allocate.c:
20986 * src/reader.c: *** empty log message ***
20988 * src/lex.c: entered into RCS
20990 * src/conflicts.c: New file.
20992 * src/symtab.c: entered into RCS
20994 * src/alloc.h: New file.
20996 * src/LR0.c: entered into RCS
20998 1993-04-18 Noah Friedman <friedman@gnu.org>
21000 * src/reader.c: New file.
21002 * src/version.c: *** empty log message ***
21004 1993-04-18 Noah Friedman <friedman@gnu.org>
21006 * Makefile.in: *** empty log message ***
21008 1993-04-17 Noah Friedman <friedman@gnu.org>
21010 * Makefile.in: *** empty log message ***
21012 1993-04-15 Richard Stallman <rms@gnu.org>
21014 * src/main.c, src/files.c:
21017 1993-04-15 Noah Friedman <friedman@gnu.org>
21019 * configure.in: entered into RCS
21021 * configure.in: *** empty log message ***
21023 * configure.in: New file.
21025 1993-04-14 Richard Stallman <rms@gnu.org>
21027 * Makefile.in: New file.
21029 1993-04-13 Richard Stallman <rms@gnu.org>
21031 * src/version.c: New file.
21033 1993-03-25 Richard Stallman <rms@gnu.org>
21035 * src/output.c: entered into RCS
21037 1992-09-25 Richard Stallman <rms@gnu.org>
21039 * configure.bat: entered into RCS
21041 1992-06-22 Richard Stallman <rms@gnu.org>
21043 * src/vmsgetargs.c: entered into RCS
21045 1992-06-22 Richard Stallman <rms@gnu.org>
21047 * doc/bison.rnh: entered into RCS
21049 1992-04-20 David J. MacKenzie <djm@gnu.org>
21051 * README: entered into RCS
21053 1992-01-22 Richard Stallman <rms@gnu.org>
21055 * src/machine.h: entered into RCS
21057 1991-12-21 Richard Stallman <rms@gnu.org>
21059 * src/lalr.c, src/closure.c:
21062 1991-12-20 Richard Stallman <rms@gnu.org>
21064 * src/state.h: entered into RCS
21066 1991-12-18 Richard Stallman <rms@gnu.org>
21068 * src/print.c, src/nullable.c, src/derives.c:
21071 1991-11-03 David J. MacKenzie <djm@gnu.org>
21073 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
21076 1988-09-09 Richard Stallman <rms@gnu.org>
21078 * src/bison.hairy: entered into RCS
21080 1987-12-16 Richard Stallman <rms@gnu.org>
21082 * REFERENCES: entered into RCS
21087 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
21088 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
21089 Free Software Foundation, Inc.
21091 Copying and distribution of this file, with or without
21092 modification, are permitted provided the copyright notice and this
21093 notice are preserved.