]> git.saurik.com Git - bison.git/blob - ChangeLog
tests: distcc compliance.
[bison.git] / ChangeLog
1 2009-08-19 Akim Demaille <demaille@gostai.com>
2
3 tests: distcc compliance.
4 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
5 error messages from the output.
6
7 2009-08-19 Akim Demaille <demaille@gostai.com>
8
9 variables: simplify the upgrade of namespace into api.namespace.
10
11 This patch simplifies "variables: rename namespace as
12 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
13 Suggested by Joel E. Denny in
14 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
15
16 * src/muscle-tab.c (muscle_percent_variable_update): New.
17 (muscle_percent_define_insert): Use it in replacement of the
18 previous tr invocation.
19 Remove variable_tr, no longer needed.
20 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
21 Remove.
22 * data/c++.m4: No longer handle namespace -> api.namespace.
23 * tests/input.at (%define backward compatibility): Check that
24 namespace is treated as api.namespace.
25
26 2009-08-19 Akim Demaille <demaille@gostai.com>
27
28 doc: %initial-action to initialize yylloc.
29 Reported by Bill Allombert.
30 * doc/bison.texinfo: Set fill-column to 76.
31 (Location Type): Document the use of %initial-action to initialize
32 yylloc.
33
34 2009-08-19 Akim Demaille <demaille@gostai.com>
35
36 lalr1.cc: use state_type.
37 * data/lalr1.cc (yysyntax_error_): Use state_type.
38 Move argument names into yy*.
39
40 2009-08-19 Akim Demaille <demaille@gostai.com>
41
42 lalr1.cc: get rid of yyparse's yystate.
43 yystate and yystack_[0].state are equal, keep only the latter.
44 The former was also used as a temporary variable to compute the
45 post-reduction state. Move this computation into an auxiliary
46 function.
47
48 * data/glr.c (yyLRgotoState): Fuse variable definition and first
49 assignment.
50 * data/lalr1.cc (yy_lr_goto_state_): New.
51 (yyparse): Use it.
52 Replace remaining uses of yystate by yystate_[0].state.
53 Remove the former.
54
55 2009-08-19 Akim Demaille <demaille@gostai.com>
56
57 lalr1.cc: destroy $$ when YYERROR is called.
58 * data/lalr1.cc (yyreduce): Compute the resulting state before
59 running the user action so that yylhs is a valid symbol.
60 (yyerrorlab): Since yylhs is complete (it knows its type), we can
61 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
62 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
63
64 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
65
66 maint: update for gnulib's recent update-copyright changes
67 * gnulib: Update.
68 * .x-update-copyright (COPYING): Add as it's no longer implied
69 when .x-update-copyright is present.
70 * cfg.mk (update-copyright-local): Remove, now ignored.
71 (update-copyright): Declare update-b4-copyright as a dependency.
72
73 2009-08-17 Akim Demaille <demaille@gostai.com>
74
75 build: require gettext 0.17.
76
77 Suggested by Bruno Haible.
78 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
79 * configure.ac: require gettext 0.17 to ensure compatibility with
80 gnulib.
81
82 2009-08-17 Akim Demaille <demaille@gostai.com>
83
84 build: lower gettext requirements.
85
86 Bison was uselessly requiring the formatstring macros from
87 gettext, which resulted in mo files not being installed on systems
88 that perfectly supported Bison mo files. Lower the requirement.
89 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
90
91 * configure.ac: Require need-ngettext instead of
92 need-formatstring-macros.
93 Reported by Martin Jabocs.
94 Suggested by Bruno Haible.
95 * INSTALL: Restructure.
96 (Internationalization): New.
97
98 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
99
100 maint: fix use of copyright year intervals.
101 * gnulib: Update.
102 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
103 as now recommended in gnulib/NEWS.
104 * build-aux/update-b4-copyright: Fix.
105 * cfg.mk (update-copyright-env): Configure update-copyright.
106
107 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
108
109 Make it easier to write deterministic tests.
110 Continues Akim's work from his 2009-06-10 commits.
111 * src/reader.c (check_and_convert_grammar): Don't add any
112 symbols after the first symbols_do invocation.
113 * src/symtab.c (symbols_sorted): New static global.
114 (user_token_number_redeclaration): Update comments.
115 (symbol_from_uniqstr): If a new symbol is being created, assert
116 that symbols_sorted hasn't been allocated yet.
117 (symbols_free): Free symbols_sorted.
118 (symbols_cmp, symbols_cmp_qsort): New functions.
119 (symbols_do): Sort symbol_table into symbols_sorted on first
120 invocation.
121 * tests/input.at (Numbered tokens): Recombine tests now that the
122 output should be deterministic across multiple numbers.
123
124 2009-08-12 Akim Demaille <demaille@gostai.com>
125
126 tests: GCC 4.5 compliance.
127 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
128 messages about #error.
129
130 2009-08-12 Akim Demaille <demaille@gostai.com>
131
132 build: fix the generation of the documentation.
133 Some of our targets use "bison --help", but they can't depend on
134 "bison" itself (to avoid additional requirements on the user), so
135 they used to call "make src/bison" in the commands. Then
136 concurrent builds may fail: one make might be aiming one of its
137 jobs at compiling src/bison, and another job at generating the man
138 page. If the latter is faster than the former, then we have two
139 makes that concurrently try to compile src/bison.
140
141 This might also be a more convincing explanation for the failure
142 described in the patch "build: fix paths".
143
144 * Makefile.am (SUFFIXES): Initialize.
145 * build-aux/move-if-change: New, symlink to gnulib's.
146 * build-aux/local.mk: Ship it.
147 * doc/common.x: Remove, merged into...
148 * doc/bison.x: here.
149 * doc/local.mk (doc/bison.help): New.
150 ($(CROSS_OPTIONS_TEXI)): Depend on it.
151 Use src/bison.
152 (.x.1): Replace with...
153 (doc/bison.1): this explicit, simpler, target.
154 (common_dep): Remove, inlined where appropriate.
155 (SUFFIXES, PREPATH): Remove, unused.
156
157 2009-08-12 Akim Demaille <demaille@gostai.com>
158
159 gnulib: improve prefixing.
160 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
161 change the value of...
162 (gl_LIBOBJS): this.
163 Adjust more variables.
164 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
165 gl_LIBOBJS.
166 (prefix): Also transform rules whose targets have slashes.
167 Use $prefix liberally.
168 Map @MKDIR_P@ to $(MKDIR_P).
169 Prefix directories that are mkdir'd.
170
171 2009-08-12 Akim Demaille <demaille@gostai.com>
172
173 build: fix paths.
174 When using $(top_builddir) inconsistently, Make (including GNU
175 Make) is sometimes confused. As a result it may want to build
176 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
177 file, different names) concurrently, which, amusingly enough,
178 might end with:
179
180 ranlib lib/libbison.a
181 ranlib lib/libbison.a
182 make[2]: *** [lib/libbison.a] Segmentation fault
183
184 on OS X.
185
186 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
187 needed.
188
189 2009-08-12 Akim Demaille <demaille@gostai.com>
190
191 distcheck: fix.
192
193 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
194
195 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
196
197 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
198
199 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
200
201 Miscellaneous code readability improvements.
202
203 * src/reader.c (reader): Move %define front-end variable
204 defaults and checking into...
205 (prepare_percent_define_front_end_variables): ... this new
206 function.
207
208 * src/scan-gram.l (INITIAL): For consistency with string
209 literals, don't store open quote on character literal. It's
210 discarded before returning anyway.
211 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
212 Make length test more readable, and make the character stored
213 for an empty literal more obvious while consistent with the
214 previous behavior.
215
216 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
217 USER_NUMBER_HAS_STRING_ALIAS throughout.
218 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
219 that is repeated in symtab.h. Improve argument names to make it
220 clear which side of the symbol-string alias pair is which.
221 (symbol_check_alias_consistency): Improve local variable names
222 for the same purpose.
223 * src/symtab.h (struct symbol): Make comments about aliases
224 clearer.
225 (symbol_make_alias): Improve comments and argument name.
226 * src/output.c (token_definitions_output): Update for rename to
227 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
228
229 2009-08-08 Alex Rozenman <rozenman@gmail.com>
230
231 Convert "misleading reference" messages to warnings.
232 * src/scan-code.l: New function 'show_sub_messages', more
233 factoring.
234 * tests/named-ref.at: Adjust tests.
235
236 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
237
238 maint: run "make update-copyright"
239
240 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
241
242 maint: make update-b4-copyright easier to use
243 * build-aux/update-b4-copyright: In warnings, report line
244 numbers rather than character positions.
245 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
246 that update-copyright runs it.
247 * gnulib: Update.
248
249 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
250
251 maint: clean up update-b4-copyright code
252 * build-aux/update-b4-copyright: Do not accept 2-digit
253 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
254 Don't accept a `[' in a b4_copyright argument.
255 Format code more consistently.
256 Don't assume b4*copyright never occurs.
257
258 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
259
260 maint: automate b4_copyright updates.
261 * Makefile.am (update-b4-copyright): New target rule.
262 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
263 * build-aux/update-b4-copyright: New.
264 * data/yacc.c: Remove stray characters around b4_copyright
265 invocations.
266
267 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
268
269 maint: automate annual package-wide copyright-year update.
270 * .x-update-copyright: New.
271 * Makefile.am (EXTRA_DIST): Remove maint.mk.
272 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
273 update-copyright. Remove gnumakefile, which is implied by
274 maintainer-makefile.
275 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
276 * gnulib: Update.
277 * maint.mk: Remove, now copied from gnulib.
278 * examples/extexi: Add missing "(C)" in copyright statement so
279 update-copyright can recognize it.
280 * src/LR0.h: Likewise.
281 * src/print.h: Likewise.
282 * src/print_graph.h: Likewise.
283 * src/gram.c: Add missing comma in copyright statement.
284 * src/gram.h: Likewise.
285
286 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
287
288 Fix "make distcheck".
289 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
290 of just calc.stamp.
291
292 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
293
294 Pacify "gcc -Wunused" for the input function from Flex.
295 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
296 and later.
297 * src/scan-code.l: Add "%option noinput", which I cannot find in
298 the Flex manual, but which Flex has supported since at least as
299 far back as 2.5.4. However, if any of our developers still use
300 Flex 2.5.4, they'll need to stop configuring with
301 --enable-gcc-warnings because "%option noinput" didn't work
302 correctly until Flex 2.5.6.
303 * src/scan-gram.l: Likewise.
304 * src/scan-skel.l: Likewise.
305
306 2009-07-31 Alex Rozenman <rozenman@gmail.com>
307
308 Fix --enable-gcc-warnings problems.
309 * src/reader.c: Adjust variable names.
310 * src/scan-code.l: Fix prototypes and adjust names.
311 * src/named-ref.c: Remove redundant "if".
312
313 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
314
315 Fix a --enable-gcc-warnings problem.
316 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
317 variable.
318
319 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
320
321 Warn about character literals not of length one.
322 * NEWS (2.5): Document.
323 * src/scan-gram.l (INITIAL): Remove comment that we don't check
324 the length.
325 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
326 * tests/input.at (Bad character literals): New test group.
327
328 2009-07-24 Alex Rozenman <rozenman@gmail.com>
329
330 Fix some memory leaks.
331 * src/named-ref.c: Add a pointer check (named_ref_free).
332 * src/scan-code.l: New function (variant_table_free). Called in
333 code_scanner_free.
334 * src/symlist.c: Call to named_ref_free (symbol_list_free).
335
336 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
337
338 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
339
340 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
341
342 Some M4 cleanup in the testsuite.
343 Suggested by Eric Blake at
344 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
345 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
346 complicate the code by distinguishing between a missing value
347 and an empty string value for an optional argument. This fix is
348 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
349 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
350 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
351 arguments are not needed because of the following changes.
352 Fix stale comments.
353 Bison developers should use GNU M4 and should not use
354 POSIXLY_CORRECT when building the test suite, so do not
355 complicate the code by avoiding $10 and above.
356 Do not quote an empty string value for an optional argument, and
357 do not distinguish between a missing value and an empty string
358 value.
359
360 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
361
362 Revert unnecessary column realignment in --help output.
363 Reported by Akim Demaille at
364 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
365 * src/getargs.c (usage): Here.
366
367 2009-07-04 Alex Rozenman <rozenman@gmail.com>
368
369 Alphabetical order in src/local.mk.
370 * src/local.mk: Adjust.
371
372 2009-07-04 Alex Rozenman <rozenman@gmail.com>
373
374 Style changes and factoring.
375 * src/named-ref.h: Add comments.
376 * src/parse-gram.y: Readability and style changes.
377 * src/reader.c: Factoring: assign_named_ref function.
378 * src/scan-code.l: Factoring and style changes. Rename
379 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
380 Use "unsigned" type for variant index. Improve readablity.
381 * src/scan-gram.l: Change error messages and add comments.
382 * src/symlist.h: symbol_list_null: New function decl.
383 * src/symlist.c: symbol_list_null: Implement here.
384 * tests/named-refs.at: Adjust for new error messages.
385
386 2009-06-29 Eric Blake <ebb9@byu.net>
387
388 scan-code: avoid compiler warnings
389 * src/scan-code.l (parse_named_ref): Use correct specifiers.
390
391 2009-06-29 Akim Demaille <demaille@gostai.com>
392
393 build: avoid concurrent extraction of calc++.
394 * examples/calc++/Makefile.am (calc.stamp): New.
395 Depend on it to create the sources of calc++ so that concurrent
396 builds don't launch several "extexi" in parallel.
397 Not only this is inefficient, this also builds incorrect sources
398 with several extractions mixed together.
399
400 2009-06-29 Akim Demaille <demaille@gostai.com>
401
402 parse.error: fix.
403 * data/bison.m4: Move code related to specific variables after the
404 definition of the variable-maintaining macros so that we don't
405 "invoke" b4_percent_define_check_values before it is defined.
406
407 2009-06-29 Akim Demaille <demaille@gostai.com>
408
409 variables: parse.error
410
411 Implement, document, and test the replacement of %error-verbose
412 by %define parse.error "verbose".
413 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
414 values of the parse.error variable.
415 Make "simple" its default value.
416 Check the valid values.
417 * src/parse-gram.y: Use %define parse.error.
418 (PERCENT_ERROR_VERBOSE): New token.
419 Support it.
420 * src/scan-gram.l: Support %error-verbose.
421
422 * doc/bison.texinfo (Decl Summary): Replace the documentation of
423 %define error-verbose by that of %define parse.error.
424 * NEWS: Document it.
425
426 * tests/actions.at, tests/calc.at: Use parse.error instead of
427 %error-verbose.
428
429 2009-06-27 Alex Rozenman <rozenman@gmail.com>
430
431 Implement support for named symbol references.
432 * src/parse-gram.y: Add new syntax (named_ref.opt).
433 * src/reader.c: Store named refs in symbol lists.
434 * src/reader.h: New argument for symbol_append and
435 action_append functions.
436 * src/scan-code.h: Add new field (named_ref) into
437 code_props data structure. Keeps named ref of midrule
438 actions.
439 * src/scan-code.l: Support for named refs in semantic
440 action code. New function 'parse_named_ref'.
441 * src/scan-gram.l: Support bracketed id.
442 * src/symlist.c: Store named refs in symbol lists.
443 * src/symlist.h: New field in symbol list: named_ref.
444 * src/named-ref.h: New file, a struct for named_ref.
445 * src/named-ref.cp: New file, named_ref_new function.
446 * src/local.mk: Add two new files.
447 * tests/testsuite.at: Include new test group:
448 * tests/named-refs.at: this new file.
449
450 2009-06-25 Akim Demaille <demaille@gostai.com>
451
452 hash: check insertion for memory exhaustion.
453 * src/uniqstr.c (uniqstr_new): New.
454
455 2009-06-24 Akim Demaille <demaille@gostai.com>
456
457 variables: rename namespace as api.namespace.
458 Discussed in
459 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
460
461 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
462 New.
463 (b4_percent_define_use): New.
464 Use it where applicable.
465 * data/c++.m4: Replace uses of the variable "namespace" by
466 "api.namespace".
467 Default the latter to the former.
468 * doc/bison.texinfo (Decl Summary): Document "namespace" as
469 obsolete.
470 Document api.namespace.
471 Use @samp to document %define uses, keep @code for identifiers.
472 * NEWS: Likewise.
473 * tests/c++.at, tests/input.at: Test api.namespace instead of
474 namespace. (The tests passed with namespace.)
475
476 2009-06-11 Akim Demaille <demaille@gostai.com>
477
478 style changes.
479 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
480 * src/print-xml.c: Style changes.
481 * tests/conflicts.at: Comment changes.
482
483 2009-06-11 Akim Demaille <demaille@gostai.com>
484
485 xml: beware of user strings used to give a %prec to rules.
486 * tests/conflicts.at (%prec with user strings): New.
487 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
488 XML output.
489
490 2009-06-11 Akim Demaille <demaille@gostai.com>
491
492 hash: check insertion for memory exhaustion.
493 * src/muscle-tab.c (muscle_insert, muscle_grow)
494 * src/state.c (state_hash_insert): Check the return value of
495 hash_insert.
496
497 2009-06-11 Akim Demaille <demaille@gostai.com>
498
499 tests: honor TESTSUITEFLAGS in every check target.
500 * tests/local.mk (RUN_TESTSUITE): New.
501 (check-local, installcheck-local, maintainer-check-g++)
502 (maintainer-check-posix, maintainer-check-valgrind): Use it.
503
504 2009-06-10 Akim Demaille <demaille@gostai.com>
505
506 deterministic test suite.
507 Some consistency checks on symbols are performed after all the
508 symbols were read, by an iteration over the symbol table. This
509 traversal is nondeterministic, which can be a problem for test
510 cases.
511 Avoid this.
512 Addresses another form of nondeterminism reported by Joel E. Denny.
513 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
514
515 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
516 test in two.
517 Use different file names for the three tests to make the
518 maintenance easier.
519
520 2009-06-10 Akim Demaille <demaille@gostai.com>
521
522 gnulib: update.
523 * gnulib: Update to latest.
524 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
525 * m4/.gitignore: Regen.
526 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
527 Call xalloc_die on hash_insert failures.
528 Requested by the new __warn_unused_result__ attribute of
529 hash_insert.
530
531 2009-06-10 Akim Demaille <demaille@gostai.com>
532
533 deterministic user-token-number redeclaration errors.
534 Address nondeterminism reported by Joel E. Denny.
535 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
536
537 * src/uniqstr.h: Comment changes.
538 * src/location.h (boundary_cmp, location_cmp): New.
539 * src/symtab.c (user_token_number_redeclaration): New.
540 (symbol_translation): Use it.
541 * tests/input.at (Numbered tokens): Adjust the expected output.
542
543 2009-05-25 Akim Demaille <demaille@gostai.com>
544
545 build: avoid ignored errors.
546 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
547 errors, they pollute the output.
548
549 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
550
551 Convert multiple variable definition warnings to complaints.
552 * NEWS (2.5): Add a new entry for that change.
553 * doc/bison.texinfo (Decl Summary): Update %define entry.
554 (Bison Options): Update -D/--define/-F/--force-define entry.
555 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
556 * src/muscle-tab.h (muscle_percent_define_insert): Update
557 comments.
558 * tests/input.at (`%define errors'): Update.
559 (`%define, --define, --force-define'): Update.
560
561 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 -F/--force-define and relative %define/-D/--define priorities.
564 * NEWS (2.5): Add documentation to -D/--define entry.
565 * build-aux/cross-options.pl: Hard-code association of
566 --force-define with %define.
567 * doc/bison.texinfo (Decl Summary): In %define entry,
568 cross-reference command-line options.
569 (Bison Options): Add documentation to -D/--define entry.
570 (Option Cross Key): Widen column for --force-define row.
571 * src/getargs.c (usage): Document -F/--force-define. Realign
572 options in output.
573 (short_options, long_options, getargs): Parse -F/--force-define,
574 and update muscle_percent_define_insert invocations.
575 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
576 (muscle_percent_define_insert): Add argument with that type.
577 * src/muscle-tab.c (muscle_percent_define_insert): Implement
578 -F/--force-define behavior and priorities.
579 (muscle_percent_define_ensure): Update
580 muscle_percent_define_insert invocation.
581 * src/parse-gram.y (prologue_declaration): Update
582 muscle_percent_define_insert invocations.
583 * tests/input.at (`%define, --define'): Rename to...
584 (`%define, --define, --force-define'): ... this and extend.
585
586 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
587
588 Update some comments to make sense for -D.
589 * data/bison.m4 (b4_check_user_names): In header comments, say
590 "user occurrence" instead of "grammar occurrence".
591 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
592 (muscle_percent_code_grow): Likewise just for consistency.
593
594 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
595
596 * data/c++.m4 (b4_namespace_close): Simplify slightly.
597
598 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
599
600 Handle a trailing `:' in a user-supplied C++ namespace better.
601 * data/c++.m4 (b4_namespace_close): Don't let it be printed
602 among the closing braces here. This fix might make the
603 generated code easier to debug, but otherwise it should be
604 insignificant because a trailing `:' is a C++ error already.
605
606 2009-05-19 Akim Demaille <demaille@gostai.com>
607
608 remove useless variable.
609 * src/getargs.c (skeleton_arg): Remove now useless variable.
610 Should help the compiler see that this printf-like call is sane.
611
612 2009-05-15 Akim Demaille <demaille@gostai.com>
613
614 Rename token.prefix as api.tokens.prefix.
615 Discussed here.
616 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
617
618 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
619 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
620 (token.prefix): Rename as...
621 (api.tokens.prefix): this.
622
623 2009-05-11 Akim Demaille <demaille@gostai.com>
624
625 doc: use C++ headers.
626 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
627 headers.
628
629 2009-05-11 Akim Demaille <demaille@gostai.com>
630
631 doc: token.prefix
632 * doc/bison.simple (Decl Summary): Document token.prefix.
633 (Calc++ Parser): Various fixes.
634 Formatting changes.
635 Use token.prefix.
636 Introduce a macro TOKEN to shorten the code and make it more
637 readable.
638 (Calc++ Scanner): Adjust.
639 * NEWS (Variable token.prefix): New.
640
641 2009-05-04 Akim Demaille <demaille@gostai.com>
642
643 bison: catch bad symbol names.
644 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
645 * tests/input.at: Adjust.
646
647 2009-05-04 Akim Demaille <demaille@gostai.com>
648
649 identifiers: dashes are letters.
650 Dashes can now start identifiers (symbols and directives).
651
652 * src/scan-gram.l ({letter}): Add dash.
653 ({id}): Remove it.
654 * tests/input.at (Symbols): Adjust.
655 Remove stray comment.
656 * tests/regression.at (Invalid inputs): Adjust error message.
657 * doc/bison.texinfo (Symbols): Update.
658
659 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
660
661 Declare %code to be a permanent feature.
662 * NEWS (2.4.2): Here.
663 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
664 experimental.
665 (Decl Summary): Likewise.
666
667 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
668
669 Convert underscores to dashes in some %define variable names.
670 For now, just api.push-pull and lr.keep-unreachable-states.
671 Maintain old names for backward compatibility.
672 * NEWS (2.5): Document.
673 * data/c.m4 (b4_identification): Update comment.
674 * data/yacc.c: Update access.
675 * doc/bison.texinfo: Update.
676 * etc/bench.pl.in (bench_push_parser): Update use.
677 * src/files.c (tr): Move to...
678 * src/getargs.c, src/getargs.h (tr): ... here because I can't
679 think of a better place to expose it. My logic is that, for all
680 uses of tr so far, command-line arguments can be involved, and
681 getargs.h is already included.
682 * src/main.c (main): Update access.
683 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
684 variable names to new variable names before assigning value.
685 * src/reader.c (reader): Update setting default.
686 * tests/calc.at: Update uses.
687 * tests/conflicts.at (Unreachable States After Conflict
688 Resolution): Update use.
689 * tests/input.at (%define enum variables): Update use.
690 (%define backward compatibility): New test group.
691 * tests/push.at: Update uses.
692 * tests/reduce.at: Update uses.
693 * tests/torture.at: Update uses.
694
695 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
696
697 Set all front-end %define defaults in one place.
698 * src/main.c (main): Move lr.keep_unreachable_states default...
699 * src/reader.c (reader): ... to here.
700
701 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
702
703 Rename lr.default_reductions to lr.default-reductions.
704 * NEWS (2.5): Here.
705 * doc/bison.texinfo: Here.
706 * src/lalr.c (initialize_LA): Here.
707 * src/print.c (print_reductions): Here.
708 * src/reader.c (reader): Here.
709 * src/tables.c (action_row): Here.
710 * tests/input.at (%define enum variables): Here.
711 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
712
713 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
714
715 Pacify ./configure --enable-gcc-warnings.
716 * tests/input.at (Symbols): Prototype yyerror and yylex.
717
718 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
719
720 Document how `%define "var" "value"' is not M4-friendly.
721 * src/parse-gram.y (variable): In comments here.
722
723 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
724
725 Clean up recent patches a little.
726 Reported by Akim Demaille.
727 * doc/bison.texinfo (Understanding): Fix typos.
728 * src/print.c (print_reductions): Don't use negated variable.
729
730 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
731
732 List accepted values for a %define enum variable with an invalid value.
733 Suggested by Akim Demaille at
734 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
735 * data/bison.m4 (_b4_percent_define_check_values): Implement.
736 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
737 * tests/input.at (%define lr.default_reductions invalid values): Merge
738 into...
739 (%define enum variables): ... here, and update output.
740
741 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
742
743 Rename "default rule" to "default reduction".
744 This includes changing variable names in code, changing
745 comments, and renaming %define lr.default_rules to %define
746 lr.default_reductions.
747 * NEWS (2.5): Update IELR documentation.
748 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
749 documentation.
750 * data/glr.c, data/lalr1.java: Sync copyright dates.
751 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
752 and lr.type documentation. Make some other wording
753 improvements.
754 (Glossary): Adjust cross-references and Default Reduction
755 definition.
756 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
757 Remove a confusing comment pointed out by Akim Demaille.
758 (initialize_LA): Adjust code.
759 * src/print-xml.c (print_reductions): Adjust code.
760 * src/print.c (print_reductions): Adjust code.
761 * src/reader.c (reader): Adjust code.
762 * src/tables.c (action_row): Adjust code.
763 (token_actions): Adjust code.
764 * src/tables.h: Adjust YYDEFACT documentation.
765 * tests/input.at (%define lr.default_rules invalid values):
766 Rename test group to...
767 (%define lr.default_reductions invalid values): ... this, and
768 update grammar file and expected output.
769 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
770 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
771
772 2009-04-21 Akim Demaille <demaille@gostai.com>
773
774 tests: check the use of dashes and periods in symbols.
775 * tests/input.at (Symbol): New test group.
776
777 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
778
779 Document %define lr.type and lr.default_rules.
780 * NEWS (2.5): Add an entry.
781 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
782 besides just LALR(1) and GLR(1).
783 * doc/bison.texinfo (Introduction): Likewise.
784 (Language and Grammar): Bison is no longer limited to LALR(1)
785 restrictions.
786 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
787 when trying to distinguish from GLR. Talk about LR(1) grammars
788 rather than LALR(1) grammars.
789 (Decl Summary): In %define api.push_pull entry, say it applies
790 to deterministic parsers in C rather than LALR(1) parsers in C.
791 Add lr.default_rules entry.
792 Add lr.type entry.
793 (Mystery Conflicts): Bison is no longer limited to LALR(1)
794 restrictions.
795 (Generalized LR Parsing): Same changes as for the previous GLR
796 section.
797 (Memory Management): Say deterministic rather than LALR(1).
798 (Understanding): Correct some bison output.
799 Index discussion of "accepting state".
800 Say deterministic rather than LALR(1).
801 (Bison Options): In --yacc entry, say deterministic rather than
802 LALR(1).
803 In --report, --graph, and --xml entries, just don't mention
804 LALR(1).
805 (C++ Parsers): Say deterministic rather than LALR(1).
806 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
807 (Glossary): Add Accepting State, Consistent State, Default Rule,
808 and IELR(1) definitions.
809 In Generalized LR (GLR) definition, make same changes as in
810 previous GLR sections.
811 In LALR(1) definition, say Bison uses LALR(1) by default rather
812 than implying Bison is limited to LALR(1).
813 (LocalWords): Add IELR.
814
815 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
816
817 Finish implementing %define lr.type.
818 Its value can be "LALR", "IELR", or "canonical LR".
819 * lib/timevar.def (TV_IELR_PHASE1): New var.
820 (TV_IELR_PHASE2): New var.
821 (TV_IELR_PHASE3): New var.
822 (TV_IELR_PHASE4): New var.
823 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
824 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
825 Sbitset.h, ielr.h, and ielr.c.
826 * src/getargs.h, src/getargs.c (enum trace, trace_args,
827 trace_types): Add trace_ielr.
828 * src/lalr.h, src/lalr.c (ngotos): Export it.
829 (F): Rename to...
830 (goto_follows): ... this, update all uses, and export it.
831 (set_goto_map): Export it.
832 (map_goto): Export it.
833 (compute_lookahead_tokens): Don't free goto_follows yet. Now
834 handled in ielr.
835 (initialize_LA): Export it. Move lookback allocation to...
836 (lalr): ... here because, for canonical LR, initialize_LA must
837 be invoked but lookback and much of the rest of LALR isn't
838 needed.
839 * main.c (main): Instead of lalr, invoke ielr, which invokes
840 lalr.
841 * src/reader.c (reader): Default lr.type to "LALR".
842 Default lr.default_rules to "accepting" if lr.type is "canonical
843 LR". Leave the default as "all" otherwise.
844 Check for a valid lr.type value.
845 * src/state.h, src/state.c (struct state_list): Add state_list
846 member.
847 (state_new): Initialize state_list member to NULL.
848 (state_new_isocore): New function, exported.
849 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
850 exercises all values of lr.type.
851 (GNU AWK Grammar): Rename test group to...
852 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
853 AT_TEST_EXISTING_GRAMMAR.
854 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
855 (GNU pic Grammar): Rename test group to...
856 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
857 AT_TEST_EXISTING_GRAMMAR.
858 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
859 all values of lr.type.
860 (Single State Split): New test groups using AT_TEST_LR_TYPE.
861 (Lane Split): Likewise.
862 (Complex Lane Split): Likewise.
863 (Split During Added Lookahead Propagation): Likewise.
864
865 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
866
867 Add new files for IELR and canonical LR implementation.
868 * src/AnnotationList.c: New.
869 * src/AnnotationList.h: New.
870 * src/InadequacyList.c: New.
871 * src/InadequacyList.h: New.
872 * src/Sbitset.c: New.
873 * src/Sbitset.h: New.
874 * src/ielr.c: New.
875 * src/ielr.h: New.
876
877 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
878
879 Implement %define lr.default_rules.
880 Its value describes the states that are permitted to contain
881 default rules: "all", "consistent", or "accepting".
882 * src/reader.c (reader): Default lr.default_rules to "all".
883 Check for a valid lr.default_rules value.
884 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
885 is "accepting", then only mark the accepting state as
886 consistent.
887 (initialize_LA): Tell state_lookahead_tokens_count whether
888 lr.default_rules is "accepting".
889 * src/tables.c (action_row): If lr.default_rules is not "all",
890 then disable default rules in inconsistent states.
891 * src/print.c (print_reductions): Use this opportunity to
892 perform some assertions about whether lr.default_rules was
893 obeyed correctly.
894 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
895 helps with checking the parser tables for a grammar.
896 * tests/input.at (%define lr.default_rules invalid values): New
897 test group.
898 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
899 AT_TEST_TABLES_AND_PARSE.
900 (`no %define lr.default_rules'): New test group generated by
901 AT_TEST_LR_DEFAULT_RULES.
902 (`%define lr.default_rules "all"'): Likewise.
903 (`%define lr.default_rules "consistent"'): Likewise.
904 (`%define lr.default_rules "accepting"'): Likewise.
905
906 2009-04-20 Akim Demaille <demaille@gostai.com>
907
908 Formatting change.
909
910 2009-04-20 Akim Demaille <demaille@gostai.com>
911
912 bison: factoring.
913 * src/output.c (token_definitions_output): Use symbol_id_get
914 instead of duplicating its logic.
915 * TODO (YYERRCODE): Extend.
916
917 2009-04-20 Akim Demaille <demaille@gostai.com>
918
919 variables: prefer error-verbose to error_verbose.
920 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
921 instead of error_verbose.
922 * src/scan-gram.l (%error-verbose): Map to the error-verbose
923 variable.
924 * doc/bison.texinfo: Promote %define error-verbose instead of
925 %error-verbose.
926 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
927
928 2009-04-15 Akim Demaille <demaille@gostai.com>
929
930 variables: accept dashes.
931 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
932 underscores.
933 * src/scan-gram.l ({id}): Also accept dashes after the initial
934 letter.
935 ({directive}): Use {id}.
936 * src/parse-gram.y: Comment and formatting changes.
937 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
938 symbols.
939 * src/complain.h, src/complain.c (yacc_at): New.
940 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
941 symbol names.
942 * src/output.c (token_definitions_output): Do not #define token
943 names with dashes.
944
945 2009-04-20 Akim Demaille <demaille@gostai.com>
946
947 Consistently refer to Yacc, not YACC.
948 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
949
950 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
951
952 Pacify make maintainer-check-posix.
953 * tests/input.at (%define, --define): Move bison command-line
954 options before grammar file name.
955
956 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
957
958 Document semicolon warnings.
959 * NEWS (2.5): Here.
960
961 2009-04-14 Akim Demaille <demaille@gostai.com>
962
963 variables: use `parse.assert' instead of `assert'.
964 * TODO (assert): Remove.
965 * data/bison.m4 (b4_assert_if): Replace with...
966 (b4_parse_assert_if): this.
967 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
968 * doc/bison.texinfo (Decl Summary): Document parse.assert.
969
970 2009-04-14 Akim Demaille <demaille@gostai.com>
971
972 variables: use `parse.trace' instead of `debug'.
973 * src/getargs.c (getargs): Map -t to %define trace.parse.
974 * src/scan-gram.l (%debug): Map to %define trace.parse.
975 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
976 names to `_' in macro names.
977 (b4_debug_if): Replace with...
978 (b4_parse_trace_if): this.
979 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
980 * data/yacc.c: Adjust.
981 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
982 Use @code to label the variable list.
983 Document the variable parse.trace.
984 (Tracing): Promote the parse.trace variable.
985 * TODO: %printer is not documented.
986
987 2009-04-14 Akim Demaille <demaille@gostai.com>
988
989 doc: minor fixes.
990 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
991 (Table of Symbols): Remove duplicate entry for %debug.
992
993 2009-04-10 Eric Blake <ebb9@byu.net>
994
995 submodules: update to latest
996 * submodules/autoconf: Use latest upstream Autoconf.
997
998 2009-04-06 Eric Blake <ebb9@byu.net>
999
1000 Work around autoconf 2.63b bug in testsuite.
1001 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1002 autoconf bug related to # in test.
1003
1004 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1005
1006 * NEWS (2.5): New section. Describe new -D/--define feature.
1007
1008 2009-04-06 Akim Demaille <demaille@gostai.com>
1009
1010 Regen.
1011 * src/parse-gram.h, src/parse-gram.c: Regen.
1012
1013 2009-04-06 Akim Demaille <demaille@gostai.com>
1014
1015 rename muscle_tab.* as muscle-tab.* for consistency.
1016 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1017 * src/muscle-tab.h, src/muscle-tab.c: these.
1018 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1019 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1020
1021 2009-04-06 Akim Demaille <demaille@gostai.com>
1022
1023 Makefile: introduce $(BISON).
1024 * src/local.mk (BISON): New.
1025 (YACC): Use it.
1026
1027 2009-04-06 Akim Demaille <demaille@gostai.com>
1028
1029 parser: handle %locations as %define locations.
1030 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1031 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1032 to set "locations" to true.
1033 * src/output.c (prepare): Don't output "locations".
1034 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1035 * src/parse-gram.y: It's no longer a token.
1036 Don't handle it.
1037 * data/bison.m4 (b4_locations_if): Define it with
1038 b4_percent_define_if_define.
1039 * data/c.m4, data/glr.cc: Adjust.
1040
1041 2009-04-06 Akim Demaille <demaille@gostai.com>
1042
1043 Regen.
1044 * src/parse-gram.c: Regen.
1045
1046 2009-04-06 Akim Demaille <demaille@gostai.com>
1047
1048 muscle: factor the handling of obsolete of obsolete directives.
1049 Suggested by Joel E. Denny.
1050
1051 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1052 New, extracted from...
1053 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1054 Remove it.
1055 (prologue_declaration: "%<flag>"): Use
1056 muscle_percent_define_ensure.
1057 (%error-verbose, %pure-parser): No longer tokens.
1058 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1059
1060 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1061
1062 Fix options documentation.
1063 * build-aux/cross-options.pl: As in --help output, write optional
1064 arguments as [=ARG] not =[ARG].
1065 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1066
1067 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1068
1069 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1070 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1071 requirements for a correct m4 are stricter.
1072 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1073 * configure.ac: Update to use AC_PROG_GNU_M4.
1074 Reported by Eric Blake.
1075
1076 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1077
1078 Help with updating web manual.
1079 * HACKING: Incorporate instructions from gnulib/doc/README.
1080 * bootstrap.conf (gnulib_modules): Add gendocs.
1081
1082 2009-04-03 Akim Demaille <demaille@gostai.com>
1083
1084 Regen.
1085 * src/parse-gram.h, src/parse-gram.c: Regen.
1086
1087 2009-04-03 Akim Demaille <demaille@gostai.com>
1088
1089 Factor %FLAG at scan level.
1090 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1091 definitions and associated rules, replaced by....
1092 (PERCENT_FLAG): this new token type, and rule.
1093 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1094 Use it for %debug and %error-verbose.
1095
1096 2009-04-03 Akim Demaille <demaille@gostai.com>
1097
1098 Regen.
1099 * src/parse-gram.h, src/parse-gram.c: Regen.
1100
1101 2009-04-03 Akim Demaille <demaille@gostai.com>
1102
1103 Treat %debug as %define debug.
1104 * data/bison.m4 (b4_debug_if): New.
1105 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1106 * data/lalr1.java: Use it instead of b4_debug_flag.
1107 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1108 * src/output.c (prepare): Don't output it.
1109 * src/parse-gram.y: Treat %debug as %define debug.
1110
1111 2009-04-03 Akim Demaille <demaille@gostai.com>
1112
1113 Treat %error-verbose as %define error_verbose.
1114 This allows to pass -Derror_verbose on the command line. Better
1115 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1116 ERROR_VERBOSE being defined as false or true.
1117 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1118 on b4_percent_define_ifdef, for does not check the defined value,
1119 but only whether the symbol is defined, rely on
1120 b4_percent_define_flag_if, so that a value of "false" is processed
1121 as a false.
1122 If not defined, define the flag to "false".
1123 (b4_error_verbose_if): New.
1124 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1125 b4_error_verbose_flag.
1126 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1127 * src/output.c (prepare): Don't output it.
1128 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1129
1130 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1131
1132 Fix strange %define locations for default values.
1133 Reported by Akim Demaille at
1134 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1135 and discussed again starting at
1136 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1137 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1138 because location information is bogus.
1139 Use angle brackets to delimit fake file name because square brackets
1140 look like underexpanded m4. Choose a better fake file name.
1141 Use negative line numbers.
1142 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1143 * src/location.c (location_print): If line for a boundary is negative,
1144 only print that boundary's file name.
1145 * src/location.h: Document that.
1146 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1147 defaults): Update output.
1148
1149 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1150
1151 Pacify ./configure --enable-gcc-warnings.
1152 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1153 in lib won't compile with it.
1154 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1155
1156 2009-03-31 Akim Demaille <demaille@gostai.com>
1157
1158 bootstrap: --help to stdout.
1159 * bootstrap (usage): Don't send --help to stderr.
1160 Use a here doc instead of a long string.
1161
1162 2009-03-31 Akim Demaille <demaille@gostai.com>
1163
1164 bootstrap: README-hacking no longer exists
1165 * bootstrap (checkout_only_file): Set to HACKING.
1166
1167 2009-03-26 Akim Demaille <demaille@gostai.com>
1168
1169 doc: merge HACKING and README-hacking.
1170 Two files is confusing.
1171 Reported by Alexandre Duret-Lutz.
1172
1173 * README-hacking: Merge into...
1174 * HACKING (Working from the repository): here.
1175
1176 2009-03-26 Akim Demaille <demaille@gostai.com>
1177
1178 doc: update README-hacking.
1179 * README-hacking: We now use git and git submodules.
1180 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1181
1182 2009-03-26 Akim Demaille <demaille@gostai.com>
1183
1184 lalr1.cc: avoid GCC 4.3 warnings.
1185 GCC 4.3 now warns about "a || b && c" and asks for explicit
1186 parentheses.
1187 Reported by Alexandre Duret-Lutz.
1188 * data/location.cc: Update copyright years.
1189 (Position::operator==): Use parens to make precedence explicit.
1190 Compare lines and columns first, as they are more likely to be
1191 different, and they are faster to compare.
1192
1193 2009-03-26 Akim Demaille <demaille@gostai.com>
1194
1195 gnulib: update.
1196 * gnulib: Update to latest.
1197 * src/local.mk (AM_CFLAGS): Move to...
1198 * Makefile.am: here.
1199 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1200 AM_CFLAGS.
1201
1202 2009-03-02 Akim Demaille <demaille@gostai.com>
1203
1204 Comment changes.
1205
1206 2009-03-02 Akim Demaille <demaille@gostai.com>
1207
1208 Share b4_yytranslate_define.
1209 * data/lalr1.cc (b4_yytranslate_define): Move to...
1210 * data/c++.m4: here.
1211
1212 2009-03-02 Akim Demaille <demaille@gostai.com>
1213
1214 Use locations in the variant example.
1215 Yes, this obfuscates the point of this example, variants only.
1216 But glr.cc cannot work (yet?) without locations. This change
1217 makes it easier to use this example with glr.cc.
1218
1219 * examples/variant.yy (assert): %define it.
1220 (locations): Request them.
1221 (yylex): Bind the location to the stage.
1222
1223 2009-03-02 Akim Demaille <demaille@gostai.com>
1224
1225 Dub make_TOKEN as a public type interface.
1226 * data/c++.m4 (b4_symbol_constructor_declare)
1227 (b4_symbol_constructor_define): New empty stubs.
1228 (b4_public_types_declare, b4_public_types_define): Use them.
1229 * data/lalr1.cc (b4_symbol_constructor_declare)
1230 (b4_symbol_constructor_declare_)
1231 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1232 Move to...
1233 * data/variant.hh: here.
1234 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1235 needed.
1236 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1237 b4_symbol_constructor_declare, as it is now done by
1238 b4_public_types_define and b4_public_types_declare.
1239
1240 2009-03-02 Akim Demaille <demaille@gostai.com>
1241
1242 Coding style changes.
1243 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1244 (b4_symbol_constructor_declarations)
1245 (b4_symbol_constructor_definition_)
1246 (b4_symbol_constructor_definitions)
1247 (b4_yytranslate_definition): Rename as...
1248 (b4_symbol_constructor_declare_)
1249 (b4_symbol_constructor_declare)
1250 (b4_symbol_constructor_define_)
1251 (b4_symbol_constructor_define)
1252 (b4_yytranslate_define): these.
1253 * data/variant.hh (b4_variant_definition): Rename as...
1254 (b4_variant_define): this.
1255
1256 2009-03-02 Akim Demaille <demaille@gostai.com>
1257
1258 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1259 * data/bison.m4 (b4_percent_define_if_define): New.
1260 * data/c++.m4 (b4_variant_if): Move to...
1261 * data/bison.m4: Here, using b4_percent_define_if_define.
1262 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1263 * data/bison.m4: Here, using b4_percent_define_if_define.
1264
1265 2009-03-02 Akim Demaille <demaille@gostai.com>
1266
1267 Dub symbol_type_base as a public type.
1268 * data/c++.m4 (b4_public_types_declare): Now define
1269 symbol_type_base and symbol_type.
1270 (b4_public_types_define): New.
1271 In both cases, the definitions are taken verbatim from lalr1.cc.
1272 * data/lalr1.cc: Adjust.
1273
1274 2009-03-02 Akim Demaille <demaille@gostai.com>
1275
1276 b4_public_types_declare.
1277 * data/c++.m4 (b4_public_types_declare): New.
1278 * data/glr.cc, data/lalr1.cc: Use it.
1279
1280 2009-03-02 Akim Demaille <demaille@gostai.com>
1281
1282 b4_semantic_type_declare.
1283 * data/c++.m4 (b4_semantic_type_declare): New.
1284 Factors and generalizes what was in glr.cc and lalr1.cc.
1285 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1286 variants.
1287 * data/lalr1.cc, data/glr.cc: Use it.
1288
1289 2009-02-26 Akim Demaille <demaille@gostai.com>
1290
1291 Upgrade gnulib.
1292 * gnulib: Upgrade from master.
1293 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1294 Regen.
1295
1296 2009-02-25 Akim Demaille <demaille@gostai.com>
1297
1298 Remove useless arguments.
1299 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1300 relevant.
1301
1302 2009-02-25 Akim Demaille <demaille@gostai.com>
1303
1304 Comment changes.
1305 * data/lalr1.cc: here.
1306
1307 2009-02-25 Akim Demaille <demaille@gostai.com>
1308
1309 Fix glr.cc's debug level handling.
1310 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1311 glr.c which is used.
1312 (debug_level, set_debug_level): Adjust.
1313
1314 2009-02-25 Akim Demaille <demaille@gostai.com>
1315
1316 Copyright years.
1317 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1318
1319 2009-02-25 Akim Demaille <demaille@gostai.com>
1320
1321 Style changes.
1322 * etc/bench.pl.in (generate_grammar_list): Consitently use
1323 location_type, not yy::location.
1324
1325 2009-02-25 Akim Demaille <demaille@gostai.com>
1326
1327 Comment change.
1328 * data/lalr1.cc: here.
1329
1330 2009-02-19 Akim Demaille <demaille@gostai.com>
1331
1332 Make yyparser::error public.
1333 * data/lalr1.cc: here.
1334 There is no good reason to keep it private (and it is convenient
1335 to use it from the scanner for instance). It is already public in
1336 glr.cc.
1337
1338 2009-02-19 Akim Demaille <demaille@gostai.com>
1339
1340 Comment changes.
1341 * data/glr.cc: here.
1342
1343 2009-02-19 Akim Demaille <demaille@gostai.com>
1344
1345 Remove trailing blanks.
1346 The epilogue has its own ending \n, no need to add another.
1347
1348 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1349 epilogue.
1350 * data/glr.cc: dnl when extending the epilogue.
1351 Remove stray "private:".
1352
1353 2009-02-19 Akim Demaille <demaille@gostai.com>
1354
1355 Use b4_c_modern.
1356 * data/c.m4 (b4_c_function_decl): Here.
1357
1358 2009-02-19 Akim Demaille <demaille@gostai.com>
1359
1360 Comment changes.
1361 * data/lalr1.cc: here.
1362
1363 2009-02-19 Akim Demaille <demaille@gostai.com>
1364
1365 Extract variant.hh
1366 * data/variant.hh: New, extracted from...
1367 * data/lalr1.cc: here.
1368 Adjust.
1369 * data/local.mk: Adjust.
1370
1371 2009-02-19 Akim Demaille <demaille@gostai.com>
1372
1373 Extract stack.hh from lalr1.cc.
1374 * data/stack.hh: New.
1375 * data/lalr1.cc: Extract from here.
1376 * data/local.mk: Adjust.
1377
1378 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1379
1380 Add reminder about uploading public key to keys.gnupg.net.
1381 * HACKING (Release Procedure): Here.
1382
1383 2009-01-28 Akim Demaille <demaille@gostai.com>
1384
1385 * NEWS: Update information about 2.4.1 and 2.4.2.
1386
1387 2008-11-04 Akim Demaille <demaille@gostai.com>
1388
1389 Reformat NEWS.
1390 * NEWS: Use more outline-mode markup.
1391 Suggested by Jim Meyering.
1392
1393 2009-01-08 Akim Demaille <demaille@gostai.com>
1394
1395 Fix grep portability issues.
1396 Grep on Solaris does not support -q.
1397 Reported by Summum Bonum.
1398
1399 * NEWS: Add a stub for 2.4.2.
1400 * THANKS: Add Summum Bonum.
1401 * tests/atlocal.in (EGREP): New.
1402 (CC, CXX, XSLTPROC): Make it possible to override them via
1403 envvars.
1404 * tests/java.at: Use $EGREP instead of egrep.
1405 Use AT_CHECK's ignore instead of grep's -q.
1406
1407 2008-12-11 Akim Demaille <demaille@gostai.com>
1408
1409 Pass the token type to yysyntax_error.
1410 * data/yacc.c (yysyntax_error): Take the transated token instead
1411 of the raw number.
1412 Adjust callers.
1413 * TODO: Update.
1414
1415 2008-12-11 Akim Demaille <demaille@gostai.com>
1416
1417 Formatting changes.
1418 * data/glr.c: Formatting changes.
1419
1420 2008-12-11 Akim Demaille <demaille@gostai.com>
1421
1422 Propagate i18n changes into glr.c.
1423 * TODO: Update.
1424 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1425 building the error message format dynamically.
1426 * data/lalr1.java: Formatting changes.
1427
1428 2008-12-11 Akim Demaille <demaille@gostai.com>
1429
1430 Use testsuite -C.
1431 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1432 Solves problems when top_srcdir is an absolute path.
1433 Suggested by Eric Blake.
1434 * configure.ac: Require Autoconf 2.62.
1435
1436 2008-12-11 Akim Demaille <demaille@gostai.com>
1437
1438 Simplify the i18n of the error messages.
1439 * data/lalr1.cc: Comment changes.
1440 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1441 lalr1.cc instead of building dynamically the format string.
1442
1443 2008-12-08 Akim Demaille <demaille@gostai.com>
1444
1445 Fix portability issue in the test suite.
1446 * tests/local.at (AT_MATCHES_CHECK): New.
1447 Based on Perl instead of Sed. Sed has too many portability
1448 pitfalls, not ever Sed is GNU Sed.
1449 * tests/actions.at (Fix user actions without a trailing semicolon):
1450 Use it.
1451
1452 2008-12-08 Akim Demaille <demaille@gostai.com>
1453
1454 Update data/README.
1455 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1456
1457 2008-12-08 Akim Demaille <demaille@gostai.com>
1458
1459 Install autoconf as a submodule to get m4sugar.
1460 * .gitmodules: Add submodules/autoconf.
1461 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1462 submodules/autoconf.
1463
1464 2008-12-08 Akim Demaille <demaille@gostai.com>
1465
1466 Test token.prefix in all the skeletons.
1467 * data/java.m4 (b4_token_enum): Use the token.prefix.
1468 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1469 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1470 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1471 * tests/java.at: Comment changes.
1472 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1473 (Java parser class and package names): Add token.prefix check.
1474
1475 2008-12-08 Akim Demaille <demaille@gostai.com>
1476
1477 Fix regeneration of atconfig.
1478 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1479 remove it: now that there is no tests/Makefile.am, the top-level
1480 Makefile properly updates atconfig when needed.
1481
1482 2008-12-07 Di-an Jan <dianj@freeshell.org>
1483
1484 Implement the FIXME that ends an user action with a semicolon
1485 if it seems necessary.
1486 * src/scan-code.l (flex rules section): Flag cpp directive from
1487 any `#' to the first unescaped end-of-line. Semicolon is not
1488 needed after `;', `{', '}', or cpp directives and is needed after
1489 any other token (whitespaces and comments have no effect).
1490 * tests/actions.at (Fix user actions without a trailing semicolon):
1491 New test.
1492 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1493 to make user actions complete statements.
1494 Adjust column numbers in error messages.
1495 * tests/regression.at (Fix user actions without a trailing semicolon):
1496 Remove. Covered by new test.
1497
1498 2008-12-07 Akim Demaille <demaille@gostai.com>
1499
1500 Update gnulib.
1501 * gnulib: Update from master.
1502
1503 2008-12-05 Eric Blake <ebb9@byu.net>
1504
1505 Avoid compiler warning.
1506 * src/output.c (muscle_insert_item_number_table): Delete unused
1507 function.
1508
1509 2008-12-02 Eric Blake <ebb9@byu.net>
1510
1511 Build testsuite with newer autoconf.
1512 * tests/output.at (m4_expand): Don't override in newer autoconf,
1513 where the underlying implementation changed.
1514 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1515 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1516 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1517 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1518 since some of them contain unbalanced ')'.
1519
1520 2008-12-01 Akim Demaille <demaille@gostai.com>
1521
1522 Use b4_symbol for printers and destructors everywhere.
1523 * data/bison.m4 (b4_symbol_action_location): New.
1524 * data/c.m4 (b4_symbol_actions): Remove.
1525 Adjust all callers to use by b4_symbol_foreach and the corresponding
1526 b4_symbol_printer/destructor macro.
1527 * data/glr.cc: Adjust.
1528 * data/lalr1.java: Adjust the %destructor sanity check.
1529 * src/output.c (symbol_code_props_output): Remove, we no longer
1530 need the b4_symbol_printers/destructors tables.
1531
1532 2008-12-01 Akim Demaille <demaille@gostai.com>
1533
1534 Use b4_symbol_case_.
1535 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1536 b4_symbol_case_.
1537
1538 2008-12-01 Akim Demaille <demaille@gostai.com>
1539
1540 Move b4_symbol based macro to bison.m4.
1541 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1542 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1543 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1544 (b4_type_foreach): Move to...
1545 * data/bison.m4: Here.
1546 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1547 b4_symbol_value_template instead of b4_symbol_value.
1548
1549 2008-12-01 Akim Demaille <demaille@gostai.com>
1550
1551 b4_symbol/type_foreach.
1552 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1553 Use them.
1554
1555 2008-12-01 Akim Demaille <demaille@gostai.com>
1556
1557 Use the symbol properties to output the printer/destructor for lalr1.cc.
1558 Instead of defining complex list of tuples to define various
1559 properties of the symbols, we now prefer to define symbols as
1560 "structs" in m4: using the symbol key (its number), and the
1561 property name, b4_symbol gives it value. Use this to handle
1562 destructors and printers.
1563
1564 * src/output.c (CODE_PROP): New.
1565 (prepare_symbol_definitions): Use it to define the printer and
1566 destructor related attributes of the symbols.
1567 * data/lalr1.cc (b4_symbol_actions): Rename as...
1568 (b4_symbol_action): this.
1569 Use b4_symbol instead of 6 arguments.
1570 (b4_symbol_printer, b4_symbol_destructor): New.
1571 Use them instead of b4_symbol_actions.
1572
1573 2008-12-01 Akim Demaille <demaille@gostai.com>
1574
1575 Avoid capturing variables too easily.
1576 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1577 v__ and p__ instead of v and p.
1578
1579 2008-12-01 Akim Demaille <demaille@gostai.com>
1580
1581 Remove spurious empty line before syncline.
1582 * data/bison.m4 (b4_syncline): Don't output an empty line before
1583 the output.
1584
1585 2008-11-26 Akim Demaille <demaille@gostai.com>
1586
1587 Convert lib/Makefile.am into lib/local.mk.
1588 The real problem is rather gnulib.mk, which itself is extracted
1589 from a Makefile.am that gnulib expects to the "recursive". The
1590 tool prefix-gnulib-mk converts such a gnulib.mk to be
1591 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1592
1593 * etc/prefix-gnulib-mk: New.
1594 * bootstrap (slurp): Use it to convert further gnulib.mk.
1595 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1596 are deeper.
1597 * lib/Makefile.am: Rename as...
1598 * lib/local.mk: this.
1599 Adjust to be prefixed.
1600 * Makefile.am, configure.ac: Adjust.
1601 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1602
1603 2008-11-26 Akim Demaille <demaille@gostai.com>
1604
1605 s/_FLAGS/FLAGS/.
1606 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1607 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1608 Reported by Eric Blake.
1609
1610 2008-11-26 Akim Demaille <demaille@gostai.com>
1611
1612 Use b4_parser_tables_define in glr.cc.
1613 * data/glr.c: Use b4_parser_tables_define instead of defining the
1614 (deterministic integral) tables by hand.
1615
1616 2008-11-26 Akim Demaille <demaille@gostai.com>
1617
1618 Use b4_parser_tables_define in Java.
1619 * data/java.m4 (b4_typed_parser_table): Rename as...
1620 (b4_typed_parser_table_define): this, for consistency.
1621 Accept a comment as $4.
1622 Move $2 into yy*_.
1623 (b4_integral_parser_table): Rename as...
1624 (b4_integral_parser_table_define): this.
1625 * data/lalr1.java: Adjust all uses.
1626 Use b4_parser_tables_define instead of generation by hand.
1627
1628 2008-11-26 Akim Demaille <demaille@gostai.com>
1629
1630 Prepare the convergence bw C style and Java table generation.
1631 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1632 (b4_tables_define): Rename as...
1633 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1634 (b4_parser_tables_define): these.
1635 * data/c.m4 (b4_table_define): Rename as...
1636 (b4_integral_parser_table_define): this.
1637 * data/lalr1.cc: Adjust.
1638 (b4_table_define, b4_table_declare): Rename as...
1639 (b4_integral_parser_table_define)
1640 (b4_integral_parser_table_declare): these.
1641 (yyrline_): Move the comment where it is actually used.
1642 * data/yacc.c: Adjust.
1643 (yyrline): Use b4_integral_parser_table_define.
1644
1645 2008-11-26 Akim Demaille <demaille@gostai.com>
1646
1647 Regen.
1648 * src/parse-gram.h, src/parse-gram.c: Regen.
1649
1650 2008-11-26 Akim Demaille <demaille@gostai.com>
1651
1652 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1653 * data/lalr1.cc (b4_tables_map): Move to...
1654 * data/bison.m4: here.
1655 Update the comment for yytable during the flight.
1656 (b4_tables_declare, b4_tables_define): New.
1657 * data/lalr1.cc: Use them.
1658 * data/c.m4 (b4_table_define): New.
1659 * data/yacc.c: Use b4_tables_define instead of output the tables
1660 by hand.
1661 * tests/regression.at (Web2c Actions): Adjust the expected output,
1662 the order of the tables changed.
1663
1664 2008-11-26 Akim Demaille <demaille@gostai.com>
1665
1666 Get rid of (yy)rhs and (yy)prhs.
1667 These tables are no longer needed in the parsers, and they don't seem to
1668 be useful. They are not documented either.
1669
1670 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1671 Adjust the computation of (yy)r2.
1672
1673 2008-11-26 Akim Demaille <demaille@gostai.com>
1674
1675 Rule length is unsigned.
1676 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1677
1678 2008-11-26 Akim Demaille <demaille@gostai.com>
1679
1680 Get rid of lalr1-split.cc.
1681 It was no longer maintainer.
1682
1683 * data/lalr1-split.cc: Remove.
1684 * etc/bench.pl.in (bench_fusion_parser): Remove.
1685 Adjust.
1686
1687 2008-11-26 Akim Demaille <demaille@gostai.com>
1688
1689 Use yy* consistently.
1690 * data/glr.c: Now that yyrhs no longer exists as a global
1691 variable, rename local "rhs" variables into "yyrhs" for
1692 consistency.
1693
1694 2008-11-25 Akim Demaille <demaille@gostai.com>
1695
1696 Get rid of yyrhs and yyprhs in glr.c.
1697 * data/glr.c (yyrhs, yyprhs): Remove.
1698 Instead, use the state stack and yystos.
1699
1700 2008-11-25 Akim Demaille <demaille@gostai.com>
1701
1702 Flag glr tests.
1703 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1704 as an Autotest keyword.
1705
1706 2008-11-25 Akim Demaille <demaille@gostai.com>
1707
1708 Prefer TESTSUITE_FLAGS.
1709 TESTSUITEFLAGS is barely readable.
1710
1711 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1712 for backward compatibility.
1713 Use the former instead of the latter.
1714
1715 2008-11-25 Akim Demaille <demaille@gostai.com>
1716
1717 Get rid of yyrhs and yyprhs in larl1.java.
1718 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1719 (yy_reduce_print): Rather, use yystos_ and the state stack.
1720
1721 2008-11-25 Akim Demaille <demaille@gostai.com>
1722
1723 Formatting changes.
1724
1725 2008-11-25 Akim Demaille <demaille@gostai.com>
1726
1727 Get rid of yyrhs and yyprhs in yacc.c.
1728 They were used to get the symbol types, given a rule number, when
1729 displaying the top of the stack before a reduction. But the
1730 symbol type is available from the state stack. This has two be
1731 benefits: two tables less in the parser (making it smaller), and a
1732 more consistent use of the three stacks which will help to fuse
1733 them.
1734
1735 * data/yacc.c (yyprhs, yyrhs): Remove.
1736 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1737 (yy_reduce_print): Take yyssp as argument.
1738 Use it, together with yystos, to get the symbol type.
1739 * tests/regression.at (Web2c Report): Remove these tables from the
1740 expected output.
1741
1742 2008-11-25 Akim Demaille <demaille@gostai.com>
1743
1744 b4_tables_map.
1745 The point is to factor the generation of the tables across skeletons.
1746 This is language dependant.
1747
1748 * data/c.m4 (b4_comment_): New.
1749 Should be usable to define how to generate tables independently of
1750 the language.
1751 (b4_c_comment): New.
1752 (b4_comment): Bounce to b4_c_comment.
1753 Now support $2 = [PREFIX] for indentation.
1754 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1755 there is no comment.
1756 Indent it properly when there is one.
1757 Output the ending semicolon.
1758 (b4_table_define): Space changes.
1759 Output the ending semicolon.
1760 (b4_tables_map): New.
1761 Use it twice instead of declaring and defining the (integral)
1762 tables by hand.
1763
1764 2008-11-25 Akim Demaille <demaille@gostai.com>
1765
1766 b4_table_declare.
1767 * data/lalr1.cc (b4_table_declare): New.
1768 Use it to declare the tables defined with b4_table_define.
1769 (b4_table_define): Declare a third arg to match b4_table_declare
1770 signature.
1771 Move all the comments around invocations of b4_table_define into
1772 the invocations itselves.
1773 Move things around to have the order for declarations and
1774 definitions.
1775
1776 2008-11-25 Akim Demaille <demaille@gostai.com>
1777
1778 Formatting changes.
1779 * data/lalr1.java: here.
1780
1781 2008-11-25 Akim Demaille <demaille@gostai.com>
1782
1783 b4_args is more general than only C++.
1784 * data/lalr1.cc (b4_args, _b4_args): Move to...
1785 * data/bison.m4: here.
1786
1787 2008-11-21 Di-an Jan <dianj@freeshell.org>
1788
1789 Implement no-XXX arguments for --warnings, --report, --trace.
1790 * src/getargs.c (flags_argmatch): Handles no-XXX.
1791 Fix typo in doxygen comment.
1792
1793 2008-11-21 Akim Demaille <demaille@gostai.com>
1794
1795 Display the changes in cross-options.texi.
1796 * build-aux/cross-options.pl ($sep): New, to separate items.
1797 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1798 changes.
1799
1800 2008-11-20 Di-an Jan <dianj@freeshell.org>
1801
1802 Improves options in the manual.
1803 * doc/bison.texinfo (-g, -x): Add space before argument.
1804 (Option Cross Key): Implement FIXME: listing directives also.
1805 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1806 (Short Option): Special case -d. Put arguments inside @option.
1807 (Bison Directive): Add column, automatically extracted from
1808 src/scan-gram.l (actual name passed as the first argument)
1809 with special case for %define.
1810 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1811 to build-aux/cross-options.pl.
1812 * src/getargs.c (usage): Document limitations of cross-options.pl.
1813 * src/scan-gram.l: Likewise.
1814
1815 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1816
1817 Fix unexpanded macros in GLR defines file.
1818 Reported by Csaba Raduly at
1819 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1820 * THANKS (Csaba Raduly): Add.
1821 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1822 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1823 lexer in a separate module that includes the defines file.
1824 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1825 source.
1826 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1827 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1828 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1829 (AT_DATA_SOURCE_PROLOGUE): New.
1830 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1831 (AT_DATA_SOURCE): New.
1832 (AT_FULL_COMPILE): Extend to support an additional source file.
1833
1834 2008-11-18 Akim Demaille <demaille@gostai.com>
1835
1836 More TODO.
1837 * TODO: More short term issues.
1838
1839 2008-11-18 Akim Demaille <demaille@gostai.com>
1840
1841 Regen.
1842 * src/parse-gram.h, src/parse-gram.c: Regen.
1843
1844 2008-11-18 Akim Demaille <demaille@gostai.com>
1845
1846 Use b4_subtract where possible.
1847 * data/lalr1.cc (b4_subtract): Move to...
1848 * data/bison.m4: here.
1849 * data/glr.c (b4_rhs_data): Use it.
1850 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1851
1852 2008-11-18 Akim Demaille <demaille@gostai.com>
1853
1854 Remove incorrect mode specification.
1855 * data/glr.cc: Don't pretend it's C code.
1856
1857 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1858
1859 Simplify last patch slightly.
1860 * src/getargs.c (getargs): Here.
1861
1862 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1863
1864 Fix last warning from --enable-gcc-warnings.
1865 * src/getargs.c (getargs): Don't assign const address to non-const
1866 pointer.
1867
1868 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1869
1870 Don't let maintainer-*-check targets force a version update.
1871 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1872 handled.
1873
1874 2008-11-17 Di-an Jan <dianj@freeshell.org>
1875
1876 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1877 Align menus. Adjust word wrapping. Use node names for menu names.
1878 (Examples): Don't abbreviate node names.
1879 (LocalWords): Remove abbreviations.
1880 (Copying): Make description a sentence.
1881 (Java Action Features): Remove period to match the rest of menu.
1882
1883 2008-11-17 Di-an Jan <dianj@freeshell.org>
1884
1885 Handles several --enable-gcc-warnings.
1886 * src/getargs.c (command_line_location): Set parameters to void.
1887 * src/output.c (symbol_type_name_cmp): Make static.
1888 (symbols_by_type_name): Set parameters to void.
1889 (symbol_definitions_output): Remove unused parameter. Rename as...
1890 (prepare_symbol_definitions): this.
1891 (muscles_output): Move symbol_definitions_output to...
1892 (output): here as prepare_symbol_definitions.
1893 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1894 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1895
1896 2008-11-17 Di-an Jan <dianj@freeshell.org>
1897
1898 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1899 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1900
1901 2008-11-16 Akim Demaille <demaille@gostai.com>
1902
1903 Add missing $(EXEEXT).
1904 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1905 "src/bison$(EXEEXT)".
1906 Reported by Di-an Jan.
1907
1908 2008-11-15 Akim Demaille <demaille@gostai.com>
1909
1910 * TODO: Update.
1911
1912 2008-11-15 Akim Demaille <demaille@gostai.com>
1913
1914 Formatting changes.
1915 * tests/input.at: here.
1916
1917 2008-11-15 Akim Demaille <demaille@gostai.com>
1918
1919 Remove duplicate header inclusion.
1920 * src/LR0.c: here.
1921
1922 2008-11-15 Akim Demaille <demaille@gostai.com>
1923
1924 * src/parse-gram.h, src/parse-gram.c: Regen.
1925
1926 2008-11-15 Akim Demaille <demaille@gostai.com>
1927
1928 Support parametric types.
1929
1930 There are two issues to handle: first scanning nested angle
1931 bracket pairs to support types such as std::pair< std::string,
1932 std::list<std::string> > >.
1933
1934 Another issue is to address idiosyncracies of C++: do not glue two
1935 closing angle brackets together (otherwise it's operator>>), and
1936 avoid sticking blindly a TYPE to the opening <, as it can result
1937 in '<:' which is a digraph for '['.
1938
1939 * src/scan-gram.l (brace_level): Rename as...
1940 (nesting): this.
1941 (SC_TAG): New.
1942 Implement support for complex tags.
1943 (tag): Accept
1944 , but not <.
1945 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1946 (b4_symbol_variant): Leave space around types as parameters.
1947 * examples/variant.yy: Use nested template types and leading ::.
1948 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1949 Rename as...
1950 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1951 * tests/c++.at: Test parametric types.
1952
1953 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1954
1955 Test token.prefix.
1956 This is not sufficient, but we test at least that the make_SYMBOL
1957 interface is not affected by token.prefix. A more general test
1958 will be implemented when the support of token.prefix is generalized
1959 to more skeletons.
1960
1961 * tests/c++.at: One more variant test, using token.prefix.
1962
1963 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1964
1965 Test the make_TOKEN interface.
1966 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1967 Factor the common code in yylex.
1968 Use it to test "%define lex_symbol".
1969
1970 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1971
1972 Formatting change.
1973
1974 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1975
1976 Simplify code for variants bench marks.
1977 * etc/bench.pl.in (&generate_grammar_list): Define and use
1978 location_type.
1979 Factor the common code in yylex.
1980
1981 2008-11-15 Akim Demaille <demaille@gostai.com>
1982
1983 Better error message.
1984 * bootstrap (find_tool): Fix the error message.
1985
1986 2008-11-15 Akim Demaille <demaille@gostai.com>
1987
1988 Update variant.yy to newest interface.
1989 * examples/variant.yy: Define lex_symbol.
1990 Adjust.
1991
1992 2008-11-15 Akim Demaille <demaille@gostai.com>
1993
1994 Don't use locations in variant.yy.
1995 * examples/variant.yy: Adjust to not using locations.
1996
1997 2008-11-15 Akim Demaille <demaille@gostai.com>
1998
1999 Comment changes.
2000 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2001 comments for the license.
2002
2003 2008-11-15 Akim Demaille <demaille@gostai.com>
2004
2005 Remove tests/Makefile.am.
2006 * tests/Makefile.am: Rename as...
2007 * tests/local.mk: this.
2008 * Makefile.am, configure.ac: Adjust.
2009 * Makefile.am (DISTCLEANFILES): Define.
2010 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2011 Remove, we no longer need to bounce to the real targets.
2012
2013 2008-11-15 Akim Demaille <demaille@gostai.com>
2014
2015 Comment changes.
2016
2017 2008-11-15 Akim Demaille <demaille@gostai.com>
2018
2019 djgpp/local.mk.
2020 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2021 * djgpp/local.mk: this new file.
2022
2023 2008-11-15 Akim Demaille <demaille@gostai.com>
2024
2025 Remove doc/Makefile.am.
2026 * doc/Makefile.am: Rename as...
2027 * doc/local.mk: this.
2028 Adjust paths
2029 * Makefile.am, configure.ac: Adjust.
2030 * Makefile.am (MOSTLYCLEANFILES): New.
2031 * src/local.mk: Adjust.
2032
2033 2008-11-15 Akim Demaille <demaille@gostai.com>
2034
2035 Move sc_tight_scope into maint.mk.
2036 It does not work, and I don't know how it was supposed to work: it
2037 seems to be looking for sources in the build tree. I just moved
2038 it at a better place, fixing it is still required.
2039
2040 * src/local.mk (echo): Remove.
2041 (sc_tight_scope): Move to...
2042 * maint.mk: here.
2043
2044 2008-11-15 Akim Demaille <demaille@gostai.com>
2045
2046 Regen.
2047 * src/parse-gram.h, src/parse-gram.h: Regen.
2048
2049 2008-11-15 Akim Demaille <demaille@gostai.com>
2050
2051 Remove src/Makefile.am.
2052 * src/Makefile.am: Rename as...
2053 * src/local.mk: this.
2054 Prefix all the paths with src/.
2055 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2056 (AM_CPPFLAGS): Find find in builddir/src.
2057 (YACC): Move the flags into...
2058 (AM_YFLAGS): here.
2059 * maint.mk (sc_tight_scope): Disable.
2060 It used to bounce to the version in src/Makefile.am which is now
2061 part of this very Makefile.
2062 * Makefile.am, configure.ac: Adjust.
2063 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2064 include "..." to find files "here": we are no longer in src/, so
2065 qualify the includes with src/.
2066 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2067 prefix.
2068 (.x.1): Adjust to be able to create src/foo from the top level
2069 Makefile, instead of going bounce to src/Makefile the creation of
2070 foo.
2071
2072 2008-11-15 Akim Demaille <demaille@gostai.com>
2073
2074 Remove useless variable.
2075 * doc/Makefile.am (srcsrcdir): Remove.
2076
2077 2008-11-15 Akim Demaille <demaille@gostai.com>
2078
2079 Remove data/Makefile.am.
2080 * data/Makefile.am: Rename as...
2081 * data/local.mk: this.
2082 Adjust paths.
2083 * Makefile.am, configure.ac: Adjust.
2084
2085 2008-11-15 Akim Demaille <demaille@gostai.com>
2086
2087 Remove etc/Makefile.am.
2088 * etc/Makefile.am: Rename as...
2089 * etc/local.mk: this.
2090 Adjust.
2091 * Makefile.am, configure.ac: Adjust.
2092
2093 2008-11-15 Akim Demaille <demaille@gostai.com>
2094
2095 Remove examples/local.mk.
2096 examples/calc++/Makefile.am might be interesting to keep as is, since
2097 it is an example in itself.
2098
2099 * examples/Makefile.am: Rename as...
2100 * examples/local.mk: this.
2101 Adjust.
2102 * Makefile.am, configure.ac: Adjust.
2103
2104 2008-11-15 Akim Demaille <demaille@gostai.com>
2105
2106 Remove build-aux/Makefile.am.
2107 Recursive Makefiles are really way too slow, let's get rid of some of
2108 them.
2109
2110 * build-aux/Makefile.am: Rename as...
2111 * build-aux/local.mk: this.
2112 Adjust paths.
2113 * Makefile.am, configure.ac: Adjust.
2114
2115 2008-11-15 Akim Demaille <demaille@gostai.com>
2116
2117 Provide convenience constructors for locations and positions.
2118 * data/location.cc (position::position): Accept file, line and
2119 column as arguments with default values.
2120 Always qualify initial line and column literals as unsigned.
2121 (location::location): Provide convenience constructors.
2122
2123 2008-11-15 Akim Demaille <demaille@gostai.com>
2124
2125 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2126 token type.
2127 Using template buys us nothing, and makes it uselessly complex to
2128 construct a symbol. Besides, it could not be generalized to other
2129 languages, while make_FOO would work in C/Java etc.
2130
2131 * data/lalr1.cc (b4_symbol_): New.
2132 (b4_symbol): Use it.
2133 (b4_symbol_constructor_declaration_)
2134 (b4_symbol_constructor_definition_): Instead of generating
2135 specializations of an overloaded template function, just generate
2136 several functions whose names are forged from the token names
2137 without the token.prefix.
2138 (b4_symbol_constructor_declarations): Generate them for all the
2139 symbols, not just by class of symbol type, now that instead of
2140 specializing a function template by the token, we generate a
2141 function named after the token.
2142 (b4_symbol_constructor_specialization_)
2143 (b4_symbol_constructor_specializations): Remove.
2144 * etc/bench.pl.in: Adjust to this new API.
2145
2146 2008-11-13 Akim Demaille <demaille@gostai.com>
2147
2148 %define token.prefix.
2149 Provide a means to add a prefix to the name of the tokens as
2150 output in the generated files. Because of name clashes, it is
2151 good to have such a prefix such as TOK_ that protects from names
2152 such as EOF, FILE etc. But it clutters the grammar itself.
2153
2154 * data/bison.m4 (token.prefix): Empty by default.
2155 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2156 * data/lalr1.cc (b4_symbol): Ditto.
2157
2158 2008-11-13 Akim Demaille <demaille@gostai.com>
2159
2160 Compute at M4 time some of the subtractions.
2161 * data/lalr1.cc (b4_subtract): New.
2162 (b4_rhs_data): Use it.
2163
2164 2008-11-13 Akim Demaille <demaille@gostai.com>
2165
2166 symbol::token.
2167 This allows the user to get the type of a token returned by yylex.
2168
2169 * data/lalr1.cc (symbol::token): New.
2170 (yytoknum_): Define when %define lex_symbol, independently of
2171 %debug.
2172 (yytoken_number_): Move into...
2173 (symbol::token): here, since that's the only use.
2174 The other one is YYPRINT which was not officially supported
2175 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2176 array under a different name (yytoknum).
2177
2178 2008-11-13 Akim Demaille <demaille@gostai.com>
2179
2180 YYERRCODE.
2181 * TODO (YYERRCODE): Mention the case of $undef.
2182
2183 2008-11-13 Akim Demaille <demaille@gostai.com>
2184
2185 TODO: YYPRINT.
2186 * TODO (YYPRINT): New.
2187
2188 2008-11-13 Akim Demaille <demaille@gostai.com>
2189
2190 Comment changes.
2191 * data/lalr1.cc, data/yacc.c: Fix the description of the
2192 yytranslate and yytoknum tables.
2193
2194 2008-11-13 Akim Demaille <demaille@gostai.com>
2195
2196 Define make_symbol in the header.
2197 To reach good performances these functions should be inlined (yet
2198 this is to measure precisely). To this end they must be available
2199 to the caller.
2200
2201 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2202 location_type with the class name.
2203 Since will now be output in the header, declare "inline".
2204 No longer use b4_symbol_constructor_specializations, but
2205 b4_symbol_constructor_definitions in the header.
2206 Don't call it in the *.cc file.
2207
2208 2008-11-13 Akim Demaille <demaille@gostai.com>
2209
2210 Define yytranslate in the header for lex_symbol.
2211 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2212 into the header file when using %define lex_symbol.
2213 (yytranslate_): Declare inline.
2214
2215 2008-11-13 Akim Demaille <demaille@gostai.com>
2216
2217 Define the constructors of symbol_type in
2218 b4_symbol_constructor_definitions.
2219 The constructors are called by the make_symbol functions, which a
2220 forthcoming patch will move elsewhere. Hence the interest of
2221 putting them together.
2222
2223 The stack_symbol_type does not need to be moved, it is used only
2224 by the parser.
2225
2226 * data/lalr1.cc: Move symbol_type and symbol_base_type
2227 constructors into...
2228 (b4_symbol_constructor_definitions): here.
2229 Adjust.
2230
2231 2008-11-13 Akim Demaille <demaille@gostai.com>
2232
2233 Make it easier to move the definition of yytranslate_.
2234 Forthcoming changes will make it possible to use yytranslate_
2235 from outside the parser implementation file.
2236
2237 * data/lalr1.cc (b4_yytranslate_definition): New.
2238 Use it.
2239
2240 2008-11-13 Akim Demaille <demaille@gostai.com>
2241
2242 Remove useless class specification.
2243 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2244 to refer to the class name to use a type defined by the class for
2245 arguments of member functions.
2246
2247 2008-11-13 Akim Demaille <demaille@gostai.com>
2248
2249 Finer input type for yytranslate.
2250 This patch is debatable: the tradition expects yylex to return an int
2251 which happens to correspond to token_number (which is an enum). This
2252 allows for instance to return characters (such as '*' etc.). But this
2253 goes against the stronger typing I am trying to have with the new
2254 lex interface which return a symbol_type. So in this case, feed
2255 yytranslate_ with a token_type.
2256
2257 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2258 expect a token_type.
2259
2260 2008-11-13 Akim Demaille <demaille@gostai.com>
2261
2262 Honor lex-params in %define lex_symbol mode.
2263 * data/lalr1.cc: Use b4_lex_param.
2264
2265 2008-11-13 Akim Demaille <demaille@gostai.com>
2266
2267 Simplify names.
2268 * src/output.c (symbol_definitions_output): Rename symbol
2269 attributes type_name and has_type_name as type and has_type.
2270 * data/lalr1.cc: Adjust uses.
2271
2272 2008-11-13 Akim Demaille <demaille@gostai.com>
2273
2274 Use b4_type_names for the union type.
2275 The union used to compute the size of the variant used to iterate
2276 over the type of all the symbols, with a lot of redundancy. Now
2277 iterate over the lists of symbols having the same type-name.
2278
2279 * data/lalr1.cc (b4_char_sizeof_): New.
2280 (b4_char_sizeof): Use it.
2281 Adjust to be called with a list of numbers instead of a single
2282 number.
2283 Adjust its caller for new-line issues.
2284
2285 2008-11-13 Akim Demaille <demaille@gostai.com>
2286
2287 Define the "identifier" of a symbol.
2288 Symbols may have several string representations, for instance if
2289 they have an alias. What I call its "id" is a string that can be
2290 used as an identifier. May not exist.
2291
2292 Currently the symbols which have the "tag_is_id" flag set are
2293 those that don't have an alias. Look harder for the id.
2294
2295 * src/output.c (is_identifier): Move to...
2296 * src/symtab.c (is_identifier): here.
2297 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2298 * src/output.c (symbol_definitions_output): Use it to define "id"
2299 and "has_id".
2300 Remove the definition of "tag_is_id".
2301 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2302 "tag_is_id" were used to produce code.
2303 We still use "tag" for documentation.
2304
2305 2008-11-11 Akim Demaille <demaille@gostai.com>
2306
2307 Locations are no longer required by lalr1.cc.
2308 * data/lalr1.cc (_b4_args, b4_args): New.
2309 Adjust all uses of locations to make them optional.
2310 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2311 (AT_CHECK_NAMESPACE): Check the use of locations.
2312 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2313 without locations with lalr1.cc.
2314 Test these cases.
2315 * tests/output.at: Check lalr1.cc with and without location
2316 support.
2317 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2318 Don't use locations.
2319
2320 2008-11-11 Akim Demaille <demaille@gostai.com>
2321
2322 AT_FULL_COMPILE.
2323 * tests/local.at (AT_FULL_COMPILE): New.
2324 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2325
2326 2008-11-11 Akim Demaille <demaille@gostai.com>
2327
2328 Support parens in calc++.
2329 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2330 * examples/calc++/test (run): Check the expected output.
2331 Adjust callers.
2332 Check parens too.
2333
2334 2008-11-11 Akim Demaille <demaille@gostai.com>
2335
2336 Simplify lalr1.cc since %defines is mandatory.
2337 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2338
2339 2008-11-11 Akim Demaille <demaille@gostai.com>
2340
2341 TODO: yyfmt.
2342 * TODO (yysyntax_error): New item.
2343
2344 2008-11-11 Akim Demaille <demaille@gostai.com>
2345
2346 Prefer M4 to CPP.
2347 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2348 YYERROR_VERBOSE.
2349
2350 2008-11-11 Akim Demaille <demaille@gostai.com>
2351
2352 Support i18n of the parse error messages.
2353 * TODO (lalr1.cc/I18n): Remove.
2354 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2355 error messages, as done in yacc.c.
2356 Stay within the yy* pseudo namespace.
2357
2358 2008-11-11 Akim Demaille <demaille@gostai.com>
2359
2360 More TODO.
2361 * TODO (single stack, yysyntax_error): New.
2362
2363 2008-11-11 Akim Demaille <demaille@gostai.com>
2364
2365 Make it possible to return a symbol_type from yylex.
2366 * data/lalr1.cc (b4_lex_symbol_if): New.
2367 (parse): When lex_symbol is defined, expected yylex to return the
2368 complete lookahead.
2369 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2370 yylex interface.
2371 (bench_variant_parser): Exercise it.
2372
2373 2008-11-11 Akim Demaille <demaille@gostai.com>
2374
2375 Remove useless bench case.
2376 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2377 no longer used.
2378
2379 2008-11-11 Akim Demaille <demaille@gostai.com>
2380
2381 Improve display of directives.
2382 * etc/bench.pl.in (parse_term): Don't add useless eol.
2383
2384 2008-11-11 Akim Demaille <demaille@gostai.com>
2385
2386 Use string_cast in the bench.
2387 * etc/bench.pl.in (generate_grammar_list): Define and use
2388 string_cast.
2389
2390 2008-11-11 Akim Demaille <demaille@gostai.com>
2391
2392 Replace yychar with a Boolean.
2393 * data/lalr1.cc (parse::yychar): Replace by...
2394 (parse::yyempty): this.
2395
2396 2008-11-11 Akim Demaille <demaille@gostai.com>
2397
2398 Factor the tables.
2399 * TODO: New item.
2400
2401 2008-11-11 Akim Demaille <demaille@gostai.com>
2402
2403 Let yytranslate handle the eof case.
2404 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2405 Adjust callers.
2406 No longer expect yychar to be equal to yyeof_, rather, test the
2407 lookahead's (translated) kind.
2408
2409 2008-11-11 Akim Demaille <demaille@gostai.com>
2410
2411 yychar cannot be empty in yyerrlab.
2412 * TODO (yychar == yyempty_): New.
2413 * data/lalr1.cc: Remove the handling of this case.
2414 This eases forthcoming changes related to yychar and yytranslate.
2415
2416 2008-11-11 Akim Demaille <demaille@gostai.com>
2417
2418 Bench: syntactic sugar for %define/#define.
2419 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2420 (&bench_push_parser, bench_variant_parser): Use this feature.
2421 (&eat): New.
2422 Use it.
2423
2424 2008-11-11 Akim Demaille <demaille@gostai.com>
2425
2426 Less memory pressure on the "list" bench.
2427 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2428 the values, to limit memory pressure.
2429
2430 2008-11-11 Akim Demaille <demaille@gostai.com>
2431
2432 Introduce make_symbol.
2433 make_symbol provides a means to construct a full symbol (kind,
2434 value, location) in a single shot. It is meant to be a Symbol
2435 constructor, parameterized by the symbol kind so that overloading
2436 would prevent incorrect kind/value pairs. Unfortunately
2437 parameterized constructors do not work well in C++ (unless the
2438 parameter also appears as an argument, which is not acceptable),
2439 hence the use of a function instead of a constructor.
2440
2441 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2442 (b4_symbol_constructor_declarations)
2443 (b4_symbol_constructor_specialization_)
2444 (b4_symbol_constructor_specializations)
2445 (b4_symbol_constructor_definition_)
2446 (b4_symbol_constructor_definitions): New.
2447 Use them where appropriate to generate declaration, declaration of
2448 the specializations, and implementations of the templated
2449 overloaded function "make_symbol".
2450 (variant::variant): Always define a default ctor.
2451 Also provide a copy ctor.
2452 (symbol_base_type, symbol_type): New ctor overloads for value-less
2453 symbols.
2454 (symbol_type): Now public, so that functions such as yylex can use
2455 it.
2456
2457 2008-11-11 Akim Demaille <demaille@gostai.com>
2458
2459 Inform m4 whether a tag is a valid id.
2460 * src/output.c (is_identifier): New.
2461 (symbol_definitions_output): Use it to define tag_is_id.
2462 But maybe this should be done at m4 level?
2463
2464 2008-11-11 Akim Demaille <demaille@gostai.com>
2465
2466 Test 214 was failing: it greps with a pattern containing [ ]*
2467 which obviously meant to catch spaces and tabs, but contained only
2468 spaces. Tabulations in sources are a nuisance, so to simplify the
2469 matter, get rid of all the tabulations in the Java sources. The
2470 other skeletons will be treated equally later.
2471
2472 * data/java.m4, data/lalr1.java: Untabify.
2473 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2474 tabulations are no longer generated.
2475
2476 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2477
2478 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2479 * configure.ac: Adjust usage.
2480 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2481 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2482 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2483
2484 2008-11-10 Di-an Jan <dianj@freeshell.org>
2485
2486 Workaround Java's ``code too large'' problem for parser tables
2487 in most cases, by using one function per initialization.
2488 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2489 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2490 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2491 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2492 (yytname_): Use b4_typed_parser_table.
2493 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2494 ``code too large'' error.
2495
2496 2008-11-10 Di-an Jan <dianj@freeshell.org>
2497
2498 * NEWS: Document them.
2499
2500 General Java skeleton improvements.
2501 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2502 using gcj < 4.3 in the testsuite, according to comments in
2503 gnulib/m4/javacomp.m4.
2504 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2505 location_type, position_type): Remove extraneous brackets from
2506 b4_percent_define_default.
2507 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2508 m4_define and m4_define_default.
2509 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2510 which marks the end of user code with appropriate syncline, like all
2511 the other skeletons.
2512 (b4_user_post_prologue): Add. Don't silently drop.
2513 (yylex): Remove.
2514 (parse): Inline yylex.
2515 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2516 (%{...%}): Fix typo of %code imports.
2517 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2518
2519 Support annotations on parser class with %define annotations.
2520 * data/lalr1.java (annotations): Add to parser class modifier.
2521 * doc/bison.texinfo (Java Parser Interface): Document
2522 %define annotations.
2523 (Java Declarations Summary): Document %define annotations.
2524 * tests/java.at (Java parser class modifiers): Test annotations.
2525
2526 Do not generate code for %error-verbose unless requested.
2527 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2528 Make private. Make conditional on %error-verbose.
2529 (getErrorVerbose, setErrorVerbose): New.
2530 (yytnamerr_): Make conditional on %error-verbose.
2531 (yysyntax_error): Make some code conditional on %error-verbose.
2532 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2533 about %error-verbose having no effect.
2534 (getErrorVerbose, setErrorVerbose): Document.
2535
2536 Move constants for token names to Lexer interface.
2537 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2538 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2539 (parse): Qualify EOF to Lexer.EOF.
2540 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2541 EOF and token names to Java Lexer Interface.
2542 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2543
2544 Make yyerror public.
2545 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2546 (yyerror): Change to public. Add Javadoc comments. Use longer
2547 parameter names. Make the body rather than the declarator
2548 conditional on %locations.
2549 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2550
2551 Allow user to add code to the constructor with %code init.
2552 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2553 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2554 Add %code init to the front of the constructor body.
2555 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2556 and %define init_throws.
2557 (Java Declarations Summary): Document %code init and
2558 %define init_throws.
2559 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2560 (Java constructor init and init_throws): Add tests.
2561
2562 2008-11-10 Akim Demaille <demaille@gostai.com>
2563
2564 Update TODO.
2565 * TODO (-D): is implemented.
2566 (associativity): Same precedence must have the same associativity.
2567 For instance, how can a * b / c be parsed if * is %left and / is
2568 %right?
2569 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2570
2571 2008-11-10 Akim Demaille <demaille@gostai.com>
2572
2573 Formatting changes.
2574
2575 2008-11-10 Akim Demaille <demaille@gostai.com>
2576
2577 More information about the symbols.
2578 * src/output.c (type_names_output): Document all the symbols,
2579 including those that don't have a type-name.
2580 (symbol_definitions_output): Define "is_token" and
2581 "has_type_name".
2582 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2583 type-name, now that they are defined too in b4_type_names.
2584
2585 2008-11-10 Akim Demaille <demaille@gostai.com>
2586
2587 Regen.
2588
2589 2008-11-10 Akim Demaille <demaille@gostai.com>
2590
2591 Make parser::yytranslate static.
2592 Small speedup (1%) on the list grammar. And makes yytranslate_
2593 available in non member functions.
2594
2595 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2596 function.
2597
2598 2008-11-10 Akim Demaille <demaille@gostai.com>
2599
2600 Avoid trailing spaces.
2601 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2602 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2603 they can be empty, and anyway this incorrectly indents the first
2604 action.
2605
2606 2008-11-10 Akim Demaille <demaille@gostai.com>
2607
2608 Comment changes.
2609
2610 2008-11-10 Akim Demaille <demaille@gostai.com>
2611
2612 Use "enum" for integral constants.
2613 This is just nicer to read, I observed no speedup.
2614
2615 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2616 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2617 (yyuser_token_number_max_, yyundef_token_): Move into...
2618 (yytranslate_): here.
2619
2620 2008-11-10 Akim Demaille <demaille@gostai.com>
2621
2622 Shortcuts in bench directives.
2623 * etc/bench.pl.in (parse_dirs): New.
2624 Use it.
2625 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2626 Create the benches in "benches/".
2627
2628 2008-11-10 Akim Demaille <demaille@gostai.com>
2629
2630 Formatting changes.
2631 * data/lalr1.cc: here.
2632
2633 2008-11-10 Akim Demaille <demaille@gostai.com>
2634
2635 Adjust verbose message to using emacs.
2636 * etc/bench.pl.in: Inform compilation-mode when we change the
2637 directory.
2638 (generate_grammar_list): Recognize %define "variant" in addition
2639 to %define variant.
2640
2641 2008-11-10 Akim Demaille <demaille@gostai.com>
2642
2643 Classify symbols by type-name.
2644 * src/uniqstr.h (UNIQSTR_CMP): New.
2645 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2646 (type_names_output): New.
2647 (muscles_output): Use it.
2648 * data/lalr1.cc (b4_symbol_action_): Remove.
2649 (b4_symbol_case_, b4_type_action_): New.
2650 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2651
2652 2008-11-10 Akim Demaille <demaille@gostai.com>
2653
2654 Change the handling of the symbols in the skeletons.
2655 Before we were using tables which lines were the symbols and which
2656 columns were things like number, tag, type-name etc. It is was
2657 difficult to extend: each time a column was added, all the numbers had
2658 to be updated (you asked for colon $2, not for "tag"). Also, it was
2659 hard to filter these tables when only a subset of the symbols (say the
2660 tokens, or the nterms, or the tokens that have and external number
2661 *and* a type-name) was of interest.
2662
2663 Now instead of monolithic tables, we define one macro per cell. For
2664 instance "b4_symbol(0, tag)" is a macro name which contents is
2665 self-decriptive. The macro "b4_symbol" provides easier access to
2666 these cells.
2667
2668 * src/output.c (type_names_output): Remove.
2669 (symbol_numbers_output, symbol_definitions_output): New.
2670 (muscles_output): Call them.
2671 (prepare_symbols): Define b4_symbols_number.
2672
2673 2008-11-10 Akim Demaille <demaille@gostai.com>
2674
2675 --trace=muscles
2676 * src/getargs.h, src/getargs.c (trace_muscle): New.
2677 (trace_types, trace_args): Support it.
2678 * src/output.c (output_skeleton): Use it.
2679
2680 2008-11-10 Akim Demaille <demaille@gostai.com>
2681
2682 muscles_output.
2683 * src/output.c (muscles_output): New, extracted from...
2684 (output_skeleton): here.
2685 Adjust.
2686
2687 2008-11-10 Akim Demaille <demaille@gostai.com>
2688
2689 Formatting changes.
2690
2691 2008-11-10 Akim Demaille <demaille@gostai.com>
2692
2693 Update the variant example.
2694 * examples/variant.yy: Formatting changes.
2695 One stage build.
2696
2697 2008-11-10 Akim Demaille <demaille@gostai.com>
2698
2699 Support constructor with an argument.
2700 This improves the "list" bench by 2%.
2701
2702 * data/lalr1.cc (variant::build): Add an overloaded version with
2703 an argument.
2704 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2705
2706 2008-11-10 Akim Demaille <demaille@gostai.com>
2707
2708 Test variants.
2709 * tests/c++.at (AT_CHECK_VARIANTS): New.
2710 Use it with and without %define assert.
2711
2712 2008-11-10 Akim Demaille <demaille@gostai.com>
2713
2714 Add %precedence support.
2715 Unfortunately it is not possible to reuse the %prec directive. This
2716 is because to please POSIX, we do not require to end the rules with a
2717 semicolon. As a result,
2718
2719 foo: bar %prec baz
2720
2721 is ambiguous: either a rule which precedence is that of baz, or a rule,
2722 and then a declaration of the precedence of the token baz.
2723
2724 * doc/bison.texinfo: Document %precedence.
2725 (Precedence Only): New.
2726 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2727 * src/conflicts.c (resolve_sr_conflict): Support it.
2728 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2729 Parse it.
2730 * tests/calc.at: Use %precedence for NEG.
2731 * tests/conflicts.at (%precedence does not suffice)
2732 (%precedence suffices): New tests.
2733
2734 2008-11-09 Akim Demaille <demaille@gostai.com>
2735
2736 Make benches in a sub dirs.
2737 * etc/bench.pl.in ($dir): New.
2738 Use it.
2739 Check the use of constructors with an argument.
2740 (bench_variant_parser): Fix.
2741
2742 2008-11-09 Akim Demaille <demaille@gostai.com>
2743
2744 fix eof condition
2745
2746 2008-11-09 Akim Demaille <demaille@gostai.com>
2747
2748 Fix --help.
2749
2750 2008-11-09 Akim Demaille <demaille@gostai.com>
2751
2752 Require the generation of parse-gram.output.
2753 * src/Makefile.am (YACC): Pass --report=all.
2754
2755 2008-11-09 Akim Demaille <demaille@gostai.com>
2756
2757 Formatting changes.
2758
2759 2008-11-09 Akim Demaille <demaille@gostai.com>
2760
2761 Update TODO.
2762 * TODO: Remove obsolete items.
2763 Update others.
2764
2765 2008-11-09 Akim Demaille <demaille@gostai.com>
2766
2767 Enhance bench.pl.
2768 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2769 (@token, $grammar, $bench): New.
2770 (generate_grammar_variant): Rename as...
2771 (generate_grammar_list): this.
2772 (generate_grammar): Adjust.
2773 (bench_grammar): Rename as...
2774 (bench): this.
2775 Use it in the various bench-marking routines.
2776 (-b, -g): New options.
2777
2778 2008-11-09 Akim Demaille <demaille@gostai.com>
2779
2780 Use a static hierarchy for symbols in the C++ parser.
2781 * data/lalr1.cc (symbol_base_type, symbol_type)
2782 (stack_symbol_type): Make it a static hierarchy.
2783 Adjust dependencies.
2784
2785 2008-11-09 Akim Demaille <demaille@gostai.com>
2786
2787 bench.pl -d, --directive.
2788 * etc/bench.pl.in (@directive): New.
2789 (&bench_grammar): Use it.
2790 (&bench_list_grammar): New, to provide access to the "variant"
2791 grammar.
2792 Use it.
2793 (getopts): Support -d, --directive.
2794
2795 2008-11-09 Akim Demaille <demaille@gostai.com>
2796
2797 Use inline for small operations.
2798 * data/lalr1.cc (symbol_base_type, symbol_type)
2799 (stack_symbol_type): Declare constructor and other operations as
2800 inline.
2801 (yy_destroy_): Inline.
2802
2803 2008-11-09 Akim Demaille <demaille@gostai.com>
2804
2805 Introduce a hierarchy for symbols.
2806 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2807 (data_type): Rename as...
2808 (stack_symbol_type): this.
2809 Derive from symbol_base_type.
2810 (yy_symbol_value_print_): Merge into...
2811 (yy_symbol_print_): this.
2812 Rename as...
2813 (yy_print_): this.
2814 (yydestruct_): Rename as...
2815 (yy_destroy_): this.
2816 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2817 (parser::parse): yyla is now of symbol_type.
2818 Use its type member instead of yytoken.
2819
2820 2008-11-09 Akim Demaille <demaille@gostai.com>
2821
2822 Rename data_type and stack_symbol_type.
2823 * data/lalr1.cc (data_type): Rename as...
2824 (stack_symbol_type): this.
2825
2826 2008-11-09 Akim Demaille <demaille@gostai.com>
2827
2828 Handle semantic value and location together.
2829 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2830 yydata.value and yydata.location.
2831 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2832 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2833 single arg.
2834 Adjust all callers.
2835 (yydestruct_): New overload for a stack symbol.
2836
2837 2008-11-09 Akim Demaille <demaille@gostai.com>
2838
2839 Push a complete symbol, not connected parts.
2840 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2841 state, value and location.
2842 Adjust callers.
2843
2844 2008-11-09 Akim Demaille <demaille@gostai.com>
2845
2846 Agregate yylval and yylloc.
2847 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2848 (parser::yyla): this.
2849
2850 2008-11-09 Akim Demaille <demaille@gostai.com>
2851
2852 Rely on the state stack to display reduction traces.
2853 To display rhs symbols before a reduction, we used information
2854 about the rule reduced, which required the tables yyrhs and
2855 yyprhs. Now use rely only on the state stack to get the same
2856 information.
2857
2858 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2859 Use them.
2860 (parser::yyrhs_, parser::yyprhs_): Remove.
2861 (parser::yy_reduce_print_): Use the state stack.
2862
2863 2008-11-09 Akim Demaille <demaille@gostai.com>
2864
2865 Fuse yyval and yyloc into yylhs.
2866 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2867 yylhs.
2868 (parse): Replace yyval and yyloc with yylhs.value and
2869 yylhs.location.
2870 After a user action, compute yylhs.state earlier.
2871 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2872 fresh error_token.
2873
2874 2008-11-09 Di-an Jan <dianj@freeshell.org>
2875
2876 Remove unused variable.
2877 * src/output.c (type_names_output): Remove unused variable sep.
2878
2879 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2880
2881 Change tests/output.at quoting.
2882 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2883 expanding arguments.
2884
2885 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2886
2887 Don't add a semicolon to actions for %skeleton or %language.
2888 It breaks Java test cases as reported by Akim Demaille.
2889 * src/scan-code.l: Implement.
2890
2891 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2892
2893 Clean up %skeleton and %language priority implementation.
2894 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2895 remove static qualifier because others will soon need to see it.
2896 (language_prio): Likewise.
2897 (getargs): Use command_line_prio rather than 0.
2898 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2899 enum fields.
2900 (skeleton_prio): Extern it.
2901 (language_prio): Extern it.
2902 * src/parse-gram.y: Use grammar_prio rather than 1.
2903
2904 2008-11-07 Akim Demaille <demaille@gostai.com>
2905
2906 Moving push traces into yypush_.
2907 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2908 Adjust all uses.
2909
2910 2008-11-07 Akim Demaille <demaille@gostai.com>
2911
2912 The single-stack C++ parser is now the standard one.
2913 * data/lalr1.cc: Rename as...
2914 * data/lalr1-split.cc: this.
2915 * data/lalr1-fusion.cc: Rename as...
2916 * data/lalr1.cc: this.
2917 * etc/bench.pl.in: Adjust.
2918
2919 2008-11-07 Akim Demaille <demaille@gostai.com>
2920
2921 Avoid empty-if warnings.
2922 Reported by Quentin Hocquet.
2923
2924 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2925 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2926
2927 2008-11-07 Akim Demaille <demaille@gostai.com>
2928
2929 Pass command line location to skeleton_arg and language_argmatch.
2930 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2931 The location argument is now mandatory.
2932 Adjust all dependencies.
2933 (getargs): Use command_line_location.
2934
2935 2008-11-07 Akim Demaille <demaille@gostai.com>
2936
2937 -D, --define.
2938 * src/getargs.c (usage): Document -D.
2939 Fix help string for --locations.
2940 (command_line_location): New.
2941 (short_options, long_options, getargs): Support -D, --define.
2942 (getargs): Move -d support at the right place.
2943 * doc/bison.texinfo (Bison Options): Update.
2944 * tests/input.at (%define, --define): New.
2945
2946 2008-11-07 Akim Demaille <demaille@gostai.com>
2947
2948 Initialize the muscle table before parsing the command line.
2949 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2950 (getargs): Define file_name.
2951 * src/main.c (main): Initialize muscle_tab before calling
2952 getargs.
2953 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2954 its value is not available yet.
2955
2956 2008-11-07 Akim Demaille <demaille@gostai.com>
2957
2958 Locations without columns for command line arguments.
2959 * src/location.c (location_print): Don't display negative columns.
2960 * src/location.h: Document this.
2961
2962 2008-11-07 Akim Demaille <demaille@gostai.com>
2963
2964 Fix --help.
2965 * src/getargs.c (usage): Fix help string for -W.
2966
2967 2008-11-07 Akim Demaille <demaille@gostai.com>
2968
2969 Handle more general types of option arguments.
2970 * build-aux/cross-options.pl: The argument ends at the first
2971 space, not the first non-symbol character.
2972 Use @var for each word appearing the argument description.
2973
2974 2008-11-07 Akim Demaille <demaille@gostai.com>
2975
2976 Destroy the variants that remain on the stack in case of error.
2977 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2978 destructor.
2979 Display the value only if yymsg is nonnull.
2980 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2981
2982 2008-11-07 Akim Demaille <demaille@gostai.com>
2983
2984 Add "%define assert" to variants.
2985 This is used to help the user catch cases where some value gets
2986 ovewritten by a new one. This should not happen, as this will
2987 probably leak.
2988
2989 Unfortunately this uncovered a bug in the C++ parser itself: the
2990 lookahead value was not destroyed between two calls to yylex. For
2991 instance if the previous lookahead was a std::string, and then an int,
2992 then the value of the std::string was correctly taken (i.e., the
2993 lookahead was now an empty string), but std::string structure itself
2994 was not reclaimed.
2995
2996 This is now done in variant::build(other&) (which is used to take the
2997 value of the lookahead): other is not only stolen from its value, it
2998 is also destroyed. This incurs a new performance penalty of a few
2999 percent, and union becomes faster again.
3000
3001 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3002 (b4_variant_if): New.
3003 (variant::built): New.
3004 Use it whereever the status of the variant changes.
3005 * etc/bench.pl.in: Check the penalty of %define assert.
3006
3007 2008-11-07 Akim Demaille <demaille@gostai.com>
3008
3009 Use "%define variant" in bench.pl.
3010 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3011 just use %define variants.
3012
3013 2008-11-07 Akim Demaille <demaille@gostai.com>
3014
3015 Regen.
3016 * src/parse-gram.h, src/parse-gram.c: Regen.
3017
3018 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3019
3020 Fix user actions without a trailing semicolon.
3021 Reported by Sergei Steshenko at
3022 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3023 * THANKS (Sergei Steshenko): Add.
3024 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3025 * tests/regression.at (Fix user actions without a trailing semicolon):
3026 New test case.
3027
3028 2008-11-04 Akim Demaille <demaille@gostai.com>
3029
3030 Use b4_copyright_years.
3031 * data/yacc.c (b4_copyright_years): New.
3032 Fix its value according to the comments in the file.
3033 Use it and undefine it.
3034
3035 2008-11-04 Akim Demaille <demaille@gostai.com>
3036
3037 Formatting changes.
3038 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3039
3040 2008-11-04 Akim Demaille <demaille@gostai.com>
3041
3042 Formatting changes.
3043 * data/lalr1-fusion.cc: here.
3044
3045 2008-11-04 Akim Demaille <demaille@gostai.com>
3046
3047 Use strict on bench.pl.
3048 * etc/bench.pl.in (&run, &generate_grammar): New.
3049 Rename the grammar generating functions for consistency.
3050 Change the interface so that the list of benches to run is passed
3051 as (optionless) arguments.
3052 (&compile): Use &run.
3053
3054 2008-11-04 Akim Demaille <demaille@gostai.com>
3055
3056 Remove spurious initial empty lines.
3057 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3058 * data/yacc.c: End the @output lines with an @.
3059
3060 2008-11-04 Akim Demaille <demaille@gostai.com>
3061
3062 Improve the display of sizes.
3063 * etc/bench.p.in: Higher precision.
3064 Sort by decreasing size.
3065
3066 2008-11-04 Akim Demaille <demaille@gostai.com>
3067
3068 Don't memcpy C++ structures.
3069 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3070 arguments.
3071 (variant::build): New overload for
3072 copy-construction-that-destroys.
3073 (variant::swap): New.
3074 (parser::yypush_): Use it in variant mode.
3075
3076 2008-11-04 Akim Demaille <demaille@gostai.com>
3077
3078 Better defaults for bench.pl.
3079 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3080 default values.
3081 Adjust &verbose uses.
3082 (-q, --quiet): New.
3083
3084 2008-11-04 Akim Demaille <demaille@gostai.com>
3085
3086 Make variant.yy more complex.
3087 std::list cannot be copied via memcpy, they are more demanding than
3088 std::string. Use one std::list to strengthen the test.
3089
3090 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3091 Adjust.
3092 Create a list of strings, instead of a single large string.
3093
3094 2008-11-04 Akim Demaille <demaille@gostai.com>
3095
3096 bench.pl --bench.
3097 * etc/bench.pl.in (--bench, $bench): New.
3098
3099 2008-11-04 Akim Demaille <demaille@gostai.com>
3100
3101 Sort methods.
3102 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3103 Define it after as().
3104
3105 2008-11-04 Akim Demaille <demaille@gostai.com>
3106
3107 Useless parens.
3108 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3109
3110 2008-11-04 Akim Demaille <demaille@gostai.com>
3111
3112 Issue missing synclines after user actions.
3113 * data/c.m4 (b4_case): Issue synclines on the output file.
3114
3115 2008-11-04 Akim Demaille <demaille@gostai.com>
3116
3117 Remove trailing empty line.
3118 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3119 epilogue.
3120
3121 2008-11-04 Akim Demaille <demaille@gostai.com>
3122
3123 Fix output of copyright years.
3124 * data/bison.m4 (b4_copyright): Fix the indentation of the
3125 copyright year paragraph.
3126 Use b4_copyright_years when no years are given.
3127 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3128 (b4_copyright_years): New.
3129 Use it.
3130
3131 2008-11-04 Akim Demaille <demaille@gostai.com>
3132
3133 Avoid the spurious initial empty line.
3134 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3135 the end of @output request to suppress the empty line that
3136 results.
3137
3138 2008-11-04 Akim Demaille <demaille@gostai.com>
3139
3140 Remove parser::rhs_number_type.
3141 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3142 (yyrhs_): Use b4_table_define.
3143
3144 2008-11-04 Akim Demaille <demaille@gostai.com>
3145
3146 Fix iteration type.
3147 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3148
3149 2008-11-04 Akim Demaille <demaille@gostai.com>
3150
3151 Factor the declaration of the integer tables.
3152 * data/lalr1-fusion.cc (b4_table_define): New.
3153 Use it.
3154
3155 2008-11-03 Akim Demaille <demaille@gostai.com>
3156
3157 Fix indentation of tables in lalr1.cc
3158 * data/lalr1-fusion.cc: Fix the indentation.
3159
3160 2008-11-03 Akim Demaille <demaille@gostai.com>
3161
3162 Destroy the lhs symbols after reduction.
3163 * data/lalr1-fusion.cc (parse): After the user action, when in
3164 variant mode, destroy the lhs symbols.
3165
3166 2008-11-03 Akim Demaille <demaille@gostai.com>
3167
3168 Simplify yysyntax_error_ use.
3169 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3170 type, but make it unnamed in the declaration when it is not used.
3171
3172 2008-11-03 Akim Demaille <demaille@gostai.com>
3173
3174 Let yy::variant::build return an lvalue.
3175 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3176 object.
3177
3178 2008-11-03 Akim Demaille <demaille@gostai.com>
3179
3180 Define yy::variant only when needed.
3181 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3182 used.
3183
3184 2008-11-03 Akim Demaille <demaille@gostai.com>
3185
3186 Bench the three-stack lalr1.cc.
3187 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3188 one-stack one.
3189
3190 2008-11-03 Akim Demaille <demaille@gostai.com>
3191
3192 Fail on parse error in calc++.
3193 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3194 status.
3195 * examples/calc++/test ($me, $number, $exit, run): New.
3196 Use them to propagate errors to the exit status.
3197
3198 2008-11-03 Akim Demaille <demaille@gostai.com>
3199
3200 Don't specify the skeleton twice in the example.
3201 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3202 file does what is needed.
3203
3204 2008-11-03 Akim Demaille <demaille@gostai.com>
3205
3206 bench: Improve output.
3207 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3208
3209 2008-11-03 Akim Demaille <demaille@gostai.com>
3210
3211 bench: check impact of %debug on variants.
3212 * etc/bench.pl.in (variant_grammar): Fix the computation of
3213 $variant.
3214 Generate a grammar file that can work with or without %debug.
3215 Do use the @directive.
3216 (bench_variant_parser): Check impact of %debug.
3217 (@directives): Rename all the occurrences to...
3218 (@directive): this, for consistency.
3219
3220 2008-11-03 Akim Demaille <demaille@gostai.com>
3221
3222 bench: report the size too.
3223 * etc/bench.pl.in ($iterations): Defaults to -3.
3224 (&bench_grammar): Require hireswallclock.
3225 Compute and display the size of the result.
3226 More comments.
3227
3228 2008-11-03 Akim Demaille <demaille@gostai.com>
3229
3230 bench: More use of the verbosity level.
3231 * etc/bench.pl.in ($verbose, &verbose): New.
3232 Use them.
3233 More POD documentation.
3234
3235 2008-11-03 Akim Demaille <demaille@gostai.com>
3236
3237 bench.pl: a command line interface
3238 * etc/bench.pl.in: More doc.
3239 Some fixes in the documentation.
3240 ($cflags, $iterations, &help, &getopt): New.
3241 Use them.
3242 (&variant_grammar): Let the number of stages be 10 times what is
3243 specified.
3244
3245 2008-11-03 Akim Demaille <demaille@gostai.com>
3246
3247 Bench the use of Boost.Variants.
3248 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3249 New.
3250 (&compile): Be ready to compile C++ parsers.
3251 (&bench_push_parser): Move debug information to the outermost
3252 level.
3253 * THANKS: Add Michiel De Wilde.
3254
3255 2008-11-03 Akim Demaille <demaille@gostai.com>
3256
3257 bench.pl: Pass directives as a list instead of as a string.
3258 * etc/bench.pl.in (&directives): New.
3259 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3260 directives.
3261 (&triangular_grammar): Do use the directives (were ignored).
3262 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3263 directives.
3264
3265 2008-11-03 Akim Demaille <demaille@gostai.com>
3266
3267 Improve genericity of bench.pl.
3268 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3269 argument.
3270 (&bench_push_parser): New.
3271 Call it.
3272
3273 2008-11-03 Akim Demaille <demaille@gostai.com>
3274
3275 Add documentation to bench.pl.
3276 * etc/bench.pl.in: Comment changes.
3277
3278 2008-11-03 Akim Demaille <demaille@gostai.com>
3279
3280 Fuse the three stacks into a single one.
3281
3282 In order to make it easy to perform benchmarks to ensure that
3283 there are no performance loss, lalr1.cc is forked into
3284 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3285 lalr1.cc.
3286
3287 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3288 exercized by the test suite, the user must install a symbolic link
3289 from lalr1.cc to it.
3290
3291 Instead of having three stacks (state, value, location), use a
3292 stack of triples. This considerably simplifies the code (and it
3293 will be easier not to require locations as currently does the C++
3294 parser), and also gives a 10% speedup according to
3295 etc/bench (probably mainly since memory allocation is done once
3296 instead of three times).
3297
3298 Another motivation is to make it easier to destruct properly
3299 semantic values: now that they are bound to their state (hence
3300 symbol type) it will be easier to call the appropriate destructor.
3301
3302 These changes should probably benefit the C parser too.
3303
3304 * data/lalr1.cc: Copy as...
3305 * data/lalr1-fusion.cc: this new file.
3306 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3307 from c++.m4.
3308 (state_stack_type, semantic_stack_type, location_stack_type)
3309 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3310 (data_type, stack_type, yystack_): New.
3311 (YYLLOC_DEFAULT, yypush_): Adjust.
3312 (yyerror_range): Now based on data_type, not location_type.
3313
3314 2008-11-03 Akim Demaille <demaille@gostai.com>
3315
3316 Push the state, value, and location at the same time.
3317 This is needed to prepare a forthcoming patch that fuses the three
3318 stacks into one.
3319
3320 * data/lalr1.cc (parser::yypush_): New.
3321 (parser::yynewstate): Change the semantics: instead of arriving to
3322 this label when value and location have been pushed, but yystate
3323 is to be pushed on the state stack, now the three of them must
3324 have been pushed before. yystate still must be the new state.
3325 This allows to use yypush_ everywhere instead of individual
3326 handling of the stacks.
3327
3328 2008-11-03 Akim Demaille <demaille@gostai.com>
3329
3330 Prefer references to pointers.
3331 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3332 definition to use references instead of pointers.
3333 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3334 Take the value and location as references.
3335 Adjust callers.
3336
3337 2008-11-03 Akim Demaille <demaille@gostai.com>
3338
3339 stack::size instead of stack::height.
3340 * data/lalr1.cc (stack::height): Rename as...
3341 (stack::size): this.
3342 Fix the output type.
3343 Comment changes.
3344
3345 2008-11-03 Akim Demaille <demaille@gostai.com>
3346
3347 Use variants to support objects as semantic values.
3348 This patch was inspired by work by Michiel De Wilde. But he used
3349 Boost variants which (i) requires Boost on the user side, (ii) is
3350 slow, and (iii) has useless overhead (the parser knows the type of
3351 the semantic value there is no reason to duplicate this
3352 information as Boost.Variants do).
3353
3354 This implementation reserves a buffer large enough to store the
3355 largest objects. yy::variant implements this buffer. It was
3356 implemented with Quentin Hocquet.
3357
3358 * src/output.c (type_names_output): New.
3359 (output_skeleton): Invoke it.
3360 * data/c++.m4 (b4_variant_if): New.
3361 (b4_symbol_value): If needed, provide a definition for variants.
3362 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3363 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3364 (b4_char_sizeof, yy::variant): New.
3365 (parser::parse): If variants are requested, define
3366 parser::union_type, parser::variant, change the definition of
3367 semantic_type, construct $$ before running the user action instead
3368 of performing a default $$ = $1.
3369 * examples/variant.yy: New.
3370 Based on an example by Michiel De Wilde.
3371
3372 2008-11-03 Akim Demaille <demaille@gostai.com>
3373
3374 Parameterize the extraction of semantic values.
3375 To make future changes easier, no longer rely on ".TYPE" being the
3376 way to get a semantic value.
3377
3378 * data/c.m4 (b4_symbol_value): New.
3379 Use it.
3380 * data/c++.m4, data/yacc.c: Use it.
3381 * data/glr.c: Use b4_symbol_value.
3382 (b4_rhs_data): New.
3383 Use it.
3384
3385 2008-11-03 Akim Demaille <demaille@gostai.com>
3386
3387 Prepare easier M4 changes.
3388 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3389 future changes.
3390
3391 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3392
3393 Initiate further development.
3394 * NEWS: Create an empty section for new entries.
3395 * gnulib: Update submodule to HEAD.
3396
3397 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3398
3399 * NEWS: Version 2.4.
3400
3401 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3402
3403 Prepare for next release.
3404 * NEWS: Briefly mention changes since 2.3b.
3405 * README: Say GNU m4 1.4.6, which we've been requiring in release
3406 announcements already, not 1.4.3, which breaks the build.
3407
3408 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3409
3410 Say %language is experimental.
3411 We're thinking of extending it's effect on output file naming. See the
3412 thread at
3413 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3414 * NEWS: Say it's experimental.
3415 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3416 recommend it over %skeleton for now.
3417 (Bison Options): Likewise.
3418 (C++ Bison Interface): Use %skeleton not %language.
3419 (Calc++ Parser): Use %skeleton not %language.
3420 * src/getargs.c (usage): Say it's experimental.
3421
3422 2008-11-01 Di-an Jan <dianj@freeshell.org>
3423 Paolo Bonzini <bonzini@gnu.org>
3424
3425 Support all Java parser class modifiers.
3426 * data/java.m4 (b4_percent_define_get3): New.
3427 (b4_final_if, b4_strictfp_if): New.
3428 * data/lalr1.java (final, strictfp, extends, implements): Support.
3429 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3430 documentation.
3431 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3432 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3433 (AT_CHECK_JAVA_GREP): New.
3434 (Java parser class modifiers): New test.
3435 (Java parser class extends and implements): New test.
3436
3437 Model exception propagation better with throws and lex_throws.
3438 * data/java.m4 (b4_list2): New.
3439 (throws): Change default.
3440 * data/lalr1.java (yyaction): Add throws.
3441 (parse): Add lex_throws in addition to throws.
3442 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3443 * tests/java.at (Java throws specifications): New test.
3444
3445 Improve documentation for Java parsers.
3446 * doc/bison.texinfo (Java Parsers): Add subsections.
3447 Don't quote first argument of %define.
3448 (Java Bison Interface): Document output files. Move documentation
3449 of parser class and merge into Java Parser Interface. Document
3450 features that error out. Document directives with no effect.
3451 Move note about Javadoc higher.
3452 (Java Semantic Values): Explicitly mention stype.
3453 Document that generic types cannot be used.
3454 (Java Location Values): Use @deftypeivar. Document constructors.
3455 Correct return value for toString.
3456 (Java Parser Interface): List undocumented constants/fields.
3457 Move documentation of fields added by %parse-param closer to list
3458 of members. Document that token names are added as fields.
3459 Document constructors accurately. Remove error method.
3460 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3461 Interface. Describe %code lexer and yylex accutately.
3462 Remove documentation that does not match the code.
3463 (Java Action Features): New.
3464 (Java Differences): Add reference. Add item on semantic values.
3465 Add note about @{ ... @}. Clarify %% epilogue placement.
3466 (Java Declarations Summary): New.
3467
3468 Fix Java skeleton.
3469 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3470 (b4_remove_comma): Quote test argument.
3471 (b4_identification): Remove "bison" field.
3472 * tests/java.at (Java parser class and package names): New test.
3473 (Java %parse-param and %lex-param): New test.
3474 (Java stype, position_class and location_class): New test.
3475
3476 2008-10-31 Di-an Jan <dianj@freeshell.org>
3477
3478 * data/lalr1.jave: Update copyright years.
3479 (YYParser): Correct name of "generated from" file in Javadoc:
3480 use b4_file_name instead of @ofile@.
3481 (Location constructor): Correct Javadoc parameter name.
3482 (yylloc): Add missing opening m4 quote after b4_location_if.
3483 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3484 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3485 (YYParser constructor): Correct Javadoc parameter name.
3486
3487 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3488
3489 Always put auxiliary code files in the same dir as other output files.
3490 * src/files.c (compute_file_name_parts): When the user specifies
3491 --output but not --file-prefix, extract the directory prefix from the
3492 file prefix not from the grammar file name. This affects the location
3493 of files like location.hh generated by the C++ skeleton. The includes
3494 in the other output files require this fix.
3495 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3496 for expected output files.
3497 (Output files): Add a test for the above.
3498
3499 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3500
3501 * gnulib: Update submodule to HEAD.
3502
3503 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3504
3505 Update copyright year.
3506 * src/files.c: Here.
3507
3508 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3509
3510 Don't overwrite the input file.
3511 * src/files.c (output_file_name_check): Fatal error if using input file
3512 for output.
3513 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3514 argument.
3515 (Conflicting output files): Add test.
3516
3517 2008-10-28 Akim Demaille <demaille@gostai.com>
3518
3519 Space changes.
3520 * data/lalr1.cc: Formatting changes.
3521
3522 2008-10-28 Akim Demaille <demaille@gostai.com>
3523
3524 Don't define debugging functions when !YYDEBUG.
3525 * data/lalr1.cc (debug_stream, set_debug_stream)
3526 (debug_level_type, debug_level, set_debug_level): Don't
3527 declare them when YYDEBUG is not defined.
3528 The implementation are already YYDEBUG-aware.
3529
3530 2008-10-28 Akim Demaille <demaille@gostai.com>
3531
3532 Prefer "continue" for empty loop bodies.
3533 * etc/bench.pl.in: Use "continue" instead of {}.
3534
3535 2008-10-28 Akim Demaille <demaille@gostai.com>
3536
3537 Space and comments changes.
3538 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3539 * data/c.m4, data/lalr1.cc: Space changes.
3540
3541 2008-10-28 Akim Demaille <demaille@gostai.com>
3542
3543 Make gnulib a submodule.
3544 * gnulib: New.
3545 * .gitmodules (gnulib): New.
3546
3547 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3548
3549 Fix yyerror_range for user-defined location type in C++. Reported by
3550 Georg Sauthoff at
3551 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3552 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3553 * THANKS (Georg Sauthoff): Add.
3554
3555 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3556
3557 Update several administrative files mainly to facilitate releasing.
3558 * HACKING (Administrivia): Make the git-merge-changelog notes more
3559 helpful.
3560 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3561 (Release Procedure): Update for git and add numerous details that were
3562 previously missing.
3563 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3564 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3565 that announcements don't claim we bootstrapped with whatever bison
3566 happened to be in PATH. Add flex as a bootstrap tool.
3567 * Makefile.maint: Remove, previously replaced by maint.mk.
3568 * Makefile.cfg: Remove, and migrate settings to...
3569 * cfg.mk: ... here for the sake of `make announcement'.
3570 * bootstrap.conf (gnulib_modules): Add announce-gen.
3571 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3572 Berry.
3573
3574 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3575
3576 Small but important bugfixes for the Java skeleton.
3577 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3578 (yy_symbol_print): Call toString on yyvaluep.
3579
3580 2008-08-29 Akim Demaille <demaille@gostai.com>
3581
3582 Clarify UPDATED use.
3583 * doc/bison.texinfo: It refers to the last edition of this file,
3584 not to the release date of Bison.
3585 Reported by Joel E. Denny.
3586
3587 2008-08-29 Akim Demaille <demaille@gostai.com>
3588
3589 * README: Update FAQ pointer.
3590 Reported by Joel E. Denny.
3591
3592 2008-08-27 Eric Blake <ebb9@byu.net>
3593
3594 Resync m4sugar from autoconf.
3595 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3596 (m4_init): Adjust to latest m4.git changes.
3597 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3598 effects.
3599 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3600 (_m4_list_cmp): Reduce side effects.
3601
3602 2008-08-27 Akim Demaille <demaille@gostai.com>
3603
3604 Check yyerrok in calc.at.
3605 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3606 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3607 expected.
3608
3609 2008-08-27 Akim Demaille <demaille@gostai.com>
3610
3611 Support yyerrok in lalr1.cc.
3612 YYBACKUP is still to import back into lalr1.cc.
3613 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3614
3615 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3616
3617 For maintainer-check*, don't recompile for a $(VERSION) update.
3618 * cfg.mk: New file.
3619 (_is-dist-target): Override the one in GNUmakefile.
3620 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3621
3622 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3623
3624 Update for recent change to gnulib.
3625 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3626 string.h now.
3627
3628 2008-08-15 Eric Blake <ebb9@byu.net>
3629
3630 Remaining m4sugar merge from autoconf.
3631 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3632 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3633 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3634 * src/output.c (output_skeleton): Tell m4 how to find it.
3635
3636 Partial m4sugar merge from autoconf: m4_map.
3637 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3638 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3639 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3640 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3641 for empty list.
3642 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3643 Likewise.
3644 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3645 declares it.
3646
3647 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3648
3649 Keep .version and PACKAGE_VERSION in sync.
3650 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3651 dependency, and add comments justifying this in more detail. Discussed
3652 starting at
3653 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3654
3655 2008-08-06 Eric Blake <ebb9@byu.net>
3656
3657 Partial m4sugar merge from autoconf: m4_shiftn.
3658 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3659 (m4_shift2, m4_shift3): New macros.
3660 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3661 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3662 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3663 * data/java.m4 (b4_remove_comma): Likewise.
3664
3665 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3666 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3667 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3668 (m4_init): Consolidate wrapped text into single m4_wrap.
3669 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3670 in wrapped text.
3671
3672 2008-08-05 Eric Blake <ebb9@byu.net>
3673
3674 Partial m4sugar merge from autoconf: builtins, version.m4.
3675 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3676 (m4_prepend): Remove, as it is unused and inherently quadratic,
3677 whereas m4_append is linear in newer m4.
3678 (m4_mkstemp): New builtin.
3679 (m4_symbols): Make rename conditional.
3680 (m4_version_prereq): Ensure fatal error if used in bison, which
3681 intentionally lacks version.m4.
3682
3683 Fix comments in m4sugar.
3684 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3685
3686 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3687
3688 Update for recent .gitignore fix in Gnulib.
3689 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3690 anchored .gitignore entries.
3691
3692 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3693
3694 Set gnu or gnits strictness.
3695 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3696 development and gnits strictness for releases. Based on Eric Blake's
3697 suggestion at
3698 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3699
3700 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3701
3702 * NEWS: Clarify documentation of %language.
3703
3704 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3705
3706 Support usage of git-merge-changelog.
3707 * .gitattributes: New.
3708 * HACKING: Document usage of git-merge-changelog.
3709 * bootstrap: Install git-merge-changelog entries in .git/config
3710 if appropriate.
3711
3712 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 Remove remaining dependence on CVS Id keyword.
3715 * ChangeLog: For the sake of people still using CVS, don't use dollars
3716 when mentioning Id.
3717 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3718 unusual anyway.
3719 * data/xslt/xml2dot.xsl: Likewise.
3720 * data/xslt/xml2text.xsl: Likewise.
3721 * data/xslt/xml2xhtml.xsl: Likewise.
3722 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3723 * doc/Makefile.am (neutralize): Remove, no longer needed.
3724 (.x.1): Don't use neutralize.
3725 (edit): Don't substitute for ID.
3726 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3727
3728 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3729
3730 Fix dependence on computed configure variables.
3731 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3732 $(top_srcdir)/configure.ac so that changes to computed variables, such
3733 as PACKAGE_VERSION, are seen.
3734 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3735
3736 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3737
3738 Update copyright dates for recent changes.
3739 * Makefile.am: Here.
3740 * src/Makefile.am: Here.
3741 * src/reduce.c: Here.
3742 * tests/reduce.at: Here.
3743
3744 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3745
3746 Use git-version-gen for version names between releases.
3747 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3748 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3749 * .prev-version: New.
3750 * .version.in: Remove.
3751 * ChangeLog: Remove the Id previously used for capturing the CVS
3752 revision.
3753 * GNUmakefile: Remove, now copied from Gnulib.
3754 * Makefile.am: Add code suggested by comments in
3755 build-aux/git-version-gen.
3756 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3757 .prev-version, and .version.
3758 * NEWS (2.3b+): Rename to...
3759 (?.?): ... this because we're dropping the "+" version naming scheme,
3760 but, in general, we still can't be sure of our next release name.
3761 * bootstrap: Add a quick hack to remove from .gitignore the
3762 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3763 entry. This should really be fixed in gnulib instead.
3764 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3765 * configure.ac (AC_INIT): Set version name by invoking
3766 build-aux/git-version-gen.
3767 (AC_CONFIG_FILES): Remove .version, now generated by
3768 build-aux/git-version-gen.
3769 * maint.mk: New, copied from coreutils.
3770 * doc/.cvsignore (bison.1): Add.
3771 * doc/.gitignore (/bison.1): Add.
3772 * doc/bison.1: Remove, generated.
3773 * src/.cvsignore (revision.c): Remove.
3774 * src/.gitignore (/revision.c): Remove.
3775 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3776 (BUILT_SOURCES): Remove revision.c.
3777 (revision.c): Remove.
3778 * src/getargs.c (version): Don't print revision after the VERSION.
3779 * src/revision.h: Remove.
3780
3781 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3782
3783 Fix untranslatable composition of sentences. Reported by Goran
3784 Uddeborg at
3785 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3786 * THANKS (Goran Uddeborg): Add.
3787 * src/reduce.c (reduce_print): Report the number of nonterminals and
3788 rules useless in the grammar in separate sentences.
3789 * tests/reduce.at (Useless Rules): Update output.
3790 (Reduced Automaton): Likewise.
3791 (Underivable Rules): Likewise.
3792 (Empty Language): Likewise.
3793
3794 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3795
3796 Fix some .gitignore and .cvsignore problems.
3797 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3798 (insert_vc_ignore): ... this new function, which prepends `/' to all
3799 .gitignore entries before passing them to insert_sorted_if_absent.
3800 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3801 .cvsignore files are maintained even though Bison developers run
3802 bootstrap while using Git.
3803 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3804 unneeded by Bison.
3805 (gnulib): Add.
3806 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3807 unneeded. Reported by Eric Blake.
3808 * lib/.gitignore (/*~): Add.
3809 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3810 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3811 Blake.
3812 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3813
3814 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3815
3816 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3817 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3818 * bootstrap.conf (gnulib_modules): Add unsetenv.
3819 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3820 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3821 (/setenv.m4): Add.
3822 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3823 the first argument because it may become position-dependent, and unset
3824 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3825 Add comments explaining these issues in more detail.
3826
3827 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3828
3829 Add .gitignore everywhere based on .cvsignore.
3830 * .gitignore: New.
3831 * build-aux/.gitignore: New.
3832 * data/.gitignore: New.
3833 * doc/.gitignore: New.
3834 * etc/.gitignore: New.
3835 * examples/.gitignore: New.
3836 * examples/calc++/.gitignore: New.
3837 * lib/.gitignore: New.
3838 * m4/.gitignore: New.
3839 * po/.gitignore: New.
3840 * runtime-po/.gitignore: New.
3841 * src/.gitignore: New.
3842 * tests/.gitignore: New.
3843
3844 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3845
3846 * NEWS (2.3b+): New section, empty for now.
3847 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3848
3849 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3850
3851 * NEWS (2.3b): Update release date since there has been a delay in
3852 getting the announcements and tarballs out.
3853
3854 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3855
3856 * NEWS: Version 2.3b.
3857 * configure.ac (AC_INIT): Likewise.
3858 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3859
3860 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3861
3862 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3863 been doing it for years.
3864 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3865 (Release Procedure): Add FIXME about make alpha being unmaintained.
3866
3867 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3868
3869 * data/yacc.c: Reformat m4 a little for readability.
3870 * src/lalr.c (build_relations): Correct comment.
3871
3872 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3873
3874 DJGPP specific issue.
3875 * djgpp/config.sed: Fixes required to run configure scripts generated
3876 by autoconf 2.62.
3877
3878 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3879
3880 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3881 coordinator@translationproject.org.
3882
3883 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3884
3885 * THANKS: Add Eric Blake.
3886
3887 2008-04-23 Eric Blake <ebb9@byu.net>
3888
3889 Revert prior patch, by working around autoconf regression.
3890 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3891 ("Output file name: ("): Uncomment test.
3892 ("Output file name: )"): Likewise.
3893 Based on an idea from Noah Misch.
3894
3895 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3896
3897 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3898 2.61. Reported by Juan Manuel Guerrero at
3899 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3900 * tests/output.at ("Output file name: ("): Comment out test case for
3901 now.
3902 ("Output file name: )"): Likewise.
3903
3904 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3905
3906 * GNUmakefile: Update git-version-gen invocation so make dist
3907 succeeds.
3908
3909 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3910
3911 Update to the current gnulib CVS repository, and fix trigraph handling
3912 in Bison.
3913 * bootstrap: Update gnulib CVS repository URL.
3914 (symlink_to_dir): Encapsulate the code that guarantees the destination
3915 directory exists into...
3916 (check_dst_dir): ... this new function, and...
3917 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3918 fail when copying files into lib/uniwidth/.
3919 * src/output.c (prepare_symbols): When writing yytname muscles, where
3920 symbol names will be encoded in C-string literals, tell quotearg to
3921 escape trigraphs. This used to be the default in gnulib.
3922 * tests/regression.at (Token definitions): Because of the change in
3923 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3924 escapes trigraphs in symbol names. Thus, yytname no longer has
3925 trigraphs unnecessarily doubly escaped. Update test case output.
3926 Extend test case to be sure Bison's own error messages will no longer
3927 have trigraphs in symbol names unnecessarily escaped once.
3928
3929 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3930
3931 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3932 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3933 * .cvsignore: Add .version.
3934 * .version.in: New.
3935 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3936 * configure.ac (AC_CONFIG_FILES): Add .version.
3937 * build-aux/.cvsignore: Add git-version-gen.
3938
3939 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3940
3941 * NEWS (2.3a+): Mention that -g now takes an argument.
3942 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3943 consistency. Update the -g and -x entries now that they take
3944 arguments. Use brackets to indicate optional arguments.
3945 * src/getargs.c (usage): Explain the relationship between arguments of
3946 long and short options more completely. Document --defines and -d
3947 separately since the former takes an argument but, for POSIX Yacc, the
3948 latter does not.
3949 (short_options): Let -W take an optional argument like --warnings.
3950 (getargs): Sort cases.
3951
3952 2008-02-28 Akim Demaille <demaille@gostai.com>
3953
3954 * doc/bison.texinfo: Fix a few typos.
3955
3956 2008-02-28 Akim Demaille <akim@epita.fr>
3957
3958 * doc/bison.texinfo (Bison Options): Document -W.
3959 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3960
3961 2008-02-28 Akim Demaille <akim@epita.fr>
3962
3963 * src/getargs.c (short_options): Split and sort for readability.
3964 -g and -x take optional arguments, just like their long options.
3965 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3966 understand.
3967 Fix the handling of $opt which resulted in all the argument to be
3968 considered as optional.
3969
3970 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3971
3972 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3973 say its interface is experimental.
3974 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3975 Java.
3976 (Bison Options): In the -L and --language entry, mention Java.
3977 (Java Bison Interface): Say the interface is experimental.
3978 * src/getargs.c (usage): Mention -L and --language.
3979
3980 * NEWS (2.3a+): Say the push parsing interface is experimental.
3981 * doc/bison.texinfo (Push Decl): Likewise.
3982 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3983 (Push Parser Function): Likewise.
3984 (Pull Parser Function): Likewise.
3985 (Parser Create Function): Likewise.
3986 (Parser Delete Function): Likewise.
3987 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3988 yypull_parse, and yypush_parse entries.
3989
3990 * NEWS (2.3a+): Mention XML support, and say the schema is
3991 experimental.
3992 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3993 * src/getargs.c (usage): Say the XML schema is experimental.
3994
3995 * NEWS (2.3a+): Say option instead of flag.
3996
3997 2008-02-21 Wojciech Polak <polak@gnu.org>
3998
3999 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4000 text.
4001
4002 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4003
4004 Fix impure push parser compile error reported by Bob Rossi at
4005 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4006 * data/yacc.c: Clean up whitespace in the output a little.
4007 (yypstate_allocated): Define for impure push parsers regardless of
4008 whether the pull interface is also requested.
4009 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4010 check impure push parsers without the pull interface.
4011
4012 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4013 yyerror takes arguments specified by %parse-param while yypstate_new
4014 does not.
4015 * doc/bison.texinfo (Parser Create Function): Document that
4016 yypstate_new returns 0 for multiple impure parser instances.
4017 * tests/push.at (Push Parsing: Multiple impure instances): Update
4018 expected stderr output.
4019
4020 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4021
4022 * runtime-po/POTFILES.in (push.c): Remove.
4023
4024 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4025
4026 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4027 * data/push.c: Rename to...
4028 * data/yacc.c: ... this, overwriting it.
4029 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4030 `%push-pull-parser' -> `%define api.push_pull "both"'.
4031 Remove old yacc.c tests, and update push.c tests to yacc.c.
4032
4033 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4034
4035 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4036 `"%code top" blocks' instead of `%code "top" blocks'.
4037 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4038 Clean up whitespace in the output a little.
4039
4040 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4041
4042 Fix documentation problems reported by Tim Josling at
4043 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4044 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4045 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4046 integers. Explain the effect of literal string aliases on error
4047 messages. Copy token 0 documentation from the C++ skeleton
4048 documentation.
4049
4050 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4051
4052 Accept a token number in a %left, %right, or %nonassoc for POSIX
4053 conformance. Reported by Tim Josling at
4054 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4055 * NEWS (2.3a+): Mention.
4056 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4057 and code numbers are treated by precedence declarations.
4058 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4059 of symbols.1.
4060 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4061 of symbol.
4062 (symbol.prec): New, just like symbol but allows INT.
4063 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4064 longer holds.
4065 * tests/regression.at (Token number in precedence declaration): New
4066 test case.
4067
4068 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4069
4070 DJGPP specific issues.
4071 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4072 be changed. Copyright timestamp adjusted.
4073 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4074 be changed. Copyright timestamp adjusted.
4075 * djgpp/config.site: Copyright timestamp adjusted.
4076 * djgpp/config_h.sed: Copyright timestamp adjusted.
4077 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4078 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4079 filename translation list.
4080 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4081 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4082 files shall be created. Before trying to use the temp dir where the
4083 environment variable points to check that the dir really exists. If
4084 not default to the cwd as temp dir. Copyright timestamp adjusted.
4085 * djgpp/subpipe.h: Copyright timestamp adjusted.
4086 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4087
4088 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4089
4090 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4091
4092 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4093
4094 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4095 Problem reported by Claudio Saavedra in
4096 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4097
4098 2008-01-05 Wojciech Polak <polak@gnu.org>
4099
4100 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4101 document's title with the input grammar file name.
4102
4103 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4104
4105 Automate regression testing of the XML/XSLT implementation. Discussed
4106 starting at
4107 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4108 * configure.ac (XSLTPROC): New substitution.
4109 * Makefile.am (maintainer-xml-check): New phony target invoking...
4110 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4111 invoking make maintainer-check with BISON_TEST_XML=1.
4112 * tests/atlocal.in (XSLTPROC): New.
4113 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4114 not to report reachable memory when Bison is expected to have a
4115 non-zero exit status and (2) to compare XML/XSLT output with --graph
4116 and --report=all output for every working grammar when
4117 BISON_TEST_XML=1.
4118 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4119 (AT_BISON_CHECK_XML): New.
4120 (AT_QUELL_VALGRIND): New.
4121 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4122 (AT_CHECK): ... don't redefine this since this was the old way to
4123 quell Valgrind.
4124 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4125 AT_BISON_CHECK invocations.
4126 * tests/c++.at: Likewise.
4127 * tests/calc.at: Likewise.
4128 * tests/conflicts.at: Likewise.
4129 * tests/cxx-type.at: Likewise.
4130 * tests/existing.at: Likewise.
4131 * tests/glr-regression.at: Likewise.
4132 * tests/headers.at: Likewise.
4133 * tests/input.at: Likewise.
4134 * tests/java.at: Likewise.
4135 * tests/output.at: Likewise.
4136 * tests/push.at: Likewise.
4137 * tests/reduce.at: Likewise.
4138 * tests/regression.at: Likewise.
4139 * tests/sets.at: Likewise.
4140 * tests/skeletons.at: Likewise.
4141 * tests/synclines.at: Likewise.
4142 * tests/torture.at: Likewise.
4143 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4144 tends to hang xsltproc.
4145 (Big horizontal): Likewise.
4146
4147 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4148
4149 In XML output, remove redundant class attribute on symbol element.
4150 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4151 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4152 look up a symbol to determine whether it's a nonterminal or terminal.
4153 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4154 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4155
4156 Add prec/assoc information to XML output.
4157 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4158 %prec, add a percent_prec attribute.
4159 * src/print-xml.c (print_grammar): For each terminal that has a
4160 precedence or associativity, add a prec or assoc attribute.
4161 (xml_indent): New.
4162 (xml_puts): Use xml_indent.
4163 (xml_printf): Use xml_indent.
4164 * src/print-xml.h (xml_indent): Prototype.
4165
4166 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4167 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4168
4169 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4170
4171 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4172 (bison:ruleByNumber): ... this for clarity.
4173 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4174 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4175 (xsl:template match="reduction"): Update.
4176 (xsl:template match="item"): Update.
4177 (xsl:template match="reduction"): Update.
4178
4179 In the XML output, don't print the list of rules where symbols appear.
4180 Compute it in XSLT instead. Discussed at
4181 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4182 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4183 (bison:ruleByRhs): New.
4184 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4185 bison:ruleByRhs.
4186 (xsl:template match="terminal/rule"): Remove.
4187 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4188 bison:ruleByRhs.
4189 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4190 Remove.
4191 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4192 bison:ruleByRhs and mode="number-link" for rule template.
4193 (xsl:template match="terminal/rule"): Remove.
4194 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4195 bison:ruleByRhs and mode="number-link" for rule template.
4196 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4197 Rewrite as...
4198 (xsl:template match="rule" mode="number-link"): ... this.
4199 * src/print-xml.c (print_grammar): Don't print the list of rules.
4200
4201 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4202
4203 Don't let --report affect XML output; always print all information.
4204 Discussed at
4205 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4206 * src/conflicts.c (log_resolution): Implement.
4207 * src/print-xml.c (print_core): Implement.
4208 (print_state): Implement.
4209 (print_xml): Implement.
4210
4211 * NEWS (2.3a+): Fix quotes.
4212 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4213 don't let %verbose clear the list specified by --report.
4214
4215 2007-11-26 Akim Demaille <akim@epita.fr>
4216
4217 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4218
4219 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4220
4221 In the XML output, list useless and unused symbols and rules with the
4222 useful ones and add a "usefulness" attribute. Discussed starting at
4223 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4224 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4225 (grammar_rules_print_xml): Print all rules instead of just those
4226 useful in the grammar, and add a "usefulness" attribute.
4227 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4228 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4229 (print_grammar): Print all nonterminals instead of just useful ones,
4230 and add a "usefulness" attribute to nonterminals and terminals.
4231 (print_xml): Don't print a separate "reductions" or
4232 "rules-useless-in-parser" element.
4233 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4234 (reduce_xml): Remove.
4235 (reduce_token_unused_in_grammar): New.
4236 (reduce_nonterminal_useless_in_grammar): New.
4237 * src/reduce.h (reduce_xml): Remove prototype.
4238 (reduce_token_unused_in_grammar): Add prototype.
4239 (reduce_nonterminal_useless_in_grammar): Add prototype.
4240 * data/xslt/xml2text.xsl: Update for XML changes.
4241 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4242 * tests/reduce.at (Useless Terminals): Update output.
4243 (Useless Rules): Update output.
4244 (Reduced Automaton): Update output.
4245
4246 Say "Terminals unused in grammar" instead of "Unused terminals".
4247 * NEWS (2.3a+): Update.
4248 * doc/bison.texinfo (Understanding): Update example output.
4249 * src/reduce.c (reduce_output): Implement.
4250 * data/xslt/xml2text.xsl: Implement.
4251 * data/xslt/xml2xhtml.xsl: Implement.
4252
4253 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4254
4255 Accept --report-file=FILE to override the default `.output' filename.
4256 * NEWS (2.3a+): Mention.
4257 * doc/bison.texinfo (Bison Options): Add an entry.
4258 * src/files.c (compute_output_file_names): Don't override
4259 spec_verbose_file if already set.
4260 * src/getargs.c (usage): Document --report-file.
4261 (REPORT_FILE_OPTION): New anonymous enum member.
4262 (long_options): Add entry for it.
4263 (getargs): Add case for it setting spec_verbose_file.
4264
4265 * build-aux/cross-options.pl: Don't record a short option just because
4266 there's an arg.
4267 * doc/.cvsignore: Add yacc.1.
4268
4269 2007-11-14 Akim Demaille <akim@epita.fr>
4270
4271 * doc/yacc.1.in: New.
4272 * configure.ac, doc/Makefile.am: Adjust.
4273 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4274 config.h symbol.
4275 Use AC_SUBST for assignments too.
4276 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4277
4278 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4279
4280 * src/gram.c: Remove comments that duplicate comments in gram.h.
4281
4282 When reporting useless rules and nonterminals, say "useless in grammar"
4283 instead of "useless", and say "useless in parser" instead of "never
4284 reduced". Discussed starting at
4285 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4286 * NEWS (2.3a+): Mention this change.
4287 * data/xslt/xml2text.xsl: Update output text and expected input XML
4288 element names to match changes below.
4289 * data/xslt/xml2xhtml.xsl: Likewise.
4290 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4291 Contents: "Rules useless in parser due to conflicts".
4292 * doc/bison.texinfo (Decl Summary): Reword a little.
4293 (Understanding): Update example output for changes below.
4294 * src/gram.c: (rule_useful_p): Rename to...
4295 (rule_useful_in_grammar_p): ... this.
4296 (rule_useless_p): Rename to...
4297 (rule_useless_in_grammar_p): ... this.
4298 (rule_never_reduced_p): Rename to...
4299 (rule_useless_in_parser_p): ... this.
4300 (grammar_rules_print): Update for renames.
4301 (grammar_rules_print_xml): Update for renames.
4302 (grammar_rules_never_reduced_report): Rename to...
4303 (grammar_rules_useless_report): ... this since it is used for either
4304 kind of useless rule.
4305 * src/gram.h: Reword comments and update function names in prototypes.
4306 * src/main.c (main): Say "rule useless in parser due to conflicts".
4307 * src/print-xml.c (print_rules_never_reduced): Rename to...
4308 (print_rules_useless_in_parser): ... this, and rename output XML
4309 element "rules-never-reduced" to "rules-useless-in-parser".
4310 (print_xml): Update for rename.
4311 * src/print.c (print_results): Say "Rules useless in parser due to
4312 conflicts".
4313 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4314 (nonterminals_reduce): Say "nonterminal useless in grammar".
4315 (reduce_output): Say "Nonterminals useless in grammar".
4316 Say "Rules useless in grammar".
4317 (reduce_xml): Rename output XML element "useless" to
4318 "useless-in-grammar".
4319 (reduce_print): Don't report the count of grammatically useless rules
4320 as "rules never reduced" just because %yacc is specified.
4321 In the correct report of this count, say nonterminal(s) and rule(s)
4322 "useless in grammar".
4323 * tests/conflicts.at (S/R in initial): Update expected output.
4324 (Defaulted Conflicted Reduction): Likewise.
4325 (Unreachable States After Conflict Resolution): Likewise.
4326 * tests/existing.at (GNU pic Grammar): Likewise.
4327 * tests/reduce.at (Useless Nonterminals): Likewise.
4328 (Useless Rules): Likewise.
4329 (Reduced Automaton): Likewise.
4330 (Underivable Rules): Likewise.
4331 (Empty Language): Likewise.
4332
4333 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4334
4335 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4336 here document and before the EOF so that BSD's implementation of Bourne
4337 shell doesn't parse the delimiter as part of the here document.
4338 * doc/.cvsignore: Add cross-options.texi.
4339 * src/getargs.c (usage): Add a blank line after the warning categories.
4340
4341 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4342
4343 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4344
4345 2007-11-05 Akim Demaille <akim@epita.fr>
4346
4347 Remove Id: from bison.1.
4348 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4349 (perl -0777 -pi -e 's/\.PP\nId): New.
4350 (.x.1): Use it to ignore the version control revision.
4351
4352 2007-11-05 Akim Demaille <demaille@gostai.com>
4353
4354 * build-aux/Makefile.am: Ship cross-options.pl.
4355 * doc/Makefile.am: Always refer to cross-options.texi with
4356 $(srcdir).
4357 (MAINTAINERCLEANFILES): Add it.
4358
4359 2007-11-04 Akim Demaille <demaille@gostai.com>
4360
4361 Generate the long/short option cross-table.
4362 * build-aux/cross-options.pl: New.
4363 * doc/Makefile.am (cross-options.texi): New.
4364 * doc/bison.texinfo: Use it.
4365
4366 2007-11-04 Akim Demaille <demaille@gostai.com>
4367
4368 Generate bison.1 using help2man.
4369 * doc/common.x, doc/bison.x: New.
4370 * doc/Makefile.am (bison.1, .x.1): New.
4371 The code is taken from autoconf-2.61/man/Makefile.am.
4372 * configure.ac: Look for help2man.
4373
4374 2007-11-04 Akim Demaille <demaille@gostai.com>
4375
4376 Complete --help.
4377 * src/getargs.c (usage): Document -W, make it clear that -d,
4378 -g and -x have optional arguments.
4379
4380 2007-11-04 Akim Demaille <demaille@gostai.com>
4381
4382 Find sha1sum when named gsha1sum.
4383 * bootstrap (find_tool): New.
4384 ($SHA1SUM): New.
4385
4386 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4387
4388 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4389 at
4390 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4391 * NEWS (2.3a+): Mention.
4392 * data/bison.m4 (b4_pure_if): Don't define it here.
4393 * data/c.m4 (b4_identification): Depend on individual skeletons to
4394 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4395 values of the %define variables api.pure or api.push_pull. Define
4396 YYPURE, YYPUSH, and YYPULL accordingly.
4397 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4398 glr.cc has already defined b4_pure_flag.
4399 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4400 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4401 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4402 * doc/bison.texinfo (Pure Decl): Update.
4403 (Push Decl): Update.
4404 (Decl Summary): Add api.pure to %define entry.
4405 In %pure-parser entry, say it's deprecated and reference %define.
4406 (Pure Calling): Update.
4407 (Error Reporting): Update.
4408 (C++ Scanner Interface): Update.
4409 (How Can I Reset the Parser): Update.
4410 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4411 reference %define.
4412 * src/getargs.c (pure_parser): Remove global variable.
4413 * src/getargs.h (pure_parser): Remove extern.
4414 * src/output.c (prepare): Don't define pure_flag muscle.
4415 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4416 wrapper around `%define api.pure'.
4417 * tests/calc.at (Simple LALR Calculator): Update.
4418 (Simple GLR Calculator): Update.
4419 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4420 Update.
4421 (GLR: Resolve ambiguity, pure, locations): Update.
4422 (GLR: Merge conflicting parses, pure, no locations): Update.
4423 (GLR: Merge conflicting parses, pure, locations): Update.
4424 * tests/glr-regression.at (Uninitialized location when reporting
4425 ambiguity): Update
4426 * tests/input.at (Unused %define api.pure): New test case.
4427 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4428 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4429 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4430
4431 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4432
4433 %define push_pull -> %define api.push_pull. Discussed starting at
4434 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4435 * data/push.c: Expect the new name.
4436 * data/yacc.c: Likewise.
4437 * doc/bison.texinfo (Push Decl): Update.
4438 (Decl Summary): Update %define entry.
4439 (Push Parser Function): Update.
4440 (Pull Parser Function): Update.
4441 (Parser Create Function): Update.
4442 (Parser Delete Function): Update.
4443 * tests/calc.at (Simple LALR Calculator): Update.
4444 * tests/input.at (%define enum variables): Update.
4445 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4446 (Push Parsing: Multiple impure instances): Update.
4447 (Push Parsing: Unsupported Skeletons): Update.
4448 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4449 (Exploding the Stack Size with Malloc): Update.
4450
4451 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4452 other entries some.
4453
4454 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 For the XML output's terminal element, rename @number to @token-number,
4457 and add @symbol-number. In the nonterminal element, rename @number to
4458 @symbol-number. Discussed starting at
4459 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4460 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4461 renames.
4462 (xsl:template match="nonterminal"): Likewise.
4463 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4464 (xsl:template match="nonterminal"): Likewise.
4465 * src/print-xml.c (print_grammar): Implement.
4466
4467 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4470 2007-10-11 change, the child elements here are items not rules.
4471 (xsl:template match="item"): New.
4472 (xsl:template match="rule"): Update for new reduced itemset.
4473 (xsl:template match="point"): Remove.
4474 (xsl:template match="empty"): For consistency with --graph, don't
4475 output "/* empty */".
4476 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4477 line-wrap, don't pass a negative value as first-line-length since this
4478 won't work with the following changes.
4479 (xsl:template name="line-wrap"): Simplify slightly.
4480 (xsl:template name="ws-search"): Eliminate recursion.
4481 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4482 set next to an item whose dot is not at the end of the RHS even if it
4483 happens to be associated with the same rule.
4484
4485 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4486
4487 Add %define lr.keep_unreachable_states.
4488 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4489 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4490 * src/main.c (main): Implement it.
4491 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4492 Extend to test it, and fix a typo.
4493
4494 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4495
4496 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4497 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4498 the example .output text.
4499 * tests/regression.at (Extra lookahead sets in report): Improve wording
4500 of comments.
4501
4502 2007-10-17 Wojciech Polak <polak@gnu.org>
4503
4504 * src/print-xml.c (print_grammar): Renamed
4505 <terminal> and <nonterminal> attributes:
4506 "type" to "number" and "symbol" to "name".
4507 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4508 Use new attribute names.
4509 (xsl:template match="nonterminal"): Likewise.
4510 * data/xslt/xml2xhtml.xsl: Likewise.
4511
4512 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4513
4514 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4515 (Option Cross Key): Likewise.
4516
4517 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4518 next to an item whose dot is not at the end of the RHS even if it
4519 happens to be associated with the same rule.
4520 * src/print.c (print_core): Likewise.
4521 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4522 (Resolved SR Conflicts): Update output.
4523 * tests/regression.at (Extra lookahead sets in report): New test case.
4524
4525 2007-10-11 Wojciech Polak <polak@gnu.org>
4526
4527 * src/print-xml.c (print_core): Remove item set
4528 redundancy.
4529 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4530 Improve processing time. Suggested by Joel E. Denny.
4531 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4532 Write xsl:param "required" attribute as comment.
4533 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4534 (xsl:template match="rule"): Support new reduced itemset.
4535 (xsl:template match="point"): Remove.
4536 * data/xslt/xml2xhtml.xsl: Likewise.
4537
4538 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4539
4540 * src/getargs.c (version): Update copyright year.
4541
4542 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4543
4544 Make xml2dot.xsl and --graph produce the same output.
4545 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4546 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4547 escaped later.
4548 (xsl:template name="output-node"): Use the new escape template instead
4549 of the string-replace template directly.
4550 (xsl:template name="output-edge"): Likewise.
4551 (xsl:template name="escape"): New, escapes backslashes and newlines in
4552 addition to quotation marks.
4553 * src/graphviz.c (start_graph, output_node, output_edge): Add
4554 whitespace to output for legibility.
4555
4556 Make xml2text.xsl and --report produce the same output, and remove the
4557 XML "conflicts" element since a conflict summary is easily extracted
4558 from the automaton.
4559 * data/xslt/bison.xsl: New.
4560 (xsl:template match="state" mode="bison:count-conflicts): New.
4561 * data/xslt/xml2text.xsl: Import bison.xsl.
4562 (xsl:template match="bison-xml-report"): Instead of styling the
4563 "conflicts" element, style the "automaton" element with mode
4564 "conflicts". Unlike the former, the latter lists S/R and R/R
4565 conflicts for a state on the same line.
4566 (xsl:template match="conflicts"): Remove.
4567 (xsl:template match="conflict"): Remove.
4568 (xsl:template match="terminal"): Line-wrap the list of rules in which
4569 the terminal is used.
4570 (xsl:template match="nonterminal"): Likewise for nonterminals.
4571 (xsl:template match="automaton" mode="conflicts"): New.
4572 (xsl:template match="state" mode="conflicts"): New.
4573 (xsl:template name="line-wrap"): New.
4574 (xsl:template name="ws-search"): New.
4575 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4576 (xsl:template match="bison-xml-report"): Instead of styling the
4577 "conflicts" element, style the "automaton" element with mode
4578 "conflicts."
4579 (xsl:template match="conflicts"): Remove.
4580 (xsl:template match="conflict"): Remove.
4581 (xsl:template match="automaton" mode="conflicts"): New.
4582 (xsl:template match="state" mode="conflicts): New.
4583 * src/conflicts.c (conflicts_output_xml): Remove.
4584 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4585 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4586 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4587 the corresponding XSLT is easier. Also, never wrap between a word and
4588 the comma that follows it.
4589
4590 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4591
4592 Improve C++ namespace support. Discussed starting at
4593 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4594 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4595 b4_namespace_close): New macros that interpret the %define variable
4596 "namespace" so its value can contain "::" to indicate nested
4597 namespaces.
4598 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4599 the above macros.
4600 * data/lalr1.cc (b4_namespace): Likewise.
4601 * data/location.cc (b4_namespace): Likewise.
4602 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4603 inside a new table in the general %define entry. Document `%define
4604 namespace' there as well. Point the %name-prefix entry to it since it
4605 explains it more completely in the case of C++.
4606 (C++ Bison Interface): Mention `%define namespace' instead of
4607 %name-prefix.
4608 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4609 entry suffices.
4610 * tests/c++.at (Relative namespace references): New test case.
4611 (Absolute namespace references): New test case.
4612 (Syntactically invalid namespace references): New test case.
4613 * tests/input.at (C++ namespace reference errors): New test case.
4614
4615 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4616
4617 Add syncline support and location accessor to internal %define
4618 interfaces.
4619 * data/bison.m4 (b4_percent_define_get_loc): New.
4620 (b4_percent_define_get_syncline): New.
4621 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4622 (b4_percent_define_default): Record defining location as line 1 rather
4623 than 0 for the sake of synchronizing #line's, and define
4624 b4_percent_define_syncline(VARIABLE).
4625 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4626 * src/muscle_tab.c (muscle_syncline_grow): New.
4627 (muscle_code_grow): Use muscle_syncline_grow.
4628 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4629 define b4_percent_define_syncline(VARIABLE).
4630 (muscle_percent_define_get_loc): New.
4631 (muscle_percent_define_get_syncline): New.
4632 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4633 remove some unused variables.
4634 (muscle_percent_define_default): Record defining location as line 1
4635 rather than 0 for the sake of synchronizing #line's, and define
4636 b4_percent_define_syncline(VARIABLE).
4637 (muscle_percent_define_check_values): Use
4638 muscle_percent_define_get_loc.
4639 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4640 (muscle_percent_define_get_syncline): Prototype.
4641 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4642 defaults): Update output for location change.
4643 (Complaining during macro argument expansion): Extend to test
4644 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4645
4646 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4647
4648 Fix some error-reporting macro bugs.
4649 * data/bison.m4 (b4_cat): New.
4650 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4651 to stdout so they don't become arguments to other macros. Update
4652 comments and add examples.
4653 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4654 add examples.
4655 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4656 after printing the error directive so that M4 doesn't report subsequent
4657 problems that are induced by this problem.
4658 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4659 instead of just in them. Recognize @\n in both places. Both expand to
4660 the empty string. Needed by b4_cat.
4661 * tests/skeletons.at (Complaining during macro argument expansion):
4662 New test case.
4663 (Fatal errors make M4 exit immediately): New test case.
4664
4665 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4666
4667 Implement --print-datadir.
4668 * src/getargs.c (usage): Mention.
4669 (PRINT_DATADIR_OPTION): New anonymous enum member.
4670 (long_options): Add entry for it.
4671 (getargs): Add case for it calling compute_pkgdatadir.
4672 * src/output.c (output_skeleton): Encapsulate data directory
4673 computation from here...
4674 (prepare): ... and from here...
4675 (compute_pkgdatadir): ... into this new function.
4676 * src/output.h (compute_pkgdatadir): Prototype.
4677
4678 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4679
4680 * src/print-xml.c (escape_bufs): New static global variable
4681 replacing...
4682 (xml_escape_n): ... the static local variable buf here.
4683 (print_xml): Free memory for escape_bufs.
4684 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4685
4686 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4687
4688 Replace `%push-parser' and `%push-pull-parser' with
4689 `%define push_pull "push"' and `%define push_pull "both"'.
4690 `%define push_pull "pull"' is the default.
4691 * doc/bison.texinfo (Push Decl, Push Parser Function,
4692 Pull Parser Function, Parser Create Function, Parser Delete Function):
4693 Update declarations.
4694 (Decl Summary, Table of Symbols): Replace %push-parser and
4695 %push-pull-parser entries with a %define push_pull entry.
4696 * data/bison.m4 (b4_percent_define_check_values): New macro.
4697 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4698 definitions...
4699 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4700 definitions...
4701 * data/push.c: ... to here and compute them from the value of the
4702 %define variable push_pull.
4703 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4704 parsing requests here...
4705 * data/yacc.c: ... hack this to switch to push.c any time
4706 b4_use_push_pull_flag or the %define variable push_pull is set. This
4707 will go away when we mv push.c yacc.c.
4708 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4709 push parsing is not supported since unused %define variables are
4710 reported anyway.
4711 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4712 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4713 comments for consistency with b4_percent_define_check_values.
4714 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4715 muscles.
4716 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4717 Remove.
4718 (prologue_declaration): Remove %push-parser and %push-pull-parser
4719 rules.
4720 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4721 * tests/calc.at: Update declarations.
4722 * tests/input.at (%define enum variables): New test case.
4723 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4724 declaration.
4725 (Push Parsing: Multiple impure instances): Update declaration.
4726 (Push Parsing: Unsupported Skeletons): New test case.
4727 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4728 declaration.
4729 (Exploding the Stack Size with Malloc): Update declaration.
4730
4731 2007-09-24 Wojciech Polak <polak@gnu.org>
4732
4733 Add XSLT transformations.
4734
4735 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4736 * data/xslt/xml2text.xsl: Transform XML into plain text.
4737 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4738 * data/Makefile.am (xsltdir): New variable.
4739 (dist_xslt_DATA): Add xslt/*.xsl files.
4740
4741 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4742
4743 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4744 Problem reported by Wojciech Polak.
4745 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4746 (xml_printf): Undo change I made on 21 September; that is,
4747 indent 2 spaces, not 1.
4748
4749 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4750
4751 Pacify ./configure --enable-gcc-warnings.
4752 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4753 `char const *' instead of `char *'.
4754 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4755 local variable `sep'.
4756
4757 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4758
4759 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4760 elsewhere.
4761 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4762 (xml_printf): Indent just 1 space for level.
4763 (e_char, xlate_char): Remove.
4764 (xml_escape_string): Rewrite to avoid undefined behavior (used
4765 storage that was freed from the stack).
4766 (xml_escape_n): Don't bother checking for subscript error.
4767
4768 2007-09-21 Wojciech Polak <polak@gnu.org>
4769
4770 Add Bison XML Automaton Report.
4771
4772 Add support for an -x option to generate an XML report.
4773 It is not documented yet.
4774 * src/print-xml.c: New file.
4775 * src/print-xml.h: Likewise.
4776 * lib/timevar.def (TV_XML): New var.
4777 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4778 * src/conflicts.c: Include print-xml.h.
4779 (solved_conflicts_xml_obstack): New var.
4780 (log_resolution, conflicts_solve, conflicts_free):
4781 Add support for XML report.
4782 (conflicts_output_val): New function.
4783 * src/conflicts.h (conflicts_output_val): New decl.
4784 * src/files.c (spec_xml_file): New var.
4785 (compute_output_file_names, output_file_names_free): Add XML support.
4786 * src/files.h (spec_xml_file): New decl.
4787 * src/getargs.c (xml_flag): New var.
4788 (usage, short_options, long_options, getargs): Add XML support.
4789 * src/getargs.h (xml_flag): New decl.
4790 * src/gram.c: Include print-xml.h.
4791 (rule_lhs_print_xml, rule_rhs_print_xml):
4792 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4793 New functions.
4794 * src/gram.h: Declare external ones.
4795 * src/main.c: Include print-xml.h.
4796 (main): Add XML support.
4797 * src/reduce.c: Include print-xml.h.
4798 (reduce_xml): New function.
4799 * src/reduce.h: Declare it.
4800 * src/state.c: Include print-xml.h.
4801 (state_new): Add XML support.
4802 (state_rule_lookahead_tokens_print_xml): New function.
4803 * src/state.h: Declare it.
4804 (struct state): New member solved_conflicts_xml.
4805 * src/symtab.c (symbol_class_get_string): New function.
4806 * src/symtab.h: Declare it.
4807
4808 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4809
4810 * GNUmakefile: Switch to coreutils's version.
4811 * bootstrap: Likewise.
4812 * Makefile.cfg: Adjust to new GNUmakefile.
4813 * README-hacking: Likewise.
4814
4815 Import from gnulib:
4816
4817 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4818 Bruno Haible <bruno@clisp.org>
4819
4820 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4821 and is a script that invokes bison. Tighten the code. Add comments.
4822
4823 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4824
4825 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4826 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4827 * doc/bison.texinfo (Decl Summary): Fix.
4828 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4829 * tests/input.at (Boolean %define variables): Update output.
4830 * tests/skeletons.at (%define boolean variables: invalid skeleton
4831 defaults): Rename to...
4832 (%define Boolean variables: invalid skeleton defaults): ... this and
4833 update output.
4834
4835 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4836
4837 In impure push mode, don't allow more than one yypstate to be allocated
4838 since multiple impure parsers would corrupt yynerrs.
4839 * data/push.c (yypstate_allocated): New static global variable
4840 initialized to 0.
4841 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4842 exhaustion if yypstate_allocated is 1, but still return 2.
4843 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4844 already 1. Otherwise, set it to 1.
4845 (yypstate_delete): Set it to 0.
4846 * tests/push.at (Push Parsing: Multiple impure instances): New test
4847 case.
4848
4849 2007-08-17 Bob Rossi <bob@brasko.net>
4850
4851 * doc/bison.texinfo (Push Decl): Document the push parser.
4852 (Table of Symbols): Ditto.
4853 (Pure Decl): Ditto.
4854 (Decl Summary): Ditto.
4855 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4856 Parser Create Function, Parser Delete Function):
4857 Add new push parser symbols.
4858 (Table of Symbols): Document push-parser, push-pull-parser,
4859 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4860
4861 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4862
4863 Update to GPLv3.
4864 * doc/gpl-3.0.texi: New file.
4865 * doc/gpl.texi: Remove.
4866 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4867 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4868 * README-hacking, TODO, bootstrap, bootstrap.conf:
4869 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4870 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4871 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4872 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4873 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4874 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4875 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4876 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4877 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4878 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4879 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4880 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4881 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4882 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4883 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4884 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4885 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4886 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4887 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4888 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4889 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4890 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4891 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4892 * src/complain.c, src/complain.h, src/conflicts.c:
4893 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4894 * src/files.h, src/flex-scanner.h, src/getargs.c:
4895 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4896 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4897 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4898 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4899 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4900 * src/print.c, src/print.h, src/print_graph.c:
4901 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4902 * src/reduce.h, src/relation.c, src/relation.h:
4903 * src/revision.h, src/scan-code.h, src/scan-code.l:
4904 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4905 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4906 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4907 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4908 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4909 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4910 * tests/existing.at, tests/glr-regression.at:
4911 * tests/headers.at, tests/input.at, tests/java.at:
4912 * tests/local.at, tests/output.at, tests/push.at:
4913 * tests/reduce.at, tests/regression.at, tests/sets.at:
4914 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4915 * tests/torture.at:
4916 Update to GPLv3.
4917
4918 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4919
4920 Get rid of broken %no-parser, -n, and --no-parser implementation and
4921 documentation.
4922 * TODO: Don't mention them.
4923 * doc/bison.1: Likewise.
4924 * doc/bison.texinfo (Decl Summary): Likewise.
4925 (Bison Options): Likewise.
4926 (Option Cross Key): Likewise.
4927 * src/getargs.c (no_parser_flag): Remove global variable.
4928 (usage): Don't print description of -n and --no-parser.
4929 (long_options): Remove --no-parser entry here.
4930 (getargs): Remove -n case in the switch here.
4931 * src/getargs.h (no_parser_flag): Remove extern.
4932 * tests/regression.at (Web2c Actions): Remove comment that mentions
4933 --no-parser.
4934
4935 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4936
4937 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4938 name user variables starting with `yy'. Just pass NULL instead of a
4939 dummy local &yylval to yypush_parse.
4940 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4941 starting with `yy'.
4942
4943 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4944
4945 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4946 true since it's then always used regardless of whether yyoverflow is
4947 defined. Reported by Christian Burger at
4948 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4949 * THANKS: Add Christian Burger.
4950
4951 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4952 node names: say "Decl Summary" not "Bison Declaration Summary".
4953
4954 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4955
4956 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4957 determine whether this function has already complained about an invalid
4958 value for a %define boolean variable, don't check whether Bison has
4959 ever examined the value. As written, the check was a tautology.
4960 Instead, record and check for this complaint using a separate muscle.
4961
4962 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4963
4964 Fix push parsing memory leak reported by Brandon Lucia at
4965 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4966 * THANKS: Add Brandon Lucia.
4967 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4968 but the parse never completed and thus freed it.
4969 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4970 * tests/testsuite.at: Include push.at.
4971 * test/push.at: New.
4972 (Push Parsing: Memory Leak for Early Deletion): New test case.
4973
4974 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4975
4976 Improve handling of multiple S/R conflicts in the same state and of S/R
4977 conflicts involving multiple reductions.
4978 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4979 set for a state here or Bison will abort if it is reassigned on a
4980 later conflicted reduction in the same state.
4981 Similarly, don't finalize and assign the solved conflicts report here
4982 or it will be lost if it is reassigned on a later conflicted reduction
4983 in the same state.
4984 (set_conflicts): Instead, assign them both here after all S/R conflicts
4985 in the state have been fully examined.
4986 * src/print.c (shift_set): Rename to...
4987 (no_reduce_set): ... this.
4988 (print_reductions): Update for rename, and add %nonassoc error action
4989 tokens to no_reduce_set so that, when printing the first remaining
4990 reduction on an error action token, the reduction is enclosed in
4991 brackets.
4992 (print_results): Update for rename.
4993 * tests/conflicts.at (Solved conflicts report for multiple reductions
4994 in a state): New test case.
4995 (%nonassoc error actions for multiple reductions in a state): New test
4996 case.
4997
4998 * src/main.c (main): Don't depend on C99 features.
4999
5000 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5001
5002 * build-aux/.cvsignore: Add compile.
5003 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5004 uniwidth.
5005
5006 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5007
5008 * bootstrap (slurp): Create target directories that don't exist.
5009 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5010
5011 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5012
5013 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5014 than item number.
5015 * closure.c (closure): Likewise.
5016 * state.h (reductions): Comment sorting of rules.
5017 (state): Comment sorting of items.
5018
5019 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5020
5021 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5022 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5023 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5024 definition in order to avoid Gnulib headers since we don't use config.h
5025 here.
5026 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5027 rather than AT_DATA so that config.h is included.
5028
5029 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5030
5031 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5032 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5033 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5034 and so that YYFPRINTF is guaranteed to be defined here.
5035
5036 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5037
5038 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5039 with...
5040 (muscle_percent_define_check_values): ... this more helpful function.
5041 Again, it's not used yet, but it will be.
5042 * src/muscle_tab.h: Likewise.
5043
5044 Improve some comments in parser table construction.
5045 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5046 (generate_states): Don't mention ruleset, which is internal to closure.
5047 * src/closure.c (closure): Explain sorting of core and itemset, which
5048 is required for this function to behave correctly.
5049 * src/closure.h (closure): Mention sorting.
5050
5051 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5052
5053 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5054 move the check for disabled transitions to an aver since conflict
5055 resolution hasn't happened yet.
5056
5057 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5058 labels a state as inconsistent just because it has error transitions.
5059 The original form of this check appeared in revision 1.1 of lalr.c,
5060 which was committed on 1991-12-21. Now (at least), changing the
5061 consistency label on such a state appears to have no useful effect in
5062 any of the places it is examined, which I enumerate below. The key
5063 point to understanding each item in this enumeration is that a state
5064 with an error transition is labelled consistent in the first place only
5065 if it has no rules, so the check cannot matter for states that have
5066 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5067 to try to identify its conflicts, and a state must have *rules* to have
5068 conflicts. (2) Labelling a state as inconsistent will affect how
5069 action_row sets the default *rule* for the state. (3) Labelling a
5070 state as inconsistent will cause build_relations to add lookback edges
5071 to *rules* in that state.
5072 * src/state.h (struct state): Word the comment for member consistent
5073 more carefully.
5074
5075 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5076
5077 Don't depend on C99 features.
5078 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5079 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5080 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5081 * src/state.c (state_mark_reachable_states): Fix for-loop.
5082 (state_remove_unreachable_states): Fix for-loop.
5083
5084 Don't widen struct state with member reachable just to temporarily
5085 record reachability. Instead, use a local bitset.
5086 * src/state.h (struct state): Remove member.
5087 * src/state.c (state_new): Don't initialize it.
5088 (state_mark_reachable_states): Rename to...
5089 (state_record_reachable_states): ... this, and use bitset.
5090 (state_remove_unreachable_states): Use bitset.
5091
5092 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 * src/Makefile.am (yacc): Quote target action commands properly so
5095 that the yacc script isn't corrupt. Reported by Hans Aberg at
5096 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5097
5098 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5099 the case of pure parsers. Reported by Frans Englich at
5100 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5101 * THANKS: Add Frans Englich.
5102
5103 * NEWS (2.3a+): In the %code entry, reference section `Bison
5104 Declaration Summary' from the manual now since the %code summary has
5105 moved there.
5106 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5107 in the rules section must be terminated by semicolons.
5108
5109 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5110
5111 Extend the front-end API for %define variables to more completely
5112 mirror the back-end. This will be useful in the future.
5113 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5114 Update comments to mention the new front-end counterparts of these
5115 macros.
5116 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5117 for muscle_string_decode and muscle_location_decode.
5118 (muscle_string_decode): New static function.
5119 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5120 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5121 functions.
5122 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5123 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5124 implementation more closely.
5125 (muscle_percent_define_invalid_value): New function.
5126 * src/muscle_tab.h (muscle_percent_define_get,
5127 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5128 Prototype.
5129
5130 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5131
5132 * NEWS (2.3a+): Mention yesterday's state-removal change.
5133 (2.3a): Remove the %language entry, which was added after 2.3a.
5134 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5135 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5136 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5137 tests/existing.at: Update copyright date.
5138
5139 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5140
5141 If conflict resolution makes states unreachable, remove those states,
5142 report rules that are then unused, and don't report conflicts in those
5143 states.
5144 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5145 New global function.
5146 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5147 function.
5148 * src/main.c (main): After conflict resolution, remove the unreachable
5149 states and update all data structures that reference states by number.
5150 * src/state.c (state_new): Initialize each state's reachable member to
5151 false.
5152 (state_mark_reachable_states): New static function.
5153 (state_remove_unreachable_states): New global function.
5154 * src/state.h (struct state): Add member bool reachable.
5155 (state_remove_unreachable_states): Prototype.
5156 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5157 New test case.
5158 * tests/existing.at (GNU pic Grammar): Update test case output now that
5159 an unused rule is discovered.
5160
5161 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5162
5163 Minor code cleanup in parser table construction.
5164 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5165 (new_itemsets, save_reductions): Update for rename to nitemset.
5166 * src/closure.c (nritemset): Rename to...
5167 (nitemset): ... this since the "r" appears to meaningless and isn't
5168 used in the comments.
5169 (closure): Update for rename.
5170 * src/closure.h (nritemset): Update extern to...
5171 (nitemset): ... this.
5172 * src/lalr.c (LA): Fix a typo in comments.
5173 * src/print.c (print_core): Update for rename to nitemset.
5174 * src/print_graph.c (print_graph): Likewise.
5175 * src/state.h: Fix some typos in header comments.
5176
5177 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5178
5179 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5180 still sticks to ASCII. Sorry!
5181
5182 * README-hacking: New file, taken mostly from coreutils, with changes
5183 for Bison. Contains much of the contents of:
5184 * README-cvs: Remove.
5185 * bootstrap: Sync from gnulib.
5186 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5187 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5188
5189 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5190
5191 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5192 Setzer.
5193 (Java Differences): Fix some typos.
5194 * THANKS: Add Sebastian Setzer.
5195
5196 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5197
5198 * data/java.m4 (b4_single_class_if): Remove.
5199 (b4_abstract_if): Look at "%define abstract".
5200 (b4_lexer_if): New.
5201 (b4_union_name): Rename...
5202 (b4_yystype): ... to this. Map to "%define stype".
5203 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5204 b4_maybe_throws): Fix quoting.
5205 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5206 * data/lalr1.java (Lexer interface): Always define.
5207 (Lexer interface within parser class): Remove.
5208 (YYLexer class): New, used when "%code lexer" is present.
5209 (constructor): When "%code lexer" is used, pass %lex-param
5210 to the lexer constructor.
5211 (yylex, yyparse): Remove %lex-param from method invocations
5212 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5213
5214 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5215 abstract". Rename "%define union_name" to "%define stype".
5216 Rename method names according to previous patch.
5217 (Java Scanner Interface): Describe "%code lexer" instead of
5218 "%pure-parser" and "%define single_class".
5219 (Java Differences): Mention "%code lexer".
5220
5221 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5222 Include scanner here, using macros from tests/local.at.
5223 (AT_DATA_CALC_Y): Remove final argument.
5224 (_AT_CHECK_JAVA_CALC): Likewise.
5225 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5226 of %locations and %error-verbose.
5227 (main): Test with and without %lex-param.
5228 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5229 (AT_BISON_OPTION_POPDEFS): Pop it.
5230
5231 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5232
5233 DJGPP spefic issue. Inhibit the use of disallowed characters for
5234 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5235 and concern testsuite case 46.
5236 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5237 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5238 * djgpp/config.bat: Inhibit the use of disallowed characters.
5239
5240 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 Miscellaneous %define and %code cleanup.
5243 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5244 values are interpreted.
5245 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5246 documentation a little more.
5247 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5248 muscle_percent_define_insert, muscle_percent_code_grow): New
5249 functions/macros.
5250 * src/muscle_tab.h (muscle_percent_define_insert,
5251 muscle_percent_code_grow): Prototype.
5252 * src/parse-gram.y (prologue_declaration): Use
5253 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5254 %define and %code directives.
5255
5256 Make it easy to share %define boolean variables between the front-end
5257 and back-end. Though not used yet, this will be useful in the future.
5258 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5259 Bison uses of names rather than just skeleton uses of names.
5260 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5261 b4_percent_define_skeleton_variables(VARIABLE) to
5262 b4_percent_define_bison_variables(VARIABLE).
5263 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5264 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5265 b4_percent_code_bison_qualifiers(QUALIFIER).
5266 (b4_check_user_names_wrap): Update for renames.
5267 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5268 muscle_percent_define_default): New functions mimicking
5269 b4_percent_define_flag_if and b4_percent_define_default.
5270
5271 For %define variables, report locations for invalid values and
5272 redefinitions.
5273 * data/bison.m4 (b4_percent_define_flag_if): Read
5274 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5275 value for VARIABLE.
5276 (b4_percent_define_default): Save a special location in
5277 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5278 must later be reported as invalid.
5279 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5280 functions.
5281 (muscle_percent_define_insert): Record the location of VARIABLE in
5282 muscle percent_define_loc(VARIABLE), and use it to report the previous
5283 location for a redefinition.
5284 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5285 (muscle_percent_define_default): Update like b4_percent_define_default.
5286 (muscle_grow_user_name_list): Rename to...
5287 (muscle_user_name_list_grow): ... this for consistency and use
5288 muscle_location_grow.
5289 * src/muscle_tab.h (muscle_location_grow): Prototype.
5290 * tests/input.at (%define errors): Update expected output.
5291 * tests/skeletons.at (%define boolean variables: invalid skeleton
5292 defaults): New test case.
5293
5294 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5295
5296 * src/print.c (lookahead_set, state_default_rule): Remove.
5297 (print_reductions): Replace state_default_rule invocation with
5298 equivalent use of yydefact, which was computed in token_actions in
5299 tables.c.
5300 (print_results): Don't allocate lookahead_set.
5301
5302 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5303
5304 * data/lalr1.java: Prefix all private members with yy.
5305
5306 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5307
5308 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5309 Sebastien Fricker at
5310 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5311 * THANKS: Add Sebastien Fricker.
5312 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5313 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5314 accept a variable number of arguments.
5315
5316 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5317
5318 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5319
5320 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5321
5322 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5323 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5324 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5325
5326 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5327
5328 Undo my 2007-02-07 change, switching back to the c-strcase module
5329 introduced in the 2007-02-03 change. Bruno Haible reported that
5330 the 2007-02-07 change would be dangerous in Turkish if we add a
5331 language whose name contains "i", since "i" is not lowercase "I"
5332 in Turkish.
5333 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5334 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5335 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5336 * m4/.cvsignore: Remove strcase.m4.
5337 * src/getargs.c: Revert 2007-02-07 change, as follows.
5338 Include c-strcase.h.
5339 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5340
5341 2007-02-11 Bruno Haible <bruno@clisp.org>
5342
5343 Enable the Java related testsuite tests when the only Java compiler
5344 found is a gcj < 4.3. Discussed at
5345 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5346 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5347
5348 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5349
5350 * data/Makefile.am: Update copyright date.
5351 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5352 yypstate_new returns NULL.
5353 (yypstate_new): Return NULL if malloc does.
5354 * src/reader.c (packgram): Move translation of rule actions from the
5355 beginning of packgram to...
5356 (check_and_convert_grammar): ... here right before packgram is invoked
5357 so it's easier to write more complete comments, and remove redundant
5358 code.
5359
5360 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5361
5362 As in semantic actions, make @$ in %initial-action, %destructor, and
5363 %printer imply %locations.
5364 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5365 scanning @$.
5366 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5367 (@$ in %initial-action implies %locations,
5368 @$ in %destructor implies %locations,
5369 @$ in %printer implies %locations): ... these new test cases.
5370
5371 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5372
5373 Undo most of the 2007-02-03 change, switching to the strcase module
5374 now that gnulib strcase has been fixed.
5375 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5376 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5377 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5378 * m4/.cvsignore: Add strcase.m4.
5379 * src/getargs.c: Revert 2007-02-03 change, as follows.
5380 Don't include c-strcase.h.
5381 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5382 strcasecmp has "unspecified behavior" outside the POSIX locale,
5383 but it works fine in practice if at least one argument is ASCII,
5384 as is the case in Bison.
5385
5386 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5387
5388 * tests/java.at: Skip tests if only one of javac/java is present.
5389 Reported by Joel E. Denny.
5390 * tests/atlocal.in: Adjust copyright years.
5391
5392 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5393
5394 * data/lalr1.java (Stack): Work around old verifiers that disallow
5395 access to the private fields of an inner class, from the outer class.
5396 We can make Stack's fields public because user code doesn't have access
5397 to the instance of Stack used by parse(). Reported by Paul Eggert.
5398
5399 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5400
5401 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5402 the right spot for these files?
5403 * bootstrap.conf (gnulib_modules): Add c-strcase.
5404 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5405 c-strncasecmp.c.
5406 * src/getargs.c: Include c-strcase.h.
5407 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5408 to avoid unspecified behavior.
5409
5410 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5411
5412 * doc/bison.texinfo (Decl Summary): Correct typo.
5413
5414 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5415
5416 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5417 Complain if the value does not match empty, "true" or "false".
5418 * data/c++.m4: Adjust default definitions of %define variables.
5419 * data/java.m4: Adjust default definitions of %define variables.
5420 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5421 to above behavior.
5422 * tests/input.at (Boolean %define variables): Test new behavior.
5423
5424 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5425
5426 * NEWS: Mention java.
5427 * TODO: Remove things that are done.
5428 * bootstrap.conf: Add javacomp-script and javaexec-script.
5429 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5430
5431 * data/Makefile.am: Add new files.
5432 * data/java-skel.m4: New.
5433 * data/java.m4: New.
5434 * data/lalr1.java: New.
5435
5436 * doc/bison.texinfo: Put "A Complete C++ Example" under
5437 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5438 under Other Languages.
5439
5440 * src/getargs.c (valid_languages): Add Java.
5441 * src/getargs.h (struct bison_language): Update size of string fields.
5442
5443 * tests/Makefile.am: Add java.at.
5444 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5445 * tests/java.at: New.
5446 * tests/testsuite.at: Include it.
5447
5448 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5449
5450 Clean up.
5451 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5452 at_directive_argv arguments so these no longer have to be global
5453 variables. Also, update the implementation for the following changes.
5454 (fail_for_at_directive_too_many_args,
5455 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5456 (at_directive_name): Remove as at_directive_argv[0] will be used for
5457 this now.
5458 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5459 for the directive name.
5460 (at_directive_argc, at_directive_argv): Make these local within
5461 skel_lex instead of global.
5462 (INITIAL): Update directive start action for above changes.
5463 (SC_AT_DIRECTIVE_ARG): Rename to...
5464 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5465 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5466 (scan_skel): Move yylex_destroy to...
5467 (skel_scanner_free): ... here.
5468 * tests/skeletons.at (installed skeleton file name): Rename to...
5469 (installed skeleton file names): ... this.
5470
5471 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5472
5473 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5474 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5475 Summary" not "Directives".
5476 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5477 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5478 since the former is now the more complete one.
5479 (Prologue Alternatives): Likewise and do the same for %defines.
5480 (Table of Symbols): Add summary of %code, add summary of %define, and
5481 move full %code documentation to...
5482 (Decl Summary): ... here for consistency with other entries in these
5483 sections.
5484 Move %define entry in order to keep this list alphabetized.
5485 Reword %define entry a little to put less emphasis on the skeleton
5486 concept, which most users shouldn't have to think about.
5487
5488 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5489
5490 Adjust to recent gnulib changes.
5491 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5492 Add string.h, string_.h, unistd_.h, wchar_.h.
5493 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5494 * src/system.h: Don't include <stpcpy.h>; this is now done by
5495 <string.h>.
5496
5497 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5498
5499 Simplify implementation of unqualified %code, implement macros for
5500 uniform treatment of boolean %define flags. Document %define.
5501 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5502 b4_percent_code_ifdef): New.
5503 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5504 * data/c++.m4: Define default value for global_tokens_and_yystype.
5505 * data/glr.cc: Likewise.
5506 * data/location.cc: Use b4_percent_define_flag_if.
5507
5508 * doc/bison.texinfo (Decl Summary): Document %define.
5509
5510 * src/parse-gram.y (Unqualified %code): Change muscle name to
5511 b4_percent_code().
5512 (content.opt): Default to empty.
5513
5514 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5515
5516 Implement support for relative and absolute skeleton file names.
5517 Discussed starting at
5518 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5519 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5520 (Bison Options): Document in --skeleton entry.
5521 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5522 full_skeleton can't necessarily hold all of pkgdatadir.
5523 If the specified skeleton file name contains a `/', don't prepend
5524 pkgdatadir.
5525 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5526 file name contains a `/', prepend the grammar file directory.
5527 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5528 * skeletons.at: New file.
5529 (relative skeleton file names): New test case.
5530 (installed skeleton file names): New test case.
5531 * tests/testsuite.at: Include skeletons.at.
5532
5533 * bootstrap: Update copyright to 2007.
5534
5535 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5536
5537 * bootstrap: Remove occurrences of .#bootmp from the files.
5538
5539 2007-01-17 Akim Demaille <akim@epita.fr>
5540
5541 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5542 nonterminals.
5543 Use per-type %printer.
5544
5545 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5546
5547 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5548 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5549 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5550 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5551 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5552 tests/glr-regression.at, tests/input.at, tests/local.at,
5553 tests/output.at, tests/torture.at: Update copyright to 2007.
5554
5555 2007-01-16 Akim Demaille <akim@epita.fr>
5556
5557 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5558 error code.
5559 (Calc++ Scanner): Exit with failure if we can't open the input
5560 file.
5561 Accept "-" standing for stdin.
5562 (Calc++ Top Level): Print the result only if the parsing was
5563 successful.
5564
5565 2007-01-16 Akim Demaille <akim@epita.fr>
5566
5567 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5568
5569 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5570 and Joel E. Denny <jdenny@ces.clemson.edu>
5571
5572 Clean up %define and %code implementation in M4 some. Most
5573 importantly, rename all related macros to be in the b4_percent_define
5574 and b4_percent_code namespaces. Also, complete support for `.' in
5575 %define variable names and %code qualifiers.
5576 * data/bison.m4 (b4_check_user_names): Check for special
5577 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5578 m4_foreach loops.
5579 (b4_get_percent_define, b4_get_percent_code): Rename to...
5580 (b4_percent_define_get, b4_percent_code_get): ... these.
5581 Extend documentation with examples.
5582 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5583 b4_percent_define_skeleton_variables and
5584 b4_percent_code_skeleton_qualifiers.
5585 Expect any value for the %define variable `foo' to be stored in the
5586 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5587 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5588 expect any unqualified %code blocks to be stored in a macro named
5589 `b4_percent_code_unqualified'.
5590 Use m4_indir so that %define variable names and %code qualifiers can
5591 contain `.', which is allowed by the grammar parser.
5592 (b4_percent_define_default): New macro to set a default value for a
5593 %define variable.
5594 (m4_wrap): Update wrapped code, and fix some underquoting.
5595 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5596 Expect grammar uses of %define variables and %code qualifiers to be
5597 defined in b4_percent_define_user_variables and
5598 b4_percent_code_user_qualifiers.
5599 * data/c++.m4: Use b4_percent_define_default rather than
5600 m4_define_default. Fix some underquoting. Skeleton usage of %define
5601 variable define_location_comparison now implies skeleton usage of
5602 %define variable filename_type.
5603 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5604 data/push.c, data/yacc.c: Update macro names.
5605 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5606 muscle names.
5607
5608 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5609
5610 DJGPP specific issues.
5611
5612 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5613 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5614
5615 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5616
5617 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5618 run parsers in all tests so that Valgrind is invoked during
5619 maintainer-check-valgrind.
5620 (Duplicate representation of merged trees): Free all semantic values.
5621 (Duplicated user destructor for lookahead): Likewise.
5622
5623 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5624
5625 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5626 command-line prefix.
5627 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5628 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5629 miss Valgrind messages.
5630 (Exploding the Stack Size with Malloc): Likewise.
5631
5632 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5633
5634 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5635 locals. Reported by Juan Manuel Guerrero at
5636 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5637 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5638 Fix some indentation also.
5639 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5640 explaining this issue.
5641
5642 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5643 and Joel E. Denny <jdenny@ces.clemson.edu>
5644
5645 Simplify union and prologue handling, and escape union and lex/parse
5646 params with digraphs.
5647 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5648 values to the empty string since these are no longer guaranteed
5649 initialized by the front-end.
5650 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5651 braces around b4_user_stype since this is no longer done by the
5652 front-end.
5653 * src/files.c, src/files.h (pre_prologue_obstack,
5654 post_prologue_obstack): Remove.
5655 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5656 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5657 with digraphs. This fixes lex params and parse params.
5658 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5659 * src/output.c (prepare): Remove muscle insertion of the prologues.
5660 (output): Remove freeing of pre_prologue_obstack and
5661 post_prologue_obstack.
5662 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5663 than prologue_augment for prologue parsing so you don't need prologue
5664 obstacks.
5665 (grammar_declaration): For %union RHS, use `braceless' instead of
5666 "{...}" so that braces are already stripped and code is escaped with
5667 digraphs.
5668 * src/reader.c (prologue_augment): Remove.
5669 (reader): Remove initialization of pre_prologue_obstack and
5670 post_prologue_obstack.
5671 * src/reader.h (prologue_augment): Remove.
5672
5673 * data/c.m4: Remove stray parenthesis.
5674
5675 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5676
5677 Remove quotes from variables names in %define directives and from
5678 qualifiers in %code directives, and restrict the characters that are
5679 allowed in them to M4-friendly ones. For %define, continue to support
5680 the quoted form as a deprecated feature. Discussed starting at
5681 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5682 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5683 %code.
5684 * doc/bison.texinfo (Prologue Alternatives): Update.
5685 (Decl Summary): In %defines entry, update mention of `%code requires'
5686 and `%code provides'.
5687 (C++ Location Values): Update %define uses.
5688 (Calc++ Parser Interface): Likewise.
5689 (Calc++ Parser): Likewise, and update `%code requires' uses.
5690 (Table of Symbols): Update %code documentation.
5691 * src/parse-gram.y (prologue_declaration): For %define variables, use
5692 `variable' instead of `STRING'.
5693 (grammar_declaration): For %code qualifiers, use `ID' instead of
5694 `STRING'.
5695 (variable): New nonterminal that takes an `ID' or a `STRING'.
5696 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5697 and %define uses.
5698 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5699 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5700 (%define errors): Update %define uses.
5701
5702 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5703
5704 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5705 instead of muscle_insert for %define values so that M4-special
5706 characters are replaced with digraphs.
5707 * tests/input.at (%define errors): Extend to check weird values.
5708
5709 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5710
5711 Instead of having skeletons declare all valid %define variables and
5712 %code qualifiers, provide macros that retrieve the associated values
5713 and build these lists automatically. Thus Bison will now warn when a
5714 variable or qualifier is not used by the skeleton in the current
5715 invocation regardless of whether it might sometimes be used by that
5716 skeleton in other invocations. Also, move all %define value macros to
5717 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5718 form, which is replaced by %code.
5719 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5720 (b4_check_user_names): ... this, and change the series of valid name
5721 arguments to a single list argument for names used in the skeleton
5722 similar to the existing list argument for names used in the grammar.
5723 Warn instead of complaining.
5724 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5725 values and %code code, to format %code code properly, and to build
5726 lists of all %define variables and %code qualifiers used in the
5727 skeleton: b4_skeleton_percent_define_variables and
5728 b4_skeleton_percent_code_qualifiers.
5729 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5730 Remove, and...
5731 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5732 the skeleton names lists can finish building first. In place of
5733 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5734 expect the lists b4_user_percent_define_variables and
5735 b4_user_percent_code_qualifiers.
5736 * data/c++.m4: Where setting default values for b4_parser_class_name,
5737 b4_location_type, b4_filename_type, b4_namespace, and
5738 b4_define_location_comparison, update their names to the
5739 b4_percent_define_ namespace.
5740 * data/glr.c: Don't use b4_check_percent_define_variables and
5741 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5742 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5743 (b4_parser_class_name, b4_namespace): Define these using
5744 b4_get_percent_define for parser_class_name and namespace.
5745 * data/location.cc: Use b4_get_percent_define.
5746 * data/push.c: Don't use b4_check_percent_define_variables and
5747 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5748 * data/yacc.c: Likewise, and don't call m4_exit in
5749 b4_use_push_for_pull_if or m4_wrap code will never execute.
5750 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5751 Rename to...
5752 (muscle_grow_user_name_list): ... this for consistency with the
5753 terminology used in bison.m4.
5754 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5755 %define variable names, and rename muscle used_percent_define_variables
5756 to user_percent_define_variables.
5757 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5758 user_percent_code_qualifiers.
5759 (content): Remove.
5760 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5761 {CODE} form is no longer accepted.
5762 * tests/input.at (Reject bad %code qualifiers): Rename to...
5763 (Reject unused %code qualifiers): ... this, and update test output.
5764 (%define error): Update test output.
5765
5766 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5767
5768 Check for unrecognized %define variables similar to checking for
5769 unrecognized %code qualifiers. Check for redefined %define variables.
5770 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5771 generalizes...
5772 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5773 (b4_check_percent_define_variables): New, also wraps it.
5774 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5775 variables using b4_check_percent_define_variables.
5776 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5777 all those exercised in the test suite and all those listed in the
5778 `Default values' section of c++.m4. Are there others?
5779 * data/push.c, data/yacc.c: Declare no valid %define variables.
5780 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5781 similar to muscle_find, but it works even when the muscle stores a
5782 const value.
5783 (muscle_grow_used_name_list): New function for constructing the used
5784 name list muscles that b4_check_for_unrecognized_names requires.
5785 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5786 %define'd more than once. Define the b4_used_percent_define_variables
5787 muscle with muscle_grow_used_name_list.
5788 (grammar_declaration): Abbreviate %code code with
5789 muscle_grow_used_name_list.
5790 * tests/input.at (%define errors): New.
5791
5792 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5793
5794 Provide warn_at, complain_at, and fatal_at function callbacks to the
5795 skeletons, and use this for %code qualifier complaints.
5796 * data/bison.m4 (b4_error_at): New, invoked by...
5797 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5798 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5799 @fatal_at(...@) directives.
5800 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5801 qualifiers in b4_used_percent_code_qualifiers and to use
5802 b4_complain_at.
5803 * src/location.c, src/location.h (boundary_set_from_string): New global
5804 function.
5805 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5806 function.
5807 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5808 to b4_used_percent_code_qualifiers.
5809 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5810 function.
5811 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5812 (lineno): Rename to...
5813 (out_lineno): ... this so I don't misunderstand it again.
5814 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5815 here; these newlines are in the input but not the output file.
5816 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5817 (at_directive_perform): ... this new static function, and add handling
5818 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5819 directives.
5820 * tests/input.at (Reject bad %code qualifiers): Update test output with
5821 locations and extend.
5822
5823 * tests/output.at (Output file name: [, Output file name: ]): Remove
5824 bogus comment about these tests failing.
5825
5826 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5827
5828 Clean up b4_check_percent_code_qualifiers a little.
5829 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5830 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5831 documentation and add examples.
5832 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5833 qualifiers here.
5834
5835 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5836
5837 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5838 unreliable -- especially when they're hidden inside another macro.
5839 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5840 data/c.m4: Remove m4_divert(-1).
5841 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5842 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5843 m4_divert_push(0) and m4_divert_pop(0).
5844 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5845 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5846 pushed and popped by m4sugar, should be first on the stack.
5847
5848 Provide warn, complain, and fatal function callbacks to the skeletons.
5849 This provides more flexibility than m4_fatal, improves the error
5850 message format, and captures messages for translation. Discussed
5851 starting at
5852 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5853 * data/bison.m4 (b4_error): New, invoked by...
5854 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5855 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5856 directives. Because these M4 macros might be called when the current
5857 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5858 the previous removal of uses of m4_divert, which caused trouble.
5859 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5860 m4_fatal to report unrecognized %code qualifiers.
5861 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5862 push parser requests.
5863 * data/glr.c: Use b4_complain instead of m4_fatal to report
5864 non-deterministic push parser requests.
5865 Update @output usage to @output(...@) form.
5866 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5867 report missing %defines. Update @output usage to @output(...@) form.
5868 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5869 @output(...@) form.
5870 * src/main.c (main): Invoke skel_scanner_free.
5871 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5872 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5873 obstack_for_string from flex-scanner.h.
5874 (YY_DECL): Use to declare skel_lex static.
5875 (decode_at_digraphs): Remove; now handled in the new
5876 SC_AT_DIRECTIVE_ARG start condition.
5877 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5878 functions.
5879 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5880 at_directive_argv): New static globals.
5881 (INITIAL): Use fail_for_invalid_at.
5882 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5883 recognize the start of a generalized `@directive(...@)' form and
5884 start...
5885 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5886 directive args (using the new obstack_for_string), to decode the
5887 contained @ diagraphs, and to perform the directive. It recognizes
5888 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5889 @output(...@).
5890 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5891 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5892 `@,'.
5893 (scan_skel): Initialize obstack_for_string on the first call.
5894 (skel_scanner_free): New function to free obstack_for_string.
5895 * tests/input.at (Reject bad %code qualifiers): Update test output.
5896
5897 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5898
5899 Consolidate the 4 prologue alternative directives (%code, %requires,
5900 %provides, and %code-top) into a single %code directive with an
5901 optional qualifier field. Discussed at
5902 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5903 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5904 alternatives.
5905 * doc/bison.texinfo (Prologue Alternatives): Update.
5906 (Decl Summary): Update to %code "requires" and %code "provides".
5907 (Calc++ Parser): Update to %code "requires".
5908 (Table of Symbols): Remove entries for %requires, %provides, and
5909 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5910 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5911 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5912 which are skeleton-specific.
5913 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5914 declare what %code qualifiers it supports and to complain if any other
5915 qualifiers were used in the grammar.
5916 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5917 and b4_user_code([b4_percent_code_provides]) in place of
5918 b4_user_requires and b4_user_provides.
5919 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5920 Add b4_user_code([b4_percent_code_top]) and
5921 b4_user_code([b4_percent_code]).
5922 Invoke b4_check_percent_code_qualifiers.
5923 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5924 PERCENT_REQUIRES): Remove.
5925 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5926 %requires. Rewrite the %code RHS as the unqualified form defining the
5927 muscle b4_percent_code. Add another RHS for the qualified %code form,
5928 which defines muscles of the form b4_percent_code_QUALIFIER and the
5929 b4_used_percent_code_qualifiers muscle.
5930 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5931 PERCENT_REQUIRES): Remove.
5932 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5933 %code "requires" and %code "provides".
5934 * tests/input.at (Reject bad %code qualifiers): New.
5935
5936 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5937
5938 Use the new code_props interface for destructors and printers.
5939 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5940 printer_location members, and change the type of the destructor and
5941 printer members to code_props.
5942 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5943 symbol_printer_get, semantic_type_destructor_set,
5944 semantic_type_printer_set, default_tagged_destructor_set,
5945 default_tagless_destructor_set, default_tagged_printer_set,
5946 default_tagless_printer_set): Use code_props in arguments and return
5947 types in place of char const * and location.
5948 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5949 since the locations are now contained in the return of
5950 symbol_destructor_get and symbol_printer_get.
5951 * src/output.c (symbol_destructors_output, symbol_printers_output):
5952 Replace with...
5953 (symbol_code_props_output): ... this to eliminate duplicate code.
5954 (output_skeleton): Update to use symbol_code_props_output.
5955 * src/reader.c (symbol_should_be_used): Update use of
5956 symbol_destructor_get.
5957 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5958 Update uses of the various _destructor_set and _printer_set functions.
5959 * src/symtab.c: (default_tagged_destructor_location,
5960 default_tagless_destructor_location, default_tagged_printer_location,
5961 default_tagless_printer_location): Remove since we...
5962 (default_tagged_destructor, default_tagless_destructor,
5963 default_tagged_printer, default_tagless_printer): ... change the type
5964 of these to code_props.
5965 (symbol_new, semantic_type_new, symbol_destructor_set,
5966 semantic_type_destructor_set, symbol_destructor_get,
5967 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5968 symbol_check_alias_consistency, default_tagged_destructor_set,
5969 default_tagless_destructor_set, default_tagged_printer_set,
5970 default_tagless_printer_set): Update.
5971 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5972 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5973 code_props members.
5974 (symbol_print): Use SYMBOL_CODE_PRINT.
5975
5976 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5977
5978 Use the new code_props interface for rule actions.
5979 * src/symlist.h (symbol_list): Replace action, action_location, and
5980 used members with a code_props action_props member.
5981 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5982 grammar_midrule_action, grammar_current_rule_merge_set,
5983 grammar_current_rule_symbol_append, packgram): Update.
5984 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5985 * src/scan-code.l (handle_action_dollar): Update.
5986 (translate_rule_action): Remove, no longer used.
5987 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5988
5989 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5990
5991 Use the new code_props interface in parse-gram.y.
5992 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5993 Update all uses of translate_* functions to use the new code_props
5994 interface and to use gram_scanner_last_string_free and
5995 code_scanner_last_string_free where possible.
5996 (grammar_declaration): symbol_list_destructor_set and
5997 symbol_list_printer_set now perform the translation, so don't do it
5998 here. Use gram_scanner_last_string_free where possible.
5999 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6000 translate_code): Remove, no longer used.
6001 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6002 symbol_list_printer_set): Perform code translation here rather than
6003 depending on the caller to do so.
6004
6005 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6006 * src/scan-gram.h (gram_last_string): Remove declaration.
6007 * src/scan-gram.l (last_string): Declare it static.
6008
6009 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6010
6011 Encapsulate code properties and related functionality for the various
6012 destructors, printers, and actions into a code_props structure and
6013 interface. This patch merely implements code_props in scan-code.h and
6014 scan-code.l. Future patches will rewrite other modules to use it.
6015 Discussed starting at
6016 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6017 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6018 consistently initialize const structs that have an empty location
6019 field.
6020 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6021 to ensure consistency.
6022 * src/scan-code.h (code_props): New structure.
6023 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6024 function, macro, and const global variable for initializing a
6025 code_props with no code.
6026 (code_props_plain_init, code_props_symbol_action_init,
6027 code_props_rule_action_init, code_props_translate_code): The rest of
6028 the new code_props functional interface. Among other things, the init
6029 functions set the code_props kind field so that
6030 code_props_translate_code will know whether to behave like
6031 translate_symbol_action, translate_rule_action, or translate_code.
6032 These old translate functions must remain until all other modules are
6033 updated to use the new code_props interface.
6034 (code_scanner_last_string_free): New function similar to
6035 gram_scanner_last_string_free.
6036 (code_scanner_free): Add documentation.
6037 * src/scan-code.l: Implement the new interface.
6038 (code_lex): Make it static, add a code_props* argument, and remove the
6039 rule argument.
6040 (last_string): New static global similar to the one in scan-gram.l.
6041 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6042 instead of rule.
6043 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6044 code_props since Bison may one day use this information for destructors
6045 and printers.
6046 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6047 (handle_action_dollar): Use symbol_list_n_get and set used flag
6048 directly since symbol_list_n_used_set is removed.
6049 (translate_action): Add a code_props* argument and remove the rule,
6050 action, and location arguments. Pass the code_props* on to code_lex.
6051 (translate_rule_action, translate_symbol_action, translate_code):
6052 Rewrite as wrappers around the new code_props interface.
6053 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6054 it would eventually need to break the encapsulation of code_props.
6055
6056 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6057
6058 * etc/.cvsignore: New.
6059
6060 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6061
6062 Add maintainer-push-check to run maintainer-check using push parsing in
6063 place of pull parsing where available.
6064 * Makefile.am (maintainer-push-check): New.
6065 * data/bison.m4 (b4_use_push_for_pull_if): New.
6066 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6067 appropriately based on their existing values.
6068 (yypush_parse): Don't print push-parser-specific diagnostics if push
6069 parsing is being used in place of pull parsing.
6070 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6071 push.c.
6072 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6073 variable, and insert b4_use_push_for_pull_flag into muscles.
6074 * tests/Makefile.am (maintainer-push-check): New.
6075
6076 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6077
6078 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6079 (whether successful or failed) so that yypush_parse can be invoked
6080 again to start a new parse using the same yypstate.
6081 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6082 check multiple yypull_parse invocations on the same yypstate. For pull
6083 mode, extend to check multiple yyparse invocations.
6084 (Exploding the Stack Size with Alloca): Extend to try with
6085 %push-pull-parser.
6086 (Exploding the Stack Size with Malloc): Likewise.
6087
6088 * tests/calc.at (Simple LALR Calculator): Don't specify
6089 %skeleton "push.c" since %push-pull-parser implies that now.
6090 * tests/headers.at (export YYLTYPE): Don't check for the push
6091 declarations. Otherwise, this test case can't be used to see if push
6092 mode can truly emulate pull mode.
6093 * tests/input.at (Torturing the Scanner): Likewise.
6094 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6095 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6096 AT_YACC_IF, which now includes the case of push mode since %skeleton
6097 need not be used for push mode. This will be more intuitive once
6098 push.c is renamed to yacc.c.
6099
6100 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6101
6102 For push mode, convert yyparse from a macro to a function, invoke yylex
6103 instead of passing a yylexp argument to yypull_parse, and don't
6104 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6105 Discussed starting at
6106 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6107 * data/bison.m4 (b4_pull_if): New.
6108 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6109 * data/push.c: Improve M4 quoting a little.
6110 (b4_generate_macro_args, b4_parenthesize): Remove.
6111 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6112 any time a pull parser is requested.
6113 Don't #define this as a wrapper around yypull_parse. Instead, when
6114 both push and pull are requested, make it a function that does that
6115 same thing.
6116 (yypull_parse): If there's a b4_prefix, #define this to
6117 b4_prefix[pull_parse] when both push and pull are requested.
6118 Don't define this as a function unless both push and pull are
6119 requested.
6120 Remove the yylexp argument and hard-code yylex invocation instead.
6121 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6122 %push-parser.
6123 * src/getargs.c (pull_parser): New global initialized to true.
6124 * getargs.h (pull_parser): extern it.
6125 * src/output.c (prepare): Insert pull_flag muscle.
6126 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6127 (prologue_declaration): Set both push_parser and pull_parser = true for
6128 %push-pull-parser. Set push_parser = true and pull_parser = false for
6129 %push-parser.
6130 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6131 %push-parser since there's no backward-compatibility concern here.
6132 Scan %push-pull-parser.
6133 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6134 instead of %push-parser.
6135 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6136 prototype it in the module that calls yyparse.
6137 * tests/input.at (Torturing the Scanner): Likewise.
6138 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6139
6140 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6141
6142 Update etc/bench.pl. Optimize push mode a little (the yyn change
6143 deserves most of the credit).
6144 * Makefile.am (SUBDIRS): Add etc subdirectory.
6145 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6146 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6147 yytoken, yyval, and yyloc declarations to...
6148 (yyparse or yypush_parse): ... here to improve performance. For
6149 yypush_parse invocations after the first, be sure to assign yyn its old
6150 value again.
6151 (yypstate_new): Don't bother initializing the yyresult field since the
6152 initial value isn't used.
6153 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6154 remove the #define that, in push mode, set it to yyps->NAME.
6155 * etc/Makefile.am: New.
6156 * etc/bench.pl: Remove and build it instead from...
6157 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6158 "tests/bison" from the build directory by default rather than just
6159 invoking "bison" from $PATH.
6160 (calc_grammar): Update push parser code: don't declare yylval globally,
6161 don't define yyparse_wrapper, and don't #define yyparse.
6162 (bench_grammar): Update to check all working combinations of yacc.c,
6163 push.c, impure, pure, pull, and push.
6164
6165 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6166
6167 For push mode, add pull wrappers around yypush_parse.
6168 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6169 (yypull_parse): New function wrapping yypush_parse.
6170 (yyparse): New #define wrapping yypull_parse.
6171 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6172 is declared.
6173 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6174 prototype yylex in the module that calls yyparse, and don't prototype
6175 yyparse there. Otherwise, the yyparse expansion won't compile.
6176 * tests/input.at (Torturing the Scanner): Likewise.
6177
6178 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6179
6180 Enable push parsers to operate in impure mode. Thus, %push-parser no
6181 longer implies %pure-parser. The point of this change is to move
6182 towards being able to test the push parser code by running the entire
6183 test suite as if %push-parser had been declared.
6184 * data/push.c (yypush_parse): For impure mode, remove the
6185 yypushed_char, yypushed_val, and yypushed_loc arguments.
6186 Instead, declare these as local variables initialized to the global
6187 yychar, yylval, and yylloc.
6188 For the first yypush_parse invocation only, restore the initial values
6189 of these global variables when it's time to read a token since they
6190 have been overwritten.
6191 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6192 %push-parser.
6193 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6194 %pure-parser along with %push-parser since this test case was designed
6195 for pure push parsers.
6196 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6197 (AT_YACC_OR_PUSH_IF): New.
6198 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6199 add a note that it's still wrong for some cases (as it has been for a
6200 while).
6201 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6202 %push-parser no longer implies %pure-parser.
6203
6204 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6205
6206 Remove some unnecessary differences between the pull parser code and
6207 the push parser code. This patch enables yynerrs in push mode.
6208 * data/push.c: Reformat M4 a little.
6209 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6210 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6211 because push mode is on. Instead, if pure mode is on, move yynerrs
6212 to...
6213 (b4_declare_parser_state_variables): ... here.
6214 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6215 to yyps->NAME so it can be used in yypush_parse.
6216 (yypush_parse): Don't omit uses of yynerrs in push mode.
6217
6218 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6219
6220 Fix bug such that the first pushed token's value and location are
6221 sometimes overwritten (sometimes by %initial-action) before being used.
6222 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6223 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6224 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6225 more closely mimic the pull parser logic.
6226 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6227 time to read a token, which is after any initialization of yylval and
6228 yylloc.
6229 (gottoken): Rename label to...
6230 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6231 user namespace.
6232
6233 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6234
6235 Rearrange initialization of the parser state variables so that the
6236 skeleton doesn't have to have a copy for pull mode and another for push
6237 mode. This patch also fixes at least a bug such that yylloc was not
6238 initialized (with b4_location_initial_line and
6239 b4_location_initial_column) upon calling yypush_parse. However, that
6240 initialization now overwrites the first token's location;
6241 %initial-action assigning @$ already did the same thing, and both bugs
6242 will be fixed in a later patch.
6243 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6244 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6245 yyss, yyvs, yyls, and yystacksize.
6246 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6247 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6248 yylsp.
6249 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6250 yyps->NAME so it can be used in yypush_parse.
6251 (yyparse or yypush_parse): For yypush_parse, don't print the
6252 "Starting parse" diagnostic for invocations after the first.
6253 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6254 yypush_parse, only do it for the first invocation.
6255 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6256 initialization to occur in yypush_parse but only on the first
6257 invocation.
6258
6259 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6260
6261 * data/push.c: Add CPP guards around push parser declarations in both
6262 the header and the code file.
6263 In the code file, move the push parser declarations to the same place
6264 they appear in the header file.
6265 Clean up the M4 some, especially the inconsistent underquoting in
6266 some b4_c_function_def and b4_c_function_decl uses.
6267
6268 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6269
6270 Encapsulate the push parser state variables into an M4 macro so the
6271 push skeleton doesn't have to list them again for pull mode's yyparse.
6272 For push mode, remove yypush_parse's local equivalents of these
6273 variables to eliminate unnecessary copying between the two sets at
6274 run-time. This patch also fixes at least a bug related to multiple
6275 %initial-action invocations in push mode.
6276 * data/push.c (b4_declare_parser_variables): Rename to...
6277 (b4_declare_scanner_communication_variables): ... this for clarity and
6278 update both uses.
6279 (b4_declare_yyparse_variables): Remove and move its contents to the one
6280 spot where it was invoked.
6281 (b4_declare_parser_state_variables): New macro containing the parser
6282 state variables required by push mode.
6283 (struct yypstate): Replace all fields but yynew with
6284 b4_declare_parser_state_variables.
6285 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6286 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6287 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6288 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6289 parser state variable declarations with
6290 b4_declare_parser_state_variables.
6291 Don't initialize parser state variables when calling yypush_parse since
6292 yypstate_new already does that.
6293 Invoke the user's initial action only upon the first yypush_parse
6294 invocation.
6295 Remove all code that copies between the local parser state variables
6296 and the yypstate.
6297
6298 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6299
6300 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6301 prevent a name collision in a future patch where these names will
6302 sometimes be #define'd.
6303 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6304 since it no longer has the same name as the existing argument.
6305 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6306
6307 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6308 and Joel E. Denny <jdenny@ces.clemson.edu>
6309
6310 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6311 that the argument is case-insensitive, and there's no `=' here.
6312 For the %skeleton entry, mention that %language is better.
6313 (Bison Options): Likewise for --language and --skeleton. Move the
6314 --skeleton entry so that the `Tuning the parser' section is sorted
6315 alphabetically on long options.
6316 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6317 %language directive in detail here; cross-reference the %language
6318 documentation instead.
6319 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6320 `%require "2.3b"' so that the example is always up-to-date.
6321 (Table of Symbols): Add entries for %language and %skeleton.
6322 * examples/extexi (normalize): Instead of replacing every %require
6323 argument with the current Bison version, just substitute for
6324 `@value{VERSION}'. This guarantees that we're testing what actually
6325 appears in the documentation.
6326 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6327 rather than `@VERSION@'.
6328
6329 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6330
6331 * NEWS: Reword the %language news a bit, and put it earlier.
6332
6333 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6334 Rewrite to simplify the logic.
6335 (language_argmatch): Likewise.
6336 (program_name): We now own this var.
6337 * src/getargs.h (struct bison_language): Use char[] rather than
6338 const char *.
6339
6340 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6341 Java is supported.
6342 * src/complain.c (program_name): Remove decl; no longer needed.
6343 * src/main.c (program_name): Remove; now belongs to getargs.
6344
6345 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6346
6347 * NEWS: Document %language.
6348
6349 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6350
6351 * data/c-skel.m4, data/c++-skel.m4: New files.
6352 * data/glr.c: Complain on push parsers.
6353
6354 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6355 over %skeleton.
6356 (Decl Summary): Document %language and %skeleton.
6357 (Command line): Document -L.
6358
6359 * examples/extexi: Rewrite %require directive.
6360 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6361
6362 * src/files.c (compute_exts_from_gc): Look in language structure
6363 for .y extension.
6364 (compute_file_name_parts): Check whether .tab should be added.
6365 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6366 (language, skeleton_arg, language_argmatch): New.
6367 (long_options): Add --language.
6368 (getargs): Use skeleton_arg, add -L/--language.
6369 * src/getargs.h: Include location.h.
6370 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6371 * src/output.c (prepare): Pick default skeleton from struct language.
6372 Don't dispatch C skeletons here.
6373 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6374 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6375 * src/scan-gram.l ("%language"): New rule.
6376
6377 * tests/calc.at: Test %skeleton and %language.
6378 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6379 (AT_GLR_IF): Look for %skeleton "glr.cc".
6380 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6381 (AT_YACC_IF): Reject %language.
6382
6383 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6384
6385 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6386 since it wasn't used; only the typedef name 'semantic_type' is needed.
6387 Also, omit trailing white space.
6388
6389 * bootstrap: Sync from coreutils.
6390 (gnulib_extra_files): Add build-aux/announce.gen.
6391 (slurp): Adjust .gitignore files like .cvsignore files.
6392 * build-aux/announce-gen: Remove from CVS, since bootstrap
6393 now creates this.
6394
6395 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6396
6397 Make %push-parser imply %pure-parser. This fixes several bugs; see
6398 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6399 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6400 pure_parser = true.
6401 * data/push.c: Don't bother testing b4_push_if when deciding whether
6402 to expand b4_declare_parser_variables globally.
6403 (yypush_parse): Likewise in here.
6404
6405 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6406 (yy_reduce_print): Reformat M4 for readability.
6407
6408 2006-12-15 Bob Rossi <bob@brasko.net>
6409 and Joel Denny <jdenny@ces.clemson.edu>
6410
6411 * data/push.c (yypstate): Add typedef, and update all uses of
6412 struct yypstate to just yypstate.
6413 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6414
6415 2006-12-14 Bob Rossi <bob@brasko.net>
6416
6417 * data/push.c (yypush_parse): Declare prototype regardless of
6418 %locations option.
6419
6420 2006-12-14 Bob Rossi <bob@brasko.net>
6421
6422 * data/push.c (yyparse): Remove the prototype and the #define when in
6423 push-parser mode.
6424
6425 2006-12-13 Bob Rossi <bob@brasko.net>
6426
6427 * data/push.c (yypstate_init): Rename to...
6428 (yypstate_new): ... this and use b4_c_function_def.
6429 (yypstate_delete): New.
6430 (yypush_parse): Change parameters yynval and yynlloc to be const.
6431 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6432 yypstate_delete functions.
6433
6434 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6435
6436 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6437 strange test case titles. Reported by Bob Rossi.
6438
6439 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6440
6441 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6442 of potential ambiguities in GLR grammers.
6443
6444 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6445
6446 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6447 `bison ', use m4_index instead of m4_substr since chopping up a string
6448 containing M4-special characters causes problems here.
6449
6450 Fix a couple of bugs related to special characters in user-specified
6451 file names, and make it easier for skeletons to compute output file
6452 names with the same file name prefix as Bison-computed output file
6453 names.
6454 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6455 b4_parser_file_name and b4_spec_defines_file instead of
6456 @output_parser_name@ and @output_header_name@, which are now redundant.
6457 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6458 b4_parser_file_name, b4_spec_defines_file, and the new
6459 @basename(FILENAME@) instead of @output_parser_name@ and
6460 @output_header_name@, which inappropriately escaped the file names as
6461 C string literals.
6462 * src/files.c (all_but_ext): Remove static qualifier.
6463 (compute_output_file_names): Move `free (all_but_ext)' to...
6464 (output_file_names_free): ... here since all_but_ext is needed later.
6465 * src/files.h (all_but_ext): Extern.
6466 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6467 exactly what MUSCLE_INSERT_STRING used to do.
6468 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6469 characters are escaped properly.
6470 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6471 all_but_ext.
6472 For pkgdatadir muscle, maintain previous functionality by using
6473 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6474 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6475 digraphs would never be expanded. Hopefully no one has M4-special
6476 characters in his Bison installation path.
6477 * src/scan-skel.l: Don't parse @output_header_name@ and
6478 @output_parser_name@ anymore since they're now redundant.
6479 In @output, use decode_at_digraphs.
6480 Parse a new @basename command that invokes last_component.
6481 (decode_at_digraphs): New.
6482 (BASE_QPUTS): Remove unused.
6483 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6484 (Output file name): New tests.
6485
6486 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6487
6488 Warn about output files that are generated by the skeletons and that
6489 conflict with other output files.
6490 * data/glr.c: Don't generate the header file here when glr.cc does.
6491 * src/files.c (file_names, file_names_count): New static globals.
6492 (compute_output_file_names): Invoke output_file_name_check for files
6493 not generated by the skeletons and remove existing checks.
6494 (output_file_name_check): New function that warns about conflicting
6495 output file names.
6496 (output_file_names_free): Free file_names.
6497 * src/files.h (output_file_name_check): Declare.
6498 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6499 the skeletons.
6500 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6501 (Conflicting output files): New tests.
6502
6503 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6504
6505 * doc/bison.texinfo: Fix a couple of typos.
6506
6507 2006-12-08 Bob Rossi <bob@brasko.net>
6508
6509 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6510 Rename to...
6511 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6512 update all uses.
6513 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6514 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6515 local pv.
6516 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6517 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6518
6519 2006-12-07 Bob Rossi <bob@brasko.net>
6520 and Joel Denny <jdenny@ces.clemson.edu>
6521
6522 * data/push.c (yypvarsinit): Change return type from void* to struct
6523 yypvars*. No longer cast to void* on return.
6524 (struct yypvars): Remove yylen since it need not be remembered between
6525 yypushparse invocations.
6526 (yypushparse): Don't copy between yylen and pv->yylen.
6527
6528 2006-12-05 Bob Rossi <bob@brasko.net>
6529
6530 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6531 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6532 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6533 (struct yypvars): Remove b4_declare_parser_variables.
6534 (yypvarsinit): Remove init code for removed variables.
6535 (global scope): Do not declare b4_declare_parser_variables if
6536 push or pure mode.
6537 (yypushparse): Add b4_declare_parser_variables.
6538 Init new local variables, and remove init code for removed
6539 yypvars variables.
6540 (yyparse): Delete.
6541 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6542 and yyparse for other modes.
6543 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6544 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6545 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6546 (AT_PURE_LEX_IF): True if pure or push parser.
6547
6548 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6549
6550 Document Yacc prologue alternatives and default %destructor's and
6551 %printer's as experimental. Don't mention Java yet. Discussed at
6552 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6553 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6554 (2.3a): Annotate this entry to say the old forms of these features were
6555 also experimental.
6556 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6557 Table of Symbols): Say they're experimental. Comment out any mention
6558 of Java (we'll want this back eventually).
6559
6560 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6561
6562 Support a file name argument to %defines. Deprecate `=' in
6563 %file-prefix, %name-prefix, and %output. Discussed at
6564 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6565 * NEWS (2.3a+): Mention.
6566 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6567 form of %defines, and remove `=' from entries for %file-prefix,
6568 %name-prefix, and %output.
6569 * src/parse-gram.y (prologue_declaration): Implement.
6570 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6571 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6572 all but one occurrence of %name-prefix.
6573 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6574 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6575 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6576 occurrence of each of %file-prefix and %output. Add check for %defines
6577 with argument.
6578 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6579 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6580 Remove the `=' from %output.
6581
6582 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6583
6584 Don't escape $ in test case titles since Autoconf 2.61 now does that
6585 correctly.
6586 * tests/actions.at (Default %printer and %destructor are not for error
6587 or $undefined): Here.
6588 (Default %printer and %destructor are not for $accept): Here.
6589 * tests/input.at (Invalid $n and @n): Here.
6590
6591 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 Rename <!> to <>. Discussed starting at
6594 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6595 * NEWS (2.3a+): Update.
6596 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6597 Update.
6598 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6599 * src/scan-gram.l (INITIAL): Implement.
6600 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6601 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6602 comment.
6603 * tests/actions.at (Default tagless %printer and %destructor,
6604 Default tagged and per-type %printer and %destructor,
6605 Default %printer and %destructor are not for error or $undefined,
6606 Default %printer and %destructor are not for $accept,
6607 Default %printer and %destructor for mid-rule values): Update.
6608 * tests/input.at (Default %printer and %destructor redeclared,
6609 Unused values with default %destructor): Update.
6610
6611 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6612
6613 Don't let %prec take a nonterminal.
6614 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6615 token.
6616 * tests/input.at (%prec takes a token): New test checking that %prec
6617 won't take a nonterminal.
6618
6619 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6620
6621 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6622 it was double-quoted.
6623 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6624 grammar is maintained with Bison's highest standards.
6625 * src/getargs.c: Fix some typos in Doxygen comments.
6626
6627 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6628
6629 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6630 later. Reported by Paul Eggert in
6631 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6632 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6633 * src/scan-code.l (translate_action): Don't bother invoking
6634 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6635 (code_scanner_free): Instead of invoking
6636 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6637 which frees more.
6638 * src/scan-gram.l (gram_scanner_free): Likewise.
6639 * src/scan-skel.l (scan_skel): Likewise.
6640
6641 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6642
6643 * src/files.c (tr): Change return type to void.
6644 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6645 has been called previously for the same key.
6646 (muscle_find): Return storage instead of value so that
6647 --enable-gcc-warnings doesn't produce warnings that the return discards
6648 const. aver that the value and storage are the same since storage
6649 could potentially be NULL when value is not.
6650 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6651 same as 0.
6652
6653 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6654
6655 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6656 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6657 us a slightly cleaner distribution, and also works.
6658 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6659 gnulib changes.
6660
6661 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6662 and Paul Eggert <eggert@cs.ucla.edu>
6663
6664 Don't let Bison leak memory except when it complains.
6665 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6666 (spec_defines_file, dir_prefix): Now char *, not const char *,
6667 since they are freed.
6668 * src/files.c: Likewise.
6669 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6670 Likewise.
6671 (tr): Now operates in-place. All uses changed.
6672 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6673 values.
6674 (compute_file_name_parts, compute_output_file_names): Don't store
6675 read-only data in variables that will be freed.
6676 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6677 src_extension, and header_extension.
6678 (output_file_names_free): New public function to free
6679 spec_verbose_file, spec_graph_file, spec_defines_file,
6680 parser_file_name, and dir_prefix.
6681 * src/getargs.c (getargs): Don't store read-only data in variables that
6682 will be freed.
6683 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6684 (which previously existed but was unused), and quotearg_free.
6685 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6686 * src/muscle_tab.c: Likewise.
6687 (muscle_entry): Make the value char const *,
6688 and add a new storage member that is char * and can be freed.
6689 (muscle_entry_free): New private function.
6690 (muscle_init): Use it instead of free.
6691 (muscle_insert, muscle_grow): Update and use new storage member.
6692 (muscle_code_grow): Free the string passed to muscle_grow
6693 since it's not needed anymore.
6694 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6695 add a new `char *code' member.
6696 ("{...}"): Declare semantic type as code.
6697 * src/scan-code.h (translate_rule_action):
6698 (translate_symbol_action, translate_code, translate_action): Return
6699 `char const *' rather than `char *' since external code should not free
6700 these strings.
6701 * src/scan-code.l: Likewise.
6702 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6703 which is "{...}" in the parser.
6704 * tests/Makefile.am (maintainer-check-valgrind): Set
6705 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6706 Valgrind.
6707 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6708 complain.
6709 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6710 expecting a non-zero exit status sets --leak-check=summary and
6711 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6712 this case, and we don't want to hear about it.
6713
6714 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6715
6716 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6717 instead of from the template, to simplify configuration a bit.
6718 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6719 and m4/wint_t.m4, as they are needed with the latest gnulib.
6720
6721 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6722
6723 Disable unset/unused mid-rule value warnings by default, and recognize
6724 --warnings=midrule-values to enable them. Discussed starting at
6725 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6726 * NEWS (2.3a+): Mention.
6727 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6728 warnings): Add entry for midrule-values subargument.
6729 * src/reader.c (symbol_should_be_used): Don't return true just because
6730 the value is a set/used mid-rule value unless
6731 --warnings=midrule-values was specified.
6732 * tests/input.at (Unused values, Unused values before symbol
6733 declarations): Run tests with and without --warnings=midrule-values.
6734
6735 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6736 than LIST_FREE directly.
6737
6738 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6739
6740 Finish implementing --warnings=error, which should not be implied by
6741 --warnings=all (or by its synonyms -W and --warnings without
6742 subarguments).
6743 * src/complain.c (set_warning_issued): New function to report that
6744 warnings are being treated as errors and to record an error if so.
6745 Invoke...
6746 (warn_at, warn): ... here.
6747 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6748 "error - warnings are errors" does not appear above "all - all of the
6749 above".
6750 (getargs): For -W and --warnings without subarguments, don't let
6751 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6752 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6753
6754 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6755
6756 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6757 empty subargument list. For example: `bison --warnings= parser.y'.
6758
6759 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6760
6761 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6762 the parser header file so that gcc doesn't warn.
6763
6764 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6765
6766 Split the default %destructor/%printer into two kinds: <*> and <!>.
6767 Discussed starting at
6768 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6769 * NEWS (2.3a+): Mention.
6770 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6771 previous change today related to mid-rules.
6772 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6773 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6774 (TYPE_TAG_ANY): Add as <*>.
6775 (TYPE_TAG_NONE): Add as <!>.
6776 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6777 for <*> and <!>.
6778 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6779 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6780 * src/symlist.c (symbol_list_default_new): Split into tagged and
6781 tagless versions.
6782 (symbol_list_destructor_set, symbol_list_printer_set): Split
6783 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6784 SYMLIST_DEFAULT_TAGLESS.
6785 * src/symlist.h: Update symbol_list_default*_new prototypes.
6786 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6787 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6788 * src/symtab.c (default_destructor, default_destructor_location,
6789 default_printer, default_printer_location): Split each into tagged and
6790 tagless versions.
6791 (symbol_destructor_get, symbol_destructor_location_get,
6792 symbol_printer_get, symbol_printer_location_get): Implement tagged
6793 default and tagless default cases.
6794 (default_destructor_set, default_printer_set): Split each into tagged
6795 and tagless versions.
6796 * src/symtab.h: Update prototypes.
6797 * tests/actions.at (Default %printer and %destructor): Rename to...
6798 (Default tagless %printer and %destructor): ... this, and extend.
6799 (Per-type %printer and %destructor): Rename to...
6800 (Default tagged and per-type %printer and %destructor): ... this, and
6801 extend.
6802 (Default %printer and %destructor for user-defined end token): Extend.
6803 (Default %printer and %destructor are not for error or $undefined):
6804 Update.
6805 (Default %printer and %destructor are not for $accept): Update.
6806 (Default %printer and %destructor for mid-rule values): Extend.
6807 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6808 (Unused values with default %destructor): Extend.
6809
6810 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6811
6812 Don't apply the default %destructor/%printer to an unreferenced midrule
6813 value. Mentioned at
6814 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6815 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6816 like $@n instead of just @n so that the default %destructor/%printer
6817 logic doesn't see them as user-defined symbols.
6818 (symbol_is_dummy): Check for both forms of the name.
6819 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6820 name for which the midrule value is referenced in any action.
6821 * tests/actions.at (Default %printer and %destructor for mid-rule
6822 values): New test.
6823 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6824 for change to dummy symbol names.
6825
6826 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6827
6828 Warn about unset midrule $$ if the corresponding $n is used.
6829 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6830 $n usage.
6831 (packgram): Before invoking grammar_rule_check on any rule, make sure
6832 all actions have already been scanned in order to set `used' flags.
6833 Otherwise, checking that a midrule's $$ is set will not always work
6834 properly because the midrule check must forward-reference the midrule's
6835 parent rule.
6836 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6837 warning.
6838
6839 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6840
6841 More improvements to the documentation of the prologue alternatives:
6842 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6843 Bison manual.
6844 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6845 some text to clarify the relative importance of the new directives and
6846 to show how these directives may be viewed as code labels.
6847
6848 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6849
6850 Similar to the recently removed %before-header, add %code-top as the
6851 alternative to the pre-prologue. Mentioned at
6852 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6853 Also, let the prologue alternatives appear in the grammar section.
6854 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6855 (prologue_declaration): Move the existing prologue alternatives to...
6856 (grammar_declaration): ... here and add %code-top.
6857 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6858
6859 Clean up and extend documentation for the prologue alternatives.
6860 * NEWS (2.3a+): Describe prologue alternatives.
6861 * doc/bison.texinfo (Prologue): Move discussion of prologue
6862 alternatives to...
6863 (Prologue Alternatives): ... this new section, and extend it to discuss
6864 all 4 directives in detail.
6865 (Table of Symbols): Clean up discussion of prologue alternatives and
6866 add %code-top.
6867
6868 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6869
6870 DJGPP specific issues.
6871
6872 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6873 config.bat accordingly.
6874 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6875 * djgpp/config.site: Likewise.
6876
6877 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6878
6879 Replace %*-header with %provides, %requires, %code. See discussion at
6880 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6881
6882 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6883 (b4_user_start_header): Remove.
6884 * data/glr.c: Use new macros instead of b4_*start_header
6885 and b4_*end_header.
6886 * data/glr.cc: Likewise.
6887 * data/lalr1.cc: Likewise.
6888 * data/push.c: Likewise.
6889 * data/yacc.c: Likewise.
6890
6891 * doc/bison.texinfo: Remove %before-header, rename
6892 %{start,end,after}-header to %requires, %provides, %code.
6893
6894 * src/parse-gram.y: Likewise (also rename token names accordingly).
6895 * src/scan-gram.l: Likewise.
6896 * tests/actions.at: Likewise.
6897
6898 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6899
6900 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6901 Problem reported by Joel E. Denny.
6902
6903 2006-10-14 Jim Meyering <jim@meyering.net>
6904
6905 (Sync from coreutils.)
6906 Work also when the working directory (with e.g. coreutils sources)
6907 is version controlled with git, rather than CVS.
6908 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6909 rather than CVS.
6910 In messages and comments, say e.g., "checked-out sources",
6911 rather than "CVS sources".
6912 (version_controlled_file): New function. Work for git as well as
6913 for CVS. Don't use grep's -q option.
6914 (slurp): Call it here, in place of CVS-specific code.
6915
6916 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6917
6918 Fix testsuite for ./configure --enable-gcc-warnings:
6919 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6920 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6921 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6922 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6923 * test/regression.at (Diagnostic that expects two alternatives):
6924 Likewise.
6925
6926 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6927
6928 * bootstrap.conf (gnulib_modules): Add config-h.
6929 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6930 worry about HAVE_CONFIG_H.
6931 * lib/abitset.c: Likewise.
6932 * lib/bitset.c: Likewise.
6933 * lib/bitset_stats.c: Likewise.
6934 * lib/bitsetv-print.c: Likewise.
6935 * lib/bitsetv.c: Likewise.
6936 * lib/ebitset.c: Likewise.
6937 * lib/get-errno.c: Likewise.
6938 * lib/lbitset.c: Likewise.
6939 * lib/subpipe.c: Likewise.
6940 * lib/timevar.c: Likewise.
6941 * lib/vbitset.c: Likewise.
6942 * lib/bitset.c: Include "bitset.h" first, to test interface.
6943 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6944 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6945 * lib/bitsetv.c: Include "bitsetv.h" first.
6946 * lib/get-errno.c: Include "get-errno.h" first.
6947 * m4/.cvsignore: Add config-h.m4.
6948 * tests/actions.at (Default %printer and %destructor for ...):
6949 Adjust expected line numbers in output to reflect removal of #if
6950 HAVE_CONFIG_H lines.
6951 * tests/glr-regression.at (Missed %merge type warnings when ...):
6952 Likewise.
6953 * tests/regression.at (Braced code in declaration in rules section):
6954 Likewise.
6955 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6956 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6957 Include <config.h> unconditionally.
6958
6959 * bootstrap: Sync from coreutils, as follows:
6960
6961 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6962
6963 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6964 variable was sometimes used without being initialized. This
6965 messed up the installation of the INSTALL file in some cases.
6966
6967 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6968
6969 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6970 --copy. Inspired by a suggestion from Bruno Haible.
6971
6972 2006-10-03 Jim Meyering <jim@meyering.net>
6973
6974 * bootstrap: Undo last change to this file, since now gnulib-tool
6975 sticks with the automake default in generating dependencies.
6976
6977 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6978
6979 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6980 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6981
6982 * doc/bison.1: Add copyright notice.
6983
6984 * data/glr.c: Don't include <stdarg.h>; not used.
6985
6986 * NEWS: The -g and --graph options now output graphs in Graphviz
6987 DOT format, not VCG format.
6988 * doc/bison.1: Likewise.
6989 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6990 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6991 of this change in
6992 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6993 * TODO: Remove Graphviz entry.
6994 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6995 remove vcg.c, vcg.h, vcg_defaults.h.
6996 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6997 * src/graphviz.c, src/graphviz.h: New files.
6998 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6999 * src/files.h: Make comment more generic.
7000 * src/main.c (main): Likewise.
7001 * src/print_graph.h: Likewise.
7002 * src/getargs.c (usage): Make usage description more generic.
7003 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7004 (static_graph, fgraph): Remove. All uses changed to pass
7005 arguments instead of sharing a static var.
7006 (print_core, print_actions, print_state, print_graph):
7007 Output graphviz format rather than VCG format.
7008 * tests/.cvsignore: Remove *.vcg; add *.dot.
7009 * tests/output.at: Expect *.dot files, not *.vcg files.
7010
7011 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7012 accommodates the 2006-10-08 change.
7013
7014 2006-10-11 Bob Rossi <bob@brasko.net>
7015
7016 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7017 (b4_yyssa, b4_yyerror_range): New macros.
7018 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7019 (yypvarsinit): Remove init of removed fields.
7020 (yypushparse): Remove use of removed fields; use new macros instead.
7021
7022 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7023
7024 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7025 in a push parser. Reindent slightly to match yacc.c better.
7026
7027 2006-10-11 Bob Rossi <bob@brasko.net>
7028
7029 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7030 yymsg_alloc fields.
7031 (yypvarsinit, yypushparse): Remove init of removed fields.
7032 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7033
7034 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7035
7036 * THANKS: Add Paolo Bonzini and Bob Rossi.
7037
7038 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7039
7040 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7041 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7042 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7043 b4_define_user_cde and uses): Remove.
7044 (b4_comment, b4_prefix, b4_sync_start): New.
7045 * data/bison.m4: New file, with most of the content removed from c.m4.
7046 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7047 * src/output.c (output_skeleton): Pass bison.m4.
7048 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7049 only if specified.
7050
7051 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7052
7053 Fix test failure reported by Tom Lane in
7054 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7055 and try to make such failures easier to catch in the future.
7056 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7057 that's now the caller's responsibility.
7058 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7059 Set yychar = YYEOF if it's negative.
7060 * tests/actions.at (yylex): Abort if asked to read past EOF.
7061 * tests/conflicts.at (yylex): Likewise.
7062 * tests/cxx-type.at (yylex): Likewise.
7063 * tests/glr-regression.at (yylex): Likewise.
7064 * tests/input.at (yylex): Likewise.
7065 * tests/regression.at (yylex): Likewise.
7066 * tests/torture.at (yylex): Likewise.
7067
7068 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7069
7070 Fix problems with translating English-language diagnostics.
7071 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7072 respect to bison-runtime pot generation. The YY_ stuff
7073 wasn't being captured.
7074 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7075 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7076 * runtime-po/POTFILES.in: Add data/push.c.
7077
7078 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7079
7080 Merge bootstrap changes from coreutils.
7081
7082 2006-09-28 Jim Meyering <jim@meyering.net>
7083
7084 Automatically generated dependencies are important even
7085 when all of the sources in a directory come from gnulib.
7086 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7087 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7088
7089 2006-09-23 Jim Meyering <jim@meyering.net>
7090
7091 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7092
7093 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7094
7095 * bootstrap: Add support for --force.
7096 (usage): New function. Describe usage less tersely.
7097 (CVS_only_file): New var.
7098
7099 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7100
7101 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7102 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7103 Adjust white space and comments to match GNU style better.
7104
7105 2006-09-20 Bob Rossi <bob@brasko.net>
7106
7107 * data/push.c (yyresult_get): Remove function.
7108 (YYPUSH_MORE): Add #define.
7109 (yypushparse): Modify return value.
7110
7111 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7112
7113 * stamp-h.in: Remove; no longer needed.
7114 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7115 Remove config.h, config.hin, intl (no longer created).
7116 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7117 stamp-h1.
7118
7119 Sync bootstrap from coreutils, as follows:
7120
7121 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7122
7123 * bootstrap (symlink_to_gnulib): New function.
7124 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7125 to copies-of-gnulib.
7126 (cp_mark_as_generated, slurp, gnulib_files):
7127 Avoid making a copy if it's the same as the old version.
7128 (gnulib_files): Add support for this variable (used by Bison).
7129
7130 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7131
7132 * src/getargs.c (usage): Rework to use conventions similar to
7133 coreutils, to make translation a bit easier and the code a bit
7134 smaller. Problem reported by Tim Van Holder.
7135
7136 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7137
7138 Use some of gnulib's new modules, taken from coreutils.
7139
7140 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7141 * bootstrap.conf: New file.
7142 (gnulib_modules): Add configmake, inttypes, unistd.
7143 (XGETTEXT_OPTIONS): Add complain, complain_at,
7144 fatal, fatal_at, warn, warn_at, unexpected_end.
7145 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7146 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7147 (gl_EARLY): Add.
7148 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7149 (gl_INIT): Add
7150 (GNULIB_AUTOCONF_SNIPPET): Remove.
7151 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7152 the pickiest.
7153 * lib/.cvsignore: Add inttypes_.h.
7154 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7155 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7156 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7157 no-longer-necessary initializations.
7158 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7159 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7160 use the unistd module.
7161 * src/system.h: Likewise.
7162 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7163 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7164 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7165 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7166 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7167 * src/system.h: Include inttypes.h unconditionally, now that we
7168 use the inttypes module. Don't bother to include stdint.h, since
7169 inttypes.h now does that for us.
7170 (LOCALEDIR): Remove, now that we use the configmake module.
7171 * src/getargs.c: Include configmake.h.
7172 * src/main.c: Likewise.
7173 * src/output.c: Likewise.
7174 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7175 not from $abs_top_builddir, since config.h moved.
7176
7177
7178 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7179 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7180
7181 * src/parse-gram.y (symbol_declaration): Don't put statements
7182 before declarations; it's not portable to C89.
7183 * src/scan-code.l (handle_action_at): Likewise.
7184
7185 * src/scan-code.l: Always initialize braces_level; the old code
7186 left it uninitialized and therefore had undefined behavior.
7187
7188 Don't attempt to redefine 'assert', since it runs afoul of
7189 systems where standard headers (mistakenly) include <assert.h>.
7190 Instead, define and use our own alternative, called 'aver'.
7191 * src/reader.c: Don't include assert.h, since we no longer
7192 use assert.
7193 * src/scan-code.l: Likewise.
7194 * src/system.h (assert): Remove, replacing with....
7195 (aver): New function, taking a bool arg. All uses changed.
7196 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7197 not merely an integer.
7198
7199 2006-09-15 Bob Rossi <bob@brasko.net>
7200
7201 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7202 * data/c.m4 (YYPUSH): New.
7203 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7204 * src/getargs.c (push_parser): New var.
7205 * src/getargs.h (push_parser): New declaration.
7206 * src/output.c (prepare): Add macro insertion of `push_flag'.
7207 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7208 (prologue_declaration): Parse %push-parser.
7209 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7210 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7211 list of removed lines from the traces observed.
7212 (AT_CHECK_CALC_LALR): Added push parser tests.
7213
7214 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7215
7216 * NEWS: Version 2.3a.
7217 * configure.ac (AC_INIT): Likewise.
7218
7219 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7220 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7221 due to header ordering dependencies. I don't know why the #define
7222 was there.
7223
7224 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7225 runtime cost when YYDEBUG is not defined, and so that some tests
7226 that used to fail now work. Problem and initial suggestion by
7227 Paolo Bonzini.
7228 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7229 * data/glr.cc (b4_parser_class_name):
7230 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7231 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7232 (yydebug_) [YYDEBUG]: New member.
7233 (yycdebug_): Now defined only if YYDEBUG.
7234 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7235 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7236 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7237 if YYYDEBUG.
7238 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7239 Define only if YYDEBUG.
7240 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7241 set_debug_level.
7242 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7243 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7244 AT_CHECK_CALC_GLR_CC that are working now.
7245
7246 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7247
7248 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7249 We don't need them in glr.cc, and glr.c defines them.
7250 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7251 assumes that defining it to anything is the same as defining
7252 it to 1. Problem reported by Paolo Bonzini.
7253
7254 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7255
7256 * data/c.m4 (b4_null, b4_case): Define.
7257 * src/output.c (prepare_symbols): Use b4_null.
7258 (user_actions_output): Use b4_case.
7259
7260 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7261
7262 * data/glr.c (b4_shared_declarations): Put start-header first,
7263 before any #includes that we generate, so that feature-test
7264 macros work. Problem reported by Michael Deutschmann in
7265 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7266 * data/lalr1.cc: Likewise.
7267 * doc/bison.texinfo (Prologue): Document that feature-test macros
7268 should be defined before any Bison declarations.
7269 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7270 that depend on location.hh after, not before, Bison decls, since
7271 we now include location.hh after the first user prologue.
7272
7273 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7274 Sander Brandenburg in
7275 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7276 Also, fix minor white space and comment issues.
7277 (Prologue): Mention that it's better to define feature-test macros
7278 before Bison declarations. Problem reported by Michael Deutschmann.
7279
7280 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7281 by Jim Meyering.
7282 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7283 This adjusts to recent gnulib changes.
7284
7285 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7286
7287 Finish implementation of per-type %destructor/%printer. Discussed
7288 starting at
7289 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7290 and
7291 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7292 * NEWS (2.3+): Add a description of this feature to the default
7293 %destructor/%printer description.
7294 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7295 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7296 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7297 list node contains a semantic type.
7298 * src/symtab.c, src/symtab.h: Extend with a table that associates
7299 semantic types with their %destructor's and %printer's.
7300 (semantic_type_from_uniqstr, semantic_type_get,
7301 semantic_type_destructor_set, semantic_type_printer_set): New functions
7302 composing the public interface of that table.
7303 (symbol_destructor_get, symbol_destructor_location_get,
7304 symbol_printer_get, symbol_printer_location_get): If there's no
7305 per-symbol %destructor/%printer, look up the per-type before trying
7306 the default.
7307 * tests/actions.at (Per-type %printer and %destructor): New test case.
7308 * tests/input.at (Default %printer and %destructor redeclared):
7309 Extend to check that multiple occurrences of %symbol-default in a
7310 single %destructor/%printer declaration is an error.
7311 (Per-type %printer and %destructor redeclared, Unused values with
7312 per-type %destructor): New test cases.
7313
7314 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7315
7316 Require default %destructor/%printer to be declared using
7317 %symbol-default instead of an empty symbol list, and start working on
7318 new per-type %destructor/%printer. Discussed at
7319 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7320 * NEWS (2.3+): Add %symbol-default to example.
7321 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7322 (Table of Symbols): Add entry for %symbol-default.
7323 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7324 (generic_symlist, generic_symlist_item): New nonterminals for creating
7325 a list in which each item is a symbol, semantic type, or
7326 %symbol-default.
7327 (grammar_declaration): Use generic_symlist in %destructor and %printer
7328 declarations instead of symbols.1 or an empty list.
7329 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7330 for changes to symbol_list.
7331 * src/reader.c: Update for changes to symbol_list.
7332 * src/scan-code.l: Likewise.
7333 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7334 * src/symlist.c, src/symlist.h: Extend such that a list node may
7335 represent a semantic type or a %symbol-default in addition to just an
7336 ordinary symbol. Add switched functions for setting %destructor's and
7337 %printer's.
7338 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7339 %destructor/%printer declarations.
7340
7341 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7342
7343 Whether the default %destructor/%printer applies to a particular symbol
7344 isn't a question of whether the user *declares* that symbol (in %token,
7345 for example). It's a question of whether the user by any means
7346 *defines* the symbol at all (by simply using a char token, for
7347 example). $end is defined by Bison whereas any other token with token
7348 number 0 is defined by the user. The error token is always defined by
7349 Bison regardless of whether the user declares it with %token, but we
7350 may one day let the user define error as a nonterminal instead.
7351 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7352 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7353 the meaning of "user-defined".
7354 * tests/actions.at (Default %printer and %destructor for user-declared
7355 end token): Rename to...
7356 (Default %printer and %destructor for user-defined end token): ...
7357 this.
7358
7359 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7360 computation of whether to apply the default, don't maintain a list of
7361 every Bison-defined symbol. Instead, just check for a first character
7362 of '$', which a user symbol cannot have, and check for the error token.
7363
7364 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7365
7366 Don't apply the default %destructor or %printer to the error token,
7367 $undefined, or $accept. This change fits the general rule that the
7368 default %destructor and %printer are only for user-declared symbols,
7369 and it solves several difficulties that are described in the new test
7370 cases listed below.
7371 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7372 * tests/actions.at (Default %printer and %destructor are not for error
7373 or $undefined, Default %printer and %destructor are not for $accept):
7374 New test cases.
7375
7376 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7377
7378 Allow %start after the first rule.
7379 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7380 when parsing the first rule.
7381 (check_and_convert_grammar): Search for it here after all grammar
7382 declarations have been parsed. Skip midrules, which have dummy LHS
7383 nonterminals.
7384 * src/symtab.c (symbol_is_dummy): New function.
7385 * src/symtab.h (symbol_is_dummy): Declare it.
7386 * tests/input.at (%start after first rule): New test.
7387
7388 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7389
7390 Redo some of the previous commit: add back the ability to use
7391 non-aliased/undeclared string literals since it might be useful to
7392 those declaring %token-table.
7393 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7394 commit: don't worry about complaints from symbols_pack.
7395 * src/symtab.c (symbol_new, symbol_class_set,
7396 symbol_check_alias_consistency): Undo changes in previous commit: count
7397 each string literal as a new symbol and token, assign it a symbol
7398 number, and don't complain about non-aliased string literals.
7399 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7400 and token counts but does still set aliased tokens to the same number,
7401 symbol_pack_processor now leaves empty slots in the symbols array.
7402 Remove those slots.
7403 * tests/regression.at (Undeclared string literal): Remove test case
7404 added in previous commit since non-aliased string literals are allowed
7405 again.
7406 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7407 remove unnecessary string literal declarations.
7408 * tests/sets.at (Firsts): Likewise.
7409
7410 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7411
7412 Don't allow an undeclared string literal, but allow a string literal to
7413 be used before its declaration.
7414 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7415 symbols_pack complained.
7416 * src/symtab.c (symbol_new): Don't count a string literal as a new
7417 symbol.
7418 (symbol_class_set): Don't count a string literal as a new token, and
7419 don't assign it a symbol number since symbol_make_alias does that.
7420 (symbol_make_alias): It's not necessary to decrement the symbol and
7421 token counts anymore. Don't assume that an alias declaration occurs
7422 before any uses of the identifier or string, and thus don't assert that
7423 one of them has the highest symbol number so far.
7424 (symbol_check_alias_consistency): Complain if there's a string literal
7425 that wasn't declared as an alias.
7426 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7427 symbol_pack asserts that every token has been assigned a symbol number
7428 although undeclared string literals have not.
7429 * tests/regression.at (String alias declared after use, Undeclared
7430 string literal): New test cases.
7431 (Characters Escapes, Web2c Actions): Declare string literals as
7432 aliases.
7433 * tests/sets.at (Firsts): Likewise.
7434
7435 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7436
7437 In the grammar scanner, STRING_FINISH unclosed constructs and return
7438 them to the parser in order to improve error messages.
7439 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7440 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7441 * tests/input.at (Unclosed constructs): New test case.
7442 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7443 seen.
7444
7445 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7446 unused global.
7447
7448 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7449
7450 Handle string aliases for character tokens correctly.
7451 * src/symtab.c (symbol_user_token_number_set): If the token has an
7452 alias, check and set its alias's user token number instead of its own,
7453 which is set to indicate the alias. Previously, every occurrence of
7454 the character token in the grammar overwrote that alias indicator with
7455 the character code.
7456 * tests/input.at (String aliases for character tokens): New test.
7457
7458 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7459
7460 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7461
7462 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7463
7464 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7465 to prevent failures when building on older platforms.
7466 Check for autopoint failure.
7467 Set XGETTEXT_OPTIONS to values that check for C format strings,
7468 so that translators are warned about them (this also helps
7469 prevent core dumps).
7470
7471 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7472 function, since it simplifies our code a bit.
7473
7474 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7475 rather than -W, so we don't get bogus warnings about sign comparisons.
7476 Add -Wpointer-arith, since that warning is useful (it reports code
7477 that does not conform to C89 and that some compilers reject).
7478 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7479 since it's no longer needed.
7480
7481 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7482
7483 Clean up scanners a bit.
7484 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7485 definitions so gcc won't warn when obstack_for_string is unused.
7486 * src/scan-code.l: config.h and system.h are already #include'd by
7487 scan-code-c.c, so get rid of them here.
7488 * src/scan-gram.l: Likewise.
7489 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7490 definitions rather than duplicating the rest of it.
7491 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7492
7493 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7494
7495 Suppress signed/unsigned comparison warnings for yycheck.
7496 * data/c.m4 (b4_safest_int_type): New macro.
7497 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7498 a signed int type, cast it to b4_safest_int_type first.
7499 * data/yacc.c: Likewise.
7500 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7501 also overwritten.
7502
7503 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7504
7505 * doc/bison.texinfo: Fix some typos.
7506
7507 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7508
7509 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7510 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7511
7512 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7513 the latest gnulib does this a different way.
7514 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7515 translation was patched, so stop omitting it.
7516
7517 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7518
7519 Enable declaration of default %printer/%destructor. Make the parser
7520 use these for all user-declared grammar symbols for which the user does
7521 not declare a specific %printer/%destructor. Thus, the parser uses it
7522 for token 0 if the user declares it but not if Bison generates it as
7523 $end. Discussed starting at
7524 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7525 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7526 and
7527 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7528 * NEWS (2.3+): Mention.
7529 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7530 declare a %destructor for a mid-rule's semantic value. It's just
7531 impossible to declare one specific to it.
7532 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7533 code. Describe default %destructor form.
7534 * src/parse-gram.y (grammar_declaration): Parse default
7535 %printer/%destructor declarations.
7536 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7537 and symbol_destructor_location_get rather than accessing the destructor
7538 and destructor_location members of struct symbol.
7539 (symbol_printers_output): Likewise but for %printer's.
7540 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7541 again.
7542 * src/symtab.c (default_destructor, default_destructor_location,
7543 default_printer, default_printer_location): New static global
7544 variables to record the default %destructor and %printer.
7545 (symbol_destructor_get, symbol_destructor_location_get,
7546 symbol_printer_get, symbol_printer_location_get): New functions to
7547 compute the appropriate %destructor and %printer for a symbol.
7548 (default_destructor_set, default_printer_set): New functions to set the
7549 default %destructor and %printer.
7550 * src/symtab.h: Prototype all those new functions.
7551 * tests/actions.at (Default %printer and %destructor): New test to
7552 check that the right %printer and %destructor are called, that they're
7553 not called for $end, and that $$ and @$ work correctly.
7554 (Default %printer and %destructor for user-declared end token): New
7555 test to check that the default %printer and %destructor are called for
7556 a user-declared end token.
7557 * tests/input.at (Default %printer and %destructor redeclared, Unused
7558 values with default %destructor): New tests to check related grammar
7559 warnings and errors.
7560
7561 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7562
7563 Clean up handling of %destructor for the end token (token 0).
7564 Discussed starting at
7565 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7566 and
7567 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7568
7569 Make the skeletons consistent in how they pop the end token and invoke
7570 its %destructor.
7571 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7572 state, which has token number 0, since this would invoke the
7573 %destructor for the end token.
7574 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7575 until after shifting the end token, or else it won't be popped.
7576 * data/yacc.c (yyparse): Likewise.
7577
7578 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7579 it's the end token. Upon termination, destroy an unshifted lookahead
7580 even when it's the end token.
7581 * data/lalr1.cc (yy::parser::parse): Likewise.
7582 * data/yacc.c (yyparse): Likewise.
7583
7584 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7585 value warnings for the end token when the user gives the end token a
7586 %destructor.
7587
7588 * tests/actions.at (Printers and Destructors): Test all the above.
7589
7590 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7591
7592 Update to latest gnulib and gettext versions.
7593 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7594 Add fopen-safer.
7595 (gnulib_files): Add m4/warning.m4. Don't worry about files
7596 overwritten by autopoint.
7597 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7598 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7599 rejects them.
7600 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7601 so that we can remove the intl files at a better time.
7602 (intl_files_to_remove): Remove aclocal.m4, since it gets
7603 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7604 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7605 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7606 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7607 Remove datarootdir hack; no longer needed.
7608 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7609 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7610 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7611 strdup.h.
7612 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7613 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7614
7615 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7618 it with --assume-autoconf='latest-stable'.
7619
7620 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7621
7622 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7623 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7624 YYSTYPE' and `{'.
7625 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7626 those from muscle_tab.c since the old ones are misleading.
7627
7628 2006-07-13 Akim Demaille <akim@epita.fr>
7629
7630 Support %define "KEY" {VALUE}.
7631 * src/scan-code.h, src/scan-code.l (translate_action)
7632 (translate_rule_action, translate_symbol_action, translate_code):
7633 Return char *, not const char *.
7634 * src/parse-gram.y (declaration): Rename as...
7635 (prologue_declaration): this.
7636 (string_content): Remove this nonterminal, use STRING.
7637 (braceless, content, content.opt): New nonterminal.
7638 Use them.
7639 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7640 as value.
7641 * src/scan-gram.l (getargs.h): Don't include it.
7642
7643 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7644
7645 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7646 rather than a for-loop that declares a local bool variable. This
7647 should work around a compatibility problem with a Cray x1e C++
7648 compiler reported by Hung Nguyen in
7649 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7650 The for-loop was introduced in the 2004-11-17 change but I don't
7651 know why it was needed.
7652
7653 2006-07-12 Akim Demaille <akim@epita.fr>
7654
7655 * data/c.m4: Comment changes.
7656
7657 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7658
7659 * src/complain.c (error_message, ERROR_MESSAGE): New.
7660 To factor...
7661 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7662 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7663
7664 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7665
7666 * NEWS: Instead of %union, you can define and use your own union type
7667 YYSTYPE if your grammar contains at least one <type> tag.
7668 Your YYSTYPE need not be a macro; it can be a typedef.
7669 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7670 (Union Decl, Decl Summary): Document this.
7671 * data/glr.c (YYSTYPE): Implement this.
7672 * data/glr.cc (YYSTYPE): Likewise.
7673 * data/lalr1.cc (YYSTYPE): Likewise.
7674 * data/yacc.c (YYSTYPE): Likewise.
7675 * src/output.c (prepare): Output tag_seen_flag.
7676 * src/parse-gram.y (declaration, grammar_declaration):
7677 Use 'union_seen' rather than 'typed' to determine whether
7678 %union has been seen, since grammars can now be typed without
7679 %union.
7680 (symbol_declaration, type.opt, symbol_def):
7681 Keep track of whether a tag has been seen.
7682 * src/reader.c (union_seen, tag_seen): New vars.
7683 (typed): remove.
7684 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7685 * src/scan-code.l (untyped_var_seen): New variable.
7686 (handle_action_dollar): Adjust to above changes.
7687 (handle_action_dollar, handle_action_at):
7688 Improve overflow checking for outlandish numbers.
7689 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7690 avoid new diagnostics generated by above changes.
7691 * tests/regression.at (YYSTYPE typedef): Add test to check
7692 for type tags without %union.
7693
7694 * src/symlist.c (symbol_list_length): Return int, not unsigned
7695 int, since callers expect int. This may need to get revisited
7696 once we have proper integer overflow checking.
7697
7698 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7699 object is now static.
7700
7701 * src/getargs.c (flags_argmatch): Return void, not int,
7702 to pacify ./configure --enable-gcc-warnings.
7703
7704 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7705 since last_string is already defined to FLEX_PREFIX (last_string).
7706
7707 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7708
7709 Implement --warnings/-W.
7710 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7711 replaced by...
7712 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7713 Adjust callers.
7714 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7715 (warnings_args, warnings_types): New.
7716 (getargs, short_options, long_options): Accept -W/--warnings.
7717 Sort the options by alphabetical order, upper case letter right
7718 before its lower case.
7719
7720 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7721
7722 Change %merge result type clash warnings to errors. Discussed at
7723 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7724 * src/reader.c (record_merge_function_type): Use complain_at.
7725 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7726 declared later): Update test case results.
7727
7728 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7729
7730 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7731 to be in alphabetical order.
7732 (trace_args): Spelling fixes.
7733
7734 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7735
7736 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7737 so they don't collide with user-defined macros.
7738 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7739 this was never guaranteed, and now that we're using gnulib stdint,
7740 which defines int_fast16_t to long int, the problem is exposed.
7741
7742 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7743
7744 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7745 need the full POSIX semantics (and weren't implementing them
7746 anyway).
7747
7748 Adjust to Autoconf 2.60 and today's gnulib.
7749 * bootstrap (gnulib_modules): Add stdint.
7750 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7751 no longer copies it.
7752 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7753 since stdint needs the former and wcwidth (which is now required
7754 by mbswidth) needs the latter.
7755 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7756 work around a compatibility glitch between gettext 0.14.6 and
7757 Autoconf 2.60.
7758 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7759 Do not check for uintptr_t, since new stdint module does the right
7760 thing.
7761 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7762 Add stdint.h, stdint_.h, wcwidth.h.
7763 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7764 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7765 stdint.m4, wchar_t.m4, wcwidth.m4.
7766 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7767 usual order for ../lib/*.h files.
7768 (file_name_split): Use last_component, not base_name, to adjust
7769 to gnulib changes.
7770 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7771 for ../lib/*.h files.
7772 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7773 Define unconditionally, since we now assume the stdint module.
7774 * src/scan-skel.l: Include <dirname.h>.
7775 (BASE_QPUTS): Use last_component, not base_name.
7776 * src/system.h: Include <unlocked-io.h> in the usual order
7777 for ../lib/*.h files. Include <stdint.h> unconditionally,
7778 since we now use the stdint module.
7779 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7780 HAVE_UINTPTR_T, since we now use the stdint module.
7781 (base_name): Remove decl, since files now include <dirname.h>
7782 to get the decl.
7783
7784 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7785
7786 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7787 New, default to 1.
7788 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7789 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7790 default.
7791 * tests/calc.at: Adjust.
7792
7793 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7794
7795 * data/c.m4 (b4_basename): New.
7796 (b4_syncline): Also output the location of its invocation (from
7797 the skeleton).
7798 (b4_user_action, b4_define_user_action, b4_user_actions)
7799 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7800 (b4_user_stype): New.
7801 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7802
7803 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 In the grammar file, the first column is 1 not 0 on the first line as
7806 on every other line.
7807 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7808 * tests/input.at (Torturing the Scanner): Update output.
7809
7810 * src/scan-gram.l (scanner_cursor): Declare it static.
7811
7812 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7813
7814 In warnings, say "previous declaration" rather than "first
7815 declaration".
7816 * src/symtab.c (redeclaration): Do that here.
7817 * src/reader.c (record_merge_function_type): In the case of a result
7818 type clash, report the previous declaration rather than the very first
7819 one in the grammar file.
7820 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7821 declared later): Add a third declaration to check this behavior.
7822 * tests/input.at (Incompatible Aliases): Update output.
7823
7824 2006-06-27 Akim Demaille <akim@epita.fr>
7825
7826 * doc/Doxyfile.in: New.
7827 * doc/Makefile.am: Use it.
7828 * src/lalr.h, src/symtab.h: Initial doxygenation.
7829
7830 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7831
7832 Don't miss %merge result type warnings just because the LHS types are
7833 declared after the %merge. This continues the effort of the previous
7834 patch.
7835 * src/reader.c (get_merge_function): Don't set the merger type yet.
7836 (record_merge_function_type): New function for setting the merger type
7837 and checking for clashes.
7838 (grammar_current_rule_merge_set): Set the location of the %merge for
7839 the current rule.
7840 (packgram): Invoke record_merge_function_type for each rule now that
7841 all symbol type declarations have been parsed.
7842 * src/reader.h (merger_list.type_declaration_location): New member
7843 storing the location of the first %merge from which the type for this
7844 merging function was derived.
7845 * src/symlist.h (symbol_list.merger_declaration_location): New member
7846 storing the location of a rule's %merge, if any.
7847 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7848 declared later): New test to catch the error fixed by the above patch.
7849
7850 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7851
7852 Get action warnings (grammar_rule_check) right even when symbol
7853 declarations appear after the rules. Discussed at
7854 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7855 and
7856 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7857 Don't mistake the type of $$ in a midrule to be that of its parent
7858 rule's $$.
7859 * src/reader.c (grammar_current_rule_end): Don't invoke
7860 grammar_rule_check yet since not all symbol declarations may have been
7861 parsed yet.
7862 (grammar_midrule_action): Likewise.
7863 Don't record whether the midrule's $$ has been used yet since actions
7864 haven't been translated yet.
7865 Record the midrule's parent rule and its RHS index within the parent
7866 rule.
7867 (grammar_current_rule_action_append): Don't translate the action yet
7868 since not all symbol declarations may have been parsed yet and, thus,
7869 warnings about types for $$, $n, @$, and @n can't be reported yet.
7870 (packgram): Translate the action and invoke grammar_rule_check now that
7871 all symbol declarations have been parsed.
7872 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7873 after parsing the entire grammar file, the symbol list here in the case
7874 of a midrule is actually the midrule's empty RHS, so reference its
7875 parent rule's RHS where necessary.
7876 On the other hand, now that you can already know it's a midrule, you
7877 aren't forced to think $$ has the same type as its parent rule's $$.
7878 (handle_action_at): In the case of a midrule, reference the parent rule
7879 where necessary.
7880 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7881 members.
7882 (symbol_list_length): Now that this is invoked after all rules have
7883 been parsed, a NULL symbol (rather than a NULL symbol list node)
7884 terminates a rule. symbol_list_print already does this correctly.
7885 * src/symlist.h (symbol_list.midrule_parent_rule,
7886 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7887 remember their relationships with their parents.
7888 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7889 fixed by the above patch.
7890 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7891 implementing...
7892 (Unused values): ... this old test case and...
7893 (Unused values before symbol declarations): ... this new test case.
7894 This one is the same as `Unused values' except that all symbol
7895 declarations appear after the rules in order to catch the rest of the
7896 errors fixed by the above patch.
7897
7898 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7899
7900 More cleanup.
7901 * src/reader.c (current_rule): Declare it static since it's no longer
7902 used outside this file.
7903 (grammar_current_rule_action_append): Remove redundant arguments from
7904 translate_rule_action invocation.
7905 * src/reader.h (current_rule): Remove this unused extern.
7906 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7907 * src/scan-code.l (translate_rule_action): Likewise.
7908
7909 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7910
7911 Clean up yesterday's patch.
7912 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7913 to...
7914 * src/reader.c (grammar_current_rule_action_append): ... here for
7915 consistency with grammar_current_rule_symbol_append.
7916 * tests/regression.at (Braced code in declaration in rules section):
7917 Make yyerror and yylex static as usual.
7918
7919 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7920
7921 Fix bug that mistakes braced code in a declaration in the rules section
7922 to be a rule action. Mentioned at
7923 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7924 * src/scan-gram.l: Move midrule action detection from the start of the
7925 scanning of any braced code to...
7926 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7927 action. For readability, use $2 and @2 rather than the equivalent
7928 global variables.
7929 * tests/regression.at (Braced code in declaration in rules section):
7930 New test to catch the error fixed by the above patch.
7931
7932 Work on code readability some.
7933 * src/scan-code.l (current_rule): Get rid of this misleading and
7934 redundant declaration: it's actually extern'ed in reader.h.
7935 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7936 translate_action): Add a rule argument and use it instead of the global
7937 current_rule.
7938 (translate_rule_action): This already receives current_rule through an
7939 argument, so pass it on to translate_action instead of assigning
7940 current_rule to current_rule.
7941 (translate_symbol_action, translate_code): Pass rule = NULL to
7942 translate_action.
7943
7944 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7945
7946 Rename %before-definitions to %start-header and %after-definitions to
7947 %end-header. Don't use these declarations to separate pre-prologue
7948 blocks from post-prologue blocks. Add new order-independent
7949 declarations %before-header and %after-header as alternatives to the
7950 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7951 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7952 * NEWS (2.3+): Update for these changes.
7953 * data/glr.c (b4_before_definitions): Update to...
7954 (b4_start_header): ... this.
7955 (b4_after_definitions): Update to...
7956 (b4_end_header): ... this.
7957 * data/glr.cc: Likewise.
7958 * data/lalr1.cc: Likewise.
7959 * data/yacc.c: Likewise.
7960 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7961 prologue blocks with %*-header declarations.
7962 (Calc++ Parser): Likewise.
7963 (Decl Summary): Update names.
7964 (Table of Symbols): Update description.
7965 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7966 (PERCENT_END_HEADER): ... this.
7967 (PERCENT_BEFORE_DEFINITIONS): Update to...
7968 (PERCENT_START_HEADER): ... this.
7969 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7970 (declaration): Update token names and m4 macro names.
7971 When parsing %end-header and %start-header, invoke translate_code
7972 before muscle_code_grow, and no longer set global booleans to remember
7973 whether these declarations have been seen.
7974 Parse new %after-header and %before-header.
7975 * src/reader.c (before_definitions, after_definitions): Remove.
7976 (prologue_augment): Accept a new bool argument to specify whether to
7977 augment the pre-prologue or post-prologue.
7978 * src/reader.h (before_definitions, after_definitions): Remove these
7979 extern's.
7980 (prologue_augment): Add new bool argument.
7981 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7982 (PERCENT_END_HEADER): ... this.
7983 (PERCENT_BEFORE_DEFINITIONS): Update to...
7984 (PERCENT_START_HEADER): ... this.
7985 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7986 * tests/actions.at (Printers and Destructors): Update names.
7987
7988 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7989
7990 Add comparison operators for C++ location classes. Discussed at
7991 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7992 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7993 declaration indicating whether filename_type has an operator==. If
7994 filename_type is `std::string', it defaults to `1', `0' otherwise.
7995 * data/location.cc: Iff b4_define_location_comparison is `1', add
7996 operator== and operator!= for class position and for class location.
7997
7998 Some minor fixes.
7999 * src/scan-action.l: Remove unused file.
8000 * src/symtab.c (symbol_printer_set): Use printer_location not
8001 destructor_location.
8002 * src/symtab.h (struct symbol): Replace incorrect source comment for
8003 printer members.
8004 * tests/input.at (Incompatible Aliases): Update output with correct
8005 printer location.
8006
8007 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8008
8009 Don't put the pre-prologue in the header file. For the yacc.c code
8010 file and the glr.c header and code files, move the pre-prologue before
8011 the token definitions. Add new %before-definitions and
8012 %after-definitions to declare code that will go in both the header file
8013 and code file. Discussed at
8014 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8015 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8016 and
8017 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8018 * NEWS (2.3+): Describe these changes.
8019 * data/glr.c (b4_pre_prologue): Move from within to before...
8020 (b4_shared_declarations): ... this.
8021 Add new b4_before_definitions before b4_token_enums.
8022 Add new b4_after_definitions at the end.
8023 * data/glr.cc (b4_pre_prologue): Replace with...
8024 (b4_before_definitions): ... this in the header file.
8025 (b4_after_definitions): New near the end of the header file.
8026 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8027 code file right before including the header file.
8028 (b4_before_definitions): New in the previous position of
8029 b4_pre_prologue in the header file.
8030 (b4_after_definitions): New near the end of the header file.
8031 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8032 (b4_token_enums_defines): In the code file, move to right before
8033 YYSTYPE for consistency with the header file.
8034 (b4_before_definitions): New right before b4_token_enums_defines in
8035 both the header and code file.
8036 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8037 header and code file.
8038 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8039 of prologues for %union dependencies.
8040 (Decl Summary): In %defines description, mention the effect of
8041 %before-definitions and %after-definitions on the header file.
8042 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8043 than in the pre-prologue so that make check succeeds.
8044 (Table of Symbols): Add entries for %before-definitions and
8045 %after-definitions.
8046 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8047 %before-definitions.
8048 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8049 (declaration): Parse those declarations and append to
8050 b4_before_definitions and b4_after_definitions, respectively.
8051 * src/reader.c (before_definitions, after_definitions): New bools to
8052 track whether those declarations have been seen.
8053 (prologue_augment): Add to the post-prologue if %union,
8054 %before-definitions, or %after-definitions has been seen.
8055 * src/reader.h (before_definitions, after_definitions): New extern's.
8056 * src/scan-gram.l: Scan the new declarations.
8057 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8058 prologue block in a %before-definitions or a %after-definitions based
8059 on whether the %union is declared.
8060 * tests/regression.at (Early token definitions with --yacc, Early token
8061 definitions without --yacc): Move tests for token definitions into the
8062 post-prologue since token names are no longer defined in the
8063 pre-prologue.
8064
8065 2006-06-20 Akim Demaille <akim@epita.fr>
8066
8067 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8068 (symbol_get): Use it.
8069 * src/parse-gram.y: Use it.
8070
8071 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8072
8073 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8074 build succeeds when configured with --enable-gcc-warnings.
8075
8076 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8077
8078 * src/parse-gram.y (char_name): New function.
8079 (CHAR, STRING, string_content): For %printer, properly escape.
8080 (ID): Prefer fputs to fprintf.
8081 (id): Reindent to be consistent with other rules.
8082 Properly quote char.
8083
8084 The Translation Project changed its way of publishing translations
8085 to maintainers. I haven't received any responses to my request
8086 for supporting the old way, or for documenting the new way. I
8087 have modified 'bootstrap' to use screen scraping
8088 (in this case, HTML scraping). This is unreliable and inelegant,
8089 but I don't see any better way. Yuck.
8090 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8091 (get_translations): New function, which uses HTML scraping to
8092 deduce locations of latest translations.
8093 Use this function to grab both bison and bison-runtime .po files.
8094 Don't bother priming the pump for the runtime-po domain any more,
8095 as it's now translated better than bison is.
8096
8097 2006-06-19 Akim Demaille <akim@epita.fr>
8098
8099 * src/scan-gram.l: No longer "parse" things after `%union' until
8100 `{'. Rather, return a single "%union" token.
8101 No longer make symbols: return strings, and leave the conversion
8102 to symbols to the parser.
8103 (SC_PRE_CODE, token_type): Remove.
8104 * src/parse-gram.y (%union): New field `character'.
8105 Sort tokens.
8106 (CHAR): New token.
8107 (ID, ID_COLON): Now that the scanner no longer makes them
8108 identifiers, adjust all uses to invoke symbol_get.
8109 (id_colon): New, wraps the conversion from string to symbol.
8110 (%union): Accept a possible union_name.
8111 (symbol): Now can be a char.
8112 * data/c.m4 (b4_union_name): Leave a default value.
8113 * data/glr.c, data/yacc.c: Use it.
8114
8115 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8116
8117 For associating token numbers with token names for "yacc.c", don't use
8118 #define statements unless `--yacc' is specified; always use enum
8119 yytokentype. Most important discussions start at:
8120 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8121 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8122 and
8123 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8124 * NEWS (2.3+): Mention.
8125 * data/c.m4 (b4_yacc_if): New.
8126 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8127 token #define's.
8128 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8129 on token name definitions.
8130 * src/getargs.c (usage): Capitalize `Yacc' in English.
8131 * src/output.c (prepare): Define b4_yacc_flag.
8132 * tests/regression.at (Early token definitions): Test that tokens names
8133 are defined before the pre-prologue not just before the post-prologue.
8134 Remove this test case and copy to...
8135 (Early token definitions with --yacc): ... this to test #define's.
8136 (Early token definitions without --yacc): ... and this to test enums.
8137
8138 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8139
8140 * NEWS: Reword the post-2.3 change to not be so optimistic about
8141 removing the old "look-ahead" spelling.
8142 Update previous look-ahead/lookahead change reports.
8143 * REFERENCES: look-ahead -> lookahead (since that's
8144 what he actually wrote).
8145 * doc/refcard.tex: look ahead -> lookahead,
8146 look-ahead -> lookahead
8147
8148 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8149
8150 For consistency, use `lookahead' instead of `look-ahead' or
8151 `look_ahead'. Discussed starting at
8152 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8153 and then at
8154 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8155 * NEWS: For the next release, note the change to `--report'.
8156 * TODO, doc/bison.1: Update English.
8157 * doc/bison.texinfo: Update English.
8158 (Understanding Your Parser, Bison Options): Document as
8159 `--report=lookahead' rather than `--report=look-ahead'.
8160 * src/conflicts.c: Update English in comments.
8161 (lookahead_set): Rename from look_ahead_set.
8162 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8163 (resolve_sr_conflict): Rename local look_ahead_tokens to
8164 lookahead_tokens, and update other uses.
8165 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8166 count_rr_conflicts, conflicts_free): Update uses.
8167 * src/getargs.c (report_args): Move "lookahead" before alternate
8168 spellings.
8169 (report_types): Update uses.
8170 (usage): For `--report' usage description, state `lookahead' spelling
8171 rather than `look-ahead'.
8172 * src/getargs.h (report.report_lookahead_tokens): Rename from
8173 report_look_ahead_tokens.
8174 * src/lalr.c: Update English in comments.
8175 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8176 (state_lookahead_tokens_count): Rename from
8177 state_look_ahead_tokens_count.
8178 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8179 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8180 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8181 Update other uses.
8182 Update English in output.
8183 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8184 * src/print.c: Update English in comments.
8185 (lookahead_set): Rename from look_ahead_set.
8186 (print_reduction): Rename argument lookahead_token from
8187 look_ahead_token.
8188 (print_core, state_default_rule, print_reductions, print_results):
8189 Update uses.
8190 * src/print_graph.c: Update English in comments.
8191 (print_core): Update uses.
8192 * src/state.c: Update English in comments.
8193 (reductions_new): Update uses.
8194 (state_rule_lookahead_tokens_print): Rename from
8195 state_rule_look_ahead_tokens_print, and update other uses.
8196 * src/state.h: Update English in comments.
8197 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8198 (state_rule_lookahead_tokens_print): Rename from
8199 state_rule_look_ahead_tokens_print.
8200 * src/tables.c: Update English in comments.
8201 (conflict_row, action_row): Update uses.
8202 * tests/glr-regression.at
8203 (Incorrect lookahead during deterministic GLR,
8204 Incorrect lookahead during nondeterministic GLR): Rename
8205 print_look_ahead to print_lookahead.
8206 * tests/torture.at: Update English in comments.
8207 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8208 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8209 (Many lookahead tokens): Update uses.
8210 * data/glr.c: Update English in comments.
8211 * lalr1.cc: Likewise.
8212 * yacc.c: Likewise.
8213 * src/conflicts.h: Likewise.
8214 * src/lalr.h: Likewise.
8215 * src/main.c: Likewise.
8216 * src/output.c: Likewise.
8217 * src/parse-gram.c: Likewise.
8218 * src/tables.h: Likewise.
8219 * tests/calc.at: Likewise.
8220
8221 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8222
8223 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8224
8225 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8226
8227 * TODO: Add request from Nelson H. F. Beebe to be able to install
8228 Bison without installing the yacc script.
8229
8230 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8231
8232 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8233 and yytext if they're already #define'd.
8234 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8235 * src/scan-code-c.c: ... here.
8236 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8237 <config.h>.
8238
8239 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8240
8241 Get Bison to build again when configured with --enable-gcc-warnings.
8242 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8243 missing #include's.
8244 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8245 loc argument as it shadows a global.
8246 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8247 invocation.
8248
8249 * src/.cvsignore: Add scan-code.c.
8250
8251 2006-06-07 Akim Demaille <akim@epita.fr>
8252
8253 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8254 to...
8255 * src/scan-code.l: here.
8256 * tests/input.at (Torturing the Scanner): Fix another location
8257 error.
8258
8259 2006-06-07 Akim Demaille <akim@epita.fr>
8260
8261 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8262
8263 2006-06-06 Akim Demaille <akim@epita.fr>
8264
8265 Extract the parsing of user actions from the grammar scanner.
8266 As a consequence, the relation between the grammar scanner and
8267 parser is much simpler. We can also split "composite tokens" back
8268 into simple tokens.
8269 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8270 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8271 rename as...
8272 * src/location.h, src/location.c (add_column_width)
8273 (location_compute): these.
8274 Fix the column count: the initial column is 0.
8275 (location_print): Be robust to ending column being 0.
8276 * src/location.h (boundary_set): New.
8277 * src/main.c: Adjust to scanner_free being renamed as
8278 gram_scanner_free.
8279 * src/output.c: Include scan-code.h.
8280 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8281 Use boundary_set.
8282 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8283 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8284 which is now, again, a separate token.
8285 Adjust all dependencies.
8286 Whereever actions with $ and @ are used, use translate_code.
8287 (action): Remove this nonterminal which is now useless.
8288 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8289 (grammar_current_rule_action_append): Use translate_code.
8290 (packgram): Bound check ruleno, itemno, and rule_length.
8291 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8292 (last_string, last_braced_code_loc, max_left_semantic_context)
8293 (scanner_initialize, scanner_free, scanner_last_string_free)
8294 (gram_out, gram_lineno, YY_DECL_): Move to...
8295 * src/scan-gram.h: this new file.
8296 (YY_DECL): Rename as...
8297 (GRAM_DECL): this.
8298 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8299 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8300 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8301 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8302 Move these declarations, and...
8303 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8304 these to...
8305 * src/flex-scanner.h: this new file.
8306 * src/scan-gram.l (rule_length, rule_length_overflow)
8307 (increment_rule_length): Remove.
8308 (last_braced_code_loc): Rename as...
8309 (gram_last_braced_code_loc): this.
8310 Adjust to the changes of the parser.
8311 Move all the handling of $ and @ into...
8312 * src/scan-code.l: here.
8313 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8314 (handle_action_dollar, handle_action_at): Move to...
8315 * src/scan-code.l: here.
8316 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8317 scan-code.h, scan-code-c.c, scan-gram.h.
8318 (EXTRA_bison_SOURCES): Add scan-code.l.
8319 (BUILT_SOURCES): Add scan-code.c.
8320 (yacc): Be robust to white spaces.
8321
8322 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8323 * tests/regression.at: Adjust the column numbers.
8324 * tests/regression.at: Adjust the error message.
8325
8326 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8327
8328 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8329 Use Akim's wording from
8330 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8331
8332 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8333
8334 Between Bison releases, manually append `+' to the previous Bison
8335 release number, and use that as a signal to automatically print the
8336 ChangeLog's CVS Id keyword from --version. Discussed starting at
8337 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8338 * ChangeLog: Add Id header.
8339 * configure.ac (AC_INIT): Append `+' to `2.3'.
8340 * src/.cvsignore: Add revision.c.
8341 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8342 (BUILT_SOURCES): Add revision.c.
8343 (revision.c): New target rule. This file defines a new global variable
8344 named revision. It initializes it with either the Id from ChangeLog
8345 or, if VERSION doesn't contain `+', with the empty string.
8346 * src/getargs.c (version): Print the value of revision.
8347 * src/revision.h: Extern revision.
8348
8349 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8350
8351 * NEWS: Version 2.3.
8352 * configure.ac (AC_INIT): Likewise.
8353
8354 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8355
8356 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8357 with no arguments, not as an object-like macro. This is for
8358 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8359 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8360 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8361 Document this.
8362
8363 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8364
8365 * src/getargs.c (usage): Back out yesterday's modification of the
8366 --help output so that we don't have to wait for translation before
8367 releasing 2.3.
8368
8369 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8370
8371 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8372 Problem reported by Akim Demaille.
8373
8374 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8375
8376 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8377
8378 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8379
8380 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8381 generated source code. Problem reported by Frans Englich in
8382 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8383
8384 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8385
8386 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8387 shell, not within 'make', so that 'make' by an ordinary builder
8388 (using GNU make) does not worry about configuring gzip. This also
8389 works around a bug reported independently by Keith Thompson and by
8390 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8391 stderr rather than stdout, messing up the build logs.
8392
8393 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8394
8395 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8396 to make sure that YYID will never be unused. This fixes a 'make
8397 maintainer-check' failure caused by the recent changes to the 'Trivial
8398 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8399 not used.
8400 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8401
8402 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8403
8404 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8405 state before an empty RHS is always resolved here. Only the location
8406 of that state is guaranteed to be resolved, and that's enough. This
8407 fixes the remaining bug reported by Derek M. Jones in
8408 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8409 * tests/glr-regression.at (Uninitialized location when reporting
8410 ambiguity): Test the above case.
8411 Also, the embedded comments in this test case claim it checks the case
8412 of an empty RHS that has inherited the initial location. However, the
8413 corresponding LHS was already resolved, so yyresolveLocations didn't
8414 actually have reason to modify it. Fix this by forcing
8415 nondeterministic operation at the beginning of the parse.
8416
8417 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8418
8419 * data/c.m4 (b4_yy_symbol_print_generate):
8420 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8421 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8422 of the bugs reported today by Derek M Jones in
8423 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8424 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8425 defined to be a type name without parens or brackets.
8426 (Location Type): Similarly for YYLTYPE.
8427 * tests/regression.at (Trivial grammars): Put in a test for this
8428 bug that will be caught by 'make maintainer-check' (though not,
8429 alas, by 'make check' unless your compiler is picky).
8430
8431 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8432
8433 * NEWS: Version 2.2.
8434 * configure.ac (AC_INIT): Likewise.
8435
8436 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8437
8438 * data/glr.c (yyreportTree): Make room in yystates for the state
8439 preceding the RHS. This fixes the segmentation fault reported by Derek
8440 M. Jones in
8441 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8442 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8443 to the user. Reported for yyreportTree by Derek M. Jones later in the
8444 same thread.
8445 * THANKS: Add Derek M. Jones.
8446 Update my email address.
8447 Fix typo in Steve Murphy's name.
8448
8449 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8450
8451 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8452 checking against YYLAST that caused the parser to miss a potential
8453 alternative in its diagnostic.
8454 Problem reported by Maria Jose Moron Fernandez in
8455 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8456 * data/lalr1.cc (yysyntax_error_): Likewise.
8457 * data/yacc.c (yysyntax_error): Likewise.
8458 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8459 tokens, in case we run into an older C compiler.
8460 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8461 Use them to check for the off-by-one error fixed above.
8462
8463 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8464 YYSIZE_T, not size_t.
8465 * tests/regression.at (Trivial grammars): New test, to catch
8466 the error fixed by the above patch.
8467
8468 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8469
8470 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8471 scheme.
8472 Reported by Steve Murphy.
8473
8474 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8475
8476 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8477 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8478
8479 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8480
8481 Implement --trace=m4.
8482 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8483 * src/output.c (output_skeleton): When set, pass -dV to m4.
8484
8485 Factor the handling of flags in m4.
8486 * src/output.c (prepare): Rename the muscle names debug, defines,
8487 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8488 * data/c.m4: Adjust.
8489 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8490 Use b4_define_flag_if to define other b4_FLAG_if macros.
8491 (b4_location_if): As a consequence, rename as...
8492 (b4_locations_if): this, for consistency.
8493 Adjust all the skeletons.
8494
8495 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8496
8497 * etc/bench.pm: Shorten bench names.
8498
8499 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8500
8501 * src/output.h, src/output.c (error_verbose): Move to...
8502 * src/getargs.h, src/getargs.c: here.
8503 Sort the flags.
8504 Adjust dependencies.
8505
8506 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8507
8508 * data/c.m4 (b4_copyright): Put the special exception for Bison
8509 skeletons here, so we don't have to put it in each skeleton. All
8510 uses changed. Suggested by Akim Demaille. Also, wrap the
8511 copyright notice, in case it is longer than 80 columns. Replace
8512 comma by newline after title.
8513
8514 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8515
8516 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8517 incompatibility, not a bug. Mention that it wasn't fixed as of
8518 flex 2.5.33.
8519
8520 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8521
8522 * examples/extexi: Enforce the precedence of concatenation over
8523 >>.
8524 Reported by Tommy Nordgren.
8525
8526 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8527
8528 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8529 with the member "token".
8530 Reported by Martin Nylin.
8531
8532 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8533
8534 * data/glr.c: Switch to Bison 2.2 special-exception language in
8535 the copyright notice. Use more-regular format for titles and
8536 copyright notices.
8537 * data/glr.cc: Likewise.
8538 * data/location.cc: Likewise.
8539 * data/yacc.cc: Likewise.
8540 * doc/bison.texinfo (Conditions): Document this.
8541 * NEWS: likewise. Upgrade version to 2.2.
8542
8543 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8544
8545 * data/glr.cc: Remove dead code.
8546
8547 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8548
8549 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8550 that variable and the line breaks the bootstrap. Problem reported
8551 by Juan M. Guerrero.
8552
8553 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8554
8555 * doc/bison.texinfo (Multiple start-symbols): New.
8556
8557 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8558
8559 * etc/README, etc/bench.pl: New.
8560
8561 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8562
8563 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8564 rule.
8565 Reported by Mickael Labau.
8566 * tests/input.at (Torturing the Scanner): Test it.
8567
8568 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8569
8570 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8571 Problem reported by Bob Rossi.
8572
8573 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8574
8575 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8576 and didn't really work.
8577 For the index, use @ifnotinfo, not @iftex.
8578 Minor cleanups of spacing and terminology.
8579
8580 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8581
8582 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8583 of AT_NAME_PREFIX when %name-prefix is not used.
8584
8585 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8586
8587 Apply --prefix to C++ skeletons too: they change the namespace.
8588 The test suite already exercize these cases.
8589 * data/c++.m4 (b4_namespace): New.
8590 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8591 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8592 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8593 * doc/bison.texinfo: Document it.
8594 (Option Cross Key): Use @multitable in all formats. It looks
8595 nicer, even in TeX outputs.
8596 (Rules): Use the same code whatever the output type is.
8597 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8598 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8599 * tests/calc.at: Use it, instead of hard coding `yy'.
8600
8601 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8602
8603 * TODO: Remove dead items.
8604
8605 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8606
8607 * doc/FAQ: Remove, merged into...
8608 * doc/bison.texinfo (FAQ): this.
8609 * doc/Makefile.am (EXTRA_DIST): Adjust.
8610
8611 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8612
8613 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8614 even if empty.
8615 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8616 * doc/bison.texinfo (Calc++ Scanner): Use it.
8617
8618 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8619
8620 Fix two nits reported by twlevo, plus one more that I discovered.
8621
8622 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8623 this is the usual Bison style.
8624 * src/location.h (location_print): Likewise.
8625
8626 * src/reader.h (token_name): Likewise.
8627
8628 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8629
8630 Fix some nits reported by twlevo.
8631 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8632 and "POSIX". Use more-modern syntax for URLs. Mention C++
8633 and ask for Java. Don't hardwire OS version numbers. Add
8634 copyright notice.
8635 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8636 * src/conflicts.c (solved_conflicts_obstack): Now static.
8637
8638 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8639
8640 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8641 page. Say "you can use it" not "you may use it" as on the web page;
8642 we're describing capabilities not granting permission.
8643
8644 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8645
8646 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8647 shadowing warnings. Use usual patter for iterating through RHS.
8648 * tests/glr-regression.at
8649 (Uninitialized location when reporting ambiguity):
8650 Modify yylex so that it uses its argument, rather than trying
8651 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8652 const char -> char const.
8653
8654 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8655 Don't use tabs inside commands; it messes up 'ps'.
8656 Problem reported by twlevo.
8657
8658 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8659
8660 * tests/glr-regression.at (Uninitialized location when reporting
8661 ambiguity): New test case.
8662 * data/glr.c (yyresolveLocations): New function, which uses
8663 YYLLOC_DEFAULT.
8664 (yyresolveValue): Invoke yyresolveLocations before reporting an
8665 ambiguity.
8666 * doc/bison.texinfo (Default Action for Locations): Note
8667 YYLLOC_DEFAULT's usage for ambiguity locations.
8668 (GLR Semantic Actions): Cross-reference those notes.
8669
8670 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8671
8672 * tests/glr-regression.at (Leaked semantic values when reporting
8673 ambiguity): Remove unnecessary union and type declarations.
8674 (Leaked lookahead after nondeterministic parse syntax error): New test
8675 case.
8676 * data/glr.c (yyparse): Check for zero stacks remaining before
8677 attempting to shift the lookahead so that you don't lose it.
8678
8679 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8680
8681 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8682 * tests/glr-regression.at (Leaked semantic values when reporting
8683 ambiguity): New test case.
8684 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8685 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8686 now unnecessary yystackp parameter.
8687 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8688 destructors can be called.
8689
8690 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8691 in existing testcases.
8692
8693 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8694
8695 Don't leak semantic values for parent RHS when a user action cuts the
8696 parser, and clean up related code a bit.
8697 * tests/glr-regression.at (Leaked merged semantic value if user action
8698 cuts parse): Rename to...
8699 (Leaked semantic values if user action cuts parse): ... this. Add check
8700 for leaked parent RHS values.
8701 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8702 between an unresolved state (non-empty chain of semantic options) and
8703 an incomplete one (signaled by an empty chain).
8704 (yyresolveStates): Document the interface. Move all manipulation of a
8705 successfully or unsuccessfully resolved yyGLRState to...
8706 (yyresolveValue): ... here so that yyresolveValue always leaves a
8707 yyGLRState with consistent data and thus is easier to understand.
8708 Remove the yyvalp and yylocp parameters since they are always just
8709 taken from the yys parameter. When reporting a discarded merged value
8710 in debugging output, note that it is incompletely merged. Document the
8711 interface.
8712 (yyresolveAction): If resolving any of the RHS states fails, destroy
8713 them all rather than leaking them. Thus, as long as user actions are
8714 written to clean up the RHS correctly, yyresolveAction always cleans up
8715 the RHS of a semantic option. Document the interface.
8716
8717 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8718
8719 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8720 led to a segmentation fault in GNU Pascal. Problem reported
8721 by Waldek Hebisch.
8722
8723 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8724
8725 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8726 mid-rule action inside a nonterminal symbol in order to declare a
8727 destructor for its semantic value.
8728
8729 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8730
8731 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8732 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8733 __cplusplus && ! defined _STDLIB_H && !
8734 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8735 defined free))]: Include <stdlib.h> rather than rolling our own
8736 declarations of malloc and free, to avoid problems with
8737 incompatible declarations (using 'throw') C++'s stdlib.h. This
8738 should fix Debian bug 340012
8739 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8740 reported by Guillaume Melquiond.
8741
8742 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8743
8744 * NEWS: Clarify symbols versus types in unused-value warnings.
8745
8746 * configure.ac (AC_INIT): Bump version number.
8747
8748 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8749
8750 * NEWS: Version 2.1a.
8751 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8752 since C99 requires this.
8753
8754 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8755
8756 * m4/c-working.m4: New file.
8757 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8758
8759 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8760
8761 * Makefile.maint: Merge from coreutils.
8762
8763 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8764
8765 More portability fixes for problems summarized by Nelson H. F. Beebe.
8766
8767 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8768 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8769 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8770 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8771 messes up because C++ code is compiled in 32-bit mode but linked
8772 in 64-bit mode.
8773
8774 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8775
8776 More portability fixes for problems summarized by Nelson H. F. Beebe.
8777
8778 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8779 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8780
8781 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8782 nodist_PROGRAMS, since we don't need to actually compile the
8783 example if we're just doing a plain 'make'. This avoids bothering
8784 the installer unnecessarily about problems due to weird C++
8785 compilers.
8786
8787 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8788
8789 More portability fixes for problems summarized by Nelson H. F. Beebe.
8790
8791 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8792 than #include "...", and compile with -I'.'. The old method was
8793 not portable, according to Posix and the C standard, and it does
8794 not work with Sun C 5.7, where previous #line directives affect
8795 the working directory used in later #include "..." directives.
8796
8797 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8798
8799 Various DJGGP specific issues in /djgpp
8800
8801 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8802
8803 More portability fixes for problems summarized by Nelson H. F. Beebe.
8804
8805 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8806 '#include <map>' works and that you can apply ++ to iterators.
8807
8808 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8809
8810 Work around portability problems summarized by Nelson H. F. Beebe in
8811 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8812
8813 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8814 that '#include <string>' works.
8815
8816 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8817 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8818 "warning: sorry: semantics of inline function static data `const
8819 unsigned char translate_table[262]' are wrong (you'll wind up with
8820 multiple copies)".
8821
8822 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8823 or, xor to not_, and_, or_, and xor_, respectively. This works
8824 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8825 random system header somewhere that includes the equivalent of
8826 <iso646.h>.
8827
8828 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8829 -E" works; it apparently doesn't work with PathScale EKO Compiler
8830 Suite Version 2.0.
8831
8832 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8833
8834 During deterministic GLR operation, user actions should be able to
8835 influence the parse by changing yychar. To make this easier to fix and
8836 to make glr.c easier to evolve in general, don't maintain yytoken in
8837 parallel with yychar; just compute yytoken when needed.
8838 * tests/glr-regression.at (Incorrect lookahead during deterministic
8839 GLR): Check that setting yychar in a user action has the intended
8840 effect.
8841 * data/glr.c (yyGLRStack): Remove yytokenp member.
8842 (yyclearin): Don't set *yytokenp.
8843 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8844 yychar rather than *yytokenp to determine the current lookahead.
8845 Compute yytoken locally when needed.
8846 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8847 point to.
8848
8849 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8850 after `--report' documentation.
8851
8852 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8853
8854 * src/parse-gram.y (grammar_declaration): Location of printer
8855 symbol is @1, not list->location. Bug reported by twlevo.
8856 * tests/input.at (Incompatible Aliases): Adjust to above change.
8857
8858 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8859
8860 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8861 all the test at once. This makes the output easier to read in the
8862 normal case.
8863
8864 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8865 got from <http://bro-ids.org/download.html>. The bug is that
8866 when two actions appeared in succession, the second one was
8867 scanned before the first one was added to the grammar rule
8868 as a midrule action. Bison then output the incorrect warning
8869 "parse.y:905.17-906.36: warning: unused value: $3".
8870 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8871 associated with a value.
8872 (rhs): Don't invoke grammar_current_rule_action_append.
8873 (action): Invoke it here instead.
8874 * src/reader.c (grammar_midrule_action): Now extern.
8875 (grammar_current_rule_action_append): Don't invoke
8876 grammar_midrule_action; that is now the scanner's job.
8877 * src/reader.h (last_string, last_braced_code_loc):
8878 (grammar_midrule_action): New decls.
8879 * src/scan-gram.l (last_string): Now extern, sigh.
8880 (last_braced_code_loc): New extern variable.
8881 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8882 rule already has an action.
8883 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8884 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8885 Add some tests to check that the above changes fixed the bug.
8886
8887 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8888
8889 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8890 All used changed. Check whether the symbol has a destructor,
8891 not whether it is typed.
8892 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8893 that the values are still reported as unused. All line numbers
8894 adjusted.
8895
8896 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8897
8898 Work around a bug in bro 0.8, which underparenthesizes its
8899 definition of YYLLOC_DEFAULT.
8900 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8901 their arguments.
8902 * data/lalr1.cc: Likewise.
8903 * data/yacc.cc: Likewise.
8904
8905 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8906
8907 Work around a bug in Pike 7.0, and give the Pike folks a
8908 better way to override the usual int widths.
8909 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8910 user can override the types.
8911 (short): #undef, to work around a bug in Pike 7.0.
8912 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8913 (union yyalloc.yyss): Use yytype_int16 rather than short.
8914 All uses changed.
8915 (yysigned_char): Remove.
8916 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8917 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8918 * tests/regression.at (Web2c Actions): Adjust to above changes.
8919
8920 * src/reader.c (check_and_convert_grammar): New function.
8921 (reader): Close the input file even if something went wrong during
8922 parsing. Minor file descriptor leak reported by twlevo.
8923
8924 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8925 to pacify gcc -Wswitch-default.
8926 * src/scan-gram.l (adjust_location): Use a default: break; case
8927 to pacify gcc -Wswitch-default.
8928 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8929 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8930 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8931 Move these decls to scan-skel.l, since they don't need to be
8932 visible elsewhere.
8933 * src/scan-skel.l: Accept the above decls.
8934 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8935 is used.
8936
8937 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8938
8939 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8940 since we don't want to insist on a version number at the start
8941 of the changelog every time.
8942 * Makefile.maint: Sync from coreutils a bit better.
8943 (sc_trailing_blank): Renamed from sc_trailing_space.
8944 All uses changed.
8945 (sc_no_if_have_config_h, sc_require_config_h):
8946 (sc_prohibit_assert_without_use): New rules.
8947 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8948 (sc_dd_max_sym_length): Fix leading spaces in rule.
8949 (sc_system_h_headers): Prefix with @.
8950 (sc_useless_cpp_parens, m4-check): Output line numbers.
8951 (changelog-check): Allow version only in head.
8952 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8953 satisfy new Makefile.maint rule.
8954 * data/glr.c: Likewise.
8955 * data/glr.cc: Likewise.
8956 * data/lalr1.cc: Likewise.
8957 * data/yacc.c: Likewise.
8958 * lib/ebitsetv.c: Likewise.
8959 * lib/lbitset.c: Likewise.
8960 * lib/subpipe.c: Likewise.
8961 * lib/timevar.c: Likewise.
8962 * src/system.h: Likewise.
8963 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8964 * djgpp/Makefile.maint: Add copyright notice.
8965 * djgpp/README.in: Likewise.
8966 * djgpp/config.bat: Likewise.
8967 * djgpp/config.site: Likewise.
8968 * djgpp/config_h.sed: Likewise.
8969 * djgpp/djunpack.bat: Likewise.
8970 * djgpp/config.sed: Fix copyright notice to match standard format.
8971 * djgpp/subpipe.h: Likewise.
8972 * lib/bitsetv-print.c: Likewise.
8973 * lib/bitsetv.c: Likewise.
8974 * lib/subpipe.h: Likewise.
8975 * lib/timevar.c: Likewise.
8976 * lib/timevar.h: Likewise.
8977 * djgpp/subpipe.c: Use standard recipe for config.h.
8978 * lib/abitset.c: Likewise.
8979 * lib/bitset.c: Likewise.
8980 * lib/bitset_stats.c: Likewise.
8981 * lib/bitsetv-print.c: Likewise.
8982 * lib/bitsetv.c: Likewise.
8983 * lib/ebitsetv.c: Likewise.
8984 * lib/get-errno.c: Likewise.
8985 * lib/lbitset.c: Likewise.
8986 * lib/subpipe.c: Likewise.
8987 * lib/timevar.c: Likewise.
8988 * lib/vbitset.c: Likewise.
8989 * tests/local.at: Likewise.
8990 * src/scan-gram.l: Don't include verify.h, since system.h does
8991 that for us.
8992 * .x-sc_require_config_h: New file.
8993 * .x-sc_unmarked_diagnostics: New file.
8994
8995 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8996
8997 Be a bit more systematic about using 'abort'.
8998 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8999 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9000 Put 'default: abort ();' before some other case, to satisfy older
9001 pedantic compilers.
9002 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9003 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9004 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9005 * src/conflicts.c (resolve_sr_conflict): Likewise.
9006 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9007 (get_decision_str, get_orientation_str, get_node_alignment_str):
9008 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9009 (get_linestyle_str, get_arrowstyle_str): Likewise.
9010 * src/conflicts.c (resolve_sr_conflict):
9011 Use a default case rather than one for the one remaining enum
9012 value, to catch invalid enum values as well.
9013 * src/lalr.c (set_goto_map, map_goto):
9014 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9015 * src/nullable.c (nullable_compute, token_definitions_output):
9016 Likewise.
9017 * src/reader.c (packgram, reader): Likewise.
9018 * src/state.c (transitions_to, state_new, state_reduction_find):
9019 Likewise.
9020 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9021 (symbol_pack): Likewise.
9022 * src/tables.c (conflict_row, pack_vector): Likewise.
9023 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9024 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9025 * src/system.h: Don't include <assert.h>.
9026 (assert): New macro.
9027
9028 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9029 (Destructor Decl, Parser Function, Pure Calling):
9030 Describe rules for braces inside C code more carefully.
9031
9032 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9033
9034 Fix some porting glitches found by Nelson H. F. Beebe.
9035 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9036 compilers that don't understand that abort () does not return.
9037 * src/state.c (transitions_to): Likewise.
9038 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9039 that '#include <cstdlib>' works.
9040 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9041 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9042 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9043 for the benefit of some pre-C99 compilers.
9044
9045 * bootstrap: Undo changes to gnulib files that autoreconf made.
9046
9047 Minor fixups to get 'make maintainer-check' to work.
9048 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9049 with the new verify.h implementation.
9050 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9051 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9052 * data/yacc.c (YYUSE): Likewise.
9053 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9054 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9055 * src/parse-gram.y (declaration): Don't pass a string constant
9056 to a function that expects char *, since GCC might complain
9057 about the constant value.
9058 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9059 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9060 before #defining them.
9061 * tests/glr-regression.at
9062 (Incorrectly initialized location for empty right-hand side in GLR):
9063 In yyerror, use the msg arg.
9064 (Corrupted semantic options if user action cuts parse):
9065 (Incorrect lookahead during deterministic GLR):
9066 (Incorrect lookahead during nondeterministic GLR):
9067 Don't name a local var 'index'; it shadows string.h's 'index'.
9068
9069 2006-01-19 Akim Demaille <akim@epita.fr>
9070
9071 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9072 location, not just parts of it.
9073
9074 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9075
9076 * NEWS: Document the fact that multiple %unions are now allowed.
9077 * doc/bison.texinfo (Union Decl): Likewise.
9078 * TODO: This feature is now implemented, so remove it from
9079 the wishlist.
9080
9081 * Makefile.maint: Merge with coreutils Makefile.maint.
9082 (CVS_LIST): Use build-aux version if available.
9083 (VERSION_REGEXP): New macro.
9084 (syntax-check-rules): Add sc_no_if_have_config_h,
9085 sc_prohibit_assert_without_use, sc_require_config_h,
9086 sc_useless_cpp_parens.
9087 (sc_obsolete_symbols): Check for O_NDELAY.
9088 (sc_dd_max_sym_length): Track coreutils.
9089 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9090 (sc_useless_cpp_parens): New rule.
9091 (news-date-check): Look for version or today's date.
9092 (changelog-check): Don't require version number near head.
9093 (copyright-check): Use current year instead of hardwiring 2005.
9094 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9095 (announcement): Add --gpg-key-ID.
9096
9097 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9098 with "file system".
9099
9100 Avoid undefined behavior that addressed just before the start of an
9101 array. Problem reported by twlevo.
9102 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9103 * src/lalr.c (build_relations): Rely on new sentinel.
9104 * src/gram.c (gram_free): Adjust to new sentinel.
9105
9106 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9107
9108 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9109 yylookaheadNeeds. All uses updated.
9110 (yysplitStack): Rename local yynewLookaheadStatuses to
9111 yynewLookaheadNeeds.
9112 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9113 GLR): In comments, change `lookahead status' to `lookahead need'.
9114
9115 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9116
9117 * data/glr.c (yysplitStack): A little stylistic rewrite.
9118
9119 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9120
9121 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9122
9123 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9124
9125 * doc/bison.texinfo: Fix some typos.
9126 (GLR Semantic Actions): New subsection discussing special
9127 considerations because GLR semantic actions might be deferred.
9128 (Actions): Mention look-ahead usage of yylval.
9129 (Actions and Locations): Mention look-ahead usage of yylloc.
9130 (Special Features for Use in Actions): Add YYEOF entry and mention it
9131 in the yychar entry.
9132 In the yychar entry, remove mention of the local yychar case (pure
9133 parser) since this is irrelevant information when writing semantic
9134 actions and since it's already discussed in `Table of Symbols' where
9135 yychar is otherwise described as an external variable.
9136 In the yychar entry, don't call it the `current' look-ahead since it
9137 isn't when semantic actions are deferred.
9138 In the yychar and yyclearin entries, add note about deferred semantic
9139 actions.
9140 Add yylloc and yylval entries discussing look-ahead usage.
9141 (Look-Ahead Tokens): When discussing yychar, don't call it the
9142 `current' look-ahead, and do mention yylval and yylloc.
9143 (Error Recovery): Cross-reference `Action Features' when mentioning
9144 yyclearin.
9145 (Table of Symbols): In the yychar entry, don't call it the `current'
9146 look-ahead.
9147 In the yylloc and yylval entries, mention look-ahead usage.
9148
9149 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9150
9151 * tests/glr-regression.at: Update copyright year to 2006.
9152
9153 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9154
9155 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9156 use during nondeterministic operation to track which stacks have
9157 actually needed the current lookahead.
9158 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9159 Allocate, deallocate, resize, and otherwise shuffle space for
9160 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9161 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9162 appropriately during nondeterministic operation.
9163 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9164 members to store the current lookahead to be used by the deferred
9165 user action.
9166 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9167 from which the RHS is taken. Set the lookahead members of the new
9168 yySemanticOption according to the lookahead status for stack yyk.
9169 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9170 yyaddDeferredAction.
9171 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9172 members of yySemanticOption before invoking yyuserAction, and then set
9173 them back to their current values afterward.
9174 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9175 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9176 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9177 titles for consistency.
9178 (Leaked merged semantic value if user action cuts parse): In order to
9179 suppress lint warnings, use arguments in merge function, and assign
9180 char value < 128 in main.
9181 (Incorrect lookahead during deterministic GLR): New test case.
9182 (Incorrect lookahead during nondeterministic GLR): New test case.
9183
9184 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9185
9186 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9187 !yyvaluep as signal that no semantic value is available to print.
9188 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9189 to print a semantic value.
9190
9191 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9192
9193 * tests/glr-regression.at: For consistency with my newer test cases,
9194 don't thank myself.
9195
9196 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9197
9198 * data/glr.c (yyresolveValue): When merging semantic options, if at
9199 least one user action succeeds but a later one cuts the parse, then
9200 destroy the semantic value before returning rather than leaking it.
9201 (yyresolveStates): If a user action cuts the parse and thus
9202 yyresolveValue fails, ignore the (unset) semantic value rather than
9203 corrupting the yyGLRState, and empty the semantic options list since
9204 the user actions should have called all necessary destructors.
9205 Simplify code with YYCHK.
9206 * tests/glr-regression.at (Corrupted semantic options if user action
9207 cuts parse): New test case.
9208 (Undesirable destructors if user action cuts parse): New test case.
9209 Before applying any of this patch, this test case never actually failed
9210 for me... but only because the corrupted semantic options usually
9211 masked this bug.
9212 (Leaked merged semantic value if user action cuts parse): New test
9213 case.
9214
9215 2006-01-05 Akim Demaille <akim@epita.fr>
9216
9217 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9218
9219 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9220
9221 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9222 _MSC_VER. Problem reported by Cenzato Marco.
9223 (b4_c_function_def): Use it.
9224 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9225 b4_c_modern.
9226 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9227 than rolling our own.
9228
9229 2006-01-04 Akim Demaille <akim@epita.fr>
9230
9231 Also warn about non-used mid-rule values.
9232 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9233 member.
9234 (symbol_list_new): Adjust.
9235 * src/reader.c (symbol_typed_p): New.
9236 (grammar_rule_check): Use it.
9237 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9238 Check its rule.
9239 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9240 Use it.
9241 * tests/actions.at (Exotic Dollars): Adjust.
9242
9243 2006-01-04 Akim Demaille <akim@epita.fr>
9244
9245 * src/reader.c (grammar_midrule_action): If $$ is set in a
9246 mid-rule, move the `used' bit to its lhs.
9247 * tests/input.at (Unused values): New.
9248 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9249
9250 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9251
9252 * doc/bison.texinfo (Bison Options): Say more accurately what
9253 --yacc does.
9254 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9255 about declarations in the grammar when in Yacc mode, as POSIX does
9256 not require a diagnostic when the grammar uses extensions.
9257
9258 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9259
9260 Warn about dubious constructions like "%token T T".
9261 Reported by twlevo.
9262 * src/symtab.h (struct symbol.declared): New member.
9263 * src/symtab.c (symbol_new): Initialize it to false.
9264 (symbol_class_set): New arg DECLARING, specifying whether
9265 this is a declaration that we want to warn about, if there
9266 is more than one of them. All uses changed.
9267
9268 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9269 Allow multiple %union directives, whose contents concatenate.
9270 * src/parse-gram.y (grammar_declaration): Likewise.
9271 Use muscle_code_grow, so that we don't need stype_line any more.
9272 All uses changed.
9273
9274 * src/muscle_tab.c (muscle_grow): Fix comment.
9275
9276 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9277 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9278 Update copyright year to 2006.
9279
9280 2006-01-03 Akim Demaille <akim@epita.fr>
9281
9282 Have glr.cc pass (some of) the calc.at tests.
9283 * data/glr.cc (b4_parse_param_orig): New.
9284 (b4_parse_param): Improve its definition, and bound it more
9285 clearly in the skeleton.
9286 (b4_epilogue): Append, instead of prepending, in order to keep
9287 #line consistency.
9288 Simplify the generation of auxiliary functions: locations and
9289 purity are mandated.
9290 (b4_global_tokens_and_yystype): Honor it.
9291 * data/location.cc (c++.m4): Don't include it.
9292 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9293 and AT_SKEL_CC_IF.
9294 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9295 AT_LALR1_CC_IF.
9296 Be sure to initialize the first position's filename.
9297 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9298 mandated anyway.
9299 (AT_CHECK_CALC_GLR_CC): New.
9300 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9301
9302 2006-01-02 Akim Demaille <akim@epita.fr>
9303
9304 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9305 c.m4.
9306 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9307 * data/glr.cc: Do not include stack.hh.
9308
9309 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9310
9311 * data/glr.c: Reformat whitespace with tabs.
9312 (b4_lpure_formals): Remove this unused m4 macro.
9313 * tests/cxx-type.at: Reformat whitespace with tabs.
9314 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9315 since it's a member. Rename type to isNterm for clarity.
9316
9317 2005-12-29 Akim <akim@sulaco.local>
9318
9319 Let glr.cc catch up with symbol_value_print.
9320 * data/glr.cc (b4_yysymprint_generate): Replace by...
9321 (b4_yy_symbol_print_generate): this.
9322 (yy_symbol_print, yy_symbol_value_print): Declare them.
9323
9324 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9325
9326 * src/location.h (boundary): Note that a line or column equal
9327 to INT_MAX indicates an overflow.
9328 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9329 (rule_length_overflow, increment_rule_length, add_column_width):
9330 New functions.
9331 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9332 (<SC_BRACED_CODE>"}"):
9333 Use increment_rule_length rather than incrementing it by hand.
9334 (adjust_location, handle_syncline): Diagnose overflow.
9335 (handle_action_dollar, handle_action_at):
9336 Fix bug with monstrosities like $-2147483648.
9337 Remove now-unnecessary checks.
9338 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9339 (convert_ucn_to_byte): Verify assumptions.
9340 (handle_syncline): New arg LOC. All callers changed.
9341 Don't store through a value derived from char const * pointer.
9342
9343 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9344 GCC warnings.
9345
9346 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9347
9348 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9349 Remove unnecessary forward static decls.
9350
9351 2005-12-27 Akim Demaille <akim@epita.fr>
9352
9353 * src/reader.c (grammar_current_rule_check): Also check that $$
9354 is used.
9355 Take the rule to check as argument, hence rename as...
9356 (grammar_rule_check): this.
9357 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9358 Rename as...
9359 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9360 (grammar_midrule_action, grammar_symbol_append): Now static.
9361 * tests/torture.at (input): Don't rely on the default action
9362 being always performed.
9363 * tests/calc.at: "Set" $$ even when the action is "cut" with
9364 YYERROR or other.
9365 * tests/actions.at (Exotic Dollars): Instead of using unused
9366 values, check that the warning is issued.
9367
9368 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9369
9370 * NEWS: Improve wording for unused-value warnings.
9371
9372 2005-12-22 Akim Demaille <akim@epita.fr>
9373
9374 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9375 (b4_yysymprint_generate): Rename as...
9376 (b4_yy_symbol_print_generate): this.
9377 Generate yy_symbol_print instead of yysymprint.
9378 Generate also yy_symbol_value_print, and use it.
9379
9380 2005-12-22 Akim Demaille <akim@epita.fr>
9381
9382 * NEWS: Warn about unused values.
9383 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9384 a `used' member.
9385 (symbol_list_n_get, symbol_list_n_used_set): New.
9386 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9387 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9388 * src/reader.c (grammar_current_rule_check): Check that values are
9389 used.
9390 * src/symtab.c (symbol_print): Accept 0.
9391 * tests/existing.at: Remove the type information.
9392 Empty the actions.
9393 Remove useless actions (beware of mid-rule actions: perl -000
9394 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9395 * tests/actions.at (Exotic Dollars): Use unused values.
9396 * tests/calc.at: Likewise.
9397 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9398 Likewise.
9399
9400 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9401 rule_useful_p.
9402
9403 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9404
9405 Undo 2005-12-01 tentative license wording change. The wording is
9406 still being reviewed by the lawyers, and we don't want to wait for
9407 them before publishing a test release. For now, revert to the
9408 previous wording.
9409 * NEWS: Undo 2005-12-01 change.
9410 * data/glr.c: Revert to previous license wording.
9411 * data/glr.cc: Likewise.
9412 * data/lalr1.cc: Likewise.
9413 * data/location.cc: Likewise.
9414 * data/yacc.c: Likewise.
9415
9416 * NEWS: Reword %destructor vs YYABORT etc.
9417 * data/glr.c: Use American spacing, for consistency.
9418 * data/glr.cc: Likewise.
9419 * data/lalr1.cc: Likewise.
9420 * data/yacc.c: Likewise.
9421 * data/yacc.c: Reformat comments slightly.
9422 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9423 for consistency. Fix some spelling errors and reword recently-included
9424 text slightly.
9425 * tests/cxx-type.at: Cast results of malloc, for C++.
9426
9427 2005-12-21 Joel E. Denny <address@hidden>
9428
9429 * tests/cxx-type.at: Construct a tree, count the parents of shared
9430 nodes, and free each node once and only once. Previously, the memory
9431 for semantic values was leaked instead.
9432
9433 2005-12-21 Joel E. Denny <address@hidden>
9434
9435 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9436 (yylval, yylloc): If pure, #define to yystackp->yyval and
9437 yystackp->yyloc similar to yychar and yynerrs.
9438 (yyparse): If pure, remove local yylval and yylloc. Add local
9439 yystackp to accommodate pure definitions of yylval and yylloc.
9440 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9441 yylvalp and yyllocp to &yylval and &yylloc.
9442 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9443 namespace. Previously, nerrs and char were missing, but lval and lloc
9444 weren't necessary.
9445 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9446 yylvalp and yyllocp parameters since, if pure, these are now always
9447 accessible through yystackp. If not pure, they are still accessible
9448 globally.
9449 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9450 `if (YYID (N))' to pacify lint.
9451
9452 2005-12-21 Akim Demaille <akim@epita.fr>
9453
9454 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9455 destroy the RHS symbols of a rule.
9456 * data/yacc.c (yylen): Initialize to 0.
9457 Keep its value to the number of items to possibly shift.
9458 In particular, a regular successful parse that ends on YYFINAL by
9459 a (internal) YYACCEPT must not have yylen != 0.
9460 (yyerrorlab, yyreturn): Pop the RHS.
9461 Reorder a bit to emphasize the `shifting' bits of code.
9462 (YYPOPSTACK): Now accept a number of items to pop.
9463 * data/lalr1.cc: Likewise.
9464 * data/glr.c: Formatting changes.
9465 Use goto instead of fall through.
9466 * doc/bison.texinfo (Destructor Decl): Complete.
9467
9468 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9469
9470 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9471 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9472 * djgpp/config.bat: Replace every occurence of the file name
9473 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9474 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9475 * djgpp/config.sed: Replace every occurence of the file name
9476 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9477 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9478 * djgpp/djunpack.bat: DJGPP specific file.
9479 * djgpp/fnchange.lst: DJGPP specific file.
9480 * djgpp/README.in: Add new information about how to unpack the bison
9481 source on MSDOS and other systems which have 8.3 file name restrictions
9482 using djunpack.bat and fnchange.lst.
9483
9484 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9485
9486 * bootstrap (build_cvs_prefix): Remove; unused.
9487 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9488 when getting gnulib.
9489
9490 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9491
9492 * data/glr.c: Reorder typedef declarations for structs to match order
9493 of struct declarations.
9494 Rename yystack everywhere to yystackp except in yyparse where it's not
9495 a pointer.
9496 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9497 consistency.
9498 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9499 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9500 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9501 lint.
9502
9503 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9504
9505 * tests/sets.at (Accept): Fix typos in regular expression used to
9506 sed out the final state number.
9507
9508 Work around portability problem on Solaris 10: flex-generated
9509 files include <stdio.h> before <config.h>, which messes up
9510 because the latter defines __EXTENSIONS__. Address the problem
9511 by creating two new little files that include <config.h> first,
9512 then include the flex-generated files. Rewrite everyone else
9513 to include <config.h> first, as well.
9514 * lib/timevar.c: Always include "config.h".
9515 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9516 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9517 (EXTRA_bison_SOURCES): New macro.
9518 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9519 * src/system.h: Don't include config.h.
9520 * src/LR0.c: Include <config.h> first.
9521 * src/assoc.c: Likewise.
9522 * src/closure.c: Likewise.
9523 * src/complain.c: Likewise.
9524 * src/conflicts.c: Likewise.
9525 * src/derives.c: Likewise.
9526 * src/files.c: Likewise.
9527 * src/getargs.c: Likewise.
9528 * src/gram.c: Likewise.
9529 * src/lalr.c: Likewise.
9530 * src/location.c: Likewise.
9531 * src/main.c: Likewise.
9532 * src/muscle_tab.c: Likewise.
9533 * src/nullable.c: Likewise.
9534 * src/output.c: Likewise.
9535 * src/parse-gram.y: Likewise.
9536 * src/print.c: Likewise.
9537 * src/print_graph.c: Likewise.
9538 * src/reader.c: Likewise.
9539 * src/reduce.c: Likewise.
9540 * src/relation.c: Likewise.
9541 * src/state.c: Likewise.
9542 * src/symlist.c: Likewise.
9543 * src/symtab.c: Likewise.
9544 * src/tables.c: Likewise.
9545 * src/uniqstr.c: Likewise.
9546 * src/vcg.c: Likewise.
9547
9548 * src/parse-gram.y: Fix minor problems uncovered by lint.
9549 (current_lhs, current_lhs_location): Now static.
9550 (current_assoc): Remove unused variable.
9551
9552 Cleanups so that Bison-generated parsers have less lint.
9553 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9554 Prepend /*ARGSUSED*/, for lint's sake.
9555 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9556 definition if 'lint' is defined.
9557 (YYID): New macro (or function, if lint).
9558 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9559 * data/yacc.c: Likewise.
9560 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9561 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9562 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9563 is C++ only.
9564 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9565 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9566 Use YYID(0) rather than 0, for lint.
9567 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9568 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9569
9570 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9571
9572 * tests/glr-regression.at
9573 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9574 Close memory leak reported by twlevo.
9575
9576 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9577
9578 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9579 all stacks.
9580 (yyparse): Iterate another stack in order to call user destructors.
9581 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9582 New test case.
9583 (Duplicated user destructor for lookahead): This test now is expected
9584 to succeed.
9585
9586 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9587
9588 * NEWS: Document the following change.
9589 * data/yacc.c: Say "parser skeleton" rather than "file", since
9590 it's no longer just a file.
9591 * data/glr.c: Grant a special exception for C GLR parsers, that
9592 reads like the already-existing exception for C LALR(1) parsers.
9593 * data/glr.cc: Likewise.
9594 * data/lalr1.cc: Likewise.
9595 * data/location.cc: Likewise.
9596 * data/yacc.c: Reword the "written by" statement to clarify that
9597 it was the parser skeleton, not the entire output file.
9598 * data/glr.c: Written by Paul Hilfinger.
9599 * data/glr.cc: Written by Akim Demaille.
9600 * data/lalr1.cc: Likewise.
9601
9602 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9603
9604 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9605 Fix typos in previous change that broke 'make check'.
9606 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9607 supported in C.
9608 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9609 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9610 We can revert this once things settle down.
9611
9612 * src/conflicts.c (conflicts_print): Don't print file name twice
9613 when %expect fails because there were no conflicts.
9614 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9615 change.
9616 * tests/conflicts.at (%expect not enough, %expect too much):
9617 (%expect with reduce conflicts): Adjust to new behavior.
9618
9619 2005-11-18 Akim Demaille <akim@epita.fr>
9620
9621 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9622 errors.
9623 * NEWS: Document this.
9624 * doc/bison.texinfo (Expect Decl): Likewise.
9625
9626 2005-11-16 Akim Demaille <akim@epita.fr>
9627
9628 Generalize the display of semantic values and locations in traces.
9629 * data/glr.c (yy_reduce_print): Fix indices (again).
9630 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9631 literal integers.
9632 * data/lalr1.cc (yyreduce_print): Rename as...
9633 (yy_reduce_print): this.
9634 Display values and locations.
9635 * data/yacc.c (yy_reduce_print): Likewise.
9636 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9637 (yysymprint): Move higher to be visible from yy_reduce_print).
9638 (yyparse): Adjust.
9639 * tests/calc.at: Adjust the expected length of the traces.
9640
9641 2005-11-14 Akim Demaille <akim@epita.fr>
9642
9643 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9644 from 1 to N, while values and location start at 0.
9645 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9646
9647 2005-11-14 Akim Demaille <akim@epita.fr>
9648
9649 * data/glr.c (yy_reduce_print): Fix the $ number.
9650
9651 2005-11-14 Akim Demaille <akim@epita.fr>
9652
9653 "Use" parse parameters.
9654 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9655 * data/glr.c, data/glr.cc: Use them.
9656 * data/glr.c (YYUSE): Have a C++ definition that supports
9657 non-pointer types.
9658
9659 2005-11-14 Akim Demaille <akim@epita.fr>
9660
9661 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9662
9663 2005-11-14 Akim Demaille <akim@epita.fr>
9664
9665 * data/glr.cc: New.
9666 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9667
9668 2005-11-12 Akim Demaille <akim@epita.fr>
9669
9670 Let position and location be PODs.
9671 * data/location.cc (position::initialize, location::initialize): New.
9672 (position::position, location::location): Define only if
9673 b4_location_constructors is defined.
9674 * data/lalr1.cc (b4_location_constructors): Define it for backward
9675 compatibility.
9676 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9677
9678 2005-11-12 Akim Demaille <akim@epita.fr>
9679
9680 * data/lalr1.cc: Move the body of the ctor and dtor into the
9681 parser file (instead of the header).
9682 Wrap the implementations in a "namespace yy".
9683
9684 2005-11-12 Akim Demaille <akim@epita.fr>
9685
9686 Have glr.c include its header file when created.
9687 * data/glr.c (b4_shared_declarations): New.
9688 Output them verbatim in the parser if !%defines, otherwise
9689 output then in the header file, and include it instead.
9690
9691 2005-11-11 Akim Demaille <akim@epita.fr>
9692
9693 * data/glr.c: Comment changes.
9694
9695 2005-11-11 Akim Demaille <akim@epita.fr>
9696
9697 When yydebug, report semantic and location values for reductions.
9698 * data/glr.c (yy_reduce_print): Report the semantic values and the
9699 locations.
9700 (YY_REDUCE_PRINT): Adjust.
9701 (yyglrReduce): Use them.
9702 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9703 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9704 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9705 traces.
9706
9707 2005-11-10 Akim Demaille <akim@epita.fr>
9708
9709 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9710 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9711 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9712
9713 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9714
9715 * m4/cxx.m4, examples/Makefile.am: Don't build
9716 examples/calc++ if no C++ compiler is available. (trivial change)
9717
9718 2005-11-09 Akim Demaille <akim@epita.fr>
9719
9720 * src/scan-skel.l: Use a couple of asserts.
9721
9722 2005-11-03 Akim Demaille <akim@epita.fr>
9723
9724 In some (weird) cases, the final state number is incorrect.
9725 Reported by Alexandre Duret-Lutz.
9726 * src/LR0.c (state_list_append): Remove the computation of
9727 final_state.
9728 (save_reductions): Do it here.
9729 (get_state): Alpha conversion.
9730 (generate_states): Use a for loop.
9731 * src/gram.h (item_number_is_rule_number)
9732 (item_number_is_symbol_number): New.
9733 * src/state.c: Use assert.
9734 * src/system.h: Include assert.h.
9735 * tests/sets.at (Accept): New.
9736
9737 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9738
9739 * data/glr.c (yyfill): Adjust comment.
9740 (yyresolveAction): Initialize default location properly
9741 for empty right-hand sides.
9742 (yydoAction): Ditto.
9743 Add comment explaining apparently dead code.
9744 * tests/glr-regression.at
9745 (Incorrectly initialized location for empty right-hand side in GLR):
9746 New test.
9747
9748 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9749
9750 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9751 gnulib when interrupted. This fixes some race conditions and
9752 works around some portability problems (one noted by Paul
9753 Hilfinger).
9754
9755 2005-10-22 Akim <akim@epita.fr>
9756
9757 * Makefile.cfg: Adjust to config -> build-aux.
9758 Reported by twledo.
9759
9760 2005-10-21 Akim Demaille <akim@epita.fr>
9761
9762 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9763 the %parse-params.
9764 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9765 * data/yacc.c (b4_Pure_if): Rename as...
9766 (b4_yacc_pure_if): this.
9767 (YY_SYMBOL_PRINT, yyparse): Adjust.
9768 * doc/bison.texinfo: Formatting changes.
9769
9770 2005-10-21 Akim Demaille <akim@epita.fr>
9771
9772 Finish the transition config -> build-aux.
9773 * configure.ac, Makefile.am: Use build-aux.
9774 * config/prev-version, config/announce-gen, config/Makefile.am:
9775 Move to...
9776 * build-aux/prev-version, build-aux/announce-gen,
9777 * build-aux/Makefile.am: here.
9778
9779 2005-10-14 Akim Demaille <akim@epita.fr>
9780
9781 * examples/calc++/test: Use set -x only when VERBOSE.
9782
9783 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9784
9785 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9786 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9787
9788 2005-10-13 Akim Demaille <akim@epita.fr>
9789
9790 * src/scan-skel.l: Output the base name parts of the parser and
9791 header file names.
9792 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9793 additional checks.
9794 Use this to exercise C++ outputs in subdirs.
9795 Reported by Oleg Smolsky.
9796
9797 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9798
9799 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9800 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9801 Problem reported by John P. Hartmann.
9802 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9803 already defined it.
9804
9805 2005-10-12 Akim Demaille <akim@epita.fr>
9806
9807 * src/parse-gram.y (version_check): Exit 63 to please missing
9808 (stands for "version mismatch).
9809 * tests/input.at, doc/bison.texinfo: Adjust.
9810
9811 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9812
9813 Work around portability problems with Visual Age C compiler
9814 (xlc and xlC_r) reported by John P. Hartmann.
9815 * data/location.cc (initial_column, initial_line): Remove.
9816 All uses replaced by 0 and 1.
9817 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9818 that xlc complains about.
9819 * src/scan-skel.l (skel_wrap): Likewise.
9820 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9821 as __STDC__.
9822 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9823 __STDC_VERSION__. Use it everywhere instead of looking at
9824 __STDC__ and __cplusplus.
9825
9826 2005-10-10 Akim Demaille <akim@epita.fr>
9827
9828 * examples/calc++/test: Be quiet unless VERBOSE.
9829
9830 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9831
9832 * data/c.m4 (yydestruct, yysymprint):
9833 Use YYUSE instead of casting to void.
9834 * data/glr.c (YYUSE): New macro.
9835 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9836 Use it instead of rolling our own.
9837 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9838 (YYCHK1):
9839 Use /*CONSTCOND*/ to suppress lint warnings.
9840 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9841 (YY_STACK_PRINT): Use 'false' not '0'.
9842 (YYUSE): New macro.
9843 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9844 * data/yacc.c (YYUSE): New macro.
9845 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9846 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9847 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9848
9849
9850 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9851 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9852
9853 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9854
9855 Undo the parts of the unlocked-I/O change that substituted
9856 putc or puts for printf. This might hurt performance a bit,
9857 but some people prefer the printf style.
9858 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9859 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9860 All uses replaced by YYFPRINTF and YYDPRINTF.
9861 * data/yacc.c: Likewise.
9862 * lib/bitset.c (bitset_print): Likewise.
9863 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9864 putc and puts.
9865 * lib/lbitset.c (debug_lbitset): Likewise.
9866 * src/closure.c (print_firsts, print_fderives): Likewise.
9867 * src/gram.c (grammar_dump): Likewise.
9868 * src/lalr.c (look_ahead_tokens_print): Likewise.
9869 * src/output.c (escaped_output): Likewise.
9870 (user_actions_output): Break apart two printfs.
9871 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9872 * src/reduce.c (reduce_print): Likewise.
9873 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9874 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9875
9876 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9877 Use assignments rather than casts-to-void to suppress
9878 unused-variable warnings. This pacifies 'lint'.
9879 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9880 unused-variable warnings.
9881
9882 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9883
9884 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9885
9886 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9887
9888 Use unlocked I/O for a minor performance improvement on hosts like
9889 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9890 is to use the gnlib unlocked-io module, and to prefer putc and
9891 puts to printf when either will work (since the latter doesn't
9892 come in an unlocked flavor).
9893 * bootstrap (gnulib_modules): Add unlocked-io.
9894 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9895 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9896 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9897 and similarly for puts and putc and printf.
9898 * data/yacc.c: Likewise.
9899 * lib/bitset.c (bitset_print): Likewise.
9900 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9901 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9902 to printf.
9903 * lib/lbitset.c (debug_lbitset): Likewise.
9904 * src/closure.c (print_firsts, print_fderives): Likewise.
9905 * src/gram.c (grammar_dump): Likewise.
9906 * src/lalr.c (look_ahead_tokens_print): Likewise.
9907 * src/output.c (escaped_output): Likewise.
9908 (user_actions_output): Coalesce two printfs.
9909 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9910 * src/reduce.c (reduce_print): Likewise.
9911 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9912 * src/system.h: Include unlocked-io.h rather than stdio.h.
9913
9914 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9915 this confuses xgettext.
9916
9917 2005-10-02 Akim Demaille <akim@epita.fr>
9918
9919 * bootstrap (gnulib_modules): Add strverscmp.
9920 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9921 * m4/.cvsignore: Add strverscmp.m4.
9922 * src/parse-gram.y (%require): New token, new rule.
9923 (version_check): New.
9924 * src/scan-gram.l (%require): Adjust.
9925 * tests/input.at (AT_REQUIRE): New.
9926 Use it.
9927 * doc/bison.texinfo (Require Decl): New.
9928 (Calc++ Parser): Use %require.
9929
9930 2005-10-02 Akim Demaille <akim@epita.fr>
9931
9932 * data/location.cc: New.
9933
9934 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9935 Akim Demaille <akim@epita.fr>
9936
9937 Make sure -odir/foo.cc creates dir/location.hh etc.
9938 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9939 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9940 (spec_defines_file): Now const.
9941 (dir_prefix): New.
9942 (short_base_name): Remove.
9943 * src/files.c: Adjust.
9944 (dirname.h): Include.
9945 (base_name): Don't prototype it.
9946 (finput): Remove, duplicates gram_in.
9947 (full_base_name, short_base_name): Replace by...
9948 (all_but_ext, all_but_tab_ext): these.
9949 (compute_base_names): Rename as...
9950 (compute_file_name_parts): this.
9951 Update to compute the new variables, including dir_prefix.
9952 Adjust dependencies.
9953 * src/output.c (prepare): Output them.
9954 * src/reader.c: Adjust to use gram_in, not finput.
9955 * src/scan-skel.l (@dir_prefix@): New.
9956
9957 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9958
9959 * lib/subpipe.c: New function end_of_output_subpipe() added
9960 to allow support for non-posix systems. This is a no-op function
9961 for posix systems.
9962
9963 * lib/subpipe.h: New function end_of_output_subpipe() added
9964 to allow support for non-posix systems. This is a no-op function
9965 for posix systems.
9966
9967 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9968 handle the lack of pipe/fork functionality on non-posix systems.
9969
9970 * djgpp/Makefile.maint: DJGPP specific file.
9971
9972 * djgpp/README.in: DJGPP specific file.
9973
9974 * djgpp/config.bat: DJGPP specific configuration file.
9975
9976 * djgpp/config.sed: DJGPP specific configuration file.
9977
9978 * djgpp/config.site: DJGPP specific configuration file.
9979
9980 * djgpp/config_h.sed: DJGPP specific configuration file.
9981
9982 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9983
9984 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9985
9986 2005-10-02 Akim Demaille <akim@epita.fr>
9987
9988 * data/location.cc: New, extract from...
9989 * data/lalr1.cc: here.
9990 (location.hh): Include it after the user prologue, in case the
9991 filename type is defined by the user.
9992 Forward declation location and position before the pre-prologue.
9993 (yyresult_): Rename as...
9994 (yyresult): this, it's a local variable, not an attribute.
9995 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9996
9997 2005-10-01 Akim Demaille <akim@epita.fr>
9998
9999 * examples/extexi: Restore the #line generation.
10000
10001 2005-09-30 Akim Demaille <akim@epita.fr>,
10002 Alexandre Duret-Lutz <adl@gnu.org>
10003
10004 Move the token type and YYSTYPE in the parser class.
10005 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10006 (parser::token): New, from the moved free definition of tokens.
10007 (parser::semantic_value): Now a full definition instead of an
10008 indirection to YYSTYPE.
10009 (b4_post_prologue): No longer included in the header file, but
10010 in the implementation file.
10011 * doc/bison.texi (C+ Language Interface): Update.
10012 * src/parse-gram.y: Support unary %define.
10013 * tests/actions.at: Define global_tokens_and_yystype for backward
10014 compatibility until we update the tests.
10015 * tests/calc.at: Idem.
10016 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10017 to simplify the code.
10018
10019 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10020
10021 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10022 Ah, the good old days! Problem reported by Peter Klein.
10023 * bootstrap (gnulib_modules): Add strerror, strtoul.
10024 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10025 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10026
10027 2005-09-29 Akim Demaille <akim@epita.fr>
10028
10029 * data/c.m4 (b4_error_verbose_if): New.
10030 * data/lalr1.cc: Use it.
10031 (YYERROR_VERBOSE_IF): Remove.
10032 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10033 parser members, replaced by...
10034 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10035 local variables.
10036 (yysyntax_error_): Takes the state number as argument.
10037 (yyreduce_print_): Use the argument yyrule, not the former
10038 attribute yyn_.
10039
10040 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10041
10042 * bootstrap (gnulib_modules): Add verify.
10043 * lib/.cvsignore: Add verify.h.
10044 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10045 * src/system.h (verify): Remove.
10046 Include verify.h instead.
10047 * src/tables.c (tables_generate): Use new API for 'verify'.
10048
10049 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10050
10051 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10052 local variables whose names begin with 'yy'.
10053 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10054 Trivial changes from Joel E. Denny.
10055
10056 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10057 it itself.
10058 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10059 don't use alloca any more.
10060
10061 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10062 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10063 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10064 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10065 to match yacc.c, to test more hosts.
10066
10067 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10068
10069 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10070 doesn't affect behavior.
10071 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10072 Solaris, AIX, MSC.
10073 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10074 This works a bit better with glibc, if user code has already included
10075 stdlib.h.
10076 * doc/bison.texinfo (Bison Parser): Document that users can't
10077 arbitrarily use malloc and free for other purposes. Document
10078 that <alloca.h> and <malloc.h> might be included.
10079 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10080 user must declare alloca.
10081
10082 * HACKING (release): Forwarn the Translation Project about
10083 stable releses.
10084
10085 2005-09-20 Akim Demaille <akim@epita.fr>
10086
10087 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10088
10089 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10090
10091 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10092 (YYSTACK_ALLOC_MAXIMUM): Use it.
10093 (yysyntax_error): New function.
10094 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10095 multiple syntax errors are reported, and alloca is being used.
10096 Instead, reallocate buffers twice as big each time, so that
10097 we waste at most half the allocated memory. Start with a small
10098 (128-byte) buffer that will suffice in most cases anyway.
10099 Use yysyntax_error to do most of the work.
10100
10101 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10102 yynerrs is the number of errors reported, not the number of
10103 errors encountered.
10104
10105 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10106 Mark it as expected to fail.
10107 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10108 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10109 Don't start user-code symbols with "yy", to avoid name space problems.
10110
10111 2005-09-19 Akim Demaille <akim@epita.fr>
10112
10113 Remove the traits, failed experiment.
10114 It never proved useful, and anyway because of the current
10115 definition, it was not possible to have several specialization of
10116 this traits, making it useless.
10117 * data/lalr1.cc (yy:traits): Remove.
10118 Inline its definitions in the parser class.
10119
10120 2005-09-19 Akim Demaille <akim@epita.fr>
10121
10122 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10123 least Mac OSX with a /usr/local install of gettext.
10124
10125 2005-09-19 Akim Demaille <akim@epita.fr>
10126
10127 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10128 and yytoken for similarity with the other skeletons.
10129
10130 2005-09-19 Akim Demaille <akim@epita.fr>
10131
10132 * NEWS, configure.ac: update version number to 2.1a.
10133
10134 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10135
10136 * NEWS: Version 2.1.
10137
10138 * NEWS: Remove notice of yytname change, since it was never in an
10139 official release.
10140 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10141 diagnostic.
10142 * src/output.c (prepare): Likewise.
10143 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10144 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10145 is not defined. This is an awful hack, but it's enough for now.
10146 All callers changed.
10147 * tests/glr-regression-at (make_value): Args are const pointers now,
10148 to avoid GCC warning.
10149 (Duplicated user destructor for lookahead): New test. Currently
10150 skipped. It fails on my host but I'm not sure it'll always fail.
10151
10152 2005-09-16 Akim Demaille <akim@epita.fr>
10153
10154 * src/symtab.h (struct symbol): Declare the printer and destructor
10155 as const, to avoid accidental calls to free.
10156 (symbol_destructor_set, symbol_printer_set): Adjust.
10157 * src/symtab.c: Adjust.
10158
10159 2005-09-16 Akim Demaille <akim@epita.fr>
10160
10161 * data/c.m4 (b4_token_enums): New.
10162 (b4_token_defines): Rename as...
10163 (b4_token_enums_defines): this.
10164 (b4_token_defines): New, output only the #defines.
10165 * data/yacc.c, data/glr.c: Adjust.
10166 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10167 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10168 as default values.
10169
10170 2005-09-16 Akim Demaille <akim@epita.fr>
10171
10172 * data/lalr1.cc (yylex_): Remove, inline its code.
10173 (yyreport_syntax_error_): Remove, replaced by...
10174 (yysyntax_error_): this which returns a string and leaves to the
10175 caller the call to the users' error function.
10176 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10177 Move from members of the parser object...
10178 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10179 to local variables of the parse function.
10180
10181 2005-09-16 Akim Demaille <akim@epita.fr>
10182
10183 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10184 since it's in Bison's name space.
10185
10186 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10187
10188 * data/glr.c (yyresolveValue): Add default case to pacify
10189 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10190
10191 * NEWS: Document when yyparse started to return 2.
10192 * doc/bison.texinfo (Parser Function): Document when yyparse
10193 returns 2.
10194
10195 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10196 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10197 changed.
10198 (class position): file_name -> filename (reverting). All uses changed.
10199
10200 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10201
10202 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10203 do anything if $@ exists. This reverts part of the 2005-07-07
10204 patch.
10205
10206 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10207
10208 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10209 contains obsolete information and isn't worth distributing as a
10210 separate file anyway.
10211 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10212 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10213 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10214 (yyparse): Abort if user code uses longjmp to throw an unexpected
10215 value.
10216
10217 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10218
10219 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10220 Suggested by twlevo@xs4all.nl.
10221
10222 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10223 This avoids a diagnostic from gcc -Wswitch-enum.
10224 Problem reported by twlevo@xs4all.nl.
10225
10226 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10227 standards. Use "file name" or "file" or "name", depending on
10228 the context.
10229 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10230 not to hack/foo.tab.c.
10231 (Calc++ Top Level): 2nd arg of main is not const.
10232 * data/glr.c: b4_filename -> b4_file_name.
10233 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10234 All uses changed.
10235 (class position): filename -> file_name. All uses changed.
10236 * data/yacc.c: b4_filename -> b4_file_name.
10237 * lib/bitset.h: filename -> file_name in local vars.
10238 * lib/bitset_stats.c: Likewise.
10239 * src/files.c: Likewise.
10240 * src/scan-skel.l ("@output ".*\n): Likewise.
10241 * src/files.c (file_name_split): Renamed from filename_split.
10242 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10243
10244 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10245
10246 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10247 to accommodate latest gnulib.
10248
10249 * tests/glr-regression.at (Duplicate representation of merged trees):
10250 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10251
10252 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10253 needed.
10254
10255 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10256
10257 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10258 All uses changed. Invoke user destructor after an error during a
10259 split parse (trivial change from Joel E. Denny).
10260
10261 * tests/glr-regression.at
10262 (User destructor after an error during a split parse): New test case.
10263 Problem reported by Joel E. Denny in:
10264 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10265
10266 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10267
10268 * README-cvs: Give URLs for recommended tools.
10269 Mention Gzip version problem, and bootstrapping issues.
10270 Remove troubleshooting section, as it's somewhat obsolete.
10271
10272 * bootstrap (no_cache): New var, to accommodate different wget
10273 variants. Use it instead of '-C off'. Problem reported by
10274 twlevo@xs4all.nl.
10275
10276 * data/glr.c (yydestroyStackItem): New function.
10277 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10278 debugging information. Problem reported by Joel E. Denny.
10279
10280 2005-08-25 Akim Demaille <akim@epita.fr>
10281
10282 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10283
10284 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10285
10286 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10287 Don't invoke destructor on unresolved entries.
10288 * tests/glr-regression.at
10289 (User destructor for unresolved GLR semantic value): New test case.
10290 Problem reported by Joel E. Denny in:
10291 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10292
10293 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10294
10295 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10296 Add strnlen.c.
10297 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10298 lib-prefix.m4, po.m4.
10299
10300 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10301 in yydestruct diagnostic, since it might not be an error.
10302 Problem reported by Joel Denny near end of
10303 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10304 * data/lalr1.cc (yyerturn): Likewise.
10305 * data/yacc.c (yyreturn): Likewise.
10306 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10307
10308 * src/files.c: Remove obsolete FIXME comment.
10309
10310 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10311 with the other templates, and to fix bogus run-on messages such
10312 as the one reported at the end of
10313 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10314 All callers changed to avoid the newline.
10315 (yyprocessOneStack): Output two lines rather than one, to accommodate
10316 the above change. This changes the debug output format slightly.
10317
10318 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10319 reported by Joel E. Denny in
10320 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10321 (trivial change).
10322 * tests/glr-regression.at (Duplicate representation of merged trees):
10323 New test, from Joel E. Denny in:
10324 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10325 * THANKS: Add Joel E. Denny.
10326
10327 * configure.ac (AC_INIT): Bump to 2.0c.
10328
10329 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10330
10331 * NEWS: Version 2.0b.
10332
10333 * Makefile.am (SUBDIRS): Put examples before tests, so that
10334 "make check" doesn't finish with "All 1 tests passed".
10335
10336 * tests/regression.at (Token definitions): Don't rely on
10337 AT_PARSER_CHECK for data that contains backslashes. It currently
10338 uses 'echo', and 'echo' isn't portable if its argument contains
10339 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10340 that the byte '\0xff' is not printable in the C locale; it is,
10341 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10342 not printable, so use '\0x81' to test.
10343
10344 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10345 version of GCC, since the macro is used with non-GCC compilers.
10346
10347 Fix core dump reported by Pablo De Napoli in
10348 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10349 * tests/regression.at (Invalid inputs with {}): New test.
10350 * src/parse-gram.y (token_name): Translate type before using
10351 it as an index.
10352
10353 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10354 the user's name space. All uses changed to __attribute__
10355 ((__unused__)).
10356 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10357 Add __attribute__ ((__noreturn__)).
10358
10359 * etc/clcommit: Remove. We weren't using it, and it failed
10360 "make maintainer-distcheck".
10361 * Makefile.maint: Merge from coreutils.
10362 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10363 (syntax-check-rules): Change list of rules as described below.
10364 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10365 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10366 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10367 (sc_trailing_space): New rules.
10368 (sc_xalloc_h_in_src): Remove.
10369 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10370 (sc_space_tab, sc_error_exit_success, sc_changelog):
10371 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10372 (makefile-check, po-check, author_mark_check):
10373 (makefile_path_separator_check, copyright-check):
10374 Use grep -n, to make it easier to find violations.
10375 Use CVS_LIST and CVS_LIST_EXCEPT.
10376 (header_regexp, h_re): Remove.
10377 (dd_c): New macro.
10378 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10379 (my-distcheck): Use more-modern GCC flags.
10380 (signatures, %.asc): Remove.
10381 (rel-files, announcement): Remove signatures.
10382 Restore old updating code, even though we don't use it, so
10383 that we're the same as coreutils.
10384 (alpha, beta, major): Depend on news-date-check.
10385 Make the upload commands.
10386
10387 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10388 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10389 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10390 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10391 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10392 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10393 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10394 * tests/sets.at: Likewise.
10395
10396 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10397 we comment out the Autoconf version number.
10398 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10399 it's error-prone and "make maintainer-distcheck" rejects it.
10400
10401 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10402 Indent calls to "error" to pacify "make maintainer-distcheck",
10403 when the calls are not intended to be translated.
10404 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10405
10406 * src/Makefile.am (DEFS): Use +=, to pacify
10407 "make maintainer-distcheck".
10408 (bison_SOURCES): Add scan-skel.h.
10409 (sc_tight_scope): New rule, from coreutils.
10410
10411 * src/files.c (src_extension, header_extension):
10412 Now static, not extern.
10413 * src/getargs.c (short_options): Likewise.
10414 * src/muscle_tab.c (muscle_table): Likewise.
10415 * src/parse-gram.y (current_class, current_type, current_prec):
10416 Likewise.
10417 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10418 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10419 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10420 void, to avoid warning when NLS is disabled.
10421 * src/output.c: Include scan-skel.h.
10422 (scan_skel): Remove decl, since scan-skel.h does this.
10423 (output_skeleton):
10424 Indent calls to "error" to pacify "make maintainer-distcheck".
10425 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10426 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10427 "make maintainer-distcheck".
10428 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10429 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10430 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10431 (skel_lex_destroy, scan_skel): Move these decls to...
10432 * src/scan-skel.h: New file.
10433 * src/uniqstr.c (uniqstr_assert):
10434 Indent calls to "error" to pacify "make maintainer-distcheck".
10435
10436 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10437 not @VAR@.
10438
10439 * tests/torture.at: Revamp to avoid misuse of atoi that
10440 "make maintainer-distcheck" complained about.
10441
10442 * examples/extexi (message): Don't print a message more than once,
10443 and omit line-number decoration that makes Emacs compile think
10444 that informative messages are worth worrying about.
10445
10446 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10447
10448 * configure.ac: Update version number.
10449
10450 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10451 accidentally.
10452 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10453 autogenerated by the maintainer.
10454 * examples/calc++/.cvsignore: Add *.yy.
10455
10456 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10457 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10458 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10459
10460 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10461
10462 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10463 from maintainer-distcheck about casting the argument of 'free'.
10464
10465 * NEWS: Mention recent yytname changes.
10466 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10467
10468 * bootstrap: For translations that have not yet been upgraded to
10469 the new runtime-po domain, prime the pump by extracting the
10470 relevant strings from the obsolete translations. This code can be
10471 removed once the bison-runtime domain has been translated by each
10472 team.
10473
10474 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10475 now that token names are already quoted.
10476
10477 Fix problem reported by Anthony Heading.
10478 * data/glr.c (YYTOKEN_TABLE): New macro.
10479 (yytname): Define if YYTOKEN_TABLE.
10480 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10481 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10482 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10483 * src/output.c (prepare_symbols): Output token_table_flag.
10484
10485 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10486
10487 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10488 again if the first call fails.
10489
10490 * data/glr.c (yytnamerr): New function.
10491 (yyreportSyntaxError): Use it to dequote most string literals.
10492 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10493 with other skeletons. All uses changed.
10494 (yytnameerr_): New function.
10495 (yyreport_syntax_error): Use it to dequote most string literals.
10496 * data/yacc.c (yytnamerr): New function.
10497 (yyerrlab): Use it to decode most string literals.
10498 * doc/bison.texinfo (Decl Summary, Calling Convention):
10499 Clarify quoting convention of yytname.
10500 * src/output.c (prepare_symbols): Quote all names. This undoes
10501 the 2005-04-17 change, which is now accomplished (mostly) via
10502 changes in the parsers as described above.
10503 * tests/regression.at (Token definitions, Web2c Actions):
10504 Undo most 2005-04-17 change here, too.
10505
10506 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10507
10508 Fix more problems reported by twlevo@xs4all.nl.
10509 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10510 remove trailing spaces. This loses the exit status of ./types,
10511 and isn't needed since ./types shouldn't be emitting trailing
10512 spaces.
10513 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10514 as the stack isn't valid in that case.
10515
10516 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10517 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10518 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10519 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10520 is used.
10521 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10522 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10523 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10524 Likewise.
10525
10526 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10527 overly-picky compilers that reject 'char *foo = "bar";'.
10528
10529 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10530 to FILE * parameter, not to stderr. This fixes a typo introduced
10531 in the 2005-07-12 change.
10532
10533 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10534 warnings from GCC 4.
10535
10536 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10537 (yyglrShiftDefer, yysplitStack):
10538 Remove unused parameters b4_pure_formals. All uses changed.
10539 (yyglrShift): Remove unused parameters b4_user_formals.
10540 All uses changed.
10541 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10542
10543 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10544
10545 Destructor cleanups and regularization among the three skeletons.
10546 * NEWS: Document the behavior changes.
10547 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10548 stack before failing, as the cleanup code will do it for us now.
10549 * data/lalr1.cc (yyerrlab): Likewise.
10550 * data/glr.c (yyparse): Pop everything off the stack before
10551 freeing it, so that destructors get called properly.
10552 * data/lalr1.cc (yyreturn): Likewise.
10553 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10554 This is more consistent.
10555 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10556 why destructors might be called. 1.875 -> 2.1.
10557 (Destructor Decl, Decl Summary, Table of Symbols):
10558 Some English-language cleanups for %destructor.
10559 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10560 Add output line for destructor of start symbol.
10561 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10562 because of that same extra output line.
10563
10564 * NEWS: Document minor wording changes in diagnostics of
10565 Bison-generated parsers.
10566 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10567 Remove unused formals. All uses changed.
10568 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10569 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10570 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10571 Rename yyoverflowab to yyexhaustedlab.
10572 When memory exhaustion occurs during syntax-error reporting,
10573 report it separately rather than in a single diagnostic; this
10574 eases translation.
10575 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10576 (Memory Exhausted): Renamed from Parser Stack Overflow.
10577 Revamp wording slightly to prefer "memory exhaustion".
10578 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10579
10580 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10581
10582 Add i18n support to the GLR skeleton. Partially fix the C++
10583 skeleton; a C++ expert needs to finish this. Remove debugging
10584 msgids; there's little point to having them translated, since they
10585 can be understood only by someone who can read the
10586 (English-language) source code.
10587
10588 Generate runtime-po/bison-runtime.pot automatically, so that we
10589 don't have to worry about garbage getting in that file. We'll
10590 make sure after the next official release that old msgids don't
10591 get lost. See
10592 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10593
10594 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10595 Now auto-generated.
10596 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10597 Fix typos in explanations of the runtime file.
10598 * bootstrap: Change gettext keyword from YYI18N to YY_.
10599 Use standard Makefile.in.in in runtime-po, since we'll arrange
10600 for backward-compatible bison-runtime.po files in a different way.
10601 * data/glr.c (YY_): New macro, from yacc.c.
10602 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10603 Translate messages intended for users.
10604 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10605 the wording in the other skeletons. We don't know that the memory
10606 is virtual.
10607 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10608 Use same method that yacc.c uses.
10609 Don't translate debugging messages.
10610 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10611 it doesn't work (yet), and requires C++ expertise to fix.
10612 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10613 Move defn to a more logical place, to be consistent with other
10614 skeletons.
10615 Don't translate debugging messages.
10616 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10617 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10618 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10619 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10620
10621 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10622 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10623 void, not int.
10624 * tests/glr-regression.at (Badly Collapsed GLR States):
10625 Likewise.
10626 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10627 yylex should return 0 at EOF rather than aborting.
10628
10629 Improve tests for stack overflow in GLR parser.
10630 Problem reported by twlevo@xs4all.nl.
10631 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10632 All uses removed.
10633 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10634 can handle the problem.
10635 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10636 (yyparse): New local variable yyresult to record the result.
10637 Use result of setjmp to set it, rather than storing itinto
10638 struct.
10639 (yyDone): Remove label.
10640 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10641 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10642 if YYABORT is used).
10643 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10644 yyparse status; put status > 1 into diagnostic.
10645 Check that status==2 works.
10646 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10647 Use exit status 3 for failure to open (which shouldn't happen).
10648
10649 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10650
10651 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10652 1 on syntax error; just let yyparse do its thing.
10653 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10654 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10655 (Exploding the Stack Size with Alloca):
10656 (Exploding the Stack Size with Malloc):
10657 Expect exit status 2, not 1, since the parser is supposed to blow
10658 its stack. Problem reported by twlevo@xs4all.nl.
10659
10660 * data/glr.c (yyparse): Don't assume that the initial calls
10661 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10662 Print a stack-overflow message and fail instead.
10663 Initialize the line-number information before creating the stack,
10664 so that the stack-overflow message can report line zero safely.
10665
10666 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10667
10668 Fix problems reported by twlevo@xs4all.nl.
10669 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10670 (yyuserMerge): Provide a default case if b4_mergers is empty.
10671 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10672 * tests/glr-regression.at
10673 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10674 Add casts to pacify C++ compilers.
10675 * tests/glr-regression.at (Improper merging of GLR delayed action
10676 sets): Declare yylex before using it.
10677 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10678 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10679 test for valgrind; valgrind is independent of g++.
10680 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10681 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10682 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10683 Use a destructor, so that we can expand the stack. Change
10684 YYSTYPE to char * so that we can free it. Cast result of malloc.
10685
10686 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10687
10688 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10689 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10690
10691 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10692
10693 * PACKAGING: New file, suggested by Bruno Haible and taken from
10694 similar wording in gettext's PACKAGING file.
10695 * NEWS: Mention PACKAGING.
10696 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10697
10698 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10699
10700 * NEWS: Document recent i18n improvements.
10701 * bootstrap: Get runtime translations into runtime-po.
10702 Create runtime-po files automatically, if possible.
10703 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10704 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10705 does not infringe on the user's name space.
10706 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10707 * doc/bison.texinfo (Internationalization): Revamp the English
10708 and Texinfo syntax a bit, to try to make it clearer.
10709 (Bison Options, Option Cross Key): Mention --print-localedir.
10710 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10711 YYENABLE_NLS. Quote a bit more.
10712 * runtime-po/.cvsignore: New file.
10713 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10714 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10715 * runtime-po/quot.sed: Likewise.
10716 * runtime-po/boldquot.sed: Likewise.
10717 * runtime-po/en@quot.header: Likewise.
10718 * runtime-po/en@boldquot.header: Likewise.
10719 * runtime-po/insert-header.sin: Likewise.
10720 * runtime-po/remove-potcdate.sin: Likewise.
10721 * runtime-po/Makevars: Likewise.
10722 * runtime-po/LINGUAS: Likewise.
10723 * runtime-po/de.po: Likewise; we will rely on the translation project
10724 to maintain this, so "bootstrap" should get it.
10725 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10726 its value.
10727 * src/main.c (main): Bind the bison-runtime domain, too.
10728
10729 2005-07-12 Bruno Haible <bruno@clisp.org>
10730
10731 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10732 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10733 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10734 * runtime-po: New directory.
10735 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10736 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10737 * runtime-po/Rules-quot: New file, copied from po/.
10738 * runtime-po/quot.sed: Likewise.
10739 * runtime-po/boldquot.sed: Likewise.
10740 * runtime-po/en@quot.header: Likewise.
10741 * runtime-po/en@boldquot.header: Likewise.
10742 * runtime-po/insert-header.sin: Likewise.
10743 * runtime-po/remove-potcdate.sin: Likewise.
10744 * runtime-po/Makevars: New file.
10745 * runtime-po/POTFILES.in: New file.
10746 * runtime-po/LINGUAS: New file.
10747 * runtime-po/bison-runtime.pot: New file.
10748 * runtime-po/de.po: New file.
10749 * m4/bison.m4: New file.
10750 * Makefile.am (SUBDIRS): Add runtime-po.
10751 (aclocaldir, aclocal_DATA): New variables.
10752 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10753 Define aclocaldir.
10754 * src/getargs.c (usage): Document --print-localedir option.
10755 (PRINT_LOCALEDIR_OPTION): New enum item.
10756 (long_options): Add --print-localedir option.
10757 (getargs): Handle --print-localedir option.
10758 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10759 (Internationalization): New section.
10760
10761 2005-07-12 Akim Demaille <akim@epita.fr>
10762
10763 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10764 for consistency with the rest of the code.
10765 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10766 Add separators.
10767
10768 2005-07-12 Akim Demaille <akim@epita.fr>
10769
10770 * src/parse-gram.y: Use %printer instead of YYPRINT.
10771
10772 2005-07-12 Akim Demaille <akim@epita.fr>
10773
10774 * src/symtab.h, src/symtab.c (symbol_print): New.
10775 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10776 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10777
10778 2005-07-12 Akim Demaille <akim@epita.fr>
10779
10780 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10781 b4_at_dollar and b4_dollar_dollar.
10782
10783 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10784
10785 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10786 and Pennello's paper.
10787
10788 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10789
10790 * data/yacc.c (yyparse): Undo previous patch. Instead,
10791 set yylsp[0] and yyvsp[0] only if the initial action
10792 sets yylloc and yylval, respectively.
10793
10794 * data/yacc.c (yyparse): In the initial action, set
10795 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10796 This avoids the use of undefined variables if the initial
10797 action does not set yylloc and/or yylval.
10798
10799 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10800
10801 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10802 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10803 Remove from CVS. These files are automatically generated.
10804 * examples/extexi: Clarify that this file is now part of Bison,
10805 not GNU M4, and that it works with any POSIX-compatible Awk.
10806 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10807 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10808 so that we also get calc++-parser.yy. Geneate it.
10809 Use $(AWK), not gawk, since any conforming Awk will do.
10810 Put comment before action, since older 'make' can't handle comment
10811 in action.
10812 $(BUILT_SOURCES): List all built sources, not just some of them.
10813 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10814 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10815 $($(calc_sources_generated)): Remove unnecessary test for existence
10816 of target. (This had a shell syntax error anyway; a stray "x".)
10817 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10818 calc++-parser.yy.
10819 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10820
10821 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10822 implied by the other modules.
10823
10824 2005-07-06 Akim Demaille <akim@epita.fr>
10825
10826 Bind examples/calc++ to the package.
10827 * examples/calc++/Makefile: Remove, replaced by...
10828 * examples/calc++/Makefile.am: ... this new file.
10829 * examples/calc++/test: Remove input.
10830 * examples/calc++/compile: Remove.
10831 * examples/Makefile.am: New.
10832 * configure.ac, Makefile.am: Adjust.
10833 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10834
10835 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10836
10837 * data/glr.c (yyFail): Drastically simplify; since the format argument
10838 never had any % directives, we can simply pass it to yyerror.
10839 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10840 be modified later, as that is the usual style in glr.c.
10841 Problems reported by Paul Hilfinger.
10842
10843 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10844 and size overflow errors.
10845 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10846 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10847 (YYSIZEMAX): New macro.
10848 (yystpcpy): New function, taken from yacc.c.
10849 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10850 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10851 so that we don't have to maintain their signatures.
10852 (yyFail): Check for buffer overflow, by using vsnprintf rather
10853 than vsprintf. Allocate a bigger buffer if possible.
10854 Report an error if buffer allocation fails.
10855 (yyStackOverflow): New function.
10856 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10857 the initialization was successful. It might fail if storage was
10858 exhausted.
10859 (yyexpandGLRStack): Add more checks for storage allocation failure.
10860 Use yyStackOverflow to report failures.
10861 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10862 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10863 Don't assume stack number fits in int.
10864 (yysplitStack): Check for storage allocation failure.
10865 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10866 can print diagnostics on storage allocation failure. All callers
10867 changed.
10868 (yyresolveValue): Use yybool for boolean.
10869 (yyreportSyntaxError): Check for size-calculation overflow.
10870 This code is taken from yacc.c.
10871 (yyparse): Check for storage allocation errors when allocating
10872 the initial stack.
10873
10874 2005-07-05 Akim Demaille <akim@epita.fr>
10875
10876 Extract calc++ from the documentation.
10877 * doc/bison.texinfo (Calc++): Add the extraction marks.
10878 * examples/extexi: New, from the aborted GNU Programming 2E.
10879 Separate the different paragraph of a file with empty lines.
10880 * examples/Makefile: Use it to extract the whole calc++ example.
10881
10882 2005-06-24 Akim Demaille <akim@epita.fr>
10883
10884 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10885 class typedefs.
10886
10887 2005-06-22 Akim Demaille <akim@epita.fr>
10888
10889 * doc/bison.texinfo (C++ Language Interface): First stab.
10890 (C++ Parsers): Remove.
10891
10892 2005-06-22 Akim Demaille <akim@epita.fr>
10893
10894 * data/lalr1.cc (yylex_): Honor %lex-param.
10895
10896 2005-06-22 Akim Demaille <akim@epita.fr>
10897
10898 Start a set of simple examples.
10899 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10900 * examples/calc++/calc++-driver.hh,
10901 * examples/calc++/calc++-parser.yy,
10902 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10903 * examples/calc++/compile, examples/calc++/test: New.
10904
10905 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10906
10907 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10908 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10909 which stems from the 2005-05-27 patch.
10910
10911 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10912
10913 * data/glr.c: Modify treatment of unused parameters to permit use
10914 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10915
10916 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10917
10918 Fix infringement on user name space reported by Janos Zoltan Szabo.
10919 * data/yacc.c (yyparse): strlen -> yystrlen.
10920
10921 2005-05-30 Akim Demaille <akim@epita.fr>
10922
10923 * data/lalr1.cc (_): New.
10924 Translate the various messages.
10925
10926 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10927
10928 Fix infringement on user name space reported by Bruno Haible.
10929 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10930 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10931 the user's name space.
10932 (alloca): Include <stdlib.h> to get it, if it's not built in.
10933 (YYMALLOC, YYFREE): Define only if needed.
10934 (malloc, free): Declare, but only if needed, as this infringes on
10935 the user name space.
10936
10937 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10938
10939 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10940 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10941 with %d format.
10942 * lib/ebitset.c (min, max): Undef before defining.
10943 * lib/vbitset.c (min, max): Likewise.
10944 * lib/subpipe.c (create_subpipe): Save local variables in case
10945 vfork clobbers them.
10946
10947 2005-05-24 Bruno Haible <bruno@clisp.org>
10948
10949 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10950 error message syntax used by gcc-4.0.
10951
10952 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10953
10954 * README: Mention m4 1.4.3. Remove obsolete advice about
10955 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10956
10957 * bootstrap: Remove workaround for problem I encountered with
10958 gettext 0.14.1; it seems to be fixed now.
10959
10960 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * NEWS: Version 2.0a.
10963
10964 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10965 the previous change.
10966
10967 Various maintainer cleanups.
10968 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10969 conftest*, for benefit of CVS commands run at the same time as
10970 "configure". Add build-aux, since "bootstrap" now creates it and
10971 its subfiles.
10972 * Makefile.cfg (move_if_change): Remove.
10973 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10974 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10975 (po_repo, do-po-update, po-update, wget_files, get-targets):
10976 (config.guess-url_prefix, config.sub-url_prefix):
10977 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10978 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10979 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10980 Remove.
10981 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10982 this is now the recommended name.
10983 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10984 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10985 ylwrap. These files now go into build-aux.
10986 * config/move-if-change: Remove.
10987 * config/prev-version.txt: Bump from 1.75 to 2.0.
10988
10989 * bootstrap: Add stdio-safer, unistd-safer modules.
10990 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10991 we don't need it).
10992 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10993 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10994 * lib/subpipe.c: Include "unistd-safer.h".
10995 (create_subpipe): Make sure all the newly-created
10996 file descriptors are > 2, so that diagnostics don't
10997 get sent down them (which might cause Bison to hang, in theory).
10998 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10999 * src/files.c (xfopen): Use fopen_safer, not fopen.
11000
11001 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11002 yesterday's yacc.c fix.
11003
11004 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11005
11006 * data/glr.c, data/lalr1.cc: Update copyright date.
11007
11008 Fix a destructor bug reported by Wolfgang Spraul in
11009 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11010 * data/yacc.c (yyabortlab): Don't call destructor, and
11011 don't set yychar to EMPTY.
11012 (yyoverflowlab): Don't call destructor.
11013 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11014 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11015 since we no longer output the message "discarding lookahead token
11016 end of input ()".
11017
11018 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11019
11020 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11021 fix a small glitch in debugging output.
11022 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11023 after YY_SYMBOL_PRINT where needed.
11024
11025 (struct yyGLRState): Add some comments.
11026 (struct yySemanticOption): Add some comments.
11027 (union yyGLRStackItem): Add comment.
11028
11029 (yymergeOptionSets): Correct this to properly perform the union,
11030 avoiding infinite reported by Michael Rosien.
11031 Update comment.
11032
11033 * tests/glr-regression.at: Add test for GLR merging error reported
11034 by M. Rosien.
11035
11036 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11037
11038 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11039 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11040 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11041 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11042 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11043 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11044 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11045 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11046 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11047 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11048 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11049 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11050 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11051 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11052 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11053 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11054 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11055 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11056 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11057 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11058 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11059 src/output.h, src/parse-gram.c, src/parse-gram.h,
11060 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11061 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11062 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11063 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11064 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11065 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11066 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11067 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11068 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11069 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11070 tests/reduce.at, tests/regression.at, tests/sets.at,
11071 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11072 Update FSF postal mail address.
11073
11074 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11075
11076 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11077 Problem reported by Ralf Menzel.
11078
11079 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11080
11081 * tests/actions.at: Test that stack overflow invokes destructors.
11082 From Marcus Holland-Moritz.
11083 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11084 from here....
11085 (yyreturn): to here. That way, destructors are called properly
11086 even if the stack overflows, or the user calls YYACCEPT or
11087 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11088 (yyoverflowlab): Destroy the lookahead.
11089
11090 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11091
11092 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11093
11094 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11095
11096 * NEWS: Bison-generated C parsers no longer quote literal strings
11097 associated with tokens.
11098 * src/output.c (prepare_symbols): Don't escape strings,
11099 since users don't want to see C escapes.
11100 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11101 in diagnostics.
11102 * tests/input.at (Torturing the Scanner): Likewise.
11103 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11104
11105 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11106
11107 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11108 the data size is known to be too small and we can't increase it.
11109 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11110
11111 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11112
11113 * src/parse-gram.y: Include quotearg.h.
11114 (string_as_id): Quote $1 before using it as a key, since the
11115 lexer no longer quotes it for us.
11116 (string_content): Don't strip quotes, since lexer no longer
11117 quotes it for us.
11118 * src/scan-gram.l: Include quotearg.h.
11119 ("\""): Omit quote.
11120 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11121 a key, since the rest of the lexer doesn't quote it.
11122 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11123 * tests/regression.at (Token definitions): Check for backslashes
11124 in token strings.
11125
11126 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11127 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11128 (yyparse): Revamp code to generate long syntax error message, to
11129 make it easier to translate, and to avoid problems with arithmetic
11130 overflow. Change "virtual memory" to "memory" in diagnostic, since
11131 we don't know whether the memory is virtual.
11132
11133 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11134
11135 * NEWS: Bison-generated C parsers now use the _ macro to
11136 translate strings.
11137 * data/yacc.c (_) [!defined _]: New macro.
11138 All English strings wrapped inside this macro.
11139 * doc/bison.texinfo (Bison Parser): Document _.
11140 * po/POTFILES.in: Include src/parse-gram.c, since it now
11141 includes translateable strings that parse-gram.y doesn't.
11142
11143 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11144
11145 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11146 reverting the 2004-10-11 change to this function.
11147 (symbol_check_alias_consistency): Don't call symbol_type_set
11148 if the type name is already correct.
11149 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11150
11151 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11152
11153 * tests/regression.at (Token definitions): Don't use a token named
11154 c, as that generates a "#define c ..." that runs afoul of buggy
11155 stdlib.h that uses the identifier c as a member of struct
11156 drand48_data. Problem reported by Horst Wente.
11157
11158 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11159
11160 * bootstrap: Change translation URL from
11161 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11162 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11163 redirection glitches. Problem reported by twlevo@xs4all.nl.
11164
11165 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11166
11167 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11168 after operands; POSIX says this isn't portable for the c99 command.
11169
11170 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11171
11172 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11173 immediately if a data overrun has occurred; this may help us track
11174 down what may be a spurious failure on MacOS.
11175
11176 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11177
11178 Respond to problems reported by twlevo@xs4all.nl.
11179
11180 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11181
11182 * src/vcg.h: Comment fix.
11183 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11184 (G_CMAX): Change to -1 instead of INT_MAX.
11185
11186 * data/yacc.c (yyparse): Omit spaces before #line.
11187
11188 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11189
11190 * src/tables.c (state_number_to_vector_number): Put it inside an
11191 "#if 0", since it's not currently used. Problem reported by
11192 Roland McGrath.
11193
11194 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11195
11196 * src/output.c (escaped_output): Renamed from
11197 escaped_file_name_output, since we now use it for symbol tags as
11198 well. All uses changed.
11199 (symbol_destructors_output, symbol_printers_output):
11200 Escape symbol tags too.
11201 Problem reported by Matyas Forstner in
11202 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11203
11204 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11205 not needed.
11206 * src/output.c (user_actions_output, token_definitions_output,
11207 symbol_destructors_output, symbol_printers_output): Likewise.
11208 * src/reader.c (prologue_augment): Likewise.
11209 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11210
11211 * src/vcg.c (output_edge): Don't quote linestyle arg.
11212 Problem reported by twlevo@xs4all.nl.
11213
11214 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11215
11216 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11217 example, reported by Derek M Jones. Also, make the example even
11218 more outrageous, to better illustrate how bad the problem is.
11219
11220 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11221
11222 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11223 putsym. Typo reported by Sebastian Piping.
11224
11225 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11226
11227 * doc/bison.texinfo (Language and Grammar): some -> same
11228 (Epilogue): int he -> in the
11229 Typos reported by Sebastian Piping via Justin Pence.
11230
11231 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11232
11233 * tests/glr-regression.at (Improper handling of embedded actions
11234 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11235 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11236 with dollar signs in test names.
11237 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11238 for a similar reason.
11239
11240 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11241
11242 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11243 wants to redefine G_VIEW.
11244
11245 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11246
11247 * src/vcg.c (get_view_str): Remove case for normal_view.
11248 Problem reported by twlevo@xs4all.nl.
11249
11250 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11251
11252 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11253 Problem reported by twlevo@xs4all.nl.
11254
11255 * doc/bison.texinfo: Change @dircategory from "GNU programming
11256 tools" to "Software development". Requested by Richard Stallman
11257 via Karl Berry.
11258
11259 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11260
11261 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11262 Problem reported by twlevo@xs4all.nl.
11263
11264 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11265
11266 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11267 keyword; it's not needed with modern compilers, and it doesn't
11268 affect correctness with older compilers. Suggested by
11269 twlevo@xs4all.nl.
11270
11271 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11272
11273 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11274 gcc -Wswitch-default.
11275 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11276 * data/yacc.c (yyparse): Likewise.
11277
11278 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11279
11280 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11281 already. Let config.h define any nonstandard values.
11282
11283 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11284
11285 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11286 for the benefit of slower hosts. Problem reported by
11287 Nelson H. F. Beebe.
11288
11289 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11290
11291 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11292 being defined and not used.
11293 * data/lalr1.cc (yyparse): Likewise.
11294 Use "if (false)" rather than "if (0)".
11295
11296 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11297
11298 * TODO: Mention that we should allow NUL bytes in tokens.
11299
11300 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11301
11302 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11303 Problem reported by Hans Aberg.
11304
11305 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11306
11307 * src/getargs.c (version): Happy new year; update overall
11308 program copyright date from 2004 to 2005.
11309
11310 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11311 Problem reported by Hans Aberg.
11312 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11313 (Output file names.): Add a test for the case when standard output
11314 is closed.
11315
11316 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11317
11318 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11319 to fix an oversight in the Bison 2.0 manual.
11320
11321 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11322
11323 * NEWS: Version 2.0. Reformat the existing news items since
11324 1.875, so that related items are grouped together.
11325 * configure.ac (AC_INIT): Bump version to 2.0.
11326 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11327
11328 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11329 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11330 otherwise, we're not testing alloca. Unfortunately there's no
11331 simple way to consult HAVE_ALLOCA here.
11332
11333 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11334 for yymsg, too.
11335
11336 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11337 hand. This avoids a warning about comparing int to size_t when
11338 GCC warnings are enabled.
11339
11340 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11341
11342 * NEWS: Bison-generated parsers no longer default to using the
11343 alloca function (when available) to extend the parser stack, due
11344 to widespread problems in unchecked stack-overflow detection.
11345 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11346 responsibility to set it to a positive value. This lets the user
11347 specify a value that is not a preprocessor constant.
11348 * data/yacc.c (YYMAXDEPTH): Likewise.
11349 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11350 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11351 to be a compile-time constant. However, explain the constraints on it.
11352 Also, explain the constraints on YYINITDEPTH.
11353 (Table of Symbols): Explain that alloca is no longer the default.
11354 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11355 to 1.
11356
11357 * doc/bison.texinfo (Location Default Action): Mention that n must
11358 be zero when k is zero. Suggested by Frank Heckenbach.
11359
11360 2004-12-22 Akim Demaille <akim@epita.fr>
11361
11362 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11363 (parser::state_type, parser::semantic_type, parser::location_type):
11364 Private, not public.
11365 (parser::parse): Return ints, not bool.
11366 Returning a bool introduces a problem: 0 corresponds to false, and
11367 it seems weird to return false on success. Returning true changes
11368 the conventions for yyparse.
11369 Alternatively we could return void and send an exception.
11370 There is no clear consensus (yet?).
11371 (state_stack, semantic_stack, location_stack): Rename as...
11372 (state_stack_type, semantic_stack_type, location_stack_type): these.
11373 Private, not public.
11374 * tests/c++.at: New.
11375 * tests/testsuite.at, tests/Makefile.am: Adjust.
11376
11377 2004-12-21 Akim Demaille <akim@epita.fr>
11378
11379 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11380
11381 2004-12-21 Akim Demaille <akim@epita.fr>
11382
11383 Don't impose std::string for filenames.
11384
11385 * data/lalr1.cc (b4_filename_type): New.
11386 (position::filename): Use it.
11387 (parser.hh): Move the inclusion of stack.hh and location.hh below
11388 the user code, so that needed headers for the filename type can be
11389 included first.
11390 Forward declare them before the user code.
11391 * tests/Makefile.am (check-local, installcheck-local): Pass
11392 TESTSUITEFLAGS to the TESTSUITE.
11393
11394 2004-12-20 Akim Demaille <akim@epita.fr>
11395
11396 Use more STL like names: my_class instead of MyClass.
11397
11398 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11399 (SemanticStack, SemanticType, StateStack, StateType)
11400 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11401 (Parser::value): Rename as...
11402 (location_stack, location_type, rhs_number_type, semantic_stack)
11403 (semantic_type, state_stack, state_type, token_number_type, stack)
11404 (slice, traits, parser::yylloc, parser::yylval): these.
11405
11406 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11407
11408 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11409
11410 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11411 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11412
11413 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11414
11415 Remove uses of 'short int' and 'unsigned short int'. This raises
11416 some arbitrary limits. It uses more memory but nowadays that's
11417 not much of an issue.
11418
11419 This change does not affect the generated parsers; that's a different
11420 task, as some users will want to conserve memory there.
11421
11422 Ideally we should use size_t to represent all object counts, and
11423 something like ptrdiff_t to represent signed differences of object
11424 counts; but that will require more code-cleanup than I have the
11425 time to do right now.
11426
11427 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11428 Use size_t, not int or short int, to count objects.
11429 * src/closure.c (nritemset, closure): Likewise.
11430 * src/closure.h (nritemset, closure): Likewise.
11431 * src/nullable.c (nullable_compute): Likewise.
11432 * src/print.c (print_core): Likewise.
11433 * src/print_graph.c (print_core): Likewise.
11434 * src/state.c (state_compare, state_hash): Likewise.
11435 * src/state.h (struct state): Likewise.
11436 * src/tables.c (default_goto, goto_actions): Likewise.
11437
11438 * src/gram.h (rule_number, rule): Use int, not short int.
11439 * src/output.c (prepare_rules): Likewise.
11440 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11441 errs, reductions): Likewise.
11442 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11443 Likewise.
11444 * src/tables.c (vector_number, tally, action_number,
11445 ACTION_NUMBER_MINIMUM): Likewise.
11446 * src/output.c (muscle_insert_short_int_table): Remove.
11447
11448 2004-12-17 Akim Demaille <akim@epita.fr>
11449
11450 * data/lalr1.cc: Extensive Doxygenation.
11451 (error_): Rename as...
11452 (error): this, since it is visible to the user.
11453 Adjust callers.
11454 (Parser::message): Now an automatic variable from...
11455 (Parser::yyreport_syntax_error_): here.
11456 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11457 Parser::error.
11458 * tests/input.at: Escape $.
11459
11460 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11461
11462 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11463 Parenthesize rhs to avoid obscure problems with mistakes like
11464 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11465 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11466 b4_rhs_location): Likewise.
11467 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11468 b4_rhs_location): Likewise.
11469
11470 2004-12-16 Akim Demaille <akim@epita.fr>
11471
11472 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11473 yacc.c: be sure to stay within yycheck_.
11474 * tests/actions.at: Re-enable C++ tests.
11475
11476 2004-12-16 Akim Demaille <akim@epita.fr>
11477
11478 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11479 real.
11480
11481 2004-12-16 Akim Demaille <akim@epita.fr>
11482
11483 Use #define to handle the %name-prefix.
11484
11485 * data/glr.c, data/yacc.c: Comment changes.
11486 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11487 so that one can refer to yylex in the parser file, and have it
11488 renamed, as is the case with other skeletons.
11489
11490 2004-12-16 Akim Demaille <akim@epita.fr>
11491
11492 Move lalr1.cc internals into yy*.
11493
11494 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11495 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11496 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11497 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11498 (empty_, final_, terror_, errcode_, ntokens_)
11499 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11500 (looka_, ilooka_, error_range_, nerrs_):
11501 Rename as...
11502 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11503 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11504 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11505 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11506 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11507 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11508 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11509 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11510 these.
11511
11512 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11513
11514 Fix some problems reported by twlevo at xs4all.
11515 * src/symtab.c (symbol_new): Report an error if the input grammar
11516 contains too many symbols. This is better than calling abort() later.
11517 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11518 (struct node, struct graph):
11519 Rename member expand to stretch. All uses changed.
11520 (struct graph): Remove member layoutalgorithm. All uses removed.
11521 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11522 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11523 All uses changed.
11524 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11525
11526 2004-12-15 Akim Demaille <akim@epita.fr>
11527
11528 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11529 Add more Doxygen comments.
11530 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11531 (report_syntax_error_, translate_): Rename as...
11532 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11533 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11534
11535 2004-12-15 Akim Demaille <akim@epita.fr>
11536
11537 * data/lalr1.cc (lex_): Rename as...
11538 (yylex_): this.
11539 Move the trace here.
11540 Take the %name-prefix into account.
11541 Reported by Alexandre Duret-Lutz.
11542
11543 2004-12-15 Akim Demaille <akim@epita.fr>
11544
11545 Simplify the C++ parser constructor.
11546
11547 * data/lalr1.cc (debug_): Rename as...
11548 (yydebug_): so that the parser's internals are always in the yy*
11549 pseudo namespace.
11550 Adjust uses.
11551 (b4_parse_param_decl): Remove the leading comma as it is now only
11552 called as unique argument list.
11553 (Parser::Parser): Remove the constructor accepting a location and
11554 an initial debugging level.
11555 Remove from the other ctor the argument for the debugging level.
11556 (debug_level_type, debug_level, set_debug_level): New.
11557
11558 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11559 constructor calls.
11560
11561 2004-12-15 Akim Demaille <akim@epita.fr>
11562
11563 Remove b4_root related material: failure experiment
11564 (which goal was to allow to derive from a class).
11565
11566 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11567 definitions and uses.
11568
11569 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11570
11571 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11572 not 2, since it's not portable to subtract 1 from the start of an
11573 array. The new item 0 is never set or used. All uses changed.
11574
11575 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11576 the default definition of YYLLOC_DEFAULT. Problem reported
11577 by Frank Heckenbach.
11578
11579 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11580
11581 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11582 the normal case and one for the error case. Just use the
11583 first one uniformly. Problem reported by Frank Heckenbach.
11584 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11585 use exactly the same macro in both places.
11586 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11587 so that the normal-case YYRHSLOC works for the error case too.
11588 All uses changed.
11589 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11590 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11591 * doc/bison.texinfo (Location Default Action): Don't claim that
11592 we have an array of locations. Use the same macro for both glr
11593 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11594 the index is 0.
11595
11596 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11597
11598 * HACKING: Update email addresses to send announcements to.
11599
11600 * configure.ac (AC_INIT): Bump version to 1.875f.
11601
11602 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11603
11604 * NEWS: Version 1.875e.
11605 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11606
11607 * src/scan-skel.l: Include "complain.h", for "fatal".
11608
11609 * src/relation.h (relation_print, relation_digraph):
11610 Relation sizes are of type relation_node, not size_t (this is
11611 merely a doc fix, since the two types are equivalent).
11612 (relation_transpose): Relation sizes are of type relation_node,
11613 not int.
11614 * src/relation.c: Likewise.
11615 (top, infinity): Now of type relation_node, not int.
11616 (traverse, relation_transpose): Use relation_node, not int.
11617
11618 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11619 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11620 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11621
11622 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11623 specifying whether the test should be skipped. Use it tp
11624 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11625 fail on some hosts, and should be skipped.
11626
11627 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11628
11629 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11630 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11631 unless otherwise specified below.
11632
11633 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11634 to allocate kernel_base, kernel_items, kernel_size, since
11635 they needn't be initialized to 0.
11636 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11637 * src/closure.c (new_closure): Likewise, for itemset.
11638 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11639 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11640 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11641 (build_relations): Likewise for edge, states1, includes.
11642 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11643 * src/reader.c (packgram): Likewise, for ritem, rules.
11644 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11645 * src/relation.c (relation_digraph): Likewise for VERTICES.
11646 (relation_transpose): Likewise for new_R, end_R.
11647 * src/symtab.c (symbols_token_translations_init): Likewise for
11648 token_translations.
11649 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11650 (token_actions): Likewise for yydefact, actrow, conflrow,
11651 conflict_list.
11652 (save_column): Likewise for froms[symno], tos[symno].
11653 (goto_actions): Likewise for state_count.
11654 (pack_table): Likewise for base, pos, check.
11655 (tables_generate): Likewise for width.
11656
11657 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11658 for initial core. Just have a separate core, so we needn't worry
11659 about whether kernel_size and kernel_base are initialized.
11660
11661 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11662 kernel_size, kernel_items): Remove unnecessary initialization.
11663 * src/conflicts.c (conflicts): Likewise.
11664 * src/derives.c (derives): Likewise.
11665 * src/muscle_tablc (muscle_insert): Likewise.
11666 * src/relation.c (relation_digraph): Likewise.
11667 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11668 conflrow, conflict_table, conflict_list, table, check):
11669 Likewise.
11670
11671 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11672 This is because all callers pass unsigned int.
11673 * src/closure.h (new_closure): Likewise.
11674
11675 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11676 (build_relations): Initialize includes[i] in all cases.
11677 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11678 and rules[ruleno].precsym. Initialize members in order.
11679 * src/relation.c (relation_transpose): Always initialize new_R[i]
11680 and end_R[i].
11681 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11682
11683 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11684 conflict_list[0] was always 0, but now it isn't initialized.
11685
11686 * src/table.c (table_grow): When conflict_table grew, the grown
11687 area wasn't cleared. Fix this.
11688
11689 * lib/.cvsignore: Add strdup.c, strdup.h.
11690 * m4/.cvsignore: Add strdup.m4.
11691
11692 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11693
11694 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11695 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11696 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11697 ngotos + 1 without checking for overflow.
11698 (build_relations): Use END_NODE, not -1, to denote end of edges.
11699 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11700 build_relations): Use goto_number, not int, for goto numbers.
11701 * src/tables.c (save_column, default_goto): Likewise.
11702
11703 2004-11-23 Akim Demaille <akim@epita.fr>
11704
11705 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11706 of #defining from yystype.
11707 Don't typedef yystype, C++ does not need it.
11708 This lets it possible to forward declare it as union.
11709
11710 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11711
11712 * bootstrap (gnulib_modules): Add extensions.
11713 Problem reported by Jim Meyering.
11714
11715 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11716
11717 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11718 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11719 src/system.h, src/tables.c: XFREE -> free, to accommodate
11720 recent change to gnulib xalloc.h.
11721 Problem reported by Jim Meyering.
11722
11723 2004-11-17 Akim Demaille <akim@epita.fr>
11724
11725 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11726
11727 2004-11-17 Akim Demaille <akim@epita.fr>,
11728 Alexandre Duret-Lutz <adl@gnu.org>
11729
11730 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11731 changes.
11732 (YYCDEBUG): Adjust.
11733 Use it instead of cdebug_.
11734 (Parser::debug_stream, Parser::set_debug_stream): New.
11735 (Parser::symprint_): Define cdebug_ for temporary backward
11736 compatibility.
11737 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11738 debug_stream ().
11739
11740 2004-11-17 Akim Demaille <akim@epita.fr>
11741
11742 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11743 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11744 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11746
11747 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11748
11749 * data/glr.c (yyloc_default): Remove; not used.
11750 Problem reported by Frank Heckenbach.
11751
11752 2004-10-25 Akim Demaille <akim@epita.fr>
11753
11754 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11755 Introduce another definition to address simple location arrays.
11756 (yyGLRStack): New member: yyerror_range.
11757 (yyrecoverSyntaxError, yyparse): Update it.
11758 (yyrecoverSyntaxError): Use it when shifting the error token to
11759 have an accurate range, equivalent to the one computed by both
11760 yacc.c and lalr1.cc.
11761 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11762 that column numbers start at column 0, as per GNU Coding
11763 Standards, the others tests, and the doc.
11764 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11765 Adjust to the above change (first column is 0).
11766 And adjust the location of the "<error>", now covering the whole
11767 line.
11768
11769 2004-10-22 Akim Demaille <akim@epita.fr>
11770 and Paul Eggert <eggert@cs.ucla.edu>
11771
11772 Remove some arbitrary limits on goto numbers and relations.
11773 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11774 initial values, since they're never used.
11775 (set_goto_map): ngotos is now unsigned, so test for overflow
11776 by seeing whether it wraps around to zero.
11777 * src/lalr.h (goto_number): Now size_t, not short int.
11778 (GOTO_NUMBER_MAXIMUM): Remove.
11779 * src/relation.c (relation_print, traverse, relation_transpose):
11780 Check for END_NODE rather than looking at sign.
11781 * src/relation.h (END_NODE): New macro.
11782 (relation_node): Now size_t, not short int.
11783
11784 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11785
11786 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11787 keyword, not an identifier. Problem reported by Baron Schwartz in
11788 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11789
11790 2004-10-11 Akim Demaille <akim@epita.fr>
11791
11792 * src/symtab.c (symbol_check_alias_consistency): Also check
11793 type names, destructors, and printers.
11794 Reported by Alexandre Duret-Lutz.
11795 Recode the handling of associativity and precedence in terms
11796 of symbol_precedence_set.
11797 Accept no redeclaration at all, not even equal to the previous
11798 value.
11799 (redeclaration): New.
11800 Use it to factor redeclaration complaints.
11801 (symbol_make_alias): Don't set the type of the alias, let
11802 symbol_check_alias_consistency do it as for other features.
11803 * src/symtab.h (symbol): Add new member prec_location, and
11804 type_location.
11805 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11806 * tests/input.at (Incompatible Aliases): New.
11807
11808 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11809
11810 .cvsignore fixes to accommodate gnulib changes,
11811 and the practice of naming build directories "_build".
11812 * .cvsignore: Add "_*". Sort.
11813 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11814 * m4/.cvsignore: Add "*_gl.m4".
11815
11816 2004-10-06 Akim Demaille <akim@epita.fr>
11817
11818 * src/parse-gram.y (add_param): Fix the truncation of trailing
11819 spaces.
11820
11821 2004-10-05 Akim Demaille <akim@epita.fr>
11822
11823 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11824 whether the reducion was empty or not. This leaves room to
11825 improve the use of YYLLOC_DEFAULT in such a case.
11826 lalr1.cc is still experimental, so changing this is acceptable.
11827 And finally, there are probably not many users who changed the
11828 handling of locations in GLR, so changing is admissible too.
11829
11830 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11831 empty reduction, set @$ to an empty location ending the previously
11832 stacked symbol.
11833 Adjust uses to make sure the code is triggered on empty
11834 reductions.
11835 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11836 expected output: empty reductions have empty locations.
11837
11838 2004-09-29 Akim Demaille <akim@epita.fr>
11839
11840 * data/lalr1.cc: Move towards a more standard C++ coding style
11841 for templates: Class < T > -> Class<T>.
11842
11843 2004-09-29 Akim Demaille <akim@epita.fr>
11844
11845 * data/lalr1.cc: Reinstall the former ctor, for sake of
11846 compatibility, but warn it will be removed.
11847 Move towards a more standard C++ coding style (i.e., type *var ->
11848 type* var).
11849
11850 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11851
11852 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11853 since it's less likely to work if NULs are involved in the future.
11854
11855 2004-09-27 Akim Demaille <akim@epita.fr>
11856
11857 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11858
11859 2004-09-27 Akim Demaille <akim@epita.fr>
11860
11861 * data/lalr1.cc (b4_parse_param_decl_1): New.
11862 (b4_parse_param_decl): Use it to have different names between attribute
11863 and argument names.
11864 (b4_cc_constructor_call): Likewise.
11865
11866 2004-09-24 Akim Demaille <akim@epita.fr>
11867
11868 * src/parse-gram.y (add_param): Strip the leading and trailing
11869 blanks from a formal argument declaration.
11870 (YY_LOCATION_PRINT): New.
11871
11872 2004-09-24 Akim Demaille <akim@epita.fr>
11873
11874 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11875 after the location.
11876
11877 2004-09-24 Akim Demaille <akim@epita.fr>
11878
11879 * doc/bison.texinfo (Table of Symbols): Sort.
11880
11881 2004-09-21 Akim Demaille <akim@epita.fr>
11882
11883 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11884 the useless parentheses.
11885 Suggested by Paul Eggert.
11886
11887 2004-09-20 Akim Demaille <akim@epita.fr>
11888
11889 Let the initial-action act on the look-ahead, and use it for the
11890 "initial push" (corresponding to an hypothetical beginning-of-file).
11891 And let lalr1.cc honor %initial-action.
11892
11893 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11894 example.
11895 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11896 (Parser::Parser): Remove the ctor that used to initialize it.
11897 (Parser::parse): Like in the other skeletons, issue the "starting
11898 parse" message before any action.
11899 Honor %initial-action.
11900 Initialize the stacks with the lookahead.
11901 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11902 look-ahead.
11903 Push them in the stacks.
11904 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11905
11906 2004-09-20 Akim Demaille <akim@epita.fr>
11907
11908 * doc/bison.texinfo (Initial Action Decl): New.
11909
11910 2004-09-20 Akim Demaille <akim@epita.fr>
11911
11912 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11913 clearer criterion to define it.
11914 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11915 When reducing on an empty RHS, use the latest stacked location as
11916 location.
11917 yylloc is not always available.
11918 * data/glr.c: Likewise.
11919 Also, honor initial-actions.
11920
11921 2004-09-20 Akim Demaille <akim@epita.fr>
11922
11923 * data/yacc.c (YY_LOCATION_PRINT): New.
11924 Define when we know YYLTYPE's structure, i.e., when the default
11925 YYLLOC_DEFAULT is used.
11926 * data/c.m4 (b4_yysymprint_generate): Use it.
11927 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11928 value of the result.
11929 (error_start_): Replace with...
11930 (error_range_): this location array.
11931 This allows to replace code relying on the implementation of
11932 locations by portable code.
11933 * data/yacc.c (yylerrsp): Replace with...
11934 (yyerror_range): this.
11935 Every time a token is popped, update yyerror_range[0], to have an
11936 accurate location for the error token.
11937 * data/glr.c (YY_LOCATION_PRINT): New.
11938 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11939 deference a pointer.
11940 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11941 report the location in %printers.
11942
11943 * src/scan-skel.l: Instead of abort, report error messages to ease
11944 understanding skeleton scanning failures.
11945
11946 2004-09-16 Akim Demaille <akim@epita.fr>
11947
11948 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11949 (iterator, const_iterator): these, to be more in the C++ spirit.
11950 Also, return reverse iterators so that when displaying the stack
11951 we display its bottom first.
11952 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11953 from yacc.c.
11954 We should probably use vector here though.
11955
11956 2004-09-16 Akim Demaille <akim@epita.fr>
11957
11958 Have more complete shift traces.
11959
11960 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11961 to report Shifts instead of ad hoc YYDPRINTF invocations,
11962 including for the error token.
11963 * data/lalr1.cc (symprint_): Output the location.
11964 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11965 output the location within the %printer.
11966 Activate GLR tests, at least to make sure they compile properly.
11967 They still don't pass though.
11968 * tests/calc.at: Adjust expect verbose output, since now "Entering
11969 state..." is on a different line than the "Shifting" message.
11970
11971 2004-09-08 Akim Demaille <akim@epita.fr>
11972
11973 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11974 Bison directive from the Bison file to the invocation of this
11975 macro, so that these directives are passed to
11976 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11977 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11978 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11979 the extra Bison directives instead of the whole series.
11980 Change the grammar so that there are recoverable errors, and
11981 unrecoverable errors. Now we can have the parser give up before
11982 consuming the whole input. As a result we now can observe that
11983 the lookahead is freed when needed.
11984 Change the parser source to parse argv[1] instead of a hard coded
11985 string.
11986 Simplify yylex, and give a value and location to EOF.
11987 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11988 passed directives already coded in the file.
11989 Add some tests to check the location of "error".
11990 For some tests, the C++ parser is correct, and not yacc.c.
11991 For other tests, they provide different, but unsatisfying, values,
11992 so keep the C++ value so that at least one parser is "correct"
11993 according to the test suite.
11994 (Actions after errors): Remove, this is subsumed by the
11995 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11996
11997 2004-09-06 Akim Demaille <akim@epita.fr>
11998
11999 * data/lalr1.cc: Adjust the indentation of the labels.
12000 (Parser::pop): New.
12001 Use it.
12002
12003 2004-09-06 Akim Demaille <akim@epita.fr>
12004
12005 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12006 argument, an informative message.
12007 Call YY_SYMBOL_PRINT.
12008 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12009 * data/lalr1.cc (destruct_): Likewise.
12010 In addition, no longer depend on b4_yysymprint_generate and
12011 b4_yydestruct_generate to generate these functions, do it "by
12012 hand".
12013
12014 2004-09-03 Akim Demaille <akim@epita.fr>
12015
12016 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12017 invoked, yydestruct the lookahead.
12018 * tests/calc.at (Calculator $1): Update the expected lengths of
12019 traces: there is an added line for the discarded lookahead.
12020 * doc/bison.texinfo (Destructor Decl): Some rewording.
12021 Define "discarded" symbols.
12022
12023 2004-09-02 Akim Demaille <akim@epita.fr>
12024
12025 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12026
12027 2004-09-02 Akim Demaille <akim@epita.fr>
12028
12029 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12030 (YYDSYMPRINTF): Rename as...
12031 (YY_SYMBOL_PRINT): this.
12032 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12033 two.
12034 Use it instead of direct symprint_ calls.
12035 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12036 one.
12037
12038 2004-09-02 Akim Demaille <akim@epita.fr>
12039
12040 * data/lalr1.cc (b4_yysymprint_generate): New.
12041 (symprint_): New member function, defined when YYDEBUG.
12042 Use it consistently instead of token/nterm debugging output by
12043 hand.
12044 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12045 %printer calls to use cdebug_ when using lalr1.cc.
12046
12047 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12048
12049 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12050 with #ifdef YYDEBUG.
12051
12052 2004-08-26 Akim Demaille <akim@epita.fr>
12053
12054 * doc/bison.texinfo (Implementing Loops): Rename as...
12055 (Implementing Gotos/Loops): this.
12056
12057 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12058
12059 Adjust to latest gnulib.
12060 * bootstrap (gnulib_modules): Add xalloc-die.
12061 Set LC_ALL=C so that file names sort consistently.
12062 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12063 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12064 uintmax_t.m4, ulonglong.m4.
12065 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12066 po.m4 since we are now using _gl.m4 instead.
12067
12068 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12069
12070 * src/scan-action.l: Remove. Scanning of semantic actions is
12071 handled in scan-gram.l.
12072
12073 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12074
12075 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12076
12077 * src/location.h (struct): The file member is a uniqstr.
12078 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12079
12080 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12081
12082 Fix bug with non-%union parsers that have printers or destructors,
12083 which led to a Bison core dump. Reported by Peter Fales in
12084 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12085
12086 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12087 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12088 not to our own type.
12089 * src/output.c (symbol_destructors_output, symbol_printers_output):
12090 Don't assume %union.
12091 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12092 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12093 UNION-FLAG. All callers changed.
12094 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12095 Use type char, not unsigned int, when declaring an array of char;
12096 this lets us remove a cast.
12097 (Printers and Destructors): Add non-%union test cases.
12098
12099 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12100
12101 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12102 GLR writeups. E.g., avoid frenchspacing and the future tense,
12103 change "lookahead" to "look-ahead", and change "wrt" to "with
12104 respect to".
12105
12106 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12107
12108 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12109 New sections, split off from the GLR Parsers section. Put the new
12110 Simple GLR Parser near the start of the GLR section, for clarity.
12111 Rewrite connective text.
12112
12113 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12114
12115 * doc/bison.texinfo (Simple GLR Parsers): New section.
12116
12117 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12118
12119 * NEWS, TODO, doc/bison.texinfo:
12120 Use "look-ahead" instead of "lookahead", to be consistent.
12121 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12122 while we're fixing "look-ahead".
12123 * src/conflicts.c (shift_set): Renamed from shiftset.
12124 (look_ahead_set): Renamed from lookaheadset.
12125 * src/print.c: Likewise.
12126 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12127 name for "lookahead".
12128 (report_types, usage): Likewise.
12129 * src/getargs.h (report_look_ahead_tokens): Renamed from
12130 report_lookaheads.
12131 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12132 compute_lookaheads.
12133 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12134 (look_ahead_tokens_print): Renamed from lookaheads_print.
12135 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12136 state_rule_lookaheads_print.
12137 * src/state.h: Likewise.
12138 (reductions.look_ahead_tokens): Renamed from lookaheads.
12139 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12140 AT_DATA_LOOKAHEADS_GRAMMAR.
12141
12142 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12143
12144 * README: Update location of patched M4 distribution.
12145
12146 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12147
12148 Don't assume the C++ compiler takes the same arguments as the C compiler
12149 (trivial change).
12150 * configure.ac (O0CXXFLAGS): New var.
12151 * tests/atlocal.in (CXXFLAGS): Use it.
12152
12153 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12154
12155 Fix some "make check" problems with C++ reported by
12156 Albert Chin-A-Young for Tru64 C++ in this thread:
12157 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12158
12159 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12160 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12161 Output to a .cc file for C++, not to a .c file.
12162 * tests/calc.at (AT_CHECK_CALC): Likewise.
12163 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12164 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12165
12166 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12167
12168 * tests/calc.at, tests/actions.at: Workaround for SGI
12169 C++ compiler. (trivial change)
12170
12171 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12172
12173 Spent a few hours checking out which prerequisite versions the
12174 current sources actually require. I went all the way back to
12175 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12176 a seemingly endless set of combinations of versions more recent
12177 than that. The bottom line is that the current sources require
12178 fairly recent versions of the build tools, and it'll be some work
12179 to change this.
12180 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12181 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12182 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12183 Add comments explaining why those particular versions are
12184 currently needed.
12185
12186 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12187 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12188 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12189
12190 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12191 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12192
12193 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12194
12195 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12196 0.11.5. Suggested by Bruno Haible.
12197 * bootstrap: Remove gettext version checking.
12198
12199 * doc/bison.texinfo (Decl Summary): Also mention that %union
12200 can depend on prerequisite types. Problem reported by Tim
12201 Van Holder.
12202
12203 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12204
12205 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12206 * README-alpha: Don't tell people not to package this.
12207
12208 * bootstrap: Don't assume $(...) works; use `...` instead.
12209 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12210 gettext better.
12211
12212 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12213 put into the -d output file, and mention what to do if YYSTYPE is
12214 defined as a macro.
12215
12216 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12217
12218 Undo change made earlier today: it caused autopoint to not bring
12219 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12220 autopoint's.
12221
12222 * bootstrap: Check that gettext version matches what's in
12223 configure.ac. Warn users to ignore robots.txt ERROR 404.
12224 * bootstrap: Undo today's earlier change (logged below).
12225 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12226
12227 The gettext version checking is causing more trouble than it's
12228 curing; remove it. Problem reported by Paul Hilfinger.
12229
12230 * bootstrap: Issue a warning that one can expect a message
12231 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12232 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12233
12234 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12235
12236 Ensure that the C++ compiler used for testing actually works on a
12237 simple test program; if not, skip the C++-related tests. Problem
12238 reported by Vin Shelton in:
12239 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12240
12241 * m4/cxx.m4: New file.
12242 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12243 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12244 * tests/local.at (AT_COMPILE_CXX): Use it.
12245
12246 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12247
12248 * data/glr.c (yylloc): Output this macro even if locations are not
12249 being generated, as the GLR parser needs it even in that case.
12250 Problem reported by Troy A. Johnson
12251 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12252
12253 * configure.ac (AC_INIT): Update to 1.875e.
12254
12255 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12256
12257 * NEWS: Version 1.875d.
12258 * configure.ac (AC_INIT): Likewise.
12259 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12260
12261 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12262 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12263 lalr1.cc runs afoul of the first, and the last two are no longer
12264 supported by GCC 3.4.0.
12265 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12266 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12267
12268 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12269
12270 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12271 unsigned int, for compatibility with latest gnulib hash module.
12272 * src/state.c (state_hash, state_hasher): Likewise.
12273 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12274 * src/uniqstr.c (hash_uniqstr): Likewise.
12275
12276 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12277
12278 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12279
12280 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12281 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12282 character and string literals.
12283 (unexpected_end): New function.
12284 (unexpected_eof): Use it.
12285 (unexpected_newline): New function.
12286 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12287 actions.
12288
12289 * NEWS: Document %expect-rr.
12290
12291 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12292 Fix typo by replacing $1 with $option.
12293 Remove more 'intl'-related files.
12294 Don't DEFUN AM_INTL_SUBDIR twice.
12295
12296 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12297 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12298 strtoul.c.
12299 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12300 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12301 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12302 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12303 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12304 * src/.cvsignore: Add *.output.
12305
12306 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12307 gets copied to the output file.
12308
12309 2004-04-28 Paul Eggert <eggert@twinsun.com>
12310
12311 Get files from the gnulib and po repositories, instead of relying
12312 on them being in our CVS. Upgrade to latest versions of gnulib
12313 and Automake.
12314
12315 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12316 * bootstrap: Bootstrap from gnulib and po repositories.
12317 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12318 * README-cvs: Document these changes. Remove version numbers from
12319 mentions of build tools, since they change so often. Mention Flex.
12320
12321 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12322 (gl_USE_SYSTEM_EXTENSIONS): Add.
12323 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12324 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12325 does this for us.
12326 (AC_ISC_POSIX): Remove; we no longer support this
12327 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12328 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12329 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12330 Do not check for C89 headers, except for locale.h which is used
12331 by the Yacc library and must port to K&R hosts.
12332 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12333 Do not check for C89 functions, except for setlocale which is
12334 used by the Yacc library.
12335 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12336 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12337 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12338 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12339 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12340 AM_GNU_GETTEXT): Remove; now done by:
12341 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12342 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12343 for us.
12344
12345 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12346 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12347 Define to empty, as gnulib.mk will do the rest for us.
12348 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12349 for us.
12350 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12351 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12352
12353 * src/files.c: Include gnulib's xstrndup.h.
12354
12355 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12356 (REALLOC): Use xnrealloc, for likewise.
12357 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12358 (strnlen, memrchr): Remove decls; functions no longer used.
12359 Include <stpcpy.h>.
12360
12361 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12362 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12363 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12364 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12365 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12366 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12367 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12368 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12369 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12370 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12371 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12372 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12373 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12374 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12375 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12376 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12377 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12378 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12379 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12380 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12381 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12382 Remove, as these files are now generated automatically
12383 by bootstrap or automake.
12384
12385 * po/ChangeLog: Remove: all but one entry was a duplicate
12386 of this file, and I moved that 2000-11-02 entry here.
12387
12388 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12389 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12390 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12391 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12392 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12393 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12394 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12395 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12396 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12397 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12398 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12399 xstrndup.h.
12400 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12401 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12402 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12403 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12404 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12405 * src/.cvsignore: Remove *_.c.
12406
12407
12408 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12409 support it. (The latest stable gzip doesn't.)
12410
12411 2004-04-27 Paul Eggert <eggert@twinsun.com>
12412
12413 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12414 case, as stos_ is now used by destructors due to the 2004-02-09
12415 change.
12416
12417 Remove more K&R C support.
12418 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12419 * lib/subpipe.c (errno): Remove decl.
12420 Include <stdlib.h> unconditionally.
12421 (EXIT_FAILURE): Remove macro.
12422 * src/complain.c (vfprintf, strerror): Remove.
12423 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12424 unconditionally.
12425 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12426 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12427 (strchr, strspn, memchr): Remove decls.
12428 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12429 unconditionally. Do not declare perror.
12430 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12431 unconditionally.
12432
12433 * src/complain.c (_): Remove useless defn, as system.h defines this.
12434
12435 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12436 with latest obstack.h.
12437 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12438 to procedure types, as obstack.h now does that for us.
12439 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12440
12441 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12442 so that this include file can stand alone.
12443 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12444 does this now. Include subpipe.h first after config.h, to
12445 test whether it can stand alone.
12446
12447 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12448 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12449 unused declaration.
12450
12451 * tests/synclines.at (%union synch line): Put a dummy member in
12452 the union, because empty unions aren't allowed in C. Caught
12453 by GCC 3.4.0.
12454
12455 2004-04-13 Jim Meyering <jim@meyering.net>
12456
12457 * src/conflicts.c (conflicts_print): Correct format string typo:
12458 use `%%' to produce literal `%'. (trivial change)
12459
12460 2004-03-30 Paul Eggert <eggert@twinsun.com>
12461
12462 * src/getargs.c (version): Update copyright year to 2004.
12463
12464 * data/c.m4 (b4_int_type): Use 'short int' rather than
12465 'short', and similarly for 'long', 'unsigned', etc.
12466 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12467 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12468 yy_yypstack, yydumpstack): Likewise.
12469 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12470 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12471 Likewise.
12472 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12473 yy_stack_print, yyparse): Likewise.
12474 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12475 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12476 * lib/bitset.c (bitset_print): Likewise.
12477 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12478 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12479 * lib/bitsetv.c (bitsetv_dump): Likewise.
12480 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12481 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12482 Likewise.
12483 * src/LR0.c (allocate_itemsets): Likewise.
12484 * src/gram.h (rule_number, rule): Likewise.
12485 * src/lalr.h (goto_number): Likewise.
12486 * src/nullable.c (nullable_compute): Likewise.
12487 * src/output.c (prepare_rules): Likewise.
12488 * src/relation.c (relation_print, relation_digraph): Likewise.
12489 * src/relation.h (relation_node): Likewise.
12490 * src/state.h (state_number, transitions, errs, reductions,
12491 struct state): Likewise.
12492 * src/symtab.h (symbol_number, struct symbol): Likewise.
12493 * src/tables.c (vector_number, tally, action_number,
12494 default_goto, goto_actions): Likewise.
12495 * tests/existing.at (GNU Cim Grammar): Likewise.
12496 * tests/regression.at (Web2c Actions): Likewise.
12497
12498 * src/output.c (muscle_insert_short_int_table): Renamed from
12499 muscle_insert_short_table. All uses changed.
12500
12501 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12502
12503 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12504 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12505 Add %expect-rr rule.
12506
12507 * src/scan-gram.l: Recognize %expect-rr.
12508
12509 * src/conflicts.h (expected_sr_conflicts): Rename from
12510 expected_conflicts.
12511 (expected_rr_conflicts): Declare.
12512
12513 * src/conflicts.c (expected_sr_conflicts): Rename from
12514 expected_conflicts.
12515 (expected_rr_conflicts): Define.
12516 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12517 for GLR parsers.
12518 Use expected_sr_conflicts in place of expected_conflicts.
12519 Warn if expected_rr_conflicts used in non-GLR parser.
12520
12521 * doc/bison.texinfo: Add documentation for %expect-rr.
12522
12523 2004-03-08 Paul Eggert <eggert@gnu.org>
12524
12525 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12526 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12527
12528 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12529 in lalr1.cc.
12530 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12531 * src/scan-gram.l (scan_integer): New function.
12532 ({int}): Use it.
12533 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12534 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12535 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12536 Say "long int", not "long", for uniformity with GNU style.
12537
12538 2004-02-25 Paul Eggert <eggert@twinsun.com>
12539
12540 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12541 compilers. This fixes a problem with Intel's C++ compiler being
12542 chatty, reported by Guido Trentalancia in
12543 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12544
12545 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12546
12547 Support %destructor and merge error locations in lalr1.cc.
12548
12549 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12550 (Parser::stos_): Define unconditionally.
12551 (Parser::destruct_): New method. Generate its body with
12552 b4_yydestruct_generate.
12553 (Parser::error_start_): New attribute.
12554 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12555 token which are discarded.
12556 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12557 error_start_ when erroneous token are discarded.
12558 (Parser::parse) <yyerrlab1>: Compute the location of the error
12559 token so that it covers all the discarded tokens.
12560 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12561 it can be called with `%skeleton "lalr1.cc"', and do that.
12562
12563 2004-02-02 Paul Eggert <eggert@twinsun.com>
12564
12565 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12566 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12567 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12568 There's no need to mention top_builddir since Automake does that
12569 for us.
12570 (INCLUDES): Remove, as Automake says it's obsolescent.
12571 Contents migrated into AM_CPPFLAGS as described above.
12572 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12573
12574 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12575
12576 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12577 (yyreportSyntaxError): Handle case where lookahead token is
12578 YYEMPTY.
12579
12580 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12581
12582 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12583 resulting parsers are compilable with C++.
12584
12585 2003-12-23 Paul Eggert <eggert@twinsun.com>
12586
12587 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12588 * src/output.c (output_skeleton): Rename local var.
12589 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12590 Bison tokens, as this runs afoul of the 2003-10-07 change that
12591 disallowed NUL bytes in character constants or string literals.
12592
12593 * tests/local.at: Require Autoconf 2.59's Autotest.
12594 * tests/testsuite.at: Don't include local.at, since we now assume
12595 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12596 including it.
12597 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12598 multiple inclusion warnings.
12599
12600 2003-12-02 Akim Demaille <akim@epita.fr>
12601
12602 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12603 conditions.
12604 From Bruno Haible.
12605
12606 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12607
12608 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12609
12610 2003-10-07 Paul Eggert <eggert@twinsun.com>
12611
12612 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12613 if testsuite doesn't exist.
12614
12615 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12616 literals, unfortunately.
12617 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12618 Complain about NUL bytes in character constants or string literals.
12619
12620 2003-10-05 Paul Eggert <eggert@twinsun.com>
12621
12622 * NEWS: Don't document %no-default-prec, as it's still
12623 too experimental.
12624 * doc/bison.texinfo: Document %no-default-prec only if
12625 the defaultprec flag is set. Normally it's not.
12626
12627 2003-10-04 Paul Eggert <eggert@twinsun.com>
12628
12629 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12630 non-modifiable lvalue, instead of a modifiable one.
12631 * doc/bison.texinfo (Actions): Document that $$ can
12632 be assigned to. Do not claim that $$ and $N are
12633 array element references: user code should not rely on this.
12634
12635 2003-10-01 Paul Eggert <eggert@twinsun.com>
12636
12637 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12638 (grammar_declaration): Use it.
12639 * src/scan-gram.l: New token %no-default-prec.
12640 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12641 * NEWS, doc/bison.texinfo: Document the above.
12642
12643 2003-10-01 Akim Demaille <akim@epita.fr>
12644
12645 VCG no longer supports long_straight_phase.
12646
12647 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12648 * src/print_graph.c (print_graph): Adjust.
12649
12650 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12651 and Paul Eggert <eggert@twinsun.com>
12652
12653 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12654 Table of Symbols): Document %default-prec.
12655 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12656 (grammar_declaration): Set default_prec on %default-prec.
12657 * src/scan-gram.l (%default-prec): New token.
12658 * src/reader.h (default_prec): New flag.
12659 * src/reader.c: Likewise.
12660 (packgram): Handle it.
12661 * tests/conflicts.at (%default-prec without %prec,
12662 %default-prec with %prec, %default-prec 1): New tests.
12663
12664 2003-09-30 Paul Eggert <eggert@twinsun.com>
12665
12666 * tests/testsuite.at: Include local.at, not input.at, fixing
12667 a typo in the 2003-08-25 patch.
12668
12669 2003-08-27 Akim Demaille <akim@epita.fr>
12670
12671 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12672 GCC warnings.
12673
12674 2003-08-26 Akim Demaille <akim@epita.fr>
12675
12676 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12677 "<\#" to avoid magic from Gnus when posting parts of this script.
12678
12679 2003-08-26 Akim Demaille <akim@epita.fr>
12680
12681 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12682 (Parser::parse): here.
12683 Adjust: nerrs and errstatus is now replaced by...
12684 (Parser::nerrs_, Parser::errstatus_): New.
12685
12686 2003-08-25 Akim Demaille <akim@epita.fr>
12687
12688 * config/announce-gen, Makefile.cfg: New.
12689 * Makefile.am: Adjust.
12690 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12691 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12692
12693 2003-08-25 Akim Demaille <akim@epita.fr>
12694
12695 When reducing initial empty rules, Bison parser read an initial
12696 location that is not defined. This results in garbage, and that
12697 affects Bison's own parser. Therefore we need (i) to extend Bison
12698 to support a means to initialize this location, and (ii) to use
12699 this CVS Bison to fix CVS Bison's parser.
12700
12701 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12702 with...
12703 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12704 * src/parse-gram.y: Adjust.
12705 (%initial-action): New.
12706 (%error-verbose): Since we require CVS Bison, there is no reason
12707 not to use it.
12708 * src/scan-gram.l: Adjust.
12709 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12710 * data/yacc.c (yyparse): Use b4_initial_action.
12711
12712 2003-08-25 Akim Demaille <akim@epita.fr>
12713
12714 * doc/bison.texinfo: Don't promote stdout for error messages.
12715
12716 2003-08-25 Akim Demaille <akim@epita.fr>
12717
12718 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12719 From Alexandre Duret-Lutz.
12720
12721 2003-08-25 Akim Demaille <akim@epita.fr>
12722
12723 Version 1.875c.
12724
12725 2003-08-25 Akim Demaille <akim@epita.fr>
12726
12727 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12728 Use them.
12729
12730 2003-08-25 Akim Demaille <akim@epita.fr>
12731
12732 * data/lalr1.cc (Parser::reduce_print_): New.
12733 Use it.
12734
12735 2003-08-25 Akim Demaille <akim@epita.fr>
12736
12737 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12738 error recovery loops. This patch is based on
12739 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12740 Also, augment the similarity between lalr1.cc and yacc.c.
12741 Note: the locations of error recovery rules are not correct yet.
12742
12743 * data/lalr1.cc: Comment changes to augment the similarity between
12744 lalr1.cc and yacc.c.
12745 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12746 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12747 yyerrlab), when hitting EOF, pop the whole stack here instead of
12748 merely falling thru the default error handling mechanism.
12749 (yyerrorlab): New label, with the old contents of YYERROR,
12750 plus the following change: pop the stack of rhs corresponding
12751 to the production that invoked YYERROR. That is how Yacc
12752 behaves (required by POSIX).
12753 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12754 fail.
12755
12756 2003-08-25 Akim Demaille <akim@epita.fr>
12757
12758 Tune local.at so that people can "autom4te -l autotest calc.at -o
12759 calc" for instance, to extract a sub test suite.
12760
12761 * tests/testsuite.at: Move the initialization, Autotest version
12762 requirement, and AT_TESTED invocation into...
12763 * tests/local.at: here.
12764 * tests/testsuite.at: Include it for compatibility with Autoconf
12765 2.57.
12766 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12767 be ignore.
12768
12769 2003-08-04 Paul Eggert <eggert@twinsun.com>
12770
12771 Rework code slightly to avoid gcc -Wtraditional warnings.
12772 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12773 The returned value is now stored in *YY0. All callers changed.
12774 * src/output.c (merge_output): Adjust to the above change.
12775
12776 2003-07-26 Paul Eggert <eggert@twinsun.com>
12777
12778 * data/glr.c (YYASSERT): New macro.
12779 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12780 yyresolveStates, yyprocessOneStack):
12781 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12782 Derived from a suggestion by Frank Heckenbach.
12783
12784 2003-07-25 Paul Eggert <eggert@twinsun.com>
12785
12786 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12787 for portability to K&R C (after ansi2knr, presumably). See
12788 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12789 by Frank Heckenbach, though I have omitted the structure-initialization
12790 part of his glr-knr.diff patch since I recall that the Portable
12791 C Compiler didn't require that change.
12792
12793 Let the user specify how to allocate and free memory.
12794 Derived from a suggestion by Frank Heckenbach in
12795 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12796 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12797 All uses of free, malloc, realloc changed to use these macros,
12798 and unnecessary casts removed.
12799 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12800
12801 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12802
12803 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12804 use s.empty() rather than s == "" to test for empty string; see
12805 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12806 (trivial change)
12807
12808 2003-06-25 Akim Demaille <akim@epita.fr>
12809
12810 * config/depcomp, config/install-sh: Update from masters.
12811
12812 2003-06-20 Paul Eggert <eggert@twinsun.com>
12813
12814 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12815 and return properly parenthesized result.
12816 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12817 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12818 Remove unnecessary parentheses from uses.
12819 * doc/bison.texinfo (Location Default Action): Describe the
12820 conventions for parentheses.
12821
12822 2003-06-19 Paul Eggert <eggert@twinsun.com>
12823
12824 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12825 yyreportTree): Do not assume that size_t is the same width as int,
12826 when printing sizes. Print sizes using an unsigned format.
12827 Problem reported by Frank Heckenbach in
12828 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12829
12830 Port to Forte Developer 7 C compiler.
12831 * data/glr.c (struct YYLTYPE): If locations are not being used,
12832 declare a single dummy member, as empty structs do not conform
12833 to the C standard.
12834 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12835 the Forte Developer 7 C compiler complains that end-of-loop
12836 code is not reached.
12837
12838 2003-06-17 Paul Eggert <eggert@twinsun.com>
12839
12840 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12841 avoid warnings from picky compilers about redefinition of PARAMS.
12842
12843 2003-06-17 Paul Eggert <eggert@twinsun.com>
12844
12845 Version 1.875b.
12846
12847 * NEWS: Document 1.875b.
12848
12849 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12850 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12851 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12852 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12853 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12854 per recent gettext manual's suggestion.
12855 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12856 Use prototypes, not old-style definitions.
12857 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12858 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12859 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12860 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12861 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12862 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12863 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12864 vbitset_or_and_cmp, vbitset_copy): Likewise.
12865
12866 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12867 Do not include <stdlib.h>.
12868 (PARAMS): Define unconditionally for C89.
12869 (ATTRIBUTE_NORETURN): Remove.
12870 (ATTRIBUTE_UNUSED): Define unconditionally.
12871
12872 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12873 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12874 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12875 * lib/vbitset.c, lib/vbitset.h: New files.
12876 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12877 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12878 from libbitset.
12879
12880 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12881 `How Can I Reset @code{yyparse}', since texinfo does not allow
12882 arbitrary @ in node names.
12883
12884 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12885 shouldn't be needed according to the gettext 0.12.1 documentation
12886 but which seem to be needed anyway: codeset.m4 glibc21.m4
12887 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12888 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12889 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12890
12891 * lib/.cvsignore: Add stdbool.h.
12892 * m4/.cvsignore: Add nls.m4, po.m4.
12893
12894 Upgrade to CVS gnulib.
12895 * stdbool_.h: File renamed from stdbool.h.in.
12896 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12897 AC_HEADER_STDBOOL.
12898 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12899 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12900 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12901 (MOSTLYCLEANFILES): New var.
12902 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12903 (stdbool.h): New rule.
12904 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12905 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12906 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12907 m4/quote.m4: Upgrade to today's gnulib.
12908
12909 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12910 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12911 the tests right now.
12912 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12913 yyerror are declared before use; C99 requires this.
12914
12915 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12916
12917 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12918 first.
12919 (yyrecoverSyntaxError): Correct the logic for setting and testing
12920 yyerrState.
12921 Correct comment on handling EOF.
12922 Allow states with only a default reduction, rather than failing
12923 (I can't quite reconstruct why these were not allowed before).
12924
12925 Fixes to avoid problem that $-N rules in GLR parsers can cause
12926 buffer overruns, corrupting state.
12927
12928 * src/output.c (prepare_rules): Output max_left_semantic_context
12929 definition.
12930 * src/reader.h (max_left_semantic_context): New variable declaration.
12931 * src/scan-gram.l (max_left_semantic_context): Define.
12932 (handle_action_dollar): Update max_left_semantic_context.
12933 * data/glr.c (YYMAXLEFT): New definition.
12934 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12935 (yyresolveAction): Ditto.
12936
12937 Fixes to problems with location handling in GLR parsers reported by
12938 Frank Heckenbach (2003/06/05).
12939
12940 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12941 (YYRHSLOC): Add parentheses, and define only if locations used.
12942 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12943 locations not used.
12944 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12945 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12946
12947 * tests/cxx-type.at: Exercise location information; update tests
12948 to differentiate output with and without locations.
12949 Remove forward declarations of yylex and yyerror---caused errors
12950 because default YYLTYPE not yet defined.
12951 Change semantic actions to compute strings, rather than printing
12952 them directly (to test proper passing of semantics values). Change
12953 output to prefix notation and update test data and expected results.
12954 (yylex): Track locations.
12955 (stmtMerge): Return value rather than printing, and include arguments
12956 in value.
12957
12958 2003-06-03 Paul Eggert <eggert@twinsun.com>
12959
12960 Avoid warnings generated by GCC 2.95.4 when Bison is
12961 configured with --enable-gcc-warnings.
12962 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12963 yy::]b4_parser_class_name[::translate_,
12964 yy::Stack::operator[] (unsigned),
12965 yy::Stack::operator[] (unsigned) const,
12966 yy::Slice::operator[] (unsigned),
12967 yy::Slice::operator[] (unsigned) const):
12968 Rename local vars to avoid warnings.
12969 * tests/glr-regression.at (Improper handling of embedded actions
12970 and $-N in GLR parsers): Remove unused local variable from yylex.
12971 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12972 (void) as arg when not pure, since we now assume C89 when building
12973 Bison. Pacify GCC by using parameter.
12974
12975 2003-06-02 Paul Eggert <eggert@twinsun.com>
12976
12977 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12978 yy::Location::lines, yy::Location::columns): Rename arguments
12979 to avoid shadowing; this removes a warning generated by GCC 3.3.
12980
12981 2003-06-01 Paul Eggert <eggert@twinsun.com>
12982
12983 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12984 to g++, as GCC 3.3 complains if you do it.
12985 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12986 everything that WARNING_CFLAGS has, except omit warnings
12987 not suitable for C++.
12988 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12989 * tests/atlocal.in (CXXFLAGS): New var.
12990 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12991
12992 Fix a GLR parser bug I reported in February; see
12993 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12994 The problem was that GLR parsers did not conform to the C standard,
12995 because actions like { $1 = $2 + $3; } expanded to expressions
12996 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12997 to a local variable. The C standard says that expressions
12998 like (var = f ()) + (var = f ()) have undefined behavior.
12999 Another problem was that GCC sometimes issues warnings that
13000 yyfill and its parameters are unused.
13001
13002 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13003 as possibly unused.
13004 (yyfill): New function.
13005 (YYFILL): Use it.
13006 (yyuserAction): Change type of yynormal to bool, so that it matches
13007 the new yyfill signature. Mark it as possibly unused.
13008
13009
13010 Follow up on a bug I reported in February, where a Bison-generated
13011 parser can loop. Provide a test case and a fix for yacc.c. I
13012 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13013 The original bug report is in:
13014 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13015
13016 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13017 macro's size was becoming unwieldy.
13018 (yyerrlab): Do not discard an empty lookahead symbol, as this
13019 might destroy garbage.
13020 (yyerrorlab): New label, with the old contents of YYERROR,
13021 plus the following change: pop the stack of rhs corresponding
13022 to the production that invoked YYERROR. That is how Yacc
13023 behaves, and POSIX requires this behavior.
13024 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13025 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13026 Define 'alarm' to do nothing if unistd.h is not available.
13027 Add a new rule "exp: '-' error;" to test the above change to
13028 data/yacc.c. Use 'alarm' to abort any test taking longer than
13029 10 seconds, as it's probably looping.
13030 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13031 Also, the new yacc.c generates two fewer diagnostics for an
13032 existing test.
13033
13034 2003-05-24 Paul Eggert <eggert@twinsun.com>
13035
13036 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13037 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13038 This fixes a problem reported by John Bowman when the Compaq/HP
13039 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13040 -ansi -Wall -gall).
13041 * data/yacc.c (union yyalloc): Likewise.
13042 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13043
13044 Switch from 'int' to 'bool' where that makes sense.
13045
13046 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13047 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13048 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13049 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13050 Return or accept bool, not int. All callers changed.
13051 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13052 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13053 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13054 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13055 bitset_or_and_cmp_): Likewise.
13056 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13057 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13058 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13059 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13060 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13061 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13062 bitset_stats_or_and_cmp): Likewise.
13063 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13064 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13065 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13066 ebitset_xor_cmp): Likewise.
13067 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13068 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13069 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13070 lbitset_xor_cmp): Likewise.
13071 * lib/bbitset.h: Include <stdbool.h>.
13072 (struct bitset_vtable): The following members now return bool, not
13073 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13074 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13075 or_and_cmp).
13076 * src/conflicts.c (count_rr_conflicts): Likewise.
13077 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13078 All uses changed.
13079 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13080 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13081 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13082 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13083 graph_flag): Likewise.
13084 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13085 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13086 graph_flag): Likewise.
13087 * src/output.c (error_verbose): Likewise.
13088 * src/output.h (error_verbose): Likewise.
13089 * src/reader.c (start_flag, typed): Likewise.
13090 * src/reader.h (typed): Likewise.
13091 * src/getargs.c (LOCATIONS_OPTION): New constant.
13092 (long_options, getargs): Use it.
13093 * src/lalr.c (build_relations): Use bool, not int.
13094 * src/nullable.c (nullable_compute): Likewise.
13095 * src/print.c (print_reductions): Likewise.
13096 * src/tables.c (action_row, pack_vector): Likewise.
13097 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13098 * src/output.c (prepare): Use it.
13099 * src/output.c (token_definitions_output,
13100 symbol_destructors_output, symbol_destructors_output): Use string,
13101 not boolean integer, to keep track of whether to output separator.
13102 * src/print_graph.c (print_core): Likewise.
13103 * src/state.c (state_rule_lookaheads_print): Likewise.
13104
13105 * config/install-sh: Sync from automake 1.7.5.
13106
13107 2003-05-14 Paul Eggert <eggert@twinsun.com>
13108
13109 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13110 semicolon after a grammar declaration, in the interest of possible
13111 future changes to the Bison input language.
13112 Do not allow a stray semicolon at the start of the grammar.
13113 (rhses.1): Allow one or more semicolons after any rule, including
13114 just before "|" as required by POSIX.
13115 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13116 grammar.
13117
13118 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13119
13120 %parse-param support for lalr1.cc.
13121
13122 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13123 b4_cc_constructor_calls, b4_cc_constructor_call,
13124 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13125 definitions.
13126 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13127 parse-param arguments.
13128 (yy::b4_parser_class_name): Declare instance variables to
13129 hold parse-param arguments.
13130 * tests/calc.at: s/value/semantic_value/ because value clashes
13131 with a member of yy::b4_parser_class_name. Adjust C++ code
13132 to handle %parse-param. Enable %parse-param test in C++.
13133
13134 2003-05-12 Paul Eggert <eggert@twinsun.com>
13135
13136 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13137 English a bit. Fix fclose typo. Change "const char" to "char
13138 const", and use ANSI C rather than K&R for "main". Suggest
13139 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13140 and suggest yy_switch_to_buffer.
13141
13142 2003-05-05 Paul Eggert <eggert@twinsun.com>
13143
13144 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13145 C89. This avoids a diagnostic on compilers that define __STDC__
13146 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13147 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13148
13149 2003-05-03 Paul Eggert <eggert@twinsun.com>
13150
13151 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13152 Do not overrun array bounds.
13153 This should fix a bug reported today by Olatunji Oluwabukunmi in
13154 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13155
13156 2003-04-29 Akim Demaille <akim@epita.fr>
13157
13158 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13159 * src/getargs.c, src/getargs.h: here, as bool, not int.
13160 (nondeterministic_parser): New.
13161 * src/parse-gram.y, src/scan-gram.l: Support
13162 %nondeterministic-parser.
13163 * src/output.c (prepare): Use nondeterministic_parser instead
13164 of glr_parser where appropriate.
13165 * src/tables.c (conflict_row, action_row, save_row)
13166 (token_actions, token_actions, pack_vector): Ditto.
13167
13168 2003-04-29 Akim Demaille <akim@epita.fr>
13169
13170 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13171
13172 2003-04-29 Akim Demaille <akim@epita.fr>
13173
13174 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13175 with %pure-parser and %locations to exercise the patch from Yakov
13176 Markovitch below.
13177
13178 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13179
13180 * data/yacc.c: (b4_lex_param): Corrected for the case where
13181 %lex-param is provided and %pure-parser isn't.
13182
13183 2003-04-27 Paul Eggert <eggert@twinsun.com>
13184
13185 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13186 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13187 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13188 if it is not defined.
13189 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13190
13191 2003-04-26 Paul Eggert <eggert@twinsun.com>
13192
13193 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13194 Declare to be of type suitable for the ninf value itself, not of
13195 type suitable for the corresponding table, since the latter might
13196 be unsigned but the ninf value might be negative. This fixes a
13197 bug reported by Alexandre Duret-Lutz in
13198 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13199
13200 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13201 invokes it. We shouldn't invoke it twice because it will attempt
13202 to put error.o in the archive twice. This fixes a glitch reported
13203 by Martin Mokrejs in
13204 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13205
13206 2003-04-21 Paul Eggert <eggert@twinsun.com>
13207
13208 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13209 to gnulib.
13210
13211 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13212
13213 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13214 Fix obvious typo that results in uncompilable GLR parsers
13215 when both %pure-parser and %locations are used. (trivial change)
13216
13217 2003-04-17 Paul Eggert <eggert@twinsun.com>
13218
13219 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13220 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13221 Do not insert the expected token via unput, as this runs afoul
13222 of a POSIX-compatibility bug in flex 2.5.31.
13223 All uses changed to BEGIN the parent state,
13224 since we no longer insert the expected token via unput.
13225 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13226 that is no longer emitted after the above change.
13227
13228 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13229 the first one. This change is from Paul Hilfinger, and it fixes
13230 regression reported by Werner Lemberg in
13231 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13232
13233 (resolve_sr_conflict): Don't invoke state_errs_set
13234 unless one or more tokens have been explicitly made errors.
13235 Otherwise, the above change causes Bison to abort.
13236
13237 * tests/existing.at (GNU pic Grammar): New test case, taken from
13238 Lemberg's email.
13239
13240 2003-03-31 Akim Demaille <akim@epita.fr>
13241
13242 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13243
13244 2003-03-31 Akim Demaille <akim@epita.fr>
13245
13246 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13247 output.
13248
13249 2003-03-31 Akim Demaille <akim@epita.fr>
13250
13251 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13252 From Paul Hilfinger.
13253
13254 2003-03-29 Akim Demaille <akim@epita.fr>
13255
13256 * m4/error.m4: Do not put under dynamic conditions some code which
13257 expansion is under static control.
13258
13259 2003-03-29 Akim Demaille <akim@epita.fr>
13260
13261 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13262
13263 2003-03-29 Akim Demaille <akim@epita.fr>
13264
13265 * doc/bison.texinfo (Strings are Destroyed): New.
13266
13267 2003-03-13 Paul Eggert <eggert@twinsun.com>
13268
13269 * .cvsignore: Add configure.lineno.
13270 * src/.cvsignore: Add yacc.
13271 * tests/.cvsignore: Add testsuite.log.
13272 * doc/fdl.texi: Sync with latest FSF version.
13273
13274 2003-03-12 Paul Eggert <eggert@twinsun.com>
13275
13276 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13277 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13278 cursor, instead of leaving it undefined. This fixes a bug
13279 reported by Tim Van Holder in
13280 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13281 * tests/input.at (Torturing the Scanner): Test the scanner on
13282 an empty input file, which was Tim Van Holder's test case.
13283
13284 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13285 <sys/resource.h> can be included, include sys/time.h and
13286 sys/times.h first, if available. This works around the SunOS
13287 4.1.4 porting bug reported by Bruce Becker in
13288 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13289
13290 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13291 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13292 AC_HEADER_SYS_WAIT.
13293
13294 Merge changes from gnulib. This was prompted because the CVS
13295 snapshot didn't build on Solaris 7 due to strnlen problems.
13296
13297 These changes need to be merged back into gnulib:
13298 * lib/hash.c: Include <stdbool.h> unconditionally.
13299 * m4/onceonly.m4 (m4_quote): New macro.
13300 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13301 Quote AC_FOREACH variable-expansions properly.
13302 The 2003-01-03 obstack.h change also needs merging.
13303 {end of changes requiring merging}
13304
13305 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13306 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13307 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13308 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13309 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13310 New files, imported from gnulib.
13311 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13312 above.
13313
13314 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13315 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13316 gnulib sources.
13317
13318 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13319 Add.
13320 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13321 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13322 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13323 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13324 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13325 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13326 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13327 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13328 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13329 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13330 (jm_PREREQ_ARGMATCH): Remove.
13331 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13332 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13333
13334 * src/system.h: Include <stdbool.h> unconditionally.
13335
13336 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13337 assuming at least C89 in the bitset code for some time now.
13338
13339 2003-03-03 Akim Demaille <akim@epita.fr>
13340
13341 * ro.po: New.
13342
13343 2003-03-02 Akim Demaille <akim@epita.fr>
13344
13345 * doc/bison.texinfo (Table of Symbols): Reactivate the
13346 documentation for %lex-param, and %parse-param.
13347
13348 2003-03-02 Akim Demaille <akim@epita.fr>
13349
13350 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13351 generate verbose error messages.
13352 Use the number of tokens as an upper bound in yytname, as it
13353 cannot be a non terminal.
13354
13355 2003-03-02 Akim Demaille <akim@epita.fr>
13356
13357 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13358 message.
13359
13360 2003-03-02 Akim Demaille <akim@epita.fr>
13361
13362 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13363 Use them to exercise yycheck overrun.
13364 Based on Andrew Suffield's grammar.
13365
13366 2003-03-02 Akim Demaille <akim@epita.fr>
13367
13368 Create tests/local.at for Bison generic testing macros.
13369
13370 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13371 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13372 This new file.
13373 * tests/calc.at (AT_CHECK_CALC): Adjust.
13374 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13375 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13376 * tests/local.at: here.
13377 (AT_COMPILE_CXX): Tags the tests using it as c++.
13378 Ignore the test if CXX is not functional.
13379
13380 2003-03-01 Paul Eggert <eggert@twinsun.com>
13381
13382 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13383 not loc->end, since loc->end might contain garbage and this leads
13384 to undefined behavior on some platforms.
13385 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13386 depend on *loc, so that the reader doesn't give the the false
13387 impression that *loc is initialized.
13388 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13389 does not survive the return.
13390
13391 2003-03-01 Akim Demaille <akim@epita.fr>
13392
13393 * src/scan-gram.l (code_start): Always initialize it when entering
13394 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13395 yylex invocation. An alternative would be making it static, but
13396 then it starts with the second %%'s beginning, instead of its end.
13397
13398 2003-02-28 Paul Eggert <eggert@twinsun.com>
13399
13400 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13401 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13402 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13403
13404 2003-02-26 Paul Eggert <eggert@twinsun.com>
13405
13406 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13407 Remove Sequent/Pyramid discussion (nobody uses them any more).
13408 Merge VMS and MS-DOS discussion; these ports may well be dead
13409 but let's keep mentioning them for now. Put <> around email
13410 addresses. Add copyright notice.
13411
13412 2003-02-24 Paul Eggert <eggert@twinsun.com>
13413
13414 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13415 to avoid collision with flex use of yylineno.
13416 Problem reported by Bruce Lilly in
13417 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13418 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13419 * data/yacc.c (yy_reduce_print): Likewise.
13420
13421 * config/depcomp: Sync with Automake 1.7.3.
13422
13423 2003-02-21 Akim Demaille <akim@epita.fr>
13424
13425 * data/lalr1.cc: Use temporary variables instead of casts to
13426 change integer types.
13427 Suggested by Paul Eggert.
13428
13429 2003-02-21 Akim Demaille <akim@epita.fr>
13430
13431 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13432 to avoid confusions with lalr1.cc's notion of Position.
13433 Suggested by Paul Eggert.
13434
13435 2003-02-20 Akim Demaille <akim@epita.fr>
13436
13437 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13438 before initial_columns.
13439 (location.hh): Use consistent variable names when defining the
13440 operator<<.
13441 Use "last" so that we subtract from Positions, not from unsigned.
13442
13443 2003-02-20 Akim Demaille <akim@epita.fr>
13444
13445 * data/lalr1.cc (position.hh): New subfile, including the extended
13446 and Doxygen'ed documentation of class Position.
13447 (location.hh): Use it.
13448 Document a` la Doxygen.
13449 With the help of Benoit Perrot.
13450
13451 2003-02-20 Akim Demaille <akim@epita.fr>
13452
13453 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13454 AT_YACC_IF.
13455 Redefine AT_YYERROR_SEES_LOC_IF using it.
13456 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13457 not defined.
13458 Don't use the location in yy::Parser::error_ and
13459 yy::Parser::print_ when not %locations.
13460 Activate more lalr1.cc tests.
13461
13462 2003-02-19 Akim Demaille <akim@epita.fr>
13463
13464 * data/lalr1.cc: When displaying a line number, be sure to make it
13465 an int.
13466
13467 2003-02-19 Akim Demaille <akim@epita.fr>
13468
13469 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13470 Remove, useless.
13471 (YYABORT, YYACCEPT, YYERROR): New.
13472 * tests/calc.at: Renable the lalr1.cc test.
13473
13474 2003-02-19 Akim Demaille <akim@epita.fr>
13475
13476 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13477 error recovery, mixing with/without pops and discarding of the
13478 lookahead.
13479 Exercise YYERROR.
13480 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13481
13482 2003-02-17 Paul Eggert <eggert@twinsun.com>
13483
13484 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13485 * tests/testsuite.at (AT_COMPILE): Use them.
13486 This fixes the testsuite problem reported by Robert Lentz in
13487 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13488
13489 2003-02-12 Paul Eggert <eggert@twinsun.com>
13490
13491 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13492 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13493 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13494 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13495 Check for malloc failure, for consistency with yacc.c.
13496 (yytname_size): Remove, for consistency with yacc.c.
13497
13498 The bug still remains in data/lalr1.cc, as I didn't have time
13499 to fix it there.
13500
13501 2003-02-06 Akim Demaille <akim@epita.fr>
13502
13503 * configure.ac (GXX): Rename as...
13504 (CXX): this, to keep the original Autoconf semantics.
13505 Require 2.57.
13506 * data/lalr1.cc: Fix b4_copyright invocations.
13507 If YYDEBUG is not defined, don't depend upon name_ being defined.
13508 (location.hh): Include string and iostream.
13509 (Position::filename): New member.
13510 (Position::Position ()): New.
13511 (operator<< (Position)): New.
13512 (operator- (Position, int)): New.
13513 (Location::first, Location::last): Rename as...
13514 (Location::begin, Location::end): these, to mock the conventional
13515 iterator names.
13516 (operator<< (Location)): New.
13517 * tests/atlocal.in (CXX): New.
13518 * tests/testsuite.at (AT_COMPILE_CXX): New.
13519 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13520 locations in a more synthetic way.
13521 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13522 lalr1.cc is used.
13523 Adjust the C locations to match those from Emacs: first column is
13524 column 0.
13525 Change all the expected results.
13526 Conform to the GCS: simplify the locations when applicable.
13527 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13528 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13529 these CPP macros with the m4 macros new defined by...
13530 (AT_CHECK_PUSHDEFS): this, i.e.:
13531 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13532 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13533 New macros.
13534 (AT_CHECK_POPDEFS): Undefine them.
13535 (AT_CHECK_CALC_LALR1_CC): New.
13536 Use it for the first lalr1.cc test.
13537
13538 2003-02-04 Akim Demaille <akim@epita.fr>
13539
13540 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13541 Location as is defined.
13542
13543 2003-02-04 Akim Demaille <akim@epita.fr>
13544
13545 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13546 name_ being defined.
13547
13548 2003-02-03 Paul Eggert <eggert@twinsun.com>
13549
13550 * src/gram.h (start_symbol): Remove unused decl.
13551
13552 Use more-consistent naming conventions for local vars.
13553
13554 * src/derives.c (derives_compute): Change type of local var from
13555 int to rule_number.
13556 * src/gram.c (grammar_rules_partial_print): Likewise.
13557 * src/print.c (print_core): Likewise.
13558 * src/reduce.c (reduce_grammar_tables): Likewise.
13559
13560 * src/gram.c (grammar_dump): Change name of item_number *
13561 local var from r to rp.
13562 * src/nullable.c (nullable_compute): Likewise.
13563
13564 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13565
13566 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13567 for symbol or symbol_number var.
13568 * src/reader.c (grammar_start_symbol_set): Likewise.
13569 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13570 Likewise.
13571 * src/state.c (transitions_to): Likewise.
13572 * src/state.h: Likewise.
13573 * src/tables.c (symbol_number_to_vector_number): Likewise.
13574
13575 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13576 char * var.
13577
13578 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13579 var.
13580
13581 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13582 var.
13583
13584 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13585 Use str, not s, for char * var. Use ch, not c, for character var.
13586 Use size for size var.
13587
13588 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13589 char * var.
13590 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13591 uniqstr var.
13592 * src/uniqstr.h: Likewise.
13593
13594 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13595 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13596 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13597 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13598 param to have same name as that of enum, so that we don't use
13599 "s" to stand for a non-state.
13600
13601 2003-02-02 Akim Demaille <akim@epita.fr>
13602
13603 * src/scan-skel.l: Scan more than one inert character per yylex
13604 invocation.
13605
13606 2003-02-01 Paul Eggert <eggert@twinsun.com>
13607
13608 Version 1.875a.
13609
13610 * po/LINGUAS: Add ms.
13611
13612 2003-01-30 Akim Demaille <akim@epita.fr>
13613
13614 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13615
13616 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13617
13618 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13619 of $1.
13620
13621 Changes in response to error report by S. Eken: GLR mode does not
13622 handle negative $ indices or $ indices in embedded rules correctly.
13623 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13624
13625 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13626 (b4_rhs_location): Ditto.
13627 (yyfill): New function to copy from stack tree into array
13628 incrementally.
13629 (yyuserAction): Modify to allow incremental move of semantic values
13630 to rhs array when in GLR mode.
13631 Define YYFILL to use in user-defined actions to fill semantic array
13632 as needed.
13633 Remove dummy use of yystack, as there is now a guaranteed use.
13634 (yydoAction): Modify to allow incremental move of semantic values
13635 to rhs array when in GLR mode.
13636 (yyresolveAction): Ditto.
13637 (yyglrShiftDefer): Update comment.
13638 (yyresolveStates): Use X == NULL for pointers, not !X.
13639 (yyglrReduce): Ditto.
13640 (yydoAction): Ditto
13641
13642 * tests/glr-regr1.at: Rename to ...
13643 * tests/glr-regression.at: Add new regression test for the problems
13644 described above (adapted from S. Eken).
13645 Update copyright notice.
13646 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13647 * tests/Makefile.am: Ditto.
13648
13649 2003-01-28 Paul Eggert <eggert@twinsun.com>
13650
13651 * data/lalr1.cc: Do not use @output_header_name@ unless
13652 b4_defines_flag is set. This fixes two bugs reported by
13653 Tim Van Holder in
13654 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13655 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13656
13657 2003-01-21 Paul Eggert <eggert@twinsun.com>
13658
13659 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13660 we don't need to worry about yyerrlab1 being reported as an
13661 "unused label" by non-GCC C compilers. The downside is that if
13662 locations are used then a couple of statements are duplicated each
13663 time YYERROR is invoked, but the upside is that the warnings
13664 should vanish.
13665 (yyerrlab1): Move code to YERROR.
13666 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13667 This reverts some of the 2002-12-27 change.
13668
13669 2003-01-17 Paul Eggert <eggert@twinsun.com>
13670
13671 * src/output.c (symbol_printers_output): Fix typo that led
13672 to core dump. Problem reported by Antonio Rus in
13673 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13674
13675 2003-01-13 Akim Demaille <akim@epita.fr>,
13676 Quoc Peyrot <chojin@lrde.epita.fr>,
13677 Robert Anisko <anisko_r@lrde.epita.fr>
13678
13679 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13680 when the stacks contain one element, as the loop would otherwise
13681 free the last state, and then use the top state (the one we just
13682 popped). This means that the initial elements will not be freed
13683 explicitly, as is the case in yacc.c; it is not a problem, as
13684 these elements have fake values.
13685
13686 2003-01-11 Paul Eggert <eggert@twinsun.com>
13687
13688 * NEWS: %expect-violations are now just warnings, reverting
13689 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13690 bootstrapping problem reported by Matthias Klose; see
13691 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13692 * src/conflicts.c (conflicts_print): Likewise.
13693 * tests/conflicts.at (%expect not enough, %expect too much,
13694 %expect with reduce conflicts): Likewise.
13695 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13696 that the warning is enabled if the number of conflicts changes
13697 (not necessarily increases).
13698
13699 * src/getargs.c (version): Update copyright year.
13700
13701 2003-01-09 Akim Demaille <akim@epita.fr>
13702
13703 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13704
13705 2003-01-08 Paul Eggert <eggert@twinsun.com>
13706
13707 * Makefile.maint (WGETFLAGS):
13708 New macro, containing "-C off" to disable proxy caches.
13709 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13710 (rel-check): Use $(WGET) instead of wget.
13711
13712 2003-01-06 Paul Eggert <eggert@twinsun.com>
13713
13714 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13715 the GLR paper of Scott, Johnstone and Hussain.
13716
13717 2003-01-04 Paul Eggert <eggert@twinsun.com>
13718
13719 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13720 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13721 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13722 (EXTRA_LIBRARIES): New var, for liby.a.
13723 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13724 (EXTRA_SCRIPTS): New var, for yacc.
13725
13726 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13727 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13728 Problem reported by Nelson H. F. Beebe.
13729
13730 2003-01-03 Paul Eggert <eggert@twinsun.com>
13731
13732 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13733 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13734 when compiling Bison 1.875's `bitset bset = obstack_alloc
13735 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13736
13737 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13738 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13739 grow to a huge size with typical invocation.
13740
13741 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13742 Use the pattern recommended by Autoconf 2.57, except also protect
13743 against double-definition.
13744 * src/system.h: Likewise.
13745 Portability issues reported by Nelson H. F. Beebe.
13746
13747 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13748 All uses changed. Provide a definition in both C and C++.
13749 (yytrue, yyfalse): Define even if defined (__cplusplus).
13750
13751 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13752 Reported by Nelson H. F. Beebe.
13753
13754 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13755
13756 2003-01-02 Paul Eggert <eggert@twinsun.com>
13757
13758 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13759 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13760 Bug reported by Nelson H. F. Beebe.
13761
13762 2003-01-01 Paul Eggert <eggert@twinsun.com>
13763
13764 * Version 1.875.
13765
13766 2002-12-30 Paul Eggert <eggert@twinsun.com>
13767
13768 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13769 Moved here from...
13770 (<INITIAL>","): Here. This causes stray "," to be treated
13771 more uniformly.
13772
13773 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13774 last brace in braced code when not in Yacc mode, for compatibility
13775 with Bison 1.35. This resurrects the 2001-12-15 patch to
13776 src/reader.c.
13777
13778 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13779 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13780
13781 2002-12-28 Paul Eggert <eggert@twinsun.com>
13782
13783 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13784 that of SYM's type. This fixes Debian bug 168069, reported by
13785 Thomas Olsson.
13786
13787 2002-12-28 Paul Eggert <eggert@twinsun.com>
13788
13789 Version 1.75f.
13790
13791 Switch back to the Yacc style of conflict reports, undoing some
13792 of the 2002-07-30 change.
13793 * doc/bison.texinfo (Understanding): Use Yacc style for
13794 conflict reports. Also, use new way of locating rules.
13795 * src/conflicts.c (conflict_report):
13796 Renamed from conflict_report_yacc, removing the old
13797 'conflict_report'. Translate the entire conflict report at once,
13798 so that we don't assume that "," has the same interpretation in
13799 all languages.
13800 (conflicts_output): Use Yacc-style conflict report for each state,
13801 instead of our more-complicated style.
13802 (conflicts_print): Use Yacc-style conflict report, except print
13803 the input file name when not emulating Yacc.
13804 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13805 Conflicted Reduction, %expect not enough, %expect too much,
13806 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13807 * tests/existing.at (GNU Cim Grammar): Likewise.
13808 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13809
13810 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13811 fatal): Don't invoke fflush; it's not needed and it might even be
13812 harmful for stdout, as stdout might not be open.
13813 * src/reduce.c (reduce_print): Likewise.
13814
13815 2002-12-27 Paul Eggert <eggert@twinsun.com>
13816
13817 Fix a bug where error locations were not being recorded correctly.
13818 This problem was originally reported by Paul Hilfinger in
13819 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13820
13821 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13822 top of the location stack's error locations.
13823 (yyerrlab): Set it. When discarding a token, push its location
13824 onto yylerrsp so that we don't lose track of the error's end.
13825 (yyerrlab1): Now is only the target of YYERROR, so that we can
13826 properly record the location of the action that failed. For GCC
13827 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13828 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13829 (yyerrlab2): New label, which yyerrlab now falls through to.
13830 Compute the error's location by applying YYLLOC_DEFAULT to
13831 the locations of all the symbols that went into the error.
13832 * doc/bison.texinfo (Location Default Action): Mention that
13833 YYLLOC_DEFAULT is also invoked for syntax errors.
13834 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13835 Error locations include the locations of all the tokens that were
13836 discarded, not just the last token.
13837
13838 2002-12-26 Paul Eggert <eggert@twinsun.com>
13839
13840 * src/files.c: Include quote.h.
13841 (compute_output_file_names): Warn if we detect conflicting
13842 outputs to the same file. This should catch the misunderstanding
13843 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13844
13845 * src/conflicts.c (conflicts_print): If the user specifies
13846 "%expect N", report an error if there are any reduce/reduce
13847 conflicts. This is what the manual says should happen.
13848 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13849 * tests/conflicts.at (%expect with reduce conflicts): New test.
13850
13851 Don't use m4_include on relative file names, as it doesn't work as
13852 desired if there happens to be a file with that name under ".".
13853
13854 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13855 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13856 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13857 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13858 * src/output.c (output_skeleton): Use full path names when
13859 specifying a file to include; don't rely on include path, as
13860 it's unreliable when the working file contains a file with
13861 that name.
13862
13863 2002-12-25 Paul Eggert <eggert@twinsun.com>
13864
13865 Remove obsolete references to bison.simple and bison.hairy.
13866 Problem mentioned by Aubin Mahe in
13867 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13868 * data/glr.c: Comment fix.
13869 * doc/bison.1: Remove references. Also, mention "yacc".
13870
13871 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13872 with -g option.
13873
13874 * src/parse-gram.y (declaration): Use enum "report_states" rather
13875 than its numeric value 1.
13876
13877 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13878 opening a new one. This fixes Debian bug 165349, reported by
13879 Bruce Stephens.
13880
13881 2002-12-24 Paul Eggert <eggert@twinsun.com>
13882
13883 Version 1.75e.
13884
13885 * Makefile.maint (cvs-update): Don't assume that the shell
13886 supports $(...), as Solaris sh doesn't.
13887
13888 * src/parse-gram.y (lloc_default): Remove test for empty
13889 nonterminals at the end, since it didn't change the result.
13890
13891 2002-12-24 Paul Eggert <eggert@twinsun.com>
13892
13893 If the user does not define YYSTYPE as a macro, Bison now declares it
13894 using typedef instead of defining it as a macro. POSIX requires this.
13895 For consistency, YYLTYPE is also declared instead of defined.
13896
13897 %union directives can now have a tag before the `{', e.g., the
13898 directive `%union foo {...}' now generates the C code
13899 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13900 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13901 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13902 instead of `yyltype'.
13903
13904 `yystype' and `yyltype' are now obsolescent macros instead of being
13905 typedefs or tags; they are no longer documented and will be
13906 withdrawn in a future release.
13907
13908 * data/glr.c (b4_location_type): Remove.
13909 (YYSTYPE): Renamed from yystype.
13910 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13911 (struct YYLTYPE): Renamed from struct yyltype.
13912 (YYLTYPE): Renamed from yyltype.
13913 (yyltype, yystype): New (and obsolescent) macros,
13914 for backward compatibility.
13915 * data/yacc.c: Likewise.
13916
13917 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13918 does not specify a union tag. This is for compatibility with
13919 Solaris 9 yacc.
13920
13921 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13922 const *, since it is now modified by stripping surrounding { }.
13923 (current_braced_code): Remove.
13924 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13925 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13926 trailing " {...}". Now of type <chars>.
13927 (grammar_declaration): Adjust to bundled tokens.
13928 (code_content): Remove; stripping is now done by add_param.
13929 (print_token_value): Print contents of bundled tokens.
13930 (token_name): New function.
13931
13932 * src/reader.h (braced_code, current_braced_code): Remove.
13933 (token_name): New decl.
13934
13935 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13936 token_type, not braced_code code_kind. All uses changed.
13937 (SC_PRE_CODE): New state, for scanning after a keyword that
13938 has (or usually has) an immediately-following braced code.
13939 (token_type): New local var, to keep track of which token type
13940 to return when scanning braced code.
13941 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13942 <INITIAL>"%parse-param", <INITIAL>"%printer",
13943 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13944 instead of returning a token type immediately.
13945 (<INITIAL>"{"): Set token type.
13946 (<SC_BRACED_CODE>"}"): Use it.
13947 (handle_action_dollar, handle_action_at): Now returns bool
13948 indicating success. Fail if ! current_rule; this prevents a core dump.
13949 (handle_symbol_code_dollar, handle_symbol_code_at):
13950 Remove; merge body into caller.
13951 (handle_dollar, handle_at): Complain in invalid contexts.
13952
13953 * NEWS, doc/bison.texinfo: Document the above.
13954 * NEWS: Fix years and program names in copyright notice.
13955
13956 2002-12-17 Paul Eggert <eggert@twinsun.com>
13957
13958 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13959 Reporting, Table of Symbols): Omit mentions of %lex-param and
13960 %parse-param from the documentation for now.
13961
13962 2002-12-15 Paul Eggert <eggert@twinsun.com>
13963
13964 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13965 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13966 lookahead symbol, and which sets yychar in parser actions) and it
13967 disagreed with the Bison documentation. Bug
13968 reported by Andrew Walrond.
13969
13970 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13971 as the caller now does that.
13972 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13973 (YYEMPTY): Parenthesize right hand side, since others use it.
13974 (yyparse): Don't assume that our generated code is the only code
13975 that sets yychar.
13976
13977 2002-12-13 Paul Eggert <eggert@twinsun.com>
13978
13979 Version 1.75d.
13980
13981 POSIX requires a "yacc" command.
13982 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13983 (MOSTLYCLEANFILES): Add yacc.
13984 (yacc): New rule.
13985 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13986 as an alias for bison y.
13987
13988 * po/LINGUAS: Add da.
13989
13990 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13991 problem with latest <getopt.h>.
13992 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13993
13994 * doc/fdl.texi: Upgrade to 1.2.
13995 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13996 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13997 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13998 gnulib.
13999 * config/install-sh: Sync with autotools.
14000
14001 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14002 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14003 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14004 locations are requested.
14005 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14006 locations are requested.
14007
14008 2002-12-12 Paul Eggert <eggert@twinsun.com>
14009
14010 Remove unportable casts and storage allocation tricks.
14011 While we're at it, remove almost all casts, since they
14012 usually aren't needed and are a sign of trouble.
14013
14014 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14015
14016 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14017 the pointer DSET returned by malloc; this isn't portable.
14018 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14019 Similarly for DERIVES.
14020 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14021 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14022 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14023
14024 * src/derives.c (derives_compute): Do not bother invoking
14025 int_of_rule_number, since rule numbers are integers.
14026
14027 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14028 rather than XMALLOC (char, N).
14029
14030 * src/files.c (filename_split): Rewrite to avoid cast.
14031
14032 * src/gram.h (symbol_number_as_item_number,
14033 item_number_as_symbol_number, rule_number_as_item_number,
14034 item_number_as_rule_number):
14035 Now inline functions rather than macros, to avoid casts.
14036 * src/state.h (state_number_as_int): Likewise.
14037 * src/tables.c (state_number_to_vector_number,
14038 symbol_number_to_vector_number): Likewise.
14039
14040 * src/gram.h (int_of_rule_number): Remove; no longer used.
14041
14042 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14043 since the resulting storage is always stored into.
14044
14045 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14046 where it's needed.
14047
14048 * src/muscle_tab.c (muscle_m4_output):
14049 Now inline. Return bool, not int.
14050 * src/state.c (state_compare): Likewise.
14051 * src/symtab.c (symbol_check_defined,
14052 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14053 hash_compare_symbol, hash_symbol):
14054 Likewise.
14055 * src/uniqstr.c (uniqstr_print): Likewise.
14056 * src/muscle_tab.c (muscle_m4_output_processor):
14057 New function, to avoid casts.
14058 * src/state.c (state_comparator, stage_hasher): Likewise.
14059 * src/symtab.c (symbol_check_defined_processor,
14060 symbol_check_alias_consistency_processor, symbol_pack_processor,
14061 symbol_translation_processor, hash_symbol_comparator,
14062 hash_symbol_hasher): Likewise.
14063 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14064 * src/muscle_tab.c (muscles_m4_output):
14065 Use new functions instead of casting old functions unportably.
14066 * src/state.c (state_hash_new): Likewise.
14067 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14068 symbols_token_translations_init):
14069 Likewise.
14070 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14071
14072 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14073 var instead of casting to long, to avoid casts.
14074 (prepare_states): Use MALLOC rather than alloca, so that we don't
14075 have to worry about alloca.
14076 * src/state.c (state_hash_lookup): Likewise.
14077
14078 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14079 local var instead of casting to unsigned char, to avoid casts.
14080
14081 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14082 STATE_ALLOC): Remove.
14083 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14084 rather than calloc, and use offsetof to avoid allocating slightly
14085 too much storage.
14086 (state_new): Initialize all members.
14087
14088 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14089
14090 * src/symtab.c (symbol_free): Remove; unused.
14091 (symbol_get): Remove cast in lhs of assignment.
14092 (symbols_do): Now static. Accept generic arguments, not
14093 hashing-related ones.
14094
14095 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14096 (symbol_processor): Remove.
14097 (symbols_do): Remove decl; now static.
14098
14099 * src/system.h (alloca): Remove; decl no longer needed.
14100 (<stddef.h>): Include, for offsetof.
14101 (<inttypes.>, <stdint.h>): Include if available.
14102 (uintptr_t): New type, if system lacks it.
14103 (CALLOC, MALLOC, REALLOC): New macros.
14104 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14105 new macros.
14106
14107 * src/tables.c (table_size): Now int, to pacify GCC.
14108 (table_grow, table_ninf_remap): Use signed table size.
14109 (save_row): Don't bother initializing locals when not needed.
14110 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14111 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14112
14113 * src/vcg.h: Correct misspellings.
14114
14115 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14116
14117
14118 * src/getargs.c (getargs): Don't assume EOF == -1.
14119
14120 2002-12-09 Paul Eggert <eggert@twinsun.com>
14121
14122 Change identifier spellings to avoid collisions with names
14123 that are reserved by POSIX.
14124
14125 Don't use names ending in _t, since POSIX reserves them.
14126 For consistency, remove _e and _s endings -- they're weren't
14127 needed to remove ambiguity. All uses changed.
14128 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14129 turn was just renamed from struniq_t.
14130 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14131 which in turn was just renamed from struniq_processor_t.
14132 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14133 in turn was renamed from hash_compare_struniq_t.
14134 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14135 (state_list): Renamed from state_list_t.
14136 * src/assoc.h (assoc): Renamed from assoc_t.
14137 * src/conflicts.c (enum conflict_resolution): Renamed from
14138 enum conflict_resolution_e.
14139 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14140 (rule_list): Renamed from rule_list_t.
14141 * src/getargs.h (enum trace): Renamed from enum trace_e.
14142 (enum report): Renamed from enum report_e.
14143 * src/gram.h (item_number): Renamed from item_number_t.
14144 (rule_number): Renamed from rule_number_t.
14145 (struct rule_s): Remove the "rule_s" part; not used.
14146 (rule): Renamed from rule_t.
14147 (rule_filter): Renamed from rule_filter_t.
14148 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14149 (goto_list): Renamed from goto_list_t.
14150 * src/lalr.h (goto_number): Renamed from goto_number_t.
14151 * src/location.h (location): Renamed from location_t.
14152 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14153 and moved here from:
14154 * src/muscle_tab.h (muscle_entry_t): here.
14155 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14156 (rule_list): Renamed from rule_list_t.
14157 * src/print_graph.c (static_graph): Renamed from graph.
14158 * src/reader.h (braced_code): Renamed from braced_code_t.
14159 Remove brace_code_e tag.
14160 * src/relation.h (relation_node): Renamed from relation_node_t.
14161 (relation_nodes): Renamed from relation_nodes_t.
14162 (relation): Renamed from relation_t.
14163 * src/state.h (state_number): Renamed from state_number_t.
14164 (struct state): Renamed from struct state_s.
14165 (state): Renamed from state_t.
14166 (transitions): Renamed from transitions_t. Unused (and
14167 misspelled) transtion_s tag removed.
14168 (errs): Renamed from errs_t. Unused errs_s tag removed.
14169 (reductions): Renamed from reductions_t. Unused tag
14170 reductions_s removed.
14171 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14172 (struct symbol_list): Renamed from struct symbol_list_s.
14173 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14174 (struct symbol): Renamed from struct symbol_s.
14175 (symbol): Renamed from symbol_t.
14176 * src/tables.c (vector_number): Renamed from vector_number_t.
14177 (action_number): Renamed from action_t.
14178 * src/tables.h (base_number): Renamed from base_t.
14179 * src/vcg.h (enum color): Renamed from enum color_e.
14180 (enum textmode): Renamed from enum textmode_e.
14181 (enum shape): Renamed from enum shape_e.
14182 (struct colorentry): Renamed from struct colorentry_s.
14183 (struct classname): Renamed from struct classname_s.
14184 (struct infoname): Renamed from struct infoname_s.
14185 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14186 (enum decision): Renamed from enum decision_e.
14187 (enum orientation): Renamed from enum orientation_e.
14188 (enum alignment): Renamed from enum alignment_e.
14189 (enum arrow_mode): Renamed from enum arrow_mode_e.
14190 (enum crossing_type): Renamed from enum crossing_type_e.
14191 (enum view): Renamed from enum view_e.
14192 (struct node): Renamed from struct node_s.
14193 (node): Renamed from node_t.
14194 (enum linestyle): Renamed from enum linestyle_e.
14195 (enum arrowstyle): Renamed from enum arrowstyle_e.
14196 (struct edge): Renamed from struct edge.
14197 (edge): Renamed from edge_t.
14198 (struct graph): Renamed from struct graph_s.
14199 (graph): Renamed from graph_t.
14200 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14201 Rename value_t -> value.
14202 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14203 value_t_as_yystype -> value_as_yystype.
14204
14205 Don't include <errno.h> in the mainstream code, since it
14206 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14207 * lib/get-errno.c, lib/get-errno.h: New files.
14208 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14209 get-errno.c.
14210 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14211 * src/output.c (output_skeleton): Likewise.
14212 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14213 instead of errno.
14214 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14215 Likewise.
14216 (handle_action_dollar, handle_action_at): Likewise.
14217 * src/system.h: Do not include <errno.h>.
14218 (TAB_EXT): Renamed from EXT_TAB.
14219 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14220
14221 Avoid str[a-z]*, since <string.h> reserves that name space.
14222 Change all instances of "struniq" in names to "uniqstr", and
14223 likewise for "STRUNIQ" and "UNIQSTR".
14224 * src/uniqstr.c: Renamed from src/struniq.c.
14225 * src/uniqstr.h: Renamed from src/struniq.h.
14226 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14227 * src/files.c (strsuffix): Remove; unused.
14228 (concat2): Renamed from stringappend. Now static.
14229 * src/files.h (strsuffix, stringappend): Remove; unused.
14230 * src/parse-gram.y (<chars>): Renamed from <string>.
14231 (<uniqstr>): Renamed from <struniq>.
14232 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14233 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14234 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14235 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14236 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14237 (N_EXPAND): Renamed from N_STRETCH.
14238
14239 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14240 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14241 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14242 Remove; unused.
14243 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14244 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14245 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14246 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14247 (BASE_MAXIMUM): Renamed from BASE_MAX.
14248 (BASE_MINIMUM): Renamed from BASE_MIN.
14249 (ACTION_MAX): Remove; unused.
14250 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14251 Unnecessary casts removed from above defines.
14252
14253
14254 Fix misspelling in names.
14255 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14256 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14257 G_NODE_ALIGNEMENT.
14258
14259
14260 * lib/timevar.c (timevar_report): Renamed from time_report,
14261 for consistency with other names.
14262 * lib/timevar.h (timevar_report): New decl.
14263 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14264
14265
14266 Sort include-file uses.
14267
14268 Reorder all include files under src to be in the order "system.h".
14269 then the ../lib include files in angle brackets (alphabetized),
14270 then the . include files in double-quotes (alphabetized). Fix
14271 dependency breakages encountered in this process, as follows:
14272 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14273 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14274 * src/state.h: Include "symtab.h".
14275
14276 2002-12-08 Paul Eggert <eggert@twinsun.com>
14277
14278 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14279 since this causes problems when __file__ contains character
14280 sequences like "@" that are treated specially by src/scan-skel.l.
14281 Instead, just use the file's basename. This fixes the bug
14282 reported by Martin Mokrejs in
14283 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14284
14285 2002-12-06 Paul Eggert <eggert@twinsun.com>
14286
14287 Add support for rules that do not have trailing semicolons, as
14288 POSIX requires. Improve the quality of locations in Bison
14289 diagnostics.
14290
14291 * src/location.c: Include <quotearg.h>.
14292 (empty_location): Now const.
14293 (location_print): New function. Follow the recommendation of the
14294 GNU Coding Standards for locations that span file boundaries.
14295 * src/location.h: Do not include <quotearg.h>; no longer needed.
14296 (boundary): New type.
14297 (location_t): Use it. This allows locations to span file boundaries.
14298 All member uses changed: file -> start.file or end.file (as needed),
14299 first_line -> start.line, first_column -> start.column,
14300 last_line -> end.line, last_column -> end.column.
14301 (equal_boundaries): New function.
14302 (LOCATION_RESET, LOCATION_STEP): Remove.
14303 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14304 (empty_location): Now const.
14305 (location_print): New decl.
14306 * src/parse-gram.y (lloc_default): New function, which handles
14307 empty locations more accurately.
14308 (YYLLOC_DEFAULT): Use it.
14309 (%token COLON): Remove.
14310 (%token ID_COLON): New token.
14311 (rules): Use it.
14312 (declarations, rules): Remove trailing semicolon.
14313 (declaration, rules_or_grammar_declaration):
14314 Allow empty (";") declaration.
14315 (symbol_def): Remove empty actions; no longer needed.
14316 (rules_or_grammar_declaration): Remove trailing semicolon.
14317 (semi_colon.opt): Remove.
14318 * src/reader.h: Include location.h.
14319 (scanner_cursor): New decl.
14320 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14321 rolling our own.
14322 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14323 of *loc.
14324 (STEP): Remove. No longer needed, now that adjust_location does
14325 the work. All uses removed.
14326 (scanner_cursor): New var.
14327 (adjust_location): Renamed from extend_location. It now sets
14328 *loc and adjusts the scanner cursor. All uses changed.
14329 Don't bother testing for CR.
14330 (handle_syncline): Remove location arg; now updates scanner cursor.
14331 All callers changed.
14332 (unexpected_end_of_file): Now accepts start boundary of token or
14333 comment, not location. All callers changed. Update scanner cursor,
14334 not the location.
14335 (SC_AFTER_IDENTIFIER): New state.
14336 (context_state): Renamed from c_context. All uses changed.
14337 (id_loc, code_start, token_start): New local vars.
14338 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14339 processing of Yacc white space and equivalents here.
14340 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14341 instead of returning ID immediately, since we need to search for
14342 a subsequent colon.
14343 (<INITIAL>"'", "\""): Save token_start.
14344 (<INITIAL>"%{", "{", "%%"): Save code_start.
14345 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14346 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14347 BEGIN context_state at end, not INITIAL.
14348 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14349 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14350 Return correct token start.
14351 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14352 the start of a character, string or multiline comment is found.
14353 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14354 Reduction): Adjust reported locations to match the more-precise
14355 results now expected.
14356 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14357 * tests/reduce.at (Useless Rules, Reduced Automaton,
14358 Underivable Rules): Likewise.
14359 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14360 or "|"' now that so many other tokens are allowed by the new grammar.
14361
14362 * src/complain.h (current_file): Remove duplicate decl;
14363 current_file is now owned by files.h.
14364 * src/complain.c, src/scan-gram.l: Include files.h.
14365
14366 2002-12-06 Paul Eggert <eggert@twinsun.com>
14367
14368 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14369 promotes to int; it might be unsigned int.
14370 * data/yacc.c (yy_reduce_print): Likewise.
14371
14372 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14373 be #defined in the prologue, not in the Bison declarations.
14374 This fixes Debian Bug 102878, reported by Shaul Karl.
14375
14376 2002-12-02 Paul Eggert <eggert@twinsun.com>
14377
14378 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14379 * lib/strtoul.c: New file, from gnulib.
14380 This fixes a porting bug reported by Peter Klein in
14381 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14382
14383 2002-11-30 Paul Eggert <eggert@twinsun.com>
14384
14385 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14386 and put only a forward declaration in the prologue. This is for
14387 consistency with the other scanner helper functions.
14388
14389 Type clashes now generate warnings, not errors, since it
14390 appears that POSIX may allow some grammars with type clashes.
14391 * src/reader.c (grammar_current_rule_check): Warn about
14392 type clashes instead of complaining.
14393 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14394
14395 Add Yacc library, since POSIX requires it.
14396 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14397 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14398 * lib/main.c, lib/yyerror.c: New files.
14399
14400 gram_error can be static; it need not be extern.
14401 * src/reader.h (gram_error): Remove decl.
14402 * src/parse-gram.y (gram_error): Now static. Add static decl.
14403 (print_token_value): Omit parameter names from forward decl,
14404 for consistency.
14405
14406 2002-11-29 Paul Eggert <eggert@twinsun.com>
14407
14408 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14409 be declared before being used. E.g., one should typically
14410 declare them in the prologue. Use GNU coding style in examples.
14411 Put "const" consistently after the type it modifies. Mention
14412 that C99 supports "inline". Mention that yyerror traditionally
14413 returns "int".
14414
14415 %parse-param and %lex-param now take just one argument, the
14416 declaration; the argument name is deduced from the declaration.
14417
14418 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14419 Reporting, Table of Symbols): Document this.
14420 * src/parse-gram.y (add_param): New function.
14421 (COMMA): Remove.
14422 (declaration): Implement new rule for %parse-param and %lex-param.
14423 * src/scan-gram.l: "," now elicits a warning, rather than being
14424 a token; this is more compatible with byacc.
14425 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14426
14427 2002-11-27 Paul Eggert <eggert@twinsun.com>
14428
14429 Rename identifiers to avoid real and potential collisions.
14430
14431 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14432 to avoid collision with lex macro described by Bruce Lilly in
14433 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14434 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14435 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14436 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14437 All uses changed.
14438 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14439 The name "yycontrol" violates the name space rules, and this stuff
14440 wasn't being used anyway.
14441 (input): Remove action; this stuff wasn't being used.
14442 (gram_error): Rename local variable yylloc -> loc.
14443 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14444 (YY_DECL): Don't use "yy" at start of local variables.
14445 All uses changed, e.g., yylloc -> loc.
14446 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14447 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14448 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14449 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14450
14451 * src/parse-gram.y (gram_error): loc is now const *.
14452 * src/reader.h (gram_error): Likewise.
14453
14454 2002-11-24 Paul Eggert <eggert@twinsun.com>
14455
14456 Version 1.75c.
14457
14458 * tests/actions.at (Actions after errors): Use an output format
14459 more similar to that of the Printers and Destructors test.
14460 Test the position of the ';' token too.
14461 (Printers and Destructors): Likewise.
14462 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14463 unnecessarily alarming people when the test fails.
14464
14465 * data/yacc.c (yyerrlab1): Move this label down, so that the
14466 parser does not discard the lookahead token if the user code
14467 invokes YYERROR. This change is required for POSIX conformance.
14468
14469 * lib/error.c: Sync with gnulib.
14470
14471 2002-11-22 Paul Eggert <eggert@twinsun.com>
14472
14473 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14474 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14475 * lib/xmalloc.c: Likewise.
14476
14477 2002-11-20 Paul Eggert <eggert@twinsun.com>
14478
14479 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14480
14481 2002-11-20 Paul Eggert <eggert@twinsun.com>
14482
14483 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14484 should use `if (! x) abort ();' rather than `assert (x);', and
14485 anyway it's one less thing to worry about configuring.
14486
14487 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14488 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14489 and replace all instances of assert with abort.
14490 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14491 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14492
14493 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14494 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14495 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14496 hash_find_entry, hash_rehash, hash_insert): Likewise.
14497 * src/conflicts.c (resolve_sr_conflict): Likewise.
14498 * src/lalr.c (set_goto_map, map_goto): Likewise.
14499 * src/nullable.c (nullable_compute): Likewise.
14500 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14501 * src/reader.c (packgram, reader): Likewise.
14502 * src/state.c (state_new, state_free, state_transitions_set,
14503 state_reduction_find): Likewise.
14504 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14505 symbol_pack): Likewise.
14506 * src/tables.c (conflict_row, pack_vector): Likewise.
14507 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14508 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14509 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14510 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14511
14512 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14513 (ARGMATCH_CONSTRAINT): New macro.
14514 (ARGMATCH_ASSERT): Use it.
14515
14516 * src/system.h (verify): New macro.
14517 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14518 rather than assert.
14519 * src/tables.c (tables_generate): Likewise.
14520
14521 * src/struniq.c (struniq_assert): Now returns void, and aborts
14522 if the assertion is false.
14523 (struniq_assert_p): Remove.
14524 * src/struniq.h: Likewise.
14525
14526 2002-11-18 Paul Eggert <eggert@twinsun.com>
14527
14528 * data/glr.c (yygetLRActions): Replace `yyindex' with
14529 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14530 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14531 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14532
14533 2002-11-18 Akim Demaille <akim@epita.fr>
14534
14535 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14536 space.
14537 From Tim Van Holder.
14538
14539 2002-11-17 Paul Eggert <eggert@twinsun.com>
14540
14541 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14542 to "SyntaxError" for consistency with my 2002-11-15 change.
14543
14544 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14545 not define to {}, since this breaks the common use of `YYDPRINTF
14546 ((...));' if a single statement is desired (e.g. before `else').
14547 Work around GCC warnings by surrounding corresponding calls with
14548 {} if needed.
14549 (yyhasResolvedValue): Remove unused function.
14550 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14551 loop body.
14552 (yyreportSyntaxError): Renamed from yyreportParseError.
14553 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14554 All uses changed.
14555 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14556 extern when possible. Remove unused initializations.
14557
14558 2002-11-16 Akim Demaille <akim@epita.fr>
14559
14560 Augment the similarity between GLR and LALR traces.
14561
14562 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14563 (YY_REDUCE_PRINT): New.
14564 (yyparse): Use them.
14565 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14566 YYDPRINT here.
14567 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14568 state reached after the reduction/recovery, since...
14569 (yyparse, yyprocessOneStack): Report the state we are entering in.
14570
14571 2002-11-16 Akim Demaille <akim@epita.fr>
14572
14573 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14574 Add support for --trace=skeleton.
14575 * src/scan-skel.l: %option debug.
14576 Scan strings of non-@ or \n instead of character by character.
14577 (scan_skel): Handle trace_skeleton.
14578 (QPUTS): New.
14579 (@output_parser_name@, @output_header_name@): ``Restore'' their
14580 support (used to be M4 macros).
14581 * data/yacc.c: Quote larger chunks, a la glr.c.
14582 * data/lalr1.cc: Likewise.
14583 The header guards are no longer available, so use some other
14584 string than `YYLSP_NEEDED'.
14585
14586 2002-11-16 Akim Demaille <akim@epita.fr>
14587
14588 Make the ``Printers and Destructors'' test more verbose, taking
14589 `yacc.c''s behavior as (possibly wrong) reference.
14590
14591 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14592 instead of fprint on stdout.
14593 Set and report the last_line of the symbols.
14594 Consistently display values and locations.
14595
14596 2002-11-16 Paul Eggert <eggert@twinsun.com>
14597
14598 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14599
14600 2002-11-15 Paul Eggert <eggert@twinsun.com>
14601
14602 * tests/actions.at (Actions after errors): New test case.
14603
14604 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14605 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14606 tests/action.at, tests/calc.at, tests/conflicts.at,
14607 tests/cxx-type.at, tests/regression.at:
14608 "parse error" -> "syntax error" for POSIX compatibility.
14609 "parsing stack overflow..." -> "parser stack overflow" so
14610 that code matches Bison documentation.
14611
14612 2002-11-15 Akim Demaille <akim@epita.fr>
14613
14614 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14615 take two BRACED_CODE, not two string_content.
14616 Free the scanner's obstack when we are done.
14617 (code_content): New.
14618 * tests/calc.at: Adjust.
14619 * doc/bison.texinfo: Adjust.
14620 Also, make sure to include the `,' for these declarations.
14621
14622 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14623
14624 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14625 definition; avoids potential autoreconf problems.
14626
14627 2002-11-15 Akim Demaille <akim@epita.fr>
14628
14629 Always check the value returned by yyparse.
14630
14631 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14632 returned by yyparse.
14633 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14634 Adjust calls.
14635 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14636 returned by yyparse.
14637
14638 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14639
14640 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14641 on input.at test.
14642
14643 2002-11-14 Paul Eggert <eggert@twinsun.com>
14644
14645 * src/output.c (output_skeleton): Call xfopen instead of
14646 duplicating xfopen's body.
14647
14648 Fix bugs reported by Nelson H. F. Beebe in
14649 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14650
14651 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14652 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14653 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14654 file twice in the grammar, as an extra check.
14655
14656 * tests/input.at (Torturing the Scanner): Surround the
14657 backslash-newline tests with "#if 0", to make it less likely that
14658 we'll run into compiler bugs. Bring back solitary \ inside
14659 comment, but add a closing comment to work around HP C bug. Don't
14660 test backslash-newline in C character constant.
14661
14662 2002-11-14 Akim Demaille <akim@epita.fr>
14663
14664 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14665 status of the compiler.
14666 Calling `exit 1' is no longer needed.
14667 Reported by Nelson H. F. Beebe.
14668
14669 2002-11-14 Akim Demaille <akim@epita.fr>
14670
14671 * tests/atlocal.in (CPPFLAGS): We have config.h.
14672 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14673 New.
14674 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14675 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14676 * tests/regression.at, tests/torture.at: Use them for all the
14677 grammars that are to be compiled.
14678 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14679 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14680 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14681
14682 2002-11-14 Akim Demaille <akim@epita.fr>
14683
14684 * doc/bison.texinfo: Various formatting changes (alignments in
14685 samples, additional @group/@end group, GCS in samples.
14686 Use @deffn instead of simple @table to define the directives,
14687 macros, variables etc.
14688
14689 2002-11-13 Paul Eggert <eggert@twinsun.com>
14690
14691 Fix some bugs reported by Albert Chin-A-Young in
14692 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14693
14694 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14695 -o c"; the HP C compiler chatters during compilation.
14696 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14697 * tests/headers.at (export YYLTYPE): Likewise.
14698
14699 * tests/input.at (Torturing the Scanner): Remove lines containing
14700 solitary backslashes, as they tickle a bug in the HP C compiler.
14701
14702 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14703 comments, since they're not portable. Use GNU coding style.
14704
14705 2002-11-13 Akim Demaille <akim@epita.fr>
14706
14707 * data/yacc.c: Leave bigger chunks of quoted text.
14708 (YYDSYMPRINTF): New.
14709 Use it to report symbol activities.
14710 * data/glr.c (YYDSYMPRINTF): New.
14711 Use it.
14712
14713 2002-11-12 Paul Eggert <eggert@twinsun.com>
14714
14715 Version 1.75b.
14716
14717 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14718 (yyglrReduce): Return yyok, not 0.
14719 This should avoid the enumerated-type warnings reported
14720 by Nelson H. F. Beebe in
14721 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14722
14723 * lib/bbitset.h (BITSET_INLINE): Remove.
14724 * lib/bitset.h [! BITSET_INLINE]: Remove.
14725 (bitset_set, bitset_reset, bitset_test): Rename local vars
14726 to avoid shadowing warnings by GCC.
14727
14728 * data/glr.c (inline): Remove #define. It's the user's
14729 responsibility to #define it away, just like 'const'.
14730 This fixes one of the bugs reported by Nelson H. F. Beebe in
14731 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14732
14733 * Makefile.maint (po-check): Scan .l and .y files instead of the
14734 .c and the .h files that they generate. This fixes the bug
14735 reported by Tim Van Holder in:
14736 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14737 Look for N_ as well as for _. Try to avoid matching #define for
14738 N_ and _.
14739 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14740 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14741 * src/scan-gram.l: Revamp regular expressions so that " and '
14742 do not confuse xgettext.
14743
14744 * src/struniq.h (struniq_new): Do not declare the return type
14745 to be 'const'; this violates the C standard.
14746 * src/struniq.c (struniq_new): Likewise.
14747
14748 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14749
14750 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14751 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14752 linker.
14753
14754 2002-11-12 Akim Demaille <akim@epita.fr>
14755
14756 * Makefile.maint: Sync with Autoconf:
14757 (local_updates): New.
14758
14759 2002-11-12 Akim Demaille <akim@epita.fr>
14760
14761 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14762
14763 2002-11-12 Akim Demaille <akim@epita.fr>
14764
14765 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14766 locations.
14767
14768 2002-11-12 Akim Demaille <akim@epita.fr>
14769
14770 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14771 not yyvalue.
14772
14773 2002-11-12 Akim Demaille <akim@epita.fr>
14774
14775 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14776 Use it to test the GLR parser.
14777
14778 2002-11-12 Akim Demaille <akim@epita.fr>
14779
14780 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14781 defines it.
14782 * data/glr.c (yystos): New.
14783 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14784 (YYDSYMPRINT): New.
14785 (yyval): Don't define it, it is handled via M4.
14786 (yyrecoverParseError): Free verbosely the discarded symbols.
14787 * data/yacc.c (yysymprint): Remove, rather...
14788 (b4_yysymprint_generate): invoke.
14789 * data/c.m4 (b4_yysymprint_generate): New.
14790 Accept pointers as arguments, as opposed to the version from
14791 yacc.c.
14792 (b4_yydestruct_generate): Likewise.
14793 * tests/cations.at (Printers and Destructors): Use Bison directives
14794 instead of CPP macros.
14795 Don't rely on internal details.
14796
14797 2002-11-12 Akim Demaille <akim@epita.fr>
14798
14799 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14800 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14801 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14802 it against YYEMPTY and so forth), work on yytoken (i.e., set
14803 it to YYEMPTY etc.).
14804 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14805 (b4_symbol_actions): Remove.
14806 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14807 for 0, end-of-input.
14808
14809 2002-11-12 Akim Demaille <akim@epita.fr>
14810
14811 * doc/bison.texinfo (Destructor Decl): New.
14812
14813 2002-11-12 Akim Demaille <akim@epita.fr>
14814
14815 * src/tables.c (tables_generate): Use free for pointers that
14816 cannot be NULL, not XFREE.
14817 (pack_vector): Use assert, not fatal, for bound violations.
14818 * src/state.c (state_new): Likewise.
14819 * src/reader.c (reader): Likewise.
14820 * src/lalr.c (set_goto_map): Likewise.
14821 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14822 the file name.
14823
14824 2002-11-12 Akim Demaille <akim@epita.fr>
14825
14826 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14827 Restore.
14828 * src/scan-gram.l (last_string): Is global to the file, not to
14829 yylex.
14830 * src/parse-gram.y (input): Don't append the epilogue here,
14831 (epilogue.opt): do it here, and free the scanner's obstack.
14832 * src/reader.c (epilogue_set): Rename as...
14833 (epilogue_augment): this.
14834 * data/c.m4 (b4_epilogue): Defaults to empty.
14835
14836 2002-11-12 Akim Demaille <akim@epita.fr>
14837
14838 * src/getargs.c (long_options): Remove duplicates.
14839 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14840 Remove.
14841 * doc/bison.rnh: Remove.
14842 * doc/bison.texinfo (VMS Invocation): Remove.
14843
14844 2002-11-12 Akim Demaille <akim@epita.fr>
14845
14846 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14847 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14848
14849 Use struniq for symbols.
14850
14851 * src/symtab.h (symbol_t): The tag member is a struniq.
14852 (symbol_type_set): Adjust.
14853 * src/symtab.c (symbol_new): Takes a struniq.
14854 (symbol_free): Don't free the tag member.
14855 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14856 (hash_compare_symbol, hash_symbol): these.
14857 Use the fact that tags as struniqs.
14858 (symbol_get): Use struniq_new.
14859 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14860 Returns a strniq.
14861 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14862 and type members are struniqs.
14863 * src/reader.c (get_merge_function)
14864 (grammar_current_rule_merge_set): Adjust.
14865 (TYPE, current_type): Are struniq.
14866
14867 Use struniq for file names.
14868
14869 * src/files.h, src/files.c (infile): Split into...
14870 (grammar_file, current_file): these.
14871 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14872 * src/reduce.c (reduce_print): Likewise.
14873 * src/getargs.c (getargs): Likewise.
14874 * src/complain.h, src/complain.c: Likewise.
14875 * src/main.c (main): Call struniqs_new early enough to use it for
14876 file names.
14877 Don't free the input file name.
14878
14879 2002-11-12 Akim Demaille <akim@epita.fr>
14880
14881 * src/symtab.c (symbol_free): Remove dead deactivated code:
14882 type_name are properly removed.
14883 Don't use XFREE to free items that cannot be NULL.
14884 * src/struniq.h, src/struniq.c: New.
14885 * src/main.c (main): Initialize/free struniqs.
14886 * src/parse-gram.y (%union): Add astruniq member.
14887 (yyprint): Adjust.
14888 * src/scan-gram.l (<{tag}>): Return a struniq.
14889 Free the obstack bit that used to store it.
14890 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14891
14892 2002-11-11 Paul Eggert <eggert@twinsun.com>
14893
14894 Revamp to fix many (but not all) of the C- and M4-related quoting
14895 problems. Among other things, this fixes the Bison bug reported
14896 by Jan Hubicka when processing the Bash grammar; see:
14897 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14898
14899 Use new @ escapes consistently. Represent brackets with @{ and @}
14900 rather than @<:@ and @:>@, since this works a bit better with dumb
14901 editors like vi. Represent @ with @@, since @ is now consistently
14902 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14903 __ofile__, to avoid unexpected expansions. Similarly, use @output
14904 rather than #output.
14905
14906 * data/c.m4 (b4_copyright): Omit file name from comment, since
14907 the file name could contain "*/".
14908 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14909 be quoted. All uses changed.
14910
14911 * data/glr.c: Use new @ escapes consistently.
14912 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14913 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14914 Remove, since they couldn't handle arbitrary characters in file
14915 names.
14916 * data/lalr1.cc: Likewise.
14917 * data/yacc.c: Likewise.
14918
14919 * src/files.c (output_infix): Remove; all uses removed.
14920 * src/files.h: Likewise.
14921
14922 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14923 mishandled funny characters in file names, and anyway it isn't
14924 needed any more.
14925 * data/yacc.c: Likewise.
14926 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14927
14928 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14929 * data/yacc.c: Likewise.
14930
14931 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14932 strings now.
14933 (muscle_init): Quote filename as a C string.
14934 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14935 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14936 * src/output.c (escaped_file_name_output): New function.
14937 (prepare_symbols): Quote tokens for M4.
14938 (prepare): Don't insert output_infix, output_prefix,
14939 output_parser_name, output_header_name; this is now down by scan-skel.
14940 Insert skeleton as a C string.
14941
14942 * src/output.c (user_actions_output, symbol_destructors_output,
14943 symbol_printers_output): Quote filenames for C and M4.
14944 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14945
14946 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14947 escapes other than \\ and \'; this simplifies the code.
14948 (<SC_STRING>): Likewise, for \\ and \".
14949 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14950 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14951 Use new escapes @{ and @} for [ and ].
14952
14953 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14954 them with auto vars.
14955 Switch to new escape scheme, where @ is the escape character uniformly.
14956 Abort if a stray escape character is found. Avoid unbounded input
14957 buffer when parsing non-escaped text.
14958
14959 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14960 __oline__, #output, $@, and @{ do not have unintended meanings.
14961
14962 2002-11-09 Paul Eggert <eggert@twinsun.com>
14963
14964 Fix the test failure due to GCC warnings described in
14965 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14966 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14967 evaluate to 0 if it's impossible for NINF to be in the respective
14968 table.
14969 (yygetLRActions, yyrecoverParseError): Use them.
14970
14971 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14972 counted in the token inserted at end of file. Now takes
14973 location_t *, not location_t, so that the location can be
14974 adjusted. All uses changed.
14975
14976 * tests/regression.at (Invalid inputs): Adjust wording in
14977 diagnostic to match the new behavior.
14978
14979 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14980 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14981 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14982 abort ();'. This reduces the runtime of the "Many lookaheads"
14983 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14984 GCC 3.2.
14985
14986 2002-11-07 Paul Eggert <eggert@twinsun.com>
14987
14988 * src/parse-gram.y (CHARACTER): Remove unused token.
14989 All uses removed.
14990
14991 * src/scan-gram.l: Remove stack option. We no longer use the
14992 stack, since the stack was never deeper than 1; instead, use the
14993 new auto var c_context to record the stacked value.
14994
14995 Remove nounput option. At an unexpected end of file, we now unput
14996 the minimal input necessary to end cleanly; this simplifies the
14997 code.
14998
14999 Avoid unbounded token sizes where this is easy.
15000
15001 (unexpected_end_of_file): New function.
15002 Use it to systematize the error message on unexpected EOF.
15003 (last-string): Now auto, not static.
15004 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15005 (scanner_last_string_free): Remove; not used.
15006 (percent_percent_count): Move decl to just before use.
15007 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15008 not the (never otherwised-used) CHARACTER.
15009
15010 2002-11-07 Akim Demaille <akim@epita.fr>
15011
15012 Let yyerror always receive the msg as last argument, so that
15013 yyerror can be variadic.
15014
15015 * data/yacc.c (b4_yyerror_args): New.
15016 Use it when calling yyerror.
15017 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15018 Use it when calling yyerror.
15019 * doc/bison.texinfo (Error Reporting): Adjust.
15020 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15021 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15022
15023 2002-11-06 Akim Demaille <akim@epita.fr>
15024
15025 #line should have quoted strings.
15026 Ideally, this should be done by m4_quotearg.
15027
15028 * src/scan-skel.l: Include quotearg.h.
15029 Quote __ofile__.
15030 * src/output.c (symbol_printers_output)
15031 (symbol_destructors_output): Quote the file name.
15032
15033 2002-11-06 Akim Demaille <akim@epita.fr>
15034
15035 * tests/regression.at (Invalid inputs): Adjust to the recent
15036 messages.
15037
15038 2002-11-06 Akim Demaille <akim@epita.fr>
15039
15040 Restore --no-lines.
15041 Reported by Jim Kent.
15042
15043 * data/c.m4 (b4_syncline): New.
15044 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15045 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15046 * src/output.c (user_actions_output): Likewise.
15047 (prepare): Define 'b4_synclines_flag'.
15048 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15049
15050 2002-11-06 Akim Demaille <akim@epita.fr>
15051
15052 * src/main.c (main): Free `infile'.
15053 * src/scan-gram.l (handle_syncline): New.
15054 Recognize `#line'.
15055 * src/output.c (user_actions_output, symbol_destructors_output)
15056 (symbol_printers_output): Use the location's file name, not
15057 infile.
15058 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15059
15060 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15061
15062 * src/tables.c (matching_state): Don't allow states to match if
15063 either has GLR conflict entries.
15064
15065 2002-11-05 Paul Eggert <eggert@twinsun.com>
15066
15067 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15068 "integer out of range" rather than "invalid value".
15069 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15070 accordingly.
15071
15072 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15073 Also, remove one static variable in the scanner.
15074
15075 * src/scan-gram.l (braces_level): Now auto, not static.
15076 Initialize to zero if the compiler is being picky.
15077 (INITIAL): Clear braces_level instead of incrementing it.
15078 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15079 as POSIX 1003.1-2001 requires.
15080 * src/system.h (IF_LINT): New macro, taken from coreutils.
15081 * configure.ac: Define "lint" if --enable-gcc-warnings.
15082
15083 2002-11-05 Akim Demaille <akim@epita.fr>
15084
15085 * src/scan-gram.l: When it starts with `%', complain about the
15086 whole directive, not just that `invalid character: %'.
15087
15088 2002-11-04 Akim Demaille <akim@epita.fr>
15089
15090 * Makefile.maint: Update from Autoconf.
15091 (update, cvs-update, po-update, do-po-update): New.
15092
15093 2002-11-04 Akim Demaille <akim@epita.fr>
15094
15095 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15096 and yyerror.
15097 Have yyerror `use' its arguments.
15098 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15099 returns true when location & yacc & pure & parse-param.
15100 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15101
15102 2002-11-04 Akim Demaille <akim@epita.fr>
15103
15104 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15105 clashes.
15106 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15107 font-lock-mode.
15108 Use complain_at.
15109 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15110 slot 0.
15111
15112 2002-11-03 Paul Eggert <eggert@twinsun.com>
15113
15114 * src/reader.c (get_merge_function, grammar_current_rule_check):
15115 Use consistent diagnostics for reporting type name clashes.
15116 Quote the types with <>, for consistency with Yacc.
15117 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15118
15119 2002-11-03 Akim Demaille <akim@epita.fr>
15120
15121 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15122 New.
15123 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15124 (b4_parse_param): Remove.
15125 Use b4_identification.
15126 Propagate b4_pure_args where needed to pass them to yyerror.
15127 * data/glr.m4 (b4_parse_param): Remove.
15128 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15129 (b4_lpure_formals): New.
15130 Use b4_identification.
15131 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15132 b4_user_formals and b4_user_args.
15133 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15134 (yyreportAmbiguity): When using a pure parser, also need
15135 the location, and the parse-params.
15136 Adjust callers.
15137 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15138 When using a pure parser, also need the parse-params.
15139 Adjust callers.
15140 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15141 (%pure-parser + %parse-param) LALR and GLR parsers.
15142 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15143 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15144 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15145 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15146 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15147 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15148 * doc/bison.texinfo: Untabify the whole file.
15149 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15150 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15151 (Error Reporting): Adjust to these new directives.
15152 Document %error-verbose, deprecate YYERROR_VERBOSE.
15153
15154 2002-11-03 Akim Demaille <akim@epita.fr>
15155
15156 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15157 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15158 command line options.
15159 * tests/cxx-type.at: Formatting changes.
15160
15161 2002-11-03 Paul Eggert <eggert@twinsun.com>
15162
15163 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15164 to count columns correctly, and to check for invalid inputs.
15165
15166 Use mbsnwidth to count columns correctly. Account for tabs, too.
15167 Include mbswidth.h.
15168 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15169 (extend_location): New function.
15170 (YY_LINES): Remove.
15171
15172 Handle CRLF in C code rather than in Lex code.
15173 (YY_INPUT): New macro.
15174 (no_cr_read): New function.
15175
15176 Scan UCNs, even though we don't fully handle them yet.
15177 (convert_ucn_to_byte): New function.
15178
15179 Handle backslash-newline correctly in C code.
15180 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15181 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15182 all uses changed.
15183 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15184 Use {splice} wherever C allows backslash-newline.
15185 YY_STEP after space, newline, vertical-tab.
15186 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15187
15188 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15189
15190 ({int}, handle_action_dollar, handle_action_at): Check for integer
15191 overflow.
15192
15193 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15194
15195 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15196 as well as \000. Check for UCHAR_MAX, not 255.
15197 Allow \x with an arbitrary positive number of digits, as in C.
15198 Check for overflow here.
15199 Allow \? and UCNs, for compatibility with C.
15200
15201 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15202 with quote slot used by complain_at.
15203
15204 * tests/input.at: Add tests for backslash-newline, m4 quotes
15205 in symbols, long literals, and funny escapes in strings.
15206
15207 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15208 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15209 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15210 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15211 * m4/mbswidth.m4: New file, from GNU coreutils.
15212
15213 * doc/bison.texinfo (Grammar Outline): Document // comments.
15214 (Symbols): Document that trigraphs have no special meaning in Bison,
15215 nor is backslash-newline allowed.
15216 (Actions): Document that trigraphs have no special meaning.
15217
15218 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15219 no longer used.
15220
15221 2002-11-02 Paul Eggert <eggert@twinsun.com>
15222
15223 * src/reader.c: Don't include quote.h; not needed.
15224 (get_merge_function): Reword warning to be consistent with
15225 type clash diagnostic in grammar_current_rule_check.
15226
15227 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15228 bug in trigraph handling.
15229
15230 * src/output.c (prepare_symbols): When printing token names,
15231 escape "[" as "@<:@" and likewise for "]".
15232
15233 * src/system.h (errno): Remove declaration, as we are now
15234 assuming C89 or better, and C89 guarantees errno.
15235
15236 2002-10-30 Paul Eggert <eggert@twinsun.com>
15237
15238 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15239 Check for close failures.
15240 * src/files.h (xfclose): Return void, not int, since it always
15241 returned zero.
15242 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15243 indicates one.
15244 * src/output.c (output_skeleton): Use xfclose rather than fclose
15245 and ferror. xfclose now checks ferror.
15246
15247 * data/glr.c (YYLEFTMOST_STATE): Remove.
15248 (yyreportTree): Use a stack-based leftmost state. This avoids
15249 our continuing battles with bogus warnings about initializers.
15250
15251 2002-10-30 Akim Demaille <akim@epita.fr>
15252
15253 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15254 #if.
15255
15256 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15257
15258 * tests/glr-regr1.at: New test for reported regressions.
15259 * tests/testsuite.at: Add glr-regr1.at test.
15260 * tests/Makefile.am: Add glr-regr1.at test.
15261
15262 2002-10-24 Paul Eggert <eggert@twinsun.com>
15263
15264 Version 1.75a.
15265
15266 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15267 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15268 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15269 Don't assume strdup exists; POSIX says its an XSI extension.
15270 Check for buffer overflow on input.
15271
15272 2002-10-24 Akim Demaille <akim@epita.fr>
15273
15274 * src/output.c (output_skeleton): Don't disable M4sugar comments
15275 too soon: it results in comments being expanded.
15276 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15277 first output.
15278
15279 2002-10-24 Akim Demaille <akim@epita.fr>
15280
15281 * data/yacc.c (m4_int_type): New.
15282 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15283 char' as only yacc.c wants K&R portability.
15284 * data/glr.c (yysigned_char): Remove.
15285 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15286 Reported by Quoc Peyrot.
15287
15288 2002-10-23 Paul Eggert <eggert@twinsun.com>
15289
15290 * src/main.c (main): With --trace=time, report times even if a
15291 non-fatal error occurs. Formerly, the times were reported in some
15292 such cases but not in others.
15293 * src/reader.c (reader): Just return if a complaint has been issued,
15294 instead of exiting, so that 'main' can report times.
15295
15296 2002-10-22 Akim Demaille <akim@epita.fr>
15297
15298 * src/system.h: Include sys/types.
15299 Reported by Bert Deknuydt.
15300
15301 2002-10-23 Paul Eggert <eggert@twinsun.com>
15302
15303 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15304 Suggested by Art Haas.
15305
15306 2002-10-22 Paul Eggert <eggert@twinsun.com>
15307
15308 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15309 decl; not needed any more.
15310 * src/main.c (main): Use return to exit, undoing yesterday's change.
15311 The last OS that we could find where this wouldn't work is
15312 SunOS 3.5, and that's too old to worry about now.
15313
15314 * data/glr.c (struct yyltype): Define members even when not
15315 doing locations. This is more consistent with yacc.c, and it
15316 works around the following bug reports:
15317 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15318 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15319
15320 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15321 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15322 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15323
15324 2002-10-22 Akim Demaille <akim@epita.fr>
15325
15326 * data/README: New.
15327
15328 2002-10-21 Paul Eggert <eggert@twinsun.com>
15329
15330 Be consistent about 'bool'; the old code used an enum in one
15331 module and an int in another, and this violates the C standard.
15332 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15333 * configure.ac (AC_HEADER_STDBOOL): Add.
15334 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15335 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15336 * src/symtab.c (hash_compare_symbol_t): Likewise.
15337 * src/system.h (bool, false, true): Use a definition consistent
15338 with ../lib/hash.c. All uses changed.
15339
15340 * src/complain.c (warning_issued): Renamed from warn_message_count,
15341 so that we needn't worry about integer overflow (!).
15342 Now of type bool. All uses changed.
15343 (complaint_issued): Renamed from complain_message_count; likewise.
15344
15345 * src/main.c (main): Use exit to exit with failure.
15346
15347 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15348 rather than 1 and 0.
15349 * src/main.c (main): Likewise.
15350 * src/getargs.c (getargs): Likewise.
15351 * src/reader.c (reader): Likewise.
15352
15353 * src/getarg.c (getargs): Remove duplicate code for
15354 "Try `bison --help'".
15355
15356 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15357 What was that "2" for?
15358
15359 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15360 * src/getargs.c (usage): Likewise.
15361
15362 * src/getargs.c (getargs): When there are too few operands, report
15363 the last one. When there are too many, report the first extra
15364 one. This is how diffutils does it.
15365
15366 2002-10-20 Paul Eggert <eggert@twinsun.com>
15367
15368 Remove K&R vestiges.
15369 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15370 * src/complain.c (VA_START): Remove. Assume prototypes.
15371 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15372 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15373 fatal): Assume prototypes.
15374 * src/complain.h: Assume prototypes.
15375 * src/system.h (PARAMS): Remove.
15376 Include <limits.h> unconditionally, since it's guaranteeed even
15377 for a freestanding C89 compiler.
15378 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15379 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15380
15381 2002-10-20 Akim Demaille <akim@epita.fr>
15382
15383 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15384 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15385 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15386 (yyresolveStates, yyresolveAction, yyresolveStack)
15387 (yyprocessOneStack): Use them.
15388 (yy_reduce_print): New.
15389 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15390
15391 2002-10-20 Akim Demaille <akim@epita.fr>
15392
15393 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15394 arguments and output `void'.
15395 (b4_c_function): Rename as...
15396 (b4_c_function_def): this.
15397 (b4_c_function_decl, b4_c_ansi_function_def)
15398 (b4_c_ansi_function_decl): New.
15399 Change the interpretation of the arguments: before `int, foo', now
15400 `int foo, foo'.
15401 * data/yacc.c (yyparse): Prototype and define thanks to these.
15402 Adjust b4_c_function_def uses.
15403 * data/glr.c (yyparse): Likewise, but ANSI only.
15404
15405 2002-10-20 Akim Demaille <akim@epita.fr>
15406
15407 * src/output.c (prepare): Move the definition of `tokens_number',
15408 `nterms_number', `undef_token_number', `user_token_number_max'
15409 to...
15410 (prepare_tokens): Here.
15411 (prepare_tokens): Rename as...
15412 (prepare_symbols): this.
15413 (prepare): Move the definition of `rules_number' to...
15414 (prepare_rules): here.
15415 (prepare): Move the definition of `last', `final_state_number',
15416 `states_number' to...
15417 (prepare_states): here.
15418 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15419
15420 2002-10-20 Akim Demaille <akim@epita.fr>
15421
15422 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15423
15424 2002-10-20 Akim Demaille <akim@epita.fr>
15425
15426 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15427 * data/c.m4: here.
15428
15429 2002-10-20 Akim Demaille <akim@epita.fr>
15430
15431 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15432 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15433 `pair'.
15434 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15435 `name' to...
15436 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15437 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15438 These.
15439
15440 2002-10-19 Paul Eggert <eggert@twinsun.com>
15441
15442 Do not create a temporary file, as that involves security and
15443 cleanup headaches. Instead, use a pair of pipes.
15444 Derived from a suggestion by Florian Krohm.
15445 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15446 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15447 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15448 (BISON_PREREQ_SUBPIPE): Add.
15449 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15450 Add subpipe.h, subpipe.c.
15451 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15452 * po/POTFILES.in: Add lib/subpipe.c.
15453 * src/output.c: Include "subpipe.h".
15454 (m4_invoke): Remove decl.
15455 (scan_skel): New decl.
15456 (output_skeleton): Use pipe rather than temporary file for m4 input.
15457 Check that m4sugar.m4 is readable, to avoid deadlock.
15458 Check for pipe I/O error.
15459 * src/scan-skel.l (readpipe): Remove decl.
15460 (scan_skel): New function, to be used in place of m4_invoke.
15461 Read from stream rather than file.
15462
15463 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15464 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15465 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15466 this generates a more-accurate value anyway.
15467
15468 * lib/timevar.c (timervar_accumulate): Rename locals to
15469 avoid confusion with similarly-named more-global.
15470 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15471
15472 * src/output.c (prepare): Use xstrdup to convert char const *
15473 to char *, to avoid GCC warning.
15474
15475 2002-10-19 Akim Demaille <akim@epita.fr>
15476
15477 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15478 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15479 Use them to have `calc.y' ready for %pure-parser.
15480 * data/yacc.c (YYLEX): Pass a yylex return type to
15481 b4_c_function_call.
15482
15483 2002-10-19 Akim Demaille <akim@epita.fr>
15484
15485 Prototype support of %lex-param and %parse-param.
15486
15487 * src/parse-gram.y: Add the definition of the %lex-param and
15488 %parse-param tokens, plus their rules.
15489 Drop the `_' version of %glr-parser.
15490 Add the "," token.
15491 * src/scan-gram.l (INITIAL): Scan them.
15492 * src/muscle_tab.c: Comment changes.
15493 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15494 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15495 (muscle_entry_s): The `value' member is no longer const.
15496 Adjust all dependencies.
15497 * src/muscle_tab.c (muscle_init): Adjust: use
15498 MUSCLE_INSERT_STRING.
15499 Initialize the obstack earlier.
15500 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15501 (muscle_pair_list_grow): New.
15502 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15503 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15504 * tests/calc.at: Use %locations, not --locations.
15505 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15506
15507 2002-10-19 Akim Demaille <akim@epita.fr>
15508
15509 * src/getargs.c (usage): Take status as argument and exit
15510 accordingly.
15511 Report the traditional `Try ... --help' message when status != 0.
15512 (usage, version): Don't take a FILE * as arg, it is pointless.
15513 (getargs): When there is an incorrect number of arguments, make it
15514 an error, and report it GNUlically thanks to `usage ()'.
15515
15516 2002-10-18 Paul Eggert <eggert@twinsun.com>
15517
15518 * data/glr.c (yyreportParseError): Don't assume that sprintf
15519 yields the length of the printed string, as this is not true
15520 on SunOS 4.1.4. Reported by Peter Klein.
15521
15522 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15523 * tests/conflicts.at (%nonassoc and eof): Likewise.
15524 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15525
15526 2002-10-17 Akim Demaille <akim@epita.fr>
15527
15528 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15529 * src/getargs.c (trace_types, trace_args): Adjust.
15530 * src/reader.c (grammar_current_rule_prec_set)
15531 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15532 Standardize error messages.
15533 And s/@prec/%prec/!
15534 (reader): Use trace_flag to enable scanner/parser debugging,
15535 instead of an adhoc scheme.
15536 * src/scan-gram.l: Remove trailing debugging code.
15537
15538 2002-10-16 Paul Eggert <eggert@twinsun.com>
15539
15540 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15541 MUSCLE_TAB_H.
15542
15543 * NEWS: Officially drop support for building Bison with K&R C,
15544 since it didn't work anyway and it's not worth worrying about.
15545 * Makefile.maint (wget_files): Remove ansi2knr.c.
15546 (ansi2knr.c-url_prefix): Remove.
15547 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15548 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15549 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15550
15551 2002-10-15 Paul Eggert <eggert@twinsun.com>
15552
15553 Stop using the "enum_" trick for K&R-style function definitions;
15554 it confused me, and I was the author! Instead, assume that people
15555 who want to use K&R C compilers (when using these modules in GCC,
15556 perhaps?) will run ansi2knr.
15557
15558 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15559 All uses of "enum_" changed to "enum ".
15560 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15561 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15562
15563 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15564 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15565 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15566 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15567 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15568 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15569 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15570 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15571 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15572 Use function prototypes; this removes the need for declaring
15573 static functions simply to provide their prototypes.
15574 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15575 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15576 bitset_count_, bitset_create, bitset_dump, bitset_first,
15577 bitset_free, bitset_init, bitset_last, bitset_next,
15578 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15579 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15580 bitset_print, bitset_release_memory, bitset_toggle_,
15581 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15582 debug_bitset): Likewise.
15583 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15584 * lib/bitset_stats.c (bitset_log_histogram_print,
15585 bitset_percent_histogram_print, bitset_stats_and,
15586 bitset_stats_and_cmp, bitset_stats_and_or,
15587 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15588 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15589 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15590 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15591 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15592 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15593 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15594 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15595 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15596 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15597 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15598 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15599 bitset_stats_zero): Likewise.
15600 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15601 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15602 bitsetv_dump, debug_bitsetv): Likewise.
15603 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15604 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15605 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15606 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15607 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15608 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15609 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15610 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15611 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15612 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15613 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15614 Likewise.
15615 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15616 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15617 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15618 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15619 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15620 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15621 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15622 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15623 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15624 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15625 lbitset_xor_cmp, lbitset_zero): Likewise.
15626
15627 2002-10-14 Akim Demaille <akim@epita.fr>
15628
15629 Version 1.75.
15630
15631 2002-10-14 Akim Demaille <akim@epita.fr>
15632
15633 * tests/Makefile.am (maintainer-check-posix): New.
15634
15635 2002-10-14 Akim Demaille <akim@epita.fr>
15636
15637 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15638 member.
15639
15640 2002-10-14 Akim Demaille <akim@epita.fr>
15641
15642 * src/tables.c (table_ninf_remap): base -> tab.
15643 Reported by Matt Rosing.
15644
15645 2002-10-14 Paul Eggert <eggert@twinsun.com>
15646
15647 * tests/action.at, tests/calc.at, tests/conflicts.at,
15648 tests/cxx-type.at, tests/headers.at, tests/input.at,
15649 tests/regression.at, tests/synclines.at, tests/torture.at:
15650 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15651 so that the tests still work even if POSIXLY_CORRECT is set.
15652 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15653
15654 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15655 for portability to K&R hosts. Fix typo: signed char is guaranteed
15656 only to 127, not to 128.
15657 * data/glr.c (yysigned_char): New type.
15658 * data/yacc.c (yysigned_char): Likewise.
15659 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15660
15661 2002-10-13 Paul Eggert <eggert@twinsun.com>
15662
15663 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15664 true due to limited range of data type" warning from GCC.
15665
15666 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15667 by wrapping enum yytokentype's definition inside #ifndef
15668 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15669
15670 2002-10-13 Akim Demaille <akim@epita.fr>
15671
15672 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15673 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15674
15675 2002-10-13 Akim Demaille <akim@epita.fr>
15676
15677 * Makefile.maint: Update from Autoconf 2.54.
15678 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15679
15680 2002-10-13 Akim Demaille <akim@epita.fr>
15681
15682 * src/print.c (print_state): Separate the list of solved conflicts
15683 from the other items.
15684 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15685
15686 2002-10-13 Akim Demaille <akim@epita.fr>
15687
15688 Let nondeterministic skeletons be usable with deterministic
15689 tables.
15690
15691 With the patch, GAWK compiled by GCC without -O2 passes its test
15692 suite using a GLR parser driven by LALR tables. It fails with -O2
15693 because `struct stat' gives two different answers on my machine:
15694 88 (definition of an auto var) and later 96 (memset on this var).
15695 Hence the stack is badly corrumpted. The headers inclusion is to
15696 blame: if I move the awk.h inclusion before GLR's system header
15697 inclusion, the two struct stat have the same size.
15698
15699 * src/tables.c (pack_table): Always create conflict_table.
15700 (token_actions): Always create conflict_list.
15701 * data/glr.c (YYFLAG): Remove, unused.
15702
15703 2002-10-13 Akim Demaille <akim@epita.fr>
15704
15705 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15706 (O0FLAGS): New.
15707 (VALGRIND, GXX): New.
15708 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15709 * tests/bison.in: Run $PREBISON a pre-command.
15710 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15711 (maintainer-check-g++): New.
15712 * Makefile.am (maintainer-check): New.
15713
15714 2002-10-13 Akim Demaille <akim@epita.fr>
15715
15716 * data/glr.c: Formatting changes.
15717 Tweak some trace messages to match yacc.c's.
15718
15719 2002-10-13 Akim Demaille <akim@epita.fr>
15720
15721 GLR parsers sometimes raise parse errors instead of performing the
15722 default reduction.
15723 Reported by Charles-Henry de Boysson.
15724
15725 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15726 check the length of the traces when %glr.
15727 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15728 GLR's traces.
15729 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15730 Test GLR parsers.
15731 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15732 (yyltype): Remove the yy prefix from the member names.
15733 (yytable): Complete its comment.
15734 (yygetLRActions): Map error action number from YYTABLE from
15735 YYTABLE_NINF to 0.
15736 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15737 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15738 not satisfying as we could compare an YYACTION computed from
15739 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15740 only value for error actions.
15741 (yyreportParseError): In verbose parse error messages, don't issue
15742 `error' in the list of expected tokens.
15743 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15744 next action to perform to match glr.c's decoding.
15745 (yytable): Complete its comment.
15746
15747 2002-10-13 Paul Eggert <eggert@twinsun.com>
15748
15749 Fix problem reported by Henrik Grubbstroem in
15750 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15751 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15752 because the Bison parser reads the second action before reducing
15753 the first one.
15754 * src/scan-gram.l (rule_length): New static var.
15755 Use it to keep track of the rule length in the scanner, since
15756 we can't expect the parser to be in lock-step sync with the scanner.
15757 (handle_action_dollar, handle_action_at): Use this var.
15758 * tests/actions.at (Exotic Dollars): Test for the problem.
15759
15760 2002-10-12 Paul Eggert <eggert@twinsun.com>
15761
15762 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15763 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15764 Include <sys/time.h> when checking for clock_t and struct tms.
15765 Use same include order as source.
15766 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15767 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15768
15769 * lib/timevar.c: Update copyright date and clarify comments.
15770 (get_time) [IN_GCC]: Keep the GCC version for reference.
15771
15772 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15773 GCC version as of today, then merge Bison's changes.
15774 Change "GCC" to "Bison" in copyright notice. timevar.def's
15775 author is Akim, so change that too.
15776
15777 * src/reader.c (grammar_current_rule_check):
15778 Don't worry about the default action if $$ is untyped.
15779 Prevents bogus warnings reported by Jim Gifford in
15780 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15781
15782 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15783 * data/glr.c, data/lalr1.cc, data/yacc.c:
15784 Output token definitions before the first part of user declarations.
15785 Fixes compatibility problem reported by Jim Gifford for kbd in
15786 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15787
15788 2002-10-11 Paul Eggert <eggert@twinsun.com>
15789
15790 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15791 (yyparse): here. This undoes some of the 2002-07-25 change.
15792 Compatibility problem reported by Ralf S. Engelschall with
15793 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15794
15795 2002-10-11 Akim Demaille <akim@epita.fr>
15796
15797 * tests/regression.at Characters Escapes): New.
15798 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15799 characters.
15800 Reported by Jan Nieuwenhuizen.
15801
15802 2002-10-11 Akim Demaille <akim@epita.fr>
15803
15804 * po/id.po: New.
15805
15806 2002-10-10 Paul Eggert <eggert@twinsun.com>
15807
15808 Portability fixes for bitsets; this also avoids several GCC
15809 warnings.
15810
15811 * lib/abitset.c: Include <stddef.h>, for offsetof.
15812 * lib/lbitset.c: Likewise.
15813
15814 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15815 properly for vectors of objects. Do not assume that adding a
15816 header size to a multiple of a word size yields a value that is
15817 properly aligned for the whole union.
15818 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15819
15820 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15821 unique names for structures.
15822 * lib/ebitset.c (ebitset_bytes): Likewise.
15823 * lib/lbitset.c (lbitset_bytes): Likewise.
15824
15825 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15826 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15827 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15828 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15829 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15830 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15831 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15832 to improve the type-checking that GCC can do.
15833 * lib/bitset.c (bitset_op4_cmp): Likewise.
15834 * lib/bitset_stats.c (bitset_stats_count,
15835 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15836 bitset_stats_copy, bitset_stats_disjoint_p,
15837 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15838 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15839 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15840 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15841 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15842 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15843 bitset_stats_or_and_cmp): Likewise.
15844 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15845 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15846 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15847 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15848
15849 * lib/abitset.h: Include bitset.h, not bbitset.h.
15850 * lib/ebitset.h: Likewise.
15851 * lib/lbitset.h: Likewise.
15852
15853 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15854 All instances of parameters of type enum bitset_opts are now of
15855 type enum_bitset_opts, to conform to the C Standard, and similarly
15856 for enum_bitset_type.
15857 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15858 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15859
15860 Do not use "struct bitset_struct" to mean different things in
15861 different modules. Not only is this confusing, it violates
15862 the C Standard, which requires that structure types in different
15863 modules must be compatible if one is to be passed to the other.
15864 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15865 All instances of "struct bitset_struct *" replaced with "bitset".
15866 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15867 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15868 struct lbitset_struct, struct bitset_stats_struct): New types.
15869 All uses of struct bitset_struct changed to union bitset_union,
15870 etc.
15871 * lib/abitset.c (struct abitset_struct, abitset,
15872 struct bitset_struct): Remove.
15873 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15874 struct bitset_struct): Remove.
15875 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15876 bitset_struct): Remove.
15877 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15878 Likewise.
15879
15880 Do not call a function of type T using a call that assumes the
15881 function is of a different type U. Standard C requires that a
15882 function must be called with a type that is compatible with its
15883 definition.
15884 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15885 New decls.
15886 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15887 New functions.
15888 * lib/ebitset.c (PFV): Remove.
15889 * lib/lbitset.c (PFV): Likewise.
15890 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15891 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15892 decls.
15893 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15894 (ebitset_vtable): Use them.
15895 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15896 lbitset_xor): New functions.
15897 (lbitset_vtable): Use them.
15898
15899 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15900 Declare.
15901
15902 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15903 GCC warning.
15904 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15905 Use offsetof, for simplicity.
15906
15907 2002-10-06 Paul Eggert <eggert@twinsun.com>
15908
15909 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15910 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15911 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15912 which was inadvertently undone by the 2002-09-30 patch.
15913 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15914 the same width as int.
15915
15916 2002-10-04 Paul Eggert <eggert@twinsun.com>
15917
15918 Version 1.50.
15919
15920 * configure.ac (AC_INIT), NEWS: Increment version number.
15921
15922 * doc/bison.texinfo: Minor spelling, grammar, and white space
15923 fixes.
15924 (Symbols): Mention that any negative value returned from yylex
15925 signifies end-of-input. Warn about negative chars. Mention
15926 the portable Standard C character set.
15927
15928 The GNU coding standard says CFLAGS and YFLAGS are reserved
15929 for the installer to set.
15930 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15931 * src/Makefile.am (AM_CFLAGS): Likewise.
15932 (AM_YFLAGS): Renamed from YFLAGS.
15933
15934 Fix some MAX and MIN problems.
15935 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15936 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15937 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15938 * src/reader.c (reader): Use it.
15939
15940 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15941 POSIX 1003.1-2001 has removed fgrep.
15942
15943 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15944
15945 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15946 interpreted as signed.
15947 * lib/ebitset.c (ebitset_list): Fix bug.
15948
15949 2002-10-01 Paul Eggert <eggert@twinsun.com>
15950
15951 More fixes for 64-bit hosts and large bitsets.
15952
15953 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15954 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15955 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15956 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15957 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15958 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15959 bitset_count_): Likewise.
15960 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15961 bitset_first, bitset_last): Likewise.
15962 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15963 bitset_stats_list_reverse, bitset_stats_size,
15964 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15965 Likewise.
15966 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15967 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15968 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15969 bitsetv_reflexive_transitive_closure): Likewise.
15970 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15971 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15972 Likewise.
15973 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15974 Likewise.
15975
15976 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15977 Use size_t, not unsigned int, to count bytes.
15978 * lib/abitset.h (abitset_bytes): Likewise.
15979 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15980 Likewise.
15981 * lib/bitset.h (bitset_bytes): Likewise.
15982 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15983 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15984 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15985 * lib/ebitset.c (ebitset_bytes): Likewise.
15986 * lib/ebitset.h (ebitset_bytes): Likewise.
15987 * lib/lbitset.c (lbitset_bytes): Likewise.
15988 * lib/lbitset.h (lbitset_bytes): Likewise.
15989
15990 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15991 abitset_subset_p, abitset_disjoint_p, abitset_and,
15992 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15993 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15994 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15995 abitset_or_and, abitset_or_and_cmp):
15996 Use bitset_windex instead of unsigned int.
15997 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15998 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15999 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16000 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16001 Likewise.
16002 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16003
16004 * lib/bitset.c (bitset_print):
16005 Use proper printf formats for widths of integer types.
16006 * lib/bitset_stats.c (bitset_percent_histogram_print,
16007 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16008 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16009 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16010 * lib/lbitset.c (lbitset_bytes): Likewise.
16011
16012 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16013 BITSET_SIZE_MAX): New macros.
16014 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16015 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16016 to BITSET_WINDEX_MAX.
16017
16018 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16019 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16020 since we now return the bitset_bindex type (not int).
16021
16022 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16023 when computing sizes.
16024 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16025
16026 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16027 and avoid cast to unsigned.
16028
16029 2002-09-30 Akim Demaille <akim@epita.fr>
16030
16031 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16032 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16033 Updates from Michael Hayes.
16034
16035 2002-09-30 Art Haas <ahaas@neosoft.com>
16036
16037 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16038 invocations.
16039 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16040 defined.
16041
16042 2002-09-27 Akim Demaille <akim@epita.fr>
16043
16044 Version 1.49c.
16045
16046 2002-09-27 Akim Demaille <akim@epita.fr>
16047
16048 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16049 (Because of AC_LIBSOURCE).
16050
16051 2002-09-27 Akim Demaille <akim@epita.fr>
16052
16053 Playing with Autoscan.
16054
16055 * configure.ac: Remove the old LIBOBJ tweaks.
16056 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16057 * lib/strrchr.c: New.
16058 * lib/strtol.c: New, from the Coreutils 4.5.1.
16059
16060 2002-09-27 Akim Demaille <akim@epita.fr>
16061
16062 Playing with Autoscan.
16063
16064 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16065 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16066 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16067 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16068 Coreutils 4.5.1.
16069
16070 2002-09-24 Akim Demaille <akim@epita.fr>
16071
16072 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16073 (Frequently Asked Questions, Parser Stack Overflow): New.
16074
16075 2002-09-13 Akim Demaille <akim@epita.fr>
16076
16077 Playing with autoscan.
16078
16079 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16080 * src/files.c (skeleton_find): Remove, unused.
16081 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16082 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16083
16084 2002-09-13 Akim Demaille <akim@epita.fr>
16085
16086 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16087 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16088
16089 2002-09-13 Akim Demaille <akim@epita.fr>
16090
16091 * configure.ac: Require 2.54.
16092 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16093 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16094 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16095 Remove, provided by Autoconf macros.
16096
16097 2002-09-12 Akim Demaille <akim@epita.fr>
16098
16099 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16100
16101 2002-09-12 Akim Demaille <akim@epita.fr>
16102
16103 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16104 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16105 Reported by Martin Mokrejs.
16106
16107 2002-09-10 Akim Demaille <akim@epita.fr>
16108
16109 * src/parse-gram.y: Associate a human readable string to each
16110 token type.
16111 * tests/regression.at (Invalid inputs): Adjust.
16112
16113 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16114
16115 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16116 with an Autoconf-2.5x style configure.ac.
16117
16118 2002-09-06 Paul Eggert <eggert@twinsun.com>
16119
16120 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16121 exception applies only to yacc.c. This is a modification of a
16122 patch originally suggested by Akim Demaille.
16123
16124 2002-09-06 Akim Demaille <akim@epita.fr>
16125
16126 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16127 here to...
16128 * data/yacc.c: here.
16129
16130 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16131 LocationType.
16132 (b4_ltype): Default to yy::Location from location.hh.
16133
16134 2002-09-04 Jim Meyering <jim@meyering.net>
16135
16136 * data/yacc.c: Guard the declaration of yytoknum also with
16137 `#ifdef YYPRINT', so it is declared only when used.
16138
16139 2002-09-04 Akim Demaille <akim@epita.fr>
16140
16141 * configure.in: Rename as...
16142 * configure.ac: this.
16143 Bump to 1.49c.
16144
16145 2002-09-04 Akim Demaille <akim@epita.fr>
16146
16147 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16148 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16149 translate maintainer only messages.
16150
16151 2002-08-12 Paul Eggert <eggert@twinsun.com>
16152
16153 Version 1.49b.
16154
16155 * Makefile.am (SUBDIRS): Remove intl.
16156 (DISTCLEANFILES): Remove.
16157 * NEWS: Mention that GNU M4 is now required. Clarify what is
16158 meant by "larger grammars". Mention the pt_BR translation.
16159 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16160 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16161 Bump version from 0.11.2 to 0.11.5.
16162 (BISON_PREREQ_STAGE): Remove.
16163 (AM_GNU_GETTEXT): Use external gettext.
16164 (AC_OUTPUT): Remove intl/Makefile.
16165
16166 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16167
16168 * data/glr.c: Include string.h, for strlen.
16169 (yyreportParseError): Use size_t for yysize.
16170 (yy_yypstack): No longer nested inside yypstates, as nested
16171 functions are not portable. Do not assume size_t is the
16172 same width as int.
16173 (yypstates): Do not assume that ptrdiff_t is the same width
16174 as int, and similarly for yyposn and YYINDEX.
16175
16176 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16177
16178 * lib/Makefile.am (INCLUDES): Do not include from the intl
16179 directory, which has been removed.
16180 * src/Makefile.am (INCLUDES): Likewise.
16181
16182 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16183 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16184 New vars.
16185
16186 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16187 * tests/Makefile.am (EXTRA_DIST): Likewise.
16188
16189 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16190 Do not assume that bitset_windex is the same width as unsigned.
16191
16192 * lib/abitset.c (abitset_unused_clear): Do not assume that
16193 bitset_word is the same width as int.
16194 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16195 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16196 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16197 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16198 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16199
16200 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16201 portability to one's complement hosts!).
16202 * lib/ebitset.c (ebitset_op1): Likewise.
16203 * lib/lbitset.c (lbitset_op1): Likewise.
16204
16205 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16206 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16207 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16208 Sync with fileutils.
16209 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16210 lib/gettext.h: Sync with diffutils.
16211
16212 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16213 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16214
16215 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16216 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16217 check for void *.
16218
16219 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16220 size_t; the old version tried to do this but casted improperly.
16221 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16222 (bitset_test): Now returns int, not unsigned long.
16223
16224 * lib/bitset_stats.c: Include "gettext.h".
16225 (_): New macro.
16226 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16227 name locals "index", as it generates unnecessary warnings on some
16228 hosts that have an "index" function.
16229
16230 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16231 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16232 they need translation.
16233 * src/LR0.c (state_list_append, new_itemsets, get_state,
16234 append_states, generate_states): Likewise.
16235 * src/assoc.c (assoc_to_string): Likewise.
16236 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16237 * src/gram.c (grammar_dump): Likewise.
16238 * src/injections.c (injections_compute): Likewise.
16239 * src/lalr.c (lookaheads_print): Likewise.
16240 * src/relation.c (relation_transpose): Likewise.
16241 * src/scan-gram.l: Likewise.
16242 * src/tables.c (table_grow, pack_vector): Likewise.
16243
16244 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16245 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16246 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16247 * m4/mbstate_t.m4: Sync with fileutils.
16248 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16249
16250 * po/LINGUAS: Add pt_BR.
16251 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16252 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16253 lib/timevar.c.
16254 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16255 manual recommends.
16256 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16257
16258 * src/complain.c (strerror_r): Remove decl; not needed.
16259 (strerror): Use same pattern as ../lib/error.c.
16260
16261 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16262
16263 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16264
16265 * src/main.c (main): Cast result of bindtextdomain and textdomain
16266 to void, to avoid a GCC warning when --disable-nls is in effect.
16267
16268 * src/scan-gram.l: Use strings rather than escapes when possible,
16269 to minimize the number of warnings from xgettext.
16270 (handle_action_dollar, handle_action_at): Don't use isdigit,
16271 as it mishandles negative chars and it may not work as expected
16272 outside the C locale.
16273
16274 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16275 this is a GCC extension and is not portable to other compilers.
16276
16277 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16278 Do not include <ctype.h>; no longer needed.
16279 Do not include <malloc.h>; no longer needed (and generates
16280 warnings on OpenBSD 3.0).
16281
16282 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16283 it's not portable.
16284
16285 * tests/regression.at: Do not use 'cc -c input.c -o input';
16286 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16287
16288 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16289 exit status as failure, not just exit status 1. Sun C exits
16290 with status 2 sometimes.
16291
16292 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16293 Use it for the two large tests.
16294
16295 2002-08-02 Akim Demaille <akim@epita.fr>
16296
16297 * src/conflicts.c (conflicts_output): Don't output rules never
16298 reduced here, since anyway that computation doesn't work.
16299 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16300 (rule_useless_p, rule_never_reduced_p): New.
16301 (grammar_rules_partial_print): Use a filter instead of a range.
16302 Display the title only if needed.
16303 (grammar_rules_print): Adjust.
16304 (grammar_rules_never_reduced_report): New.
16305 * src/tables.c (action_row): Move the computation of rules never
16306 reduced to...
16307 (token_actions): here.
16308 * src/main.c (main): Make the parser before making the report, so
16309 that rules never reduced are computed.
16310 Call grammar_rules_never_reduced_report.
16311 * src/print.c (print_results): Report rules never reduced.
16312 * tests/conflicts.at, tests/reduce.at: Adjust.
16313
16314 2002-08-01 Akim Demaille <akim@epita.fr>
16315
16316 Instead of attaching lookaheads and duplicating the rules being
16317 reduced by a state, attach the lookaheads to the reductions.
16318
16319 * src/state.h (state_t): Remove the `lookaheads',
16320 `lookaheads_rule' member.
16321 (reductions_t): Add a `lookaheads' member.
16322 Use a regular array for the `rules'.
16323 * src/state.c (reductions_new): Initialize the lookaheads member
16324 to 0.
16325 (state_rule_lookaheads_print): Adjust.
16326 * src/state.h, src/state.c (state_reductions_find): New.
16327 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16328 (count_rr_conflicts): Adjust.
16329 * src/lalr.c (LArule): Remove.
16330 (add_lookback_edge): Adjust.
16331 (state_lookaheads_count): New.
16332 (states_lookaheads_initialize): Merge into...
16333 (initialize_LA): this.
16334 (lalr_free): Adjust.
16335 * src/main.c (main): Don't free nullable and derives too early: it
16336 is used by --verbose.
16337 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16338
16339 2002-08-01 Akim Demaille <akim@epita.fr>
16340
16341 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16342 `rule_number_t**'.
16343 (set_derives, free_derives): Rename as...
16344 (derives_compute, derives_free): this.
16345 Adjust all dependencies.
16346 * src/nullable.c (set_nullable, free_nullable): Rename as...
16347 (nullable_compute, nullable_free): these.
16348 (rule_list_t): Store rule_t *, not rule_number_t.
16349 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16350 pointers, instead of their numbers.
16351 * src/main.c (main): Call nullable_free, and derives_free earlier,
16352 as they were lo longer used.
16353
16354 2002-08-01 Akim Demaille <akim@epita.fr>
16355
16356 * lib/timevar.c (get_time): Include children time.
16357 * src/lalr.h (LA, LArule): Don't export them: used with the
16358 state_t.
16359 * src/lalr.c (LA, LArule): Static.
16360 * src/lalr.h, src/lalr.c (lalr_free): New.
16361 * src/main.c (main): Call it.
16362 * src/tables.c (pack_vector): Check whether loc is >= to the
16363 table_size, not >.
16364 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16365 (tables_generate): do it, since that's also it which allocates
16366 them.
16367 Don't free LA and LArule, main does.
16368
16369 2002-07-31 Akim Demaille <akim@epita.fr>
16370
16371 Separate parser tables computation and output.
16372
16373 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16374 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16375 (yydefgoto, yydefact, high): Move to...
16376 * src/tables.h, src/tables.c: here.
16377 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16378 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16379 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16380 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16381 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16382 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16383 (action_row, save_row, token_actions, save_column, default_goto)
16384 (goto_actions, sort_actions, matching_state, pack_vector)
16385 (table_ninf_remap, pack_table, prepare_actions): Move to...
16386 * src/tables.c: here.
16387 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16388 * src/output.c (token_actions, output_base, output_conflicts)
16389 (output_check): Merge into...
16390 (prepare_actions): this.
16391 (actions_output): Rename as...
16392 (user_actions_output): this.
16393 * src/main.c (main): Call tables_generate and tables_free.
16394
16395 2002-07-31 Akim Demaille <akim@epita.fr>
16396
16397 Steal GCC's --time-report support.
16398
16399 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16400 stolen/adjusted from GCC.
16401 * m4/stage.m4: Remove time related checks.
16402 * m4/timevar.m4: New.
16403 * configure.in: Adjust.
16404 * src/system.h: Adjust to using timevar.h.
16405 * src/getargs.h, src/getargs.c: Support trace_time for
16406 --trace=time.
16407 * src/main.c (stage): Remove.
16408 (main): Replace `stage' invocations with timevar calls.
16409 * src/output.c: Insert pertinent timevar calls.
16410
16411 2002-07-31 Akim Demaille <akim@epita.fr>
16412
16413 Let --trace have arguments.
16414
16415 * src/getargs.h (enum trace_e): New.
16416 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16417 (long_options, short_options): --trace/-T takes an optional
16418 argument.
16419 Change all the uses of trace_flag to reflect the new flags.
16420 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16421
16422 Strengthen `stage' portability.
16423
16424 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16425 * configure.in: Use it.
16426 Don't check for malloc.h and sys/times.h.
16427 * src/system.h: Include them when appropriate.
16428 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16429 times and struct tms are available.
16430
16431 2002-07-30 Akim Demaille <akim@epita.fr>
16432
16433 In verbose parse error message, don't report `error' as an
16434 expected token.
16435 * tests/actions.at (Printers and Destructors): Adjust.
16436 * tests/calc.at (Calculator $1): Adjust.
16437 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16438 error message, do not report the parser accepts the error token in
16439 that state.
16440
16441 2002-07-30 Akim Demaille <akim@epita.fr>
16442
16443 Normalize conflict related messages.
16444
16445 * src/complain.h, src/complain.c (warn, complain): New.
16446 * src/conflicts.c (conflicts_print): Use them.
16447 (conflict_report_yacc): New, extracted from...
16448 (conflicts_print): here.
16449 * tests/conflicts.at, tests/existing.at: Adjust.
16450
16451 2002-07-30 Akim Demaille <akim@epita.fr>
16452
16453 Report rules which are never reduced by the parser: those hidden
16454 by conflicts.
16455
16456 * src/LR0.c (save_reductions): Don't make the final state too
16457 different: save its reduction (accept) instead of having a state
16458 without any action (no shift or goto, no reduce).
16459 Note: the final state is now a ``regular'' state, i.e., the
16460 parsers now contain `reduce 0' as default reduction.
16461 Nevertheless, since they decide to `accept' when yystate =
16462 final_state, they still will not reduce rule 0.
16463 * src/print.c (print_actions, print_reduction): Adjust.
16464 * src/output.c (action_row): Track reduced rules.
16465 (token_actions): Report rules never reduced.
16466 * tests/conflicts.at, tests/regression.at: Adjust.
16467
16468 2002-07-30 Akim Demaille <akim@epita.fr>
16469
16470 `stage' was accidently included in a previous patch.
16471 Initiate its autoconfiscation.
16472
16473 * configure.in: Look for malloc.h and sys/times.h.
16474 * src/main.c (stage): Adjust.
16475 Report only when trace_flag.
16476
16477 2002-07-29 Akim Demaille <akim@epita.fr>
16478
16479 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16480 state_number_t.
16481 (errs_t): symbol_t*, not symbol_number_t.
16482 (reductions_t): rule_t*, not rule_number_t.
16483 (FOR_EACH_SHIFT): New.
16484 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16485 * src/print.c, src/print_graph.c: Adjust.
16486
16487 2002-07-29 Akim Demaille <akim@epita.fr>
16488
16489 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16490
16491 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16492 (endtoken, accept): these.
16493 * src/reader.c (reader): Set endtoken's default tag to "$end".
16494 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16495 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16496 Adjust.
16497
16498 2002-07-29 Akim Demaille <akim@epita.fr>
16499
16500 * src/reduce.c (reduce_grammar): When the language is empty,
16501 complain about the start symbol, not the axiom.
16502 Use its location.
16503 * tests/reduce.at (Empty Language): New.
16504
16505 2002-07-26 Akim Demaille <akim@epita.fr>
16506
16507 * src/reader.h, src/reader.c (gram_error): ... can't get
16508 yycontrol without making too strong assumptions on the parser
16509 itself.
16510 * src/output.c (prepare_tokens): Use the real 0th value of
16511 token_translations instead of `0'.
16512 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16513 visible here.
16514 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16515 for the time being: %locations ought to provide it to yyerror.
16516
16517 2002-07-25 Akim Demaille <akim@epita.fr>
16518
16519 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16520 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16521 * tests/regression.at (Web2c Actions): Adjust.
16522
16523 2002-07-25 Akim Demaille <akim@epita.fr>
16524
16525 Stop storing rules from 1 to nrules + 1.
16526
16527 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16528 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16529 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16530 Iterate from 0 to nrules.
16531 Use rule_number_as_item_number and item_number_as_rule_number.
16532 Adjust to `derive' now containing possibly 0.
16533 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16534 Handle the `- 1' part in rule numbers from/to item numbers.
16535 * src/conflicts.c (log_resolution): Fix the message which reversed
16536 shift and reduce.
16537 * src/output.c (action_row): Initialize default_rule to -1.
16538 (token_actions): Adjust.
16539 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16540 expected output.
16541 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16542
16543 2002-07-25 Akim Demaille <akim@epita.fr>
16544
16545 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16546 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16547 (b4_c_knr_arg_decl): New.
16548 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16549 yyreport_parse_error.
16550
16551 2002-07-25 Akim Demaille <akim@epita.fr>
16552
16553 * data/yacc.c (yyreport_parse_error): New, extracted from...
16554 (yyparse): here.
16555 (yydestruct, yysymprint): Move above yyparse.
16556 Be K&R compliant.
16557
16558 2002-07-25 Akim Demaille <akim@epita.fr>
16559
16560 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16561 replace...
16562 (b4_sint_type, b4_uint_type): these.
16563 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16564 * tests/regression.at (Web2c Actions): Adjust.
16565
16566 2002-07-25 Akim Demaille <akim@epita.fr>
16567
16568 * src/gram.h (TIEM_NUMBER_MAX): New.
16569 (item_number_of_rule_number, rule_number_of_item_number): Rename
16570 as...
16571 (rule_number_as_item_number, item_number_as_rule_number): these.
16572 Adjust dependencies.
16573 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16574 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16575 (symbol_number_to_vector_number): New.
16576 (order): Of vector_number_t* type.
16577 (base_t, BASE_MAX, BASE_MIN): New.
16578 (froms, tos, width, pos, check): Of base_t type.
16579 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16580 (actrow): Of action_number_t type.
16581 (conflrow): Of unsigned int type.
16582 (table_ninf, base_ninf): New.
16583 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16584 (muscle_insert_int_table, muscle_insert_base_table)
16585 (muscle_insert_rule_number_table): New.
16586 (prepare_tokens): Output `toknum' as int_table.
16587 (action_row): Returns a rule_number_t.
16588 Use ACTION_MIN, not SHRT_MIN.
16589 (token_actions): yydefact is rule_number_t*.
16590 (table_ninf_remap): New.
16591 (pack_table): Use it for `base' and `table'.
16592 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16593 replaced with...
16594 (YYPACT_NINF, YYTABLE_NINF): these.
16595 (yypact, yytable): Compute their types instead of hard-coded
16596 `short'.
16597 * tests/regression.at (Web2c Actions): Adjust.
16598
16599 2002-07-19 Akim Demaille <akim@epita.fr>
16600
16601 * src/scan-gram.l (id): Can start with an underscore.
16602
16603 2002-07-16 Akim Demaille <akim@epita.fr>
16604
16605 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16606 Adjust all former `associativity' dependencies.
16607 * src/symtab.c (symbol_new): Default associativity is `undef', not
16608 `right'.
16609 (symbol_check_alias_consistence): Adjust.
16610
16611 2002-07-09 Akim Demaille <akim@epita.fr>
16612
16613 * doc/bison.texinfo: Properly set the ``header'' part.
16614 Use @dircategory ``GNU programming tools'' as per Texinfo's
16615 documentation.
16616 Use @copying.
16617
16618 2002-07-09 Akim Demaille <akim@epita.fr>
16619
16620 * lib/quotearg.h: Protect against multiple inclusions.
16621 * src/location.h (location_t): Add a `file' member.
16622 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16623 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16624 `error_one_per_line' support.
16625
16626 2002-07-09 Akim Demaille <akim@epita.fr>
16627
16628 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16629 * src/reader.c (lineno): Remove.
16630 Adjust all dependencies.
16631 (get_merge_function): Take a location and use complain_at.
16632 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16633 * tests/regression.at (Invalid inputs, Mixing %token styles):
16634 Adjust.
16635
16636 2002-07-09 Akim Demaille <akim@epita.fr>
16637
16638 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16639 recovery rule, and forbid extensions when --yacc.
16640 (gram_error): Use complain_at.
16641 * src/reader.c (reader): Exit if there were parse errors.
16642
16643 2002-07-09 Akim Demaille <akim@epita.fr>
16644
16645 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16646 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16647 Reported by R Blake <blakers@mac.com>.
16648
16649 2002-07-09 Akim Demaille <akim@epita.fr>
16650
16651 * data/yacc.c: Output the copyright notive in the header.
16652
16653 2002-07-03 Akim Demaille <akim@epita.fr>
16654
16655 * src/output.c (froms, tos): Are state_number_t.
16656 (save_column): sp, sp1, and sp2 are state_number_t.
16657 (prepare): Rename `final' as `final_state_number', `nnts' as
16658 `nterms_number', `nrules' as `rules_number', `nstates' as
16659 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16660 unused.
16661 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16662 * data/lalr1.cc (nsym_): Remove, unused.
16663
16664 2002-07-03 Akim Demaille <akim@epita.fr>
16665
16666 * src/lalr.h, src/lalr.c (goto_number_t): New.
16667 * src/lalr.c (goto_list_t): New.
16668 Propagate them.
16669 * src/nullable.c (rule_list_t): New.
16670 Propagate.
16671 * src/types.h: Remove.
16672
16673 2002-07-03 Akim Demaille <akim@epita.fr>
16674
16675 * src/closure.c (print_fderives): Use rule_rhs_print.
16676 * src/derives.c (print_derives): Use rule_rhs_print.
16677 (rule_list_t): New, replaces `shorts'.
16678 (set_derives): Add comments.
16679 * tests/sets.at (Nullable, Firsts): Adjust.
16680
16681 2002-07-03 Akim Demaille <akim@epita.fr>
16682
16683 * src/output.c (prepare_actions): Free `tally' and `width'.
16684 (prepare_actions): Allocate and free `order'.
16685 * src/symtab.c (symbols_free): Free `symbols'.
16686 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16687 * src/output.c (m4_invoke): Move to...
16688 * src/scan-skel.l: here.
16689 (<<EOF>>): Close yyout, and free its name.
16690
16691 2002-07-03 Akim Demaille <akim@epita.fr>
16692
16693 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16694
16695 * src/LR0.c (new_state): Merge into...
16696 (state_list_append): this.
16697 (new_states): Merge into...
16698 (generate_states): here.
16699 (set_states): Don't ensure a proper `errs' state member here, do it...
16700 * src/conflicts.c (conflicts_solve): here.
16701 * src/state.h, src/state.c: Comment changes.
16702 (state_t): Rename member `shifts' as `transitions'.
16703 Adjust all dependencies.
16704 (errs_new): For consistency, also take the values as argument.
16705 (errs_dup): Remove.
16706 (state_errs_set): New.
16707 (state_reductions_set, state_transitions_set): Assert that no
16708 previous value was assigned.
16709 (state_free): New.
16710 (states_free): Use it.
16711 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16712 temporary storage: use `errs' and `nerrs' as elsewhere.
16713 (set_conflicts): Allocate and free this `errs'.
16714
16715 2002-07-02 Akim Demaille <akim@epita.fr>
16716
16717 * lib/libiberty.h: New.
16718 * lib: Update the bitset implementation from upstream.
16719 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16720 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16721 * src/main.c: Adjust bitset stats calls.
16722
16723 2002-07-01 Paul Eggert <eggert@twinsun.com>
16724
16725 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16726 char, so that negative chars don't collide with $.
16727
16728 2002-06-30 Akim Demaille <akim@epita.fr>
16729
16730 Have the GLR tests be `warning' checked, and fix the warnings.
16731
16732 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16733 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16734 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16735 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16736 (yyaddDeferredAction): static.
16737 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16738 (yyreportParseError): yyprefix is const.
16739 yytokenp is used only when verbose.
16740 (yy__GNUC__): Replace with __GNUC__.
16741 (yypdumpstack): yyi is size_t.
16742 (yypreference): Un-yy local variables and arguments, to avoid
16743 clashes with `yyr1'. Anyway, we are not in the user name space.
16744 (yytname_size): be an int, as is compared with ints.
16745 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16746 Use them.
16747 * tests/cxx-gram.at: Use quotation to protect $1.
16748 Use AT_COMPILE to enable warnings hunts.
16749 Prototype yylex and yyerror.
16750 `Use' argc.
16751 Include `string.h', not `strings.h'.
16752 Produce and prototype stmtMerge only when used.
16753 yylex takes a location.
16754
16755 2002-06-30 Akim Demaille <akim@epita.fr>
16756
16757 We spend a lot of time in quotearg, in particular when --verbose.
16758
16759 * src/symtab.c (symbol_get): Store a quoted version of the key.
16760 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16761 Adjust all callers.
16762
16763 2002-06-30 Akim Demaille <akim@epita.fr>
16764
16765 * src/state.h (reductions_t): Rename member `nreds' as num.
16766 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16767 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16768
16769 2002-06-30 Akim Demaille <akim@epita.fr>
16770
16771 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16772 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16773 (shifts_to): Rename as...
16774 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16775 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16776 (TRANSITION_IS_DISABLED, transitions_to): these.
16777
16778 2002-06-30 Akim Demaille <akim@epita.fr>
16779
16780 * src/print.c (print_shifts, print_gotos): Merge into...
16781 (print_transitions): this.
16782 (print_transitions, print_errs, print_reductions): Align the
16783 lookaheads columns.
16784 (print_core, print_transitions, print_errs, print_state,
16785 print_grammar): Output empty lines separator before, not after.
16786 (state_default_rule_compute): Rename as...
16787 (state_default_rule): this.
16788 * tests/conflicts.at (Defaulted Conflicted Reduction),
16789 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16790 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16791
16792 2002-06-30 Akim Demaille <akim@epita.fr>
16793
16794 Display items as we display rules.
16795
16796 * src/gram.h, src/gram.c (rule_lhs_print): New.
16797 * src/gram.c (grammar_rules_partial_print): Use it.
16798 * src/print.c (print_core): Likewise.
16799 * tests/conflicts.at (Defaulted Conflicted Reduction),
16800 (Unresolved SR Conflicts): Adjust.
16801 (Unresolved SR Conflicts): Adjust and rename as...
16802 (Resolved SR Conflicts): this, as was meant.
16803 * tests/regression.at (Web2c Report): Adjust.
16804
16805 2002-06-30 Akim Demaille <akim@epita.fr>
16806
16807 * src/print.c (state_default_rule_compute): New, extracted from...
16808 (print_reductions): here.
16809 Pessimize, but clarify the code.
16810 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16811
16812 2002-06-30 Akim Demaille <akim@epita.fr>
16813
16814 * src/output.c (action_row): Let default_rule be always a rule
16815 number.
16816
16817 2002-06-30 Akim Demaille <akim@epita.fr>
16818
16819 * src/closure.c (print_firsts, print_fderives, closure):
16820 Use BITSET_EXECUTE.
16821 * src/lalr.c (lookaheads_print): Likewise.
16822 * src/state.c (state_rule_lookaheads_print): Likewise.
16823 * src/print_graph.c (print_core): Likewise.
16824 * src/print.c (print_reductions): Likewise.
16825 * src/output.c (action_row): Likewise.
16826 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16827
16828 2002-06-30 Akim Demaille <akim@epita.fr>
16829
16830 * src/print_graph.c: Use report_flag.
16831
16832 2002-06-30 Akim Demaille <akim@epita.fr>
16833
16834 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16835 to...
16836 * src/relation.h, src/relation.c (traverse, relation_digraph)
16837 (relation_print, relation_transpose): New.
16838
16839 2002-06-30 Akim Demaille <akim@epita.fr>
16840
16841 * src/state.h, src/state.c (shifts_to): New.
16842 * src/lalr.c (build_relations): Use it.
16843
16844 2002-06-30 Akim Demaille <akim@epita.fr>
16845
16846 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16847 (item_number_of_rule_number, rule_number_of_item_number): New.
16848 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16849 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16850 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16851 Propagate their use.
16852 Much remains to be done, in particular wrt `shorts' from types.h.
16853
16854 2002-06-30 Akim Demaille <akim@epita.fr>
16855
16856 * src/symtab.c (symbol_new): Initialize the `printer' member.
16857
16858 2002-06-30 Akim Demaille <akim@epita.fr>
16859
16860 * src/LR0.c (save_reductions): Remove, replaced by...
16861 * src/state.h, src/state.c (state_reductions_set): New.
16862 (reductions, errs): Rename as...
16863 (reductions_t, errs_t): these.
16864 Adjust all dependencies.
16865
16866 2002-06-30 Akim Demaille <akim@epita.fr>
16867
16868 * src/LR0.c (state_list_t, state_list_append): New.
16869 (first_state, last_state): Now symbol_list_t.
16870 (this_state): Remove.
16871 (new_itemsets, append_states, save_reductions): Take a state_t as
16872 argument.
16873 (set_states, generate_states): Adjust.
16874 (save_shifts): Remove, replaced by...
16875 * src/state.h, src/state.c (state_shifts_set): New.
16876 (shifts): Rename as...
16877 (shifts_t): this.
16878 Adjust all dependencies.
16879 * src/state.h (state_t): Remove the `next' member.
16880
16881 2002-06-30 Akim Demaille <akim@epita.fr>
16882
16883 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16884 escaped in slot 0.
16885
16886 2002-06-30 Akim Demaille <akim@epita.fr>
16887
16888 Use hash.h for the state hash table.
16889
16890 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16891 (allocate_storage): Use state_hash_new.
16892 (free_storage): Use state_hash_free.
16893 (new_state, get_state): Adjust.
16894 * src/lalr.h, src/lalr.c (states): Move to...
16895 * src/states.h (state_t): Remove the `link' member, no longer
16896 used.
16897 * src/states.h, src/states.c: here.
16898 (state_hash_new, state_hash_free, state_hash_lookup)
16899 (state_hash_insert, states_free): New.
16900 * src/states.c (state_table, state_compare, state_hash): New.
16901 * src/output.c (output_actions): Do not free states now, since we
16902 still need to know the final_state number in `prepare', called
16903 afterwards. Do it...
16904 * src/main.c (main): here: call states_free after `output'.
16905
16906 2002-06-30 Akim Demaille <akim@epita.fr>
16907
16908 * src/state.h, src/state.c (state_new): New, extracted from...
16909 * src/LR0.c (new_state): here.
16910 * src/state.h (STATE_ALLOC): Move to...
16911 * src/state.c: here.
16912 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16913 * src/state.h, src/state.c: here.
16914
16915 2002-06-30 Akim Demaille <akim@epita.fr>
16916
16917 * src/reader.c (gensym): Rename as...
16918 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16919 (getsym): Rename as...
16920 (symbol_get): this.
16921
16922 2002-06-30 Akim Demaille <akim@epita.fr>
16923
16924 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16925 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16926 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16927 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16928
16929 2002-06-30 Akim Demaille <akim@epita.fr>
16930
16931 Make the test suite pass with warnings checked.
16932
16933 * tests/actions.at (Printers and Destructors): Improve.
16934 Avoid unsigned vs. signed issues.
16935 * tests/calc.at: Don't exercise the scanner here, do it...
16936 * tests/input.at (Torturing the Scanner): here.
16937
16938 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16939
16940 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16941 reorganize first lines parallel to yacc.c.
16942
16943 2002-06-28 Akim Demaille <akim@epita.fr>
16944
16945 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16946 (b4_token_enum, b4_token_defines): New, factored from...
16947 * data/lalr1.cc, data/yacc.c, glr.c: here.
16948
16949 2002-06-28 Akim Demaille <akim@epita.fr>
16950
16951 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16952 unused variables.
16953 * src/output.c (merger_output): static.
16954
16955 2002-06-28 Akim Demaille <akim@epita.fr>
16956
16957 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16958 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16959 pacify GCC.
16960 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16961
16962 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16963
16964 Accumulated changelog for new GLR parsing features.
16965
16966 * src/conflicts.c (count_total_conflicts): Change name to
16967 conflicts_total_count.
16968 * src/conflicts.h: Ditto.
16969 * src/output.c (token_actions): Use the new name.
16970 (output_conflicts): Change conflp => conflict_list_heads, and
16971 confl => conflict_list for better readability.
16972 * data/glr.c: Use the new names.
16973 * NEWS: Add self to GLR announcement.
16974
16975 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16976
16977 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16978 Akim Demaille.
16979
16980 * data/bison.glr: Change name to glr.c
16981 * data/glr.c: Renamed from bison.glr.
16982 * data/Makefile.am: Add glr.c
16983
16984 * src/getargs.c:
16985
16986 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16987 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16988
16989 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16990
16991 * data/bison.glr: Be sure to restore the
16992 current #line when returning to the skeleton contents after having
16993 exposed the input file's #line.
16994
16995 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16996
16997 * data/bison.glr: Bring up to date with changes to bison.simple.
16998
16999 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17000
17001 * data/bison.glr: Correct definitions that use b4_prefix.
17002 Various reformatting.
17003 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17004 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17005 yytokenp argument; now part of stack.
17006 (yychar): Define to behave as documented.
17007 (yyclearin): Ditto.
17008
17009 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17010
17011 * src/reader.h: Add declaration for free_merger_functions.
17012
17013 * src/reader.c (merge_functions): New variable.
17014 (get_merge_function): New function.
17015 (free_merger_functions): New function.
17016 (readgram): Check for %prec that is not followed by a symbol.
17017 Handle %dprec and %merge declarations.
17018 (packgram): Initialize dprec and merger fields in rules array.
17019
17020 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17021 conflict_list_cnt, conflict_list_free): New variables.
17022 (table_grow): Also grow conflict_table.
17023 (prepare_rules): Output dprec and merger tables.
17024 (conflict_row): New function.
17025 (action_row): Output conflict lists for GLR parser. Don't use
17026 default reduction in conflicted states for GLR parser so that there
17027 are spaces for the conflict lists.
17028 (save_row): Also save conflict information.
17029 (token_actions): Allocate conflict list.
17030 (merger_output): New function.
17031 (pack_vector): Pack conflict table, too.
17032 (output_conflicts): New function to output yyconflp and yyconfl.
17033 (output_check): Allocate conflict_tos.
17034 (output_actions): Output conflict tables, also.
17035 (output_skeleton): Output b4_mergers definition.
17036 (prepare): Output b4_max_rhs_length definition.
17037 Use 'bison.glr' as default skeleton for GLR parsers.
17038
17039 * src/gram.c (glr_parser): New flag.
17040 (grammar_free): Call free_merger_functions.
17041
17042 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17043 all pairs of conflicting reductions, rather than just all tokens
17044 causing conflicts. Needed to size conflict tables.
17045 (conflicts_output): Modify call to count_rr_conflicts for new
17046 interface.
17047 (conflicts_print): Ditto.
17048 (count_total_conflicts): New function.
17049
17050 * src/reader.h (merger_list): New type.
17051 (merge_functions): New variable.
17052
17053 * src/lex.h (tok_dprec, tok_merge): New token types.
17054
17055 * src/gram.h (rule_s): Add dprec and merger fields.
17056 (glr_parser): New flag.
17057
17058 * src/conflicts.h (count_total_conflicts): New function.
17059
17060 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17061
17062 * doc/bison.texinfo (Generalized LR Parsing): New section.
17063 (GLR Parsers): New section.
17064 (Language and Grammar): Mention GLR parsing.
17065 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17066 Correct typo ("tge" -> "the").
17067
17068 * data/bison.glr: New skeleton for GLR parsing.
17069
17070 * tests/cxx-gram.at: New tests for GLR parsing.
17071
17072 * tests/testsuite.at: Include cxx-gram.at.
17073
17074 * tests/Makefile.am: Add cxx-gram.at.
17075
17076 * src/parse-gram.y:
17077
17078 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17079
17080 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17081
17082 2002-06-27 Akim Demaille <akim@epita.fr>
17083
17084 * src/options.h, src/options.c: Remove.
17085 * src/getargs.c (short_options, long_options): New.
17086
17087 2002-06-27 Akim Demaille <akim@epita.fr>
17088
17089 * data/bison.simple, data/bison.c++: Rename as...
17090 * data/yacc.c, data/lalr1.cc: these.
17091 * doc/bison.texinfo (Environment Variables): Remove.
17092
17093 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17094
17095 * src/getargs.c (report_argmatch): Initialize strtok().
17096
17097 2002-06-20 Akim Demaille <akim@epita.fr>
17098
17099 * data/bison.simple (b4_symbol_actions): New, replaces...
17100 (b4_symbol_destructor, b4_symbol_printer): these.
17101 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17102 user token numbers.
17103
17104 2002-06-20 Akim Demaille <akim@epita.fr>
17105
17106 * data/bison.simple (yydestructor): Rename as...
17107 (yydestruct): this.
17108
17109 2002-06-20 Akim Demaille <akim@epita.fr>
17110
17111 * src/symtab.h, src/symtab.c (symbol_type_set)
17112 (symbol_destructor_set, symbol_precedence_set): The location is
17113 the last argument.
17114 Adjust all callers.
17115
17116 2002-06-20 Akim Demaille <akim@epita.fr>
17117
17118 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17119 internals.
17120 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17121 Takes a location.
17122 * src/symtab.h, src/symtab.c (symbol_class_set)
17123 (symbol_user_token_number_set): Likewise.
17124 Adjust all callers.
17125 Promote complain_at.
17126 * tests/input.at (Type Clashes): Adjust.
17127
17128 2002-06-20 Akim Demaille <akim@epita.fr>
17129
17130 * data/bison.simple (YYLEX): Fix the declaration when
17131 %pure-parser.
17132
17133 2002-06-20 Akim Demaille <akim@epita.fr>
17134
17135 * data/bison.simple (yysymprint): Don't print the token number,
17136 just its name.
17137 * tests/actions.at (Destructors): Rename as...
17138 (Printers and Destructors): this.
17139 Also exercise %printer.
17140
17141 2002-06-20 Akim Demaille <akim@epita.fr>
17142
17143 * data/bison.simple (YYDSYMPRINT): New.
17144 Use it to remove many of the #if YYDEBUG/if (yydebug).
17145
17146 2002-06-20 Akim Demaille <akim@epita.fr>
17147
17148 * src/symtab.h, src/symtab.c (symbol_t): printer and
17149 printer_location are new members.
17150 (symbol_printer_set): New.
17151 * src/parse-gram.y (PERCENT_PRINTER): New token.
17152 Handle its associated rule.
17153 * src/scan-gram.l: Adjust.
17154 (handle_destructor_at, handle_destructor_dollar): Rename as...
17155 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17156 * src/output.c (symbol_printers_output): New.
17157 (output_skeleton): Call it.
17158 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17159 since there are already many grammar files with a user `yyprint'.
17160 Replace the calls to YYPRINT to calls to yysymprint.
17161 * tests/calc.at: Adjust.
17162 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17163 taking advantage of parser very internal details (stack size!).
17164
17165 2002-06-20 Akim Demaille <akim@epita.fr>
17166
17167 * src/scan-gram.l: Complete the scanner with the missing patterns
17168 to pacify Flex.
17169 Use `quote' and `symbol_tag_get' where appropriate.
17170
17171 2002-06-19 Akim Demaille <akim@epita.fr>
17172
17173 * tests/actions.at (Destructors): Augment to test locations.
17174 * data/bison.simple (yydestructor): Pass it the current location
17175 if locations are enabled.
17176 Prototype only when __STDC__ or C++.
17177 Change the argument names to move into the yy name space: there is
17178 user code here.
17179
17180 2002-06-19 Akim Demaille <akim@epita.fr>
17181
17182 * data/bison.simple (b4_pure_if): New.
17183 Use it instead of #ifdef YYPURE.
17184
17185 2002-06-19 Akim Demaille <akim@epita.fr>
17186
17187 * data/bison.simple (b4_location_if): New.
17188 Use it instead of #ifdef YYLSP_NEEDED.
17189
17190 2002-06-19 Akim Demaille <akim@epita.fr>
17191
17192 Prepare @$ in %destructor, but currently don't bind it in the
17193 skeleton, as %location use is not cleaned up yet.
17194
17195 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17196 (handle_action_at): New.
17197 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17198 a braced_code_t and a location as additional arguments.
17199 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17200 unquote one when outputting `b4_dollar_dollar'.
17201 Adjust callers.
17202 * data/bison.simple (b4_eval): Remove.
17203 (b4_symbol_destructor): Adjust.
17204 * tests/input.at (Invalid @n): Adjust.
17205
17206 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17207
17208 * doc/bison.texinfo: Document ability to have multiple
17209 prologue sections.
17210
17211 2002-06-18 Akim Demaille <akim@epita.fr>
17212
17213 * src/files.c (compute_base_names): When computing the output file
17214 names from the input file name, strip the directory part.
17215
17216 2002-06-18 Akim Demaille <akim@epita.fr>
17217
17218 * data/bison.simple.new: Comment changes.
17219 Reported by Andreas Schwab.
17220
17221 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17222
17223 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17224 there are no `label `yyoverflowlab' defined but not used' warnings
17225 when yyoverflow is defined.
17226
17227 2002-06-18 Akim Demaille <akim@epita.fr>
17228
17229 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17230 new member.
17231 (symbol_destructor_set): Adjust.
17232 * src/output.c (symbol_destructors_output): Output the destructor
17233 locations.
17234 Output the symbol name.
17235 * data/bison.simple (b4_symbol_destructor): Adjust.
17236
17237 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17238 and Akim Demaille <akim@epita.fr>
17239
17240 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17241 what's left on the stack when the error recovery hits EOF.
17242 * tests/actions.at (Destructors): Complete to exercise this case.
17243
17244 2002-06-17 Akim Demaille <akim@epita.fr>
17245
17246 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17247 arguments is really empty, not only equal to `[]'.
17248 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17249 member.
17250 (symbol_destructor_set): New.
17251 * src/output.c (symbol_destructors_output): New.
17252 * src/reader.h (brace_code_t, current_braced_code): New.
17253 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17254 (handle_dollar): Rename as...
17255 (handle_action_dollar): this.
17256 (handle_destructor_dollar): New.
17257 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17258 (grammar_declaration): Use it.
17259 * data/bison.simple (yystos): Is always defined.
17260 (yydestructor): New.
17261 * tests/actions.at (Destructors): New.
17262 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17263
17264 2002-06-17 Akim Demaille <akim@epita.fr>
17265
17266 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17267 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17268 rule_length only when needed.
17269 * src/output.c (actions_output, token_definitions_output): Output
17270 the full M4 block.
17271 * src/symtab.c: Don't access directly to the symbol tag, use
17272 symbol_tag_get.
17273 * src/parse-gram.y: Use symbol_list_free.
17274
17275 2002-06-17 Akim Demaille <akim@epita.fr>
17276
17277 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17278 (symbol_list_prepend, get_type_name): Move to...
17279 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17280 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17281 Adjust all callers.
17282 (symbol_list_free): New.
17283 * src/scan-gram.l (handle_dollar): Takes a location.
17284 * tests/input.at (Invalid $n): Adjust.
17285
17286 2002-06-17 Akim Demaille <akim@epita.fr>
17287
17288 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17289 (symbol_list_prepend): New.
17290 * src/parse-gram.y (%union): `list' is a new member.
17291 (symbols.1): New, replaces...
17292 (terms_to_prec.1, nterms_to_type.1): these.
17293 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17294 Take a location as additional argument.
17295 Adjust all callers.
17296
17297 2002-06-15 Akim Demaille <akim@epita.fr>
17298
17299 * src/parse-gram.y: Move %token in the declaration section so that
17300 we don't depend upon CVS Bison.
17301
17302 2002-06-15 Akim Demaille <akim@epita.fr>
17303
17304 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17305 * src/print.c (print_core): Use it.
17306
17307 2002-06-15 Akim Demaille <akim@epita.fr>
17308
17309 * src/conflicts.c (log_resolution): Accept the rule involved in
17310 the sr conflicts instead of the lookahead number that points to
17311 that rule.
17312 (flush_reduce): Accept the current lookahead vector as argument,
17313 instead of the index in LA.
17314 (resolve_sr_conflict): Accept the current number of lookahead
17315 bitset to consider for the STATE, instead of the index in LA.
17316 (set_conflicts): Adjust.
17317 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17318
17319 2002-06-15 Akim Demaille <akim@epita.fr>
17320
17321 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17322 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17323 Adjust all dependencies.
17324 * src/lalr.c (initialize_lookaheads): Split into...
17325 (states_lookaheads_count, states_lookaheads_initialize): these.
17326 (lalr): Adjust.
17327
17328 2002-06-15 Akim Demaille <akim@epita.fr>
17329
17330 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17331 out of...
17332 (grammar_rules_print): here.
17333 * src/reduce.c (reduce_output): Use it.
17334 * tests/reduce.at (Useless Rules, Reduced Automaton)
17335 (Underivable Rules): Adjust.
17336
17337 2002-06-15 Akim Demaille <akim@epita.fr>
17338
17339 Copy BYacc's nice way to report the grammar.
17340
17341 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17342 New.
17343 Don't print the rules' location, it is confusing and useless.
17344 (rule_print): Use grammar_rhs_print.
17345 * src/print.c (print_grammar): Use grammar_rules_print.
17346
17347 2002-06-15 Akim Demaille <akim@epita.fr>
17348
17349 Complete and rationalize `useless thing' warnings.
17350
17351 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17352 (symbol_tag_print): New.
17353 Use them everywhere in place of accessing directly the tag member.
17354 * src/gram.h, src/gram.c (rule_print): New.
17355 Use it where a rule used to be printed `by hand'.
17356 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17357 (reduce_grammar_tables): Report the useless rules.
17358 (reduce_print): Useless things are a warning, not an error.
17359 Report it as such.
17360 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17361 (Reduced Automaton, Underivable Rules): Adjust.
17362 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17363 * tests/conflicts.at (Unresolved SR Conflicts)
17364 (Solved SR Conflicts): Adjust.
17365
17366 2002-06-15 Akim Demaille <akim@epita.fr>
17367
17368 Let symbols have a location.
17369
17370 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17371 (getsym): Adjust.
17372 Adjust all callers.
17373 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17374 Use location_t, not int.
17375 * src/symtab.c (symbol_check_defined): Take advantage of the
17376 location.
17377 * tests/regression.at (Invalid inputs): Adjust.
17378
17379 2002-06-15 Akim Demaille <akim@epita.fr>
17380
17381 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17382 (input): Don't try to initialize yylloc here, do it in the
17383 scanner.
17384 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17385 * src/gram.h (rule_t): Change line and action_line into location
17386 and action_location, of location_t type.
17387 Adjust all dependencies.
17388 * src/location.h, src/location.c (empty_location): New.
17389 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17390 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17391 (grammar_current_rule_symbol_append)
17392 (grammar_current_rule_action_append): Expect a location as argument.
17393 * src/reader.c (grammar_midrule_action): Adjust to attach an
17394 action's location as dummy symbol location.
17395 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17396 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17397 the line numbers.
17398
17399 2002-06-14 Akim Demaille <akim@epita.fr>
17400
17401 Grammar declarations may be found in the grammar section.
17402
17403 * src/parse-gram.y (rules_or_grammar_declaration): New.
17404 (declarations): Each declaration may end with a semicolon, not
17405 just...
17406 (grammar_declaration): `"%union"'.
17407 (grammar): Branch to rules_or_grammar_declaration.
17408
17409 2002-06-14 Akim Demaille <akim@epita.fr>
17410
17411 * src/main.c (main): Invoke scanner_free.
17412
17413 2002-06-14 Akim Demaille <akim@epita.fr>
17414
17415 * src/output.c (m4_invoke): Extracted from...
17416 (output_skeleton): here.
17417 Free tempfile.
17418
17419 2002-06-14 Akim Demaille <akim@epita.fr>
17420
17421 * src/parse-gram.y (directives, directive, gram)
17422 (grammar_directives, precedence_directives, precedence_directive):
17423 Rename as...
17424 (declarations, declaration, grammar, grammar_declaration)
17425 (precedence_declaration, precedence_declarator): these.
17426 (symbol_declaration): New.
17427
17428 2002-06-14 Akim Demaille <akim@epita.fr>
17429
17430 * src/files.c (action_obstack): Remove, unused.
17431 (output_obstack): Remove it, and all its dependencies, as it is no
17432 longer needed.
17433 * src/reader.c (epilogue_set): Build the epilogue in the
17434 muscle_obstack.
17435 * src/output.h, src/output.c (muscle_obstack): Move to...
17436 * src/muscle_tab.h, src/muscle_tab.h: here.
17437 (muscle_init): Initialize muscle_obstack.
17438 (muscle_free): New.
17439 * src/main.c (main): Call it.
17440
17441 2002-06-14 Akim Demaille <akim@epita.fr>
17442
17443 * src/location.h: New, extracted from...
17444 * src/reader.h: here.
17445 * src/Makefile.am (noinst_HEADERS): Merge into
17446 (bison_SOURCES): this.
17447 Add location.h.
17448 * src/parse-gram.y: Use location_t instead of Bison's.
17449 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17450 Use location_t instead of ints.
17451
17452 2002-06-14 Akim Demaille <akim@epita.fr>
17453
17454 * data/bison.simple, data/bison.c++: Be sure to restore the
17455 current #line when returning to the skeleton contents after having
17456 exposed the input file's #line.
17457
17458 2002-06-12 Akim Demaille <akim@epita.fr>
17459
17460 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17461 eager.
17462 * tests/actions.at (Exotic Dollars): New.
17463
17464 2002-06-12 Akim Demaille <akim@epita.fr>
17465
17466 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17467 ['"/] too eagerly.
17468 * tests/input.at (Torturing the Scanner): New.
17469
17470 2002-06-11 Akim Demaille <akim@epita.fr>
17471
17472 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17473 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17474 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17475 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17476 * src/reader.c (reader): Use it.
17477
17478 2002-06-11 Akim Demaille <akim@epita.fr>
17479
17480 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17481 Adjust all callers.
17482 (scanner_last_string_free): New.
17483
17484 2002-06-11 Akim Demaille <akim@epita.fr>
17485
17486 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17487 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17488 (last_string, YY_OBS_FREE): New.
17489 Use them when returning an ID.
17490
17491 2002-06-11 Akim Demaille <akim@epita.fr>
17492
17493 Have Bison grammars parsed by a Bison grammar.
17494
17495 * src/reader.c, src/reader.h (prologue_augment): New.
17496 * src/reader.c (copy_definition): Remove.
17497
17498 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17499 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17500 (grammar_current_rule_prec_set, grammar_current_rule_check)
17501 (grammar_current_rule_symbol_append)
17502 (grammar_current_rule_action_append): Export.
17503 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17504 (symbol_list_action_append): Remove.
17505 Hook the routines from reader.
17506 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17507 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17508
17509 * src/reader.c (read_declarations): Remove, unused.
17510
17511 * src/parse-gram.y: Handle the epilogue.
17512 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17513 (grammar_start_symbol_set): this.
17514 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17515 * src/reader.c (readgram): Remove, unused.
17516 (reader): Adjust to insert eoftoken and axiom where appropriate.
17517
17518 * src/reader.c (copy_dollar): Replace with...
17519 * src/scan-gram.h (handle_dollar): this.
17520 * src/parse-gram.y: Remove `%thong'.
17521
17522 * src/reader.c (copy_at): Replace with...
17523 * src/scan-gram.h (handle_at): this.
17524
17525 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17526 New.
17527
17528 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17529 time being.
17530
17531 * src/reader.h, src/reader.c (grammar_rule_end): New.
17532
17533 * src/parse.y (current_type, current_class): New.
17534 Implement `%nterm', `%token' support.
17535 Merge `%term' into `%token'.
17536 (string_as_id): New.
17537 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17538 type name.
17539
17540 * src/parse-gram.y: Be sure to handle properly the beginning of
17541 rules.
17542
17543 * src/parse-gram.y: Handle %type.
17544 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17545
17546 * src/parse-gram.y: More directives support.
17547 * src/options.c: No longer handle source directives.
17548
17549 * src/parse-gram.y: Fix %output.
17550
17551 * src/parse-gram.y: Handle %union.
17552 Use the prologue locations.
17553 * src/reader.c (parse_union_decl): Remove.
17554
17555 * src/reader.h, src/reader.c (epilogue_set): New.
17556 * src/parse-gram.y: Use it.
17557
17558 * data/bison.simple, data/bison.c++: b4_stype is now either not
17559 defined, then default to int, or to the contents of %union,
17560 without `union' itself.
17561 Adjust.
17562 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17563
17564 * src/output.c (actions_output): Don't output braces, as they are
17565 already handled by the scanner.
17566
17567 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17568 characters to themselves.
17569
17570 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17571 that the epilogue has a proper #line.
17572
17573 * src/parse-gram.y: Handle precedence/associativity.
17574
17575 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17576 a terminal.
17577 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17578 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17579 at all to define terminals that cannot be emitted.
17580
17581 * src/scan-gram.l: Escape M4 characters.
17582
17583 * src/scan-gram.l: Working properly with escapes in user
17584 strings/characters.
17585
17586 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17587 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17588 grammar.
17589 Use more modest sizes, as for the time being the parser does not
17590 release memory, and therefore the process swallows a huge amount
17591 of memory.
17592
17593 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17594 stricter %token grammar.
17595
17596 * src/symtab.h (associativity): Add `undef_assoc'.
17597 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17598 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17599
17600 * tests/regression.at (Invalid %directive): Remove, as it is now
17601 meaningless.
17602 (Invalid inputs): Adjust to the new error messages.
17603 (Token definitions): The new grammar doesn't allow too many
17604 eccentricities.
17605
17606 * src/lex.h, src/lex.c: Remove.
17607 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17608 (copy_character, copy_string2, copy_string, copy_identifier)
17609 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17610 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17611 (parse_action): Remove.
17612 * po/POTFILES.in: Adjust.
17613
17614 2002-06-11 Akim Demaille <akim@epita.fr>
17615
17616 * src/reader.c (parse_action): Don't store directly into the
17617 rule's action member: return the action as a string.
17618 Don't require `rule_length' as an argument: compute it.
17619 (grammar_current_rule_symbol_append)
17620 (grammar_current_rule_action_append): New, eved out from
17621 (readgram): here.
17622 Remove `action_flag', `rulelength', unused now.
17623
17624 2002-06-11 Akim Demaille <akim@epita.fr>
17625
17626 * src/reader.c (grammar_current_rule_prec_set).
17627 (grammar_current_rule_check): New, eved out from...
17628 (readgram): here.
17629 Remove `xaction', `first_rhs': useless.
17630 * tests/input.at (Type clashes): New.
17631 * tests/existing.at (GNU Cim Grammar): Adjust.
17632
17633 2002-06-11 Akim Demaille <akim@epita.fr>
17634
17635 * src/reader.c (grammar_midrule_action): New, Eved out from
17636 (readgram): here.
17637
17638 2002-06-11 Akim Demaille <akim@epita.fr>
17639
17640 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17641 New.
17642 (readgram): Use them as replacement of inlined code, crule and
17643 crule1.
17644
17645 2002-06-11 Akim Demaille <akim@epita.fr>
17646
17647 * src/reader.c (grammar_end, grammar_symbol_append): New.
17648 (readgram): Use them.
17649 Make the use of `p' as local as possible.
17650
17651 2002-06-10 Akim Demaille <akim@epita.fr>
17652
17653 GCJ's parser requires the tokens to be defined before the prologue.
17654
17655 * data/bison.simple: Output the token definition before the user's
17656 prologue.
17657 * tests/regression.at (Braces parsing, Duplicate string)
17658 (Mixing %token styles): Check the output from bison.
17659 (Early token definitions): New.
17660
17661 2002-06-10 Akim Demaille <akim@epita.fr>
17662
17663 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17664 assigning twice the same user number to a token, so that we can
17665 use it in...
17666 * src/lex.c (lex): here.
17667 Also use `symbol_class_set' instead of hand written code.
17668 * src/reader.c (parse_assoc_decl): Likewise.
17669
17670 2002-06-10 Akim Demaille <akim@epita.fr>
17671
17672 * src/symtab.c, src/symtab.c (symbol_class_set)
17673 (symbol_user_token_number_set): New.
17674 * src/reader.c (parse_token_decl): Use them.
17675 Use a switch instead of ifs.
17676 Use a single argument.
17677
17678 2002-06-10 Akim Demaille <akim@epita.fr>
17679
17680 Remove `%thong' support as it is undocumented, unused, duplicates
17681 `%token's job, and creates useless e-mail traffic with people who
17682 want to know what it is, why it is undocumented, unused, and
17683 duplicates `%token's job.
17684
17685 * src/reader.c (parse_thong_decl): Remove.
17686 * src/options.c (option_table): Remove "thong".
17687 * src/lex.h (tok_thong): Remove.
17688
17689 2002-06-10 Akim Demaille <akim@epita.fr>
17690
17691 * src/symtab.c, src/symtab.c (symbol_type_set)
17692 (symbol_precedence_set): New.
17693 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17694 (value_components_used): Remove, unused.
17695
17696 2002-06-09 Akim Demaille <akim@epita.fr>
17697
17698 Move symbols handling code out of the reader.
17699
17700 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17701 (axiom): Move to...
17702 * src/symtab.h, src/symtab.c: here.
17703
17704 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17705 * src/reader.c (startval): Rename as...
17706 * src/symtab.h, src/symtab.c (startsymbol): this.
17707 * src/reader.c: Adjust.
17708
17709 * src/reader.c (symbol_check_defined, symbol_make_alias)
17710 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17711 (token_translations_init)
17712 Move to...
17713 * src/symtab.c: here.
17714 * src/reader.c (packsymbols): Move to...
17715 * src/symtab.h, src/symtab.c (symbols_pack): here.
17716 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17717 argument.
17718
17719 2002-06-03 Akim Demaille <akim@epita.fr>
17720
17721 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17722 then statements.
17723
17724 2002-06-03 Akim Demaille <akim@epita.fr>
17725
17726 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17727 structs with non literals.
17728 * src/scan-skel.l: never-interactive.
17729 * src/conflicts.c (enum conflict_resolution_e): No trailing
17730 comma.
17731 * src/getargs.c (usage): Split long literal strings.
17732 Reported by Hans Aberg.
17733
17734 2002-05-28 Akim Demaille <akim@epita.fr>
17735
17736 * data/bison.c++: Use C++ ostreams.
17737 (cdebug_): New member.
17738
17739 2002-05-28 Akim Demaille <akim@epita.fr>
17740
17741 * src/output.c (output_skeleton): Be sure to allocate enough room
17742 for `/' _and_ for `\0' in full_skeleton.
17743
17744 2002-05-28 Akim Demaille <akim@epita.fr>
17745
17746 * data/bison.c++: Catch up with bison.simple:
17747 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17748 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17749 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17750 and popping traces.
17751
17752 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17753
17754 * src/output.c (output_skeleton): Put an explicit path in front of
17755 the skeleton file name, rather than relying on the -I directory,
17756 to partially alleviate effects of having a skeleton file lying around
17757 in the current directory.
17758
17759 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17760
17761 * src/conflicts.c (log_resolution): Correct typo:
17762 obstack_printf should be obstack_fgrow1.
17763
17764 2002-05-26 Akim Demaille <akim@epita.fr>
17765
17766 * src/state.h (state_t): `solved_conflicts' is a new member.
17767 * src/LR0.c (new_state): Set it to 0.
17768 * src/conflicts.h, src/conflicts.c (print_conflicts)
17769 (free_conflicts, solve_conflicts): Rename as...
17770 (conflicts_print, conflicts_free, conflicts_solve): these.
17771 Adjust callers.
17772 * src/conflicts.c (enum conflict_resolution_e)
17773 (solved_conflicts_obstack): New, used by...
17774 (log_resolution): this.
17775 Adjust to attach the conflict resolution to each state.
17776 Complete the description with the precedence/associativity
17777 information.
17778 (resolve_sr_conflict): Adjust.
17779 * src/print.c (print_state): Output its solved_conflicts.
17780 * tests/conflicts.at (Unresolved SR Conflicts)
17781 (Solved SR Conflicts): Exercise --report=all.
17782
17783 2002-05-26 Akim Demaille <akim@epita.fr>
17784
17785 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17786 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17787 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17788 (token_number_t, item_number_as_token_number)
17789 (token_number_as_item_number, muscle_insert_token_number_table):
17790 Rename as...
17791 (symbol_number_t, item_number_as_symbol_number)
17792 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17793 these, since it is more appropriate.
17794
17795 2002-05-26 Akim Demaille <akim@epita.fr>
17796
17797 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17798 `Error:' lines.
17799 * data/bison.simple (yystos) [YYDEBUG]: New.
17800 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17801 error recovery.
17802 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17803
17804 2002-05-25 Akim Demaille <akim@epita.fr>
17805
17806 * doc/bison.texinfo (Debugging): Split into...
17807 (Tracing): this new section, its former contents, and...
17808 (Understanding): this new section.
17809 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17810 by...
17811 (report_flag): this.
17812 Adjust all dependencies.
17813 (report_args, report_types, report_argmatch): New.
17814 (usage, getargs): Report/support -r, --report.
17815 * src/options.h
17816 (struct option_table_struct): Rename as..,
17817 (struct option_table_s): this.
17818 Rename the `set_flag' member to `flag' to match with getopt_long's
17819 struct.
17820 * src/options.c (option_table): Split verbose into an entry for
17821 %verbose, and another for --verbose.
17822 Support --report/-r, so remove -r from the obsolete --raw.
17823 * src/print.c: Attach full item sets and lookaheads reports to
17824 report_flag instead of trace_flag.
17825 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17826
17827 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17828 and Paul Eggert <eggert@twinsun.com>
17829
17830 * data/bison.simple (yyparse): Correct error handling to conform to
17831 POSIX and yacc. Specifically, after syntax error is discovered,
17832 do not reduce further before shifting the error token.
17833 Clean up the code a bit by removing the labels yyerrdefault,
17834 yyerrhandle, yyerrpop.
17835 * NEWS: Document the above.
17836
17837 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17838
17839 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17840 type; it isn't always big enough, since it doesn't necessarily
17841 include non-terminals.
17842 (yytranslate): Expand definition of yy_token_number_type, so that
17843 the latter can be removed.
17844 (yy_token_number_type): Remove, only one use.
17845 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17846 don't use TokenNumberType as element type.
17847
17848 * tests/regression.at: Modify expected output to agree with change
17849 to yyr1 and yytranslate.
17850
17851 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17852
17853 * src/reader.c (parse_action): Use copy_character instead of
17854 obstack_1grow.
17855
17856 2002-05-13 Akim Demaille <akim@epita.fr>
17857
17858 * tests/regression.at (Token definitions): Prototype yylex and
17859 yyerror.
17860
17861 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17862
17863 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17864 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17865 32-bit arithmetic.
17866 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17867
17868 2002-05-07 Akim Demaille <akim@epita.fr>
17869
17870 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17871 avoid GCC warnings.
17872
17873 2002-05-07 Akim Demaille <akim@epita.fr>
17874
17875 Kill GCC warnings.
17876
17877 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17878 over the RHS of each rule.
17879 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17880 * src/state.h (state_t): Member `nitems' is unsigned short.
17881 * src/LR0.c (get_state): Adjust.
17882 * src/reader.c (packgram): Likewise.
17883 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17884 `Type'.
17885 (muscle_insert_int_table): Remove, unused.
17886 (prepare_rules): Remove `max'.
17887
17888 2002-05-06 Akim Demaille <akim@epita.fr>
17889
17890 * src/closure.c (print_firsts): Display of the symbol tags.
17891 (bitmatrix_print): Move to...
17892 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17893 here.
17894 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17895
17896 2002-05-06 Akim Demaille <akim@epita.fr>
17897
17898 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17899 hash_do_for_each.
17900
17901 2002-05-06 Akim Demaille <akim@epita.fr>
17902
17903 * src/LR0.c (new_state, get_state): Instead of using the global
17904 `kernel_size' and `kernel_base', have two new arguments:
17905 `core_size' and `core'.
17906 Adjust callers.
17907
17908 2002-05-06 Akim Demaille <akim@epita.fr>
17909
17910 * src/reader.c (packgram): No longer end `ritem' with a 0
17911 sentinel: it is not used.
17912
17913 2002-05-05 Akim Demaille <akim@epita.fr>
17914
17915 New experimental feature: display the lookaheads in the report and
17916 graph.
17917
17918 * src/print (print_core): When --trace-flag, display the rules
17919 lookaheads.
17920 * src/print_graph.c (print_core): Likewise.
17921 Swap the arguments.
17922 Adjust caller.
17923
17924 2002-05-05 Akim Demaille <akim@epita.fr>
17925
17926 * tests/torture.at (Many lookaheads): New test.
17927
17928 2002-05-05 Akim Demaille <akim@epita.fr>
17929
17930 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17931 (GENERATE_MUSCLE_INSERT_TABLE): this.
17932 (output_int_table, output_unsigned_int_table, output_short_table)
17933 (output_token_number_table, output_item_number_table): Replace with...
17934 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17935 (muscle_insert_short_table, muscle_insert_token_number_table)
17936 (muscle_insert_item_number_table): these.
17937 Adjust all callers.
17938 (prepare_tokens): Don't free `translations', since...
17939 * src/reader.h, src/reader.c (grammar_free): do it.
17940 Move to...
17941 * src/gram.h, src/gram.c (grammar_free): here.
17942 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17943 b4_translate_max.
17944
17945 2002-05-05 Akim Demaille <akim@epita.fr>
17946
17947 * src/output.c (output_unsigned_int_table): New.
17948 (prepare_rules): `i' is unsigned.
17949 `prhs', `rline', `r2' are unsigned int.
17950 Rename muscle `rhs_number_max' as `rhs_max'.
17951 Output muscles `prhs_max', `rline_max', and `r2_max'.
17952 Free rline and r1.
17953 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17954 to compute types instead of constant types.
17955 * tests/regression.at (Web2c Actions): Adjust.
17956
17957 2002-05-04 Akim Demaille <akim@epita.fr>
17958
17959 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17960 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17961 Adjust dependencies.
17962 * src/output.c (token_definitions_output): Be sure not to output a
17963 `#define 'a'' when fed with `%token 'a' "a"'.
17964 * tests/regression.at (Token definitions): New.
17965
17966 2002-05-03 Paul Eggert <eggert@twinsun.com>
17967
17968 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17969 for K&R C.
17970
17971 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17972
17973 * Makefile.am (SUBDIRS): Remove intl.
17974 (EXTRA_DIST): Add config/config.rpath.
17975
17976 2002-05-03 Akim Demaille <akim@epita.fr>
17977
17978 * data/bison.simple (m4_if): Don't output empty enums.
17979 And actually, output valid enum definitions :(.
17980
17981 2002-05-03 Akim Demaille <akim@epita.fr>
17982
17983 * configure.bat: Remove, completely obsolete.
17984 * Makefile.am (EXTRA_DIST): Adjust.
17985 Don't distribute config.rpath...
17986 * config/Makefile.am (EXTRA_DIST): Do it.
17987
17988 2002-05-03 Akim Demaille <akim@epita.fr>
17989
17990 * configure.in (GETTEXT_VERSION): New.
17991 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17992
17993 2002-05-03 Akim Demaille <akim@epita.fr>
17994
17995 * data/bison.simple (b4_token_enum): New.
17996 (b4_token_defines): Use it to output tokens both as #define and
17997 enums.
17998 Suggested by Paul Eggert.
17999 * src/output.c (token_definitions_output): Don't output spurious
18000 white spaces.
18001
18002 2002-05-03 Akim Demaille <akim@epita.fr>
18003
18004 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18005
18006 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18007
18008 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18009 Update the stack class, give a try to deque as the default container.
18010
18011 2002-05-02 Akim Demaille <akim@epita.fr>
18012
18013 * data/bison.simple (yyparse): Do not implement @$ = @1.
18014 (YYLLOC_DEFAULT): Adjust to do it.
18015 * doc/bison.texinfo (Location Default Action): Fix.
18016
18017 2002-05-02 Akim Demaille <akim@epita.fr>
18018
18019 * src/reader.c (parse_braces): Merge into...
18020 (parse_action): this.
18021
18022 2002-05-02 Akim Demaille <akim@epita.fr>
18023
18024 * configure.in (ALL_LINGUAS): Remove.
18025 * po/LINGUAS, hr.po: New.
18026
18027 2002-05-02 Akim Demaille <akim@epita.fr>
18028
18029 Remove the so called hairy (semantic) parsers.
18030
18031 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18032 * src/gram.h, src/gram.c (semantic_parser): Remove.
18033 (rule_t): Remove the guard and guard_line members.
18034 * src/lex.h (token_t): remove tok_guard.
18035 * src/options.c (option_table): Remove %guard and %semantic_parser
18036 support.
18037 * src/output.c, src/output.h (guards_output): Remove.
18038 (prepare): Adjust.
18039 (token_definitions_output): Don't output the `T'
18040 tokens (???).
18041 (output_skeleton): Don't output the guards.
18042 * src/files.c, src/files.c (attrsfile): Remove.
18043 * src/reader.c (symbol_list): Remove the guard and guard_line
18044 members.
18045 Adjust dependencies.
18046 (parse_guard): Remove.
18047 * data/bison.hairy: Remove.
18048 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18049 BISON_HAIRY.
18050
18051 2002-05-02 Akim Demaille <akim@epita.fr>
18052
18053 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18054 (parse_guard): Rename the formal argument `stack_offset' as
18055 `rule_length', which is more readable.
18056 Adjust callers.
18057 (copy_at, copy_dollar): Instead of outputting the hard coded
18058 values of $$, $n and so forth, output invocation to b4_lhs_value,
18059 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18060 Note: this patch partially drops `semantic-parser' support: it
18061 always does `rule_length - n', where semantic parsers ought to
18062 always use `-n'.
18063 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18064 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18065
18066 2002-05-02 Akim Demaille <akim@epita.fr>
18067
18068 * configure.in (AC_INIT): Bump to 1.49b.
18069 (AM_INIT_AUTOMAKE): Short invocation.
18070
18071 2002-05-02 Akim Demaille <akim@epita.fr>
18072
18073 Version 1.49a.
18074
18075 2002-05-01 Akim Demaille <akim@epita.fr>
18076
18077 * src/skeleton.h: Remove.
18078
18079 2002-05-01 Akim Demaille <akim@epita.fr>
18080
18081 * src/skeleton.h: Fix the #endif.
18082 Reported by Magnus Fromreide.
18083
18084 2002-04-26 Paul Eggert <eggert@twinsun.com>
18085
18086 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18087 Define if we define YYSTYPE and YYLTYPE, respectively.
18088 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18089
18090 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18091
18092 * src/scan-skel.l: Postprocess quadrigraphs.
18093
18094 * src/reader.c (copy_character): New function, used to output
18095 single characters while replacing `[' and `]' with quadrigraphs, to
18096 avoid troubles with M4 quotes.
18097 (copy_comment): Output characters with copy_character.
18098 (read_additionnal_code): Likewise.
18099 (copy_string2): Likewise.
18100 (copy_definition): Likewise.
18101
18102 * tests/calc.at: Exercise M4 quoting.
18103
18104 2002-04-25 Akim Demaille <akim@epita.fr>
18105
18106 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18107 between `!' and the command.
18108 Reported by Paul Eggert.
18109
18110 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18111
18112 * tests/calc.at: Exercise prologue splitting.
18113
18114 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18115 `b4_post_prologue' instead of `b4_prologue'.
18116
18117 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18118 muscles.
18119 (output): Free pre_prologue_obstack and post_prologue_obstack.
18120 * src/files.h, src/files.c (attrs_obstack): Remove.
18121 (pre_prologue_obstack, post_prologue_obstack): New.
18122 * src/reader.c (copy_definition): Add a parameter to specify the
18123 obstack to fill, instead of using attrs_obstack unconditionally.
18124 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18125 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18126
18127 2002-04-23 Paul Eggert <eggert@twinsun.com>
18128
18129 * data/bison.simple: Remove unnecessary commentary and white
18130 space differences from 1_29-branch.
18131 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18132
18133 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18134 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18135 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18136 constructors or destructors.
18137
18138 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18139
18140 2002-04-23 Akim Demaille <akim@epita.fr>
18141
18142 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18143 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18144 location with columns.
18145 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18146 All reported by Paul Eggert.
18147
18148 2002-04-22 Akim Demaille <akim@epita.fr>
18149
18150 * src/reduce.c (dump_grammar): Move to...
18151 * src/gram.h, src/gram.c (grammar_dump): here.
18152 Be sure to separate long item numbers.
18153 Don't read the members of a rule's prec if its nil.
18154
18155 2002-04-22 Akim Demaille <akim@epita.fr>
18156
18157 * src/output.c (table_size, table_grow): New.
18158 (MAXTABLE): Remove, replace uses with table_size.
18159 (pack_vector): Instead of dying when the table is too big, grow it.
18160
18161 2002-04-22 Akim Demaille <akim@epita.fr>
18162
18163 * data/bison.simple (yyr1): Its type is that of a token number.
18164 * data/bison.c++ (r1_): Likewise.
18165 * tests/regression.at (Web2c Actions): Adjust.
18166
18167 2002-04-22 Akim Demaille <akim@epita.fr>
18168
18169 * src/reader.c (token_translations_init): 256 is now the default
18170 value for the error token, i.e., it will be assigned another
18171 number if the user assigned 256 to one of her tokens.
18172 (reader): Don't force 256 to error.
18173 * doc/bison.texinfo (Symbols): Adjust.
18174 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18175 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18176 etc. instead of 10, 20, 30 (which was used to `jump' over error
18177 (256) and undefined (2)).
18178
18179 2002-04-22 Akim Demaille <akim@epita.fr>
18180
18181 Propagate more token_number_t.
18182
18183 * src/gram.h (token_number_as_item_number)
18184 (item_number_as_token_number): New.
18185 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18186 Use it to create output_item_number_table and
18187 output_token_number_table.
18188 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18189 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18190 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18191 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18192
18193 2002-04-22 Akim Demaille <akim@epita.fr>
18194
18195 * src/output.h, src/output.c (get_lines_number): Remove.
18196
18197 2002-04-19 Akim Demaille <akim@epita.fr>
18198
18199 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18200 as Lex/Flex'.
18201 (Debugging): More details about enabling the debugging features.
18202 (Table of Symbols): Describe $$, $n, @$, and @n.
18203 Suggested by Tim Josling.
18204
18205 2002-04-19 Akim Demaille <akim@epita.fr>
18206
18207 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18208
18209 2002-04-10 Akim Demaille <akim@epita.fr>
18210
18211 * src/system.h: Rely on HAVE_LIMITS_H.
18212 Suggested by Paul Eggert.
18213
18214 2002-04-09 Akim Demaille <akim@epita.fr>
18215
18216 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18217 full stderr, and strip it according to the bison options, instead
18218 of composing the error message from different bits.
18219 This makes it easier to check for several error messages.
18220 Adjust all the invocations.
18221 Add an invocation exercising the error token.
18222 Add an invocation demonstrating a stupid error message.
18223 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18224 Adjust the tests.
18225 Error message are for stderr, not stdout.
18226
18227 2002-04-09 Akim Demaille <akim@epita.fr>
18228
18229 * src/gram.h, src/gram.c (error_token_number): Remove, use
18230 errtoken->number.
18231 * src/reader.c (reader): Don't specify the user token number (2)
18232 for $undefined, as it uselessly prevents using it.
18233 * src/gram.h (token_number_t): Move to...
18234 * src/symtab.h: here.
18235 (state_t.number): Is a token_number_t.
18236 * src/print.c, src/reader.c: Use undeftoken->number instead of
18237 hard coded 2.
18238 (Even though this 2 is not the same as above: the number of the
18239 undeftoken remains being 2, it is its user token number which
18240 might not be 2).
18241 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18242 `user_token_number_max'.
18243 Output `undef_token_number'.
18244 * data/bison.simple, data/bison.c++: Use them.
18245 Be sure to map invalid yylex return values to
18246 `undef_token_number'. This saves us from gratuitous SEGV.
18247
18248 * tests/conflicts.at (Solved SR Conflicts)
18249 (Unresolved SR Conflicts): Adjust.
18250 * tests/regression.at (Web2c Actions): Adjust.
18251
18252 2002-04-08 Akim Demaille <akim@epita.fr>
18253
18254 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18255 Adding #line.
18256 Remove the duplicate `typedefs'.
18257 (RhsNumberType): Fix the declaration and various other typos.
18258 Use __ofile__.
18259 * data/bison.simple: Use __ofile__.
18260 * src/scan-skel.l: Handle __ofile__.
18261
18262 2002-04-08 Akim Demaille <akim@epita.fr>
18263
18264 * src/gram.h (item_number_t): New, the type of item numbers in
18265 RITEM. Note that it must be able to code symbol numbers as
18266 positive number, and the negation of rule numbers as negative
18267 numbers.
18268 Adjust all dependencies (pretty many).
18269 * src/reduce.c (rule): Remove this `short *' pointer: use
18270 item_number_t.
18271 * src/system.h (MINSHORT, MAXSHORT): Remove.
18272 Include `limits.h'.
18273 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18274 (shortcpy): Remove.
18275 (MAXTABLE): Move to...
18276 * src/output.c (MAXTABLE): here.
18277 (prepare_rules): Use output_int_table to output rhs.
18278 * data/bison.simple, data/bison.c++: Adjust.
18279 * tests/torture.at (Big triangle): Move the limit from 254 to
18280 500.
18281 * tests/regression.at (Web2c Actions): Ajust.
18282
18283 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18284 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18285 passes, but produces negative #line number, once fixed, GCC is
18286 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18287 C), it passes.
18288 * src/state.h (state_h): Code input lines on ints, not shorts.
18289
18290 2002-04-08 Akim Demaille <akim@epita.fr>
18291
18292 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18293 and then the grammar.
18294
18295 2002-04-08 Akim Demaille <akim@epita.fr>
18296
18297 * src/system.h: No longer using strndup.
18298
18299 2002-04-07 Akim Demaille <akim@epita.fr>
18300
18301 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18302 * src/output.c (output_table_data): Return the longest number.
18303 (prepare_tokens): Output `token_number_max').
18304 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18305 New.
18306 Use them to define yy_token_number_type/TokenNumberType.
18307 Use this type for yytranslate.
18308 * tests/torture.at (Big triangle): Push the limit from 124 to
18309 253.
18310 * tests/regression.at (Web2c Actions): Adjust.
18311
18312 2002-04-07 Akim Demaille <akim@epita.fr>
18313
18314 * tests/torture.at (Big triangle): New.
18315 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18316 * tests/existing.at: here.
18317
18318 2002-04-07 Akim Demaille <akim@epita.fr>
18319
18320 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18321 nritems.
18322 Adjust dependencies.
18323
18324 2002-04-07 Akim Demaille <akim@epita.fr>
18325
18326 * src/reader.c: Normalize increments to prefix form.
18327
18328 2002-04-07 Akim Demaille <akim@epita.fr>
18329
18330 * src/reader.c, symtab.c: Remove debugging code.
18331
18332 2002-04-07 Akim Demaille <akim@epita.fr>
18333
18334 Rename all the `bucket's as `symbol_t'.
18335
18336 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18337 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18338 * src/symtab.c, src/symtab.h (bucket): Rename as...
18339 (symbol_t): this.
18340 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18341 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18342 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18343 (buckets_new, buckets_free, buckets_do): Rename as...
18344 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18345 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18346 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18347 (symbols_new, symbols_free, symbols_do): these.
18348
18349 2002-04-07 Akim Demaille <akim@epita.fr>
18350
18351 Use lib/hash for the symbol table.
18352
18353 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18354 EOF.
18355 * src/lex.c (lex): Set the `number' member of new terminals.
18356 * src/reader.c (bucket_check_defined, bucket_make_alias)
18357 (bucket_check_alias_consistence, bucket_translation): New.
18358 (reader, grammar_free, readgram, token_translations_init)
18359 (packsymbols): Adjust.
18360 (reader): Number the predefined tokens.
18361 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18362 for predefined tokens.
18363 * src/symtab.h (bucket): Remove all the hash table related
18364 members.
18365 * src/symtab.c (symtab): Replace by...
18366 (bucket_table): this.
18367 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18368 (buckets_new, buckets_do): New.
18369
18370 2002-04-07 Akim Demaille <akim@epita.fr>
18371
18372 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18373 (start_symbol, max_user_token_number, semantic_parser)
18374 (error_token_number): Initialize.
18375 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18376 Initialize.
18377 (reader): Don't.
18378 (errtoken, eoftoken, undeftoken, axiom): Extern.
18379
18380 2002-04-07 Akim Demaille <akim@epita.fr>
18381
18382 * src/gram.h (rule_s): prec and precsym are now pointers
18383 to the bucket giving the priority/associativity.
18384 Member `associativity' removed: useless.
18385 * src/reduce.c, src/conflicts.c: Adjust.
18386
18387 2002-04-07 Akim Demaille <akim@epita.fr>
18388
18389 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18390 Properly escape the symbols' TAG when outputting them.
18391
18392 2002-04-07 Akim Demaille <akim@epita.fr>
18393
18394 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18395
18396 2002-04-07 Akim Demaille <akim@epita.fr>
18397
18398 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18399 (LArule): this, which is an array to rule_t*.
18400 * src/print.c, src/conflicts.c: Adjust.
18401
18402 2002-04-07 Akim Demaille <akim@epita.fr>
18403
18404 * src/gram.h (rule_t): Rename `number' as `user_number'.
18405 `number' is a new member.
18406 Adjust dependencies.
18407 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18408
18409 2002-04-07 Akim Demaille <akim@epita.fr>
18410
18411 As a result of the previous patch, it is no longer needed
18412 to reorder ritem itself.
18413
18414 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18415
18416 2002-04-07 Akim Demaille <akim@epita.fr>
18417
18418 Be sure never to walk through RITEMS, but use only data related to
18419 the rules themselves. RITEMS should be banished.
18420
18421 * src/output.c (output_token_translations): Rename as...
18422 (prepare_tokens): this.
18423 In addition to `translate', prepare the muscles `tname' and
18424 `toknum', which were handled by...
18425 (output_rule_data): this.
18426 Remove, and move the remainder of its outputs into...
18427 (prepare_rules): this new routines, which also merges content from
18428 (output_gram): this.
18429 (prepare_rules): Be sure never to walk through RITEMS.
18430 (output_stos): Rename as...
18431 (prepare_stos): this.
18432 (output): Always invoke prepare_states, after all, just don't use it
18433 in the output if you don't need it.
18434
18435 2002-04-07 Akim Demaille <akim@epita.fr>
18436
18437 * src/LR0.c (new_state): Display `nstates' as the name of the
18438 newly created state.
18439 Adjust to initialize first_state and last_state if needed.
18440 Be sure to distinguish the initial from the final state.
18441 (new_states): Create the itemset of the initial state, and use
18442 new_state.
18443 * src/closure.c (closure): Now that the initial state has its
18444 items properly set, there is no need for a special case when
18445 creating `ruleset'.
18446
18447 As a result, now the rule 0, reducing to $axiom, is visible in the
18448 outputs. Adjust the test suite.
18449
18450 * tests/conflicts.at (Solved SR Conflicts)
18451 (Unresolved SR Conflicts): Adjust.
18452 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18453 * tests/conflicts.at (S/R in initial): New.
18454
18455 2002-04-07 Akim Demaille <akim@epita.fr>
18456
18457 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18458 the RHS of the rules.
18459 * src/output.c (output_gram): Likewise.
18460
18461 2002-04-07 Akim Demaille <akim@epita.fr>
18462
18463 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18464 bucket.
18465 Adjust all dependencies.
18466 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18467 `number' of the buckets too.
18468 * src/gram.h: Include `symtab.h'.
18469 (associativity): Move to...
18470 * src/symtab.h: here.
18471 No longer include `gram.h'.
18472
18473 2002-04-07 Akim Demaille <akim@epita.fr>
18474
18475 * src/gram.h, src/gram.c (rules_rhs_length): New.
18476 (ritem_longest_rhs): Use it.
18477 * src/gram.h (rule_t): `number' is a new member.
18478 * src/reader.c (packgram): Set it.
18479 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18480 the end of `rules', and count them out of `nrules'.
18481 (reduce_output, dump_grammar): Adjust.
18482 * src/print.c (print_grammar): It is no longer needed to check for
18483 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18484 * tests/reduce.at (Reduced Automaton): New test.
18485
18486 2002-04-07 Akim Demaille <akim@epita.fr>
18487
18488 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18489 lacking `+ 1' to nrules, Bison reported as useless a token if it
18490 was used solely to set the precedence of the last rule...
18491
18492 2002-04-07 Akim Demaille <akim@epita.fr>
18493
18494 * data/bison.c++, data/bison.simple: Don't output the current file
18495 name in #line, to avoid useless diffs between two identical
18496 outputs under different names.
18497
18498 2002-04-07 Akim Demaille <akim@epita.fr>
18499
18500 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18501 Normalize loops to using `< nrules + 1', not `<= nrules'.
18502
18503 2002-04-07 Akim Demaille <akim@epita.fr>
18504
18505 * TODO: Update.
18506
18507 2002-04-07 Akim Demaille <akim@epita.fr>
18508
18509 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18510 bucket.value as bucket.number.
18511
18512 2002-04-07 Akim Demaille <akim@epita.fr>
18513
18514 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18515 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18516 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18517 RHS, instead of being an index in RITEMS.
18518
18519 2002-04-04 Paul Eggert <eggert@twinsun.com>
18520
18521 * doc/bison.texinfo: Update copyright date.
18522 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18523 (Symbols): Warn about running Bison in one character set,
18524 but compiling and/or running in an incompatible one.
18525 Warn about character code 256, too.
18526
18527 2002-04-03 Paul Eggert <eggert@twinsun.com>
18528
18529 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18530 YYERROR_VERBOSE is nonzero, not whether it is defined.
18531
18532 Merge changes from bison-1_29-branch.
18533
18534 2002-03-20 Paul Eggert <eggert@twinsun.com>
18535
18536 Merge fixes from Debian bison_1.34-1.diff.
18537
18538 * configure.in (AC_PREREQ): 2.53.
18539
18540 2002-03-20 Akim Demaille <akim@epita.fr>
18541
18542 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18543
18544 2002-03-19 Paul Eggert <eggert@twinsun.com>
18545
18546 * src/bison.simple (YYCOPY): New macro.
18547 (YYSTACK_RELOCATE): Use it.
18548 Remove Type arg; no longer needed. All callers changed.
18549 (yymemcpy): Remove; no longer needed.
18550
18551 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18552 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18553
18554 2002-03-19 Akim Demaille <akim@epita.fr>
18555
18556 Test and fix the #line outputs.
18557
18558 * tests/atlocal.at (GCC): New.
18559 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18560 (Prologue synch line, %union synch line, Postprologue synch line)
18561 (Action synch line, Epilogue synch line): New tests.
18562 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18563 * data/bison.simple, data/bison.c++: Use it.
18564
18565 2002-03-19 Akim Demaille <akim@epita.fr>
18566
18567 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18568 (Solved SR Conflicts, %expect not enough, %expect right)
18569 (%expect too much): Move to...
18570 * tests/conflicts.at: this new file.
18571
18572 2002-03-19 Akim Demaille <akim@epita.fr>
18573
18574 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18575 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18576 that we can move to enums for instance.
18577 * src/output.c (token_definitions_output): Output a list of
18578 `token-name, token-number' instead of the #define.
18579 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18580
18581 2002-03-14 Akim Demaille <akim@epita.fr>
18582
18583 Use Gettext 0.11.1.
18584
18585 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18586
18587 * data/bison.c++: Make the user able to add members to the generated
18588 parser by subclassing.
18589
18590 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18591
18592 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18593 a character.
18594 Reported by Nicolas Tisserand and Nicolas Burrus.
18595
18596 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18597
18598 * src/reader.c: Warn about lacking semi-colons, do not complain.
18599
18600 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18601
18602 * data/bison.c++: Remove a debug line.
18603
18604 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18605
18606 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18607 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18608 provide a default implementation.
18609
18610 2002-03-04 Akim Demaille <akim@epita.fr>
18611
18612 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18613 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18614 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18615 * tests/semantic.at (Parsing Guards): Similarly.
18616 * src/reader.at (readgram): Complain if the last rule is not ended
18617 with a semi-colon.
18618
18619 2002-03-04 Akim Demaille <akim@epita.fr>
18620
18621 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18622 * src/closure.c: here.
18623 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18624 RTC.
18625 * src/warshall.h, src/warshall.c: Remove.
18626 * tests/sets.at (Broken Closure): Adjust.
18627
18628 2002-03-04 Akim Demaille <akim@epita.fr>
18629
18630 * src/output.c (output_skeleton): tempdir is const.
18631 bytes_read is unused.
18632
18633 2002-03-04 Akim Demaille <akim@epita.fr>
18634
18635 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18636 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18637 Update.
18638 From Michael Hayes.
18639
18640 2002-03-04 Akim Demaille <akim@epita.fr>
18641
18642 * src/closure.c (closure): `r' is unused.
18643
18644 2002-03-04 Akim Demaille <akim@epita.fr>
18645
18646 * tests/sets.at (Broken Closure): Add the ending `;'.
18647 * src/reader.at (readgram): Complain if a rule is not ended with a
18648 semi-colon.
18649
18650 2002-03-04 Akim Demaille <akim@epita.fr>
18651
18652 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18653 (count_sr_conflicts): Use bitset_count.
18654 * src/reduce.c (inaccessable_symbols): Ditto.
18655 (bits_size): Remove.
18656 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18657
18658 2002-03-04 Akim Demaille <akim@epita.fr>
18659
18660 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18661 * src/reduce.c: Remove the `bitset_zero's following the
18662 `bitset_create's, as now it is performed by the latter.
18663
18664 2002-03-04 Akim Demaille <akim@epita.fr>
18665
18666 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18667 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18668 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18669 latest sources from Michael.
18670
18671 2002-03-04 Akim Demaille <akim@epita.fr>
18672
18673 * src/output.c (output): Don't free the grammar.
18674 * src/reader.c (grammar_free): New.
18675 * src/main.c (main): Call it and don't free symtab here.
18676
18677 2002-03-04 Akim Demaille <akim@epita.fr>
18678
18679 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18680 before returning.
18681 Reported by Benoit Perrot.
18682
18683 2002-03-04 Akim Demaille <akim@epita.fr>
18684
18685 Use bitset operations when possible, not loops over bits.
18686
18687 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18688 bitset_or.
18689 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18690 * src/reduce.c (useless_nonterminals): Formatting changes.
18691 * src/warshall.c (TC): Use bitset_or.
18692
18693 2002-03-04 Akim Demaille <akim@epita.fr>
18694
18695 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18696 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18697 Ditto.
18698
18699 2002-03-04 Akim Demaille <akim@epita.fr>
18700
18701 * src/lalr.c (F): Now a bitset*.
18702 Adjust all dependencies.
18703
18704 2002-03-04 Akim Demaille <akim@epita.fr>
18705
18706 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18707 Adjust all dependencies.
18708
18709 2002-03-04 Akim Demaille <akim@epita.fr>
18710
18711 * src/L0.c, src/LR0.h (nstates): Be size_t.
18712 Adjust comparisons (signed vs unsigned).
18713 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18714 bitset*.
18715 Adjust all dependencies.
18716
18717 2002-03-04 Akim Demaille <akim@epita.fr>
18718
18719 * src/closure.c (firsts): Now, also a bitset.
18720 Adjust all dependencies.
18721 (varsetsize): Remove, now unused.
18722 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18723
18724 2002-03-04 Akim Demaille <akim@epita.fr>
18725
18726 * src/print.c: Convert to use bitset.h, not hand coded iterations
18727 over ints.
18728
18729 2002-03-04 Akim Demaille <akim@epita.fr>
18730
18731 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18732
18733 2002-03-04 Akim Demaille <akim@epita.fr>
18734
18735 * src/closure.c (ruleset): Be a bitset.
18736 (rulesetsize): Remove.
18737
18738 2002-03-04 Akim Demaille <akim@epita.fr>
18739
18740 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18741 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18742 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18743 * src/closure.c (fderives): Be an array of bitsets.
18744
18745 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18746
18747 * data/bison.c++: Merge the two generated headers. Insert a copyright
18748 notice in each output file.
18749
18750 2002-02-28 Akim Demaille <akim@epita.fr>
18751
18752 * data/bison.c++: Copy the prologue of bison.simple to fetch
18753 useful M4 definitions, such as b4_header_guard.
18754
18755 2002-02-25 Akim Demaille <akim@epita.fr>
18756
18757 * src/getargs.c (version): Give the name of the authors, and use a
18758 translator friendly scheme for the bgr
18759 copyright notice.
18760
18761 2002-02-25 Akim Demaille <akim@epita.fr>
18762
18763 * src/output.c (header_output): Remove, now handled completely via
18764 M4.
18765
18766 2002-02-25 Akim Demaille <akim@epita.fr>
18767
18768 * m4/m4.m4: New, from CVS Autoconf.
18769 * configure.in: Invoke it.
18770 * src/output.c (output_skeleton): Use its result instead of the
18771 hard coded name.
18772
18773 2002-02-25 Akim Demaille <akim@epita.fr>
18774
18775 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18776 Fileutils 4.1.5.
18777 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18778 * src/output.c (output_skeleton): Use mkstemp to create a real
18779 temporary file.
18780 Move the filling of `skeleton' and its muscle to...
18781 (prepare): here.
18782 (output): Move the definition of the prologue muscle to...
18783 (prepare): here.
18784 * src/system.h (DEFAULT_TMPDIR): New.
18785
18786 2002-02-14 Paul Eggert <eggert@twinsun.com>
18787
18788 Remove the support for C++ namespace cleanliness; it was
18789 causing more problems than it was curing, since it didn't work
18790 properly on some nonstandard C++ compilers. This can wait
18791 for a proper C++ parser.
18792
18793 * NEWS: Document this.
18794 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18795 of C++, as it's treated like C now.
18796 * src/bison.simple (YYSTD): Remove.
18797 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18798 Treat C++ just like Standard C instead of trying to support
18799 namespace cleanliness.
18800
18801 2002-02-14 Akim Demaille <akim@epita.fr>
18802
18803 * tests/regression.at (else): Adjust to Andreas' change.
18804
18805 2002-02-14 Akim Demaille <akim@epita.fr>
18806
18807 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18808
18809 2002-02-13 Andreas Schwab <schwab@suse.de>
18810
18811 * src/output.c (output_rule_data): Don't output NULL, it might
18812 not be defined yet.
18813
18814 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18815
18816 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18817 (Copyright notice): Update.
18818
18819 2002-02-11 Akim Demaille <akim@epita.fr>
18820
18821 * tests/regression.at (%nonassoc and eof): Don't include
18822 nonportable headers.
18823
18824 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18825
18826 * data/bison.c++: Correct error recovery. Make the user able to
18827 initialize the starting location.
18828
18829 2002-02-07 Akim Demaille <akim@epita.fr>
18830
18831 * tests/input.at: New.
18832
18833 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18834
18835 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18836 more consistent when naming methods and variables. Put preprocessor
18837 directives around tables only needed for debugging.
18838
18839 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18840
18841 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18842 C++ parsers.
18843 (yy::b4_name::parse): Use print_.
18844
18845 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18846
18847 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18848
18849 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18850
18851 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18852 C++ parsers.
18853 (yy::b4_name::parse): Build verbose error messages, and use error_.
18854
18855 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18856
18857 * data/bison.c++: Fix m4 quoting in comments.
18858
18859 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18860
18861 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18862 not expanded by m4.
18863
18864 2002-02-05 Akim Demaille <akim@epita.fr>
18865
18866 * data/bison.c++: Adjust to the M4 back end.
18867 More is certainly needed.
18868
18869 2002-02-05 Akim Demaille <akim@epita.fr>
18870
18871 Give a try to M4 as a back end.
18872
18873 * lib/readpipe.c: New, from wdiff.
18874 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18875 BISON_HAIRY.
18876 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18877 specific values. Now it is m4 that performs the lookup.
18878 * src/parse-skel.y: Remove.
18879 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18880 * src/output.c (actions_output, guards_output)
18881 (token_definitions_output): No longer keeps track of the output
18882 line number, hence remove the second argument.
18883 (guards_output): Check against the guard member of a rule, not the
18884 action member.
18885 Adjust callers.
18886 (output_skeleton): Don't look for the skeleton location, let m4 do
18887 that.
18888 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18889 file will be used.
18890 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18891 (prepare): Given that for the time being changesyntax is not
18892 usable in M4, rename the muscles using `-' to `_'.
18893 Define `defines_flag', `output_parser_name' and `output_header_name'.
18894 * src/output.h (actions_output, guards_output)
18895 (token_definitions_output): Adjust prototypes.
18896 * src/scan-skel.l: Instead of scanning the skeletons, it now
18897 processes the output of m4: `__oline__' and `#output'.
18898 * data/bison.simple: Adjust to be used by M4(sugar).
18899 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18900 to date.
18901 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18902 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18903 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18904 shamelessly stolen from CVS Autoconf.
18905
18906 2002-02-05 Akim Demaille <akim@epita.fr>
18907
18908 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18909 * configure.in: Check for the declarations of free and malloc.
18910 * src/muscle_tab.c: Adjust.
18911
18912 2002-02-05 Akim Demaille <akim@epita.fr>
18913
18914 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18915 which have no values.
18916
18917 2002-02-05 Akim Demaille <akim@epita.fr>
18918
18919 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18920 * data/: here.
18921
18922 2002-01-29 Paul Eggert <eggert@twinsun.com>
18923
18924 * src/bison.simple (YYSIZE_T): Do not define merely because
18925 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18926 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18927
18928 2002-01-27 Akim Demaille <akim@epita.fr>
18929
18930 Fix `%nonassoc and eof'.
18931
18932 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18933 which were not properly copied! Replace
18934 memcpy (res->errs, src->errs, src->nerrs);
18935 with
18936 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18937 !!!
18938 * tests/regression.at (%nonassoc and eof): Adjust to newest
18939 Autotest: `.' is not in the PATH.
18940
18941 2002-01-27 Akim Demaille <akim@epita.fr>
18942
18943 * tests/sets.at (AT_EXTRACT_SETS): New.
18944 (Nullable): Use it.
18945 (Firsts): New.
18946
18947 2002-01-26 Akim Demaille <akim@epita.fr>
18948
18949 * tests/actions.at, tests/calc.at, tests/headers.at,
18950 * tests/torture.at: Adjust to the newest Autotest which no longer
18951 forces `.' in the PATH.
18952
18953 2002-01-25 Akim Demaille <akim@epita.fr>
18954
18955 * tests/regression.at (%nonassoc and eof): New.
18956 Suggested by Robert Anisko.
18957
18958 2002-01-24 Akim Demaille <akim@epita.fr>
18959
18960 Bison dumps core when trying to complain about broken input files.
18961 Reported by Cris van Pelt.
18962
18963 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18964 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18965 into...
18966 (Invalid inputs): Strengthen: exercise parse_percent_token.
18967
18968 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18969
18970 * src/Makefile.am: Add bison.c++.
18971 * src/bison.c++: New skeleton.
18972
18973 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18974
18975 * po/it.po: New.
18976
18977 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18978
18979 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18980
18981 2002-01-20 Marc Autret <marc@gnu.org>
18982
18983 * src/files.c (compute_output_file_names): Fix
18984
18985 2002-01-20 Marc Autret <marc@gnu.org>
18986
18987 * tests/output.at: New test.
18988 * src/files.c (compute_base_names): Don't map extensions when
18989 the YACC flag is set, use defaults.
18990 Reported by Evgeny Stambulchik.
18991
18992 2002-01-20 Marc Autret <marc@gnu.org>
18993
18994 * src/system.h: Need to define __attribute__ away for non-GCC
18995 compilers as well (i.e., the vendor C compiler).
18996 Suggested by Albert Chin-A-Young.
18997
18998 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18999
19000 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19001 canonical definition.
19002 * src/system.h: Use the canonical definition for PARAMS (avoids
19003 a conflict with the macro from lib/hash.h).
19004
19005 2002-01-11 Akim Demaille <akim@epita.fr>
19006
19007 * configure.in: Use AC_FUNC_STRNLEN.
19008 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19009
19010 2002-01-09 Akim Demaille <akim@epita.fr>
19011
19012 * src/files.c, src/files.h (output_infix): New.
19013 (tab_extension): Remove.
19014 (compute_base_names): Compute the former, drop the latter.
19015 * src/output.c (prepare): Insert the muscles `output-infix', and
19016 `output-suffix'.
19017 * src/parse-skel.y (string, string.1): New.
19018 (section.header): Use it.
19019 (section.yacc): Remove.
19020 (prefix): Remove too.
19021 * src/scan-skel.l: Adjust.
19022 * src/bison.simple, src/bison.hairy: Adjust.
19023
19024 2002-01-09 Akim Demaille <akim@epita.fr>
19025
19026 * configure.in (WERROR_CFLAGS): Compute it.
19027 * src/Makefile.am (CFLAGS): Pass it.
19028 * tests/atlocal.in (CFLAGS): Idem.
19029 * src/files.c: Fix a few warnings.
19030 (get_extension_index): Remove, unused.
19031
19032 2002-01-08 Akim Demaille <akim@epita.fr>
19033
19034 * src/getargs.c (AS_FILE_NAME): New.
19035 (getargs): Use it to convert DOSish file names.
19036 * src/files.c (base_name): Rename as full_base_name to avoid
19037 clashes with `base_name ()'.
19038 (filename_split): New.
19039 (compute_base_names): N-th rewrite, using filename_split.
19040
19041 2002-01-08 Akim Demaille <akim@epita.fr>
19042
19043 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19044 New, stolen from the Fileutils 4.1.
19045 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19046 * configure.in: Check for the presence of memrchr, and of its
19047 prototype.
19048
19049 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19050
19051 * lib/hash.h (__P): Added definition for this macro.
19052 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19053 BUILT_SOURCES, to ensure they are generated first.
19054 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19055 %error-verbose to allow bootstrapping with bison 1.30x.
19056
19057 2002-01-06 Akim Demaille <akim@epita.fr>
19058
19059 * src/reader.c (parse_braces): Don't fetch the next char, the
19060 convention is to fetch on entry.
19061 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19062 'switch' without a following semicolon.
19063 * tests/regression.at (braces parsing): New.
19064
19065 2002-01-06 Akim Demaille <akim@epita.fr>
19066
19067 Bison is dead wrong in its RR conflict reports.
19068
19069 * tests/torture.at (GNU Cim Grammar): New.
19070 * src/conflicts.c (count_rr_conflicts): Fix.
19071
19072 2002-01-06 Akim Demaille <akim@epita.fr>
19073
19074 Creating package.m4 from configure.ac causes too many problems.
19075
19076 * tests/Makefile.am (package.m4): Create it by hand,
19077 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19078
19079 2002-01-06 Akim Demaille <akim@epita.fr>
19080
19081 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19082 skeleton.h.
19083
19084 2002-01-04 Paul Eggert <eggert@twinsun.com>
19085
19086 * doc/bison.texinfo (Debugging):
19087 Remove YYSTDERR; it's no longer defined or used.
19088 Also, s/cstdio.h/cstdio/.
19089
19090 2002-01-03 Akim Demaille <akim@epita.fr>
19091
19092 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19093
19094 2002-01-03 Akim Demaille <akim@epita.fr>
19095
19096 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19097 tracing code to --trace, wait for a better --trace option, with
19098 args.
19099
19100 2002-01-03 Akim Demaille <akim@epita.fr>
19101
19102 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19103 The ISO C++ standard is extremely clear about it: stderr is
19104 considered a macro, not a regular symbol (see table 94 `Header
19105 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19106 Therefore std:: does not apply to it. It still does with fprintf.
19107 Also, s/cstdio.h/cstdio/.
19108
19109 2002-01-03 Akim Demaille <akim@epita.fr>
19110
19111 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19112 for non system headers.
19113
19114 2002-01-02 Akim Demaille <akim@epita.fr>
19115
19116 Equip the skeleton chain with location tracking, runtime trace,
19117 pure parser and scanner.
19118
19119 * src/parse-skel.y: Request a pure parser, locations, and prefix
19120 renaming.
19121 (%union): Having several members with the same type does not help
19122 type mismatches, simplify.
19123 (YYPRINT, yyprint): New.
19124 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19125 (skel_error): this.
19126 Handle locations.
19127 * src/scan-skel.l: Adjust to these changes.
19128 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19129 (LOCATION_PRINT, skel_control_t): New.
19130
19131 2001-12-30 Akim Demaille <akim@epita.fr>
19132
19133 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19134 replace `gb' with BLANKS.
19135 * src/scan-skel.l: Adjust.
19136
19137 2001-12-30 Akim Demaille <akim@epita.fr>
19138
19139 * src/system.h: We don't need nor want bcopy.
19140 Throw away MS-DOS crap: we don't need getpid.
19141 * configure.in: We don't need strndup. It was even causing
19142 problems: because Flex includes the headers *before* us,
19143 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19144 not visible.
19145 * lib/xstrndup.c: New.
19146 * src/scan-skel.l: Use it.
19147 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19148 * src/parse-skel.y: Use %directives instead of #defines.
19149
19150 2001-12-30 Akim Demaille <akim@epita.fr>
19151
19152 * src/skeleton.h: New.
19153 * src/output.c (output_parser, output_master_parser): Remove, dead
19154 code.
19155 * src/output.h (get_lines_number, actions_output, guards_output)
19156 (token_definitions_output): Prototype them.
19157 * src/parse-skel.y: Add the license notice.
19158 Include output.h and skeleton.h.
19159 (process_skeleton): Returns void, and takes a single parameter.
19160 * src/scan-skel.l: Add the license notice.
19161 Include skeleton.h.
19162 Don't use %option yylineno: it seems that then Flex imagines
19163 REJECT has been used, and therefore it won't reallocate its
19164 buffers (which makes no other sense to me than a bug). It results
19165 in warnings for `unused: yy_flex_realloc'.
19166
19167 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19168
19169 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19170 (MUSCLE_INSERT_PREFIX): ...to there.
19171 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19172 (MUSCLE_INSERT_PREFIX): Move from here...
19173
19174 * src/bison.hairy: Add a section directive. Put braces around muscle
19175 names. This parser skeleton is still broken, but Bison should not
19176 choke on a bad muscle 'syntax'.
19177 * src/bison.simple: Add a section directive. Put braces around muscle
19178 names.
19179
19180 * src/files.h (strsuffix, stringappend): Add declarations.
19181 (tab_extension): Add declaration.
19182 (short_base_name): Add declaration.
19183
19184 * src/files.c (strsuffix, stringappend): No longer static. These
19185 functions are used in the skeleton parser.
19186 (tab_extension): New.
19187 (compute_base_names): Use the computations done in this function
19188 to guess if the generated parsers should have '.tab' in their
19189 names.
19190 (short_base_name): No longer static.
19191
19192 * src/output.c (output_skeleton): New.
19193 (output): Disable call to output_master_parser, and give a try to
19194 a new skeleton handling system.
19195 (guards_output, actions_output): No longer static.
19196 (token_definitions_output, get_lines_number): No longer static.
19197
19198 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19199
19200 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19201 parse-skel.y.
19202
19203 * src/parse-skel.y: New file.
19204 * src/scan-skel.l: New file.
19205
19206 2001-12-29 Akim Demaille <akim@epita.fr>
19207
19208 %name-prefix is broken.
19209
19210 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19211 Adjust all dependencies.
19212 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19213 %name-prefix.
19214
19215 Renaming yylval but not yylloc is not consistent. Now we do.
19216
19217 * src/bison.simple: Prefix yylloc if used.
19218 * doc/bison.texinfo (Decl Summary): Document that.
19219
19220 2001-12-29 Akim Demaille <akim@epita.fr>
19221
19222 * doc/bison.texinfo: Promote `%long-directive' over
19223 `%long_directive'.
19224 Remove all references to fixed-output-files, yacc is enough.
19225
19226 2001-12-29 Akim Demaille <akim@epita.fr>
19227
19228 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19229 user prologue. These are defaults.
19230 * tests/actions.at (Mid-rule actions): Make sure the user can
19231 define YYDEBUG and YYERROR_VERBOSE.
19232
19233 2001-12-29 Akim Demaille <akim@epita.fr>
19234
19235 * src/output.c (header_output): Don't forget to export YYLTYPE and
19236 yylloc.
19237 * tests/headers.at (export YYLTYPE): New, make sure it does.
19238 * tests/regression.at (%union and --defines, Invalid CPP headers):
19239 Move to...
19240 * tests/headers.at: here.
19241
19242 2001-12-29 Akim Demaille <akim@epita.fr>
19243
19244 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19245
19246 2001-12-29 Akim Demaille <akim@epita.fr>
19247
19248 * tests/actions.at (Mid-rule actions): Output on a single line
19249 instead of several.
19250
19251 2001-12-29 Akim Demaille <akim@epita.fr>
19252
19253 * doc/bison.texinfo: Formatting changes.
19254
19255 2001-12-29 Akim Demaille <akim@epita.fr>
19256
19257 Don't store the token defs in a muscle, just be ready to output it
19258 on command. Now possible via `symbols'. Fixes a memory leak.
19259
19260 * src/output.c (token_definitions_output): New.
19261 (output_parser, header_output): Use it.
19262 * src/reader.c (symbols_save): Remove.
19263
19264 2001-12-29 Akim Demaille <akim@epita.fr>
19265
19266 * src/bison.simple: Do not provide a default for YYSTYPE and
19267 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19268 default.
19269
19270 2001-12-29 Akim Demaille <akim@epita.fr>
19271
19272 Mid-rule actions are simply... ignored!
19273
19274 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19275 the empty-rule associated to the dummy symbol, not to the host
19276 rule.
19277 * tests/actions.at (Mid-rule actions): New.
19278
19279 2001-12-29 Akim Demaille <akim@epita.fr>
19280
19281 Memory leak.
19282
19283 * src/reader.c (reader): Free grammar.
19284
19285 2001-12-29 Akim Demaille <akim@epita.fr>
19286
19287 Memory leak.
19288
19289 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19290 since it allocates it for each state, although only one is needed.
19291 (allocate_storage): Do it here.
19292
19293 2001-12-29 Akim Demaille <akim@epita.fr>
19294
19295 * src/options.h, src/options.c (create_long_option_table): Rename
19296 as...
19297 (long_option_table_new): this, with a clearer prototype.
19298 (percent_table): Remove, unused,
19299 * src/getargs.c (getargs): Adjust.
19300
19301 2001-12-29 Akim Demaille <akim@epita.fr>
19302
19303 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19304 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19305 as states.
19306
19307 2001-12-29 Akim Demaille <akim@epita.fr>
19308
19309 * src/lalr.c (build_relations): Rename `states' as `states1'.
19310 Sorry, I don't understand exactly what it is, no better name...
19311
19312 2001-12-29 Akim Demaille <akim@epita.fr>
19313
19314 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19315 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19316 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19317 as rules.
19318
19319 2001-12-29 Akim Demaille <akim@epita.fr>
19320
19321 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19322 ago.
19323
19324 2001-12-29 Akim Demaille <akim@epita.fr>
19325
19326 * src/reader.c, src/reader.h (user_toknums): Remove.
19327 Adjust all users to use symbols[i]->user_token_number.
19328
19329 2001-12-29 Akim Demaille <akim@epita.fr>
19330
19331 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19332 Adjust all users to use symbols[i]->prec or ->assoc.
19333
19334 2001-12-29 Akim Demaille <akim@epita.fr>
19335
19336 * src/reader.c, src/reader.h (tags): Remove.
19337 Adjust all users to use symbols[i]->tag.
19338
19339 2001-12-29 Akim Demaille <akim@epita.fr>
19340
19341 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19342 and rule_table.
19343 * src/reader.c (packsymbols): Fill this table.
19344 Drop sprec.
19345 * src/conflicts.c (resolve_sr_conflict): Adjust.
19346 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19347 single table.
19348 Use symbols[i]->tag instead of tags[i].
19349
19350 2001-12-29 Akim Demaille <akim@epita.fr>
19351
19352 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19353 In addition, put a comment in there, to replace...
19354 * tests/regression.at (%union and C comments): Remove.
19355
19356 2001-12-29 Akim Demaille <akim@epita.fr>
19357
19358 * tests/regression.at (Web2c Actions): Blindly move the actual
19359 output as expected output. The contents *seem* right to me, but I
19360 can't pretend reading perfectly parser tables... Nonetheless, all
19361 the other tests pass correctly, the table look OK, even though the
19362 presence of `$axiom' is to be noted: AFAICS it is useless (but
19363 harmless).
19364
19365 2001-12-29 Akim Demaille <akim@epita.fr>
19366
19367 * src/reader.c (readgram): Don't add the rule 0 if there were no
19368 rules read. In other words, add it _after_ having performed
19369 grammar sanity checks.
19370 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19371
19372 2001-12-29 Akim Demaille <akim@epita.fr>
19373
19374 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19375 visible, and some states have now a different number.
19376
19377 2001-12-29 Akim Demaille <akim@epita.fr>
19378
19379 * src/reader.c (readgram): Bind the initial rule's lineno to that
19380 of the first rule.
19381 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19382 (Solved SR Conflicts): Adjust rule 0's line number.
19383
19384 2001-12-29 Akim Demaille <akim@epita.fr>
19385
19386 Fix the `GAWK Grammar' failure.
19387
19388 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19389 the reductions of the first state which was mistakenly confused
19390 with the final state because precisely final_state was initialized
19391 to 0.
19392 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19393 now noticed by Bison.
19394 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19395 have a reduction on $default.
19396
19397 2001-12-29 Akim Demaille <akim@epita.fr>
19398
19399 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19400 rule line numbers.
19401 * src/closure.c (print_closure): Likewise.
19402 * src/derives.c (print_derives): Likewise.
19403 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19404 now.
19405
19406 2001-12-29 Akim Demaille <akim@epita.fr>
19407
19408 * src/lalr.c (lookaheads_print): New.
19409 (lalr): Call it when --trace-flag.
19410 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19411 are dumped.
19412
19413 2001-12-29 Akim Demaille <akim@epita.fr>
19414
19415 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19416 when walking through ritem, even via rule->rhs.
19417 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19418 (useful_production, useless_nonterminals): Likewise.
19419 (reduce_grammar_tables): Likewise, plus update nritems.
19420 * src/nullable.c (set_nullable): Likewise.
19421 * src/lalr.c (build_relations): Likewise.
19422 * tests/sets.at (Nullable): Adjust.
19423 Fortunately, now, the $axiom is no longer nullable.
19424
19425 2001-12-29 Akim Demaille <akim@epita.fr>
19426
19427 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19428 the 0-sentinel.
19429 * src/gram.c (ritem_longest_rhs): Likewise.
19430 * src/reduce.c (nonterminals_reduce): Likewise.
19431 * src/print_graph.c (print_graph): Likewise.
19432 * src/output.c (output_rule_data): Likewise.
19433 * src/nullable.c (set_nullable): Likewise.
19434
19435 2001-12-29 Akim Demaille <akim@epita.fr>
19436
19437 * src/output.c: Comment changes.
19438
19439 2001-12-27 Paul Eggert <eggert@twinsun.com>
19440
19441 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19442 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19443 Sparc, as they were causing more porting problems than the
19444 (minor) performance improvement was worth.
19445
19446 Also, catch up with 1.31's YYSTD.
19447
19448 2001-12-27 Akim Demaille <akim@epita.fr>
19449
19450 * src/output.c (output_gram): Rely on nritems, not the
19451 0-sentinel. See below.
19452 Use -1 as separator, not 0.
19453 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19454 Rely on -1 as separator in yyrhs, instead of 0.
19455 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19456 twice `Now at end of input', therefore there are two lines less to
19457 expect.
19458
19459 2001-12-27 Akim Demaille <akim@epita.fr>
19460
19461 * tests/regression.at (Unresolved SR Conflicts):
19462 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19463 below.
19464
19465 2001-12-27 Akim Demaille <akim@epita.fr>
19466
19467 * src/LR0.c (new_state): Recognize the final state by the fact it
19468 is reached by eoftoken.
19469 (insert_start_shifting_state, insert_eof_shifting_state)
19470 (insert_accepting_state, augment_automaton): Remove, since now
19471 these states are automatically computed from the initial state.
19472 (generate_states): Adjust.
19473 * src/print.c: When reporting a rule number to the user, substract
19474 1, so that the axiom rule is rule 0, and the first user rule is 1.
19475 * src/reduce.c: Likewise.
19476 * src/print_graph.c (print_core): For the time being, just as for
19477 the report, depend upon --trace-flags to dump the full set of
19478 items.
19479 * src/reader.c (readgram): Once the grammar read, insert the rule
19480 0: `$axiom: START-SYMBOL $'.
19481 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19482 number of the states has changed (the final state is no longer
19483 necessarily the last), catch up.
19484
19485 2001-12-27 Akim Demaille <akim@epita.fr>
19486
19487 Try to make the use of the eoftoken valid. Given that its value
19488 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19489 is used instead of > 0 where appropriate, (ii), depend upon nritems
19490 instead of the 0-sentinel.
19491
19492 * src/gram.h, src/gram.c (nritems): New.
19493 Expected to be duplication of nitems, but for the time being...
19494 * src/reader.c (packgram): Assert nritems and nitems are equal.
19495 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19496 * src/closure.c (print_closure, print_fderives): Likewise.
19497 * src/gram.c (ritem_print): Likewise.
19498 * src/print.c (print_core, print_grammar): Likewise.
19499 * src/print_graph.c: Likewise.
19500
19501 2001-12-27 Akim Demaille <akim@epita.fr>
19502
19503 * src/main.c (main): If there are complains after grammar
19504 reductions, then output the report anyway if requested, then die.
19505 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19506 * src/reader.c (eoftoken): New.
19507 (parse_token_decl): If the token being defined has value `0', it
19508 is the eoftoken.
19509 (packsymbols): No longer hack `tags' to insert `$' by hand.
19510 Be sure to preserve the value of the eoftoken.
19511 (reader): Make sure eoftoken is defined.
19512 Initialize nsyms to 0: now eoftoken is created just like the others.
19513 * src/print.c (print_grammar): Don't special case the eof token.
19514 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19515 lie anyway, albeit pleasant.
19516 * tests/calc.at: Exercise error messages with eoftoken.
19517 Change the grammar so that empty input is invalid.
19518 Adjust expectations.
19519 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19520
19521 2001-12-27 Akim Demaille <akim@epita.fr>
19522
19523 * configure.in: Check the protos of strchr ans strspn.
19524 Replace strchr if needed.
19525 * src/system.h: Provide the protos of strchr, strspn and memchr if
19526 missing.
19527 * lib/strchr.c: New.
19528 * src/reader.c (symbols_save): Use strchr.
19529
19530 2001-12-27 Akim Demaille <akim@epita.fr>
19531
19532 * src/print.c, src/print_graph.c (escape): New.
19533 Use it to quote the TAGS outputs.
19534 * src/print_graph.c (print_state): Now errors are in red, and
19535 reductions in green.
19536 Prefer high to wide: output the state number on a line of its own.
19537
19538 2001-12-27 Akim Demaille <akim@epita.fr>
19539
19540 * src/state.h, src/state.c (reductions_new): New.
19541 * src/LR0.c (set_state_table): Let all the states have a
19542 `reductions', even if reduced to 0.
19543 (save_reductions): Adjust.
19544 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19545 * src/print.c (print_reductions, print_actions): Adjust.
19546 * src/output.c (action_row): Adjust.
19547
19548 2001-12-27 Akim Demaille <akim@epita.fr>
19549
19550 * src/state.h, src/state.c (errs_new, errs_dup): New.
19551 * src/LR0.c (set_state_table): Let all the states have an errs,
19552 even if reduced to 0.
19553 * src/print.c (print_errs, print_reductions): Adjust.
19554 * src/output.c (output_actions, action_row): Adjust.
19555 * src/conflicts.c (resolve_sr_conflict): Adjust.
19556
19557 2001-12-27 Akim Demaille <akim@epita.fr>
19558
19559 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19560
19561 2001-12-27 Akim Demaille <akim@epita.fr>
19562
19563 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19564 * src/print.c: here.
19565 (lookaheadset, shiftset): New, used as additional storage by
19566 print_reductions.
19567 (print_results): Adjust.
19568 (print_shifts, print_gotos, print_errs): New, extracted from...
19569 (print_actions): here.
19570 * src/print_graph.c (print_actions): Remove dead code.
19571
19572 2001-12-27 Akim Demaille <akim@epita.fr>
19573
19574 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19575 `$n' and `@n'.
19576
19577 2001-12-27 Akim Demaille <akim@epita.fr>
19578
19579 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19580 (build_relations): Adjust.
19581
19582 2001-12-27 Akim Demaille <akim@epita.fr>
19583
19584 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19585 duplication.
19586
19587 2001-12-27 Akim Demaille <akim@epita.fr>
19588
19589 * src/reader.c (packgram): Catch nitems overflows.
19590
19591 2001-12-27 Akim Demaille <akim@epita.fr>
19592
19593 * src/files.c, src/files.h (guard_obstack): Remove.
19594 * src/output.c (output): Adjust.
19595 * src/reader.c (parse_braces): New, factoring...
19596 (copy_action, copy_guard): these two which are renamed as...
19597 (parse_action, parse_guard): these.
19598 As a voluntary consequence, using braces around guards is now
19599 mandatory.
19600
19601 2001-12-27 Akim Demaille <akim@epita.fr>
19602
19603 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19604 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19605 members.
19606 (symbol_list_new): Adjust.
19607 (copy_action): action_line is the first line, not the last.
19608 (copy_guard): Just as for actions, store the `action' only, not
19609 the switch/case/break flesh.
19610 Don't parse the user action that might follow the guard, let...
19611 (readgram): do it, i.e., now, there can be an action after a
19612 guard.
19613 In other words the guard is just explicitly optional.
19614 (packgram): Adjust.
19615 * src/output.c (guards_output): New.
19616 (output_parser): Call it when needed.
19617 (output): Also free the guard and attrs obstacks.
19618 * src/files.c, src/files.h (obstack_save): Remove.
19619 (output_files): Remove.
19620 As a result, if one needs the former `.act' file, using an
19621 appropriate skeleton which requires actions and guards is now
19622 required.
19623 * src/main.c (main): Adjust.
19624 * tests/semantic.at: New.
19625 * tests/regression.at: Use `input.y' as input file name.
19626 Avoid 8+3 problems by requiring input.c when the test needs the
19627 parser.
19628
19629 2001-12-27 Akim Demaille <akim@epita.fr>
19630
19631 * src/reader.c (symbol_list_new): Be sure to initialize all the
19632 fields.
19633
19634 2001-12-27 Akim Demaille <akim@epita.fr>
19635
19636 All the hacks using a final pseudo state are now useless.
19637
19638 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19639 * src/lalr.c (nLA): New.
19640 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19641 instead of lookaheadsp from the pseudo state (nstate + 1).
19642
19643 2001-12-27 Akim Demaille <akim@epita.fr>
19644
19645 * src/output.c (action_row, token_actions): Use a state_t instead
19646 of a integer, and nlookaheads instead of the following state's
19647 lookaheadsp.
19648
19649 2001-12-27 Akim Demaille <akim@epita.fr>
19650
19651 * src/conflicts.c (log_resolution, flush_shift)
19652 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19653 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19654 (conflicts_print, print_reductions): Use a state_t instead of an
19655 integer when referring to a state.
19656 As much as possible, depend upon nlookaheads, instead of the
19657 `lookaheadsp' member of the following state (since lookaheads of
19658 successive states are successive, the difference between state n + 1
19659 and n served as the number of lookaheads for state n).
19660 * src/lalr.c (add_lookback_edge): Likewise.
19661 * src/print.c (print_core, print_actions, print_state)
19662 (print_results): Likewise.
19663 * src/print_graph.c (print_core, print_actions, print_state)
19664 (print_graph): Likewise.
19665 * src/conflicts.h: Adjust.
19666
19667 2001-12-27 Akim Demaille <akim@epita.fr>
19668
19669 * src/bison.hairy: Formatting/comment changes.
19670 ANSIfy.
19671 Remove `register' indications.
19672 Add plenty of `static'.
19673
19674 2001-12-27 Akim Demaille <akim@epita.fr>
19675
19676 * src/output.c (prepare): Drop the muscle `ntbase' which
19677 duplicates ntokens.
19678 * src/bison.simple: Formatting/comment changes.
19679 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19680 is an undocumented synonym.
19681
19682 2001-12-22 Akim Demaille <akim@epita.fr>
19683
19684 * src/output.c (output_table_data): Change the prototype to use
19685 `int' for array ranges: some invocations do pass an int, not a
19686 short.
19687 Reported by Wayne Green.
19688
19689 2001-12-22 Akim Demaille <akim@epita.fr>
19690
19691 Some actions of web2c.y are improperly triggered.
19692 Reported by Mike Castle.
19693
19694 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19695 * tests/regression.at (Web2c): Rename as...
19696 (Web2c Report): this.
19697 (Web2c Actions): New.
19698
19699 2001-12-22 Akim Demaille <akim@epita.fr>
19700
19701 Reductions in web2c.y are improperly reported.
19702 Reported by Mike Castle.
19703
19704 * src/conflicts.c (print_reductions): Fix.
19705 * tests/regression.at (Web2c): New.
19706
19707 2001-12-18 Akim Demaille <akim@epita.fr>
19708
19709 Some host fail on `assert (!"foo")', which expands to
19710 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19711 Reported by Nelson Beebee.
19712
19713 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19714 `#define it_succeeded 0' and `assert (it_succeeded)'.
19715
19716 2001-12-17 Marc Autret <autret_m@epita.fr>
19717
19718 * src/bison.simple: Don't hard code the skeleton line and filename.
19719 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19720 New line counter 'skeleton_line' (skeleton-line muscle).
19721
19722 2001-12-17 Paul Eggert <eggert@twinsun.com>
19723
19724 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19725 YYDEBUG must be defined to a nonzero value.
19726
19727 * src/bison.simple (yytname): Do not assume that the user defines
19728 YYDEBUG to a properly parenthesized expression.
19729
19730 2001-12-17 Akim Demaille <akim@epita.fr>
19731
19732 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19733 nlookaheads is a new member.
19734 Adjust all users.
19735 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19736 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19737 state.
19738
19739 2001-12-17 Akim Demaille <akim@epita.fr>
19740
19741 * src/files.h, src/files.c (open_files, close_files): Remove.
19742 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19743 let...
19744 * src/reader.c (reader): Do it.
19745
19746 2001-12-17 Akim Demaille <akim@epita.fr>
19747
19748 * src/conflicts.c (print_reductions): Formatting changes.
19749
19750 2001-12-17 Akim Demaille <akim@epita.fr>
19751
19752 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19753 (flush_reduce): New.
19754 (resolve_sr_conflict): Adjust.
19755
19756 2001-12-17 Akim Demaille <akim@epita.fr>
19757
19758 * src/output.c (output_obstack): Be static and rename as...
19759 (format_obstack): this, to avoid any confusion with files.c's
19760 output_obstack.
19761 * src/reader.h (muscle_obstack): Move to...
19762 * src/output.h: here, since it's defined in output.c.
19763
19764 2001-12-17 Akim Demaille <akim@epita.fr>
19765
19766 * src/output.c (action_row, save_column, default_goto)
19767 (sort_actions, matching_state, pack_vector): Better variable
19768 locality.
19769
19770 2001-12-17 Akim Demaille <akim@epita.fr>
19771
19772 * src/output.c: Various formatting changes.
19773
19774 2001-12-17 Akim Demaille <akim@epita.fr>
19775
19776 * src/files.c (output_files): Free the output_obstack.
19777 * src/main.c (main): Call print and print_graph conditionally.
19778 * src/print.c (print): Work unconditionally.
19779 * src/print_graph.c (print_graph): Work unconditionally.
19780 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19781
19782 2001-12-16 Marc Autret <autret_m@epita.fr>
19783
19784 * src/output.c (actions_output): Fix. When we use %no-lines,
19785 there is one less line per action.
19786
19787 2001-12-16 Marc Autret <autret_m@epita.fr>
19788
19789 * src/bison.simple: Remove a useless #line directive.
19790 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19791 * src/output.c (get_lines_number): New.
19792 (output_parser): Adjust, now takes care about the lines of a
19793 output muscles.
19794 Fix line numbering.
19795 (actions_output): Computes the number of lines taken by actions.
19796 (output_master_parser): Insert new skeleton which is the name of
19797 the output parser file name.
19798
19799 2001-12-15 Marc Autret <autret_m@epita.fr>
19800
19801 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19802
19803 2001-12-15 Marc Autret <autret_m@epita.fr>
19804
19805 * src/output.c (output_gram): Keep track of the hairy one.
19806
19807 2001-12-15 Akim Demaille <akim@epita.fr>
19808
19809 Make `make distcheck' work.
19810
19811 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19812 system.h which uses libgettext.h.
19813
19814 2001-12-15 Akim Demaille <akim@epita.fr>
19815
19816 * src/nullable.c (set_nullable): Useless rules must be skipped,
19817 otherwise, since we range over their symbols, we might look at a
19818 nonterminal which no longer ``exists'', i.e., it is not counted in
19819 `nvars', hence we overflow our arrays.
19820
19821 2001-12-15 Akim Demaille <akim@epita.fr>
19822
19823 The header can also be produced directly, without any obstack!
19824 Yahoo!
19825
19826 * src/files.c, src/files.h (defines_obstack): Remove.
19827 (compute_header_macro): Global.
19828 (defines_obstack_save): Remove.
19829 * src/reader.c (parse_union_decl): No longer output to
19830 defines_obstack: its content can be found in the `stype' muscle
19831 anyway.
19832 (output_token_translations): Merge into...
19833 (symbols_output): this.
19834 Rename as...
19835 (symbols_save): this.
19836 (reader): Adjust.
19837 * src/output.c (header_output): New.
19838 (output): Call it.
19839
19840 2001-12-15 Akim Demaille <akim@epita.fr>
19841
19842 * src/reader.c (parse_union_decl): Instead of handling two obstack
19843 simultaneously, use one to define the `stype' muscle, and use the
19844 value of the latter to fill defines_obstack.
19845 (copy_comment): Remove.
19846 (copy_comment2): Work for a single obstack.
19847 Rename as...
19848 (copy_comment): this.
19849
19850 2001-12-15 Akim Demaille <akim@epita.fr>
19851
19852 * src/lex.c, src/lex.h (xgetc): No longer static.
19853 * src/reader.c (parse_union_decl): Revamp.
19854
19855 2001-12-15 Akim Demaille <akim@epita.fr>
19856
19857 Still making progress in separating Bison into (i) input, (ii)
19858 process, (iii) output: now we can directly output the parser file
19859 without using table_obstack at all.
19860
19861 * src/files.c, src/files.h (table_obstack): Bye bye.
19862 (parser_file_name): New.
19863 * src/files.c (compute_output_file_names): Compute it.
19864 * src/output.c (actions_output, output_parser)
19865 (output_master_parser): To a file instead of an obstack.
19866
19867 2001-12-15 Akim Demaille <akim@epita.fr>
19868
19869 Attach actions to rules, instead of pre-outputting them to
19870 actions_obstack.
19871
19872 * src/gram.h (rule_t): action and action_line are new members.
19873 * src/reader.c (symbol_list): Likewise.
19874 (copy_action): Save the actions within the rule.
19875 (packgram): Save them in rule_table.
19876 * src/output.c (actions_output): New.
19877 (output_parser): Use it on `%%actions'.
19878 (output_rule_data): Don't free rule_table.
19879 (output): Do it.
19880 (prepare): Don't save the `action' muscle.
19881 * src/bison.simple: s/%%action/%%actions/.
19882
19883 2001-12-15 Akim Demaille <akim@epita.fr>
19884
19885 * src/reader.c (copy_action): When --yacc, don't append a `;'
19886 to the user action: let it fail if lacking.
19887 Suggested by Arnold Robbins and Tom Tromey.
19888
19889 2001-12-14 Akim Demaille <akim@epita.fr>
19890
19891 * src/lex.c (literalchar): Simply return the char you decoded, non
19892 longer mess around with obstacks and int pointers.
19893 Adjust all callers.
19894
19895 2001-12-14 Akim Demaille <akim@epita.fr>
19896
19897 * src/lex.c (literalchar): Don't escape the special characters,
19898 just decode them, and keep them as char (before, eol was output as
19899 the 2 char string `\n' etc.).
19900 * src/output.c (output_rule_data): Use quotearg to output the
19901 token strings.
19902
19903 2001-12-13 Paul Eggert <eggert@twinsun.com>
19904
19905 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19906 Do not infringe on the global user namespace when using C++.
19907 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19908 All uses of `fprintf' and `stderr' changed.
19909
19910 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19911
19912 2001-12-13 Akim Demaille <akim@epita.fr>
19913
19914 The computation of nullable is broken: it doesn't handle empty
19915 RHS's properly.
19916
19917 * tests/torture.at (GNU AWK Grammar): New.
19918 * tests/sets.at (Nullable): New.
19919 * src/nullable.c (set_nullable): Instead of blindly looping over
19920 `ritems', loop over the rules, and then over their rhs's.
19921
19922 Work around Autotest bugs.
19923
19924 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19925 frame, because Autotest understand lines starting with a `+' as
19926 traces from the shell. Then, they are not processed properly.
19927 Admittedly an Autotest bug, but we don't have time to wait for
19928 Autotest to catch up.
19929 * tests/regression.at (Broken Closure): Adjust to the new table
19930 frames.
19931 Move to...
19932 * tests/sets.at: here.
19933
19934 2001-12-13 Akim Demaille <akim@epita.fr>
19935
19936 * src/closure.c (closure): Use nrules instead of playing tricks
19937 with BITS_PER_WORD.
19938
19939 2001-12-13 Akim Demaille <akim@epita.fr>
19940
19941 * src/print.c (print_actions): Output the handling of `$' as the
19942 traces do: shifting the token EOF. Before EOF was treated as a
19943 nonterminal.
19944 * tests/regression.at: Adjust some tests.
19945 * src/print_graph.c (print_core): Complete the set of items via
19946 closure. The next-to-final and final states are still unsatisfying,
19947 but that's to be addressed elsewhere.
19948 No longer output the rule numbers, but do output the state number.
19949 A single loop for the shifts + gotos is enough, but picked a
19950 distinct color for each.
19951 (print_graph): Initialize and finalize closure.
19952
19953 2001-12-13 Akim Demaille <akim@epita.fr>
19954
19955 * src/reader.c (readgram): Remove dead code, an strip useless
19956 braces.
19957 (get_type): Remove, unused.
19958
19959 2001-12-12 Akim Demaille <akim@epita.fr>
19960
19961 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19962 on that of lib/error.c.
19963
19964 2001-12-12 Akim Demaille <akim@epita.fr>
19965
19966 Some hosts don't like `/' in includes.
19967
19968 * src/system.h: Include libgettext.h without qualifying the path.
19969 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19970 $(top_srcdir).
19971
19972 2001-12-11 Marc Autret <autret_m@epita.fr>
19973
19974 * src/output.c (output_parser): Remove useless muscle.
19975
19976 2001-12-11 Marc Autret <autret_m@epita.fr>
19977
19978 * src/bison.simple: Remove #line just before %%epilogue. It
19979 is now handled in ...
19980 * src/reader.c (read_additionnal_code): Add the output of a
19981 #line for the epilogue.
19982
19983 2001-12-10 Marc Autret <autret_m@epita.fr>
19984
19985 * src/reader.c (copy_definition): Re-use CPP-outed code which
19986 replace precedent remove.
19987 * src/bison.simple: Remove #line before %%prologue because
19988 %%input-line is wrong at this time.
19989
19990 2001-12-10 Marc Autret <autret_m@epita.fr>
19991
19992 * src/reader.c (symbols_output): Clean up.
19993 * src/output.c (output_gram, output): Clean up.
19994
19995 2001-12-10 Akim Demaille <akim@epita.fr>
19996
19997 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19998 * src/LR0.c (set_state_table): here.
19999 * src/lalr.c (lalr): Call it.
20000
20001 2001-12-10 Akim Demaille <akim@epita.fr>
20002
20003 * src/state.h (shifts): Remove the `number' member: shifts are
20004 attached to state, hence no longer need to be labelled with a
20005 state number.
20006
20007 2001-12-10 Akim Demaille <akim@epita.fr>
20008
20009 Now that states have a complete set of members, the linked list of
20010 shifts is useless: just fill directly the state's shifts member.
20011
20012 * src/state.h (shifts): Remove the `next' member.
20013 * src/LR0.c (first_state, last_state): Remove.
20014 Adjust the callers.
20015 (augment_automaton): Don't look for the shifts that must be added
20016 a shift on EOF: it is those of the state we looked for! But now,
20017 since shifts are attached, it is no longer needed to looking
20018 merely by its id: its number.
20019
20020 2001-12-10 Akim Demaille <akim@epita.fr>
20021
20022 * src/LR0.c (augment_automaton): Better variable locality.
20023 Remove an impossible branch: if there is a state corresponding to
20024 the start symbol being shifted, then there is shift for the start
20025 symbol from the initial state.
20026
20027 2001-12-10 Akim Demaille <akim@epita.fr>
20028
20029 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20030 only when appropriate: when insert_start_shifting_state' is not
20031 invoked.
20032 * tests/regression.at (Rule Line Numbers): Adjust.
20033
20034 2001-12-10 Akim Demaille <akim@epita.fr>
20035
20036 * src/LR0.c (augment_automaton): Now that all states have shifts,
20037 merge the two cases addition shifts to the initial state.
20038
20039 2001-12-10 Akim Demaille <akim@epita.fr>
20040
20041 * src/lalr.c (set_state_table): Move to...
20042 * src/LR0.c: here.
20043 * src/lalr.c (lalr): Don't call it...
20044 * src/LR0.c (generate_states): do it.
20045 * src/LR0.h (first_state): Remove, only the table is used.
20046
20047 2001-12-10 Akim Demaille <akim@epita.fr>
20048
20049 * src/LR0.h (first_shift, first_reduction): Remove.
20050 * src/lalr.c: Don't use first_shift: find shifts through the
20051 states.
20052
20053 2001-12-10 Akim Demaille <akim@epita.fr>
20054
20055 * src/LR0.c: Attach shifts to states as soon as they are
20056 computed.
20057 * src/lalr.c (set_state_table): Instead of assigning shifts to
20058 state, just assert that the mapping was properly done.
20059
20060 2001-12-10 Akim Demaille <akim@epita.fr>
20061
20062 * src/LR0.c (insert_start_shift): Rename as...
20063 (insert_start_shifting_state): this.
20064 (insert_eof_shifting_state, insert_accepting_state): New.
20065 (augment_automaton): Adjust.
20066 Better locality of the variables.
20067 When looking if the start_symbol is shifted from the initial
20068 state, using `while (... symbol != start_symbol ...)' sounds
20069 better than `while (... symbol < start_symbol ...)': If fail
20070 to see how the order between symbols could be relevant!
20071
20072 2001-12-10 Akim Demaille <akim@epita.fr>
20073
20074 * src/getargs.h: Don't declare `spec_name_prefix' and
20075 `spec_file_prefix', declared by src/files.h.
20076 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20077 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20078 * src/output.c (prepare): Adjust.
20079 * src/reader.c (symbols_output): Likewise.
20080 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20081
20082 2001-12-10 Akim Demaille <akim@epita.fr>
20083
20084 * src/muscle_tab.c (muscle_init): NULL is a better default than
20085 `"0"'.
20086
20087 2001-12-10 Akim Demaille <akim@epita.fr>
20088
20089 * src/reader.c (reader): Calling symbols_output once is enough.
20090
20091 2001-12-10 Akim Demaille <akim@epita.fr>
20092
20093 Now that states have a complete set of members, the linked list of
20094 reductions is useless: just fill directly the state's reductions
20095 member.
20096
20097 * src/state.h (struct reductions): Remove member `number' and
20098 `next'.
20099 * src/LR0.c (first_reduction, last_reduction): Remove.
20100 (save_reductions): Don't link the new reductions, store them in
20101 this_state.
20102 * src/lalr.c (set_state_table): No need to attach reductions to
20103 states, it's already done.
20104 * src/output.c (output_actions): No longer free the shifts, then
20105 the reductions, then the states: free all the states and their
20106 members.
20107
20108 2001-12-10 Akim Demaille <akim@epita.fr>
20109
20110 * src/options.c (OPTN, DRTV, BOTH): New.
20111 (option_table): Use them.
20112
20113 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20114 the job of system.h.
20115 * src/options.c: Don't include stdio.h and xalloc.h for the same
20116 reasons.
20117
20118 2001-12-10 Akim Demaille <akim@epita.fr>
20119
20120 * src/output.c (output, prepare): Make sure the values of the
20121 muscles `action' and `prologue' are 0-terminated.
20122
20123 2001-12-10 Akim Demaille <akim@epita.fr>
20124
20125 Clean up GCC warnings.
20126
20127 * src/reader.c (copy_action): `buf' is not used.
20128 (parse_skel_decl): Be static.
20129 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20130 * src/options.h (create_long_option_table): Have a real prototype.
20131 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20132 (hash_delete_at): Return const void *.
20133 Adjust casts to preserve the const.
20134
20135 2001-12-10 Akim Demaille <akim@epita.fr>
20136
20137 * configure.in: Require 2.52g.
20138 M4 is not needed, but AUTOM4TE is.
20139 * m4/m4.m4: Remove.
20140 * tests/Makefile.am: Adjust.
20141
20142 2001-12-10 Akim Demaille <akim@epita.fr>
20143
20144 One structure for states is enough, even though theoretically
20145 there are LR(0) states and LALR(1) states.
20146
20147 * src/lalr.h (state_t): Remove.
20148 (state_table): Be state_t **, not state_t *.
20149 * src/state.h (core, CORE_ALLOC): Rename as...
20150 (state_t, STATE_ALLOC): this.
20151 Add the LALR(1) members: shifts, reductions, errs.
20152 * src/LR0.c (state_table): Rename as...
20153 (state_hash): this, to avoid name clashes with the global
20154 `state_table'.
20155 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20156 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20157
20158 2001-12-10 Akim Demaille <akim@epita.fr>
20159
20160 Bison dumps core on bash.y.
20161 Reported by Pascal Bart.
20162
20163 * src/warshall.c (bitmatrix_print): New.
20164 (TC): Use it.
20165 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20166 j must be the outer loop.
20167 * tests/regression.at (Broken Closure): New.
20168
20169 2001-12-05 Akim Demaille <akim@epita.fr>
20170
20171 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20172 its argument.
20173 Reported by Peter Hamorsky.
20174
20175 2001-12-05 Akim Demaille <akim@epita.fr>
20176
20177 * src/conflicts.c (err_table): Remove.
20178 (resolve_sr_conflict): Adjust.
20179 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20180 Rename as...
20181 (state_t.reductions, state_t.shifts): this.
20182
20183 2001-12-05 Akim Demaille <akim@epita.fr>
20184
20185 * src/reduce.c (reduce_grammar_tables): No longer disable the
20186 removal of useless rules via CPP but via `if (0)', so that the
20187 compiler still check the code is valid.
20188 For instance, it should have noticed `rline' no longer exists: use
20189 the `line' member of rule_t.
20190 * src/gram.c (dummy, rline): Remove, unused.
20191
20192 2001-12-05 Akim Demaille <akim@epita.fr>
20193
20194 * src/output.c (pack_vector): Use assert, not berror.
20195 * src/main.c (berror): Remove, unused.
20196
20197 2001-12-05 Akim Demaille <akim@epita.fr>
20198
20199 New experimental feature: if --verbose --trace output all the
20200 items of a state, not only its kernel.
20201
20202 * src/print.c (print_core): If `trace_flag', then invoke closure
20203 before outputting the items of the state (print_core is no longer
20204 a correct name them).
20205 (print_results): Invoke new_closure/free_closure if needed.
20206
20207 2001-12-05 Akim Demaille <akim@epita.fr>
20208
20209 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20210 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20211 (nitemset): for consistency with the rest of the project.
20212
20213 2001-12-05 Akim Demaille <akim@epita.fr>
20214
20215 * src/closure.c (print_closure): Improve.
20216 (closure): Use it for printing input and output.
20217
20218 2001-12-05 Akim Demaille <akim@epita.fr>
20219
20220 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20221 indexed by nonterminals.
20222
20223 2001-12-05 Akim Demaille <akim@epita.fr>
20224
20225 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20226 what it was!).
20227 * src/warshall.h: Remove accidental duplication of the content.
20228
20229 2001-12-05 Akim Demaille <akim@epita.fr>
20230
20231 * src/closure.c (set_fderives): De-obfuscate.
20232
20233 2001-12-05 Akim Demaille <akim@epita.fr>
20234
20235 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20236
20237 2001-12-05 Akim Demaille <akim@epita.fr>
20238
20239 * src/closure.c (set_firsts): De-obfuscate.
20240
20241 2001-12-05 Akim Demaille <akim@epita.fr>
20242
20243 * src/output.c (action_row): De-obfuscate
20244 using the good o' techniques: arrays not pointers, variable
20245 locality, BITISSET, RESETBIT etc.
20246
20247 2001-12-05 Akim Demaille <akim@epita.fr>
20248
20249 Pessimize the code to simplify it: from now on, all the states
20250 have a valid SHIFTS, which NSHIFTS is possibly 0.
20251
20252 * src/LR0.c (shifts_new): Be global and move to..
20253 * src/state.c, src/state.h: here.
20254 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20255 * src/print_graph: Adjust.
20256
20257 2001-12-05 Akim Demaille <akim@epita.fr>
20258
20259 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20260 * src/conflicts.c: Use it.
20261 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20262 incorrectly ``simplified''.
20263
20264 2001-12-05 Akim Demaille <akim@epita.fr>
20265
20266 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20267 using the good o' techniques: arrays not pointers, variable
20268 locality, BITISSET, RESETBIT etc.
20269
20270 2001-12-05 Akim Demaille <akim@epita.fr>
20271
20272 * src/state.h (SHIFT_SYMBOL): New.
20273 * src/conflicts.c: Use it to deobfuscate.
20274
20275 2001-12-05 Akim Demaille <akim@epita.fr>
20276
20277 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20278 (print_reductions): De-obfuscate using the good o' techniques:
20279 arrays not pointers, variable locality, BITISSET.
20280
20281 2001-12-05 Akim Demaille <akim@epita.fr>
20282
20283 * src/conflicts.c (print_reductions): Arrays, not pointers.
20284 Use BITISSET.
20285
20286 2001-12-05 Akim Demaille <akim@epita.fr>
20287
20288 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20289
20290 2001-12-05 Akim Demaille <akim@epita.fr>
20291
20292 * src/conflicts.c (print_reductions): Improve variable locality.
20293
20294 2001-12-05 Akim Demaille <akim@epita.fr>
20295
20296 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20297
20298 2001-12-05 Akim Demaille <akim@epita.fr>
20299
20300 * src/conflicts.c (print_reductions): Improve variable locality.
20301
20302 2001-12-05 Akim Demaille <akim@epita.fr>
20303
20304 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20305 * src/lalr.c: Use them.
20306
20307 2001-12-05 Akim Demaille <akim@epita.fr>
20308
20309 * src/LR0.c (augment_automaton): Formatting changes.
20310 Better variable locality.
20311
20312 2001-12-05 Akim Demaille <akim@epita.fr>
20313
20314 * src/lalr.c (matrix_print): New.
20315 (transpose): Use it.
20316 Use arrays instead of pointers.
20317
20318 2001-12-05 Akim Demaille <akim@epita.fr>
20319
20320 * src/lalr.c (maxrhs): Move to...
20321 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20322 * src/lalr.c (build_relations): Adjust.
20323
20324 2001-12-05 Akim Demaille <akim@epita.fr>
20325
20326 * src/lalr.c (transpose): Free the memory allocated to the
20327 argument, as it is replaced by the results by the unique caller.
20328 (build_relations): Merely invoke transpose: it handles the memory
20329 deallocation.
20330 Improve variable locality.
20331 Avoid variables used as mere abbreviations.
20332 (compute_lookaheads): Use arrays instead of pointers.
20333
20334 2001-12-05 Akim Demaille <akim@epita.fr>
20335
20336 * src/lalr.c (initialize_F): Improve variable locality.
20337 Avoid variables used as mere abbreviations.
20338
20339 2001-12-05 Akim Demaille <akim@epita.fr>
20340
20341 * src/derives.c (print_derives): Display the ruleno.
20342 * src/lalr.c (initialize_F, transpose): Better variable locality
20343 to improve readability.
20344 Avoid variables used as mere abbreviations.
20345
20346 2001-12-05 Akim Demaille <akim@epita.fr>
20347
20348 * src/lalr.c (traverse): Use arrays instead of pointers.
20349
20350 2001-12-05 Akim Demaille <akim@epita.fr>
20351
20352 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20353 the handling of squeue.
20354 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20355
20356 2001-12-05 Akim Demaille <akim@epita.fr>
20357
20358 Because useless nonterminals are now kept alive (instead of being
20359 `destroyed'), we now sometimes examine them, and store information
20360 related to them. Hence we need to know their number, and adjust
20361 memory allocations.
20362
20363 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20364 static.
20365 * src/LR0.c (allocate_itemsets): The memory allocated to
20366 `symbol_count' was used for two different purpose: once to count
20367 the number of occurrences of each symbol, and later reassigned to
20368 `shift_symbol', containing the symbol that can be shifted from a
20369 given state.
20370 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20371 only, and...
20372 (new_itemsets): Allocate `shift_symbol' here.
20373 (allocate_itemsets): symbol_count includes useless nonterminals.
20374 Make room for them.
20375 (free_storage): Use `free', not `XFREE', for pointers that cannot
20376 be null.
20377
20378 2001-12-05 Akim Demaille <akim@epita.fr>
20379
20380 * src/nullable.c (set_nullable): Deobfuscate the handling of
20381 ritem.
20382 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20383
20384 2001-12-05 Akim Demaille <akim@epita.fr>
20385
20386 * src/gram.c, src/gram.h (ritem_print): New.
20387 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20388 (This useless function was defined only to work around VMS linkers
20389 that can't handle compilation units with variables only).
20390 * src/reduce.c (dump_grammar): Use it to trace the construction of
20391 ritem.
20392
20393 2001-12-04 Paul Eggert <eggert@twinsun.com>
20394
20395 * src/bison.simple (union yyalloc): Change member names
20396 to be the same as the stack names.
20397 (yyparse): yyptr is now union yyalloc *, not char *.
20398 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20399 and may generate better code on some machines.
20400 (yystpcpy): Use prototype if __STDC__ is defined, not just
20401 if __cplusplus is defined.
20402
20403 2001-11-30 Akim Demaille <akim@epita.fr>
20404
20405 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20406 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20407 Gettext doesn't compile cleanly, and dies with -Werror.
20408 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20409 Include WARNING_CFLAGS here.
20410 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20411 before being defined.
20412
20413 2001-11-27 Paul Eggert <eggert@twinsun.com>
20414
20415 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20416 First arg is int, not unsigned.
20417 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20418 (SIZE_MAX, UINT_MAX): New macros.
20419 (quotearg_n_options): Abort if N is negative.
20420 Avoid overflow check on hosts where size_t is 64 bits and int
20421 is 32 bits, as overflow is impossible there.
20422 Fix off-by-one typo that caused unnecessary reallocation.
20423
20424 2001-11-29 Paul Eggert <eggert@twinsun.com>
20425
20426 Name space cleanup in generated parser.
20427
20428 * doc/bison.texinfo (Bison Parser): Discuss system headers
20429 and their effect on the user name space.
20430
20431 * src/bison.simple:
20432 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20433 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20434 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20435
20436 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20437 on user names when possible.
20438
20439 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20440 Simplify test for whather <alloca.h> exists.
20441
20442 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20443
20444 (<stdio.h>): Include if YYDEBUG.
20445
20446 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20447 ! defined (yyoverflow) && ! defined (yymemcpy).
20448
20449 (yymemcpy, yyparse): Rename local variables as needed so that
20450 they all begin with 'yy'.
20451
20452 (yystrlen, yystpcpy): New functions.
20453
20454 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20455 All uses changed.
20456
20457 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20458 instead of relying on string.h functions. Use YYSTACK_ALLOC
20459 and YYSTACK_FREE instead of malloc and free.
20460
20461 2001-11-30 Akim Demaille <akim@epita.fr>
20462
20463 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20464 before their first uses.
20465 (YYBISON, YYPURE): Move to the top of the output.
20466
20467 2001-11-30 Akim Demaille <akim@epita.fr>
20468
20469 * tests/reduce.at (Useless Nonterminals): Fix.
20470
20471 2001-11-30 Akim Demaille <akim@epita.fr>
20472
20473 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20474 if body instead of `;' to pacify GCC's warnings.
20475
20476 2001-11-30 Akim Demaille <akim@epita.fr>
20477
20478 Instead of mapping the LHS of unused rules to -1, keep the LHS
20479 valid, but flag the rules as invalid.
20480
20481 * src/gram.h (rule_t): `useful' is a new member.
20482 * src/print.c (print_grammar): Adjust.
20483 * src/derives.c (set_derives): Likewise.
20484 * src/reader.c (packgram, reduce_output): Likewise.
20485 * src/reduce.c (reduce_grammar_tables): Likewise.
20486 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20487
20488 2001-11-30 Akim Demaille <akim@epita.fr>
20489
20490 * src/reduce.c (reduce_output): Formatting changes.
20491 * src/print.c (print_results, print_grammar): Likewise.
20492 * tests/regression.at (Rule Line Numbers)
20493 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20494
20495 2001-11-30 Akim Demaille <akim@epita.fr>
20496
20497 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20498 useless nonterminals, move them at the end of the symbol arrays.
20499 (reduce_output): Adjust.
20500 * tests/reduce.at (Useless Nonterminals): Adjust.
20501
20502 2001-11-30 Akim Demaille <akim@epita.fr>
20503
20504 * src/reduce.c: Various comment/formatting changes.
20505 (nonterminals_reduce): New, extracted from...
20506 (reduce_grammar_tables): here.
20507 (reduce_grammar): Call nonterminals_reduce.
20508
20509 2001-11-29 Paul Eggert <eggert@twinsun.com>
20510
20511 * src/bison.simple (YYSTACK_REALLOC): Remove.
20512 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20513 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20514 New macros.
20515 (union yyalloc): New type.
20516 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20517 an arbitrary restriction on hosts where size_t is wider than int.
20518
20519 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20520 a parser stack overflow. Allocate just one block of memory for all
20521 three stacks, instead of allocating three blocks; this typically is
20522 faster and reduces fragmentation.
20523
20524 Do not limit the number of items in the stack to a value that fits
20525 in 'int', as this is an arbitrary limit on hosts with 64-bit
20526 size_t and 32-bit int.
20527
20528 2001-11-29 Marc Autret <autret_m@epita.fr>
20529
20530 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20531 of defining YYERROR_VERBOSE.
20532 [AT_DATA]: $4 is now out of C declarations in the prologue.
20533
20534 2001-11-28 Marc Autret <autret_m@epita.fr>
20535
20536 * src/reader.c (parse_dquoted_param): New.
20537 (parse_skel_decl): Use it.
20538 * src/lex.h: Add its prototype.
20539 * src/lex.c (literalchar): Become not static.
20540
20541 2001-11-28 Marc Autret <autret_m@epita.fr>
20542
20543 * src/output.h: And put its extern declaration here.
20544 * src/output.c (error_verbose): Define here.
20545 (prepare): Echo name modification.
20546 * src/getargs.h: Clean its extern declaration.
20547 * src/getargs.c (error_verbose_flag): Remove.
20548 (getargs): Remove case 'e'.
20549 * src/options.c (option_table): 'error-verbose' is now seen as simple
20550 percent option.
20551 Include output.h.
20552
20553 * src/reader.c (read_declarations): Remove case tok_include.
20554 (parse_include_decl): Remove.
20555 * src/lex.h (token_t): Remove tok_include.
20556 * src/options.c (option_table): 'include' is now a simple command line
20557 option.
20558
20559 2001-11-28 Marc Autret <autret_m@epita.fr>
20560
20561 * src/bison.simple: Adjust muscle names.
20562 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20563 * src/output.c (prepare): s/_/-/ for the muscles names.
20564 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20565
20566 2001-11-28 Marc Autret <autret_m@epita.fr>
20567
20568 * src/bison.simple: Fix debug.
20569 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20570
20571 2001-11-28 Akim Demaille <akim@epita.fr>
20572
20573 * src/LR0.c (shifts_new): New.
20574 (save_shifts, insert_start_shift, augment_automaton): Use it.
20575
20576 2001-11-28 Akim Demaille <akim@epita.fr>
20577
20578 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20579 keep ruleno only.
20580
20581 2001-11-28 Akim Demaille <akim@epita.fr>
20582
20583 * src/closure.c (closure): Instead of looping over word in array
20584 then bits in words, loop over bits in array.
20585
20586 2001-11-28 Akim Demaille <akim@epita.fr>
20587
20588 * src/closure.c (closure): No longer optimize the special case
20589 where all the bits of `ruleset[r]' are set to 0, to make the code
20590 clearer.
20591
20592 2001-11-28 Akim Demaille <akim@epita.fr>
20593
20594 * src/closure.c (closure): `r' and `c' are new variables, used to
20595 de-obfuscate accesses to RULESET and CORE.
20596
20597 2001-11-28 Akim Demaille <akim@epita.fr>
20598
20599 * src/reduce.c (reduce_print): Use ngettext.
20600 (dump_grammar): Improve the trace accuracy.
20601
20602 2001-11-28 Akim Demaille <akim@epita.fr>
20603
20604 * src/reduce.c (dump_grammar): Don't translate trace messages.
20605
20606 2001-11-28 Akim Demaille <akim@epita.fr>
20607
20608 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20609 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20610 as all tags are free'ed afterwards.
20611 From Enrico Scholz.
20612
20613 2001-11-27 Paul Eggert <eggert@twinsun.com>
20614
20615 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20616 use alloca when we didn't want to, and vice versa.
20617
20618 2001-11-27 Marc Autret <autret_m@epita.fr>
20619
20620 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20621 initialization.
20622 * src/output.c (prepare): Remove its update.
20623
20624 2001-11-27 Marc Autret <autret_m@epita.fr>
20625
20626 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20627 Use %error-verbose.
20628
20629 2001-11-27 Marc Autret <autret_m@epita.fr>
20630
20631 * src/bison.simple: Remove YYERROR_VERBOSE using.
20632 Use %%error_verbose.
20633 (yyparse): Likewise.
20634 * src/output.c (prepare): Give its final value.
20635 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20636 * src/getargs.h: Add its extern declaration.
20637 * src/getargs.c (error_verbose_flag): New int.
20638 (getargs): Update to catch new case.
20639 * src/options.c (option_table): 'error-verbose' is a new option.
20640 (shortopts): Update.
20641
20642 2001-11-27 Akim Demaille <akim@epita.fr>
20643
20644 * src/system.h: Use intl/libgettext.h.
20645 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20646
20647 2001-11-27 Akim Demaille <akim@epita.fr>
20648
20649 * tests/torture.at (Exploding the Stack Size with Malloc):
20650 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20651
20652 2001-11-27 Akim Demaille <akim@epita.fr>
20653
20654 * src/files.c: Include error.h.
20655 Reported by Hans Aberg.
20656
20657 2001-11-26 Marc Autret <autret_m@epita.fr>
20658
20659 * src/reader.c (parse_include_decl): New, not yet implemented.
20660 (read_declarations): Add case tok_include.
20661 * src/getargs.h (include): Add its extern definition.
20662 * src/getargs.c (include): New const char *.
20663 (getargs): Add case '-I'.
20664 * src/options.c (option_table): Add include as command line and
20665 percent option.
20666 * src/lex.h (token_t): Add tok_include.
20667
20668 2001-11-26 Akim Demaille <akim@epita.fr>
20669
20670 * src/reader.c (readgram): Make sure rules for mid-rule actions
20671 have a lineno equal to that of their host rule.
20672 Reported by Hans Aberg.
20673 * tests/regression.at (Rule Line Numbers): New.
20674
20675 2001-11-26 Akim Demaille <akim@epita.fr>
20676
20677 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20678 size_ts.
20679
20680 2001-11-26 Akim Demaille <akim@epita.fr>
20681
20682 * src/complain.c, src/complain.h (error): Remove, provided by
20683 lib/error.[ch].
20684
20685 2001-11-26 Akim Demaille <akim@epita.fr>
20686
20687 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20688 issue an error message.
20689 * tests/regression.at (Invalid %directive): New.
20690 Reported by Hans Aberg.
20691
20692 2001-11-26 Akim Demaille <akim@epita.fr>
20693
20694 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20695 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20696
20697 2001-11-26 Akim Demaille <akim@epita.fr>
20698
20699 * src/conflicts.c (conflicts_print): Don't complain at all when
20700 there are no reduce/reduce conflicts, and as many shift/reduce
20701 conflicts as expected.
20702 * tests/regression.at (%expect right): Adjust.
20703
20704 2001-11-23 Akim Demaille <akim@epita.fr>
20705
20706 * lib/alloca.c: Update, from fileutils.
20707
20708 2001-11-23 Akim Demaille <akim@epita.fr>
20709
20710 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20711
20712 2001-11-23 Akim Demaille <akim@epita.fr>
20713
20714 * src/system.h: Include alloca.h.
20715 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20716
20717 2001-11-23 Akim Demaille <akim@epita.fr>
20718
20719 * src/print_graph.c (print_actions): Remove `rule', unused.
20720 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20721 pacify GCC's signed < unsigned warnings.
20722 * src/closure.c (itemsetsize): Likewise.
20723 * src/reader.c (symbol_list_new): Static.
20724
20725 2001-11-23 Akim Demaille <akim@epita.fr>
20726
20727 Attaching lineno to buckets is stupid, since only one copy of each
20728 symbol is kept, only the line of the first occurrence is kept too.
20729
20730 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20731 * src/reader.c (rline_allocated): Remove, unused.
20732 (symbol_list): Have a `line' member.
20733 (symbol_list_new): New.
20734 (readgram): Use it.
20735 * src/print.c (print_grammar): Output the rule line numbers.
20736 * tests/regression.at (Solved SR Conflicts)
20737 (Unresolved SR Conflicts): Adjust.
20738 Reported by Hans Aberg.
20739
20740 2001-11-22 Marc Autret <autret_m@epita.fr>
20741
20742 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20743
20744 2001-11-22 Marc Autret <autret_m@epita.fr>
20745
20746 * src/muscle_tab.c (muscle_init): Remove initialization of
20747 skeleton muscle.
20748 * src/output.c (output_master_parser): Do it here.
20749
20750 2001-11-20 Akim Demaille <akim@epita.fr>
20751
20752 * po/sv.po: New.
20753 * configure.in (ALL_LINGUAS): Adjust.
20754 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20755 longer contains strings to translate.
20756
20757 2001-11-19 Akim Demaille <akim@epita.fr>
20758
20759 * src/conflicts.c (conflicts_print): Add a missing \n.
20760
20761 2001-11-19 Akim Demaille <akim@epita.fr>
20762
20763 * src/nullable.c (nullable_print): New.
20764 (set_nullable): Call it when tracing.
20765 Better locality of variables.
20766
20767 2001-11-19 Akim Demaille <akim@epita.fr>
20768
20769 * src/print.c (print_actions): Better locality of variables.
20770
20771 2001-11-19 Akim Demaille <akim@epita.fr>
20772
20773 * src/derives.c (print_derives): Fix and enrich.
20774 * src/closure.c (print_fderives): Likewise.
20775
20776 2001-11-19 Akim Demaille <akim@epita.fr>
20777
20778 * src/closure.c (itemsetend): Remove, replaced with...
20779 (itemsetsize): new.
20780
20781 2001-11-19 Akim Demaille <akim@epita.fr>
20782
20783 * src/LR0.c (kernel_end): Remove, replaced with...
20784 (kernel_size): new.
20785
20786 2001-11-19 Akim Demaille <akim@epita.fr>
20787
20788 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20789 to clarify.
20790
20791 2001-11-19 Akim Demaille <akim@epita.fr>
20792
20793 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20794
20795 2001-11-19 Akim Demaille <akim@epita.fr>
20796
20797 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20798 trace messages.
20799 * src/LR0.c: Likewise.
20800 (allocate_itemsets): Use arrays instead of pointers to clarify.
20801
20802 2001-11-19 Akim Demaille <akim@epita.fr>
20803
20804 * src/getargs.c (statistics_flag): Replace with...
20805 (trace_flag): New.
20806 (longopts): Accept --trace instead of --statistics.
20807 * src/getargs.h, src/options.c: Adjust.
20808 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20809 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20810
20811 2001-11-19 Akim Demaille <akim@epita.fr>
20812
20813 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20814 pointers to clarify the code.
20815 (save_reductions, save_shifts): Factor common parts of alternatives.
20816
20817 2001-11-19 Akim Demaille <akim@epita.fr>
20818
20819 * src/LR0.c (new_state, get_state): Complete TRACE code.
20820 * src/closure.c: Include `reader.h' to get `tags', needed by the
20821 trace code.
20822 Rename the conditional DEBUG as TRACE.
20823 Output consistently TRACEs to stderr, not stdout.
20824 * src/derives.c: Likewise.
20825 * src/reduce.c: (inaccessable_symbols): Using if is better style
20826 than goto.
20827 Use `#if TRACE' instead of `#if 0' for tracing code.
20828
20829 2001-11-19 Akim Demaille <akim@epita.fr>
20830
20831 * src/system.h (LIST_FREE, shortcpy): New.
20832 * src/LR0.c: Use them.
20833 * src/output.c (free_itemsets, free_reductions, free_shifts):
20834 Remove, replaced by LIST_FREE.
20835
20836 2001-11-19 Akim Demaille <akim@epita.fr>
20837
20838 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20839 (REDUCTIONS_ALLOC): New.
20840 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20841 allocation.
20842
20843 2001-11-19 Akim Demaille <akim@epita.fr>
20844
20845 * src/LR0.c (new_state): Complete trace code.
20846 * src/nullable.c (set_nullable): Don't translate traces.
20847
20848 2001-11-19 Akim Demaille <akim@epita.fr>
20849
20850 * src/print_graph.c (print_core): Better locality of variables.
20851 * src/print.c (print_core): Likewise.
20852
20853 2001-11-19 Akim Demaille <akim@epita.fr>
20854
20855 * src/vcg.c: You do the output, so you are responsible of the
20856 handling of VCG syntax, in particular: use quotearg.
20857 * src/print_graph.c: Don't.
20858 (print_actions): Don't output the actions as part of the nodes,
20859 since that's the job of the edges.
20860 (print_state): Don't output by hand: fill the node description,
20861 and ask for its output.
20862
20863 2001-11-19 Akim Demaille <akim@epita.fr>
20864
20865 * src/bison.simple (yyparse): When verbosely reporting an error,
20866 no longer put additional quotes around token names.
20867 * tests/calc.at: Adjust.
20868
20869 2001-11-19 Akim Demaille <akim@epita.fr>
20870
20871 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20872 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20873 * src/output.c: Adjust.
20874
20875 2001-11-19 Akim Demaille <akim@epita.fr>
20876
20877 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20878 (rule_t): this.
20879 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20880
20881 2001-11-19 Akim Demaille <akim@epita.fr>
20882
20883 * src/gram.h (rule_t): New.
20884 (rule_table): New.
20885 (rrhs, rlhs): Remove, part of state_t.
20886 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20887 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20888 * src/reader.c, src/reduce.c: Adjust.
20889
20890 2001-11-19 Akim Demaille <akim@epita.fr>
20891
20892 * src/reader.c (symbols_output): New, extracted from...
20893 (packsymbols): Here.
20894 (reader): Call it.
20895
20896 2001-11-19 Akim Demaille <akim@epita.fr>
20897
20898 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20899 (maxrhs): this new function.
20900
20901 2001-11-19 Akim Demaille <akim@epita.fr>
20902
20903 * src/lalr.c (F): New macro to access the variable F.
20904 Adjust.
20905
20906 2001-11-19 Akim Demaille <akim@epita.fr>
20907
20908 * src/lalr.h (LA): New macro to access the variable LA.
20909 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20910 * src/lalr.c: Adjust.
20911
20912 2001-11-19 Akim Demaille <akim@epita.fr>
20913
20914 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20915 (set_state_table): handle the `lookaheads' members.
20916
20917 2001-11-19 Akim Demaille <akim@epita.fr>
20918
20919 * src/lalr.h (lookaheads): Removed array, whose contents is now
20920 a member of...
20921 (state_t): this structure.
20922 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20923 Adjust.
20924
20925 2001-11-19 Akim Demaille <akim@epita.fr>
20926
20927 * src/lalr.h (consistent): Removed array, whose contents is now
20928 a member of...
20929 (state_t): this structure.
20930 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20931 Adjust.
20932
20933 2001-11-19 Akim Demaille <akim@epita.fr>
20934
20935 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20936 contents are now members of...
20937 (state_t): this structure.
20938 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20939 Adjust.
20940
20941 2001-11-19 Akim Demaille <akim@epita.fr>
20942
20943 * src/lalr.h (state_t): New.
20944 (state_table): Be a state_t * instead of a core **.
20945 (accessing_symbol): Remove, part of state_t.
20946 * src/lalr.c: Adjust.
20947 (set_accessing_symbol): Merge into...
20948 (set_state_table): this.
20949 * src/print_graph.c, src/conflicts.c: Adjust.
20950
20951 2001-11-14 Akim Demaille <akim@epita.fr>
20952
20953 * tests/calc.at, tests/output.at, tests/regression.at,
20954 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20955 now the tests are run in private dirs, therefore AC_CLEANUP and
20956 family can be simplified to 0-ary.
20957 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20958 use abs. path to find config.h.
20959 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20960 stderr, there can be way too much random noise.
20961 Instead pass -Werror to GCC and rely on the exit status.
20962 Reported by Wolfram Wagner.
20963
20964 2001-11-14 Akim Demaille <akim@epita.fr>
20965
20966 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20967 defined only if yyoverflow is defined, to avoid `warning: unused
20968 variable `yyvs1''.
20969 Reported by The Test Suite.
20970
20971 2001-11-14 Akim Demaille <akim@epita.fr>
20972
20973 * src/print.c: Include reduce.h.
20974 Reported by Hans Aberg.
20975
20976 2001-11-14 Akim Demaille <akim@epita.fr>
20977
20978 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20979 Revert a previous patch: these are really const.
20980 * src/conflicts.c (conflict_report): Additional useless pair of
20981 braces to pacify GCC's warnings for `if () if () {} else {}'.
20982 * src/lex.c (parse_percent_token): Replace equal_offset with
20983 arg_offset.
20984 arg is const.
20985 Be sure to strdup `arg' when used, since there is no reason for
20986 token_buffer not to change.
20987
20988 2001-11-14 Akim Demaille <akim@epita.fr>
20989
20990 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20991 definition.
20992 * src/main.c (main): Use them.
20993 Suggested by Hans Aberg.
20994
20995 2001-11-12 Akim Demaille <akim@epita.fr>
20996
20997 * src/system.h (ngettext): Now that we use ngettext, be sure to
20998 provide a default definition when NLS are not used.
20999
21000 2001-11-12 Akim Demaille <akim@epita.fr>
21001
21002 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21003 Use @kbd to denote user input.
21004 (Language and Grammar): ANSIfy the example.
21005 Adjust its layout for info/notinfo.
21006 (Location Tracking Calc): Output error messages to stderr.
21007 Output locations in a more GNUtically correct way.
21008 Fix a couple of Englishos.
21009 Adjust @group/@end group pairs.
21010
21011 2001-11-12 Akim Demaille <akim@epita.fr>
21012
21013 %expect was not functioning at all.
21014
21015 * src/conflicts.c (expected_conflicts): Set to -1.
21016 (conflict_report): Use ngettext.
21017 (conflicts_print): Check %expect and make its violation an error.
21018 * doc/bison.texinfo (Expect Decl): Adjust.
21019 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21020 * tests/regression.at (%expect not enough, %expect right)
21021 (%expect too much): New.
21022
21023 2001-11-12 Akim Demaille <akim@epita.fr>
21024
21025 * tests/regression.at (Conflicts): Rename as...
21026 (Unresolved SR Conflicts): this.
21027 (Solved SR Conflicts): New.
21028
21029 2001-11-12 Akim Demaille <akim@epita.fr>
21030
21031 * src/reduce.c (print_results): Rename as...
21032 (reduce_output): This.
21033 Output to OUT, passed as argument, instead of output_obstack.
21034 (dump_grammar): Likewise.
21035 (reduce_free): New.
21036 Also free V1.
21037 (reduce_grammar): No longer call reduce_output, since...
21038 * src/print.c (print_results): do it.
21039 * src/main.c (main): Call reduce_free;
21040
21041 2001-11-12 Akim Demaille <akim@epita.fr>
21042
21043 * src/conflicts.c (print_reductions): Accept OUT as argument.
21044 Output to it, not to output_obstack.
21045 * src/print.c (print_actions): Adjust.
21046
21047 2001-11-12 Akim Demaille <akim@epita.fr>
21048
21049 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21050 the result instead of using...
21051 (src_total, rrc_total, src_count, rrc_count): Remove.
21052 (any_conflicts): Remove.
21053 (print_conflicts): Split into...
21054 (conflicts_print, conflicts_output): New.
21055 * src/conflicts.h: Adjust.
21056 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21057 * src/print.c (print_grammar): Issue `\n' between two rules.
21058 * tests/regression.at (Conflicts): New.
21059 Reported by Tom Lane.
21060
21061 2001-11-12 Akim Demaille <akim@epita.fr>
21062
21063 * tests/regression.at (Invalid input): Remove, duplicate with
21064 ``Invalid input: 1''.
21065
21066 2001-11-12 Akim Demaille <akim@epita.fr>
21067
21068 * tests/torture.at (AT_DATA_STACK_TORTURE)
21069 (Exploding the Stack Size with Alloca)
21070 (Exploding the Stack Size with Malloc): New.
21071
21072 2001-11-12 Akim Demaille <akim@epita.fr>
21073
21074 * src/bison.simple (YYSTACK_REALLOC): New.
21075 (yyparse) [!yyoverflow]: Use it and free the old stack.
21076 Reported by Per Allansson.
21077
21078 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21079
21080 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21081 define CPP macro, which substitute YYSTYPE by yystype.
21082 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21083 with yyltype/YYLTYPE. This allows inclusion of the generated
21084 header within the parser if the compiler, such as GGC, accepts
21085 multiple equivalent #defines.
21086 From Akim.
21087
21088 2001-11-05 Akim Demaille <akim@epita.fr>
21089
21090 * src/reader.c (symbols_output): New, extracted from...
21091 (packsymbols): here.
21092 (reader): Adjust.
21093
21094 2001-11-05 Akim Demaille <akim@epita.fr>
21095
21096 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21097
21098 2001-11-05 Akim Demaille <akim@epita.fr>
21099
21100 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21101 pattern.
21102
21103 2001-11-05 Akim Demaille <akim@epita.fr>
21104
21105 * src/options.h (struct option_table_struct): set_flags is void*.
21106 * src/options.c (longopts): Support `--output' and `%output'.
21107 (usage): Adjust.
21108 * src/lex.h (tok_setopt): Remove, replaced with...
21109 (tok_intopt, tok_stropt): these new guys.
21110 * src/lex.c (getopt.h): Not needed.
21111 (token_buffer, unlexed_token_buffer): Not const.
21112 (percent_table): Promote `-' over `_' in directive names.
21113 Active `%name-prefix', `file-prefix', and `output'.
21114 (parse_percent_token): Accept possible arguments to directives.
21115 Promote `-' over `_' in directive names.
21116
21117 2001-11-04 Akim Demaille <akim@epita.fr>
21118
21119 * doc/bison.texinfo (Decl Summary): Split the list into
21120 `directives for grammars' and `directives for bison'.
21121 Sort'em.
21122 Add description of `%name-prefix', `file-prefix', and `output'.
21123 Promote `-' over `_' in directive names.
21124 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21125 Simplify the description of `--name-prefix'.
21126 Promote `-' over `_' in directive names.
21127 Promote `--output' over `--output-file'.
21128 Fix the description of `--defines'.
21129 * tests/output.at: Exercise %file-prefix and %output.
21130
21131 2001-11-02 Akim Demaille <akim@epita.fr>
21132
21133 * doc/refcard.tex: Update.
21134
21135 2001-11-02 Akim Demaille <akim@epita.fr>
21136
21137 * src/symtab.h (SUNDEF): New.
21138 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21139 stand for `uninitialized', instead of 0.
21140 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21141 * src/lex.c (lex): Adjust.
21142
21143 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21144 Number it 0.
21145 Let yylex return it instead of a plain 0.
21146 Reported by Dick Streefland.
21147
21148 2001-11-02 Akim Demaille <akim@epita.fr>
21149
21150 * tests/regression.at (Mixing %token styles): New test.
21151
21152 2001-11-02 Akim Demaille <akim@epita.fr>
21153
21154 * src/reader.c (parse_thong_decl): Formatting changes.
21155 (token_translations_init): New, extracted from...
21156 (packsymbols): Here.
21157 Adjust.
21158
21159 2001-11-01 Akim Demaille <akim@epita.fr>
21160
21161 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21162 Check that `9foo.y' produces correct cpp guards.
21163 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21164 guards.
21165 Reported by Wwp.
21166
21167 2001-11-01 Akim Demaille <akim@epita.fr>
21168
21169 * tests/regression.at (Invalid input: 2): New.
21170 * src/lex.c (unlexed_token_buffer): New.
21171 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21172 too.
21173 Reported by Wwp.
21174
21175 2001-11-01 Akim Demaille <akim@epita.fr>
21176
21177 * tests/calc.at: Catch up with 1.30.
21178 * configure.in: Bump to 1.49a.
21179 Adjust to newer Autotest.
21180
21181 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21182
21183 * src/conflicts.c: Move global variables rrc_total and src_total ...
21184 (print_conflicts): here.
21185 * src/output.c (output): Free global variable user_toknums.
21186 * src/lex.c (token_obstack): Become static.
21187
21188 2001-10-18 Akim Demaille <akim@epita.fr>
21189
21190 * tests/atlocal.in (GCC): Add.
21191 * tests/calc.at: s/m4_match/m4_bmatch/.
21192 s/m4_patsubst/m4_bpatsubst/.
21193 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21194 * configure.in: AC_SUBST(GCC).
21195
21196 2001-10-14 Marc Autret <autret_m@epita.fr>
21197
21198 * src/options.c (create_long_option_table): Fix.
21199
21200 2001-10-10 Akim Demaille <akim@epita.fr>
21201
21202 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21203
21204 2001-10-04 Akim Demaille <akim@epita.fr>
21205
21206 * src/reader.c (parse_union_decl): Push the caracters in
21207 union_obstack, not attrs_obstack.
21208
21209 2001-10-04 Akim Demaille <akim@epita.fr>
21210
21211 Merge in the branch 1.29.
21212
21213 * src/reader.c (packsymbols): Use a temporary obstack for
21214 `%%tokendef', since output_stack is already used elsewhere.
21215
21216 2001-10-02 Akim Demaille <akim@epita.fr>
21217
21218 Bump 1.29d.
21219
21220 2001-10-02 Akim Demaille <akim@epita.fr>
21221
21222 Version 1.29c.
21223
21224 2001-10-02 Akim Demaille <akim@epita.fr>
21225
21226 * tests/regression.at (Invalid CPP headers): New.
21227 From Alexander Belopolsky.
21228 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21229
21230 2001-10-02 Akim Demaille <akim@epita.fr>
21231
21232 * tests/regression.at (Invalid input): New.
21233 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21234 Reported by Shura.
21235
21236 2001-10-02 Akim Demaille <akim@epita.fr>
21237
21238 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21239
21240 2001-10-02 Akim Demaille <akim@epita.fr>
21241
21242 * src/output.c (output_parser): Assert `skeleton'.
21243 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21244 systems.
21245 From Shura.
21246
21247 2001-10-01 Marc Autret <autret_m@epita.fr>
21248
21249 * src/lex.h: Echo modifications.
21250 * src/lex.c (unlex): Parameter is now token_t.
21251 From Hans Aberg.
21252
21253 2001-10-01 Marc Autret <autret_m@epita.fr>
21254
21255 * src/main.c: Include lex.h.
21256 From Hans Aberg.
21257
21258 2001-09-29 Akim Demaille <akim@epita.fr>
21259
21260 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21261
21262 2001-09-28 Akim Demaille <akim@epita.fr>
21263
21264 * tests/testsuite.at: Update to newer Autotest.
21265 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21266
21267 2001-09-27 Akim Demaille <akim@epita.fr>
21268
21269 Position independent wrapper.
21270
21271 * tests/bison: Remove.
21272 * tests/bison.in: New.
21273 * configure.in: Adjust.
21274
21275 2001-09-27 Paul Eggert <eggert@twinsun.com>
21276
21277 Port quotearg fixes from tar 1.13.24.
21278
21279 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21280 tm to be declared.
21281 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21282 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21283
21284 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21285 * m4/mbrtowc.m4: New file.
21286 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21287 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21288
21289 2001-09-27 Akim Demaille <akim@epita.fr>
21290
21291 Bump to 1.29c.
21292
21293 2001-09-27 Akim Demaille <akim@epita.fr>
21294
21295 Version 1.29b.
21296
21297 2001-09-25 Akim Demaille <akim@epita.fr>
21298
21299 * src/system.h: Include `xalloc.h'.
21300 Remove it from the C files.
21301 * src/files.c (output_files): Free the obstacks.
21302 * src/lex.c (init_lex): Rename as...
21303 (lex_init): this.
21304 (lex_free): New.
21305 * src/main.c (main): Use it.
21306
21307 2001-09-24 Marc Autret <autret_m@epita.fr>
21308
21309 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21310 to output informations in fout (FILE*).
21311 (open_graph, close_graph): Likewise.
21312 (output_graph, output_edge, output_node): Likewise.
21313 * src/vcg.h: Update function prototypes.
21314 * src/print_graph.c (print_graph): Open output graph file.
21315 (print_actions): Adjust.
21316 * src/files.h: Remove extern declaration.
21317 * src/files.c: Remove graph_obstack declaration.
21318 (open_files): Remove graph_obstack initialization.
21319 (output_files): Remove graph_obstack saving.
21320
21321 2001-09-24 Marc Autret <autret_m@epita.fr>
21322
21323 * src/files.c (compute_output_file_names): Fix.
21324
21325 2001-09-24 Marc Autret <autret_m@epita.fr>,
21326 Akim Demaille <akim@epita.fr>
21327
21328 * src/reader.c (reader): Remove call to free_symtab ().
21329 * src/main.c (main): Call it here.
21330 Include symtab.h.
21331 * src/conflicts.c (initialize_conflicts): Rename as...
21332 (solve_conflicts): this.
21333 * src/print.c (print_core, print_actions, print_state)
21334 (print_grammar): Dump to a file instead a `output_obstack'.
21335 (print_results): Dump `output_obstack', and then proceed with the
21336 FILE *.
21337 * src/files.c (compute_output_file_names, close_files): New.
21338 (output_files): Adjust.
21339 * src/main.c (main): Adjust.
21340
21341 2001-09-23 Marc Autret <autret_m@epita.fr>
21342
21343 * src/files.c (compute_header_macro): Computes header macro name
21344 from spec_defines_file when given.
21345
21346 2001-09-23 Marc Autret <autret_m@epita.fr>
21347
21348 * src/files.c (output_files): Add default extensions.
21349
21350 2001-09-22 Akim Demaille <akim@epita.fr>
21351
21352 * src/conflicts.c (finalize_conflicts): Rename as...
21353 (free_conflicts): this.
21354
21355 2001-09-22 Akim Demaille <akim@epita.fr>
21356
21357 * src/gram.c (gram_free): Rename back as...
21358 (dummy): this.
21359 (output_token_translations): Free `token_translations'.
21360 * src/symtab.c (free_symtab): Free the tag field.
21361
21362 2001-09-22 Akim Demaille <akim@epita.fr>
21363
21364 Remove `translations' as it is always set to true.
21365
21366 * src/gram.h: Adjust.
21367 * src/reader.c (packsymbols, parse_token_decl): Adjust
21368 * src/print.c (print_grammar): Adjust.
21369 * src/output.c (output_token_translations): Adjust.
21370 * src/lex.c (lex): Adjust.
21371 * src/gram.c: Be sure the set pointers to NULL.
21372 (dummy): Rename as...
21373 (gram_free): this.
21374
21375 2001-09-22 Akim Demaille <akim@epita.fr>
21376
21377 * configure.in: Invoke AM_LIB_DMALLOC.
21378 * src/system.h: Use dmalloc.
21379 * src/LR0.c: Be sure to have pointers initialized to NULL.
21380 (allocate_itemsets): Allocate kernel_items only if needed.
21381
21382 2001-09-22 Akim Demaille <akim@epita.fr>
21383
21384 * configure.in: Bump to 1.29b.
21385 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21386 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21387 need xmalloc.c in calc.y.
21388 From Pascal Bart.
21389
21390 2001-09-21 Akim Demaille <akim@epita.fr>
21391
21392 Version 1.29a.
21393 * Makefile.maint, config/config.guess, config/config.sub,
21394 * config/missing: Update from masters.
21395 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21396 upon package.m4.
21397 * configure.in (ALL_LINGUAS): Add `tr'.
21398
21399 2001-09-21 Akim Demaille <akim@epita.fr>
21400
21401 * tests/Makefile.am (package.m4): Move to...
21402 ($(srcdir)/$(TESTSUITE)): here.
21403
21404 2001-09-20 Akim Demaille <akim@epita.fr>
21405
21406 * src/complain.c: No longer try to be standalone: use system.h.
21407 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21408 * src/complain.h: Likewise.
21409 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21410 Remove the unused variable `n'.
21411 From Albert Chin-A-Young.
21412
21413 2001-09-18 Marc Autret <autret_m@epita.fr>
21414
21415 * doc/bison.1: Update.
21416 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21417 descriptions.
21418 (Option Cross Key): Update.
21419 Add --graph.
21420
21421 2001-09-18 Marc Autret <autret_m@epita.fr>
21422
21423 * tests/regression.at: New test (comment in %union).
21424
21425 2001-09-18 Marc Autret <autret_m@epita.fr>
21426
21427 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21428 do that.
21429 Reported by Keith Browne.
21430
21431 2001-09-18 Marc Autret <autret_m@epita.fr>
21432
21433 * tests/output.at: Add tests for --defines and --graph.
21434
21435 2001-09-18 Marc Autret <autret_m@epita.fr>
21436
21437 * tests/output.at: Removes tests of %{header,src}_extension features.
21438
21439 2001-09-18 Akim Demaille <akim@epita.fr>
21440
21441 * tests/Makefile.am (package.m4): New.
21442 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21443 (_AT_CHECK_CALC_ERROR): Likewise.
21444 Factor the `, ' part of verbose error messages.
21445
21446 2001-09-18 Marc Autret <autret_m@epita.fr>
21447
21448 * src/getargs.c (longopts): Declare --defines and --graph as options
21449 with optional arguments.
21450 * src/files.h: Add extern declarations.
21451 * src/files.c (spec_graph_file, spec_defines_file): New.
21452 (output_files): Update.
21453 Remove CPP-outed code.
21454
21455 2001-09-18 Marc Autret <autret_m@epita.fr>
21456
21457 Turn off %{source,header}_extension feature.
21458
21459 * src/files.c (compute_exts_from_gf): Update.
21460 (compute_exts_from_src): Update.
21461 (output_files): CPP-out useless code.
21462 * src/files.h: Remove {header,source}_extension extern declarations.
21463 * src/reader.c (parse_dquoted_param): CPP-out.
21464 (parse_header_extension_decl): Remove.
21465 (parse_source_extension_decl): Remove.
21466 (read_declarations): Remove cases tok_{hdrext,srcext}.
21467 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21468 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21469
21470 2001-09-10 Akim Demaille <akim@epita.fr>
21471
21472 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21473 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21474 (AT_CHECK_OUTPUT): this.
21475 Merely check ls' exit status, its output is useless.
21476
21477 2001-09-10 Akim Demaille <akim@epita.fr>
21478
21479 * tests/calc.at: Use m4_match.
21480 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21481
21482 2001-09-10 Marc Autret <autret_m@epita.fr>,
21483 Akim Demaille <akim@epita.fr>
21484
21485 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21486 enum color_e.
21487 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21488 to `normal'.
21489 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21490 * src/lex.h: Adjust prototype.
21491 (token_t): Add `tok_undef'.
21492 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21493 (parse_percent_token): Now returns token_t.
21494 Add default statement in switch.
21495 (lex): Separate `c' as an input variable, from the token_t result
21496 part.
21497 (unlexed): Is a token_t.
21498
21499 2001-09-10 Akim Demaille <akim@epita.fr>
21500
21501 * configure.in: Bump to 1.29a.
21502
21503 2001-09-07 Akim Demaille <akim@epita.fr>
21504
21505 Version 1.29.
21506
21507 2001-08-30 Akim Demaille <akim@epita.fr>
21508
21509 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21510 * m4/atconfig.m4: Remove.
21511 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21512 * tests/bison: New.
21513 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21514 m4_if, m4_patsubst, and m4_regexp.
21515 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21516 `input' file instead of echo.
21517
21518 2001-08-29 Akim Demaille <akim@epita.fr>
21519
21520 Bump to 1.28e.
21521
21522 2001-08-29 Akim Demaille <akim@epita.fr>
21523
21524 Version 1.28d.
21525
21526 2001-08-29 Paul Eggert <eggert@twinsun.com>
21527
21528 * src/bison.simple (yyparse): Don't take the address of an
21529 item before the start of an array, as that doesn't conform to
21530 the C Standard.
21531
21532 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21533
21534 * doc/bison.texinfo (Location Tracking Calc): New node.
21535
21536 2001-08-29 Paul Eggert <eggert@twinsun.com>
21537
21538 * src/output.c (output): Do not define const, as this now
21539 causes more problems than it cures.
21540
21541 2001-08-29 Akim Demaille <akim@epita.fr>
21542
21543 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21544 the nodes.
21545 Be sure to tag the `detailmenu'.
21546
21547 2001-08-29 Akim Demaille <akim@epita.fr>
21548
21549 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21550 download in a tmp dir.
21551
21552 2001-08-28 Marc Autret <autret_m@epita.fr>
21553
21554 * config/depcomp: New file.
21555
21556 2001-08-28 Marc Autret <autret_m@epita.fr>
21557
21558 * doc/bison.1 (mandoc): Adjust.
21559 From Juan Manuel Guerrero.
21560
21561 2001-08-28 Marc Autret <autret_m@epita.fr>
21562
21563 * src/print_graph.c (print_state): Fix.
21564
21565 2001-08-27 Marc Autret <autret_m@epita.fr>
21566
21567 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21568 char * members.
21569 Echo modifications to the functions prototypes.
21570 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21571
21572 2001-08-27 Marc Autret <autret_m@epita.fr>
21573
21574 * src/vcg.c: Include `xalloc.h'.
21575 (add_colorentry): New.
21576 (add_classname): New.
21577 (add_infoname): New.
21578 * src/vcg.h: Add new prototypes.
21579
21580 2001-08-27 Akim Demaille <akim@epita.fr>
21581
21582 * Makefile.maint: Sync. again with CVS Autoconf.
21583
21584 2001-08-27 Akim Demaille <akim@epita.fr>
21585
21586 * Makefile.maint: Formatting changes.
21587 (po-update, cvs-update, update): New targets.
21588 (AMTAR): Remove.
21589
21590 2001-08-27 Akim Demaille <akim@epita.fr>
21591
21592 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21593 * Makefile.maint: Sync. with CVS Autoconf.
21594
21595 2001-08-27 Marc Autret <autret_m@epita.fr>
21596
21597 * src/vcg.h (struct infoname_s): New.
21598 (struct colorentry_s): New.
21599 (graph_s): New fields {vertical,horizontal}_order in structure.
21600 Add `infoname' field.
21601 Add `colorentry' field;
21602 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21603 (G_HORIZONTAL_ORDER): New.
21604 (G_INFONAME): New.
21605 (G_COLORENTRY): New.
21606 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21607 Add output of `infoname'.
21608 Add output of `colorentry'.
21609
21610 2001-08-27 Marc Autret <autret_m@epita.fr>
21611
21612 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21613 This one shadowed a global parameter.
21614
21615 2001-08-24 Marc Autret <autret_m@epita.fr>
21616
21617 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21618 instead of `unsigned'.
21619 (print_state): Do not call obstack_object_size () in obstack_grow ()
21620 to avoid macro variables shadowing.
21621
21622 2001-08-23 Marc Autret <autret_m@epita.fr>
21623
21624 * src/lex.c (percent_table): Typo: s/naem/name/.
21625 Add graph option.
21626 Normalize new options declarations.
21627
21628 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21629
21630 * tests/suite.at: Exercise %header_extension and %source_extension.
21631
21632 2001-08-16 Marc Autret <autret_m@epita.fr>
21633
21634 * src/reader.c (parse_dquoted_param): New.
21635 (parse_header_extension_decl): Use it.
21636 (parse_source_extension_decl): Likewise.
21637
21638 2001-08-16 Marc Autret <autret_m@epita.fr>
21639
21640 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21641 (get_xxxx_str): Use assert () instead of complain ().
21642 Remove return invokations in default cases.
21643 (get_decision_str): Modify default behaviour. Remove second argument.
21644 Echo modifications on calls.
21645 (output_graph): Fix.
21646
21647 2001-08-16 Marc Autret <autret_m@epita.fr>
21648
21649 * src/getargs.c (usage): Update with ``-g, --graph''.
21650
21651 2001-08-16 Marc Autret <autret_m@epita.fr>
21652
21653 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21654 (Option Cross Key): Likewise.
21655 * doc/bison.1: Update.
21656
21657 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21658
21659 * src/output.c (output_master_parser): Don't finish action_obstack.
21660 (output_parser): Don't care about the muscle action, here.
21661 (prepare): Copy the action_obstack in the action muscle.
21662 (output): Free action_obstack.
21663
21664 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21665
21666 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21667 will contain `%union' declaration.
21668 (parse_union_decl): Delete #line directive output.
21669 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21670 informations about %union.
21671 (parse_union_decl): Copy the union_obstack in the muscle stype.
21672 * src/bison.simple: Add new #line directive.
21673 Add typdef %%stype YYSTYPE.
21674
21675 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21676
21677 * src/bison.simple: Add new `#line' directive.
21678
21679 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21680
21681 * src/bison.simple: New `#line' directive.
21682 * src/output.c (output_parser): Support new dynamic muscle input_line.
21683
21684 2001-09-22 Marc Autret <autret_m@epita.fr>
21685
21686 * src/output.c (output_master_parser): New.
21687 (output_parser): Be more re-entrant.
21688
21689 2001-09-21 Marc Autret <autret_m@epita.fr>
21690
21691 * src/reader.c (copy_definition, parse_union_decl): Update and use
21692 `linef' muscle.
21693 (copy_action): Likewise.
21694 Use obstack_1grow ().
21695 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21696
21697 2001-09-21 Marc Autret <autret_m@epita.fr>
21698
21699 * src/options.c (option_table): Adjust.
21700 * src/lex.c (parse_percent_token): Fix.
21701
21702 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21703
21704 * src/options.c (symtab.h): Include it, need by lex.h.
21705
21706 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21707
21708 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21709 is now an option_table_struct*.
21710 (option_strcmp): New function option_strcmp.
21711 (parse_percent_token): Call option_strcmp.
21712 * src/getargs.c (xalloc.h, options.h): Include it.
21713 (getargs): Call create_long_option_table.
21714 (getargs): Free longopts at the end of the function.
21715 (shortopts): Move in options.c.
21716 * src/options.c (create_long_option_table): New function. Convert
21717 information from option_table to option structure.
21718 * src/reader.c (options.h): Include it.
21719
21720 * src/Makefile.am: Adjust.
21721 * src/options.c (option_table): Create from longopts and percent_table.
21722 * src/getargs.c (longopts): Delete.
21723 * src/lex.c (struct percent_table_struct): Delete.
21724 (percent_table): Delete.
21725 (options.h): Include it.
21726 * src/options.c: Create.
21727 * src/options.h: Create.
21728 Declare enum opt_access_e.
21729 Define struct option_table_struct.
21730
21731 2001-09-20 Marc Autret <autret_m@epita.fr>
21732
21733 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21734 sections of Bison.
21735
21736 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21737
21738 * src/bison.simple: s/%%filename/%%skeleton.
21739 * src/muscle_tab.c (getargs.h): Include it.
21740 (muscle_init): Insert new muscle skeleton.
21741
21742 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21743
21744 * src/output.c (output_parser): Delete unused variable actions_dumped.
21745
21746 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21747
21748 * src/output.c (output): Delete call to reader_output_yylsp.
21749 * src/reader.c (reader): Likewise.
21750 * src/reader.h: Delete declaration of reader_output_yylsp.
21751
21752 2001-09-02 Marc Autret <autret_m@epita.fr>
21753
21754 * src/reader.c: Include muscle_tab.h.
21755 (parse_union_decl): Update.
21756 (parse_macro_decl): Rename parse_muscle_decl.
21757 Update to use renamed functions and variable.
21758 (read_declarations, copy_action, read_additionnal_code, : Updated
21759 with correct variables and functions names.
21760 (packsymbols, reader): Likewise.
21761
21762 * src/reader.h (muscle_obstack): Extern declaration update.
21763
21764 * src/output.c: Include muscle_tab.h
21765 In all functions using macro_insert, change by using muscle_insert ().
21766 (macro_obstack): Rename muscle_obstack.
21767 Echo modifications in the whole file.
21768 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21769 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21770 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21771
21772 * src/muscle_tab.h: Update double inclusion macros.
21773 (macro_entry_s): Rename muscle_entry_s.
21774 Update prototypes.
21775
21776 * src/muscle_tab.c: Include muscle_tab.h.
21777 Rename macro_tabble to muscle_table.
21778 (mhash1, mhash2, mcmp): Use muscle_entry.
21779 (macro_init): Rename muscle_init. Update.
21780 (macro_insert): Rename muscle_insert. Update.
21781 (macro_find): Rename muscle_find. Update.
21782
21783 * src/main.c: Include muscle_tab.h.
21784 (main): Call muscle_init ().
21785 * src/Makefile.am (bison_SOURCES): Echo modifications.
21786
21787 2001-09-02 Marc Autret <autret_m@epita.fr>
21788
21789 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21790
21791 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21792
21793 2001-09-02 Marc Autret <autret_m@epita.fr>
21794
21795 * src/macrotab.c, src/macrotab.h: Remove.
21796
21797 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21798
21799 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21800 filename.
21801
21802 2001-09-01 Marc Autret <autret_m@epita.fr>
21803
21804 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21805 to an explicit value to activate the feature. We do it here.
21806
21807 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21808
21809 * src/output.c (prepare): Delete the `filename' muscule insertion.
21810 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21811 (parse_union_decl): Likewise.
21812 * src/macrotab.c (macro_init): Initialize filename by infile.
21813
21814 2001-08-31 Marc Autret <autret_m@epita.fr>
21815
21816 * src/bison.simple (YYLSP_NEEDED): New definition.
21817 * src/output.c (prepare): Add macro insertion of `locations_flag'
21818
21819 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21820
21821 * src/output.c (prepare): Delete insertion of previous muscles,
21822 and insert the `prefix' muscles.
21823 * src/macrotab.c (macro_init): Likewise.
21824 (macro_init): Initialization prefix directive by `yy'.
21825 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21826 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21827 yylval, yydebug, yyerror, yynerrs and yyparse.
21828 New directive `#define' to substitute yydebug, ... with option
21829 name_prefix.
21830
21831 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21832
21833 * src/main.c (main): Standardize.
21834 * src/output.c (output_table_data, output_parser): Likewise.
21835 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21836
21837 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21838
21839 * src/reader.c (read_additionnal_code): Rename %%user_code to
21840 %%epilogue.
21841 * src/output.c (output): Rename %%declarations to %%prologue.
21842 * src/bison.simple: Echo modifications.
21843
21844 2001-08-31 Marc Autret <autret_m@epita.fr>
21845
21846 * src/reader.c (readgram): CleanUp.
21847 (output_token_defines): Likewise.
21848 (packsymbols): Likewise.
21849 (reader): Likewise.
21850 * src/output.c (output): CPP-out useless code.
21851
21852 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21853
21854 * src/reader.c (reader): Delete obsolete call to function
21855 output_trailers and output_headers.
21856 * src/output.h: Remove obsolete functions prototypes of output_headers
21857 and output_trailers.
21858
21859 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21860
21861 * src/main.c: Include macrotab.h.
21862 * src/macrotab.h (macro_entry_s): Constify fields.
21863 Adjust functions prototypes.
21864 * src/macrotab.c (macro_insert): Constify key and value.
21865 (macro_find): Constify key.
21866 (macro_insert): Include 'xalloc.h'
21867 (macro_insert): Use XMALLOC.
21868 (macro_find): Constify return value.
21869 * src/output.c (output_table_data): Rename table to table_data.
21870 (output_parser): Constify macro_key, macro_value.
21871
21872 2001-08-30 Marc Autret <autret_m@epita.fr>
21873
21874 * src/reader.c (parse_skel_decl): New.
21875 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21876 * src/lex.h (token_t): New token `tok_skel'.
21877 * src/lex.c (percent_table): Add skeleton option entry.
21878 Standardize.
21879
21880 2001-08-29 Marc Autret <autret_m@epita.fr>
21881
21882 * src/bison.simple: Add %%user_code directive at the end.
21883 * src/reader.c (read_additionnal_code): New.
21884 (reader): Use it.
21885 * src/output.c (output_program): Remove.
21886 (output): Update.
21887
21888 2001-08-28 Marc Autret <autret_m@epita.fr>
21889
21890 * src/output.c (output_actions): Clean up.
21891 (output_gram): CPP-out useless code.
21892 * src/reader.c (reader): Clean up, CPP-out useless code.
21893
21894 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21895
21896 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21897 directive.
21898 * src/bison.simple: Add `%%definitions'.
21899
21900 2001-08-28 Marc Autret <autret_m@epita.fr>
21901
21902 * config/depcomp: New file.
21903
21904 2001-08-27 Paul Eggert <eggert@twinsun.com>
21905
21906 * src/bison.simple (yyparse): Don't take the address of an
21907 item before the start of an array, as that doesn't conform to
21908 the C Standard.
21909
21910 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21911
21912 * src/output.c (output): Remove the initialization of the macro
21913 obstack. It was done too late here.
21914
21915 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21916 completely wrong.
21917 (reader): Initialize the macro obstack here, since we need it to grow
21918 '%define' directives.
21919
21920 * src/reader.h: Declare the macro obstack as extern.
21921
21922 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21923
21924 * src/output.c (output_parser): Fix. Store single '%' characters in
21925 the output obstack instead of throwing them away.
21926
21927 2001-08-27 Akim Demaille <akim@epita.fr>
21928
21929 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21930
21931 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21932
21933 * lib/Makefile.am: Adjust.
21934
21935 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21936
21937 * src/bison.simple: Update and add '%%' directives.
21938
21939 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21940
21941 * src/reader.c (reader): Remove calls to 'output_headers' and
21942 'output_trailers'. Remove some C output.
21943 (readgram): Disable a piece of code that was writing a default
21944 definition for 'YYSTYPE'.
21945 (reader_output_yylsp): Remove.
21946 (packsymbols): Output token defintions to a macro.
21947 (copy_definition): Disable C output.
21948
21949 * src/reader.c (parse_macro_decl): New function used to parse macro
21950 declarations.
21951 (copy_string2): Put the body of copy_string into this new function.
21952 Add a parameter to let the caller choose whether he wants to copy the
21953 string delimiters or not.
21954 (copy_string): Be a simple call to copy_string2 with the last argument
21955 bound to true.
21956 (read_declarations): Add case for macro definition.
21957 (copy_identifier): New.
21958 (parse_macro_decl): Read macro identifiers using copy_identifier
21959 rather than lex.
21960
21961 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21962
21963 * src/output.c (prepare): Add prefixed names.
21964 (output_parser): Output semantic actions.
21965 (output_parser): Fix bug on '%%line' directives.
21966
21967 * src/output.c (output_headers): Remove. The C code printed by this
21968 function should now be in the skeletons.
21969 (output_trailers): Remove.
21970 (output): Disable call to 'reader_output_yylsp'.
21971 (output_rule_data): Do not output tables to the table obstack.
21972
21973 * src/output.c: Remove some C dedicated output.
21974 Improve the use of macro and output obstacks.
21975 (output_defines): Remove.
21976
21977 * src/output.c (output_token_translations): Associate 'translate'
21978 table with a macro. No output to the table obstack.
21979 (output_gram): Same for 'rhs' and 'prhs'.
21980 (output_stos): Same for 'stos'.
21981 (output_rule_data): Same for 'r1' and 'r2'.
21982 (token_actions): Same for 'defact'.
21983 (goto_actions): Same for 'defgoto'.
21984 (output_base): Same for 'pact' and 'pgoto'.
21985 (output_table): Same for 'table'.
21986 (output_check): Same for 'check'.
21987
21988 * src/output.c (output_table_data): New function.
21989 (output_short_table): Remove.
21990 (output_short_or_char_table): Remove.
21991
21992 * src/output.c (output_parser): Replace most of the skeleton copy code
21993 with something new. Skeletons are now processed character by character
21994 rather than line by line, and Bison looks for '%%' macros. This is the
21995 first step in making Bison's output process (a lot) more flexible.
21996 (output_parser): Use the macro table.
21997
21998 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21999
22000 * src/main.c (main): Initialize the macro table.
22001
22002 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22003
22004 * src/lex.c (percent_table): Add tok_define.
22005 * src/lex.h: Add tok_define.
22006
22007 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22008
22009 * src/macrotab.c: New file.
22010 * src/macrotab.h: New file.
22011 * src/Makefile.am: Update.
22012
22013 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22014
22015 * lib/hash.c: New file.
22016 * lib/hash.h: New file.
22017 * lib/Makefile.am: Update.
22018
22019 2001-08-15 Akim Demaille <akim@epita.fr>
22020
22021 Version 1.28c.
22022
22023 2001-08-15 Marc Autret <autret_m@epita.fr>
22024
22025 * src/reader.c (readgram): Indent output macro YYSTYPE.
22026 (packsymbols): Likewise.
22027 (output_token_defines): Likewise.
22028 * src/files.c: Standardize.
22029 (compute_header_macro): New.
22030 (defines_obstack_save): New. Use compute_header_macro.
22031 (output_files): Update. Use defines_obstack_save.
22032
22033 2001-08-15 Akim Demaille <akim@epita.fr>
22034
22035 * doc/bison.texinfo (Table of Symbols): Document
22036 YYSTACK_USE_ALLOCA.
22037
22038 2001-08-15 Akim Demaille <akim@epita.fr>
22039
22040 * missing: Update from CVS Automake.
22041 * config/config.guess, config/config.sub, config/texinfo.tex:
22042 Update from gnu.org.
22043
22044 2001-08-15 Akim Demaille <akim@epita.fr>
22045
22046 * Makefile.maint: Sync with CVS Autoconf.
22047
22048 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22049
22050 * doc/bison.texinfo: Include GNU Free Documentation License from
22051 `fdl.texi'.
22052 * doc/fdl.texi: Add to package.
22053
22054 2001-08-14 Marc Autret <autret_m@epita.fr>
22055
22056 Turn on %{source,header}_extension features.
22057
22058 * src/lex.c (percent_table): Un-CPP out header_extension and
22059 source_extension.
22060 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22061 (compute_exts_from_src): Remove conditions. It restores priorities
22062 between options.
22063
22064 2001-08-14 Marc Autret <autret_m@epita.fr>
22065
22066 * src/files.c (compute_base_names): Add extensions computing when
22067 `--file-prefix' used.
22068 Standardize function calls.
22069
22070 2001-08-13 Marc Autret <autret_m@epita.fr>
22071
22072 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22073 defining it (defined but null disables alloca).
22074
22075 2001-08-13 Marc Autret <autret_m@epita.fr>
22076
22077 * src/bison.simple (_yy_memcpy): CPP reformat.
22078
22079 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22080
22081 * tests/atconfig.in (CPPFLAGS): Fix.
22082
22083 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22084
22085 * doc/bison.texinfo: Include GNU General Public License from
22086 `gpl.texi'.
22087 * doc/gpl.texi: Add to package.
22088
22089 2001-08-10 Marc Autret <autret_m@epita.fr>
22090
22091 * src/print_graph.h: Fix.
22092 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22093
22094 2001-08-10 Akim Demaille <akim@epita.fr>
22095
22096 * src/system.h: Provide default declarations for stpcpy, strndup,
22097 and strnlen.
22098
22099 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22100
22101 * doc/bison.texinfo (Locations): Update @$ stuff.
22102
22103 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22104
22105 * src/bison.simple (YYLLOC_DEFAULT): Update.
22106 (yyparse): Adjust.
22107
22108 2001-08-08 Marc Autret <autret_m@epita.fr>
22109
22110 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22111 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22112 Reported by Fabrice Bauzac.
22113
22114 2001-08-08 Marc Autret <autret_m@epita.fr>
22115
22116 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22117 * src/vcg.c (output_node): Fix.
22118 * src/vcg.h: Cleanup.
22119 * src/print_graph.c: Add comments.
22120 (node_output_size): New global variable. Simplify the formatting of
22121 the VCG graph output.
22122 (print_actions): Unused code is now used. It notifies the final state
22123 and no action states in the VCG graph. It also give the reduce actions.
22124 The `shift and goto' edges are red and the `go to state' edges are
22125 blue.
22126 Get the current node name and node_obstack by argument.
22127 (node_obstack): New variable.
22128 (print_state): Manage node_obstack.
22129 (print_core): Use node_obstack given by argument.
22130 A node is not only computed here but in print_actions also.
22131 (print_graph): CPP out useless code instead of commenting it.
22132
22133 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22134
22135 * tests/atconfig.in (CPPFLAGS): Fix.
22136
22137 2001-08-07 Akim Demaille <akim@epita.fr>
22138
22139 * src/print_graph.c (quote): New.
22140 (print_core): Use it.
22141
22142 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22143
22144 * src/vcg.c (complain.h): Include it.
22145 Unepitaize `return' invocations.
22146 [NDEBUG] (main): Remove.
22147 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22148 * src/files.c (open_files): Initialize graph_obstack.
22149 * src/print_graph.c (print_actions): CPP out useless code.
22150 (print_core): Don't output the last `\n' in labels.
22151 Use `quote'.
22152 * src/files.c (output_files): Output the VCG file.
22153 * src/main.c (main): Invoke print_graph ();
22154
22155 2001-08-06 Marc Autret <autret_m@epita.fr>
22156
22157 Automaton VCG graph output.
22158 Using option ``-g'' or long option ``--graph'', you can generate
22159 a gram_filename.vcg file containing a VCG description of the LALR (1)
22160 automaton of your grammar.
22161
22162 * src/main.c: Call to print_graph() function.
22163 * src/getargs.h: Update.
22164 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22165 (graph_flag): New flag.
22166 (longopts): Update.
22167 (getargs): Add case `g'.
22168 * src/files.c (graph_obstack): New obstack struct.
22169 (open_files): Initialize new obstack.
22170 (output_files): Saves graph_obstack if required.
22171 * src/files.h (graph_obstack): New extern declaration.
22172 * src/Makefile.am: Add new source files.
22173
22174 2001-08-06 Marc Autret <autret_m@epita.fr>
22175
22176 * src/print_graph.c, src/print_graph.h (graph): New.
22177 * src/vcg.h: New file.
22178 * src/vcg.c: New file, VCG graph handling.
22179
22180 2001-08-06 Marc Autret <autret_m@epita.fr>
22181
22182 Add of %source_extension and %header_extension which specify
22183 the source or/and the header output file extension.
22184
22185 * src/files.c (compute_base_names): Remove initialisation of
22186 src_extension and header_extension.
22187 (compute_exts_from_gf): Update.
22188 (compute_exts_from_src): Update.
22189 (output_files): Update.
22190 * src/reader.c (parse_header_extension_decl): New.
22191 (parse_source_extension_decl): New.
22192 (read_declarations): New case statements for the new tokens.
22193 * src/lex.c (percent_table): Add entries for %source_extension
22194 and %header_extension.
22195 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22196
22197 2001-08-06 Marc Autret <autret_m@epita.fr>
22198
22199 * configure.in: Bump to 1.28c.
22200 * doc/bison.texinfo: Texinfo thingies.
22201
22202 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22203
22204 * tests/atconfig.in (CPPFLAGS): Add.
22205 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22206
22207 2001-08-03 Akim Demaille <akim@epita.fr>
22208
22209 Version 1.28b.
22210
22211 2001-08-03 Akim Demaille <akim@epita.fr>
22212
22213 * tests/Makefile.am (check-local): Ship testsuite.
22214 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22215 Include `string.h'.
22216
22217 2001-08-03 Akim Demaille <akim@epita.fr>
22218
22219 * configure.in: Try using -Wformat when compiling.
22220
22221 2001-08-03 Akim Demaille <akim@epita.fr>
22222
22223 * configure.in: Bump to 1.28b.
22224
22225 2001-08-03 Akim Demaille <akim@epita.fr>
22226
22227 * src/complain.c: Adjust strerror_r portability issues.
22228
22229 2001-08-03 Akim Demaille <akim@epita.fr>
22230
22231 Version 1.28a.
22232
22233 2001-08-03 Akim Demaille <akim@epita.fr>
22234
22235 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22236 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22237 * src/getargs.c: Include complain.h.
22238 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22239 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22240
22241 2001-08-03 Akim Demaille <akim@epita.fr>
22242
22243 * src/reader.c (readgram): Display hidden chars in error messages.
22244
22245 2001-08-03 Akim Demaille <akim@epita.fr>
22246
22247 Update to gettext 0.10.39.
22248
22249 2001-08-03 Akim Demaille <akim@epita.fr>
22250
22251 * lib/strspn.c: New.
22252
22253 2001-08-01 Marc Autret <autret_m@epita.fr>
22254
22255 * doc/bison.texinfo: Update.
22256 * doc/bison.1 (mandoc): Update.
22257 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22258 * src/files.c: Support output files extensions computing.
22259 (src_extension): New static variable.
22260 (header_extension): New static variable.
22261 (tr): New function.
22262 (get_extension_index): New function, gets the index of an extension
22263 filename in a string.
22264 (compute_exts_from_gf): New function, computes extensions from the
22265 grammar file extension.
22266 (compute_exts_from_src): New functions, computes extensions from the
22267 C source file extension, file given by ``-o'' option.
22268 (compute_base_names): Update.
22269 (output_files): Update.
22270
22271 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22272
22273 * doc/bison.texi: Document @$.
22274 (Locations): New section.
22275
22276 2001-07-18 Akim Demaille <akim@epita.fr>
22277
22278 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22279 * config/prev-version.txt, config/move-if-change: New.
22280 * Makefile.am: Adjust.
22281
22282 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22283
22284 * src/bison.simple (yyparse): Suppress warning `comparaison
22285 between signed and unsigned'.
22286
22287 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22288
22289 * src/getargs.h (raw_flag): Remove.
22290 * src/getargs.c: Die on `-r'/`--raw'.
22291 * src/lex.c (parse_percent_token): Die on `%raw'.
22292 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22293 * tests/calc.at: Suppress test with option `--raw'.
22294
22295 2001-07-14 Akim Demaille <akim@epita.fr>
22296
22297 * config/: New.
22298 * configure.in: Require Autoconf 2.50.
22299 Update to gettext 0.10.38.
22300
22301 2001-03-16 Akim Demaille <akim@epita.fr>
22302
22303 * doc/bison.texinfo: ANSIfy the examples.
22304
22305 2001-03-16 Akim Demaille <akim@epita.fr>
22306
22307 * getargs.c (skeleton): New variable.
22308 (longopts): --skeleton is a new option.
22309 (shortopts, getargs): -S is a new option.
22310 * getargs.h: Declare skeleton.
22311 * output.c (output_parser): Use it.
22312
22313 2001-03-16 Akim Demaille <akim@epita.fr>
22314
22315 * m4/strerror_r.m4: New.
22316 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22317 * lib/error.h, lib/error.c: Update.
22318
22319 2001-03-16 Akim Demaille <akim@epita.fr>
22320
22321 * src/getargs.c (longopts): Clean up.
22322
22323 2001-02-21 Akim Demaille <akim@epita.fr>
22324
22325 * src/reader.c (gensym): `gensym_count' is your own.
22326 Use a static buf to create the symbol name, as token_buffer is no
22327 longer a buffer.
22328
22329 2001-02-08 Akim Demaille <akim@epita.fr>
22330
22331 * src/conflicts.c (conflict_report): Be sure not to append to res
22332 between two calls, which could happen if both first sprintf were
22333 skipped, but not the first cp += strlen.
22334
22335 2001-02-08 Akim Demaille <akim@epita.fr>
22336
22337 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22338 New, from fileutils 4.0.37.
22339 * configure.in: Require Autoconf 2.49c. I took some time before
22340 making this decision. This is the only way out for portability
22341 issues in Bison, it would mean way too much duplicate effort to
22342 import in Bison features implemented in 2.49c since 2.13.
22343 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22344
22345 2001-02-02 Akim Demaille <akim@epita.fr>
22346
22347 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22348 * lib/xalloc.h, lib/xmalloc.c: Update.
22349
22350 2001-01-19 Akim Demaille <akim@epita.fr>
22351
22352 Get rid of the ad hoc handling of token_buffer in the scanner: use
22353 the obstacks.
22354
22355 * src/lex.c (token_obstack): New.
22356 (init_lex): Initialize it. No longer call...
22357 (grow_token_buffer): this. Remove it.
22358 Adjust all the places which used it to use the obstack.
22359
22360 2001-01-19 Akim Demaille <akim@epita.fr>
22361
22362 * src/lex.h: Rename all the tokens:
22363 s/\bENDFILE\b/tok_eof/g;
22364 s/\bIDENTIFIER\b/tok_identifier/g;
22365 etc.
22366 Let them be enums, not #define, to ease debugging.
22367 Adjust all the code.
22368
22369 2001-01-18 Akim Demaille <akim@epita.fr>
22370
22371 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22372 * src/lex.c (maxtoken, grow_token_buffer): Static.
22373
22374 2001-01-18 Akim Demaille <akim@epita.fr>
22375
22376 Since we now use obstacks, more % directives can be enabled.
22377
22378 * src/lex.c (percent_table): Also accept `%yacc',
22379 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22380 `%debug'.
22381 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22382 instead of returning a token.
22383 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22384 * src/reader.c (read_declarations): Adjust.
22385 * src/files.c (open_files): Don't call `compute_base_names', don't
22386 compute `attrsfile' since they depend upon data which might be
22387 *in* the input file now.
22388 (output_files): Do it here.
22389 * src/output.c (output_headers): Document the fact that this patch
22390 introduces a guaranteed SEGV for semantic parsers.
22391 * doc/bison.texinfo: Document them.
22392 * tests/suite.at: Exercise these %options.
22393
22394 2000-12-20 Akim Demaille <akim@epita.fr>
22395
22396 Also handle the output file (--verbose) with obstacks.
22397
22398 * files.c (foutput): Remove.
22399 (output_obstack): New.
22400 Adjust all dependencies.
22401 * src/conflicts.c: Return a string.
22402 * src/system.h (obstack_grow_string): Rename as...
22403 (obstack_sgrow): this. Be ready to work with non literals.
22404 (obstack_fgrow4): New.
22405
22406 2000-12-20 Akim Demaille <akim@epita.fr>
22407
22408 * src/files.c (open_files): Fix the computation of short_base_name
22409 in the case of `-o foo.tab.c'.
22410
22411 2000-12-20 Akim Demaille <akim@epita.fr>
22412
22413 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22414 (copy_dollar): Now that everything uses obstacks, get rid of the
22415 FILE * parameters.
22416
22417 2000-12-20 Akim Demaille <akim@epita.fr>
22418
22419 * src/files.c (open_files): Actually the `.output' file is based
22420 on the short_base_name, not base_name.
22421 * tests/suite.at (Checking output file names): Adjust.
22422
22423 2000-12-20 Akim Demaille <akim@epita.fr>
22424
22425 * src/bison.s1: Remove, we now use directly...
22426 * src/bison.simple: this.
22427 * src/Makefile.am: Use pkgdata instead of data.
22428
22429 2000-12-20 Akim Demaille <akim@epita.fr>
22430
22431 * src/files.c (guard_obstack): New.
22432 (open_files): Initialize it.
22433 (output_files): Dump it...
22434 * src/files.h: Export it.
22435 * src/reader.c (copy_guard): Use it.
22436
22437 2000-12-19 Akim Demaille <akim@epita.fr>
22438
22439 * src/files.c (outfile, defsfile, actfile): Removed as global
22440 vars.
22441 (open_files): Don't compute them.
22442 (output_files): Adjust.
22443 (base_name, short_base_name): Be global.
22444 Adjust dependencies.
22445
22446 2000-12-19 Akim Demaille <akim@epita.fr>
22447
22448 * src/files.c (strsuffix): New.
22449 (stringappend): Be just like strcat but allocate.
22450 (base_names): Eve out from open_files.
22451 Try to simplify the rather hairy computation of base_name and
22452 short_base_name.
22453 (open_files): Use it.
22454 * tests/suite.at (Checking output file names): New test.
22455
22456 2000-12-19 Akim Demaille <akim@epita.fr>
22457
22458 * src/system.h (obstack_grow_literal_string): Rename as...
22459 (obstack_grow_string): this.
22460 * src/output.c (output_parser): Recognize `%% actions' instead of
22461 `$'.
22462 * src/bison.s1: s/$/%% actions/.
22463 * src/bison.hairy: Likewise.
22464
22465 2000-12-19 Akim Demaille <akim@epita.fr>
22466
22467 * src/output.c (output_parser): Compute the `#line' lines when
22468 there are.
22469 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22470 Suggested by Hans Aberg.
22471
22472 2000-12-19 Akim Demaille <akim@epita.fr>
22473
22474 Let the handling of the skeleton files be local to the procedures
22475 that use it.
22476
22477 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22478 longer static.
22479 (fparser, open_extra_files): Remove.
22480 (open_files, output_files): Don't take care of fparser.
22481 * src/files.h: Adjust.
22482 * src/output.c (output_parser): Open and close the file to the
22483 skeleton.
22484 * src/reader.c (read_declarations): When %semantic_parser, open
22485 fguard.
22486
22487 2000-12-19 Akim Demaille <akim@epita.fr>
22488
22489 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22490 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22491
22492 2000-12-19 Akim Demaille <akim@epita.fr>
22493
22494 * src/files.c (open_files): Yipee! We no longer need all the code
22495 looking for `/tmp' since we have no tmp file.
22496
22497 2000-12-19 Akim Demaille <akim@epita.fr>
22498
22499 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22500 New macros.
22501 * src/files.c (open_files): Less dependency on MSDOS etc.
22502
22503 2000-12-14 Akim Demaille <akim@epita.fr>
22504
22505 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22506 Provide a default definition.
22507 Use it when executing the default @ action.
22508 * src/reader.c (reader_output_yylsp): No longer include
22509 `timestamp' and `text' in the default YYLTYPE.
22510
22511 2000-12-12 Akim Demaille <akim@epita.fr>
22512
22513 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22514 (copy_guard): Quote the file names.
22515 Reported by Laurent Mascherpa.
22516
22517 2000-12-12 Akim Demaille <akim@epita.fr>
22518
22519 * src/output.c (output_headers, output_program, output): Be sure
22520 to escape special characters when outputting filenames.
22521 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22522 (output_headers): Don't depend on them, Use ACTSTR.
22523
22524 2000-11-17 Akim Demaille <akim@epita.fr>
22525
22526 * lib/obstack.h: Formatting changes.
22527 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22528 prevents type checking.
22529 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22530 cast the value to (void *): assigning a `foo *' to a `void *'
22531 variable is valid.
22532 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22533 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22534 append characters.
22535
22536 2000-11-17 Akim Demaille <akim@epita.fr>
22537
22538 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22539 as...
22540 (suite.m4, regression.m4, calc.m4): these.
22541 * tests/atgeneral.m4: Update from CVS Autoconf.
22542
22543 2000-11-17 Akim Demaille <akim@epita.fr>
22544
22545 * tests/regression.m4 (%union and --defines): New test,
22546 demonstrating a current bug in the obstack implementation.
22547
22548 2000-11-17 Akim Demaille <akim@epita.fr>
22549
22550 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22551 macros.
22552 Use them to declare the variables which are global or local to
22553 `yyparse'.
22554
22555 2000-11-17 Akim Demaille <akim@epita.fr>
22556
22557 * acconfig.h: Remove, no longer used.
22558
22559 2000-11-07 Akim Demaille <akim@epita.fr>
22560
22561 * src: s/Copyright (C)/Copyright/g.
22562
22563 2000-11-07 Akim Demaille <akim@epita.fr>
22564
22565 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22566 defining.
22567 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22568
22569 2000-11-07 Akim Demaille <akim@epita.fr>
22570
22571 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22572 Merge in a single CPP if/else.
22573
22574 2000-11-07 Akim Demaille <akim@epita.fr>
22575
22576 * src/output.c (output): Remove useless variables.
22577 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22578 argument `data' for consistency with the prototypes.
22579 Qualify it `const'.
22580 (obstack_copy, obstack_copy0): Rename the second argument as
22581 `address' for consistency. Qualify it `const'.
22582 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22583 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22584 `const' their input argument (`data' or `address').
22585 Adjust the corresponding macros to include `const' in casts.
22586
22587 2000-11-03 Akim Demaille <akim@epita.fr>
22588
22589 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22590 s/PFILE1/BISON_HAIRY/.
22591 Adjust dependencies.
22592
22593 2000-11-03 Akim Demaille <akim@epita.fr>
22594
22595 For some reason, this was not applied.
22596
22597 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22598 `unlink': it's no longer used.
22599
22600 2000-11-03 Akim Demaille <akim@epita.fr>
22601
22602 * src/files.c (skeleton_find): New function, eved out of...
22603 (open_files, open_extra_files): here.
22604
22605 2000-11-03 Akim Demaille <akim@epita.fr>
22606
22607 Don't use `atexit'.
22608
22609 * src/files.c (obstack_save): New function.
22610 (done): Rename as...
22611 (output_files): this.
22612 Use `obstack_save'.
22613 * src/main.c (main): Don't use `atexit' to register `done', since
22614 it no longer has to remove tmp files, just call `output_files'
22615 when there are no errors.
22616
22617 2000-11-02 Akim Demaille <akim@epita.fr>
22618
22619 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22620 `unlink': it's no longer used.
22621 * src/files.h: Formatting changes.
22622
22623 2000-11-02 Akim Demaille <akim@epita.fr>
22624
22625 Remove the last uses of mktemp and unlink/delete.
22626
22627 * src/files.c (fdefines, ftable): Removed.
22628 (defines_ostack, table_obstack): New.
22629 Adjust dependencies of the former into uses of the latter.
22630 * src/output.c (output_short_or_char_table, output_short_table):
22631 Convert to using obstacks.
22632 * src/reader.c (copy_comment2): Accept one FILE * and two
22633 obstacks.
22634 (output_token_defines, reader_output_yylsp): Use obstacks.
22635 * src/system.h (obstack_fgrow3): New.
22636 * po/POTFILES.in: Adjust.
22637
22638 2000-11-01 Akim Demaille <akim@epita.fr>
22639
22640 Change each use of `fattrs' into a use of `attrs_obstack'.
22641
22642 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22643 * src/files.c (fattrs): Remove.
22644 (attrs_obstack): New.
22645 Adjust all dependencies.
22646 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22647
22648 2000-11-01 Akim Demaille <akim@epita.fr>
22649
22650 Introduce obstacks.
22651 Change each use of `faction' into a use of `action_obstack'.
22652
22653 * lib/obstack.h, lib/obstack.c: New files.
22654 * src/files.c (faction): Remove.
22655 (action_obstack): New.
22656 Adjust all dependencies.
22657
22658 2000-10-20 Akim Demaille <akim@epita.fr>
22659
22660 * lib/quote.h (PARAMS): New macro. Use it.
22661
22662 2000-10-16 Akim Demaille <akim@epita.fr>
22663
22664 * src/output.c (output_short_or_char_table): New function.
22665 (output_short_table, output_token_translations): Use it.
22666 (goto_actions): Use output_short_table.
22667
22668 2000-10-16 Akim Demaille <akim@epita.fr>
22669
22670 * src/symtab.c (bucket_new): New function.
22671 (getsym): Use it.
22672
22673 * src/output.c (output_short_table): New argument to display the
22674 comment associated with the table.
22675 Adjust dependencies.
22676 (output_gram): Use it.
22677 (output_rule_data): Nicer output layout for YYTNAME.
22678
22679 2000-10-16 Akim Demaille <akim@epita.fr>
22680
22681 * src/lex.c (read_typename): New function.
22682 (lex): Use it.
22683 * src/reader.c (copy_dollar): Likewise.
22684
22685 2000-10-16 Akim Demaille <akim@epita.fr>
22686
22687 * src/reader.c (copy_comment2): Expect the input stream to be on
22688 the `/' which is suspected to open a comment, instead of being
22689 called after `//' or `/*' was read.
22690 (copy_comment, copy_definition, parse_union_decl, copy_action)
22691 (copy_guard): Adjust.
22692
22693 2000-10-16 Akim Demaille <akim@epita.fr>
22694
22695 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22696 `read_signed_integer'.
22697
22698 2000-10-16 Akim Demaille <akim@epita.fr>
22699
22700 * src/reader.c (copy_dollar): New function.
22701 (copy_guard, copy_action): Use it.
22702
22703 2000-10-16 Akim Demaille <akim@epita.fr>
22704
22705 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22706 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22707 New files, from Fileutils 4.0.27.
22708 * src/main.c (printable_version): Remove.
22709 * src/lex.c, src/reader.c: Use `quote'.
22710
22711 2000-10-04 Akim Demaille <akim@epita.fr>
22712
22713 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22714
22715 2000-10-04 Akim Demaille <akim@epita.fr>
22716
22717 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22718
22719 2000-10-04 Akim Demaille <akim@epita.fr>
22720
22721 When a literal string is used to define two different tokens,
22722 `bison -v' segfaults.
22723 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22724
22725 * tests/regression.m4: New file.
22726 Include the core of the sample provided by Piotr Gackiewicz.
22727 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22728 properly.
22729
22730 2000-10-04 Akim Demaille <akim@epita.fr>
22731
22732 * src/reader.c (parse_expect_decl): Keep `count' within the size
22733 of `buffer'.
22734 From Neil Booth.
22735
22736 2000-10-02 Paul Eggert <eggert@twinsun.com>
22737
22738 * bison.s1 (yyparse): Assign the default value
22739 unconditionally, to avoid a GCC warning and make the parser a
22740 tad smaller.
22741
22742 2000-10-02 Akim Demaille <akim@epita.fr>
22743
22744 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22745 options.
22746
22747 2000-10-02 Akim Demaille <akim@epita.fr>
22748
22749 * src/derives.c, src/print.c, src/reduce.c: To ease the
22750 translation, move some `\n' out of the translated strings.
22751
22752 2000-10-02 Akim Demaille <akim@epita.fr>
22753
22754 The location tracking mechanism is precious for parse error
22755 messages. Nevertheless, it is enabled only when `@n' is used in
22756 the grammar, which is a different issue (you can use it in error
22757 message, but not in the grammar per se). Therefore, there should
22758 be another means to enable it.
22759
22760 * src/getargs.c (getargs): Support `--locations'.
22761 (usage): Report it.
22762 * src/getargs.h (locationsflag): Export it.
22763 * src/lex.c (percent_table): Support `%locations'.
22764 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22765 with `locationsflag'.
22766 * doc/bison.texinfo: Document `--locations' and `%locations'.
22767 Sort the options.
22768 * tests/calc.m4: Test it.
22769
22770 For regularity of the names, replace each
22771 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22772 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22773 In addition replace each `flag' with `_flag'.
22774
22775 2000-10-02 Akim Demaille <akim@epita.fr>
22776
22777 Also test parse error messages, including with YYERROR_VERBOSE.
22778
22779 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22780 associative).
22781 Use it to check the computations.
22782 Use it to check `nonassoc' is honored.
22783 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22784 `--yyerror-verbose'.
22785 (_AT_CHECK_CALC): Adjust to this option.
22786 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22787
22788 2000-10-02 Akim Demaille <akim@epita.fr>
22789
22790 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22791 the latter demonstrates a flaw in the handling of non debugging
22792 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22793 was used in order to simplify:
22794
22795 #if YYDEBUG
22796 if (yydebug)
22797 {
22798 ...
22799 }
22800 #endif
22801
22802 into
22803
22804 if (yydebug)
22805 {
22806 ...
22807 }
22808
22809 unfortunately this leads to a CPP conflict when
22810 `--name-prefix=foo' is used since it produces `#define yydebug
22811 foodebug'.
22812
22813 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22814 (YYDPRINTF): New macro.
22815 Spread its use.
22816 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22817 the bison options.
22818 Also test `--verbose', `--defines' and `--name-prefix'.
22819
22820 2000-10-02 Akim Demaille <akim@epita.fr>
22821
22822 Improve the readability of the produced parsers.
22823
22824 * src/bison.s1: Formatting changes.
22825 Improve the comment related to the `$' mark.
22826 (yydefault): Don't fall through to `yyresume': `goto' there.
22827 * src/output.c (output_parser): When the `$' is met, skip the end
22828 of its line.
22829 New variable, `number_of_dollar_signs', to check there's exactly
22830 one `$' in the parser skeleton.
22831
22832 2000-10-02 Akim Demaille <akim@epita.fr>
22833
22834 * lib/xstrdup.c: New file, from the fileutils.
22835 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22836 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22837 instead of strlen + xmalloc + strcpy.
22838 * src/symtab.c (copys): Remove, use xstrdup instead.
22839
22840 2000-10-02 Akim Demaille <akim@epita.fr>
22841
22842 * src/gram.h (associativity): New enum type which replaces the
22843 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22844 `right_assoc', `left_assoc' and `non_assoc'.
22845 Adjust all dependencies.
22846 * src/reader.c: Formatting changes.
22847 (LTYPESTR): Don't define it, use it as a literal in
22848 `reader_output_yylsp'.
22849 * src/symtab.h (symbol_class): New enum type which replaces the
22850 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22851 `sunknown', `stoken and `snterm'.
22852
22853 2000-10-02 Akim Demaille <akim@epita.fr>
22854
22855 * src/getargs.c (fixed_outfiles): Rename as...
22856 (yaccflag): for consistency and accuracy.
22857 Adjust dependencies.
22858
22859 2000-10-02 Akim Demaille <akim@epita.fr>
22860
22861 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22862 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22863 difficult and introduced a lot of core dump. It turns out that
22864 Bison used an implementation of `xmalloc' based on `calloc', and
22865 at various places it does depend upon the initialization to 0. I
22866 have not tried to isolate the pertinent places, and all the former
22867 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22868 someone should address this issue.
22869
22870 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22871 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22872 files.
22873 Adjust dependencies.
22874 * src/warshall.h: New file.
22875 Propagate.
22876
22877 2000-10-02 Akim Demaille <akim@epita.fr>
22878
22879 Various anti-`extern in *.c' changes.
22880
22881 * src/system.h: Include `assert.h'.
22882
22883 2000-10-02 Akim Demaille <akim@epita.fr>
22884
22885 * src/state.h (nstates, final_state, first_state, first_shift)
22886 (first_reduction): Move their exportation from here...
22887 * src/LR0.h: to here.
22888 Adjust dependencies.
22889 * src/getargs.c (statisticsflag): New variable.
22890 Add support for `--statistics'.
22891 Adjust dependencies.
22892
22893 Remove a lot of now useless `extern' statements in most files.
22894
22895 2000-10-02 Akim Demaille <akim@epita.fr>
22896
22897 * src/LR0.h: New file.
22898 Propagate its use.
22899
22900 2000-10-02 Akim Demaille <akim@epita.fr>
22901
22902 * src/print.h: New file.
22903 Propagate its use.
22904 * src/print.c: Formatting and ordering changes.
22905 (verbose, terse): Replace with...
22906 (print_results): this new function.
22907 Adjust dependencies.
22908
22909 2000-10-02 Akim Demaille <akim@epita.fr>
22910
22911 * src/conflicts.c (conflict_report): New function.
22912 (conflict_log, verbose_conflict_log): Replace with...
22913 (print_conflicts): this function.
22914 Adjust dependencies.
22915 * src/conflicts.h: New file.
22916 Propagate its inclusion.
22917
22918 2000-10-02 Akim Demaille <akim@epita.fr>
22919
22920 * src/nullable.h: New file.
22921 Propagate its inclusion.
22922 * src/nullable.c: Formatting changes.
22923
22924 2000-10-02 Akim Demaille <akim@epita.fr>
22925
22926 * src/reduce.h: New file.
22927 Propagate its inclusion.
22928 * src/reduce.c: Topological sort and other formatting changes.
22929 (bool, TRUE, FALSE): Move their definition to...
22930 * src/system.h: here.
22931
22932 2000-10-02 Akim Demaille <akim@epita.fr>
22933
22934 * src/files.c: Formatting changes.
22935 (tryopen, tryclose, openfiles): Rename as...
22936 (xfopen, xfclose, open_files): this.
22937 (stringappend): static.
22938 * src/files.h: Complete the list of exported symbols.
22939 Propagate its use.
22940
22941 2000-10-02 Akim Demaille <akim@epita.fr>
22942
22943 * src/reader.h: New file.
22944 Propagate its use instead of tedious list of `extern' and
22945 prototypes.
22946 * src/reader.c: Formatting changes, topological sort,
22947 s/register//.
22948
22949 2000-10-02 Akim Demaille <akim@epita.fr>
22950
22951 * src/lex.h: Prototype `lex.c' exported functions.
22952 * src/reader.c: Adjust.
22953 * src/lex.c: Formatting changes.
22954 (safegetc): Rename as...
22955 (xgetc): this.
22956
22957 2000-10-02 Akim Demaille <akim@epita.fr>
22958
22959 * src/lalr.h: New file.
22960 Propagate its inclusion instead of prototypes and `extern'.
22961 * src/lalr.c: Formatting changes, topological sorting etc.
22962
22963 2000-10-02 Akim Demaille <akim@epita.fr>
22964
22965 * src/output.c (token_actions): Introduce a temporary array,
22966 YYDEFACT, that makes it possible for this function to use
22967 output_short_table.
22968
22969 2000-10-02 Akim Demaille <akim@epita.fr>
22970
22971 `user_toknums' is output as a `short[]' in `output.c', while it is
22972 defined as a `int[]' in `reader.c'. For consistency with the
22973 other output tables, `user_toknums' is now defined as a table of
22974 shorts.
22975
22976 * src/reader.c (user_toknums): Be a short table instead of an int
22977 table.
22978 Adjust dependencies.
22979
22980 Factor the short table outputs.
22981
22982 * src/output.c (output_short_table): New function.
22983 * src/output.c (output_gram, output_stos, output_rule_data)
22984 (output_base, output_table, output_check): Use it.
22985
22986 2000-10-02 Akim Demaille <akim@epita.fr>
22987
22988 * src/output.c (output): Topological sort of the functions, in
22989 order to get rid of the `static' prototypes.
22990 No longer use `register'.
22991 * src/output.h: New file.
22992 Propagate its inclusion in files explicitly prototyping functions
22993 from output.c.
22994
22995 2000-09-21 Akim Demaille <akim@epita.fr>
22996
22997 * src/atgeneral.m4: Update from Autoconf.
22998
22999 2000-09-21 Akim Demaille <akim@epita.fr>
23000
23001 * src/closure.h: New file.
23002 * src/closure.c: Formatting changes, topological sort over the
23003 functions, use of closure.h.
23004 (initialize_closure, finalize_closure): Rename as...
23005 (new_closure, free_closure): these. Adjust dependencies.
23006 * src/LR0.c: Formatting changes, topological sort, use of
23007 cloture.h.
23008 (initialize_states): Rename as...
23009 (new_states): this.
23010 * src/Makefile.am (noinst_HEADERS): Adjust.
23011
23012 2000-09-20 Akim Demaille <akim@epita.fr>
23013
23014 * src/acconfig.h: Don't protect config.h against multiple
23015 inclusion.
23016 Don't define PARAMS.
23017 * src/system.h: Define PARAMS.
23018 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23019 purpose of config.h. system.h must not try to fix wrong
23020 definitions in config.h.
23021
23022 2000-09-20 Akim Demaille <akim@epita.fr>
23023
23024 * src/derives.h: New file.
23025 * src/main.c, src/derives.h: Use it.
23026 Formatting changes.
23027 * src/Makefile.am (noinst_HEADERS): Adjust.
23028
23029 2000-09-20 Akim Demaille <akim@epita.fr>
23030
23031 * tests/atgeneral.m4: Update from Autoconf.
23032 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23033 (AT_CHECK_CALC): New macros.
23034 Use these macros to test bison with options `', `--raw',
23035 `--debug', `--yacc', `--yacc --debug'.
23036
23037 2000-09-19 Akim Demaille <akim@epita.fr>
23038
23039 * src/output.c: Formatting changes.
23040 * src/machine.h: Remove, leaving its contents in...
23041 * src/system.h: here.
23042 Include stdio.h.
23043 Adjust all dependencies on stdio.h and machine.h.
23044 * src/getargs.h: New file.
23045 Let all `extern' declarations about getargs.c be replaced with
23046 inclusion of `getargs.h'.
23047 * src/Makefile.am (noinst_HEADERS): Adjust.
23048
23049 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23050 scope.
23051 (yyerror): Returns void, not int.
23052 * doc/bison.texinfo: Formatting changes.
23053
23054 2000-09-19 Akim Demaille <akim@epita.fr>
23055
23056 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23057 portable.
23058
23059 2000-09-18 Akim Demaille <akim@epita.fr>
23060
23061 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23062 * src/Makefile.am (INCLUDES): Don't.
23063 Be ready to fetch headers in lib/.
23064
23065 2000-09-18 Akim Demaille <akim@epita.fr>
23066
23067 * doc/bison.texinfo: Update the copyright.
23068 ANSIfy and GNUify the examples.
23069 Remove the old menu.
23070
23071 2000-09-18 Akim Demaille <akim@epita.fr>
23072
23073 First set of tests: use the `calc' example from the documentation.
23074
23075 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23076 is defined only when YYDEBUG is.
23077 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23078 * src/files.c (tryopen, tryclose): Formatting changes.
23079 Move to the top and be static.
23080 * src/reader.c (read_signed_integer): Likewise.
23081 * tests/calc.m4: New file.
23082 * Makefile.am, suite.m4: Adjust.
23083 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23084
23085 2000-09-18 Akim Demaille <akim@epita.fr>
23086
23087 Add support for an Autotest test suite for Bison.
23088
23089 * m4/m4.m4, m4/atconfig.m4: New files.
23090 * m4/Makefile.am (EXTRA_DIST): Adjust.
23091 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23092 files.
23093 * src/getargs.c: Display a more standard --version message.
23094 * src/reader.c (reader): Formatting changes.
23095 No longer depend upon VERSION_STRING.
23096 * configure.in: No longer use `dnl'.
23097 Set up the test suite and the new directory `tests/.
23098 (VERSION_STRING): Remove.
23099
23100 2000-04-14 Akim Demaille <akim@epita.fr>
23101
23102 * src/reader.c (copy_comment2): New function, same as former
23103 `copy_comment', but outputs into two FILE *.
23104 (copy_comment): Use it.
23105 (parse_union_decl): Use it.
23106 (get_type, parse_start_decl): Use the same `invalid' message.
23107 (parse_start_decl, parse_union_decl): Use the same `multiple'
23108 message.
23109 (parse_union_decl, copy_guard, copy_action): Use the same
23110 `unmatched' message.
23111 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23112
23113 2000-03-31 Akim Demaille <akim@epita.fr>
23114
23115 * src/files.c (tryopen, tryclose): Move to the top.
23116 Be static.
23117
23118 2000-03-31 Akim Demaille <akim@epita.fr>
23119
23120 * src/main.c (main): Don't call `done', exit does it.
23121
23122 2000-03-31 Akim Demaille <akim@epita.fr>
23123
23124 * allocate.c: s/return (foo)/return foo/.
23125 * lalr.c: Likewise.
23126 * LR0.c: Likewise.
23127 * output.c: Likewise.
23128 * reader.c: Likewise.
23129 * symtab.c: Likewise.
23130 * vmsgetargs.c: Likewise.
23131
23132 2000-03-31 Akim Demaille <akim@epita.fr>
23133
23134 Clean up the error reporting functions.
23135
23136 * src/report.c: New file.
23137 * src/report.h: Likewise.
23138 * src/Makefile.am: Adjust.
23139 * m4/error.m4: New file.
23140 * m4/Makefile.am: Adjust.
23141 * configure.in (jm_PREREQ_ERROR): Call it.
23142 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23143 Remove.
23144 (fatal, fatals): Remove. All callers use complain.c::fatal.
23145 (warn, warni, warns, warnss, warnss): Remove. All callers use
23146 complain.c::complain.
23147 (toomany): Remove, use fatal instead.
23148 * src/files.c (done): No argument, use complain_message_count.
23149 * src/main.c (main): Register `done' to `atexit'.
23150
23151 * src/getargs.c (usage): More `fputs', less `fprintf'.
23152
23153 2000-03-28 Akim Demaille <akim@epita.fr>
23154
23155 * lib/: New directory.
23156 * Makefile.am (SUBDIRS): Adjust.
23157 * configure.in: Adjust.
23158 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23159 useless.
23160 * src/alloca.c: Moved to lib/.
23161 * src/getopt.c: Likewise.
23162 * src/getopt1.c: Likewise.
23163 * src/getopt.h: Likewise.
23164 * src/ansi2knr.c: Likewise.
23165 * src/ansi2knr.1: Likewise.
23166 * src/Makefile.am: Adjust.
23167 * lib/Makefile.am: New file.
23168
23169 2000-03-28 Akim Demaille <akim@epita.fr>
23170
23171 * src/getargs.c (usage): Refresh the help message.
23172
23173 2000-03-17 Akim Demaille <akim@epita.fr>
23174
23175 * src/getopt1.c: Updated from textutils 2.0e
23176 * src/getopt.c: Likewise.
23177 * src/getopt.h: Likewise.
23178
23179 2000-03-17 Akim Demaille <akim@epita.fr>
23180
23181 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23182 the file name, not the whole `#line LINE FILE'.
23183
23184 2000-03-17 Akim Demaille <akim@epita.fr>
23185
23186 On syntax errors, report the token on which we choked.
23187
23188 * src/bison.s1 (yyparse): In the label yyerrlab, when
23189 YYERROR_VERBOSE, add yychar in msg.
23190
23191 2000-03-17 Akim Demaille <akim@epita.fr>
23192
23193 * src/reader.c (copy_at): New function.
23194 (copy_guard): Use it.
23195 (copy_action): Use it.
23196
23197 2000-03-17 Akim Demaille <akim@epita.fr>
23198
23199 Be kind to translators, save some useless translations.
23200
23201 * src/main.c (banner): New function.
23202 (fatal_banner): Use it.
23203 (warn_banner): Use it.
23204
23205 2000-03-17 Akim Demaille <akim@epita.fr>
23206
23207 * src/reader.c (copy_definition): Use copy_string and
23208 copy_comment. Removed now unused `match', `ended',
23209 `cplus_comment'.
23210 (copy_comment, copy_string): Moved, to be visible from
23211 copy_definition.
23212
23213 2000-03-17 Akim Demaille <akim@epita.fr>
23214
23215 * src/reader.c (copy_string): Declare `static inline'. No
23216 problems with inline, since it is checked by configure.
23217 (copy_comment): Likewise.
23218
23219 2000-03-17 Akim Demaille <akim@epita.fr>
23220
23221 * src/reader.c (packsymbols): Formatting changes.
23222
23223 2000-03-17 Akim Demaille <akim@epita.fr>
23224
23225 * src/reader.c (copy_comment): New function, factored out from:
23226 (copy_action): Use it. Removed now unused `match', `ended',
23227 `cplus_comment'.
23228 (copy_guard): Likewise.
23229
23230 2000-03-17 Akim Demaille <akim@epita.fr>
23231
23232 * src/reader.c (copy_string): New function, factored out from:
23233 (copy_action): Use it.
23234 (copy_guard): Likewise.
23235
23236 2000-03-17 Akim Demaille <akim@epita.fr>
23237
23238 Change the handling of @s so that they behave exactly like $s.
23239 There is now a pseudo variable @$ (readble and writable), location
23240 of the lhs of the rule (by default ranging from the location of
23241 the first symbol of the rhs, to the location of the last symbol,
23242 or, if the rhs is empty, YYLLOC).
23243
23244 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23245 yyval.
23246 (yyparse): When providing a default semantic action, provide a
23247 default location action.
23248 (after the $): No longer change `*YYLSP', just stack YYLOC the
23249 same way you stack YYVAL.
23250 * src/reader.c (read_declarations): Use warns.
23251 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23252 (copy_action, case '@'): Likewise.
23253 Use a standard error message, to save useless work from
23254 translators.
23255
23256 2000-03-17 Akim Demaille <akim@epita.fr>
23257
23258 * src/bison.s1: Formatting and cosmetics changes.
23259 * src/reader.c: Likewise.
23260 Update the Copyright notice.
23261
23262 2000-03-17 Akim Demaille <akim@epita.fr>
23263
23264 * src/bison.s1 (#line): All set to `#line' only, since the
23265 Makefile now handles them.
23266
23267 2000-03-16 Akim Demaille <akim@epita.fr>
23268
23269 * src/output.c (output_rule_data): Output the documentation of
23270 some of the tables.
23271 (Copyright notice): Update.
23272 Formatting changes.
23273
23274 2000-03-16 Akim Demaille <akim@epita.fr>
23275
23276 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23277 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23278 One `#if YYDEBUG' remains, since it uses variables which are
23279 defined only if `YYDEBUG != 0'.
23280
23281 2000-03-16 Akim Demaille <akim@epita.fr>
23282
23283 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23284 and related variables so that the similarities are highlighted.
23285
23286 2000-03-16 Akim Demaille <akim@epita.fr>
23287
23288 * src/bison.s1: Properly indent CPP directives.
23289
23290 2000-03-16 Akim Demaille <akim@epita.fr>
23291
23292 * src/bison.s1: Properly indent the `alloca' CPP section.
23293
23294 2000-03-16 Akim Demaille <akim@epita.fr>
23295
23296 Do not hard code values of directories in `configure.in'.
23297 Update the `configure' tool chain.
23298
23299 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23300 src/makefile.am.
23301 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23302 (AC_OUTPUT): Add m4/Makefile.
23303 Bump to bison 1.28a, 1.29 has never been released.
23304 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23305 handled via src/Makefile.am.
23306 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23307 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23308 autoheader.
23309 * Makefile.am (SUBDIRS): Add m4.
23310 (ACLOCAL_AM_FLAGS): New variable.
23311 (AUTOMAKE_OPTIONS): Add check-news.
23312 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23313 the proper line number and file name.
23314 (DEFS): Propagate the location of bison library files and of the
23315 locale files.
23316 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23317 builddir.
23318 * acinclude.m4: Remove, replaced by the directory m4.
23319 * m4/Makefile.am (EXTRA_DIST): New variable.
23320 * m4/gettext.m4: New file, from the fileutils.
23321 * m4/lcmessage.m4: Likewise
23322 * m4/progtest.m4: Likewise.
23323 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23324
23325 2000-03-10 Akim Demaille <akim@epita.fr>
23326
23327 * src/closure.c:
23328 Formatting changes of various comments.
23329 Respect the GNU coding standards at various places.
23330 Don't use `_()' when no translation is needed.
23331
23332 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23333
23334 * src/files.c:
23335 OS/2 honors TMPDIR environment variable.
23336
23337 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23338
23339 * doc/bison.texinfo: Tweaked spelling and grammar.
23340 Updated ISBN.
23341 Removed reference to price of printed copy.
23342 Mention BISON_SIMPLE and BISON_HAIRY.
23343
23344 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23345
23346 * configure.in, NEWS:
23347 Bison 1.29 released.
23348
23349 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23350
23351 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23352 Added reference card.
23353
23354 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23355
23356 * po/ru.po: Added Russian translation.
23357
23358 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23359
23360 * configure.in: Added Russian translation.
23361
23362 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23363
23364 * configure.in, NEWS, README:
23365 Released version 1.28.
23366
23367 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23368
23369 * src/system.h:
23370 Squashed redefinition warning on some systems.
23371
23372 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23373 Have configure build version string instead of relying on ANSI string
23374 concatentation.
23375
23376 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23377
23378 * po/POTFILES.in: Got rid of version.c.
23379
23380 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23381
23382 * acconfig.h, configure.in:
23383 Have configure build version string instead of relying on ANSI string
23384 concatentation.
23385
23386 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23387
23388 * doc/bison.1:
23389 Dropped mention of `+' for long-named options.
23390
23391 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23392
23393 * src/files.c: Added <unistd.h> for unlink().
23394
23395 * src/Makefile.am, src/system.h:
23396 I18n fixes.
23397
23398 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23399
23400 * README: Added a FAQ list.
23401
23402 * configure.in, acconfig.h:
23403 I18n fixes.
23404
23405 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23406
23407 * doc/FAQ, doc/Makefile.am:
23408 Added a FAQ list.
23409
23410 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23411
23412 * src/alloc.h, src/symtab.h, src/version.c:
23413 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23414
23415 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23416
23417 * src/.cvsignore, src/Makefile.am:
23418 Reorganized: sources in `src', documentation in `doc'.
23419
23420 * src/lex.c (literalchar):
23421 fixed the code for escaping double quotes (thanks
23422 Jonathan Czisny.)
23423
23424 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23425
23426 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23427 Adjusted paths to reflect directory reorganization.
23428
23429 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23430
23431 * doc/.cvsignore, doc/Makefile.am:
23432 Reorganized: sources in `src', documentation in `doc'.
23433
23434 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23435
23436 * configure.in:
23437 Updated AC_INIT file to reflect directory reorganization.
23438
23439 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23440 Reorganized: sources in `src', documentation in `doc'.
23441
23442 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23443
23444 * src/allocate.c:
23445 Don't declare calloc() and realloc() if not necessary.
23446
23447 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23448
23449 * configure.in, acconfig.h, acinclude.m4:
23450 Don't declare calloc() and realloc() if not necessary.
23451
23452 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23453
23454 * po/.cvsignore: Added i18n support.
23455
23456 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23457
23458 * acconfig.h, configure.in, Makefile.am:
23459 Added i18n support.
23460
23461 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23462
23463 * src/bison.s1: Fixed #line numbers.
23464
23465 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23466
23467 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23468 Added PO files from Translation Project.
23469
23470 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23471
23472 * Makefile.am:
23473 Added support for non-ANSI compilers (ansi2knr).
23474
23475 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23476
23477 * configure.in: Bumped version number to 1.27.
23478
23479 * Makefile.am:
23480 Added `bison.simple' to list of files removed by `make distclean'.
23481
23482 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23483
23484 * src/files.c, src/files.h:
23485 Defined locations of parser files in config.h instead of Makefile.
23486
23487 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23488
23489 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23490 Defined locations of parser files in config.h instead of Makefile.
23491
23492 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23493
23494 * Makefile.am:
23495 Removed inappropriate use of $< macro.
23496
23497 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23498
23499 * po/Makefile.in.in, po/POTFILES.in:
23500 Add `po' directory skeleton.
23501
23502 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23503
23504 * README: Document help-bison list.
23505
23506 * configure.in: Add check for mkstemp().
23507
23508 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23509
23510 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23511 Hush a few compiler warnings.
23512
23513 * src/files.c:
23514 Add tryclose(), which verifies that fclose was successful.
23515 Hush a couple of compiler warnings.
23516
23517 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23518
23519 * Makefile.am, OChangeLog:
23520 ChangeLog is now automatically generated. Include the old version as
23521 OChangeLog.
23522
23523 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23524
23525 * 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:
23526 Update FSF address.
23527
23528 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23529
23530 * doc/bison.texinfo: Fix formatting glitch.
23531
23532 * doc/bison.texinfo: Update FSF address.
23533
23534 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23535
23536 * acconfig.h: Update FSF address.
23537
23538 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23539
23540 * src/system.h:
23541 Don't define PACKAGE here, since config.h defines it.
23542
23543 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23544
23545 * src/reader.c: Update copyright date.
23546
23547 * src/main.c:
23548 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23549 favor of output directly to stderr (avoids buffer overruns).
23550
23551 * src/reader.c: Some checks for premature EOF.
23552
23553 * 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:
23554 Use prototypes if the compiler understands them.
23555
23556 * src/files.c: Honor TMPDIR on Unix hosts.
23557 Use prototypes if the compiler understands them.
23558
23559 * src/reader.c:
23560 Fix a couple of buffer overrun bugs.
23561 Use prototypes if the compiler understands them.
23562
23563 * src/system.h: Include unistd.h and ctype.h.
23564 Use #ifdef instead of #if for NLS symbols.
23565
23566 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23567
23568 * doc/bison.texinfo:
23569 Delete comment "consider using @set for edition number, etc..." since
23570 we now are doing so.
23571
23572 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23573
23574 * configure.in:
23575 Use prototypes if the compiler understands them.
23576
23577 * NEWS: Document 1.26 highlights.
23578
23579 * Makefile.am: Require Automake 1.3 or later.
23580
23581 * acconfig.h:
23582 Use prototypes if the compiler understands them.
23583
23584 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23585
23586 * src/version.c:
23587 Use VERSION symbol from automake for version number.
23588
23589 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23590
23591 * acconfig.h, configure.in, version.cin:
23592 Use VERSION symbol from automake for version number.
23593
23594 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23595
23596 * Makefile.am:
23597 Distribute original version of simple parser (bison.s1), not built
23598 version (bison.simple).
23599
23600 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23601
23602 * doc/bison.texinfo: Add info dir entry.
23603
23604 * doc/bison.texinfo:
23605 Let automake put version number into documentation.
23606
23607 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23608
23609 * src/bison.cld, src/build.com, src/vmshlp.mar:
23610 Add non-RCS files from /gd/gnu/bison.
23611
23612 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23613
23614 * doc/bison.1:
23615 Document the BISON_HAIRY and BISON_SIMPLE variables.
23616
23617 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23618
23619 * src/version.c: Build version.c automatically.
23620
23621 * src/reader.c:
23622 Fix token numbering (used to start at 258, not 257).
23623
23624 * src/system.h: Include config.h.
23625
23626 * src/getargs.c: Update bug report address.
23627
23628 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23629 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23630
23631 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23632
23633 * Makefile.am:
23634 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23635
23636 * configure.in, version.cin:
23637 Build version.c automatically.
23638
23639 * AUTHORS: Add AUTHORS file.
23640
23641 * README: Update bug report address.
23642
23643 * bison.simple:
23644 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23645
23646 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23647 Add automake stuff.
23648
23649 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23650
23651 * doc/bison.texinfo: Clean up some formatting.
23652
23653 1998-05-05 Richard Stallman <rms@gnu.org>
23654
23655 * doc/bison.texinfo:
23656 Explain better why to make a pure parser.
23657
23658 1998-01-05 Richard Stallman <rms@gnu.org>
23659
23660 * src/files.c (openfiles):
23661 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23662 find a temporary directory, if possible. Do not unlink files while
23663 they are open.
23664
23665 1997-08-25 Richard Stallman <rms@gnu.org>
23666
23667 * src/reader.c (stack_offset;):
23668 Change some warni to warns.
23669
23670 * src/lex.c (literalchar): Use warns, not warni.
23671
23672 1997-06-28 Richard Stallman <rms@gnu.org>
23673
23674 * src/bison.s1: Add a Bison version comment.
23675
23676 * src/main.c (fatal, warn, berror):
23677 Use program_name.
23678
23679 1997-06-28 Richard Stallman <rms@gnu.org>
23680
23681 * Makefile.in (bison_version): New variable.
23682 (dist): Use that variable.
23683 (bison.s1): Substitute the Bison version into bison.simple.
23684
23685 * bison.simple: Add a Bison version comment.
23686
23687 1997-06-18 Richard Stallman <rms@gnu.org>
23688
23689 * src/main.c (fatal, warn, berror):
23690 Make error messages standard.
23691 (toomany): Improve error message text.
23692
23693 * 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:
23694 new.h renamed to alloc.h.
23695
23696 1997-06-18 Richard Stallman <rms@gnu.org>
23697
23698 * Makefile.in: new.h renamed to alloc.h.
23699
23700 1997-05-24 Richard Stallman <rms@gnu.org>
23701
23702 * src/lex.c (literalchar):
23703 Fix the code for escaping \, " and '.
23704
23705 (lex): Avoid trouble when there are many chars
23706 to discard in a char literal with just several chars in it.
23707
23708 1997-05-17 Richard Stallman <rms@gnu.org>
23709
23710 * src/bison.s1:
23711 Use malloc, if using alloca is troublesome.
23712 (YYSTACK_USE_ALLOCA): New flag macro.
23713 Define it for some systems and compilers.
23714 (YYSTACK_ALLOC): New macro.
23715 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23716 If it was malloc'd, free it.
23717
23718 1997-05-17 Richard Stallman <rms@gnu.org>
23719
23720 * bison.simple:
23721 Use malloc, if using alloca is troublesome.
23722 (YYSTACK_USE_ALLOCA): New flag macro.
23723 Define it for some systems and compilers.
23724 (YYSTACK_ALLOC): New macro.
23725 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23726 If it was malloc'd, free it.
23727
23728 1997-04-23 Richard Stallman <rms@gnu.org>
23729
23730 * src/bison.s1:
23731 (alloca) [__hpux]: Always define as __builtin_alloca.
23732
23733 1997-04-23 Richard Stallman <rms@gnu.org>
23734
23735 * bison.simple:
23736 (alloca) [__hpux]: Always define as __builtin_alloca.
23737
23738 1997-04-22 Richard Stallman <rms@gnu.org>
23739
23740 * src/bison.s1:
23741 [__hpux]: Include alloca.h (right for HPUX 10)
23742 instead of declaring alloca (right for HPUX 9).
23743
23744 * src/bison.s1 (__yy_memcpy):
23745 Declare arg `count' as unsigned int.
23746 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23747
23748 1997-04-22 Richard Stallman <rms@gnu.org>
23749
23750 * bison.simple:
23751 [__hpux]: Include alloca.h (right for HPUX 10)
23752 instead of declaring alloca (right for HPUX 9).
23753
23754 * bison.simple (__yy_memcpy):
23755 Declare arg `count' as unsigned int.
23756 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23757
23758 1997-01-03 Richard Stallman <rms@gnu.org>
23759
23760 * src/allocate.c: [__STDC__ or _MSC_VER]:
23761 Declare calloc and realloc to return void *.
23762
23763 1997-01-02 Richard Stallman <rms@gnu.org>
23764
23765 * src/system.h:
23766 [_MSC_VER]: Include stdlib.h and process.h.
23767 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23768
23769 * src/main.c (main): Return FAILURE as a value.
23770 (printable_version): Declare arg as int, not char.
23771
23772 1997-01-02 Richard Stallman <rms@gnu.org>
23773
23774 * Makefile.in (dist):
23775 Explicitly check for symlinks, and copy them.
23776
23777 1996-12-19 Richard Stallman <rms@gnu.org>
23778
23779 * src/files.c:
23780 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23781
23782 1996-12-18 Paul Eggert <eggert@gnu.org>
23783
23784 * src/bison.s1 (yyparse):
23785 If __GNUC__ and YYPARSE_PARAM are both defined,
23786 declare yyparse to have a void * argument.
23787
23788 1996-12-18 Paul Eggert <eggert@gnu.org>
23789
23790 * bison.simple (yyparse):
23791 If __GNUC__ and YYPARSE_PARAM are both defined,
23792 declare yyparse to have a void * argument.
23793
23794 1996-12-17 Richard Stallman <rms@gnu.org>
23795
23796 * src/reduce.c (nbits): Add some casts.
23797
23798 1996-08-12 Richard Stallman <rms@gnu.org>
23799
23800 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23801
23802 1996-08-12 Richard Stallman <rms@gnu.org>
23803
23804 * bison.simple: Test _MSDOS as well as _MSDOS_.
23805
23806 1996-07-31 Richard Stallman <rms@gnu.org>
23807
23808 * src/bison.s1:
23809 [__sun && __i386]: Include alloca.h.
23810
23811 1996-07-31 Richard Stallman <rms@gnu.org>
23812
23813 * bison.simple:
23814 [__sun && __i386]: Include alloca.h.
23815
23816 1996-07-30 Richard Stallman <rms@gnu.org>
23817
23818 * src/bison.s1: Comment change.
23819
23820 * src/bison.s1: Test _MSDOS_, not MSDOS.
23821
23822 1996-07-30 Richard Stallman <rms@gnu.org>
23823
23824 * bison.simple: Comment change.
23825
23826 * bison.simple: Test _MSDOS_, not MSDOS.
23827
23828 1996-06-01 Richard Stallman <rms@gnu.org>
23829
23830 * 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:
23831 Insert `_' macro around many string constants.
23832
23833 * src/main.c:
23834 Insert `_' macro around many string constants.
23835
23836 (main): Call setlocale, bindtextdomain and textdomain.
23837
23838 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23839 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23840 [ENABLE_NLS]: Include libintl.h.
23841 [ENABLE_NLS] (gettext): Define.
23842 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23843 (N_, PACKAGE, LOCALEDIR): New macros.
23844
23845 1996-06-01 Richard Stallman <rms@gnu.org>
23846
23847 * POTFILES.in: New file.
23848
23849 * Makefile.in (allocate.o):
23850 Define target explicitly.
23851
23852 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23853 (LDFLAGS): Set to @LDFLAGS@.
23854 (configure): Run autoconf only if preceding `cd' succeeds.
23855 (bison.s1): Redirect output to temporary file then move the
23856 temporary to the target, rather than redirecting directly to bison.s1.
23857 (clean): Remove config.status and config.log.
23858 (distclean): Don't remove config.status here.
23859
23860 1996-05-12 Richard Stallman <rms@gnu.org>
23861
23862 * src/bison.s1:
23863 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23864
23865 1996-05-12 Richard Stallman <rms@gnu.org>
23866
23867 * bison.simple:
23868 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23869
23870 1996-05-11 Richard Stallman <rms@gnu.org>
23871
23872 * src/bison.s1 (__yy_memcpy):
23873 Really reorder the args, as was supposedly done on Feb 14 1995.
23874 (yyparse): Calls changed accordingly.
23875
23876 1996-05-11 Richard Stallman <rms@gnu.org>
23877
23878 * Makefile.in (dist): Don't use $(srcdir).
23879
23880 * bison.simple (__yy_memcpy):
23881 Really reorder the args, as was supposedly done on Feb 14 1995.
23882 (yyparse): Calls changed accordingly.
23883
23884 1996-01-27 Richard Stallman <rms@gnu.org>
23885
23886 * src/output.c (output_rule_data):
23887 Test YYERROR_VERBOSE in the conditional
23888 around the definition of ttyname.
23889
23890 1995-12-29 Richard Stallman <rms@gnu.org>
23891
23892 * src/bison.s1:
23893 Fix line numbers in #line commands.
23894
23895 1995-12-29 Richard Stallman <rms@gnu.org>
23896
23897 * bison.simple:
23898 Fix line numbers in #line commands.
23899
23900 1995-12-27 Richard Stallman <rms@gnu.org>
23901
23902 * src/bison.s1 (YYPARSE_PARAM_DECL):
23903 In C++, make it always null.
23904 (YYPARSE_PARAM_ARG): New macro.
23905 (yyparse): Use YYPARSE_PARAM_ARG.
23906
23907 1995-12-27 Richard Stallman <rms@gnu.org>
23908
23909 * bison.simple (YYPARSE_PARAM_DECL):
23910 In C++, make it always null.
23911 (YYPARSE_PARAM_ARG): New macro.
23912 (yyparse): Use YYPARSE_PARAM_ARG.
23913
23914 1995-11-29 Richard Stallman <rms@gnu.org>
23915
23916 * doc/bison.texinfo:
23917 Describe literal string tokens, %raw, %no_lines, %token_table.
23918
23919 1995-11-29 Daniel Hagerty <hag@gnu.org>
23920
23921 * doc/bison.texinfo: Fixed update date
23922
23923 1995-10-16 Richard Stallman <rms@gnu.org>
23924
23925 * src/version.c: Version 1.25.
23926
23927 1995-10-16 Richard Stallman <rms@gnu.org>
23928
23929 * NEWS: *** empty log message ***
23930
23931 1995-10-16 Richard Stallman <rms@gnu.org>
23932
23933 * doc/bison.1, doc/bison.rnh:
23934 Add new options.
23935
23936 1995-10-15 Richard Stallman <rms@gnu.org>
23937
23938 * src/vmsgetargs.c, src/getargs.c:
23939 Added -n, -k, and -raw switches.
23940 (noparserflag, toknumflag, rawtoknumflag): New variables.
23941
23942 * src/symtab.h (SALIAS):
23943 New #define for adding aliases to %token.
23944 (struct bucket): Added `alias' field.
23945
23946 * src/reduce.c (reduce_grammar):
23947 Revise error message.
23948 (print_notices): Remove final `.' from error message.
23949
23950 * src/reader.c (reader_output_yylsp):
23951 New function.
23952 (readgram): Use `#if 0' around code that accepted %command
23953 inside grammar rules: The documentation doesn't allow it,
23954 and it will fail since the %command processors scan for the next %.
23955 (parse_token_decl): Extended the %token
23956 declaration to allow a multi-character symbol as an alias.
23957 (parse_thong_decl): New function.
23958 (read_declarations): Added %thong declarations.
23959 (read_declarations): Handle NOOP to deal with allowing
23960 % declarations as another means to specify the flags.
23961 (readgram): Allow %prec prior to semantics embedded in a rule.
23962 (skip_to_char, read_declarations, copy_definition)
23963 (parse_token_decl, parse_start_decl, parse_type_decl)
23964 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23965 (get_type_name, copy_guard, copy_action, readgram)
23966 (get_type, packsymbols): Revised most error messages.
23967 Changed `fatal' to `warnxxx' to avoid aborting for error.
23968 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23969 (read_declarations): Improve the error message for
23970 an invalid character. Do not abort.
23971 (read_declarations, copy_guard, copy_action): Use
23972 printable_version to avoid unprintable characters in printed output.
23973 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23974 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23975 Allow the type of a non-terminal can be given
23976 more than once, as long as all specifications give the same type.
23977
23978 * src/output.c:
23979 (output_headers, output_trailers, output, output_gram)
23980 (output_rule_data): Implement noparserflag variable.
23981 Implement toknumflag variable.
23982 (output): Call reader_output_yylsp to output LTYPESTR.
23983
23984 * src/main.c (main):
23985 If reader sees an error, don't process the grammar.
23986 (fatals): Updated to not use VARARGS1.
23987 (printable_version, int_to_string, warn, warni, warns, warnss)
23988 (warnsss): New error reporting functions. Avoid abort for error.
23989
23990 * src/lex.h:
23991 Added THONG and NOOP for alias processing.
23992 Added SETOPT for the new code that allows setting options with %flags.
23993
23994 * src/lex.c:
23995 Include getopt.h. Add some extern decls.
23996 (safegetc): New function to deal with EOF gracefully.
23997 (literalchar); new function to deal with reading \ escapes.
23998 (lex): Use literalchar.
23999 (lex): Implemented "..." tokens.
24000 (literalchar, lex, parse_percent_token): Made tokenbuffer
24001 always contain the token. This includes growing the token
24002 buffer while reading an integer.
24003 (parse_percent_token): Replaced if-else statement with percent_table.
24004 (parse_percent_token): Added % declarations as another
24005 way to specify the flags -n, -l, and -r. Also added hooks for
24006 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24007 major changes to files.c.
24008 (lex) Retain in the incoming stream a character following
24009 an incorrect '/'.
24010 (skip_white_space, lex): Revised most error messages
24011 and changed fatal to warn to avoid aborting.
24012 (percent_table): Added %thong declarations.
24013
24014 * src/gram.h: Comment changes.
24015
24016 * src/files.c (openfiles, open_extra_files, done):
24017 Add faction flag
24018 and actfile file. Handle noparserflag. Both for -n switch.
24019
24020 * src/conflicts.c (resolve_sr_conflict):
24021 Remove use of alloca.
24022
24023 1995-06-01 Jim Meyering <meyering@gnu.org>
24024
24025 * doc/bison.texinfo: *** empty log message ***
24026
24027 1995-05-06 Richard Stallman <rms@gnu.org>
24028
24029 * src/bison.s1: Comment change.
24030
24031 1995-05-06 Richard Stallman <rms@gnu.org>
24032
24033 * bison.simple: Comment change.
24034
24035 1995-05-03 Richard Stallman <rms@gnu.org>
24036
24037 * src/version.c: Version now 1.24.
24038
24039 * src/bison.s1: Change distribution terms.
24040
24041 * src/version.c: Version now 1.23.
24042
24043 1995-05-03 Richard Stallman <rms@gnu.org>
24044
24045 * doc/bison.texinfo:
24046 Rewrite "Conditions for Using Bison".
24047 Update version to 1.24.
24048
24049 1995-05-03 Richard Stallman <rms@gnu.org>
24050
24051 * bison.simple: Change distribution terms.
24052
24053 1995-02-23 Richard Stallman <rms@gnu.org>
24054
24055 * src/files.c: Test __VMS_POSIX as well as VMS.
24056
24057 1995-02-14 Jim Meyering <meyering@gnu.org>
24058
24059 * src/bison.s1 (__yy_memcpy):
24060 Renamed from __yy_bcopy to avoid
24061 confusion. Reverse FROM and TO arguments to be consistent with
24062 those of memcpy.
24063
24064 1995-02-14 Jim Meyering <meyering@gnu.org>
24065
24066 * bison.simple (__yy_memcpy):
24067 Renamed from __yy_bcopy to avoid
24068 confusion. Reverse FROM and TO arguments to be consistent with
24069 those of memcpy.
24070
24071 1994-11-10 David J. MacKenzie <djm@gnu.org>
24072
24073 * NEWS: reformat
24074
24075 * NEWS: New file.
24076
24077 * Makefile.in (DISTFILES): Include NEWS.
24078
24079 * Makefile.in (DISTFILES):
24080 Include install-sh, not install.sh.
24081
24082 * configure.in: Update to Autoconf v2 macro names.
24083
24084 1994-10-05 David J. MacKenzie <djm@gnu.org>
24085
24086 * Makefile.in: fix typo
24087
24088 * Makefile.in (prefix, exec_prefix):
24089 Let configure set them.
24090
24091 1994-09-28 David J. MacKenzie <djm@gnu.org>
24092
24093 * Makefile.in: Set datadir to $(prefix)/share.
24094
24095 1994-09-15 Richard Stallman <rms@gnu.org>
24096
24097 * src/bison.s1:
24098 Update copyright notice and GPL version.
24099
24100 1994-09-15 Richard Stallman <rms@gnu.org>
24101
24102 * bison.simple:
24103 Update copyright notice and GPL version.
24104
24105 1994-07-12 Richard Stallman <rms@gnu.org>
24106
24107 * src/reduce.c, src/reader.c:
24108 entered into RCS
24109
24110 1994-05-05 David J. MacKenzie <djm@gnu.org>
24111
24112 * Makefile.in: entered into RCS
24113
24114 1994-03-26 Richard Stallman <rms@gnu.org>
24115
24116 * src/bison.s1: entered into RCS
24117
24118 1994-03-26 Richard Stallman <rms@gnu.org>
24119
24120 * bison.simple: entered into RCS
24121
24122 1994-03-25 Richard Stallman <rms@gnu.org>
24123
24124 * src/main.c: entered into RCS
24125
24126 1994-03-24 Richard Stallman <rms@gnu.org>
24127
24128 * src/conflicts.c: entered into RCS
24129
24130 1994-01-02 Richard Stallman <rms@gnu.org>
24131
24132 * Makefile.in: *** empty log message ***
24133
24134 1993-11-21 Richard Stallman <rms@gnu.org>
24135
24136 * src/bison.s1: *** empty log message ***
24137
24138 1993-11-21 Richard Stallman <rms@gnu.org>
24139
24140 * doc/bison.texinfo: entered into RCS
24141
24142 * doc/bison.texinfo: *** empty log message ***
24143
24144 1993-11-21 Richard Stallman <rms@gnu.org>
24145
24146 * bison.simple: *** empty log message ***
24147
24148 1993-10-25 David J. MacKenzie <djm@gnu.org>
24149
24150 * doc/bison.texinfo: *** empty log message ***
24151
24152 1993-10-19 Richard Stallman <rms@gnu.org>
24153
24154 * src/bison.s1: *** empty log message ***
24155
24156 1993-10-19 Richard Stallman <rms@gnu.org>
24157
24158 * bison.simple: *** empty log message ***
24159
24160 1993-10-14 Richard Stallman <rms@gnu.org>
24161
24162 * src/bison.s1: *** empty log message ***
24163
24164 1993-10-14 Richard Stallman <rms@gnu.org>
24165
24166 * bison.simple: *** empty log message ***
24167
24168 1993-09-14 David J. MacKenzie <djm@gnu.org>
24169
24170 * doc/bison.texinfo: *** empty log message ***
24171
24172 1993-09-13 Noah Friedman <friedman@gnu.org>
24173
24174 * Makefile.in: *** empty log message ***
24175
24176 1993-09-10 Richard Stallman <rms@gnu.org>
24177
24178 * src/conflicts.c: *** empty log message ***
24179
24180 * src/system.h: entered into RCS
24181
24182 1993-09-10 Richard Stallman <rms@gnu.org>
24183
24184 * doc/bison.1: entered into RCS
24185
24186 1993-09-06 Noah Friedman <friedman@gnu.org>
24187
24188 * src/version.c: entered into RCS
24189
24190 1993-09-06 Noah Friedman <friedman@gnu.org>
24191
24192 * Makefile.in: *** empty log message ***
24193
24194 1993-07-30 David J. MacKenzie <djm@gnu.org>
24195
24196 * Makefile.in: *** empty log message ***
24197
24198 1993-07-24 Richard Stallman <rms@gnu.org>
24199
24200 * src/bison.s1: *** empty log message ***
24201
24202 1993-07-24 Richard Stallman <rms@gnu.org>
24203
24204 * bison.simple: *** empty log message ***
24205
24206 1993-07-08 David J. MacKenzie <djm@gnu.org>
24207
24208 * Makefile.in: *** empty log message ***
24209
24210 1993-07-04 Richard Stallman <rms@gnu.org>
24211
24212 * src/bison.s1: *** empty log message ***
24213
24214 1993-07-04 Richard Stallman <rms@gnu.org>
24215
24216 * bison.simple: *** empty log message ***
24217
24218 1993-06-26 David J. MacKenzie <djm@gnu.org>
24219
24220 * src/getargs.c: entered into RCS
24221
24222 1993-06-26 David J. MacKenzie <djm@gnu.org>
24223
24224 * doc/bison.texinfo: *** empty log message ***
24225
24226 * doc/bison.1: New file.
24227
24228 1993-06-25 Richard Stallman <rms@gnu.org>
24229
24230 * src/getargs.c: New file.
24231
24232 1993-06-16 Richard Stallman <rms@gnu.org>
24233
24234 * src/bison.s1: *** empty log message ***
24235
24236 1993-06-16 Richard Stallman <rms@gnu.org>
24237
24238 * bison.simple: *** empty log message ***
24239
24240 1993-06-03 Richard Stallman <rms@gnu.org>
24241
24242 * src/bison.s1: New file.
24243
24244 1993-06-03 Richard Stallman <rms@gnu.org>
24245
24246 * doc/bison.texinfo: *** empty log message ***
24247
24248 1993-06-03 Richard Stallman <rms@gnu.org>
24249
24250 * bison.simple: New file.
24251
24252 1993-05-19 Richard Stallman <rms@gnu.org>
24253
24254 * doc/bison.texinfo: New file.
24255
24256 1993-05-07 Noah Friedman <friedman@gnu.org>
24257
24258 * Makefile.in: *** empty log message ***
24259
24260 1993-04-28 Noah Friedman <friedman@gnu.org>
24261
24262 * src/reader.c: *** empty log message ***
24263
24264 1993-04-23 Noah Friedman <friedman@gnu.org>
24265
24266 * src/alloc.h: entered into RCS
24267
24268 1993-04-20 David J. MacKenzie <djm@gnu.org>
24269
24270 * src/version.c: *** empty log message ***
24271
24272 * src/files.c, src/allocate.c:
24273 entered into RCS
24274
24275 * src/reader.c: *** empty log message ***
24276
24277 * src/lex.c: entered into RCS
24278
24279 * src/conflicts.c: New file.
24280
24281 * src/symtab.c: entered into RCS
24282
24283 * src/alloc.h: New file.
24284
24285 * src/LR0.c: entered into RCS
24286
24287 1993-04-18 Noah Friedman <friedman@gnu.org>
24288
24289 * src/reader.c: New file.
24290
24291 * src/version.c: *** empty log message ***
24292
24293 1993-04-18 Noah Friedman <friedman@gnu.org>
24294
24295 * Makefile.in: *** empty log message ***
24296
24297 1993-04-17 Noah Friedman <friedman@gnu.org>
24298
24299 * Makefile.in: *** empty log message ***
24300
24301 1993-04-15 Richard Stallman <rms@gnu.org>
24302
24303 * src/main.c, src/files.c:
24304 New file.
24305
24306 1993-04-15 Noah Friedman <friedman@gnu.org>
24307
24308 * configure.in: entered into RCS
24309
24310 * configure.in: *** empty log message ***
24311
24312 * configure.in: New file.
24313
24314 1993-04-14 Richard Stallman <rms@gnu.org>
24315
24316 * Makefile.in: New file.
24317
24318 1993-04-13 Richard Stallman <rms@gnu.org>
24319
24320 * src/version.c: New file.
24321
24322 1993-03-25 Richard Stallman <rms@gnu.org>
24323
24324 * src/output.c: entered into RCS
24325
24326 1992-09-25 Richard Stallman <rms@gnu.org>
24327
24328 * configure.bat: entered into RCS
24329
24330 1992-06-22 Richard Stallman <rms@gnu.org>
24331
24332 * src/vmsgetargs.c: entered into RCS
24333
24334 1992-06-22 Richard Stallman <rms@gnu.org>
24335
24336 * doc/bison.rnh: entered into RCS
24337
24338 1992-04-20 David J. MacKenzie <djm@gnu.org>
24339
24340 * README: entered into RCS
24341
24342 1992-01-22 Richard Stallman <rms@gnu.org>
24343
24344 * src/machine.h: entered into RCS
24345
24346 1991-12-21 Richard Stallman <rms@gnu.org>
24347
24348 * src/lalr.c, src/closure.c:
24349 entered into RCS
24350
24351 1991-12-20 Richard Stallman <rms@gnu.org>
24352
24353 * src/state.h: entered into RCS
24354
24355 1991-12-18 Richard Stallman <rms@gnu.org>
24356
24357 * src/print.c, src/nullable.c, src/derives.c:
24358 entered into RCS
24359
24360 1991-11-03 David J. MacKenzie <djm@gnu.org>
24361
24362 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24363 entered into RCS
24364
24365 1988-09-09 Richard Stallman <rms@gnu.org>
24366
24367 * src/bison.hairy: entered into RCS
24368
24369 1987-12-16 Richard Stallman <rms@gnu.org>
24370
24371 * REFERENCES: entered into RCS
24372
24373
24374 -----
24375
24376 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24377 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24378 2008, 2009 Free Software Foundation, Inc.
24379
24380 Copying and distribution of this file, with or without
24381 modification, are permitted provided the copyright notice and this
24382 notice are preserved.