]> git.saurik.com Git - bison.git/blob - ChangeLog
d1e0bc109508f5c681ddfb0a709a2e7958c30693
[bison.git] / ChangeLog
1 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
2
3 Fix complaints about escape sequences.
4 Discussed starting at
5 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
6 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
7 For a \0 and similar escape sequences meaning the null
8 character, report an invalid escape sequence instead of an
9 invalid null character because the latter does not actually
10 appear in the user's input.
11 In all escape sequence complaints, don't escape the initial
12 backslash, and don't quote when the sequence appears at the end
13 of the complaint line unless there's whitespace that quotearg
14 won't escape.
15 Consistently say "invalid" not "unrecognized".
16 Consistently prefer "empty character literal" over "extra
17 characters in character literal" warning for invalid escape
18 sequences; that is, consistently discard those sequences.
19 * tests/input.at (Bad escapes in literals): New.
20
21 2009-08-19 Akim Demaille <demaille@gostai.com>
22
23 doc: fixes.
24 * doc/bison.texinfo: Fix minor Texinfo errors.
25
26 2009-08-19 Akim Demaille <demaille@gostai.com>
27
28 tests: distcc compliance.
29 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
30 error messages from the output.
31
32 2009-08-19 Akim Demaille <demaille@gostai.com>
33
34 variables: simplify the upgrade of namespace into api.namespace.
35
36 This patch simplifies "variables: rename namespace as
37 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
38 Suggested by Joel E. Denny in
39 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
40
41 * src/muscle-tab.c (muscle_percent_variable_update): New.
42 (muscle_percent_define_insert): Use it in replacement of the
43 previous tr invocation.
44 Remove variable_tr, no longer needed.
45 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
46 Remove.
47 * data/c++.m4: No longer handle namespace -> api.namespace.
48 * tests/input.at (%define backward compatibility): Check that
49 namespace is treated as api.namespace.
50
51 2009-08-19 Akim Demaille <demaille@gostai.com>
52
53 doc: %initial-action to initialize yylloc.
54 Reported by Bill Allombert.
55 * doc/bison.texinfo: Set fill-column to 76.
56 (Location Type): Document the use of %initial-action to initialize
57 yylloc.
58
59 2009-08-19 Akim Demaille <demaille@gostai.com>
60
61 lalr1.cc: use state_type.
62 * data/lalr1.cc (yysyntax_error_): Use state_type.
63 Move argument names into yy*.
64
65 2009-08-19 Akim Demaille <demaille@gostai.com>
66
67 lalr1.cc: get rid of yyparse's yystate.
68 yystate and yystack_[0].state are equal, keep only the latter.
69 The former was also used as a temporary variable to compute the
70 post-reduction state. Move this computation into an auxiliary
71 function.
72
73 * data/glr.c (yyLRgotoState): Fuse variable definition and first
74 assignment.
75 * data/lalr1.cc (yy_lr_goto_state_): New.
76 (yyparse): Use it.
77 Replace remaining uses of yystate by yystate_[0].state.
78 Remove the former.
79
80 2009-08-19 Akim Demaille <demaille@gostai.com>
81
82 lalr1.cc: destroy $$ when YYERROR is called.
83 * data/lalr1.cc (yyreduce): Compute the resulting state before
84 running the user action so that yylhs is a valid symbol.
85 (yyerrorlab): Since yylhs is complete (it knows its type), we can
86 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
87 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
88
89 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
90
91 maint: update for gnulib's recent update-copyright changes
92 * gnulib: Update.
93 * .x-update-copyright (COPYING): Add as it's no longer implied
94 when .x-update-copyright is present.
95 * cfg.mk (update-copyright-local): Remove, now ignored.
96 (update-copyright): Declare update-b4-copyright as a dependency.
97
98 2009-08-17 Akim Demaille <demaille@gostai.com>
99
100 build: require gettext 0.17.
101
102 Suggested by Bruno Haible.
103 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
104 * configure.ac: require gettext 0.17 to ensure compatibility with
105 gnulib.
106
107 2009-08-17 Akim Demaille <demaille@gostai.com>
108
109 build: lower gettext requirements.
110
111 Bison was uselessly requiring the formatstring macros from
112 gettext, which resulted in mo files not being installed on systems
113 that perfectly supported Bison mo files. Lower the requirement.
114 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
115
116 * configure.ac: Require need-ngettext instead of
117 need-formatstring-macros.
118 Reported by Martin Jabocs.
119 Suggested by Bruno Haible.
120 * INSTALL: Restructure.
121 (Internationalization): New.
122
123 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
124
125 maint: fix use of copyright year intervals.
126 * gnulib: Update.
127 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
128 as now recommended in gnulib/NEWS.
129 * build-aux/update-b4-copyright: Fix.
130 * cfg.mk (update-copyright-env): Configure update-copyright.
131
132 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
133
134 Make it easier to write deterministic tests.
135 Continues Akim's work from his 2009-06-10 commits.
136 * src/reader.c (check_and_convert_grammar): Don't add any
137 symbols after the first symbols_do invocation.
138 * src/symtab.c (symbols_sorted): New static global.
139 (user_token_number_redeclaration): Update comments.
140 (symbol_from_uniqstr): If a new symbol is being created, assert
141 that symbols_sorted hasn't been allocated yet.
142 (symbols_free): Free symbols_sorted.
143 (symbols_cmp, symbols_cmp_qsort): New functions.
144 (symbols_do): Sort symbol_table into symbols_sorted on first
145 invocation.
146 * tests/input.at (Numbered tokens): Recombine tests now that the
147 output should be deterministic across multiple numbers.
148
149 2009-08-12 Akim Demaille <demaille@gostai.com>
150
151 tests: GCC 4.5 compliance.
152 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
153 messages about #error.
154
155 2009-08-12 Akim Demaille <demaille@gostai.com>
156
157 build: fix the generation of the documentation.
158 Some of our targets use "bison --help", but they can't depend on
159 "bison" itself (to avoid additional requirements on the user), so
160 they used to call "make src/bison" in the commands. Then
161 concurrent builds may fail: one make might be aiming one of its
162 jobs at compiling src/bison, and another job at generating the man
163 page. If the latter is faster than the former, then we have two
164 makes that concurrently try to compile src/bison.
165
166 This might also be a more convincing explanation for the failure
167 described in the patch "build: fix paths".
168
169 * Makefile.am (SUFFIXES): Initialize.
170 * build-aux/move-if-change: New, symlink to gnulib's.
171 * build-aux/local.mk: Ship it.
172 * doc/common.x: Remove, merged into...
173 * doc/bison.x: here.
174 * doc/local.mk (doc/bison.help): New.
175 ($(CROSS_OPTIONS_TEXI)): Depend on it.
176 Use src/bison.
177 (.x.1): Replace with...
178 (doc/bison.1): this explicit, simpler, target.
179 (common_dep): Remove, inlined where appropriate.
180 (SUFFIXES, PREPATH): Remove, unused.
181
182 2009-08-12 Akim Demaille <demaille@gostai.com>
183
184 gnulib: improve prefixing.
185 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
186 change the value of...
187 (gl_LIBOBJS): this.
188 Adjust more variables.
189 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
190 gl_LIBOBJS.
191 (prefix): Also transform rules whose targets have slashes.
192 Use $prefix liberally.
193 Map @MKDIR_P@ to $(MKDIR_P).
194 Prefix directories that are mkdir'd.
195
196 2009-08-12 Akim Demaille <demaille@gostai.com>
197
198 build: fix paths.
199 When using $(top_builddir) inconsistently, Make (including GNU
200 Make) is sometimes confused. As a result it may want to build
201 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
202 file, different names) concurrently, which, amusingly enough,
203 might end with:
204
205 ranlib lib/libbison.a
206 ranlib lib/libbison.a
207 make[2]: *** [lib/libbison.a] Segmentation fault
208
209 on OS X.
210
211 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
212 needed.
213
214 2009-08-12 Akim Demaille <demaille@gostai.com>
215
216 distcheck: fix.
217
218 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
219
220 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
221
222 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
223
224 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
225
226 Miscellaneous code readability improvements.
227
228 * src/reader.c (reader): Move %define front-end variable
229 defaults and checking into...
230 (prepare_percent_define_front_end_variables): ... this new
231 function.
232
233 * src/scan-gram.l (INITIAL): For consistency with string
234 literals, don't store open quote on character literal. It's
235 discarded before returning anyway.
236 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
237 Make length test more readable, and make the character stored
238 for an empty literal more obvious while consistent with the
239 previous behavior.
240
241 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
242 USER_NUMBER_HAS_STRING_ALIAS throughout.
243 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
244 that is repeated in symtab.h. Improve argument names to make it
245 clear which side of the symbol-string alias pair is which.
246 (symbol_check_alias_consistency): Improve local variable names
247 for the same purpose.
248 * src/symtab.h (struct symbol): Make comments about aliases
249 clearer.
250 (symbol_make_alias): Improve comments and argument name.
251 * src/output.c (token_definitions_output): Update for rename to
252 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
253
254 2009-08-08 Alex Rozenman <rozenman@gmail.com>
255
256 Convert "misleading reference" messages to warnings.
257 * src/scan-code.l: New function 'show_sub_messages', more
258 factoring.
259 * tests/named-ref.at: Adjust tests.
260
261 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
262
263 maint: run "make update-copyright"
264
265 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
266
267 maint: make update-b4-copyright easier to use
268 * build-aux/update-b4-copyright: In warnings, report line
269 numbers rather than character positions.
270 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
271 that update-copyright runs it.
272 * gnulib: Update.
273
274 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
275
276 maint: clean up update-b4-copyright code
277 * build-aux/update-b4-copyright: Do not accept 2-digit
278 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
279 Don't accept a `[' in a b4_copyright argument.
280 Format code more consistently.
281 Don't assume b4*copyright never occurs.
282
283 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
284
285 maint: automate b4_copyright updates.
286 * Makefile.am (update-b4-copyright): New target rule.
287 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
288 * build-aux/update-b4-copyright: New.
289 * data/yacc.c: Remove stray characters around b4_copyright
290 invocations.
291
292 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
293
294 maint: automate annual package-wide copyright-year update.
295 * .x-update-copyright: New.
296 * Makefile.am (EXTRA_DIST): Remove maint.mk.
297 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
298 update-copyright. Remove gnumakefile, which is implied by
299 maintainer-makefile.
300 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
301 * gnulib: Update.
302 * maint.mk: Remove, now copied from gnulib.
303 * examples/extexi: Add missing "(C)" in copyright statement so
304 update-copyright can recognize it.
305 * src/LR0.h: Likewise.
306 * src/print.h: Likewise.
307 * src/print_graph.h: Likewise.
308 * src/gram.c: Add missing comma in copyright statement.
309 * src/gram.h: Likewise.
310
311 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
312
313 Fix "make distcheck".
314 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
315 of just calc.stamp.
316
317 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
318
319 Pacify "gcc -Wunused" for the input function from Flex.
320 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
321 and later.
322 * src/scan-code.l: Add "%option noinput", which I cannot find in
323 the Flex manual, but which Flex has supported since at least as
324 far back as 2.5.4. However, if any of our developers still use
325 Flex 2.5.4, they'll need to stop configuring with
326 --enable-gcc-warnings because "%option noinput" didn't work
327 correctly until Flex 2.5.6.
328 * src/scan-gram.l: Likewise.
329 * src/scan-skel.l: Likewise.
330
331 2009-07-31 Alex Rozenman <rozenman@gmail.com>
332
333 Fix --enable-gcc-warnings problems.
334 * src/reader.c: Adjust variable names.
335 * src/scan-code.l: Fix prototypes and adjust names.
336 * src/named-ref.c: Remove redundant "if".
337
338 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
339
340 Fix a --enable-gcc-warnings problem.
341 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
342 variable.
343
344 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
345
346 Warn about character literals not of length one.
347 * NEWS (2.5): Document.
348 * src/scan-gram.l (INITIAL): Remove comment that we don't check
349 the length.
350 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
351 * tests/input.at (Bad character literals): New test group.
352
353 2009-07-24 Alex Rozenman <rozenman@gmail.com>
354
355 Fix some memory leaks.
356 * src/named-ref.c: Add a pointer check (named_ref_free).
357 * src/scan-code.l: New function (variant_table_free). Called in
358 code_scanner_free.
359 * src/symlist.c: Call to named_ref_free (symbol_list_free).
360
361 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
362
363 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
364
365 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
366
367 Some M4 cleanup in the testsuite.
368 Suggested by Eric Blake at
369 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
370 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
371 complicate the code by distinguishing between a missing value
372 and an empty string value for an optional argument. This fix is
373 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
374 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
375 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
376 arguments are not needed because of the following changes.
377 Fix stale comments.
378 Bison developers should use GNU M4 and should not use
379 POSIXLY_CORRECT when building the test suite, so do not
380 complicate the code by avoiding $10 and above.
381 Do not quote an empty string value for an optional argument, and
382 do not distinguish between a missing value and an empty string
383 value.
384
385 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
386
387 Revert unnecessary column realignment in --help output.
388 Reported by Akim Demaille at
389 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
390 * src/getargs.c (usage): Here.
391
392 2009-07-04 Alex Rozenman <rozenman@gmail.com>
393
394 Alphabetical order in src/local.mk.
395 * src/local.mk: Adjust.
396
397 2009-07-04 Alex Rozenman <rozenman@gmail.com>
398
399 Style changes and factoring.
400 * src/named-ref.h: Add comments.
401 * src/parse-gram.y: Readability and style changes.
402 * src/reader.c: Factoring: assign_named_ref function.
403 * src/scan-code.l: Factoring and style changes. Rename
404 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
405 Use "unsigned" type for variant index. Improve readablity.
406 * src/scan-gram.l: Change error messages and add comments.
407 * src/symlist.h: symbol_list_null: New function decl.
408 * src/symlist.c: symbol_list_null: Implement here.
409 * tests/named-refs.at: Adjust for new error messages.
410
411 2009-06-29 Eric Blake <ebb9@byu.net>
412
413 scan-code: avoid compiler warnings
414 * src/scan-code.l (parse_named_ref): Use correct specifiers.
415
416 2009-06-29 Akim Demaille <demaille@gostai.com>
417
418 build: avoid concurrent extraction of calc++.
419 * examples/calc++/Makefile.am (calc.stamp): New.
420 Depend on it to create the sources of calc++ so that concurrent
421 builds don't launch several "extexi" in parallel.
422 Not only this is inefficient, this also builds incorrect sources
423 with several extractions mixed together.
424
425 2009-06-29 Akim Demaille <demaille@gostai.com>
426
427 parse.error: fix.
428 * data/bison.m4: Move code related to specific variables after the
429 definition of the variable-maintaining macros so that we don't
430 "invoke" b4_percent_define_check_values before it is defined.
431
432 2009-06-29 Akim Demaille <demaille@gostai.com>
433
434 variables: parse.error
435
436 Implement, document, and test the replacement of %error-verbose
437 by %define parse.error "verbose".
438 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
439 values of the parse.error variable.
440 Make "simple" its default value.
441 Check the valid values.
442 * src/parse-gram.y: Use %define parse.error.
443 (PERCENT_ERROR_VERBOSE): New token.
444 Support it.
445 * src/scan-gram.l: Support %error-verbose.
446
447 * doc/bison.texinfo (Decl Summary): Replace the documentation of
448 %define error-verbose by that of %define parse.error.
449 * NEWS: Document it.
450
451 * tests/actions.at, tests/calc.at: Use parse.error instead of
452 %error-verbose.
453
454 2009-06-27 Alex Rozenman <rozenman@gmail.com>
455
456 Implement support for named symbol references.
457 * src/parse-gram.y: Add new syntax (named_ref.opt).
458 * src/reader.c: Store named refs in symbol lists.
459 * src/reader.h: New argument for symbol_append and
460 action_append functions.
461 * src/scan-code.h: Add new field (named_ref) into
462 code_props data structure. Keeps named ref of midrule
463 actions.
464 * src/scan-code.l: Support for named refs in semantic
465 action code. New function 'parse_named_ref'.
466 * src/scan-gram.l: Support bracketed id.
467 * src/symlist.c: Store named refs in symbol lists.
468 * src/symlist.h: New field in symbol list: named_ref.
469 * src/named-ref.h: New file, a struct for named_ref.
470 * src/named-ref.cp: New file, named_ref_new function.
471 * src/local.mk: Add two new files.
472 * tests/testsuite.at: Include new test group:
473 * tests/named-refs.at: this new file.
474
475 2009-06-25 Akim Demaille <demaille@gostai.com>
476
477 hash: check insertion for memory exhaustion.
478 * src/uniqstr.c (uniqstr_new): New.
479
480 2009-06-24 Akim Demaille <demaille@gostai.com>
481
482 variables: rename namespace as api.namespace.
483 Discussed in
484 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
485
486 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
487 New.
488 (b4_percent_define_use): New.
489 Use it where applicable.
490 * data/c++.m4: Replace uses of the variable "namespace" by
491 "api.namespace".
492 Default the latter to the former.
493 * doc/bison.texinfo (Decl Summary): Document "namespace" as
494 obsolete.
495 Document api.namespace.
496 Use @samp to document %define uses, keep @code for identifiers.
497 * NEWS: Likewise.
498 * tests/c++.at, tests/input.at: Test api.namespace instead of
499 namespace. (The tests passed with namespace.)
500
501 2009-06-11 Akim Demaille <demaille@gostai.com>
502
503 style changes.
504 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
505 * src/print-xml.c: Style changes.
506 * tests/conflicts.at: Comment changes.
507
508 2009-06-11 Akim Demaille <demaille@gostai.com>
509
510 xml: beware of user strings used to give a %prec to rules.
511 * tests/conflicts.at (%prec with user strings): New.
512 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
513 XML output.
514
515 2009-06-11 Akim Demaille <demaille@gostai.com>
516
517 hash: check insertion for memory exhaustion.
518 * src/muscle-tab.c (muscle_insert, muscle_grow)
519 * src/state.c (state_hash_insert): Check the return value of
520 hash_insert.
521
522 2009-06-11 Akim Demaille <demaille@gostai.com>
523
524 tests: honor TESTSUITEFLAGS in every check target.
525 * tests/local.mk (RUN_TESTSUITE): New.
526 (check-local, installcheck-local, maintainer-check-g++)
527 (maintainer-check-posix, maintainer-check-valgrind): Use it.
528
529 2009-06-10 Akim Demaille <demaille@gostai.com>
530
531 deterministic test suite.
532 Some consistency checks on symbols are performed after all the
533 symbols were read, by an iteration over the symbol table. This
534 traversal is nondeterministic, which can be a problem for test
535 cases.
536 Avoid this.
537 Addresses another form of nondeterminism reported by Joel E. Denny.
538 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
539
540 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
541 test in two.
542 Use different file names for the three tests to make the
543 maintenance easier.
544
545 2009-06-10 Akim Demaille <demaille@gostai.com>
546
547 gnulib: update.
548 * gnulib: Update to latest.
549 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
550 * m4/.gitignore: Regen.
551 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
552 Call xalloc_die on hash_insert failures.
553 Requested by the new __warn_unused_result__ attribute of
554 hash_insert.
555
556 2009-06-10 Akim Demaille <demaille@gostai.com>
557
558 deterministic user-token-number redeclaration errors.
559 Address nondeterminism reported by Joel E. Denny.
560 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
561
562 * src/uniqstr.h: Comment changes.
563 * src/location.h (boundary_cmp, location_cmp): New.
564 * src/symtab.c (user_token_number_redeclaration): New.
565 (symbol_translation): Use it.
566 * tests/input.at (Numbered tokens): Adjust the expected output.
567
568 2009-05-25 Akim Demaille <demaille@gostai.com>
569
570 build: avoid ignored errors.
571 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
572 errors, they pollute the output.
573
574 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
575
576 Convert multiple variable definition warnings to complaints.
577 * NEWS (2.5): Add a new entry for that change.
578 * doc/bison.texinfo (Decl Summary): Update %define entry.
579 (Bison Options): Update -D/--define/-F/--force-define entry.
580 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
581 * src/muscle-tab.h (muscle_percent_define_insert): Update
582 comments.
583 * tests/input.at (`%define errors'): Update.
584 (`%define, --define, --force-define'): Update.
585
586 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
587
588 -F/--force-define and relative %define/-D/--define priorities.
589 * NEWS (2.5): Add documentation to -D/--define entry.
590 * build-aux/cross-options.pl: Hard-code association of
591 --force-define with %define.
592 * doc/bison.texinfo (Decl Summary): In %define entry,
593 cross-reference command-line options.
594 (Bison Options): Add documentation to -D/--define entry.
595 (Option Cross Key): Widen column for --force-define row.
596 * src/getargs.c (usage): Document -F/--force-define. Realign
597 options in output.
598 (short_options, long_options, getargs): Parse -F/--force-define,
599 and update muscle_percent_define_insert invocations.
600 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
601 (muscle_percent_define_insert): Add argument with that type.
602 * src/muscle-tab.c (muscle_percent_define_insert): Implement
603 -F/--force-define behavior and priorities.
604 (muscle_percent_define_ensure): Update
605 muscle_percent_define_insert invocation.
606 * src/parse-gram.y (prologue_declaration): Update
607 muscle_percent_define_insert invocations.
608 * tests/input.at (`%define, --define'): Rename to...
609 (`%define, --define, --force-define'): ... this and extend.
610
611 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
612
613 Update some comments to make sense for -D.
614 * data/bison.m4 (b4_check_user_names): In header comments, say
615 "user occurrence" instead of "grammar occurrence".
616 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
617 (muscle_percent_code_grow): Likewise just for consistency.
618
619 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
620
621 * data/c++.m4 (b4_namespace_close): Simplify slightly.
622
623 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
624
625 Handle a trailing `:' in a user-supplied C++ namespace better.
626 * data/c++.m4 (b4_namespace_close): Don't let it be printed
627 among the closing braces here. This fix might make the
628 generated code easier to debug, but otherwise it should be
629 insignificant because a trailing `:' is a C++ error already.
630
631 2009-05-19 Akim Demaille <demaille@gostai.com>
632
633 remove useless variable.
634 * src/getargs.c (skeleton_arg): Remove now useless variable.
635 Should help the compiler see that this printf-like call is sane.
636
637 2009-05-15 Akim Demaille <demaille@gostai.com>
638
639 Rename token.prefix as api.tokens.prefix.
640 Discussed here.
641 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
642
643 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
644 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
645 (token.prefix): Rename as...
646 (api.tokens.prefix): this.
647
648 2009-05-11 Akim Demaille <demaille@gostai.com>
649
650 doc: use C++ headers.
651 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
652 headers.
653
654 2009-05-11 Akim Demaille <demaille@gostai.com>
655
656 doc: token.prefix
657 * doc/bison.simple (Decl Summary): Document token.prefix.
658 (Calc++ Parser): Various fixes.
659 Formatting changes.
660 Use token.prefix.
661 Introduce a macro TOKEN to shorten the code and make it more
662 readable.
663 (Calc++ Scanner): Adjust.
664 * NEWS (Variable token.prefix): New.
665
666 2009-05-04 Akim Demaille <demaille@gostai.com>
667
668 bison: catch bad symbol names.
669 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
670 * tests/input.at: Adjust.
671
672 2009-05-04 Akim Demaille <demaille@gostai.com>
673
674 identifiers: dashes are letters.
675 Dashes can now start identifiers (symbols and directives).
676
677 * src/scan-gram.l ({letter}): Add dash.
678 ({id}): Remove it.
679 * tests/input.at (Symbols): Adjust.
680 Remove stray comment.
681 * tests/regression.at (Invalid inputs): Adjust error message.
682 * doc/bison.texinfo (Symbols): Update.
683
684 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
685
686 Declare %code to be a permanent feature.
687 * NEWS (2.4.2): Here.
688 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
689 experimental.
690 (Decl Summary): Likewise.
691
692 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
693
694 Convert underscores to dashes in some %define variable names.
695 For now, just api.push-pull and lr.keep-unreachable-states.
696 Maintain old names for backward compatibility.
697 * NEWS (2.5): Document.
698 * data/c.m4 (b4_identification): Update comment.
699 * data/yacc.c: Update access.
700 * doc/bison.texinfo: Update.
701 * etc/bench.pl.in (bench_push_parser): Update use.
702 * src/files.c (tr): Move to...
703 * src/getargs.c, src/getargs.h (tr): ... here because I can't
704 think of a better place to expose it. My logic is that, for all
705 uses of tr so far, command-line arguments can be involved, and
706 getargs.h is already included.
707 * src/main.c (main): Update access.
708 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
709 variable names to new variable names before assigning value.
710 * src/reader.c (reader): Update setting default.
711 * tests/calc.at: Update uses.
712 * tests/conflicts.at (Unreachable States After Conflict
713 Resolution): Update use.
714 * tests/input.at (%define enum variables): Update use.
715 (%define backward compatibility): New test group.
716 * tests/push.at: Update uses.
717 * tests/reduce.at: Update uses.
718 * tests/torture.at: Update uses.
719
720 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
721
722 Set all front-end %define defaults in one place.
723 * src/main.c (main): Move lr.keep_unreachable_states default...
724 * src/reader.c (reader): ... to here.
725
726 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
727
728 Rename lr.default_reductions to lr.default-reductions.
729 * NEWS (2.5): Here.
730 * doc/bison.texinfo: Here.
731 * src/lalr.c (initialize_LA): Here.
732 * src/print.c (print_reductions): Here.
733 * src/reader.c (reader): Here.
734 * src/tables.c (action_row): Here.
735 * tests/input.at (%define enum variables): Here.
736 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
737
738 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
739
740 Pacify ./configure --enable-gcc-warnings.
741 * tests/input.at (Symbols): Prototype yyerror and yylex.
742
743 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
744
745 Document how `%define "var" "value"' is not M4-friendly.
746 * src/parse-gram.y (variable): In comments here.
747
748 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
749
750 Clean up recent patches a little.
751 Reported by Akim Demaille.
752 * doc/bison.texinfo (Understanding): Fix typos.
753 * src/print.c (print_reductions): Don't use negated variable.
754
755 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
756
757 List accepted values for a %define enum variable with an invalid value.
758 Suggested by Akim Demaille at
759 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
760 * data/bison.m4 (_b4_percent_define_check_values): Implement.
761 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
762 * tests/input.at (%define lr.default_reductions invalid values): Merge
763 into...
764 (%define enum variables): ... here, and update output.
765
766 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
767
768 Rename "default rule" to "default reduction".
769 This includes changing variable names in code, changing
770 comments, and renaming %define lr.default_rules to %define
771 lr.default_reductions.
772 * NEWS (2.5): Update IELR documentation.
773 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
774 documentation.
775 * data/glr.c, data/lalr1.java: Sync copyright dates.
776 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
777 and lr.type documentation. Make some other wording
778 improvements.
779 (Glossary): Adjust cross-references and Default Reduction
780 definition.
781 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
782 Remove a confusing comment pointed out by Akim Demaille.
783 (initialize_LA): Adjust code.
784 * src/print-xml.c (print_reductions): Adjust code.
785 * src/print.c (print_reductions): Adjust code.
786 * src/reader.c (reader): Adjust code.
787 * src/tables.c (action_row): Adjust code.
788 (token_actions): Adjust code.
789 * src/tables.h: Adjust YYDEFACT documentation.
790 * tests/input.at (%define lr.default_rules invalid values):
791 Rename test group to...
792 (%define lr.default_reductions invalid values): ... this, and
793 update grammar file and expected output.
794 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
795 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
796
797 2009-04-21 Akim Demaille <demaille@gostai.com>
798
799 tests: check the use of dashes and periods in symbols.
800 * tests/input.at (Symbol): New test group.
801
802 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
803
804 Document %define lr.type and lr.default_rules.
805 * NEWS (2.5): Add an entry.
806 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
807 besides just LALR(1) and GLR(1).
808 * doc/bison.texinfo (Introduction): Likewise.
809 (Language and Grammar): Bison is no longer limited to LALR(1)
810 restrictions.
811 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
812 when trying to distinguish from GLR. Talk about LR(1) grammars
813 rather than LALR(1) grammars.
814 (Decl Summary): In %define api.push_pull entry, say it applies
815 to deterministic parsers in C rather than LALR(1) parsers in C.
816 Add lr.default_rules entry.
817 Add lr.type entry.
818 (Mystery Conflicts): Bison is no longer limited to LALR(1)
819 restrictions.
820 (Generalized LR Parsing): Same changes as for the previous GLR
821 section.
822 (Memory Management): Say deterministic rather than LALR(1).
823 (Understanding): Correct some bison output.
824 Index discussion of "accepting state".
825 Say deterministic rather than LALR(1).
826 (Bison Options): In --yacc entry, say deterministic rather than
827 LALR(1).
828 In --report, --graph, and --xml entries, just don't mention
829 LALR(1).
830 (C++ Parsers): Say deterministic rather than LALR(1).
831 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
832 (Glossary): Add Accepting State, Consistent State, Default Rule,
833 and IELR(1) definitions.
834 In Generalized LR (GLR) definition, make same changes as in
835 previous GLR sections.
836 In LALR(1) definition, say Bison uses LALR(1) by default rather
837 than implying Bison is limited to LALR(1).
838 (LocalWords): Add IELR.
839
840 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
841
842 Finish implementing %define lr.type.
843 Its value can be "LALR", "IELR", or "canonical LR".
844 * lib/timevar.def (TV_IELR_PHASE1): New var.
845 (TV_IELR_PHASE2): New var.
846 (TV_IELR_PHASE3): New var.
847 (TV_IELR_PHASE4): New var.
848 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
849 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
850 Sbitset.h, ielr.h, and ielr.c.
851 * src/getargs.h, src/getargs.c (enum trace, trace_args,
852 trace_types): Add trace_ielr.
853 * src/lalr.h, src/lalr.c (ngotos): Export it.
854 (F): Rename to...
855 (goto_follows): ... this, update all uses, and export it.
856 (set_goto_map): Export it.
857 (map_goto): Export it.
858 (compute_lookahead_tokens): Don't free goto_follows yet. Now
859 handled in ielr.
860 (initialize_LA): Export it. Move lookback allocation to...
861 (lalr): ... here because, for canonical LR, initialize_LA must
862 be invoked but lookback and much of the rest of LALR isn't
863 needed.
864 * main.c (main): Instead of lalr, invoke ielr, which invokes
865 lalr.
866 * src/reader.c (reader): Default lr.type to "LALR".
867 Default lr.default_rules to "accepting" if lr.type is "canonical
868 LR". Leave the default as "all" otherwise.
869 Check for a valid lr.type value.
870 * src/state.h, src/state.c (struct state_list): Add state_list
871 member.
872 (state_new): Initialize state_list member to NULL.
873 (state_new_isocore): New function, exported.
874 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
875 exercises all values of lr.type.
876 (GNU AWK Grammar): Rename test group to...
877 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
878 AT_TEST_EXISTING_GRAMMAR.
879 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
880 (GNU pic Grammar): Rename test group to...
881 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
882 AT_TEST_EXISTING_GRAMMAR.
883 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
884 all values of lr.type.
885 (Single State Split): New test groups using AT_TEST_LR_TYPE.
886 (Lane Split): Likewise.
887 (Complex Lane Split): Likewise.
888 (Split During Added Lookahead Propagation): Likewise.
889
890 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
891
892 Add new files for IELR and canonical LR implementation.
893 * src/AnnotationList.c: New.
894 * src/AnnotationList.h: New.
895 * src/InadequacyList.c: New.
896 * src/InadequacyList.h: New.
897 * src/Sbitset.c: New.
898 * src/Sbitset.h: New.
899 * src/ielr.c: New.
900 * src/ielr.h: New.
901
902 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
903
904 Implement %define lr.default_rules.
905 Its value describes the states that are permitted to contain
906 default rules: "all", "consistent", or "accepting".
907 * src/reader.c (reader): Default lr.default_rules to "all".
908 Check for a valid lr.default_rules value.
909 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
910 is "accepting", then only mark the accepting state as
911 consistent.
912 (initialize_LA): Tell state_lookahead_tokens_count whether
913 lr.default_rules is "accepting".
914 * src/tables.c (action_row): If lr.default_rules is not "all",
915 then disable default rules in inconsistent states.
916 * src/print.c (print_reductions): Use this opportunity to
917 perform some assertions about whether lr.default_rules was
918 obeyed correctly.
919 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
920 helps with checking the parser tables for a grammar.
921 * tests/input.at (%define lr.default_rules invalid values): New
922 test group.
923 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
924 AT_TEST_TABLES_AND_PARSE.
925 (`no %define lr.default_rules'): New test group generated by
926 AT_TEST_LR_DEFAULT_RULES.
927 (`%define lr.default_rules "all"'): Likewise.
928 (`%define lr.default_rules "consistent"'): Likewise.
929 (`%define lr.default_rules "accepting"'): Likewise.
930
931 2009-04-20 Akim Demaille <demaille@gostai.com>
932
933 Formatting change.
934
935 2009-04-20 Akim Demaille <demaille@gostai.com>
936
937 bison: factoring.
938 * src/output.c (token_definitions_output): Use symbol_id_get
939 instead of duplicating its logic.
940 * TODO (YYERRCODE): Extend.
941
942 2009-04-20 Akim Demaille <demaille@gostai.com>
943
944 variables: prefer error-verbose to error_verbose.
945 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
946 instead of error_verbose.
947 * src/scan-gram.l (%error-verbose): Map to the error-verbose
948 variable.
949 * doc/bison.texinfo: Promote %define error-verbose instead of
950 %error-verbose.
951 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
952
953 2009-04-15 Akim Demaille <demaille@gostai.com>
954
955 variables: accept dashes.
956 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
957 underscores.
958 * src/scan-gram.l ({id}): Also accept dashes after the initial
959 letter.
960 ({directive}): Use {id}.
961 * src/parse-gram.y: Comment and formatting changes.
962 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
963 symbols.
964 * src/complain.h, src/complain.c (yacc_at): New.
965 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
966 symbol names.
967 * src/output.c (token_definitions_output): Do not #define token
968 names with dashes.
969
970 2009-04-20 Akim Demaille <demaille@gostai.com>
971
972 Consistently refer to Yacc, not YACC.
973 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
974
975 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
976
977 Pacify make maintainer-check-posix.
978 * tests/input.at (%define, --define): Move bison command-line
979 options before grammar file name.
980
981 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
982
983 Document semicolon warnings.
984 * NEWS (2.5): Here.
985
986 2009-04-14 Akim Demaille <demaille@gostai.com>
987
988 variables: use `parse.assert' instead of `assert'.
989 * TODO (assert): Remove.
990 * data/bison.m4 (b4_assert_if): Replace with...
991 (b4_parse_assert_if): this.
992 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
993 * doc/bison.texinfo (Decl Summary): Document parse.assert.
994
995 2009-04-14 Akim Demaille <demaille@gostai.com>
996
997 variables: use `parse.trace' instead of `debug'.
998 * src/getargs.c (getargs): Map -t to %define trace.parse.
999 * src/scan-gram.l (%debug): Map to %define trace.parse.
1000 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1001 names to `_' in macro names.
1002 (b4_debug_if): Replace with...
1003 (b4_parse_trace_if): this.
1004 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1005 * data/yacc.c: Adjust.
1006 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1007 Use @code to label the variable list.
1008 Document the variable parse.trace.
1009 (Tracing): Promote the parse.trace variable.
1010 * TODO: %printer is not documented.
1011
1012 2009-04-14 Akim Demaille <demaille@gostai.com>
1013
1014 doc: minor fixes.
1015 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1016 (Table of Symbols): Remove duplicate entry for %debug.
1017
1018 2009-04-10 Eric Blake <ebb9@byu.net>
1019
1020 submodules: update to latest
1021 * submodules/autoconf: Use latest upstream Autoconf.
1022
1023 2009-04-06 Eric Blake <ebb9@byu.net>
1024
1025 Work around autoconf 2.63b bug in testsuite.
1026 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1027 autoconf bug related to # in test.
1028
1029 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1030
1031 * NEWS (2.5): New section. Describe new -D/--define feature.
1032
1033 2009-04-06 Akim Demaille <demaille@gostai.com>
1034
1035 Regen.
1036 * src/parse-gram.h, src/parse-gram.c: Regen.
1037
1038 2009-04-06 Akim Demaille <demaille@gostai.com>
1039
1040 rename muscle_tab.* as muscle-tab.* for consistency.
1041 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1042 * src/muscle-tab.h, src/muscle-tab.c: these.
1043 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1044 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1045
1046 2009-04-06 Akim Demaille <demaille@gostai.com>
1047
1048 Makefile: introduce $(BISON).
1049 * src/local.mk (BISON): New.
1050 (YACC): Use it.
1051
1052 2009-04-06 Akim Demaille <demaille@gostai.com>
1053
1054 parser: handle %locations as %define locations.
1055 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1056 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1057 to set "locations" to true.
1058 * src/output.c (prepare): Don't output "locations".
1059 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1060 * src/parse-gram.y: It's no longer a token.
1061 Don't handle it.
1062 * data/bison.m4 (b4_locations_if): Define it with
1063 b4_percent_define_if_define.
1064 * data/c.m4, data/glr.cc: Adjust.
1065
1066 2009-04-06 Akim Demaille <demaille@gostai.com>
1067
1068 Regen.
1069 * src/parse-gram.c: Regen.
1070
1071 2009-04-06 Akim Demaille <demaille@gostai.com>
1072
1073 muscle: factor the handling of obsolete of obsolete directives.
1074 Suggested by Joel E. Denny.
1075
1076 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1077 New, extracted from...
1078 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1079 Remove it.
1080 (prologue_declaration: "%<flag>"): Use
1081 muscle_percent_define_ensure.
1082 (%error-verbose, %pure-parser): No longer tokens.
1083 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1084
1085 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1086
1087 Fix options documentation.
1088 * build-aux/cross-options.pl: As in --help output, write optional
1089 arguments as [=ARG] not =[ARG].
1090 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1091
1092 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1093
1094 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1095 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1096 requirements for a correct m4 are stricter.
1097 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1098 * configure.ac: Update to use AC_PROG_GNU_M4.
1099 Reported by Eric Blake.
1100
1101 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1102
1103 Help with updating web manual.
1104 * HACKING: Incorporate instructions from gnulib/doc/README.
1105 * bootstrap.conf (gnulib_modules): Add gendocs.
1106
1107 2009-04-03 Akim Demaille <demaille@gostai.com>
1108
1109 Regen.
1110 * src/parse-gram.h, src/parse-gram.c: Regen.
1111
1112 2009-04-03 Akim Demaille <demaille@gostai.com>
1113
1114 Factor %FLAG at scan level.
1115 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1116 definitions and associated rules, replaced by....
1117 (PERCENT_FLAG): this new token type, and rule.
1118 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1119 Use it for %debug and %error-verbose.
1120
1121 2009-04-03 Akim Demaille <demaille@gostai.com>
1122
1123 Regen.
1124 * src/parse-gram.h, src/parse-gram.c: Regen.
1125
1126 2009-04-03 Akim Demaille <demaille@gostai.com>
1127
1128 Treat %debug as %define debug.
1129 * data/bison.m4 (b4_debug_if): New.
1130 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1131 * data/lalr1.java: Use it instead of b4_debug_flag.
1132 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1133 * src/output.c (prepare): Don't output it.
1134 * src/parse-gram.y: Treat %debug as %define debug.
1135
1136 2009-04-03 Akim Demaille <demaille@gostai.com>
1137
1138 Treat %error-verbose as %define error_verbose.
1139 This allows to pass -Derror_verbose on the command line. Better
1140 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1141 ERROR_VERBOSE being defined as false or true.
1142 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1143 on b4_percent_define_ifdef, for does not check the defined value,
1144 but only whether the symbol is defined, rely on
1145 b4_percent_define_flag_if, so that a value of "false" is processed
1146 as a false.
1147 If not defined, define the flag to "false".
1148 (b4_error_verbose_if): New.
1149 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1150 b4_error_verbose_flag.
1151 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1152 * src/output.c (prepare): Don't output it.
1153 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1154
1155 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1156
1157 Fix strange %define locations for default values.
1158 Reported by Akim Demaille at
1159 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1160 and discussed again starting at
1161 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1162 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1163 because location information is bogus.
1164 Use angle brackets to delimit fake file name because square brackets
1165 look like underexpanded m4. Choose a better fake file name.
1166 Use negative line numbers.
1167 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1168 * src/location.c (location_print): If line for a boundary is negative,
1169 only print that boundary's file name.
1170 * src/location.h: Document that.
1171 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1172 defaults): Update output.
1173
1174 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1175
1176 Pacify ./configure --enable-gcc-warnings.
1177 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1178 in lib won't compile with it.
1179 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1180
1181 2009-03-31 Akim Demaille <demaille@gostai.com>
1182
1183 bootstrap: --help to stdout.
1184 * bootstrap (usage): Don't send --help to stderr.
1185 Use a here doc instead of a long string.
1186
1187 2009-03-31 Akim Demaille <demaille@gostai.com>
1188
1189 bootstrap: README-hacking no longer exists
1190 * bootstrap (checkout_only_file): Set to HACKING.
1191
1192 2009-03-26 Akim Demaille <demaille@gostai.com>
1193
1194 doc: merge HACKING and README-hacking.
1195 Two files is confusing.
1196 Reported by Alexandre Duret-Lutz.
1197
1198 * README-hacking: Merge into...
1199 * HACKING (Working from the repository): here.
1200
1201 2009-03-26 Akim Demaille <demaille@gostai.com>
1202
1203 doc: update README-hacking.
1204 * README-hacking: We now use git and git submodules.
1205 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1206
1207 2009-03-26 Akim Demaille <demaille@gostai.com>
1208
1209 lalr1.cc: avoid GCC 4.3 warnings.
1210 GCC 4.3 now warns about "a || b && c" and asks for explicit
1211 parentheses.
1212 Reported by Alexandre Duret-Lutz.
1213 * data/location.cc: Update copyright years.
1214 (Position::operator==): Use parens to make precedence explicit.
1215 Compare lines and columns first, as they are more likely to be
1216 different, and they are faster to compare.
1217
1218 2009-03-26 Akim Demaille <demaille@gostai.com>
1219
1220 gnulib: update.
1221 * gnulib: Update to latest.
1222 * src/local.mk (AM_CFLAGS): Move to...
1223 * Makefile.am: here.
1224 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1225 AM_CFLAGS.
1226
1227 2009-03-02 Akim Demaille <demaille@gostai.com>
1228
1229 Comment changes.
1230
1231 2009-03-02 Akim Demaille <demaille@gostai.com>
1232
1233 Share b4_yytranslate_define.
1234 * data/lalr1.cc (b4_yytranslate_define): Move to...
1235 * data/c++.m4: here.
1236
1237 2009-03-02 Akim Demaille <demaille@gostai.com>
1238
1239 Use locations in the variant example.
1240 Yes, this obfuscates the point of this example, variants only.
1241 But glr.cc cannot work (yet?) without locations. This change
1242 makes it easier to use this example with glr.cc.
1243
1244 * examples/variant.yy (assert): %define it.
1245 (locations): Request them.
1246 (yylex): Bind the location to the stage.
1247
1248 2009-03-02 Akim Demaille <demaille@gostai.com>
1249
1250 Dub make_TOKEN as a public type interface.
1251 * data/c++.m4 (b4_symbol_constructor_declare)
1252 (b4_symbol_constructor_define): New empty stubs.
1253 (b4_public_types_declare, b4_public_types_define): Use them.
1254 * data/lalr1.cc (b4_symbol_constructor_declare)
1255 (b4_symbol_constructor_declare_)
1256 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1257 Move to...
1258 * data/variant.hh: here.
1259 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1260 needed.
1261 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1262 b4_symbol_constructor_declare, as it is now done by
1263 b4_public_types_define and b4_public_types_declare.
1264
1265 2009-03-02 Akim Demaille <demaille@gostai.com>
1266
1267 Coding style changes.
1268 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1269 (b4_symbol_constructor_declarations)
1270 (b4_symbol_constructor_definition_)
1271 (b4_symbol_constructor_definitions)
1272 (b4_yytranslate_definition): Rename as...
1273 (b4_symbol_constructor_declare_)
1274 (b4_symbol_constructor_declare)
1275 (b4_symbol_constructor_define_)
1276 (b4_symbol_constructor_define)
1277 (b4_yytranslate_define): these.
1278 * data/variant.hh (b4_variant_definition): Rename as...
1279 (b4_variant_define): this.
1280
1281 2009-03-02 Akim Demaille <demaille@gostai.com>
1282
1283 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1284 * data/bison.m4 (b4_percent_define_if_define): New.
1285 * data/c++.m4 (b4_variant_if): Move to...
1286 * data/bison.m4: Here, using b4_percent_define_if_define.
1287 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1288 * data/bison.m4: Here, using b4_percent_define_if_define.
1289
1290 2009-03-02 Akim Demaille <demaille@gostai.com>
1291
1292 Dub symbol_type_base as a public type.
1293 * data/c++.m4 (b4_public_types_declare): Now define
1294 symbol_type_base and symbol_type.
1295 (b4_public_types_define): New.
1296 In both cases, the definitions are taken verbatim from lalr1.cc.
1297 * data/lalr1.cc: Adjust.
1298
1299 2009-03-02 Akim Demaille <demaille@gostai.com>
1300
1301 b4_public_types_declare.
1302 * data/c++.m4 (b4_public_types_declare): New.
1303 * data/glr.cc, data/lalr1.cc: Use it.
1304
1305 2009-03-02 Akim Demaille <demaille@gostai.com>
1306
1307 b4_semantic_type_declare.
1308 * data/c++.m4 (b4_semantic_type_declare): New.
1309 Factors and generalizes what was in glr.cc and lalr1.cc.
1310 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1311 variants.
1312 * data/lalr1.cc, data/glr.cc: Use it.
1313
1314 2009-02-26 Akim Demaille <demaille@gostai.com>
1315
1316 Upgrade gnulib.
1317 * gnulib: Upgrade from master.
1318 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1319 Regen.
1320
1321 2009-02-25 Akim Demaille <demaille@gostai.com>
1322
1323 Remove useless arguments.
1324 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1325 relevant.
1326
1327 2009-02-25 Akim Demaille <demaille@gostai.com>
1328
1329 Comment changes.
1330 * data/lalr1.cc: here.
1331
1332 2009-02-25 Akim Demaille <demaille@gostai.com>
1333
1334 Fix glr.cc's debug level handling.
1335 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1336 glr.c which is used.
1337 (debug_level, set_debug_level): Adjust.
1338
1339 2009-02-25 Akim Demaille <demaille@gostai.com>
1340
1341 Copyright years.
1342 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1343
1344 2009-02-25 Akim Demaille <demaille@gostai.com>
1345
1346 Style changes.
1347 * etc/bench.pl.in (generate_grammar_list): Consitently use
1348 location_type, not yy::location.
1349
1350 2009-02-25 Akim Demaille <demaille@gostai.com>
1351
1352 Comment change.
1353 * data/lalr1.cc: here.
1354
1355 2009-02-19 Akim Demaille <demaille@gostai.com>
1356
1357 Make yyparser::error public.
1358 * data/lalr1.cc: here.
1359 There is no good reason to keep it private (and it is convenient
1360 to use it from the scanner for instance). It is already public in
1361 glr.cc.
1362
1363 2009-02-19 Akim Demaille <demaille@gostai.com>
1364
1365 Comment changes.
1366 * data/glr.cc: here.
1367
1368 2009-02-19 Akim Demaille <demaille@gostai.com>
1369
1370 Remove trailing blanks.
1371 The epilogue has its own ending \n, no need to add another.
1372
1373 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1374 epilogue.
1375 * data/glr.cc: dnl when extending the epilogue.
1376 Remove stray "private:".
1377
1378 2009-02-19 Akim Demaille <demaille@gostai.com>
1379
1380 Use b4_c_modern.
1381 * data/c.m4 (b4_c_function_decl): Here.
1382
1383 2009-02-19 Akim Demaille <demaille@gostai.com>
1384
1385 Comment changes.
1386 * data/lalr1.cc: here.
1387
1388 2009-02-19 Akim Demaille <demaille@gostai.com>
1389
1390 Extract variant.hh
1391 * data/variant.hh: New, extracted from...
1392 * data/lalr1.cc: here.
1393 Adjust.
1394 * data/local.mk: Adjust.
1395
1396 2009-02-19 Akim Demaille <demaille@gostai.com>
1397
1398 Extract stack.hh from lalr1.cc.
1399 * data/stack.hh: New.
1400 * data/lalr1.cc: Extract from here.
1401 * data/local.mk: Adjust.
1402
1403 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1404
1405 Add reminder about uploading public key to keys.gnupg.net.
1406 * HACKING (Release Procedure): Here.
1407
1408 2009-01-28 Akim Demaille <demaille@gostai.com>
1409
1410 * NEWS: Update information about 2.4.1 and 2.4.2.
1411
1412 2008-11-04 Akim Demaille <demaille@gostai.com>
1413
1414 Reformat NEWS.
1415 * NEWS: Use more outline-mode markup.
1416 Suggested by Jim Meyering.
1417
1418 2009-01-08 Akim Demaille <demaille@gostai.com>
1419
1420 Fix grep portability issues.
1421 Grep on Solaris does not support -q.
1422 Reported by Summum Bonum.
1423
1424 * NEWS: Add a stub for 2.4.2.
1425 * THANKS: Add Summum Bonum.
1426 * tests/atlocal.in (EGREP): New.
1427 (CC, CXX, XSLTPROC): Make it possible to override them via
1428 envvars.
1429 * tests/java.at: Use $EGREP instead of egrep.
1430 Use AT_CHECK's ignore instead of grep's -q.
1431
1432 2008-12-11 Akim Demaille <demaille@gostai.com>
1433
1434 Pass the token type to yysyntax_error.
1435 * data/yacc.c (yysyntax_error): Take the transated token instead
1436 of the raw number.
1437 Adjust callers.
1438 * TODO: Update.
1439
1440 2008-12-11 Akim Demaille <demaille@gostai.com>
1441
1442 Formatting changes.
1443 * data/glr.c: Formatting changes.
1444
1445 2008-12-11 Akim Demaille <demaille@gostai.com>
1446
1447 Propagate i18n changes into glr.c.
1448 * TODO: Update.
1449 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1450 building the error message format dynamically.
1451 * data/lalr1.java: Formatting changes.
1452
1453 2008-12-11 Akim Demaille <demaille@gostai.com>
1454
1455 Use testsuite -C.
1456 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1457 Solves problems when top_srcdir is an absolute path.
1458 Suggested by Eric Blake.
1459 * configure.ac: Require Autoconf 2.62.
1460
1461 2008-12-11 Akim Demaille <demaille@gostai.com>
1462
1463 Simplify the i18n of the error messages.
1464 * data/lalr1.cc: Comment changes.
1465 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1466 lalr1.cc instead of building dynamically the format string.
1467
1468 2008-12-08 Akim Demaille <demaille@gostai.com>
1469
1470 Fix portability issue in the test suite.
1471 * tests/local.at (AT_MATCHES_CHECK): New.
1472 Based on Perl instead of Sed. Sed has too many portability
1473 pitfalls, not ever Sed is GNU Sed.
1474 * tests/actions.at (Fix user actions without a trailing semicolon):
1475 Use it.
1476
1477 2008-12-08 Akim Demaille <demaille@gostai.com>
1478
1479 Update data/README.
1480 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1481
1482 2008-12-08 Akim Demaille <demaille@gostai.com>
1483
1484 Install autoconf as a submodule to get m4sugar.
1485 * .gitmodules: Add submodules/autoconf.
1486 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1487 submodules/autoconf.
1488
1489 2008-12-08 Akim Demaille <demaille@gostai.com>
1490
1491 Test token.prefix in all the skeletons.
1492 * data/java.m4 (b4_token_enum): Use the token.prefix.
1493 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1494 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1495 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1496 * tests/java.at: Comment changes.
1497 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1498 (Java parser class and package names): Add token.prefix check.
1499
1500 2008-12-08 Akim Demaille <demaille@gostai.com>
1501
1502 Fix regeneration of atconfig.
1503 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1504 remove it: now that there is no tests/Makefile.am, the top-level
1505 Makefile properly updates atconfig when needed.
1506
1507 2008-12-07 Di-an Jan <dianj@freeshell.org>
1508
1509 Implement the FIXME that ends an user action with a semicolon
1510 if it seems necessary.
1511 * src/scan-code.l (flex rules section): Flag cpp directive from
1512 any `#' to the first unescaped end-of-line. Semicolon is not
1513 needed after `;', `{', '}', or cpp directives and is needed after
1514 any other token (whitespaces and comments have no effect).
1515 * tests/actions.at (Fix user actions without a trailing semicolon):
1516 New test.
1517 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1518 to make user actions complete statements.
1519 Adjust column numbers in error messages.
1520 * tests/regression.at (Fix user actions without a trailing semicolon):
1521 Remove. Covered by new test.
1522
1523 2008-12-07 Akim Demaille <demaille@gostai.com>
1524
1525 Update gnulib.
1526 * gnulib: Update from master.
1527
1528 2008-12-05 Eric Blake <ebb9@byu.net>
1529
1530 Avoid compiler warning.
1531 * src/output.c (muscle_insert_item_number_table): Delete unused
1532 function.
1533
1534 2008-12-02 Eric Blake <ebb9@byu.net>
1535
1536 Build testsuite with newer autoconf.
1537 * tests/output.at (m4_expand): Don't override in newer autoconf,
1538 where the underlying implementation changed.
1539 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1540 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1541 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1542 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1543 since some of them contain unbalanced ')'.
1544
1545 2008-12-01 Akim Demaille <demaille@gostai.com>
1546
1547 Use b4_symbol for printers and destructors everywhere.
1548 * data/bison.m4 (b4_symbol_action_location): New.
1549 * data/c.m4 (b4_symbol_actions): Remove.
1550 Adjust all callers to use by b4_symbol_foreach and the corresponding
1551 b4_symbol_printer/destructor macro.
1552 * data/glr.cc: Adjust.
1553 * data/lalr1.java: Adjust the %destructor sanity check.
1554 * src/output.c (symbol_code_props_output): Remove, we no longer
1555 need the b4_symbol_printers/destructors tables.
1556
1557 2008-12-01 Akim Demaille <demaille@gostai.com>
1558
1559 Use b4_symbol_case_.
1560 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1561 b4_symbol_case_.
1562
1563 2008-12-01 Akim Demaille <demaille@gostai.com>
1564
1565 Move b4_symbol based macro to bison.m4.
1566 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1567 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1568 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1569 (b4_type_foreach): Move to...
1570 * data/bison.m4: Here.
1571 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1572 b4_symbol_value_template instead of b4_symbol_value.
1573
1574 2008-12-01 Akim Demaille <demaille@gostai.com>
1575
1576 b4_symbol/type_foreach.
1577 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1578 Use them.
1579
1580 2008-12-01 Akim Demaille <demaille@gostai.com>
1581
1582 Use the symbol properties to output the printer/destructor for lalr1.cc.
1583 Instead of defining complex list of tuples to define various
1584 properties of the symbols, we now prefer to define symbols as
1585 "structs" in m4: using the symbol key (its number), and the
1586 property name, b4_symbol gives it value. Use this to handle
1587 destructors and printers.
1588
1589 * src/output.c (CODE_PROP): New.
1590 (prepare_symbol_definitions): Use it to define the printer and
1591 destructor related attributes of the symbols.
1592 * data/lalr1.cc (b4_symbol_actions): Rename as...
1593 (b4_symbol_action): this.
1594 Use b4_symbol instead of 6 arguments.
1595 (b4_symbol_printer, b4_symbol_destructor): New.
1596 Use them instead of b4_symbol_actions.
1597
1598 2008-12-01 Akim Demaille <demaille@gostai.com>
1599
1600 Avoid capturing variables too easily.
1601 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1602 v__ and p__ instead of v and p.
1603
1604 2008-12-01 Akim Demaille <demaille@gostai.com>
1605
1606 Remove spurious empty line before syncline.
1607 * data/bison.m4 (b4_syncline): Don't output an empty line before
1608 the output.
1609
1610 2008-11-26 Akim Demaille <demaille@gostai.com>
1611
1612 Convert lib/Makefile.am into lib/local.mk.
1613 The real problem is rather gnulib.mk, which itself is extracted
1614 from a Makefile.am that gnulib expects to the "recursive". The
1615 tool prefix-gnulib-mk converts such a gnulib.mk to be
1616 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1617
1618 * etc/prefix-gnulib-mk: New.
1619 * bootstrap (slurp): Use it to convert further gnulib.mk.
1620 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1621 are deeper.
1622 * lib/Makefile.am: Rename as...
1623 * lib/local.mk: this.
1624 Adjust to be prefixed.
1625 * Makefile.am, configure.ac: Adjust.
1626 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1627
1628 2008-11-26 Akim Demaille <demaille@gostai.com>
1629
1630 s/_FLAGS/FLAGS/.
1631 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1632 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1633 Reported by Eric Blake.
1634
1635 2008-11-26 Akim Demaille <demaille@gostai.com>
1636
1637 Use b4_parser_tables_define in glr.cc.
1638 * data/glr.c: Use b4_parser_tables_define instead of defining the
1639 (deterministic integral) tables by hand.
1640
1641 2008-11-26 Akim Demaille <demaille@gostai.com>
1642
1643 Use b4_parser_tables_define in Java.
1644 * data/java.m4 (b4_typed_parser_table): Rename as...
1645 (b4_typed_parser_table_define): this, for consistency.
1646 Accept a comment as $4.
1647 Move $2 into yy*_.
1648 (b4_integral_parser_table): Rename as...
1649 (b4_integral_parser_table_define): this.
1650 * data/lalr1.java: Adjust all uses.
1651 Use b4_parser_tables_define instead of generation by hand.
1652
1653 2008-11-26 Akim Demaille <demaille@gostai.com>
1654
1655 Prepare the convergence bw C style and Java table generation.
1656 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1657 (b4_tables_define): Rename as...
1658 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1659 (b4_parser_tables_define): these.
1660 * data/c.m4 (b4_table_define): Rename as...
1661 (b4_integral_parser_table_define): this.
1662 * data/lalr1.cc: Adjust.
1663 (b4_table_define, b4_table_declare): Rename as...
1664 (b4_integral_parser_table_define)
1665 (b4_integral_parser_table_declare): these.
1666 (yyrline_): Move the comment where it is actually used.
1667 * data/yacc.c: Adjust.
1668 (yyrline): Use b4_integral_parser_table_define.
1669
1670 2008-11-26 Akim Demaille <demaille@gostai.com>
1671
1672 Regen.
1673 * src/parse-gram.h, src/parse-gram.c: Regen.
1674
1675 2008-11-26 Akim Demaille <demaille@gostai.com>
1676
1677 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1678 * data/lalr1.cc (b4_tables_map): Move to...
1679 * data/bison.m4: here.
1680 Update the comment for yytable during the flight.
1681 (b4_tables_declare, b4_tables_define): New.
1682 * data/lalr1.cc: Use them.
1683 * data/c.m4 (b4_table_define): New.
1684 * data/yacc.c: Use b4_tables_define instead of output the tables
1685 by hand.
1686 * tests/regression.at (Web2c Actions): Adjust the expected output,
1687 the order of the tables changed.
1688
1689 2008-11-26 Akim Demaille <demaille@gostai.com>
1690
1691 Get rid of (yy)rhs and (yy)prhs.
1692 These tables are no longer needed in the parsers, and they don't seem to
1693 be useful. They are not documented either.
1694
1695 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1696 Adjust the computation of (yy)r2.
1697
1698 2008-11-26 Akim Demaille <demaille@gostai.com>
1699
1700 Rule length is unsigned.
1701 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1702
1703 2008-11-26 Akim Demaille <demaille@gostai.com>
1704
1705 Get rid of lalr1-split.cc.
1706 It was no longer maintainer.
1707
1708 * data/lalr1-split.cc: Remove.
1709 * etc/bench.pl.in (bench_fusion_parser): Remove.
1710 Adjust.
1711
1712 2008-11-26 Akim Demaille <demaille@gostai.com>
1713
1714 Use yy* consistently.
1715 * data/glr.c: Now that yyrhs no longer exists as a global
1716 variable, rename local "rhs" variables into "yyrhs" for
1717 consistency.
1718
1719 2008-11-25 Akim Demaille <demaille@gostai.com>
1720
1721 Get rid of yyrhs and yyprhs in glr.c.
1722 * data/glr.c (yyrhs, yyprhs): Remove.
1723 Instead, use the state stack and yystos.
1724
1725 2008-11-25 Akim Demaille <demaille@gostai.com>
1726
1727 Flag glr tests.
1728 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1729 as an Autotest keyword.
1730
1731 2008-11-25 Akim Demaille <demaille@gostai.com>
1732
1733 Prefer TESTSUITE_FLAGS.
1734 TESTSUITEFLAGS is barely readable.
1735
1736 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1737 for backward compatibility.
1738 Use the former instead of the latter.
1739
1740 2008-11-25 Akim Demaille <demaille@gostai.com>
1741
1742 Get rid of yyrhs and yyprhs in larl1.java.
1743 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1744 (yy_reduce_print): Rather, use yystos_ and the state stack.
1745
1746 2008-11-25 Akim Demaille <demaille@gostai.com>
1747
1748 Formatting changes.
1749
1750 2008-11-25 Akim Demaille <demaille@gostai.com>
1751
1752 Get rid of yyrhs and yyprhs in yacc.c.
1753 They were used to get the symbol types, given a rule number, when
1754 displaying the top of the stack before a reduction. But the
1755 symbol type is available from the state stack. This has two be
1756 benefits: two tables less in the parser (making it smaller), and a
1757 more consistent use of the three stacks which will help to fuse
1758 them.
1759
1760 * data/yacc.c (yyprhs, yyrhs): Remove.
1761 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1762 (yy_reduce_print): Take yyssp as argument.
1763 Use it, together with yystos, to get the symbol type.
1764 * tests/regression.at (Web2c Report): Remove these tables from the
1765 expected output.
1766
1767 2008-11-25 Akim Demaille <demaille@gostai.com>
1768
1769 b4_tables_map.
1770 The point is to factor the generation of the tables across skeletons.
1771 This is language dependant.
1772
1773 * data/c.m4 (b4_comment_): New.
1774 Should be usable to define how to generate tables independently of
1775 the language.
1776 (b4_c_comment): New.
1777 (b4_comment): Bounce to b4_c_comment.
1778 Now support $2 = [PREFIX] for indentation.
1779 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1780 there is no comment.
1781 Indent it properly when there is one.
1782 Output the ending semicolon.
1783 (b4_table_define): Space changes.
1784 Output the ending semicolon.
1785 (b4_tables_map): New.
1786 Use it twice instead of declaring and defining the (integral)
1787 tables by hand.
1788
1789 2008-11-25 Akim Demaille <demaille@gostai.com>
1790
1791 b4_table_declare.
1792 * data/lalr1.cc (b4_table_declare): New.
1793 Use it to declare the tables defined with b4_table_define.
1794 (b4_table_define): Declare a third arg to match b4_table_declare
1795 signature.
1796 Move all the comments around invocations of b4_table_define into
1797 the invocations itselves.
1798 Move things around to have the order for declarations and
1799 definitions.
1800
1801 2008-11-25 Akim Demaille <demaille@gostai.com>
1802
1803 Formatting changes.
1804 * data/lalr1.java: here.
1805
1806 2008-11-25 Akim Demaille <demaille@gostai.com>
1807
1808 b4_args is more general than only C++.
1809 * data/lalr1.cc (b4_args, _b4_args): Move to...
1810 * data/bison.m4: here.
1811
1812 2008-11-21 Di-an Jan <dianj@freeshell.org>
1813
1814 Implement no-XXX arguments for --warnings, --report, --trace.
1815 * src/getargs.c (flags_argmatch): Handles no-XXX.
1816 Fix typo in doxygen comment.
1817
1818 2008-11-21 Akim Demaille <demaille@gostai.com>
1819
1820 Display the changes in cross-options.texi.
1821 * build-aux/cross-options.pl ($sep): New, to separate items.
1822 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1823 changes.
1824
1825 2008-11-20 Di-an Jan <dianj@freeshell.org>
1826
1827 Improves options in the manual.
1828 * doc/bison.texinfo (-g, -x): Add space before argument.
1829 (Option Cross Key): Implement FIXME: listing directives also.
1830 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1831 (Short Option): Special case -d. Put arguments inside @option.
1832 (Bison Directive): Add column, automatically extracted from
1833 src/scan-gram.l (actual name passed as the first argument)
1834 with special case for %define.
1835 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1836 to build-aux/cross-options.pl.
1837 * src/getargs.c (usage): Document limitations of cross-options.pl.
1838 * src/scan-gram.l: Likewise.
1839
1840 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1841
1842 Fix unexpanded macros in GLR defines file.
1843 Reported by Csaba Raduly at
1844 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1845 * THANKS (Csaba Raduly): Add.
1846 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1847 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1848 lexer in a separate module that includes the defines file.
1849 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1850 source.
1851 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1852 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1853 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1854 (AT_DATA_SOURCE_PROLOGUE): New.
1855 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1856 (AT_DATA_SOURCE): New.
1857 (AT_FULL_COMPILE): Extend to support an additional source file.
1858
1859 2008-11-18 Akim Demaille <demaille@gostai.com>
1860
1861 More TODO.
1862 * TODO: More short term issues.
1863
1864 2008-11-18 Akim Demaille <demaille@gostai.com>
1865
1866 Regen.
1867 * src/parse-gram.h, src/parse-gram.c: Regen.
1868
1869 2008-11-18 Akim Demaille <demaille@gostai.com>
1870
1871 Use b4_subtract where possible.
1872 * data/lalr1.cc (b4_subtract): Move to...
1873 * data/bison.m4: here.
1874 * data/glr.c (b4_rhs_data): Use it.
1875 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1876
1877 2008-11-18 Akim Demaille <demaille@gostai.com>
1878
1879 Remove incorrect mode specification.
1880 * data/glr.cc: Don't pretend it's C code.
1881
1882 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1883
1884 Simplify last patch slightly.
1885 * src/getargs.c (getargs): Here.
1886
1887 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1888
1889 Fix last warning from --enable-gcc-warnings.
1890 * src/getargs.c (getargs): Don't assign const address to non-const
1891 pointer.
1892
1893 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1894
1895 Don't let maintainer-*-check targets force a version update.
1896 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1897 handled.
1898
1899 2008-11-17 Di-an Jan <dianj@freeshell.org>
1900
1901 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1902 Align menus. Adjust word wrapping. Use node names for menu names.
1903 (Examples): Don't abbreviate node names.
1904 (LocalWords): Remove abbreviations.
1905 (Copying): Make description a sentence.
1906 (Java Action Features): Remove period to match the rest of menu.
1907
1908 2008-11-17 Di-an Jan <dianj@freeshell.org>
1909
1910 Handles several --enable-gcc-warnings.
1911 * src/getargs.c (command_line_location): Set parameters to void.
1912 * src/output.c (symbol_type_name_cmp): Make static.
1913 (symbols_by_type_name): Set parameters to void.
1914 (symbol_definitions_output): Remove unused parameter. Rename as...
1915 (prepare_symbol_definitions): this.
1916 (muscles_output): Move symbol_definitions_output to...
1917 (output): here as prepare_symbol_definitions.
1918 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1919 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1920
1921 2008-11-17 Di-an Jan <dianj@freeshell.org>
1922
1923 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1924 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1925
1926 2008-11-16 Akim Demaille <demaille@gostai.com>
1927
1928 Add missing $(EXEEXT).
1929 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1930 "src/bison$(EXEEXT)".
1931 Reported by Di-an Jan.
1932
1933 2008-11-15 Akim Demaille <demaille@gostai.com>
1934
1935 * TODO: Update.
1936
1937 2008-11-15 Akim Demaille <demaille@gostai.com>
1938
1939 Formatting changes.
1940 * tests/input.at: here.
1941
1942 2008-11-15 Akim Demaille <demaille@gostai.com>
1943
1944 Remove duplicate header inclusion.
1945 * src/LR0.c: here.
1946
1947 2008-11-15 Akim Demaille <demaille@gostai.com>
1948
1949 * src/parse-gram.h, src/parse-gram.c: Regen.
1950
1951 2008-11-15 Akim Demaille <demaille@gostai.com>
1952
1953 Support parametric types.
1954
1955 There are two issues to handle: first scanning nested angle
1956 bracket pairs to support types such as std::pair< std::string,
1957 std::list<std::string> > >.
1958
1959 Another issue is to address idiosyncracies of C++: do not glue two
1960 closing angle brackets together (otherwise it's operator>>), and
1961 avoid sticking blindly a TYPE to the opening <, as it can result
1962 in '<:' which is a digraph for '['.
1963
1964 * src/scan-gram.l (brace_level): Rename as...
1965 (nesting): this.
1966 (SC_TAG): New.
1967 Implement support for complex tags.
1968 (tag): Accept
1969 , but not <.
1970 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1971 (b4_symbol_variant): Leave space around types as parameters.
1972 * examples/variant.yy: Use nested template types and leading ::.
1973 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1974 Rename as...
1975 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1976 * tests/c++.at: Test parametric types.
1977
1978 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1979
1980 Test token.prefix.
1981 This is not sufficient, but we test at least that the make_SYMBOL
1982 interface is not affected by token.prefix. A more general test
1983 will be implemented when the support of token.prefix is generalized
1984 to more skeletons.
1985
1986 * tests/c++.at: One more variant test, using token.prefix.
1987
1988 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1989
1990 Test the make_TOKEN interface.
1991 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1992 Factor the common code in yylex.
1993 Use it to test "%define lex_symbol".
1994
1995 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1996
1997 Formatting change.
1998
1999 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2000
2001 Simplify code for variants bench marks.
2002 * etc/bench.pl.in (&generate_grammar_list): Define and use
2003 location_type.
2004 Factor the common code in yylex.
2005
2006 2008-11-15 Akim Demaille <demaille@gostai.com>
2007
2008 Better error message.
2009 * bootstrap (find_tool): Fix the error message.
2010
2011 2008-11-15 Akim Demaille <demaille@gostai.com>
2012
2013 Update variant.yy to newest interface.
2014 * examples/variant.yy: Define lex_symbol.
2015 Adjust.
2016
2017 2008-11-15 Akim Demaille <demaille@gostai.com>
2018
2019 Don't use locations in variant.yy.
2020 * examples/variant.yy: Adjust to not using locations.
2021
2022 2008-11-15 Akim Demaille <demaille@gostai.com>
2023
2024 Comment changes.
2025 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2026 comments for the license.
2027
2028 2008-11-15 Akim Demaille <demaille@gostai.com>
2029
2030 Remove tests/Makefile.am.
2031 * tests/Makefile.am: Rename as...
2032 * tests/local.mk: this.
2033 * Makefile.am, configure.ac: Adjust.
2034 * Makefile.am (DISTCLEANFILES): Define.
2035 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2036 Remove, we no longer need to bounce to the real targets.
2037
2038 2008-11-15 Akim Demaille <demaille@gostai.com>
2039
2040 Comment changes.
2041
2042 2008-11-15 Akim Demaille <demaille@gostai.com>
2043
2044 djgpp/local.mk.
2045 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2046 * djgpp/local.mk: this new file.
2047
2048 2008-11-15 Akim Demaille <demaille@gostai.com>
2049
2050 Remove doc/Makefile.am.
2051 * doc/Makefile.am: Rename as...
2052 * doc/local.mk: this.
2053 Adjust paths
2054 * Makefile.am, configure.ac: Adjust.
2055 * Makefile.am (MOSTLYCLEANFILES): New.
2056 * src/local.mk: Adjust.
2057
2058 2008-11-15 Akim Demaille <demaille@gostai.com>
2059
2060 Move sc_tight_scope into maint.mk.
2061 It does not work, and I don't know how it was supposed to work: it
2062 seems to be looking for sources in the build tree. I just moved
2063 it at a better place, fixing it is still required.
2064
2065 * src/local.mk (echo): Remove.
2066 (sc_tight_scope): Move to...
2067 * maint.mk: here.
2068
2069 2008-11-15 Akim Demaille <demaille@gostai.com>
2070
2071 Regen.
2072 * src/parse-gram.h, src/parse-gram.h: Regen.
2073
2074 2008-11-15 Akim Demaille <demaille@gostai.com>
2075
2076 Remove src/Makefile.am.
2077 * src/Makefile.am: Rename as...
2078 * src/local.mk: this.
2079 Prefix all the paths with src/.
2080 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2081 (AM_CPPFLAGS): Find find in builddir/src.
2082 (YACC): Move the flags into...
2083 (AM_YFLAGS): here.
2084 * maint.mk (sc_tight_scope): Disable.
2085 It used to bounce to the version in src/Makefile.am which is now
2086 part of this very Makefile.
2087 * Makefile.am, configure.ac: Adjust.
2088 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2089 include "..." to find files "here": we are no longer in src/, so
2090 qualify the includes with src/.
2091 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2092 prefix.
2093 (.x.1): Adjust to be able to create src/foo from the top level
2094 Makefile, instead of going bounce to src/Makefile the creation of
2095 foo.
2096
2097 2008-11-15 Akim Demaille <demaille@gostai.com>
2098
2099 Remove useless variable.
2100 * doc/Makefile.am (srcsrcdir): Remove.
2101
2102 2008-11-15 Akim Demaille <demaille@gostai.com>
2103
2104 Remove data/Makefile.am.
2105 * data/Makefile.am: Rename as...
2106 * data/local.mk: this.
2107 Adjust paths.
2108 * Makefile.am, configure.ac: Adjust.
2109
2110 2008-11-15 Akim Demaille <demaille@gostai.com>
2111
2112 Remove etc/Makefile.am.
2113 * etc/Makefile.am: Rename as...
2114 * etc/local.mk: this.
2115 Adjust.
2116 * Makefile.am, configure.ac: Adjust.
2117
2118 2008-11-15 Akim Demaille <demaille@gostai.com>
2119
2120 Remove examples/local.mk.
2121 examples/calc++/Makefile.am might be interesting to keep as is, since
2122 it is an example in itself.
2123
2124 * examples/Makefile.am: Rename as...
2125 * examples/local.mk: this.
2126 Adjust.
2127 * Makefile.am, configure.ac: Adjust.
2128
2129 2008-11-15 Akim Demaille <demaille@gostai.com>
2130
2131 Remove build-aux/Makefile.am.
2132 Recursive Makefiles are really way too slow, let's get rid of some of
2133 them.
2134
2135 * build-aux/Makefile.am: Rename as...
2136 * build-aux/local.mk: this.
2137 Adjust paths.
2138 * Makefile.am, configure.ac: Adjust.
2139
2140 2008-11-15 Akim Demaille <demaille@gostai.com>
2141
2142 Provide convenience constructors for locations and positions.
2143 * data/location.cc (position::position): Accept file, line and
2144 column as arguments with default values.
2145 Always qualify initial line and column literals as unsigned.
2146 (location::location): Provide convenience constructors.
2147
2148 2008-11-15 Akim Demaille <demaille@gostai.com>
2149
2150 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2151 token type.
2152 Using template buys us nothing, and makes it uselessly complex to
2153 construct a symbol. Besides, it could not be generalized to other
2154 languages, while make_FOO would work in C/Java etc.
2155
2156 * data/lalr1.cc (b4_symbol_): New.
2157 (b4_symbol): Use it.
2158 (b4_symbol_constructor_declaration_)
2159 (b4_symbol_constructor_definition_): Instead of generating
2160 specializations of an overloaded template function, just generate
2161 several functions whose names are forged from the token names
2162 without the token.prefix.
2163 (b4_symbol_constructor_declarations): Generate them for all the
2164 symbols, not just by class of symbol type, now that instead of
2165 specializing a function template by the token, we generate a
2166 function named after the token.
2167 (b4_symbol_constructor_specialization_)
2168 (b4_symbol_constructor_specializations): Remove.
2169 * etc/bench.pl.in: Adjust to this new API.
2170
2171 2008-11-13 Akim Demaille <demaille@gostai.com>
2172
2173 %define token.prefix.
2174 Provide a means to add a prefix to the name of the tokens as
2175 output in the generated files. Because of name clashes, it is
2176 good to have such a prefix such as TOK_ that protects from names
2177 such as EOF, FILE etc. But it clutters the grammar itself.
2178
2179 * data/bison.m4 (token.prefix): Empty by default.
2180 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2181 * data/lalr1.cc (b4_symbol): Ditto.
2182
2183 2008-11-13 Akim Demaille <demaille@gostai.com>
2184
2185 Compute at M4 time some of the subtractions.
2186 * data/lalr1.cc (b4_subtract): New.
2187 (b4_rhs_data): Use it.
2188
2189 2008-11-13 Akim Demaille <demaille@gostai.com>
2190
2191 symbol::token.
2192 This allows the user to get the type of a token returned by yylex.
2193
2194 * data/lalr1.cc (symbol::token): New.
2195 (yytoknum_): Define when %define lex_symbol, independently of
2196 %debug.
2197 (yytoken_number_): Move into...
2198 (symbol::token): here, since that's the only use.
2199 The other one is YYPRINT which was not officially supported
2200 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2201 array under a different name (yytoknum).
2202
2203 2008-11-13 Akim Demaille <demaille@gostai.com>
2204
2205 YYERRCODE.
2206 * TODO (YYERRCODE): Mention the case of $undef.
2207
2208 2008-11-13 Akim Demaille <demaille@gostai.com>
2209
2210 TODO: YYPRINT.
2211 * TODO (YYPRINT): New.
2212
2213 2008-11-13 Akim Demaille <demaille@gostai.com>
2214
2215 Comment changes.
2216 * data/lalr1.cc, data/yacc.c: Fix the description of the
2217 yytranslate and yytoknum tables.
2218
2219 2008-11-13 Akim Demaille <demaille@gostai.com>
2220
2221 Define make_symbol in the header.
2222 To reach good performances these functions should be inlined (yet
2223 this is to measure precisely). To this end they must be available
2224 to the caller.
2225
2226 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2227 location_type with the class name.
2228 Since will now be output in the header, declare "inline".
2229 No longer use b4_symbol_constructor_specializations, but
2230 b4_symbol_constructor_definitions in the header.
2231 Don't call it in the *.cc file.
2232
2233 2008-11-13 Akim Demaille <demaille@gostai.com>
2234
2235 Define yytranslate in the header for lex_symbol.
2236 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2237 into the header file when using %define lex_symbol.
2238 (yytranslate_): Declare inline.
2239
2240 2008-11-13 Akim Demaille <demaille@gostai.com>
2241
2242 Define the constructors of symbol_type in
2243 b4_symbol_constructor_definitions.
2244 The constructors are called by the make_symbol functions, which a
2245 forthcoming patch will move elsewhere. Hence the interest of
2246 putting them together.
2247
2248 The stack_symbol_type does not need to be moved, it is used only
2249 by the parser.
2250
2251 * data/lalr1.cc: Move symbol_type and symbol_base_type
2252 constructors into...
2253 (b4_symbol_constructor_definitions): here.
2254 Adjust.
2255
2256 2008-11-13 Akim Demaille <demaille@gostai.com>
2257
2258 Make it easier to move the definition of yytranslate_.
2259 Forthcoming changes will make it possible to use yytranslate_
2260 from outside the parser implementation file.
2261
2262 * data/lalr1.cc (b4_yytranslate_definition): New.
2263 Use it.
2264
2265 2008-11-13 Akim Demaille <demaille@gostai.com>
2266
2267 Remove useless class specification.
2268 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2269 to refer to the class name to use a type defined by the class for
2270 arguments of member functions.
2271
2272 2008-11-13 Akim Demaille <demaille@gostai.com>
2273
2274 Finer input type for yytranslate.
2275 This patch is debatable: the tradition expects yylex to return an int
2276 which happens to correspond to token_number (which is an enum). This
2277 allows for instance to return characters (such as '*' etc.). But this
2278 goes against the stronger typing I am trying to have with the new
2279 lex interface which return a symbol_type. So in this case, feed
2280 yytranslate_ with a token_type.
2281
2282 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2283 expect a token_type.
2284
2285 2008-11-13 Akim Demaille <demaille@gostai.com>
2286
2287 Honor lex-params in %define lex_symbol mode.
2288 * data/lalr1.cc: Use b4_lex_param.
2289
2290 2008-11-13 Akim Demaille <demaille@gostai.com>
2291
2292 Simplify names.
2293 * src/output.c (symbol_definitions_output): Rename symbol
2294 attributes type_name and has_type_name as type and has_type.
2295 * data/lalr1.cc: Adjust uses.
2296
2297 2008-11-13 Akim Demaille <demaille@gostai.com>
2298
2299 Use b4_type_names for the union type.
2300 The union used to compute the size of the variant used to iterate
2301 over the type of all the symbols, with a lot of redundancy. Now
2302 iterate over the lists of symbols having the same type-name.
2303
2304 * data/lalr1.cc (b4_char_sizeof_): New.
2305 (b4_char_sizeof): Use it.
2306 Adjust to be called with a list of numbers instead of a single
2307 number.
2308 Adjust its caller for new-line issues.
2309
2310 2008-11-13 Akim Demaille <demaille@gostai.com>
2311
2312 Define the "identifier" of a symbol.
2313 Symbols may have several string representations, for instance if
2314 they have an alias. What I call its "id" is a string that can be
2315 used as an identifier. May not exist.
2316
2317 Currently the symbols which have the "tag_is_id" flag set are
2318 those that don't have an alias. Look harder for the id.
2319
2320 * src/output.c (is_identifier): Move to...
2321 * src/symtab.c (is_identifier): here.
2322 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2323 * src/output.c (symbol_definitions_output): Use it to define "id"
2324 and "has_id".
2325 Remove the definition of "tag_is_id".
2326 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2327 "tag_is_id" were used to produce code.
2328 We still use "tag" for documentation.
2329
2330 2008-11-11 Akim Demaille <demaille@gostai.com>
2331
2332 Locations are no longer required by lalr1.cc.
2333 * data/lalr1.cc (_b4_args, b4_args): New.
2334 Adjust all uses of locations to make them optional.
2335 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2336 (AT_CHECK_NAMESPACE): Check the use of locations.
2337 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2338 without locations with lalr1.cc.
2339 Test these cases.
2340 * tests/output.at: Check lalr1.cc with and without location
2341 support.
2342 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2343 Don't use locations.
2344
2345 2008-11-11 Akim Demaille <demaille@gostai.com>
2346
2347 AT_FULL_COMPILE.
2348 * tests/local.at (AT_FULL_COMPILE): New.
2349 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2350
2351 2008-11-11 Akim Demaille <demaille@gostai.com>
2352
2353 Support parens in calc++.
2354 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2355 * examples/calc++/test (run): Check the expected output.
2356 Adjust callers.
2357 Check parens too.
2358
2359 2008-11-11 Akim Demaille <demaille@gostai.com>
2360
2361 Simplify lalr1.cc since %defines is mandatory.
2362 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2363
2364 2008-11-11 Akim Demaille <demaille@gostai.com>
2365
2366 TODO: yyfmt.
2367 * TODO (yysyntax_error): New item.
2368
2369 2008-11-11 Akim Demaille <demaille@gostai.com>
2370
2371 Prefer M4 to CPP.
2372 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2373 YYERROR_VERBOSE.
2374
2375 2008-11-11 Akim Demaille <demaille@gostai.com>
2376
2377 Support i18n of the parse error messages.
2378 * TODO (lalr1.cc/I18n): Remove.
2379 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2380 error messages, as done in yacc.c.
2381 Stay within the yy* pseudo namespace.
2382
2383 2008-11-11 Akim Demaille <demaille@gostai.com>
2384
2385 More TODO.
2386 * TODO (single stack, yysyntax_error): New.
2387
2388 2008-11-11 Akim Demaille <demaille@gostai.com>
2389
2390 Make it possible to return a symbol_type from yylex.
2391 * data/lalr1.cc (b4_lex_symbol_if): New.
2392 (parse): When lex_symbol is defined, expected yylex to return the
2393 complete lookahead.
2394 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2395 yylex interface.
2396 (bench_variant_parser): Exercise it.
2397
2398 2008-11-11 Akim Demaille <demaille@gostai.com>
2399
2400 Remove useless bench case.
2401 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2402 no longer used.
2403
2404 2008-11-11 Akim Demaille <demaille@gostai.com>
2405
2406 Improve display of directives.
2407 * etc/bench.pl.in (parse_term): Don't add useless eol.
2408
2409 2008-11-11 Akim Demaille <demaille@gostai.com>
2410
2411 Use string_cast in the bench.
2412 * etc/bench.pl.in (generate_grammar_list): Define and use
2413 string_cast.
2414
2415 2008-11-11 Akim Demaille <demaille@gostai.com>
2416
2417 Replace yychar with a Boolean.
2418 * data/lalr1.cc (parse::yychar): Replace by...
2419 (parse::yyempty): this.
2420
2421 2008-11-11 Akim Demaille <demaille@gostai.com>
2422
2423 Factor the tables.
2424 * TODO: New item.
2425
2426 2008-11-11 Akim Demaille <demaille@gostai.com>
2427
2428 Let yytranslate handle the eof case.
2429 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2430 Adjust callers.
2431 No longer expect yychar to be equal to yyeof_, rather, test the
2432 lookahead's (translated) kind.
2433
2434 2008-11-11 Akim Demaille <demaille@gostai.com>
2435
2436 yychar cannot be empty in yyerrlab.
2437 * TODO (yychar == yyempty_): New.
2438 * data/lalr1.cc: Remove the handling of this case.
2439 This eases forthcoming changes related to yychar and yytranslate.
2440
2441 2008-11-11 Akim Demaille <demaille@gostai.com>
2442
2443 Bench: syntactic sugar for %define/#define.
2444 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2445 (&bench_push_parser, bench_variant_parser): Use this feature.
2446 (&eat): New.
2447 Use it.
2448
2449 2008-11-11 Akim Demaille <demaille@gostai.com>
2450
2451 Less memory pressure on the "list" bench.
2452 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2453 the values, to limit memory pressure.
2454
2455 2008-11-11 Akim Demaille <demaille@gostai.com>
2456
2457 Introduce make_symbol.
2458 make_symbol provides a means to construct a full symbol (kind,
2459 value, location) in a single shot. It is meant to be a Symbol
2460 constructor, parameterized by the symbol kind so that overloading
2461 would prevent incorrect kind/value pairs. Unfortunately
2462 parameterized constructors do not work well in C++ (unless the
2463 parameter also appears as an argument, which is not acceptable),
2464 hence the use of a function instead of a constructor.
2465
2466 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2467 (b4_symbol_constructor_declarations)
2468 (b4_symbol_constructor_specialization_)
2469 (b4_symbol_constructor_specializations)
2470 (b4_symbol_constructor_definition_)
2471 (b4_symbol_constructor_definitions): New.
2472 Use them where appropriate to generate declaration, declaration of
2473 the specializations, and implementations of the templated
2474 overloaded function "make_symbol".
2475 (variant::variant): Always define a default ctor.
2476 Also provide a copy ctor.
2477 (symbol_base_type, symbol_type): New ctor overloads for value-less
2478 symbols.
2479 (symbol_type): Now public, so that functions such as yylex can use
2480 it.
2481
2482 2008-11-11 Akim Demaille <demaille@gostai.com>
2483
2484 Inform m4 whether a tag is a valid id.
2485 * src/output.c (is_identifier): New.
2486 (symbol_definitions_output): Use it to define tag_is_id.
2487 But maybe this should be done at m4 level?
2488
2489 2008-11-11 Akim Demaille <demaille@gostai.com>
2490
2491 Test 214 was failing: it greps with a pattern containing [ ]*
2492 which obviously meant to catch spaces and tabs, but contained only
2493 spaces. Tabulations in sources are a nuisance, so to simplify the
2494 matter, get rid of all the tabulations in the Java sources. The
2495 other skeletons will be treated equally later.
2496
2497 * data/java.m4, data/lalr1.java: Untabify.
2498 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2499 tabulations are no longer generated.
2500
2501 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2502
2503 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2504 * configure.ac: Adjust usage.
2505 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2506 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2507 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2508
2509 2008-11-10 Di-an Jan <dianj@freeshell.org>
2510
2511 Workaround Java's ``code too large'' problem for parser tables
2512 in most cases, by using one function per initialization.
2513 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2514 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2515 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2516 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2517 (yytname_): Use b4_typed_parser_table.
2518 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2519 ``code too large'' error.
2520
2521 2008-11-10 Di-an Jan <dianj@freeshell.org>
2522
2523 * NEWS: Document them.
2524
2525 General Java skeleton improvements.
2526 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2527 using gcj < 4.3 in the testsuite, according to comments in
2528 gnulib/m4/javacomp.m4.
2529 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2530 location_type, position_type): Remove extraneous brackets from
2531 b4_percent_define_default.
2532 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2533 m4_define and m4_define_default.
2534 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2535 which marks the end of user code with appropriate syncline, like all
2536 the other skeletons.
2537 (b4_user_post_prologue): Add. Don't silently drop.
2538 (yylex): Remove.
2539 (parse): Inline yylex.
2540 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2541 (%{...%}): Fix typo of %code imports.
2542 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2543
2544 Support annotations on parser class with %define annotations.
2545 * data/lalr1.java (annotations): Add to parser class modifier.
2546 * doc/bison.texinfo (Java Parser Interface): Document
2547 %define annotations.
2548 (Java Declarations Summary): Document %define annotations.
2549 * tests/java.at (Java parser class modifiers): Test annotations.
2550
2551 Do not generate code for %error-verbose unless requested.
2552 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2553 Make private. Make conditional on %error-verbose.
2554 (getErrorVerbose, setErrorVerbose): New.
2555 (yytnamerr_): Make conditional on %error-verbose.
2556 (yysyntax_error): Make some code conditional on %error-verbose.
2557 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2558 about %error-verbose having no effect.
2559 (getErrorVerbose, setErrorVerbose): Document.
2560
2561 Move constants for token names to Lexer interface.
2562 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2563 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2564 (parse): Qualify EOF to Lexer.EOF.
2565 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2566 EOF and token names to Java Lexer Interface.
2567 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2568
2569 Make yyerror public.
2570 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2571 (yyerror): Change to public. Add Javadoc comments. Use longer
2572 parameter names. Make the body rather than the declarator
2573 conditional on %locations.
2574 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2575
2576 Allow user to add code to the constructor with %code init.
2577 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2578 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2579 Add %code init to the front of the constructor body.
2580 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2581 and %define init_throws.
2582 (Java Declarations Summary): Document %code init and
2583 %define init_throws.
2584 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2585 (Java constructor init and init_throws): Add tests.
2586
2587 2008-11-10 Akim Demaille <demaille@gostai.com>
2588
2589 Update TODO.
2590 * TODO (-D): is implemented.
2591 (associativity): Same precedence must have the same associativity.
2592 For instance, how can a * b / c be parsed if * is %left and / is
2593 %right?
2594 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2595
2596 2008-11-10 Akim Demaille <demaille@gostai.com>
2597
2598 Formatting changes.
2599
2600 2008-11-10 Akim Demaille <demaille@gostai.com>
2601
2602 More information about the symbols.
2603 * src/output.c (type_names_output): Document all the symbols,
2604 including those that don't have a type-name.
2605 (symbol_definitions_output): Define "is_token" and
2606 "has_type_name".
2607 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2608 type-name, now that they are defined too in b4_type_names.
2609
2610 2008-11-10 Akim Demaille <demaille@gostai.com>
2611
2612 Regen.
2613
2614 2008-11-10 Akim Demaille <demaille@gostai.com>
2615
2616 Make parser::yytranslate static.
2617 Small speedup (1%) on the list grammar. And makes yytranslate_
2618 available in non member functions.
2619
2620 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2621 function.
2622
2623 2008-11-10 Akim Demaille <demaille@gostai.com>
2624
2625 Avoid trailing spaces.
2626 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2627 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2628 they can be empty, and anyway this incorrectly indents the first
2629 action.
2630
2631 2008-11-10 Akim Demaille <demaille@gostai.com>
2632
2633 Comment changes.
2634
2635 2008-11-10 Akim Demaille <demaille@gostai.com>
2636
2637 Use "enum" for integral constants.
2638 This is just nicer to read, I observed no speedup.
2639
2640 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2641 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2642 (yyuser_token_number_max_, yyundef_token_): Move into...
2643 (yytranslate_): here.
2644
2645 2008-11-10 Akim Demaille <demaille@gostai.com>
2646
2647 Shortcuts in bench directives.
2648 * etc/bench.pl.in (parse_dirs): New.
2649 Use it.
2650 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2651 Create the benches in "benches/".
2652
2653 2008-11-10 Akim Demaille <demaille@gostai.com>
2654
2655 Formatting changes.
2656 * data/lalr1.cc: here.
2657
2658 2008-11-10 Akim Demaille <demaille@gostai.com>
2659
2660 Adjust verbose message to using emacs.
2661 * etc/bench.pl.in: Inform compilation-mode when we change the
2662 directory.
2663 (generate_grammar_list): Recognize %define "variant" in addition
2664 to %define variant.
2665
2666 2008-11-10 Akim Demaille <demaille@gostai.com>
2667
2668 Classify symbols by type-name.
2669 * src/uniqstr.h (UNIQSTR_CMP): New.
2670 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2671 (type_names_output): New.
2672 (muscles_output): Use it.
2673 * data/lalr1.cc (b4_symbol_action_): Remove.
2674 (b4_symbol_case_, b4_type_action_): New.
2675 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2676
2677 2008-11-10 Akim Demaille <demaille@gostai.com>
2678
2679 Change the handling of the symbols in the skeletons.
2680 Before we were using tables which lines were the symbols and which
2681 columns were things like number, tag, type-name etc. It is was
2682 difficult to extend: each time a column was added, all the numbers had
2683 to be updated (you asked for colon $2, not for "tag"). Also, it was
2684 hard to filter these tables when only a subset of the symbols (say the
2685 tokens, or the nterms, or the tokens that have and external number
2686 *and* a type-name) was of interest.
2687
2688 Now instead of monolithic tables, we define one macro per cell. For
2689 instance "b4_symbol(0, tag)" is a macro name which contents is
2690 self-decriptive. The macro "b4_symbol" provides easier access to
2691 these cells.
2692
2693 * src/output.c (type_names_output): Remove.
2694 (symbol_numbers_output, symbol_definitions_output): New.
2695 (muscles_output): Call them.
2696 (prepare_symbols): Define b4_symbols_number.
2697
2698 2008-11-10 Akim Demaille <demaille@gostai.com>
2699
2700 --trace=muscles
2701 * src/getargs.h, src/getargs.c (trace_muscle): New.
2702 (trace_types, trace_args): Support it.
2703 * src/output.c (output_skeleton): Use it.
2704
2705 2008-11-10 Akim Demaille <demaille@gostai.com>
2706
2707 muscles_output.
2708 * src/output.c (muscles_output): New, extracted from...
2709 (output_skeleton): here.
2710 Adjust.
2711
2712 2008-11-10 Akim Demaille <demaille@gostai.com>
2713
2714 Formatting changes.
2715
2716 2008-11-10 Akim Demaille <demaille@gostai.com>
2717
2718 Update the variant example.
2719 * examples/variant.yy: Formatting changes.
2720 One stage build.
2721
2722 2008-11-10 Akim Demaille <demaille@gostai.com>
2723
2724 Support constructor with an argument.
2725 This improves the "list" bench by 2%.
2726
2727 * data/lalr1.cc (variant::build): Add an overloaded version with
2728 an argument.
2729 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2730
2731 2008-11-10 Akim Demaille <demaille@gostai.com>
2732
2733 Test variants.
2734 * tests/c++.at (AT_CHECK_VARIANTS): New.
2735 Use it with and without %define assert.
2736
2737 2008-11-10 Akim Demaille <demaille@gostai.com>
2738
2739 Add %precedence support.
2740 Unfortunately it is not possible to reuse the %prec directive. This
2741 is because to please POSIX, we do not require to end the rules with a
2742 semicolon. As a result,
2743
2744 foo: bar %prec baz
2745
2746 is ambiguous: either a rule which precedence is that of baz, or a rule,
2747 and then a declaration of the precedence of the token baz.
2748
2749 * doc/bison.texinfo: Document %precedence.
2750 (Precedence Only): New.
2751 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2752 * src/conflicts.c (resolve_sr_conflict): Support it.
2753 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2754 Parse it.
2755 * tests/calc.at: Use %precedence for NEG.
2756 * tests/conflicts.at (%precedence does not suffice)
2757 (%precedence suffices): New tests.
2758
2759 2008-11-09 Akim Demaille <demaille@gostai.com>
2760
2761 Make benches in a sub dirs.
2762 * etc/bench.pl.in ($dir): New.
2763 Use it.
2764 Check the use of constructors with an argument.
2765 (bench_variant_parser): Fix.
2766
2767 2008-11-09 Akim Demaille <demaille@gostai.com>
2768
2769 fix eof condition
2770
2771 2008-11-09 Akim Demaille <demaille@gostai.com>
2772
2773 Fix --help.
2774
2775 2008-11-09 Akim Demaille <demaille@gostai.com>
2776
2777 Require the generation of parse-gram.output.
2778 * src/Makefile.am (YACC): Pass --report=all.
2779
2780 2008-11-09 Akim Demaille <demaille@gostai.com>
2781
2782 Formatting changes.
2783
2784 2008-11-09 Akim Demaille <demaille@gostai.com>
2785
2786 Update TODO.
2787 * TODO: Remove obsolete items.
2788 Update others.
2789
2790 2008-11-09 Akim Demaille <demaille@gostai.com>
2791
2792 Enhance bench.pl.
2793 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2794 (@token, $grammar, $bench): New.
2795 (generate_grammar_variant): Rename as...
2796 (generate_grammar_list): this.
2797 (generate_grammar): Adjust.
2798 (bench_grammar): Rename as...
2799 (bench): this.
2800 Use it in the various bench-marking routines.
2801 (-b, -g): New options.
2802
2803 2008-11-09 Akim Demaille <demaille@gostai.com>
2804
2805 Use a static hierarchy for symbols in the C++ parser.
2806 * data/lalr1.cc (symbol_base_type, symbol_type)
2807 (stack_symbol_type): Make it a static hierarchy.
2808 Adjust dependencies.
2809
2810 2008-11-09 Akim Demaille <demaille@gostai.com>
2811
2812 bench.pl -d, --directive.
2813 * etc/bench.pl.in (@directive): New.
2814 (&bench_grammar): Use it.
2815 (&bench_list_grammar): New, to provide access to the "variant"
2816 grammar.
2817 Use it.
2818 (getopts): Support -d, --directive.
2819
2820 2008-11-09 Akim Demaille <demaille@gostai.com>
2821
2822 Use inline for small operations.
2823 * data/lalr1.cc (symbol_base_type, symbol_type)
2824 (stack_symbol_type): Declare constructor and other operations as
2825 inline.
2826 (yy_destroy_): Inline.
2827
2828 2008-11-09 Akim Demaille <demaille@gostai.com>
2829
2830 Introduce a hierarchy for symbols.
2831 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2832 (data_type): Rename as...
2833 (stack_symbol_type): this.
2834 Derive from symbol_base_type.
2835 (yy_symbol_value_print_): Merge into...
2836 (yy_symbol_print_): this.
2837 Rename as...
2838 (yy_print_): this.
2839 (yydestruct_): Rename as...
2840 (yy_destroy_): this.
2841 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2842 (parser::parse): yyla is now of symbol_type.
2843 Use its type member instead of yytoken.
2844
2845 2008-11-09 Akim Demaille <demaille@gostai.com>
2846
2847 Rename data_type and stack_symbol_type.
2848 * data/lalr1.cc (data_type): Rename as...
2849 (stack_symbol_type): this.
2850
2851 2008-11-09 Akim Demaille <demaille@gostai.com>
2852
2853 Handle semantic value and location together.
2854 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2855 yydata.value and yydata.location.
2856 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2857 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2858 single arg.
2859 Adjust all callers.
2860 (yydestruct_): New overload for a stack symbol.
2861
2862 2008-11-09 Akim Demaille <demaille@gostai.com>
2863
2864 Push a complete symbol, not connected parts.
2865 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2866 state, value and location.
2867 Adjust callers.
2868
2869 2008-11-09 Akim Demaille <demaille@gostai.com>
2870
2871 Agregate yylval and yylloc.
2872 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2873 (parser::yyla): this.
2874
2875 2008-11-09 Akim Demaille <demaille@gostai.com>
2876
2877 Rely on the state stack to display reduction traces.
2878 To display rhs symbols before a reduction, we used information
2879 about the rule reduced, which required the tables yyrhs and
2880 yyprhs. Now use rely only on the state stack to get the same
2881 information.
2882
2883 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2884 Use them.
2885 (parser::yyrhs_, parser::yyprhs_): Remove.
2886 (parser::yy_reduce_print_): Use the state stack.
2887
2888 2008-11-09 Akim Demaille <demaille@gostai.com>
2889
2890 Fuse yyval and yyloc into yylhs.
2891 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2892 yylhs.
2893 (parse): Replace yyval and yyloc with yylhs.value and
2894 yylhs.location.
2895 After a user action, compute yylhs.state earlier.
2896 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2897 fresh error_token.
2898
2899 2008-11-09 Di-an Jan <dianj@freeshell.org>
2900
2901 Remove unused variable.
2902 * src/output.c (type_names_output): Remove unused variable sep.
2903
2904 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2905
2906 Change tests/output.at quoting.
2907 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2908 expanding arguments.
2909
2910 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2911
2912 Don't add a semicolon to actions for %skeleton or %language.
2913 It breaks Java test cases as reported by Akim Demaille.
2914 * src/scan-code.l: Implement.
2915
2916 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2917
2918 Clean up %skeleton and %language priority implementation.
2919 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2920 remove static qualifier because others will soon need to see it.
2921 (language_prio): Likewise.
2922 (getargs): Use command_line_prio rather than 0.
2923 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2924 enum fields.
2925 (skeleton_prio): Extern it.
2926 (language_prio): Extern it.
2927 * src/parse-gram.y: Use grammar_prio rather than 1.
2928
2929 2008-11-07 Akim Demaille <demaille@gostai.com>
2930
2931 Moving push traces into yypush_.
2932 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2933 Adjust all uses.
2934
2935 2008-11-07 Akim Demaille <demaille@gostai.com>
2936
2937 The single-stack C++ parser is now the standard one.
2938 * data/lalr1.cc: Rename as...
2939 * data/lalr1-split.cc: this.
2940 * data/lalr1-fusion.cc: Rename as...
2941 * data/lalr1.cc: this.
2942 * etc/bench.pl.in: Adjust.
2943
2944 2008-11-07 Akim Demaille <demaille@gostai.com>
2945
2946 Avoid empty-if warnings.
2947 Reported by Quentin Hocquet.
2948
2949 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2950 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2951
2952 2008-11-07 Akim Demaille <demaille@gostai.com>
2953
2954 Pass command line location to skeleton_arg and language_argmatch.
2955 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2956 The location argument is now mandatory.
2957 Adjust all dependencies.
2958 (getargs): Use command_line_location.
2959
2960 2008-11-07 Akim Demaille <demaille@gostai.com>
2961
2962 -D, --define.
2963 * src/getargs.c (usage): Document -D.
2964 Fix help string for --locations.
2965 (command_line_location): New.
2966 (short_options, long_options, getargs): Support -D, --define.
2967 (getargs): Move -d support at the right place.
2968 * doc/bison.texinfo (Bison Options): Update.
2969 * tests/input.at (%define, --define): New.
2970
2971 2008-11-07 Akim Demaille <demaille@gostai.com>
2972
2973 Initialize the muscle table before parsing the command line.
2974 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2975 (getargs): Define file_name.
2976 * src/main.c (main): Initialize muscle_tab before calling
2977 getargs.
2978 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2979 its value is not available yet.
2980
2981 2008-11-07 Akim Demaille <demaille@gostai.com>
2982
2983 Locations without columns for command line arguments.
2984 * src/location.c (location_print): Don't display negative columns.
2985 * src/location.h: Document this.
2986
2987 2008-11-07 Akim Demaille <demaille@gostai.com>
2988
2989 Fix --help.
2990 * src/getargs.c (usage): Fix help string for -W.
2991
2992 2008-11-07 Akim Demaille <demaille@gostai.com>
2993
2994 Handle more general types of option arguments.
2995 * build-aux/cross-options.pl: The argument ends at the first
2996 space, not the first non-symbol character.
2997 Use @var for each word appearing the argument description.
2998
2999 2008-11-07 Akim Demaille <demaille@gostai.com>
3000
3001 Destroy the variants that remain on the stack in case of error.
3002 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3003 destructor.
3004 Display the value only if yymsg is nonnull.
3005 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3006
3007 2008-11-07 Akim Demaille <demaille@gostai.com>
3008
3009 Add "%define assert" to variants.
3010 This is used to help the user catch cases where some value gets
3011 ovewritten by a new one. This should not happen, as this will
3012 probably leak.
3013
3014 Unfortunately this uncovered a bug in the C++ parser itself: the
3015 lookahead value was not destroyed between two calls to yylex. For
3016 instance if the previous lookahead was a std::string, and then an int,
3017 then the value of the std::string was correctly taken (i.e., the
3018 lookahead was now an empty string), but std::string structure itself
3019 was not reclaimed.
3020
3021 This is now done in variant::build(other&) (which is used to take the
3022 value of the lookahead): other is not only stolen from its value, it
3023 is also destroyed. This incurs a new performance penalty of a few
3024 percent, and union becomes faster again.
3025
3026 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3027 (b4_variant_if): New.
3028 (variant::built): New.
3029 Use it whereever the status of the variant changes.
3030 * etc/bench.pl.in: Check the penalty of %define assert.
3031
3032 2008-11-07 Akim Demaille <demaille@gostai.com>
3033
3034 Use "%define variant" in bench.pl.
3035 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3036 just use %define variants.
3037
3038 2008-11-07 Akim Demaille <demaille@gostai.com>
3039
3040 Regen.
3041 * src/parse-gram.h, src/parse-gram.c: Regen.
3042
3043 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3044
3045 Fix user actions without a trailing semicolon.
3046 Reported by Sergei Steshenko at
3047 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3048 * THANKS (Sergei Steshenko): Add.
3049 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3050 * tests/regression.at (Fix user actions without a trailing semicolon):
3051 New test case.
3052
3053 2008-11-04 Akim Demaille <demaille@gostai.com>
3054
3055 Use b4_copyright_years.
3056 * data/yacc.c (b4_copyright_years): New.
3057 Fix its value according to the comments in the file.
3058 Use it and undefine it.
3059
3060 2008-11-04 Akim Demaille <demaille@gostai.com>
3061
3062 Formatting changes.
3063 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3064
3065 2008-11-04 Akim Demaille <demaille@gostai.com>
3066
3067 Formatting changes.
3068 * data/lalr1-fusion.cc: here.
3069
3070 2008-11-04 Akim Demaille <demaille@gostai.com>
3071
3072 Use strict on bench.pl.
3073 * etc/bench.pl.in (&run, &generate_grammar): New.
3074 Rename the grammar generating functions for consistency.
3075 Change the interface so that the list of benches to run is passed
3076 as (optionless) arguments.
3077 (&compile): Use &run.
3078
3079 2008-11-04 Akim Demaille <demaille@gostai.com>
3080
3081 Remove spurious initial empty lines.
3082 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3083 * data/yacc.c: End the @output lines with an @.
3084
3085 2008-11-04 Akim Demaille <demaille@gostai.com>
3086
3087 Improve the display of sizes.
3088 * etc/bench.p.in: Higher precision.
3089 Sort by decreasing size.
3090
3091 2008-11-04 Akim Demaille <demaille@gostai.com>
3092
3093 Don't memcpy C++ structures.
3094 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3095 arguments.
3096 (variant::build): New overload for
3097 copy-construction-that-destroys.
3098 (variant::swap): New.
3099 (parser::yypush_): Use it in variant mode.
3100
3101 2008-11-04 Akim Demaille <demaille@gostai.com>
3102
3103 Better defaults for bench.pl.
3104 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3105 default values.
3106 Adjust &verbose uses.
3107 (-q, --quiet): New.
3108
3109 2008-11-04 Akim Demaille <demaille@gostai.com>
3110
3111 Make variant.yy more complex.
3112 std::list cannot be copied via memcpy, they are more demanding than
3113 std::string. Use one std::list to strengthen the test.
3114
3115 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3116 Adjust.
3117 Create a list of strings, instead of a single large string.
3118
3119 2008-11-04 Akim Demaille <demaille@gostai.com>
3120
3121 bench.pl --bench.
3122 * etc/bench.pl.in (--bench, $bench): New.
3123
3124 2008-11-04 Akim Demaille <demaille@gostai.com>
3125
3126 Sort methods.
3127 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3128 Define it after as().
3129
3130 2008-11-04 Akim Demaille <demaille@gostai.com>
3131
3132 Useless parens.
3133 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3134
3135 2008-11-04 Akim Demaille <demaille@gostai.com>
3136
3137 Issue missing synclines after user actions.
3138 * data/c.m4 (b4_case): Issue synclines on the output file.
3139
3140 2008-11-04 Akim Demaille <demaille@gostai.com>
3141
3142 Remove trailing empty line.
3143 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3144 epilogue.
3145
3146 2008-11-04 Akim Demaille <demaille@gostai.com>
3147
3148 Fix output of copyright years.
3149 * data/bison.m4 (b4_copyright): Fix the indentation of the
3150 copyright year paragraph.
3151 Use b4_copyright_years when no years are given.
3152 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3153 (b4_copyright_years): New.
3154 Use it.
3155
3156 2008-11-04 Akim Demaille <demaille@gostai.com>
3157
3158 Avoid the spurious initial empty line.
3159 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3160 the end of @output request to suppress the empty line that
3161 results.
3162
3163 2008-11-04 Akim Demaille <demaille@gostai.com>
3164
3165 Remove parser::rhs_number_type.
3166 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3167 (yyrhs_): Use b4_table_define.
3168
3169 2008-11-04 Akim Demaille <demaille@gostai.com>
3170
3171 Fix iteration type.
3172 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3173
3174 2008-11-04 Akim Demaille <demaille@gostai.com>
3175
3176 Factor the declaration of the integer tables.
3177 * data/lalr1-fusion.cc (b4_table_define): New.
3178 Use it.
3179
3180 2008-11-03 Akim Demaille <demaille@gostai.com>
3181
3182 Fix indentation of tables in lalr1.cc
3183 * data/lalr1-fusion.cc: Fix the indentation.
3184
3185 2008-11-03 Akim Demaille <demaille@gostai.com>
3186
3187 Destroy the lhs symbols after reduction.
3188 * data/lalr1-fusion.cc (parse): After the user action, when in
3189 variant mode, destroy the lhs symbols.
3190
3191 2008-11-03 Akim Demaille <demaille@gostai.com>
3192
3193 Simplify yysyntax_error_ use.
3194 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3195 type, but make it unnamed in the declaration when it is not used.
3196
3197 2008-11-03 Akim Demaille <demaille@gostai.com>
3198
3199 Let yy::variant::build return an lvalue.
3200 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3201 object.
3202
3203 2008-11-03 Akim Demaille <demaille@gostai.com>
3204
3205 Define yy::variant only when needed.
3206 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3207 used.
3208
3209 2008-11-03 Akim Demaille <demaille@gostai.com>
3210
3211 Bench the three-stack lalr1.cc.
3212 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3213 one-stack one.
3214
3215 2008-11-03 Akim Demaille <demaille@gostai.com>
3216
3217 Fail on parse error in calc++.
3218 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3219 status.
3220 * examples/calc++/test ($me, $number, $exit, run): New.
3221 Use them to propagate errors to the exit status.
3222
3223 2008-11-03 Akim Demaille <demaille@gostai.com>
3224
3225 Don't specify the skeleton twice in the example.
3226 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3227 file does what is needed.
3228
3229 2008-11-03 Akim Demaille <demaille@gostai.com>
3230
3231 bench: Improve output.
3232 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3233
3234 2008-11-03 Akim Demaille <demaille@gostai.com>
3235
3236 bench: check impact of %debug on variants.
3237 * etc/bench.pl.in (variant_grammar): Fix the computation of
3238 $variant.
3239 Generate a grammar file that can work with or without %debug.
3240 Do use the @directive.
3241 (bench_variant_parser): Check impact of %debug.
3242 (@directives): Rename all the occurrences to...
3243 (@directive): this, for consistency.
3244
3245 2008-11-03 Akim Demaille <demaille@gostai.com>
3246
3247 bench: report the size too.
3248 * etc/bench.pl.in ($iterations): Defaults to -3.
3249 (&bench_grammar): Require hireswallclock.
3250 Compute and display the size of the result.
3251 More comments.
3252
3253 2008-11-03 Akim Demaille <demaille@gostai.com>
3254
3255 bench: More use of the verbosity level.
3256 * etc/bench.pl.in ($verbose, &verbose): New.
3257 Use them.
3258 More POD documentation.
3259
3260 2008-11-03 Akim Demaille <demaille@gostai.com>
3261
3262 bench.pl: a command line interface
3263 * etc/bench.pl.in: More doc.
3264 Some fixes in the documentation.
3265 ($cflags, $iterations, &help, &getopt): New.
3266 Use them.
3267 (&variant_grammar): Let the number of stages be 10 times what is
3268 specified.
3269
3270 2008-11-03 Akim Demaille <demaille@gostai.com>
3271
3272 Bench the use of Boost.Variants.
3273 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3274 New.
3275 (&compile): Be ready to compile C++ parsers.
3276 (&bench_push_parser): Move debug information to the outermost
3277 level.
3278 * THANKS: Add Michiel De Wilde.
3279
3280 2008-11-03 Akim Demaille <demaille@gostai.com>
3281
3282 bench.pl: Pass directives as a list instead of as a string.
3283 * etc/bench.pl.in (&directives): New.
3284 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3285 directives.
3286 (&triangular_grammar): Do use the directives (were ignored).
3287 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3288 directives.
3289
3290 2008-11-03 Akim Demaille <demaille@gostai.com>
3291
3292 Improve genericity of bench.pl.
3293 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3294 argument.
3295 (&bench_push_parser): New.
3296 Call it.
3297
3298 2008-11-03 Akim Demaille <demaille@gostai.com>
3299
3300 Add documentation to bench.pl.
3301 * etc/bench.pl.in: Comment changes.
3302
3303 2008-11-03 Akim Demaille <demaille@gostai.com>
3304
3305 Fuse the three stacks into a single one.
3306
3307 In order to make it easy to perform benchmarks to ensure that
3308 there are no performance loss, lalr1.cc is forked into
3309 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3310 lalr1.cc.
3311
3312 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3313 exercized by the test suite, the user must install a symbolic link
3314 from lalr1.cc to it.
3315
3316 Instead of having three stacks (state, value, location), use a
3317 stack of triples. This considerably simplifies the code (and it
3318 will be easier not to require locations as currently does the C++
3319 parser), and also gives a 10% speedup according to
3320 etc/bench (probably mainly since memory allocation is done once
3321 instead of three times).
3322
3323 Another motivation is to make it easier to destruct properly
3324 semantic values: now that they are bound to their state (hence
3325 symbol type) it will be easier to call the appropriate destructor.
3326
3327 These changes should probably benefit the C parser too.
3328
3329 * data/lalr1.cc: Copy as...
3330 * data/lalr1-fusion.cc: this new file.
3331 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3332 from c++.m4.
3333 (state_stack_type, semantic_stack_type, location_stack_type)
3334 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3335 (data_type, stack_type, yystack_): New.
3336 (YYLLOC_DEFAULT, yypush_): Adjust.
3337 (yyerror_range): Now based on data_type, not location_type.
3338
3339 2008-11-03 Akim Demaille <demaille@gostai.com>
3340
3341 Push the state, value, and location at the same time.
3342 This is needed to prepare a forthcoming patch that fuses the three
3343 stacks into one.
3344
3345 * data/lalr1.cc (parser::yypush_): New.
3346 (parser::yynewstate): Change the semantics: instead of arriving to
3347 this label when value and location have been pushed, but yystate
3348 is to be pushed on the state stack, now the three of them must
3349 have been pushed before. yystate still must be the new state.
3350 This allows to use yypush_ everywhere instead of individual
3351 handling of the stacks.
3352
3353 2008-11-03 Akim Demaille <demaille@gostai.com>
3354
3355 Prefer references to pointers.
3356 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3357 definition to use references instead of pointers.
3358 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3359 Take the value and location as references.
3360 Adjust callers.
3361
3362 2008-11-03 Akim Demaille <demaille@gostai.com>
3363
3364 stack::size instead of stack::height.
3365 * data/lalr1.cc (stack::height): Rename as...
3366 (stack::size): this.
3367 Fix the output type.
3368 Comment changes.
3369
3370 2008-11-03 Akim Demaille <demaille@gostai.com>
3371
3372 Use variants to support objects as semantic values.
3373 This patch was inspired by work by Michiel De Wilde. But he used
3374 Boost variants which (i) requires Boost on the user side, (ii) is
3375 slow, and (iii) has useless overhead (the parser knows the type of
3376 the semantic value there is no reason to duplicate this
3377 information as Boost.Variants do).
3378
3379 This implementation reserves a buffer large enough to store the
3380 largest objects. yy::variant implements this buffer. It was
3381 implemented with Quentin Hocquet.
3382
3383 * src/output.c (type_names_output): New.
3384 (output_skeleton): Invoke it.
3385 * data/c++.m4 (b4_variant_if): New.
3386 (b4_symbol_value): If needed, provide a definition for variants.
3387 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3388 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3389 (b4_char_sizeof, yy::variant): New.
3390 (parser::parse): If variants are requested, define
3391 parser::union_type, parser::variant, change the definition of
3392 semantic_type, construct $$ before running the user action instead
3393 of performing a default $$ = $1.
3394 * examples/variant.yy: New.
3395 Based on an example by Michiel De Wilde.
3396
3397 2008-11-03 Akim Demaille <demaille@gostai.com>
3398
3399 Parameterize the extraction of semantic values.
3400 To make future changes easier, no longer rely on ".TYPE" being the
3401 way to get a semantic value.
3402
3403 * data/c.m4 (b4_symbol_value): New.
3404 Use it.
3405 * data/c++.m4, data/yacc.c: Use it.
3406 * data/glr.c: Use b4_symbol_value.
3407 (b4_rhs_data): New.
3408 Use it.
3409
3410 2008-11-03 Akim Demaille <demaille@gostai.com>
3411
3412 Prepare easier M4 changes.
3413 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3414 future changes.
3415
3416 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3417
3418 Initiate further development.
3419 * NEWS: Create an empty section for new entries.
3420 * gnulib: Update submodule to HEAD.
3421
3422 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3423
3424 * NEWS: Version 2.4.
3425
3426 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3427
3428 Prepare for next release.
3429 * NEWS: Briefly mention changes since 2.3b.
3430 * README: Say GNU m4 1.4.6, which we've been requiring in release
3431 announcements already, not 1.4.3, which breaks the build.
3432
3433 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3434
3435 Say %language is experimental.
3436 We're thinking of extending it's effect on output file naming. See the
3437 thread at
3438 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3439 * NEWS: Say it's experimental.
3440 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3441 recommend it over %skeleton for now.
3442 (Bison Options): Likewise.
3443 (C++ Bison Interface): Use %skeleton not %language.
3444 (Calc++ Parser): Use %skeleton not %language.
3445 * src/getargs.c (usage): Say it's experimental.
3446
3447 2008-11-01 Di-an Jan <dianj@freeshell.org>
3448 Paolo Bonzini <bonzini@gnu.org>
3449
3450 Support all Java parser class modifiers.
3451 * data/java.m4 (b4_percent_define_get3): New.
3452 (b4_final_if, b4_strictfp_if): New.
3453 * data/lalr1.java (final, strictfp, extends, implements): Support.
3454 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3455 documentation.
3456 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3457 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3458 (AT_CHECK_JAVA_GREP): New.
3459 (Java parser class modifiers): New test.
3460 (Java parser class extends and implements): New test.
3461
3462 Model exception propagation better with throws and lex_throws.
3463 * data/java.m4 (b4_list2): New.
3464 (throws): Change default.
3465 * data/lalr1.java (yyaction): Add throws.
3466 (parse): Add lex_throws in addition to throws.
3467 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3468 * tests/java.at (Java throws specifications): New test.
3469
3470 Improve documentation for Java parsers.
3471 * doc/bison.texinfo (Java Parsers): Add subsections.
3472 Don't quote first argument of %define.
3473 (Java Bison Interface): Document output files. Move documentation
3474 of parser class and merge into Java Parser Interface. Document
3475 features that error out. Document directives with no effect.
3476 Move note about Javadoc higher.
3477 (Java Semantic Values): Explicitly mention stype.
3478 Document that generic types cannot be used.
3479 (Java Location Values): Use @deftypeivar. Document constructors.
3480 Correct return value for toString.
3481 (Java Parser Interface): List undocumented constants/fields.
3482 Move documentation of fields added by %parse-param closer to list
3483 of members. Document that token names are added as fields.
3484 Document constructors accurately. Remove error method.
3485 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3486 Interface. Describe %code lexer and yylex accutately.
3487 Remove documentation that does not match the code.
3488 (Java Action Features): New.
3489 (Java Differences): Add reference. Add item on semantic values.
3490 Add note about @{ ... @}. Clarify %% epilogue placement.
3491 (Java Declarations Summary): New.
3492
3493 Fix Java skeleton.
3494 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3495 (b4_remove_comma): Quote test argument.
3496 (b4_identification): Remove "bison" field.
3497 * tests/java.at (Java parser class and package names): New test.
3498 (Java %parse-param and %lex-param): New test.
3499 (Java stype, position_class and location_class): New test.
3500
3501 2008-10-31 Di-an Jan <dianj@freeshell.org>
3502
3503 * data/lalr1.jave: Update copyright years.
3504 (YYParser): Correct name of "generated from" file in Javadoc:
3505 use b4_file_name instead of @ofile@.
3506 (Location constructor): Correct Javadoc parameter name.
3507 (yylloc): Add missing opening m4 quote after b4_location_if.
3508 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3509 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3510 (YYParser constructor): Correct Javadoc parameter name.
3511
3512 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3513
3514 Always put auxiliary code files in the same dir as other output files.
3515 * src/files.c (compute_file_name_parts): When the user specifies
3516 --output but not --file-prefix, extract the directory prefix from the
3517 file prefix not from the grammar file name. This affects the location
3518 of files like location.hh generated by the C++ skeleton. The includes
3519 in the other output files require this fix.
3520 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3521 for expected output files.
3522 (Output files): Add a test for the above.
3523
3524 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3525
3526 * gnulib: Update submodule to HEAD.
3527
3528 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3529
3530 Update copyright year.
3531 * src/files.c: Here.
3532
3533 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3534
3535 Don't overwrite the input file.
3536 * src/files.c (output_file_name_check): Fatal error if using input file
3537 for output.
3538 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3539 argument.
3540 (Conflicting output files): Add test.
3541
3542 2008-10-28 Akim Demaille <demaille@gostai.com>
3543
3544 Space changes.
3545 * data/lalr1.cc: Formatting changes.
3546
3547 2008-10-28 Akim Demaille <demaille@gostai.com>
3548
3549 Don't define debugging functions when !YYDEBUG.
3550 * data/lalr1.cc (debug_stream, set_debug_stream)
3551 (debug_level_type, debug_level, set_debug_level): Don't
3552 declare them when YYDEBUG is not defined.
3553 The implementation are already YYDEBUG-aware.
3554
3555 2008-10-28 Akim Demaille <demaille@gostai.com>
3556
3557 Prefer "continue" for empty loop bodies.
3558 * etc/bench.pl.in: Use "continue" instead of {}.
3559
3560 2008-10-28 Akim Demaille <demaille@gostai.com>
3561
3562 Space and comments changes.
3563 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3564 * data/c.m4, data/lalr1.cc: Space changes.
3565
3566 2008-10-28 Akim Demaille <demaille@gostai.com>
3567
3568 Make gnulib a submodule.
3569 * gnulib: New.
3570 * .gitmodules (gnulib): New.
3571
3572 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3573
3574 Fix yyerror_range for user-defined location type in C++. Reported by
3575 Georg Sauthoff at
3576 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3577 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3578 * THANKS (Georg Sauthoff): Add.
3579
3580 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3581
3582 Update several administrative files mainly to facilitate releasing.
3583 * HACKING (Administrivia): Make the git-merge-changelog notes more
3584 helpful.
3585 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3586 (Release Procedure): Update for git and add numerous details that were
3587 previously missing.
3588 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3589 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3590 that announcements don't claim we bootstrapped with whatever bison
3591 happened to be in PATH. Add flex as a bootstrap tool.
3592 * Makefile.maint: Remove, previously replaced by maint.mk.
3593 * Makefile.cfg: Remove, and migrate settings to...
3594 * cfg.mk: ... here for the sake of `make announcement'.
3595 * bootstrap.conf (gnulib_modules): Add announce-gen.
3596 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3597 Berry.
3598
3599 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3600
3601 Small but important bugfixes for the Java skeleton.
3602 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3603 (yy_symbol_print): Call toString on yyvaluep.
3604
3605 2008-08-29 Akim Demaille <demaille@gostai.com>
3606
3607 Clarify UPDATED use.
3608 * doc/bison.texinfo: It refers to the last edition of this file,
3609 not to the release date of Bison.
3610 Reported by Joel E. Denny.
3611
3612 2008-08-29 Akim Demaille <demaille@gostai.com>
3613
3614 * README: Update FAQ pointer.
3615 Reported by Joel E. Denny.
3616
3617 2008-08-27 Eric Blake <ebb9@byu.net>
3618
3619 Resync m4sugar from autoconf.
3620 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3621 (m4_init): Adjust to latest m4.git changes.
3622 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3623 effects.
3624 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3625 (_m4_list_cmp): Reduce side effects.
3626
3627 2008-08-27 Akim Demaille <demaille@gostai.com>
3628
3629 Check yyerrok in calc.at.
3630 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3631 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3632 expected.
3633
3634 2008-08-27 Akim Demaille <demaille@gostai.com>
3635
3636 Support yyerrok in lalr1.cc.
3637 YYBACKUP is still to import back into lalr1.cc.
3638 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3639
3640 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3641
3642 For maintainer-check*, don't recompile for a $(VERSION) update.
3643 * cfg.mk: New file.
3644 (_is-dist-target): Override the one in GNUmakefile.
3645 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3646
3647 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3648
3649 Update for recent change to gnulib.
3650 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3651 string.h now.
3652
3653 2008-08-15 Eric Blake <ebb9@byu.net>
3654
3655 Remaining m4sugar merge from autoconf.
3656 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3657 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3658 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3659 * src/output.c (output_skeleton): Tell m4 how to find it.
3660
3661 Partial m4sugar merge from autoconf: m4_map.
3662 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3663 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3664 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3665 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3666 for empty list.
3667 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3668 Likewise.
3669 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3670 declares it.
3671
3672 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3673
3674 Keep .version and PACKAGE_VERSION in sync.
3675 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3676 dependency, and add comments justifying this in more detail. Discussed
3677 starting at
3678 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3679
3680 2008-08-06 Eric Blake <ebb9@byu.net>
3681
3682 Partial m4sugar merge from autoconf: m4_shiftn.
3683 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3684 (m4_shift2, m4_shift3): New macros.
3685 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3686 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3687 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3688 * data/java.m4 (b4_remove_comma): Likewise.
3689
3690 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3691 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3692 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3693 (m4_init): Consolidate wrapped text into single m4_wrap.
3694 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3695 in wrapped text.
3696
3697 2008-08-05 Eric Blake <ebb9@byu.net>
3698
3699 Partial m4sugar merge from autoconf: builtins, version.m4.
3700 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3701 (m4_prepend): Remove, as it is unused and inherently quadratic,
3702 whereas m4_append is linear in newer m4.
3703 (m4_mkstemp): New builtin.
3704 (m4_symbols): Make rename conditional.
3705 (m4_version_prereq): Ensure fatal error if used in bison, which
3706 intentionally lacks version.m4.
3707
3708 Fix comments in m4sugar.
3709 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3710
3711 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3712
3713 Update for recent .gitignore fix in Gnulib.
3714 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3715 anchored .gitignore entries.
3716
3717 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3718
3719 Set gnu or gnits strictness.
3720 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3721 development and gnits strictness for releases. Based on Eric Blake's
3722 suggestion at
3723 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3724
3725 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3726
3727 * NEWS: Clarify documentation of %language.
3728
3729 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3730
3731 Support usage of git-merge-changelog.
3732 * .gitattributes: New.
3733 * HACKING: Document usage of git-merge-changelog.
3734 * bootstrap: Install git-merge-changelog entries in .git/config
3735 if appropriate.
3736
3737 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3738
3739 Remove remaining dependence on CVS Id keyword.
3740 * ChangeLog: For the sake of people still using CVS, don't use dollars
3741 when mentioning Id.
3742 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3743 unusual anyway.
3744 * data/xslt/xml2dot.xsl: Likewise.
3745 * data/xslt/xml2text.xsl: Likewise.
3746 * data/xslt/xml2xhtml.xsl: Likewise.
3747 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3748 * doc/Makefile.am (neutralize): Remove, no longer needed.
3749 (.x.1): Don't use neutralize.
3750 (edit): Don't substitute for ID.
3751 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3752
3753 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3754
3755 Fix dependence on computed configure variables.
3756 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3757 $(top_srcdir)/configure.ac so that changes to computed variables, such
3758 as PACKAGE_VERSION, are seen.
3759 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3760
3761 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3762
3763 Update copyright dates for recent changes.
3764 * Makefile.am: Here.
3765 * src/Makefile.am: Here.
3766 * src/reduce.c: Here.
3767 * tests/reduce.at: Here.
3768
3769 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3770
3771 Use git-version-gen for version names between releases.
3772 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3773 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3774 * .prev-version: New.
3775 * .version.in: Remove.
3776 * ChangeLog: Remove the Id previously used for capturing the CVS
3777 revision.
3778 * GNUmakefile: Remove, now copied from Gnulib.
3779 * Makefile.am: Add code suggested by comments in
3780 build-aux/git-version-gen.
3781 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3782 .prev-version, and .version.
3783 * NEWS (2.3b+): Rename to...
3784 (?.?): ... this because we're dropping the "+" version naming scheme,
3785 but, in general, we still can't be sure of our next release name.
3786 * bootstrap: Add a quick hack to remove from .gitignore the
3787 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3788 entry. This should really be fixed in gnulib instead.
3789 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3790 * configure.ac (AC_INIT): Set version name by invoking
3791 build-aux/git-version-gen.
3792 (AC_CONFIG_FILES): Remove .version, now generated by
3793 build-aux/git-version-gen.
3794 * maint.mk: New, copied from coreutils.
3795 * doc/.cvsignore (bison.1): Add.
3796 * doc/.gitignore (/bison.1): Add.
3797 * doc/bison.1: Remove, generated.
3798 * src/.cvsignore (revision.c): Remove.
3799 * src/.gitignore (/revision.c): Remove.
3800 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3801 (BUILT_SOURCES): Remove revision.c.
3802 (revision.c): Remove.
3803 * src/getargs.c (version): Don't print revision after the VERSION.
3804 * src/revision.h: Remove.
3805
3806 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3807
3808 Fix untranslatable composition of sentences. Reported by Goran
3809 Uddeborg at
3810 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3811 * THANKS (Goran Uddeborg): Add.
3812 * src/reduce.c (reduce_print): Report the number of nonterminals and
3813 rules useless in the grammar in separate sentences.
3814 * tests/reduce.at (Useless Rules): Update output.
3815 (Reduced Automaton): Likewise.
3816 (Underivable Rules): Likewise.
3817 (Empty Language): Likewise.
3818
3819 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3820
3821 Fix some .gitignore and .cvsignore problems.
3822 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3823 (insert_vc_ignore): ... this new function, which prepends `/' to all
3824 .gitignore entries before passing them to insert_sorted_if_absent.
3825 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3826 .cvsignore files are maintained even though Bison developers run
3827 bootstrap while using Git.
3828 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3829 unneeded by Bison.
3830 (gnulib): Add.
3831 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3832 unneeded. Reported by Eric Blake.
3833 * lib/.gitignore (/*~): Add.
3834 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3835 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3836 Blake.
3837 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3838
3839 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3840
3841 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3842 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3843 * bootstrap.conf (gnulib_modules): Add unsetenv.
3844 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3845 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3846 (/setenv.m4): Add.
3847 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3848 the first argument because it may become position-dependent, and unset
3849 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3850 Add comments explaining these issues in more detail.
3851
3852 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3853
3854 Add .gitignore everywhere based on .cvsignore.
3855 * .gitignore: New.
3856 * build-aux/.gitignore: New.
3857 * data/.gitignore: New.
3858 * doc/.gitignore: New.
3859 * etc/.gitignore: New.
3860 * examples/.gitignore: New.
3861 * examples/calc++/.gitignore: New.
3862 * lib/.gitignore: New.
3863 * m4/.gitignore: New.
3864 * po/.gitignore: New.
3865 * runtime-po/.gitignore: New.
3866 * src/.gitignore: New.
3867 * tests/.gitignore: New.
3868
3869 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3870
3871 * NEWS (2.3b+): New section, empty for now.
3872 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3873
3874 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3875
3876 * NEWS (2.3b): Update release date since there has been a delay in
3877 getting the announcements and tarballs out.
3878
3879 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 * NEWS: Version 2.3b.
3882 * configure.ac (AC_INIT): Likewise.
3883 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3884
3885 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3886
3887 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3888 been doing it for years.
3889 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3890 (Release Procedure): Add FIXME about make alpha being unmaintained.
3891
3892 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3893
3894 * data/yacc.c: Reformat m4 a little for readability.
3895 * src/lalr.c (build_relations): Correct comment.
3896
3897 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3898
3899 DJGPP specific issue.
3900 * djgpp/config.sed: Fixes required to run configure scripts generated
3901 by autoconf 2.62.
3902
3903 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3904
3905 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3906 coordinator@translationproject.org.
3907
3908 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3909
3910 * THANKS: Add Eric Blake.
3911
3912 2008-04-23 Eric Blake <ebb9@byu.net>
3913
3914 Revert prior patch, by working around autoconf regression.
3915 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3916 ("Output file name: ("): Uncomment test.
3917 ("Output file name: )"): Likewise.
3918 Based on an idea from Noah Misch.
3919
3920 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3921
3922 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3923 2.61. Reported by Juan Manuel Guerrero at
3924 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3925 * tests/output.at ("Output file name: ("): Comment out test case for
3926 now.
3927 ("Output file name: )"): Likewise.
3928
3929 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3930
3931 * GNUmakefile: Update git-version-gen invocation so make dist
3932 succeeds.
3933
3934 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3935
3936 Update to the current gnulib CVS repository, and fix trigraph handling
3937 in Bison.
3938 * bootstrap: Update gnulib CVS repository URL.
3939 (symlink_to_dir): Encapsulate the code that guarantees the destination
3940 directory exists into...
3941 (check_dst_dir): ... this new function, and...
3942 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3943 fail when copying files into lib/uniwidth/.
3944 * src/output.c (prepare_symbols): When writing yytname muscles, where
3945 symbol names will be encoded in C-string literals, tell quotearg to
3946 escape trigraphs. This used to be the default in gnulib.
3947 * tests/regression.at (Token definitions): Because of the change in
3948 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3949 escapes trigraphs in symbol names. Thus, yytname no longer has
3950 trigraphs unnecessarily doubly escaped. Update test case output.
3951 Extend test case to be sure Bison's own error messages will no longer
3952 have trigraphs in symbol names unnecessarily escaped once.
3953
3954 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3955
3956 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3957 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3958 * .cvsignore: Add .version.
3959 * .version.in: New.
3960 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3961 * configure.ac (AC_CONFIG_FILES): Add .version.
3962 * build-aux/.cvsignore: Add git-version-gen.
3963
3964 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3965
3966 * NEWS (2.3a+): Mention that -g now takes an argument.
3967 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3968 consistency. Update the -g and -x entries now that they take
3969 arguments. Use brackets to indicate optional arguments.
3970 * src/getargs.c (usage): Explain the relationship between arguments of
3971 long and short options more completely. Document --defines and -d
3972 separately since the former takes an argument but, for POSIX Yacc, the
3973 latter does not.
3974 (short_options): Let -W take an optional argument like --warnings.
3975 (getargs): Sort cases.
3976
3977 2008-02-28 Akim Demaille <demaille@gostai.com>
3978
3979 * doc/bison.texinfo: Fix a few typos.
3980
3981 2008-02-28 Akim Demaille <akim@epita.fr>
3982
3983 * doc/bison.texinfo (Bison Options): Document -W.
3984 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3985
3986 2008-02-28 Akim Demaille <akim@epita.fr>
3987
3988 * src/getargs.c (short_options): Split and sort for readability.
3989 -g and -x take optional arguments, just like their long options.
3990 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3991 understand.
3992 Fix the handling of $opt which resulted in all the argument to be
3993 considered as optional.
3994
3995 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3996
3997 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3998 say its interface is experimental.
3999 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4000 Java.
4001 (Bison Options): In the -L and --language entry, mention Java.
4002 (Java Bison Interface): Say the interface is experimental.
4003 * src/getargs.c (usage): Mention -L and --language.
4004
4005 * NEWS (2.3a+): Say the push parsing interface is experimental.
4006 * doc/bison.texinfo (Push Decl): Likewise.
4007 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4008 (Push Parser Function): Likewise.
4009 (Pull Parser Function): Likewise.
4010 (Parser Create Function): Likewise.
4011 (Parser Delete Function): Likewise.
4012 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4013 yypull_parse, and yypush_parse entries.
4014
4015 * NEWS (2.3a+): Mention XML support, and say the schema is
4016 experimental.
4017 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4018 * src/getargs.c (usage): Say the XML schema is experimental.
4019
4020 * NEWS (2.3a+): Say option instead of flag.
4021
4022 2008-02-21 Wojciech Polak <polak@gnu.org>
4023
4024 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4025 text.
4026
4027 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4028
4029 Fix impure push parser compile error reported by Bob Rossi at
4030 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4031 * data/yacc.c: Clean up whitespace in the output a little.
4032 (yypstate_allocated): Define for impure push parsers regardless of
4033 whether the pull interface is also requested.
4034 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4035 check impure push parsers without the pull interface.
4036
4037 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4038 yyerror takes arguments specified by %parse-param while yypstate_new
4039 does not.
4040 * doc/bison.texinfo (Parser Create Function): Document that
4041 yypstate_new returns 0 for multiple impure parser instances.
4042 * tests/push.at (Push Parsing: Multiple impure instances): Update
4043 expected stderr output.
4044
4045 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4046
4047 * runtime-po/POTFILES.in (push.c): Remove.
4048
4049 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4050
4051 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4052 * data/push.c: Rename to...
4053 * data/yacc.c: ... this, overwriting it.
4054 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4055 `%push-pull-parser' -> `%define api.push_pull "both"'.
4056 Remove old yacc.c tests, and update push.c tests to yacc.c.
4057
4058 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4059
4060 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4061 `"%code top" blocks' instead of `%code "top" blocks'.
4062 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4063 Clean up whitespace in the output a little.
4064
4065 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4066
4067 Fix documentation problems reported by Tim Josling at
4068 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4069 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4070 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4071 integers. Explain the effect of literal string aliases on error
4072 messages. Copy token 0 documentation from the C++ skeleton
4073 documentation.
4074
4075 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4076
4077 Accept a token number in a %left, %right, or %nonassoc for POSIX
4078 conformance. Reported by Tim Josling at
4079 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4080 * NEWS (2.3a+): Mention.
4081 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4082 and code numbers are treated by precedence declarations.
4083 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4084 of symbols.1.
4085 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4086 of symbol.
4087 (symbol.prec): New, just like symbol but allows INT.
4088 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4089 longer holds.
4090 * tests/regression.at (Token number in precedence declaration): New
4091 test case.
4092
4093 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4094
4095 DJGPP specific issues.
4096 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4097 be changed. Copyright timestamp adjusted.
4098 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4099 be changed. Copyright timestamp adjusted.
4100 * djgpp/config.site: Copyright timestamp adjusted.
4101 * djgpp/config_h.sed: Copyright timestamp adjusted.
4102 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4103 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4104 filename translation list.
4105 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4106 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4107 files shall be created. Before trying to use the temp dir where the
4108 environment variable points to check that the dir really exists. If
4109 not default to the cwd as temp dir. Copyright timestamp adjusted.
4110 * djgpp/subpipe.h: Copyright timestamp adjusted.
4111 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4112
4113 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4114
4115 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4116
4117 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4118
4119 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4120 Problem reported by Claudio Saavedra in
4121 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4122
4123 2008-01-05 Wojciech Polak <polak@gnu.org>
4124
4125 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4126 document's title with the input grammar file name.
4127
4128 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4129
4130 Automate regression testing of the XML/XSLT implementation. Discussed
4131 starting at
4132 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4133 * configure.ac (XSLTPROC): New substitution.
4134 * Makefile.am (maintainer-xml-check): New phony target invoking...
4135 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4136 invoking make maintainer-check with BISON_TEST_XML=1.
4137 * tests/atlocal.in (XSLTPROC): New.
4138 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4139 not to report reachable memory when Bison is expected to have a
4140 non-zero exit status and (2) to compare XML/XSLT output with --graph
4141 and --report=all output for every working grammar when
4142 BISON_TEST_XML=1.
4143 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4144 (AT_BISON_CHECK_XML): New.
4145 (AT_QUELL_VALGRIND): New.
4146 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4147 (AT_CHECK): ... don't redefine this since this was the old way to
4148 quell Valgrind.
4149 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4150 AT_BISON_CHECK invocations.
4151 * tests/c++.at: Likewise.
4152 * tests/calc.at: Likewise.
4153 * tests/conflicts.at: Likewise.
4154 * tests/cxx-type.at: Likewise.
4155 * tests/existing.at: Likewise.
4156 * tests/glr-regression.at: Likewise.
4157 * tests/headers.at: Likewise.
4158 * tests/input.at: Likewise.
4159 * tests/java.at: Likewise.
4160 * tests/output.at: Likewise.
4161 * tests/push.at: Likewise.
4162 * tests/reduce.at: Likewise.
4163 * tests/regression.at: Likewise.
4164 * tests/sets.at: Likewise.
4165 * tests/skeletons.at: Likewise.
4166 * tests/synclines.at: Likewise.
4167 * tests/torture.at: Likewise.
4168 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4169 tends to hang xsltproc.
4170 (Big horizontal): Likewise.
4171
4172 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4173
4174 In XML output, remove redundant class attribute on symbol element.
4175 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4176 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4177 look up a symbol to determine whether it's a nonterminal or terminal.
4178 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4179 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4180
4181 Add prec/assoc information to XML output.
4182 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4183 %prec, add a percent_prec attribute.
4184 * src/print-xml.c (print_grammar): For each terminal that has a
4185 precedence or associativity, add a prec or assoc attribute.
4186 (xml_indent): New.
4187 (xml_puts): Use xml_indent.
4188 (xml_printf): Use xml_indent.
4189 * src/print-xml.h (xml_indent): Prototype.
4190
4191 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4192 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4193
4194 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4197 (bison:ruleByNumber): ... this for clarity.
4198 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4199 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4200 (xsl:template match="reduction"): Update.
4201 (xsl:template match="item"): Update.
4202 (xsl:template match="reduction"): Update.
4203
4204 In the XML output, don't print the list of rules where symbols appear.
4205 Compute it in XSLT instead. Discussed at
4206 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4207 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4208 (bison:ruleByRhs): New.
4209 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4210 bison:ruleByRhs.
4211 (xsl:template match="terminal/rule"): Remove.
4212 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4213 bison:ruleByRhs.
4214 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4215 Remove.
4216 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4217 bison:ruleByRhs and mode="number-link" for rule template.
4218 (xsl:template match="terminal/rule"): Remove.
4219 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4220 bison:ruleByRhs and mode="number-link" for rule template.
4221 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4222 Rewrite as...
4223 (xsl:template match="rule" mode="number-link"): ... this.
4224 * src/print-xml.c (print_grammar): Don't print the list of rules.
4225
4226 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4227
4228 Don't let --report affect XML output; always print all information.
4229 Discussed at
4230 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4231 * src/conflicts.c (log_resolution): Implement.
4232 * src/print-xml.c (print_core): Implement.
4233 (print_state): Implement.
4234 (print_xml): Implement.
4235
4236 * NEWS (2.3a+): Fix quotes.
4237 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4238 don't let %verbose clear the list specified by --report.
4239
4240 2007-11-26 Akim Demaille <akim@epita.fr>
4241
4242 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4243
4244 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4245
4246 In the XML output, list useless and unused symbols and rules with the
4247 useful ones and add a "usefulness" attribute. Discussed starting at
4248 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4249 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4250 (grammar_rules_print_xml): Print all rules instead of just those
4251 useful in the grammar, and add a "usefulness" attribute.
4252 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4253 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4254 (print_grammar): Print all nonterminals instead of just useful ones,
4255 and add a "usefulness" attribute to nonterminals and terminals.
4256 (print_xml): Don't print a separate "reductions" or
4257 "rules-useless-in-parser" element.
4258 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4259 (reduce_xml): Remove.
4260 (reduce_token_unused_in_grammar): New.
4261 (reduce_nonterminal_useless_in_grammar): New.
4262 * src/reduce.h (reduce_xml): Remove prototype.
4263 (reduce_token_unused_in_grammar): Add prototype.
4264 (reduce_nonterminal_useless_in_grammar): Add prototype.
4265 * data/xslt/xml2text.xsl: Update for XML changes.
4266 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4267 * tests/reduce.at (Useless Terminals): Update output.
4268 (Useless Rules): Update output.
4269 (Reduced Automaton): Update output.
4270
4271 Say "Terminals unused in grammar" instead of "Unused terminals".
4272 * NEWS (2.3a+): Update.
4273 * doc/bison.texinfo (Understanding): Update example output.
4274 * src/reduce.c (reduce_output): Implement.
4275 * data/xslt/xml2text.xsl: Implement.
4276 * data/xslt/xml2xhtml.xsl: Implement.
4277
4278 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4279
4280 Accept --report-file=FILE to override the default `.output' filename.
4281 * NEWS (2.3a+): Mention.
4282 * doc/bison.texinfo (Bison Options): Add an entry.
4283 * src/files.c (compute_output_file_names): Don't override
4284 spec_verbose_file if already set.
4285 * src/getargs.c (usage): Document --report-file.
4286 (REPORT_FILE_OPTION): New anonymous enum member.
4287 (long_options): Add entry for it.
4288 (getargs): Add case for it setting spec_verbose_file.
4289
4290 * build-aux/cross-options.pl: Don't record a short option just because
4291 there's an arg.
4292 * doc/.cvsignore: Add yacc.1.
4293
4294 2007-11-14 Akim Demaille <akim@epita.fr>
4295
4296 * doc/yacc.1.in: New.
4297 * configure.ac, doc/Makefile.am: Adjust.
4298 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4299 config.h symbol.
4300 Use AC_SUBST for assignments too.
4301 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4302
4303 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4304
4305 * src/gram.c: Remove comments that duplicate comments in gram.h.
4306
4307 When reporting useless rules and nonterminals, say "useless in grammar"
4308 instead of "useless", and say "useless in parser" instead of "never
4309 reduced". Discussed starting at
4310 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4311 * NEWS (2.3a+): Mention this change.
4312 * data/xslt/xml2text.xsl: Update output text and expected input XML
4313 element names to match changes below.
4314 * data/xslt/xml2xhtml.xsl: Likewise.
4315 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4316 Contents: "Rules useless in parser due to conflicts".
4317 * doc/bison.texinfo (Decl Summary): Reword a little.
4318 (Understanding): Update example output for changes below.
4319 * src/gram.c: (rule_useful_p): Rename to...
4320 (rule_useful_in_grammar_p): ... this.
4321 (rule_useless_p): Rename to...
4322 (rule_useless_in_grammar_p): ... this.
4323 (rule_never_reduced_p): Rename to...
4324 (rule_useless_in_parser_p): ... this.
4325 (grammar_rules_print): Update for renames.
4326 (grammar_rules_print_xml): Update for renames.
4327 (grammar_rules_never_reduced_report): Rename to...
4328 (grammar_rules_useless_report): ... this since it is used for either
4329 kind of useless rule.
4330 * src/gram.h: Reword comments and update function names in prototypes.
4331 * src/main.c (main): Say "rule useless in parser due to conflicts".
4332 * src/print-xml.c (print_rules_never_reduced): Rename to...
4333 (print_rules_useless_in_parser): ... this, and rename output XML
4334 element "rules-never-reduced" to "rules-useless-in-parser".
4335 (print_xml): Update for rename.
4336 * src/print.c (print_results): Say "Rules useless in parser due to
4337 conflicts".
4338 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4339 (nonterminals_reduce): Say "nonterminal useless in grammar".
4340 (reduce_output): Say "Nonterminals useless in grammar".
4341 Say "Rules useless in grammar".
4342 (reduce_xml): Rename output XML element "useless" to
4343 "useless-in-grammar".
4344 (reduce_print): Don't report the count of grammatically useless rules
4345 as "rules never reduced" just because %yacc is specified.
4346 In the correct report of this count, say nonterminal(s) and rule(s)
4347 "useless in grammar".
4348 * tests/conflicts.at (S/R in initial): Update expected output.
4349 (Defaulted Conflicted Reduction): Likewise.
4350 (Unreachable States After Conflict Resolution): Likewise.
4351 * tests/existing.at (GNU pic Grammar): Likewise.
4352 * tests/reduce.at (Useless Nonterminals): Likewise.
4353 (Useless Rules): Likewise.
4354 (Reduced Automaton): Likewise.
4355 (Underivable Rules): Likewise.
4356 (Empty Language): Likewise.
4357
4358 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4359
4360 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4361 here document and before the EOF so that BSD's implementation of Bourne
4362 shell doesn't parse the delimiter as part of the here document.
4363 * doc/.cvsignore: Add cross-options.texi.
4364 * src/getargs.c (usage): Add a blank line after the warning categories.
4365
4366 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4367
4368 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4369
4370 2007-11-05 Akim Demaille <akim@epita.fr>
4371
4372 Remove Id: from bison.1.
4373 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4374 (perl -0777 -pi -e 's/\.PP\nId): New.
4375 (.x.1): Use it to ignore the version control revision.
4376
4377 2007-11-05 Akim Demaille <demaille@gostai.com>
4378
4379 * build-aux/Makefile.am: Ship cross-options.pl.
4380 * doc/Makefile.am: Always refer to cross-options.texi with
4381 $(srcdir).
4382 (MAINTAINERCLEANFILES): Add it.
4383
4384 2007-11-04 Akim Demaille <demaille@gostai.com>
4385
4386 Generate the long/short option cross-table.
4387 * build-aux/cross-options.pl: New.
4388 * doc/Makefile.am (cross-options.texi): New.
4389 * doc/bison.texinfo: Use it.
4390
4391 2007-11-04 Akim Demaille <demaille@gostai.com>
4392
4393 Generate bison.1 using help2man.
4394 * doc/common.x, doc/bison.x: New.
4395 * doc/Makefile.am (bison.1, .x.1): New.
4396 The code is taken from autoconf-2.61/man/Makefile.am.
4397 * configure.ac: Look for help2man.
4398
4399 2007-11-04 Akim Demaille <demaille@gostai.com>
4400
4401 Complete --help.
4402 * src/getargs.c (usage): Document -W, make it clear that -d,
4403 -g and -x have optional arguments.
4404
4405 2007-11-04 Akim Demaille <demaille@gostai.com>
4406
4407 Find sha1sum when named gsha1sum.
4408 * bootstrap (find_tool): New.
4409 ($SHA1SUM): New.
4410
4411 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4412
4413 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4414 at
4415 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4416 * NEWS (2.3a+): Mention.
4417 * data/bison.m4 (b4_pure_if): Don't define it here.
4418 * data/c.m4 (b4_identification): Depend on individual skeletons to
4419 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4420 values of the %define variables api.pure or api.push_pull. Define
4421 YYPURE, YYPUSH, and YYPULL accordingly.
4422 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4423 glr.cc has already defined b4_pure_flag.
4424 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4425 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4426 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4427 * doc/bison.texinfo (Pure Decl): Update.
4428 (Push Decl): Update.
4429 (Decl Summary): Add api.pure to %define entry.
4430 In %pure-parser entry, say it's deprecated and reference %define.
4431 (Pure Calling): Update.
4432 (Error Reporting): Update.
4433 (C++ Scanner Interface): Update.
4434 (How Can I Reset the Parser): Update.
4435 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4436 reference %define.
4437 * src/getargs.c (pure_parser): Remove global variable.
4438 * src/getargs.h (pure_parser): Remove extern.
4439 * src/output.c (prepare): Don't define pure_flag muscle.
4440 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4441 wrapper around `%define api.pure'.
4442 * tests/calc.at (Simple LALR Calculator): Update.
4443 (Simple GLR Calculator): Update.
4444 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4445 Update.
4446 (GLR: Resolve ambiguity, pure, locations): Update.
4447 (GLR: Merge conflicting parses, pure, no locations): Update.
4448 (GLR: Merge conflicting parses, pure, locations): Update.
4449 * tests/glr-regression.at (Uninitialized location when reporting
4450 ambiguity): Update
4451 * tests/input.at (Unused %define api.pure): New test case.
4452 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4453 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4454 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4455
4456 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4457
4458 %define push_pull -> %define api.push_pull. Discussed starting at
4459 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4460 * data/push.c: Expect the new name.
4461 * data/yacc.c: Likewise.
4462 * doc/bison.texinfo (Push Decl): Update.
4463 (Decl Summary): Update %define entry.
4464 (Push Parser Function): Update.
4465 (Pull Parser Function): Update.
4466 (Parser Create Function): Update.
4467 (Parser Delete Function): Update.
4468 * tests/calc.at (Simple LALR Calculator): Update.
4469 * tests/input.at (%define enum variables): Update.
4470 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4471 (Push Parsing: Multiple impure instances): Update.
4472 (Push Parsing: Unsupported Skeletons): Update.
4473 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4474 (Exploding the Stack Size with Malloc): Update.
4475
4476 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4477 other entries some.
4478
4479 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4480
4481 For the XML output's terminal element, rename @number to @token-number,
4482 and add @symbol-number. In the nonterminal element, rename @number to
4483 @symbol-number. Discussed starting at
4484 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4485 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4486 renames.
4487 (xsl:template match="nonterminal"): Likewise.
4488 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4489 (xsl:template match="nonterminal"): Likewise.
4490 * src/print-xml.c (print_grammar): Implement.
4491
4492 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4493
4494 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4495 2007-10-11 change, the child elements here are items not rules.
4496 (xsl:template match="item"): New.
4497 (xsl:template match="rule"): Update for new reduced itemset.
4498 (xsl:template match="point"): Remove.
4499 (xsl:template match="empty"): For consistency with --graph, don't
4500 output "/* empty */".
4501 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4502 line-wrap, don't pass a negative value as first-line-length since this
4503 won't work with the following changes.
4504 (xsl:template name="line-wrap"): Simplify slightly.
4505 (xsl:template name="ws-search"): Eliminate recursion.
4506 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4507 set next to an item whose dot is not at the end of the RHS even if it
4508 happens to be associated with the same rule.
4509
4510 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4511
4512 Add %define lr.keep_unreachable_states.
4513 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4514 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4515 * src/main.c (main): Implement it.
4516 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4517 Extend to test it, and fix a typo.
4518
4519 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4522 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4523 the example .output text.
4524 * tests/regression.at (Extra lookahead sets in report): Improve wording
4525 of comments.
4526
4527 2007-10-17 Wojciech Polak <polak@gnu.org>
4528
4529 * src/print-xml.c (print_grammar): Renamed
4530 <terminal> and <nonterminal> attributes:
4531 "type" to "number" and "symbol" to "name".
4532 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4533 Use new attribute names.
4534 (xsl:template match="nonterminal"): Likewise.
4535 * data/xslt/xml2xhtml.xsl: Likewise.
4536
4537 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4538
4539 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4540 (Option Cross Key): Likewise.
4541
4542 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4543 next to an item whose dot is not at the end of the RHS even if it
4544 happens to be associated with the same rule.
4545 * src/print.c (print_core): Likewise.
4546 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4547 (Resolved SR Conflicts): Update output.
4548 * tests/regression.at (Extra lookahead sets in report): New test case.
4549
4550 2007-10-11 Wojciech Polak <polak@gnu.org>
4551
4552 * src/print-xml.c (print_core): Remove item set
4553 redundancy.
4554 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4555 Improve processing time. Suggested by Joel E. Denny.
4556 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4557 Write xsl:param "required" attribute as comment.
4558 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4559 (xsl:template match="rule"): Support new reduced itemset.
4560 (xsl:template match="point"): Remove.
4561 * data/xslt/xml2xhtml.xsl: Likewise.
4562
4563 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4564
4565 * src/getargs.c (version): Update copyright year.
4566
4567 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4568
4569 Make xml2dot.xsl and --graph produce the same output.
4570 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4571 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4572 escaped later.
4573 (xsl:template name="output-node"): Use the new escape template instead
4574 of the string-replace template directly.
4575 (xsl:template name="output-edge"): Likewise.
4576 (xsl:template name="escape"): New, escapes backslashes and newlines in
4577 addition to quotation marks.
4578 * src/graphviz.c (start_graph, output_node, output_edge): Add
4579 whitespace to output for legibility.
4580
4581 Make xml2text.xsl and --report produce the same output, and remove the
4582 XML "conflicts" element since a conflict summary is easily extracted
4583 from the automaton.
4584 * data/xslt/bison.xsl: New.
4585 (xsl:template match="state" mode="bison:count-conflicts): New.
4586 * data/xslt/xml2text.xsl: Import bison.xsl.
4587 (xsl:template match="bison-xml-report"): Instead of styling the
4588 "conflicts" element, style the "automaton" element with mode
4589 "conflicts". Unlike the former, the latter lists S/R and R/R
4590 conflicts for a state on the same line.
4591 (xsl:template match="conflicts"): Remove.
4592 (xsl:template match="conflict"): Remove.
4593 (xsl:template match="terminal"): Line-wrap the list of rules in which
4594 the terminal is used.
4595 (xsl:template match="nonterminal"): Likewise for nonterminals.
4596 (xsl:template match="automaton" mode="conflicts"): New.
4597 (xsl:template match="state" mode="conflicts"): New.
4598 (xsl:template name="line-wrap"): New.
4599 (xsl:template name="ws-search"): New.
4600 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4601 (xsl:template match="bison-xml-report"): Instead of styling the
4602 "conflicts" element, style the "automaton" element with mode
4603 "conflicts."
4604 (xsl:template match="conflicts"): Remove.
4605 (xsl:template match="conflict"): Remove.
4606 (xsl:template match="automaton" mode="conflicts"): New.
4607 (xsl:template match="state" mode="conflicts): New.
4608 * src/conflicts.c (conflicts_output_xml): Remove.
4609 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4610 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4611 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4612 the corresponding XSLT is easier. Also, never wrap between a word and
4613 the comma that follows it.
4614
4615 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4616
4617 Improve C++ namespace support. Discussed starting at
4618 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4619 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4620 b4_namespace_close): New macros that interpret the %define variable
4621 "namespace" so its value can contain "::" to indicate nested
4622 namespaces.
4623 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4624 the above macros.
4625 * data/lalr1.cc (b4_namespace): Likewise.
4626 * data/location.cc (b4_namespace): Likewise.
4627 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4628 inside a new table in the general %define entry. Document `%define
4629 namespace' there as well. Point the %name-prefix entry to it since it
4630 explains it more completely in the case of C++.
4631 (C++ Bison Interface): Mention `%define namespace' instead of
4632 %name-prefix.
4633 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4634 entry suffices.
4635 * tests/c++.at (Relative namespace references): New test case.
4636 (Absolute namespace references): New test case.
4637 (Syntactically invalid namespace references): New test case.
4638 * tests/input.at (C++ namespace reference errors): New test case.
4639
4640 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4641
4642 Add syncline support and location accessor to internal %define
4643 interfaces.
4644 * data/bison.m4 (b4_percent_define_get_loc): New.
4645 (b4_percent_define_get_syncline): New.
4646 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4647 (b4_percent_define_default): Record defining location as line 1 rather
4648 than 0 for the sake of synchronizing #line's, and define
4649 b4_percent_define_syncline(VARIABLE).
4650 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4651 * src/muscle_tab.c (muscle_syncline_grow): New.
4652 (muscle_code_grow): Use muscle_syncline_grow.
4653 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4654 define b4_percent_define_syncline(VARIABLE).
4655 (muscle_percent_define_get_loc): New.
4656 (muscle_percent_define_get_syncline): New.
4657 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4658 remove some unused variables.
4659 (muscle_percent_define_default): Record defining location as line 1
4660 rather than 0 for the sake of synchronizing #line's, and define
4661 b4_percent_define_syncline(VARIABLE).
4662 (muscle_percent_define_check_values): Use
4663 muscle_percent_define_get_loc.
4664 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4665 (muscle_percent_define_get_syncline): Prototype.
4666 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4667 defaults): Update output for location change.
4668 (Complaining during macro argument expansion): Extend to test
4669 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4670
4671 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4672
4673 Fix some error-reporting macro bugs.
4674 * data/bison.m4 (b4_cat): New.
4675 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4676 to stdout so they don't become arguments to other macros. Update
4677 comments and add examples.
4678 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4679 add examples.
4680 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4681 after printing the error directive so that M4 doesn't report subsequent
4682 problems that are induced by this problem.
4683 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4684 instead of just in them. Recognize @\n in both places. Both expand to
4685 the empty string. Needed by b4_cat.
4686 * tests/skeletons.at (Complaining during macro argument expansion):
4687 New test case.
4688 (Fatal errors make M4 exit immediately): New test case.
4689
4690 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4691
4692 Implement --print-datadir.
4693 * src/getargs.c (usage): Mention.
4694 (PRINT_DATADIR_OPTION): New anonymous enum member.
4695 (long_options): Add entry for it.
4696 (getargs): Add case for it calling compute_pkgdatadir.
4697 * src/output.c (output_skeleton): Encapsulate data directory
4698 computation from here...
4699 (prepare): ... and from here...
4700 (compute_pkgdatadir): ... into this new function.
4701 * src/output.h (compute_pkgdatadir): Prototype.
4702
4703 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4704
4705 * src/print-xml.c (escape_bufs): New static global variable
4706 replacing...
4707 (xml_escape_n): ... the static local variable buf here.
4708 (print_xml): Free memory for escape_bufs.
4709 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4710
4711 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4712
4713 Replace `%push-parser' and `%push-pull-parser' with
4714 `%define push_pull "push"' and `%define push_pull "both"'.
4715 `%define push_pull "pull"' is the default.
4716 * doc/bison.texinfo (Push Decl, Push Parser Function,
4717 Pull Parser Function, Parser Create Function, Parser Delete Function):
4718 Update declarations.
4719 (Decl Summary, Table of Symbols): Replace %push-parser and
4720 %push-pull-parser entries with a %define push_pull entry.
4721 * data/bison.m4 (b4_percent_define_check_values): New macro.
4722 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4723 definitions...
4724 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4725 definitions...
4726 * data/push.c: ... to here and compute them from the value of the
4727 %define variable push_pull.
4728 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4729 parsing requests here...
4730 * data/yacc.c: ... hack this to switch to push.c any time
4731 b4_use_push_pull_flag or the %define variable push_pull is set. This
4732 will go away when we mv push.c yacc.c.
4733 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4734 push parsing is not supported since unused %define variables are
4735 reported anyway.
4736 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4737 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4738 comments for consistency with b4_percent_define_check_values.
4739 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4740 muscles.
4741 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4742 Remove.
4743 (prologue_declaration): Remove %push-parser and %push-pull-parser
4744 rules.
4745 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4746 * tests/calc.at: Update declarations.
4747 * tests/input.at (%define enum variables): New test case.
4748 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4749 declaration.
4750 (Push Parsing: Multiple impure instances): Update declaration.
4751 (Push Parsing: Unsupported Skeletons): New test case.
4752 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4753 declaration.
4754 (Exploding the Stack Size with Malloc): Update declaration.
4755
4756 2007-09-24 Wojciech Polak <polak@gnu.org>
4757
4758 Add XSLT transformations.
4759
4760 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4761 * data/xslt/xml2text.xsl: Transform XML into plain text.
4762 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4763 * data/Makefile.am (xsltdir): New variable.
4764 (dist_xslt_DATA): Add xslt/*.xsl files.
4765
4766 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4767
4768 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4769 Problem reported by Wojciech Polak.
4770 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4771 (xml_printf): Undo change I made on 21 September; that is,
4772 indent 2 spaces, not 1.
4773
4774 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4775
4776 Pacify ./configure --enable-gcc-warnings.
4777 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4778 `char const *' instead of `char *'.
4779 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4780 local variable `sep'.
4781
4782 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4783
4784 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4785 elsewhere.
4786 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4787 (xml_printf): Indent just 1 space for level.
4788 (e_char, xlate_char): Remove.
4789 (xml_escape_string): Rewrite to avoid undefined behavior (used
4790 storage that was freed from the stack).
4791 (xml_escape_n): Don't bother checking for subscript error.
4792
4793 2007-09-21 Wojciech Polak <polak@gnu.org>
4794
4795 Add Bison XML Automaton Report.
4796
4797 Add support for an -x option to generate an XML report.
4798 It is not documented yet.
4799 * src/print-xml.c: New file.
4800 * src/print-xml.h: Likewise.
4801 * lib/timevar.def (TV_XML): New var.
4802 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4803 * src/conflicts.c: Include print-xml.h.
4804 (solved_conflicts_xml_obstack): New var.
4805 (log_resolution, conflicts_solve, conflicts_free):
4806 Add support for XML report.
4807 (conflicts_output_val): New function.
4808 * src/conflicts.h (conflicts_output_val): New decl.
4809 * src/files.c (spec_xml_file): New var.
4810 (compute_output_file_names, output_file_names_free): Add XML support.
4811 * src/files.h (spec_xml_file): New decl.
4812 * src/getargs.c (xml_flag): New var.
4813 (usage, short_options, long_options, getargs): Add XML support.
4814 * src/getargs.h (xml_flag): New decl.
4815 * src/gram.c: Include print-xml.h.
4816 (rule_lhs_print_xml, rule_rhs_print_xml):
4817 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4818 New functions.
4819 * src/gram.h: Declare external ones.
4820 * src/main.c: Include print-xml.h.
4821 (main): Add XML support.
4822 * src/reduce.c: Include print-xml.h.
4823 (reduce_xml): New function.
4824 * src/reduce.h: Declare it.
4825 * src/state.c: Include print-xml.h.
4826 (state_new): Add XML support.
4827 (state_rule_lookahead_tokens_print_xml): New function.
4828 * src/state.h: Declare it.
4829 (struct state): New member solved_conflicts_xml.
4830 * src/symtab.c (symbol_class_get_string): New function.
4831 * src/symtab.h: Declare it.
4832
4833 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4834
4835 * GNUmakefile: Switch to coreutils's version.
4836 * bootstrap: Likewise.
4837 * Makefile.cfg: Adjust to new GNUmakefile.
4838 * README-hacking: Likewise.
4839
4840 Import from gnulib:
4841
4842 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4843 Bruno Haible <bruno@clisp.org>
4844
4845 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4846 and is a script that invokes bison. Tighten the code. Add comments.
4847
4848 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4849
4850 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4851 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4852 * doc/bison.texinfo (Decl Summary): Fix.
4853 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4854 * tests/input.at (Boolean %define variables): Update output.
4855 * tests/skeletons.at (%define boolean variables: invalid skeleton
4856 defaults): Rename to...
4857 (%define Boolean variables: invalid skeleton defaults): ... this and
4858 update output.
4859
4860 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4861
4862 In impure push mode, don't allow more than one yypstate to be allocated
4863 since multiple impure parsers would corrupt yynerrs.
4864 * data/push.c (yypstate_allocated): New static global variable
4865 initialized to 0.
4866 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4867 exhaustion if yypstate_allocated is 1, but still return 2.
4868 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4869 already 1. Otherwise, set it to 1.
4870 (yypstate_delete): Set it to 0.
4871 * tests/push.at (Push Parsing: Multiple impure instances): New test
4872 case.
4873
4874 2007-08-17 Bob Rossi <bob@brasko.net>
4875
4876 * doc/bison.texinfo (Push Decl): Document the push parser.
4877 (Table of Symbols): Ditto.
4878 (Pure Decl): Ditto.
4879 (Decl Summary): Ditto.
4880 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4881 Parser Create Function, Parser Delete Function):
4882 Add new push parser symbols.
4883 (Table of Symbols): Document push-parser, push-pull-parser,
4884 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4885
4886 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4887
4888 Update to GPLv3.
4889 * doc/gpl-3.0.texi: New file.
4890 * doc/gpl.texi: Remove.
4891 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4892 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4893 * README-hacking, TODO, bootstrap, bootstrap.conf:
4894 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4895 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4896 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4897 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4898 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4899 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4900 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4901 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4902 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4903 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4904 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4905 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4906 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4907 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4908 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4909 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4910 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4911 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4912 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4913 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4914 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4915 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4916 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4917 * src/complain.c, src/complain.h, src/conflicts.c:
4918 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4919 * src/files.h, src/flex-scanner.h, src/getargs.c:
4920 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4921 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4922 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4923 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4924 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4925 * src/print.c, src/print.h, src/print_graph.c:
4926 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4927 * src/reduce.h, src/relation.c, src/relation.h:
4928 * src/revision.h, src/scan-code.h, src/scan-code.l:
4929 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4930 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4931 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4932 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4933 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4934 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4935 * tests/existing.at, tests/glr-regression.at:
4936 * tests/headers.at, tests/input.at, tests/java.at:
4937 * tests/local.at, tests/output.at, tests/push.at:
4938 * tests/reduce.at, tests/regression.at, tests/sets.at:
4939 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4940 * tests/torture.at:
4941 Update to GPLv3.
4942
4943 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4944
4945 Get rid of broken %no-parser, -n, and --no-parser implementation and
4946 documentation.
4947 * TODO: Don't mention them.
4948 * doc/bison.1: Likewise.
4949 * doc/bison.texinfo (Decl Summary): Likewise.
4950 (Bison Options): Likewise.
4951 (Option Cross Key): Likewise.
4952 * src/getargs.c (no_parser_flag): Remove global variable.
4953 (usage): Don't print description of -n and --no-parser.
4954 (long_options): Remove --no-parser entry here.
4955 (getargs): Remove -n case in the switch here.
4956 * src/getargs.h (no_parser_flag): Remove extern.
4957 * tests/regression.at (Web2c Actions): Remove comment that mentions
4958 --no-parser.
4959
4960 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4961
4962 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4963 name user variables starting with `yy'. Just pass NULL instead of a
4964 dummy local &yylval to yypush_parse.
4965 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4966 starting with `yy'.
4967
4968 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4969
4970 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4971 true since it's then always used regardless of whether yyoverflow is
4972 defined. Reported by Christian Burger at
4973 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4974 * THANKS: Add Christian Burger.
4975
4976 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4977 node names: say "Decl Summary" not "Bison Declaration Summary".
4978
4979 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4980
4981 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4982 determine whether this function has already complained about an invalid
4983 value for a %define boolean variable, don't check whether Bison has
4984 ever examined the value. As written, the check was a tautology.
4985 Instead, record and check for this complaint using a separate muscle.
4986
4987 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4988
4989 Fix push parsing memory leak reported by Brandon Lucia at
4990 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4991 * THANKS: Add Brandon Lucia.
4992 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4993 but the parse never completed and thus freed it.
4994 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4995 * tests/testsuite.at: Include push.at.
4996 * test/push.at: New.
4997 (Push Parsing: Memory Leak for Early Deletion): New test case.
4998
4999 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5000
5001 Improve handling of multiple S/R conflicts in the same state and of S/R
5002 conflicts involving multiple reductions.
5003 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5004 set for a state here or Bison will abort if it is reassigned on a
5005 later conflicted reduction in the same state.
5006 Similarly, don't finalize and assign the solved conflicts report here
5007 or it will be lost if it is reassigned on a later conflicted reduction
5008 in the same state.
5009 (set_conflicts): Instead, assign them both here after all S/R conflicts
5010 in the state have been fully examined.
5011 * src/print.c (shift_set): Rename to...
5012 (no_reduce_set): ... this.
5013 (print_reductions): Update for rename, and add %nonassoc error action
5014 tokens to no_reduce_set so that, when printing the first remaining
5015 reduction on an error action token, the reduction is enclosed in
5016 brackets.
5017 (print_results): Update for rename.
5018 * tests/conflicts.at (Solved conflicts report for multiple reductions
5019 in a state): New test case.
5020 (%nonassoc error actions for multiple reductions in a state): New test
5021 case.
5022
5023 * src/main.c (main): Don't depend on C99 features.
5024
5025 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5026
5027 * build-aux/.cvsignore: Add compile.
5028 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5029 uniwidth.
5030
5031 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5032
5033 * bootstrap (slurp): Create target directories that don't exist.
5034 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5035
5036 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5037
5038 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5039 than item number.
5040 * closure.c (closure): Likewise.
5041 * state.h (reductions): Comment sorting of rules.
5042 (state): Comment sorting of items.
5043
5044 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5045
5046 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5047 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5048 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5049 definition in order to avoid Gnulib headers since we don't use config.h
5050 here.
5051 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5052 rather than AT_DATA so that config.h is included.
5053
5054 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5055
5056 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5057 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5058 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5059 and so that YYFPRINTF is guaranteed to be defined here.
5060
5061 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5062
5063 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5064 with...
5065 (muscle_percent_define_check_values): ... this more helpful function.
5066 Again, it's not used yet, but it will be.
5067 * src/muscle_tab.h: Likewise.
5068
5069 Improve some comments in parser table construction.
5070 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5071 (generate_states): Don't mention ruleset, which is internal to closure.
5072 * src/closure.c (closure): Explain sorting of core and itemset, which
5073 is required for this function to behave correctly.
5074 * src/closure.h (closure): Mention sorting.
5075
5076 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5077
5078 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5079 move the check for disabled transitions to an aver since conflict
5080 resolution hasn't happened yet.
5081
5082 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5083 labels a state as inconsistent just because it has error transitions.
5084 The original form of this check appeared in revision 1.1 of lalr.c,
5085 which was committed on 1991-12-21. Now (at least), changing the
5086 consistency label on such a state appears to have no useful effect in
5087 any of the places it is examined, which I enumerate below. The key
5088 point to understanding each item in this enumeration is that a state
5089 with an error transition is labelled consistent in the first place only
5090 if it has no rules, so the check cannot matter for states that have
5091 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5092 to try to identify its conflicts, and a state must have *rules* to have
5093 conflicts. (2) Labelling a state as inconsistent will affect how
5094 action_row sets the default *rule* for the state. (3) Labelling a
5095 state as inconsistent will cause build_relations to add lookback edges
5096 to *rules* in that state.
5097 * src/state.h (struct state): Word the comment for member consistent
5098 more carefully.
5099
5100 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5101
5102 Don't depend on C99 features.
5103 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5104 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5105 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5106 * src/state.c (state_mark_reachable_states): Fix for-loop.
5107 (state_remove_unreachable_states): Fix for-loop.
5108
5109 Don't widen struct state with member reachable just to temporarily
5110 record reachability. Instead, use a local bitset.
5111 * src/state.h (struct state): Remove member.
5112 * src/state.c (state_new): Don't initialize it.
5113 (state_mark_reachable_states): Rename to...
5114 (state_record_reachable_states): ... this, and use bitset.
5115 (state_remove_unreachable_states): Use bitset.
5116
5117 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5118
5119 * src/Makefile.am (yacc): Quote target action commands properly so
5120 that the yacc script isn't corrupt. Reported by Hans Aberg at
5121 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5122
5123 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5124 the case of pure parsers. Reported by Frans Englich at
5125 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5126 * THANKS: Add Frans Englich.
5127
5128 * NEWS (2.3a+): In the %code entry, reference section `Bison
5129 Declaration Summary' from the manual now since the %code summary has
5130 moved there.
5131 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5132 in the rules section must be terminated by semicolons.
5133
5134 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5135
5136 Extend the front-end API for %define variables to more completely
5137 mirror the back-end. This will be useful in the future.
5138 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5139 Update comments to mention the new front-end counterparts of these
5140 macros.
5141 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5142 for muscle_string_decode and muscle_location_decode.
5143 (muscle_string_decode): New static function.
5144 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5145 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5146 functions.
5147 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5148 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5149 implementation more closely.
5150 (muscle_percent_define_invalid_value): New function.
5151 * src/muscle_tab.h (muscle_percent_define_get,
5152 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5153 Prototype.
5154
5155 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5156
5157 * NEWS (2.3a+): Mention yesterday's state-removal change.
5158 (2.3a): Remove the %language entry, which was added after 2.3a.
5159 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5160 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5161 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5162 tests/existing.at: Update copyright date.
5163
5164 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5165
5166 If conflict resolution makes states unreachable, remove those states,
5167 report rules that are then unused, and don't report conflicts in those
5168 states.
5169 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5170 New global function.
5171 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5172 function.
5173 * src/main.c (main): After conflict resolution, remove the unreachable
5174 states and update all data structures that reference states by number.
5175 * src/state.c (state_new): Initialize each state's reachable member to
5176 false.
5177 (state_mark_reachable_states): New static function.
5178 (state_remove_unreachable_states): New global function.
5179 * src/state.h (struct state): Add member bool reachable.
5180 (state_remove_unreachable_states): Prototype.
5181 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5182 New test case.
5183 * tests/existing.at (GNU pic Grammar): Update test case output now that
5184 an unused rule is discovered.
5185
5186 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5187
5188 Minor code cleanup in parser table construction.
5189 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5190 (new_itemsets, save_reductions): Update for rename to nitemset.
5191 * src/closure.c (nritemset): Rename to...
5192 (nitemset): ... this since the "r" appears to meaningless and isn't
5193 used in the comments.
5194 (closure): Update for rename.
5195 * src/closure.h (nritemset): Update extern to...
5196 (nitemset): ... this.
5197 * src/lalr.c (LA): Fix a typo in comments.
5198 * src/print.c (print_core): Update for rename to nitemset.
5199 * src/print_graph.c (print_graph): Likewise.
5200 * src/state.h: Fix some typos in header comments.
5201
5202 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5203
5204 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5205 still sticks to ASCII. Sorry!
5206
5207 * README-hacking: New file, taken mostly from coreutils, with changes
5208 for Bison. Contains much of the contents of:
5209 * README-cvs: Remove.
5210 * bootstrap: Sync from gnulib.
5211 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5212 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5213
5214 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5215
5216 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5217 Setzer.
5218 (Java Differences): Fix some typos.
5219 * THANKS: Add Sebastian Setzer.
5220
5221 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5222
5223 * data/java.m4 (b4_single_class_if): Remove.
5224 (b4_abstract_if): Look at "%define abstract".
5225 (b4_lexer_if): New.
5226 (b4_union_name): Rename...
5227 (b4_yystype): ... to this. Map to "%define stype".
5228 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5229 b4_maybe_throws): Fix quoting.
5230 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5231 * data/lalr1.java (Lexer interface): Always define.
5232 (Lexer interface within parser class): Remove.
5233 (YYLexer class): New, used when "%code lexer" is present.
5234 (constructor): When "%code lexer" is used, pass %lex-param
5235 to the lexer constructor.
5236 (yylex, yyparse): Remove %lex-param from method invocations
5237 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5238
5239 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5240 abstract". Rename "%define union_name" to "%define stype".
5241 Rename method names according to previous patch.
5242 (Java Scanner Interface): Describe "%code lexer" instead of
5243 "%pure-parser" and "%define single_class".
5244 (Java Differences): Mention "%code lexer".
5245
5246 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5247 Include scanner here, using macros from tests/local.at.
5248 (AT_DATA_CALC_Y): Remove final argument.
5249 (_AT_CHECK_JAVA_CALC): Likewise.
5250 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5251 of %locations and %error-verbose.
5252 (main): Test with and without %lex-param.
5253 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5254 (AT_BISON_OPTION_POPDEFS): Pop it.
5255
5256 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5257
5258 DJGPP spefic issue. Inhibit the use of disallowed characters for
5259 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5260 and concern testsuite case 46.
5261 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5262 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5263 * djgpp/config.bat: Inhibit the use of disallowed characters.
5264
5265 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5266
5267 Miscellaneous %define and %code cleanup.
5268 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5269 values are interpreted.
5270 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5271 documentation a little more.
5272 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5273 muscle_percent_define_insert, muscle_percent_code_grow): New
5274 functions/macros.
5275 * src/muscle_tab.h (muscle_percent_define_insert,
5276 muscle_percent_code_grow): Prototype.
5277 * src/parse-gram.y (prologue_declaration): Use
5278 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5279 %define and %code directives.
5280
5281 Make it easy to share %define boolean variables between the front-end
5282 and back-end. Though not used yet, this will be useful in the future.
5283 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5284 Bison uses of names rather than just skeleton uses of names.
5285 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5286 b4_percent_define_skeleton_variables(VARIABLE) to
5287 b4_percent_define_bison_variables(VARIABLE).
5288 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5289 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5290 b4_percent_code_bison_qualifiers(QUALIFIER).
5291 (b4_check_user_names_wrap): Update for renames.
5292 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5293 muscle_percent_define_default): New functions mimicking
5294 b4_percent_define_flag_if and b4_percent_define_default.
5295
5296 For %define variables, report locations for invalid values and
5297 redefinitions.
5298 * data/bison.m4 (b4_percent_define_flag_if): Read
5299 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5300 value for VARIABLE.
5301 (b4_percent_define_default): Save a special location in
5302 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5303 must later be reported as invalid.
5304 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5305 functions.
5306 (muscle_percent_define_insert): Record the location of VARIABLE in
5307 muscle percent_define_loc(VARIABLE), and use it to report the previous
5308 location for a redefinition.
5309 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5310 (muscle_percent_define_default): Update like b4_percent_define_default.
5311 (muscle_grow_user_name_list): Rename to...
5312 (muscle_user_name_list_grow): ... this for consistency and use
5313 muscle_location_grow.
5314 * src/muscle_tab.h (muscle_location_grow): Prototype.
5315 * tests/input.at (%define errors): Update expected output.
5316 * tests/skeletons.at (%define boolean variables: invalid skeleton
5317 defaults): New test case.
5318
5319 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5320
5321 * src/print.c (lookahead_set, state_default_rule): Remove.
5322 (print_reductions): Replace state_default_rule invocation with
5323 equivalent use of yydefact, which was computed in token_actions in
5324 tables.c.
5325 (print_results): Don't allocate lookahead_set.
5326
5327 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5328
5329 * data/lalr1.java: Prefix all private members with yy.
5330
5331 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5332
5333 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5334 Sebastien Fricker at
5335 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5336 * THANKS: Add Sebastien Fricker.
5337 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5338 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5339 accept a variable number of arguments.
5340
5341 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5342
5343 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5344
5345 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5346
5347 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5348 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5349 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5350
5351 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5352
5353 Undo my 2007-02-07 change, switching back to the c-strcase module
5354 introduced in the 2007-02-03 change. Bruno Haible reported that
5355 the 2007-02-07 change would be dangerous in Turkish if we add a
5356 language whose name contains "i", since "i" is not lowercase "I"
5357 in Turkish.
5358 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5359 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5360 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5361 * m4/.cvsignore: Remove strcase.m4.
5362 * src/getargs.c: Revert 2007-02-07 change, as follows.
5363 Include c-strcase.h.
5364 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5365
5366 2007-02-11 Bruno Haible <bruno@clisp.org>
5367
5368 Enable the Java related testsuite tests when the only Java compiler
5369 found is a gcj < 4.3. Discussed at
5370 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5371 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5372
5373 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5374
5375 * data/Makefile.am: Update copyright date.
5376 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5377 yypstate_new returns NULL.
5378 (yypstate_new): Return NULL if malloc does.
5379 * src/reader.c (packgram): Move translation of rule actions from the
5380 beginning of packgram to...
5381 (check_and_convert_grammar): ... here right before packgram is invoked
5382 so it's easier to write more complete comments, and remove redundant
5383 code.
5384
5385 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5386
5387 As in semantic actions, make @$ in %initial-action, %destructor, and
5388 %printer imply %locations.
5389 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5390 scanning @$.
5391 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5392 (@$ in %initial-action implies %locations,
5393 @$ in %destructor implies %locations,
5394 @$ in %printer implies %locations): ... these new test cases.
5395
5396 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5397
5398 Undo most of the 2007-02-03 change, switching to the strcase module
5399 now that gnulib strcase has been fixed.
5400 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5401 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5402 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5403 * m4/.cvsignore: Add strcase.m4.
5404 * src/getargs.c: Revert 2007-02-03 change, as follows.
5405 Don't include c-strcase.h.
5406 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5407 strcasecmp has "unspecified behavior" outside the POSIX locale,
5408 but it works fine in practice if at least one argument is ASCII,
5409 as is the case in Bison.
5410
5411 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5412
5413 * tests/java.at: Skip tests if only one of javac/java is present.
5414 Reported by Joel E. Denny.
5415 * tests/atlocal.in: Adjust copyright years.
5416
5417 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5418
5419 * data/lalr1.java (Stack): Work around old verifiers that disallow
5420 access to the private fields of an inner class, from the outer class.
5421 We can make Stack's fields public because user code doesn't have access
5422 to the instance of Stack used by parse(). Reported by Paul Eggert.
5423
5424 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5425
5426 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5427 the right spot for these files?
5428 * bootstrap.conf (gnulib_modules): Add c-strcase.
5429 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5430 c-strncasecmp.c.
5431 * src/getargs.c: Include c-strcase.h.
5432 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5433 to avoid unspecified behavior.
5434
5435 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5436
5437 * doc/bison.texinfo (Decl Summary): Correct typo.
5438
5439 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5440
5441 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5442 Complain if the value does not match empty, "true" or "false".
5443 * data/c++.m4: Adjust default definitions of %define variables.
5444 * data/java.m4: Adjust default definitions of %define variables.
5445 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5446 to above behavior.
5447 * tests/input.at (Boolean %define variables): Test new behavior.
5448
5449 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5450
5451 * NEWS: Mention java.
5452 * TODO: Remove things that are done.
5453 * bootstrap.conf: Add javacomp-script and javaexec-script.
5454 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5455
5456 * data/Makefile.am: Add new files.
5457 * data/java-skel.m4: New.
5458 * data/java.m4: New.
5459 * data/lalr1.java: New.
5460
5461 * doc/bison.texinfo: Put "A Complete C++ Example" under
5462 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5463 under Other Languages.
5464
5465 * src/getargs.c (valid_languages): Add Java.
5466 * src/getargs.h (struct bison_language): Update size of string fields.
5467
5468 * tests/Makefile.am: Add java.at.
5469 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5470 * tests/java.at: New.
5471 * tests/testsuite.at: Include it.
5472
5473 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5474
5475 Clean up.
5476 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5477 at_directive_argv arguments so these no longer have to be global
5478 variables. Also, update the implementation for the following changes.
5479 (fail_for_at_directive_too_many_args,
5480 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5481 (at_directive_name): Remove as at_directive_argv[0] will be used for
5482 this now.
5483 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5484 for the directive name.
5485 (at_directive_argc, at_directive_argv): Make these local within
5486 skel_lex instead of global.
5487 (INITIAL): Update directive start action for above changes.
5488 (SC_AT_DIRECTIVE_ARG): Rename to...
5489 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5490 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5491 (scan_skel): Move yylex_destroy to...
5492 (skel_scanner_free): ... here.
5493 * tests/skeletons.at (installed skeleton file name): Rename to...
5494 (installed skeleton file names): ... this.
5495
5496 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5497
5498 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5499 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5500 Summary" not "Directives".
5501 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5502 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5503 since the former is now the more complete one.
5504 (Prologue Alternatives): Likewise and do the same for %defines.
5505 (Table of Symbols): Add summary of %code, add summary of %define, and
5506 move full %code documentation to...
5507 (Decl Summary): ... here for consistency with other entries in these
5508 sections.
5509 Move %define entry in order to keep this list alphabetized.
5510 Reword %define entry a little to put less emphasis on the skeleton
5511 concept, which most users shouldn't have to think about.
5512
5513 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5514
5515 Adjust to recent gnulib changes.
5516 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5517 Add string.h, string_.h, unistd_.h, wchar_.h.
5518 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5519 * src/system.h: Don't include <stpcpy.h>; this is now done by
5520 <string.h>.
5521
5522 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5523
5524 Simplify implementation of unqualified %code, implement macros for
5525 uniform treatment of boolean %define flags. Document %define.
5526 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5527 b4_percent_code_ifdef): New.
5528 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5529 * data/c++.m4: Define default value for global_tokens_and_yystype.
5530 * data/glr.cc: Likewise.
5531 * data/location.cc: Use b4_percent_define_flag_if.
5532
5533 * doc/bison.texinfo (Decl Summary): Document %define.
5534
5535 * src/parse-gram.y (Unqualified %code): Change muscle name to
5536 b4_percent_code().
5537 (content.opt): Default to empty.
5538
5539 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5540
5541 Implement support for relative and absolute skeleton file names.
5542 Discussed starting at
5543 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5544 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5545 (Bison Options): Document in --skeleton entry.
5546 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5547 full_skeleton can't necessarily hold all of pkgdatadir.
5548 If the specified skeleton file name contains a `/', don't prepend
5549 pkgdatadir.
5550 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5551 file name contains a `/', prepend the grammar file directory.
5552 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5553 * skeletons.at: New file.
5554 (relative skeleton file names): New test case.
5555 (installed skeleton file names): New test case.
5556 * tests/testsuite.at: Include skeletons.at.
5557
5558 * bootstrap: Update copyright to 2007.
5559
5560 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5561
5562 * bootstrap: Remove occurrences of .#bootmp from the files.
5563
5564 2007-01-17 Akim Demaille <akim@epita.fr>
5565
5566 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5567 nonterminals.
5568 Use per-type %printer.
5569
5570 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5571
5572 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5573 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5574 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5575 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5576 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5577 tests/glr-regression.at, tests/input.at, tests/local.at,
5578 tests/output.at, tests/torture.at: Update copyright to 2007.
5579
5580 2007-01-16 Akim Demaille <akim@epita.fr>
5581
5582 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5583 error code.
5584 (Calc++ Scanner): Exit with failure if we can't open the input
5585 file.
5586 Accept "-" standing for stdin.
5587 (Calc++ Top Level): Print the result only if the parsing was
5588 successful.
5589
5590 2007-01-16 Akim Demaille <akim@epita.fr>
5591
5592 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5593
5594 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5595 and Joel E. Denny <jdenny@ces.clemson.edu>
5596
5597 Clean up %define and %code implementation in M4 some. Most
5598 importantly, rename all related macros to be in the b4_percent_define
5599 and b4_percent_code namespaces. Also, complete support for `.' in
5600 %define variable names and %code qualifiers.
5601 * data/bison.m4 (b4_check_user_names): Check for special
5602 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5603 m4_foreach loops.
5604 (b4_get_percent_define, b4_get_percent_code): Rename to...
5605 (b4_percent_define_get, b4_percent_code_get): ... these.
5606 Extend documentation with examples.
5607 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5608 b4_percent_define_skeleton_variables and
5609 b4_percent_code_skeleton_qualifiers.
5610 Expect any value for the %define variable `foo' to be stored in the
5611 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5612 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5613 expect any unqualified %code blocks to be stored in a macro named
5614 `b4_percent_code_unqualified'.
5615 Use m4_indir so that %define variable names and %code qualifiers can
5616 contain `.', which is allowed by the grammar parser.
5617 (b4_percent_define_default): New macro to set a default value for a
5618 %define variable.
5619 (m4_wrap): Update wrapped code, and fix some underquoting.
5620 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5621 Expect grammar uses of %define variables and %code qualifiers to be
5622 defined in b4_percent_define_user_variables and
5623 b4_percent_code_user_qualifiers.
5624 * data/c++.m4: Use b4_percent_define_default rather than
5625 m4_define_default. Fix some underquoting. Skeleton usage of %define
5626 variable define_location_comparison now implies skeleton usage of
5627 %define variable filename_type.
5628 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5629 data/push.c, data/yacc.c: Update macro names.
5630 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5631 muscle names.
5632
5633 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5634
5635 DJGPP specific issues.
5636
5637 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5638 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5639
5640 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5641
5642 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5643 run parsers in all tests so that Valgrind is invoked during
5644 maintainer-check-valgrind.
5645 (Duplicate representation of merged trees): Free all semantic values.
5646 (Duplicated user destructor for lookahead): Likewise.
5647
5648 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5649
5650 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5651 command-line prefix.
5652 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5653 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5654 miss Valgrind messages.
5655 (Exploding the Stack Size with Malloc): Likewise.
5656
5657 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5660 locals. Reported by Juan Manuel Guerrero at
5661 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5662 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5663 Fix some indentation also.
5664 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5665 explaining this issue.
5666
5667 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5668 and Joel E. Denny <jdenny@ces.clemson.edu>
5669
5670 Simplify union and prologue handling, and escape union and lex/parse
5671 params with digraphs.
5672 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5673 values to the empty string since these are no longer guaranteed
5674 initialized by the front-end.
5675 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5676 braces around b4_user_stype since this is no longer done by the
5677 front-end.
5678 * src/files.c, src/files.h (pre_prologue_obstack,
5679 post_prologue_obstack): Remove.
5680 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5681 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5682 with digraphs. This fixes lex params and parse params.
5683 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5684 * src/output.c (prepare): Remove muscle insertion of the prologues.
5685 (output): Remove freeing of pre_prologue_obstack and
5686 post_prologue_obstack.
5687 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5688 than prologue_augment for prologue parsing so you don't need prologue
5689 obstacks.
5690 (grammar_declaration): For %union RHS, use `braceless' instead of
5691 "{...}" so that braces are already stripped and code is escaped with
5692 digraphs.
5693 * src/reader.c (prologue_augment): Remove.
5694 (reader): Remove initialization of pre_prologue_obstack and
5695 post_prologue_obstack.
5696 * src/reader.h (prologue_augment): Remove.
5697
5698 * data/c.m4: Remove stray parenthesis.
5699
5700 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5701
5702 Remove quotes from variables names in %define directives and from
5703 qualifiers in %code directives, and restrict the characters that are
5704 allowed in them to M4-friendly ones. For %define, continue to support
5705 the quoted form as a deprecated feature. Discussed starting at
5706 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5707 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5708 %code.
5709 * doc/bison.texinfo (Prologue Alternatives): Update.
5710 (Decl Summary): In %defines entry, update mention of `%code requires'
5711 and `%code provides'.
5712 (C++ Location Values): Update %define uses.
5713 (Calc++ Parser Interface): Likewise.
5714 (Calc++ Parser): Likewise, and update `%code requires' uses.
5715 (Table of Symbols): Update %code documentation.
5716 * src/parse-gram.y (prologue_declaration): For %define variables, use
5717 `variable' instead of `STRING'.
5718 (grammar_declaration): For %code qualifiers, use `ID' instead of
5719 `STRING'.
5720 (variable): New nonterminal that takes an `ID' or a `STRING'.
5721 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5722 and %define uses.
5723 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5724 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5725 (%define errors): Update %define uses.
5726
5727 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5728
5729 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5730 instead of muscle_insert for %define values so that M4-special
5731 characters are replaced with digraphs.
5732 * tests/input.at (%define errors): Extend to check weird values.
5733
5734 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5735
5736 Instead of having skeletons declare all valid %define variables and
5737 %code qualifiers, provide macros that retrieve the associated values
5738 and build these lists automatically. Thus Bison will now warn when a
5739 variable or qualifier is not used by the skeleton in the current
5740 invocation regardless of whether it might sometimes be used by that
5741 skeleton in other invocations. Also, move all %define value macros to
5742 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5743 form, which is replaced by %code.
5744 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5745 (b4_check_user_names): ... this, and change the series of valid name
5746 arguments to a single list argument for names used in the skeleton
5747 similar to the existing list argument for names used in the grammar.
5748 Warn instead of complaining.
5749 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5750 values and %code code, to format %code code properly, and to build
5751 lists of all %define variables and %code qualifiers used in the
5752 skeleton: b4_skeleton_percent_define_variables and
5753 b4_skeleton_percent_code_qualifiers.
5754 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5755 Remove, and...
5756 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5757 the skeleton names lists can finish building first. In place of
5758 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5759 expect the lists b4_user_percent_define_variables and
5760 b4_user_percent_code_qualifiers.
5761 * data/c++.m4: Where setting default values for b4_parser_class_name,
5762 b4_location_type, b4_filename_type, b4_namespace, and
5763 b4_define_location_comparison, update their names to the
5764 b4_percent_define_ namespace.
5765 * data/glr.c: Don't use b4_check_percent_define_variables and
5766 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5767 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5768 (b4_parser_class_name, b4_namespace): Define these using
5769 b4_get_percent_define for parser_class_name and namespace.
5770 * data/location.cc: Use b4_get_percent_define.
5771 * data/push.c: Don't use b4_check_percent_define_variables and
5772 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5773 * data/yacc.c: Likewise, and don't call m4_exit in
5774 b4_use_push_for_pull_if or m4_wrap code will never execute.
5775 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5776 Rename to...
5777 (muscle_grow_user_name_list): ... this for consistency with the
5778 terminology used in bison.m4.
5779 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5780 %define variable names, and rename muscle used_percent_define_variables
5781 to user_percent_define_variables.
5782 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5783 user_percent_code_qualifiers.
5784 (content): Remove.
5785 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5786 {CODE} form is no longer accepted.
5787 * tests/input.at (Reject bad %code qualifiers): Rename to...
5788 (Reject unused %code qualifiers): ... this, and update test output.
5789 (%define error): Update test output.
5790
5791 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5792
5793 Check for unrecognized %define variables similar to checking for
5794 unrecognized %code qualifiers. Check for redefined %define variables.
5795 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5796 generalizes...
5797 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5798 (b4_check_percent_define_variables): New, also wraps it.
5799 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5800 variables using b4_check_percent_define_variables.
5801 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5802 all those exercised in the test suite and all those listed in the
5803 `Default values' section of c++.m4. Are there others?
5804 * data/push.c, data/yacc.c: Declare no valid %define variables.
5805 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5806 similar to muscle_find, but it works even when the muscle stores a
5807 const value.
5808 (muscle_grow_used_name_list): New function for constructing the used
5809 name list muscles that b4_check_for_unrecognized_names requires.
5810 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5811 %define'd more than once. Define the b4_used_percent_define_variables
5812 muscle with muscle_grow_used_name_list.
5813 (grammar_declaration): Abbreviate %code code with
5814 muscle_grow_used_name_list.
5815 * tests/input.at (%define errors): New.
5816
5817 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5818
5819 Provide warn_at, complain_at, and fatal_at function callbacks to the
5820 skeletons, and use this for %code qualifier complaints.
5821 * data/bison.m4 (b4_error_at): New, invoked by...
5822 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5823 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5824 @fatal_at(...@) directives.
5825 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5826 qualifiers in b4_used_percent_code_qualifiers and to use
5827 b4_complain_at.
5828 * src/location.c, src/location.h (boundary_set_from_string): New global
5829 function.
5830 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5831 function.
5832 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5833 to b4_used_percent_code_qualifiers.
5834 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5835 function.
5836 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5837 (lineno): Rename to...
5838 (out_lineno): ... this so I don't misunderstand it again.
5839 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5840 here; these newlines are in the input but not the output file.
5841 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5842 (at_directive_perform): ... this new static function, and add handling
5843 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5844 directives.
5845 * tests/input.at (Reject bad %code qualifiers): Update test output with
5846 locations and extend.
5847
5848 * tests/output.at (Output file name: [, Output file name: ]): Remove
5849 bogus comment about these tests failing.
5850
5851 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5852
5853 Clean up b4_check_percent_code_qualifiers a little.
5854 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5855 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5856 documentation and add examples.
5857 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5858 qualifiers here.
5859
5860 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5861
5862 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5863 unreliable -- especially when they're hidden inside another macro.
5864 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5865 data/c.m4: Remove m4_divert(-1).
5866 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5867 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5868 m4_divert_push(0) and m4_divert_pop(0).
5869 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5870 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5871 pushed and popped by m4sugar, should be first on the stack.
5872
5873 Provide warn, complain, and fatal function callbacks to the skeletons.
5874 This provides more flexibility than m4_fatal, improves the error
5875 message format, and captures messages for translation. Discussed
5876 starting at
5877 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5878 * data/bison.m4 (b4_error): New, invoked by...
5879 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5880 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5881 directives. Because these M4 macros might be called when the current
5882 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5883 the previous removal of uses of m4_divert, which caused trouble.
5884 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5885 m4_fatal to report unrecognized %code qualifiers.
5886 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5887 push parser requests.
5888 * data/glr.c: Use b4_complain instead of m4_fatal to report
5889 non-deterministic push parser requests.
5890 Update @output usage to @output(...@) form.
5891 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5892 report missing %defines. Update @output usage to @output(...@) form.
5893 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5894 @output(...@) form.
5895 * src/main.c (main): Invoke skel_scanner_free.
5896 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5897 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5898 obstack_for_string from flex-scanner.h.
5899 (YY_DECL): Use to declare skel_lex static.
5900 (decode_at_digraphs): Remove; now handled in the new
5901 SC_AT_DIRECTIVE_ARG start condition.
5902 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5903 functions.
5904 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5905 at_directive_argv): New static globals.
5906 (INITIAL): Use fail_for_invalid_at.
5907 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5908 recognize the start of a generalized `@directive(...@)' form and
5909 start...
5910 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5911 directive args (using the new obstack_for_string), to decode the
5912 contained @ diagraphs, and to perform the directive. It recognizes
5913 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5914 @output(...@).
5915 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5916 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5917 `@,'.
5918 (scan_skel): Initialize obstack_for_string on the first call.
5919 (skel_scanner_free): New function to free obstack_for_string.
5920 * tests/input.at (Reject bad %code qualifiers): Update test output.
5921
5922 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5923
5924 Consolidate the 4 prologue alternative directives (%code, %requires,
5925 %provides, and %code-top) into a single %code directive with an
5926 optional qualifier field. Discussed at
5927 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5928 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5929 alternatives.
5930 * doc/bison.texinfo (Prologue Alternatives): Update.
5931 (Decl Summary): Update to %code "requires" and %code "provides".
5932 (Calc++ Parser): Update to %code "requires".
5933 (Table of Symbols): Remove entries for %requires, %provides, and
5934 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5935 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5936 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5937 which are skeleton-specific.
5938 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5939 declare what %code qualifiers it supports and to complain if any other
5940 qualifiers were used in the grammar.
5941 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5942 and b4_user_code([b4_percent_code_provides]) in place of
5943 b4_user_requires and b4_user_provides.
5944 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5945 Add b4_user_code([b4_percent_code_top]) and
5946 b4_user_code([b4_percent_code]).
5947 Invoke b4_check_percent_code_qualifiers.
5948 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5949 PERCENT_REQUIRES): Remove.
5950 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5951 %requires. Rewrite the %code RHS as the unqualified form defining the
5952 muscle b4_percent_code. Add another RHS for the qualified %code form,
5953 which defines muscles of the form b4_percent_code_QUALIFIER and the
5954 b4_used_percent_code_qualifiers muscle.
5955 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5956 PERCENT_REQUIRES): Remove.
5957 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5958 %code "requires" and %code "provides".
5959 * tests/input.at (Reject bad %code qualifiers): New.
5960
5961 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5962
5963 Use the new code_props interface for destructors and printers.
5964 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5965 printer_location members, and change the type of the destructor and
5966 printer members to code_props.
5967 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5968 symbol_printer_get, semantic_type_destructor_set,
5969 semantic_type_printer_set, default_tagged_destructor_set,
5970 default_tagless_destructor_set, default_tagged_printer_set,
5971 default_tagless_printer_set): Use code_props in arguments and return
5972 types in place of char const * and location.
5973 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5974 since the locations are now contained in the return of
5975 symbol_destructor_get and symbol_printer_get.
5976 * src/output.c (symbol_destructors_output, symbol_printers_output):
5977 Replace with...
5978 (symbol_code_props_output): ... this to eliminate duplicate code.
5979 (output_skeleton): Update to use symbol_code_props_output.
5980 * src/reader.c (symbol_should_be_used): Update use of
5981 symbol_destructor_get.
5982 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5983 Update uses of the various _destructor_set and _printer_set functions.
5984 * src/symtab.c: (default_tagged_destructor_location,
5985 default_tagless_destructor_location, default_tagged_printer_location,
5986 default_tagless_printer_location): Remove since we...
5987 (default_tagged_destructor, default_tagless_destructor,
5988 default_tagged_printer, default_tagless_printer): ... change the type
5989 of these to code_props.
5990 (symbol_new, semantic_type_new, symbol_destructor_set,
5991 semantic_type_destructor_set, symbol_destructor_get,
5992 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5993 symbol_check_alias_consistency, default_tagged_destructor_set,
5994 default_tagless_destructor_set, default_tagged_printer_set,
5995 default_tagless_printer_set): Update.
5996 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5997 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5998 code_props members.
5999 (symbol_print): Use SYMBOL_CODE_PRINT.
6000
6001 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6002
6003 Use the new code_props interface for rule actions.
6004 * src/symlist.h (symbol_list): Replace action, action_location, and
6005 used members with a code_props action_props member.
6006 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6007 grammar_midrule_action, grammar_current_rule_merge_set,
6008 grammar_current_rule_symbol_append, packgram): Update.
6009 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6010 * src/scan-code.l (handle_action_dollar): Update.
6011 (translate_rule_action): Remove, no longer used.
6012 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6013
6014 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6015
6016 Use the new code_props interface in parse-gram.y.
6017 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6018 Update all uses of translate_* functions to use the new code_props
6019 interface and to use gram_scanner_last_string_free and
6020 code_scanner_last_string_free where possible.
6021 (grammar_declaration): symbol_list_destructor_set and
6022 symbol_list_printer_set now perform the translation, so don't do it
6023 here. Use gram_scanner_last_string_free where possible.
6024 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6025 translate_code): Remove, no longer used.
6026 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6027 symbol_list_printer_set): Perform code translation here rather than
6028 depending on the caller to do so.
6029
6030 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6031 * src/scan-gram.h (gram_last_string): Remove declaration.
6032 * src/scan-gram.l (last_string): Declare it static.
6033
6034 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6035
6036 Encapsulate code properties and related functionality for the various
6037 destructors, printers, and actions into a code_props structure and
6038 interface. This patch merely implements code_props in scan-code.h and
6039 scan-code.l. Future patches will rewrite other modules to use it.
6040 Discussed starting at
6041 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6042 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6043 consistently initialize const structs that have an empty location
6044 field.
6045 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6046 to ensure consistency.
6047 * src/scan-code.h (code_props): New structure.
6048 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6049 function, macro, and const global variable for initializing a
6050 code_props with no code.
6051 (code_props_plain_init, code_props_symbol_action_init,
6052 code_props_rule_action_init, code_props_translate_code): The rest of
6053 the new code_props functional interface. Among other things, the init
6054 functions set the code_props kind field so that
6055 code_props_translate_code will know whether to behave like
6056 translate_symbol_action, translate_rule_action, or translate_code.
6057 These old translate functions must remain until all other modules are
6058 updated to use the new code_props interface.
6059 (code_scanner_last_string_free): New function similar to
6060 gram_scanner_last_string_free.
6061 (code_scanner_free): Add documentation.
6062 * src/scan-code.l: Implement the new interface.
6063 (code_lex): Make it static, add a code_props* argument, and remove the
6064 rule argument.
6065 (last_string): New static global similar to the one in scan-gram.l.
6066 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6067 instead of rule.
6068 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6069 code_props since Bison may one day use this information for destructors
6070 and printers.
6071 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6072 (handle_action_dollar): Use symbol_list_n_get and set used flag
6073 directly since symbol_list_n_used_set is removed.
6074 (translate_action): Add a code_props* argument and remove the rule,
6075 action, and location arguments. Pass the code_props* on to code_lex.
6076 (translate_rule_action, translate_symbol_action, translate_code):
6077 Rewrite as wrappers around the new code_props interface.
6078 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6079 it would eventually need to break the encapsulation of code_props.
6080
6081 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6082
6083 * etc/.cvsignore: New.
6084
6085 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6086
6087 Add maintainer-push-check to run maintainer-check using push parsing in
6088 place of pull parsing where available.
6089 * Makefile.am (maintainer-push-check): New.
6090 * data/bison.m4 (b4_use_push_for_pull_if): New.
6091 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6092 appropriately based on their existing values.
6093 (yypush_parse): Don't print push-parser-specific diagnostics if push
6094 parsing is being used in place of pull parsing.
6095 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6096 push.c.
6097 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6098 variable, and insert b4_use_push_for_pull_flag into muscles.
6099 * tests/Makefile.am (maintainer-push-check): New.
6100
6101 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6102
6103 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6104 (whether successful or failed) so that yypush_parse can be invoked
6105 again to start a new parse using the same yypstate.
6106 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6107 check multiple yypull_parse invocations on the same yypstate. For pull
6108 mode, extend to check multiple yyparse invocations.
6109 (Exploding the Stack Size with Alloca): Extend to try with
6110 %push-pull-parser.
6111 (Exploding the Stack Size with Malloc): Likewise.
6112
6113 * tests/calc.at (Simple LALR Calculator): Don't specify
6114 %skeleton "push.c" since %push-pull-parser implies that now.
6115 * tests/headers.at (export YYLTYPE): Don't check for the push
6116 declarations. Otherwise, this test case can't be used to see if push
6117 mode can truly emulate pull mode.
6118 * tests/input.at (Torturing the Scanner): Likewise.
6119 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6120 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6121 AT_YACC_IF, which now includes the case of push mode since %skeleton
6122 need not be used for push mode. This will be more intuitive once
6123 push.c is renamed to yacc.c.
6124
6125 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6126
6127 For push mode, convert yyparse from a macro to a function, invoke yylex
6128 instead of passing a yylexp argument to yypull_parse, and don't
6129 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6130 Discussed starting at
6131 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6132 * data/bison.m4 (b4_pull_if): New.
6133 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6134 * data/push.c: Improve M4 quoting a little.
6135 (b4_generate_macro_args, b4_parenthesize): Remove.
6136 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6137 any time a pull parser is requested.
6138 Don't #define this as a wrapper around yypull_parse. Instead, when
6139 both push and pull are requested, make it a function that does that
6140 same thing.
6141 (yypull_parse): If there's a b4_prefix, #define this to
6142 b4_prefix[pull_parse] when both push and pull are requested.
6143 Don't define this as a function unless both push and pull are
6144 requested.
6145 Remove the yylexp argument and hard-code yylex invocation instead.
6146 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6147 %push-parser.
6148 * src/getargs.c (pull_parser): New global initialized to true.
6149 * getargs.h (pull_parser): extern it.
6150 * src/output.c (prepare): Insert pull_flag muscle.
6151 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6152 (prologue_declaration): Set both push_parser and pull_parser = true for
6153 %push-pull-parser. Set push_parser = true and pull_parser = false for
6154 %push-parser.
6155 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6156 %push-parser since there's no backward-compatibility concern here.
6157 Scan %push-pull-parser.
6158 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6159 instead of %push-parser.
6160 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6161 prototype it in the module that calls yyparse.
6162 * tests/input.at (Torturing the Scanner): Likewise.
6163 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6164
6165 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6166
6167 Update etc/bench.pl. Optimize push mode a little (the yyn change
6168 deserves most of the credit).
6169 * Makefile.am (SUBDIRS): Add etc subdirectory.
6170 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6171 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6172 yytoken, yyval, and yyloc declarations to...
6173 (yyparse or yypush_parse): ... here to improve performance. For
6174 yypush_parse invocations after the first, be sure to assign yyn its old
6175 value again.
6176 (yypstate_new): Don't bother initializing the yyresult field since the
6177 initial value isn't used.
6178 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6179 remove the #define that, in push mode, set it to yyps->NAME.
6180 * etc/Makefile.am: New.
6181 * etc/bench.pl: Remove and build it instead from...
6182 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6183 "tests/bison" from the build directory by default rather than just
6184 invoking "bison" from $PATH.
6185 (calc_grammar): Update push parser code: don't declare yylval globally,
6186 don't define yyparse_wrapper, and don't #define yyparse.
6187 (bench_grammar): Update to check all working combinations of yacc.c,
6188 push.c, impure, pure, pull, and push.
6189
6190 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6191
6192 For push mode, add pull wrappers around yypush_parse.
6193 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6194 (yypull_parse): New function wrapping yypush_parse.
6195 (yyparse): New #define wrapping yypull_parse.
6196 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6197 is declared.
6198 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6199 prototype yylex in the module that calls yyparse, and don't prototype
6200 yyparse there. Otherwise, the yyparse expansion won't compile.
6201 * tests/input.at (Torturing the Scanner): Likewise.
6202
6203 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6204
6205 Enable push parsers to operate in impure mode. Thus, %push-parser no
6206 longer implies %pure-parser. The point of this change is to move
6207 towards being able to test the push parser code by running the entire
6208 test suite as if %push-parser had been declared.
6209 * data/push.c (yypush_parse): For impure mode, remove the
6210 yypushed_char, yypushed_val, and yypushed_loc arguments.
6211 Instead, declare these as local variables initialized to the global
6212 yychar, yylval, and yylloc.
6213 For the first yypush_parse invocation only, restore the initial values
6214 of these global variables when it's time to read a token since they
6215 have been overwritten.
6216 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6217 %push-parser.
6218 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6219 %pure-parser along with %push-parser since this test case was designed
6220 for pure push parsers.
6221 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6222 (AT_YACC_OR_PUSH_IF): New.
6223 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6224 add a note that it's still wrong for some cases (as it has been for a
6225 while).
6226 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6227 %push-parser no longer implies %pure-parser.
6228
6229 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6230
6231 Remove some unnecessary differences between the pull parser code and
6232 the push parser code. This patch enables yynerrs in push mode.
6233 * data/push.c: Reformat M4 a little.
6234 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6235 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6236 because push mode is on. Instead, if pure mode is on, move yynerrs
6237 to...
6238 (b4_declare_parser_state_variables): ... here.
6239 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6240 to yyps->NAME so it can be used in yypush_parse.
6241 (yypush_parse): Don't omit uses of yynerrs in push mode.
6242
6243 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6244
6245 Fix bug such that the first pushed token's value and location are
6246 sometimes overwritten (sometimes by %initial-action) before being used.
6247 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6248 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6249 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6250 more closely mimic the pull parser logic.
6251 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6252 time to read a token, which is after any initialization of yylval and
6253 yylloc.
6254 (gottoken): Rename label to...
6255 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6256 user namespace.
6257
6258 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6259
6260 Rearrange initialization of the parser state variables so that the
6261 skeleton doesn't have to have a copy for pull mode and another for push
6262 mode. This patch also fixes at least a bug such that yylloc was not
6263 initialized (with b4_location_initial_line and
6264 b4_location_initial_column) upon calling yypush_parse. However, that
6265 initialization now overwrites the first token's location;
6266 %initial-action assigning @$ already did the same thing, and both bugs
6267 will be fixed in a later patch.
6268 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6269 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6270 yyss, yyvs, yyls, and yystacksize.
6271 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6272 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6273 yylsp.
6274 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6275 yyps->NAME so it can be used in yypush_parse.
6276 (yyparse or yypush_parse): For yypush_parse, don't print the
6277 "Starting parse" diagnostic for invocations after the first.
6278 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6279 yypush_parse, only do it for the first invocation.
6280 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6281 initialization to occur in yypush_parse but only on the first
6282 invocation.
6283
6284 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6285
6286 * data/push.c: Add CPP guards around push parser declarations in both
6287 the header and the code file.
6288 In the code file, move the push parser declarations to the same place
6289 they appear in the header file.
6290 Clean up the M4 some, especially the inconsistent underquoting in
6291 some b4_c_function_def and b4_c_function_decl uses.
6292
6293 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6294
6295 Encapsulate the push parser state variables into an M4 macro so the
6296 push skeleton doesn't have to list them again for pull mode's yyparse.
6297 For push mode, remove yypush_parse's local equivalents of these
6298 variables to eliminate unnecessary copying between the two sets at
6299 run-time. This patch also fixes at least a bug related to multiple
6300 %initial-action invocations in push mode.
6301 * data/push.c (b4_declare_parser_variables): Rename to...
6302 (b4_declare_scanner_communication_variables): ... this for clarity and
6303 update both uses.
6304 (b4_declare_yyparse_variables): Remove and move its contents to the one
6305 spot where it was invoked.
6306 (b4_declare_parser_state_variables): New macro containing the parser
6307 state variables required by push mode.
6308 (struct yypstate): Replace all fields but yynew with
6309 b4_declare_parser_state_variables.
6310 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6311 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6312 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6313 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6314 parser state variable declarations with
6315 b4_declare_parser_state_variables.
6316 Don't initialize parser state variables when calling yypush_parse since
6317 yypstate_new already does that.
6318 Invoke the user's initial action only upon the first yypush_parse
6319 invocation.
6320 Remove all code that copies between the local parser state variables
6321 and the yypstate.
6322
6323 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6324
6325 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6326 prevent a name collision in a future patch where these names will
6327 sometimes be #define'd.
6328 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6329 since it no longer has the same name as the existing argument.
6330 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6331
6332 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6333 and Joel E. Denny <jdenny@ces.clemson.edu>
6334
6335 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6336 that the argument is case-insensitive, and there's no `=' here.
6337 For the %skeleton entry, mention that %language is better.
6338 (Bison Options): Likewise for --language and --skeleton. Move the
6339 --skeleton entry so that the `Tuning the parser' section is sorted
6340 alphabetically on long options.
6341 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6342 %language directive in detail here; cross-reference the %language
6343 documentation instead.
6344 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6345 `%require "2.3b"' so that the example is always up-to-date.
6346 (Table of Symbols): Add entries for %language and %skeleton.
6347 * examples/extexi (normalize): Instead of replacing every %require
6348 argument with the current Bison version, just substitute for
6349 `@value{VERSION}'. This guarantees that we're testing what actually
6350 appears in the documentation.
6351 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6352 rather than `@VERSION@'.
6353
6354 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6355
6356 * NEWS: Reword the %language news a bit, and put it earlier.
6357
6358 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6359 Rewrite to simplify the logic.
6360 (language_argmatch): Likewise.
6361 (program_name): We now own this var.
6362 * src/getargs.h (struct bison_language): Use char[] rather than
6363 const char *.
6364
6365 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6366 Java is supported.
6367 * src/complain.c (program_name): Remove decl; no longer needed.
6368 * src/main.c (program_name): Remove; now belongs to getargs.
6369
6370 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6371
6372 * NEWS: Document %language.
6373
6374 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6375
6376 * data/c-skel.m4, data/c++-skel.m4: New files.
6377 * data/glr.c: Complain on push parsers.
6378
6379 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6380 over %skeleton.
6381 (Decl Summary): Document %language and %skeleton.
6382 (Command line): Document -L.
6383
6384 * examples/extexi: Rewrite %require directive.
6385 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6386
6387 * src/files.c (compute_exts_from_gc): Look in language structure
6388 for .y extension.
6389 (compute_file_name_parts): Check whether .tab should be added.
6390 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6391 (language, skeleton_arg, language_argmatch): New.
6392 (long_options): Add --language.
6393 (getargs): Use skeleton_arg, add -L/--language.
6394 * src/getargs.h: Include location.h.
6395 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6396 * src/output.c (prepare): Pick default skeleton from struct language.
6397 Don't dispatch C skeletons here.
6398 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6399 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6400 * src/scan-gram.l ("%language"): New rule.
6401
6402 * tests/calc.at: Test %skeleton and %language.
6403 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6404 (AT_GLR_IF): Look for %skeleton "glr.cc".
6405 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6406 (AT_YACC_IF): Reject %language.
6407
6408 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6409
6410 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6411 since it wasn't used; only the typedef name 'semantic_type' is needed.
6412 Also, omit trailing white space.
6413
6414 * bootstrap: Sync from coreutils.
6415 (gnulib_extra_files): Add build-aux/announce.gen.
6416 (slurp): Adjust .gitignore files like .cvsignore files.
6417 * build-aux/announce-gen: Remove from CVS, since bootstrap
6418 now creates this.
6419
6420 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6421
6422 Make %push-parser imply %pure-parser. This fixes several bugs; see
6423 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6424 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6425 pure_parser = true.
6426 * data/push.c: Don't bother testing b4_push_if when deciding whether
6427 to expand b4_declare_parser_variables globally.
6428 (yypush_parse): Likewise in here.
6429
6430 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6431 (yy_reduce_print): Reformat M4 for readability.
6432
6433 2006-12-15 Bob Rossi <bob@brasko.net>
6434 and Joel Denny <jdenny@ces.clemson.edu>
6435
6436 * data/push.c (yypstate): Add typedef, and update all uses of
6437 struct yypstate to just yypstate.
6438 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6439
6440 2006-12-14 Bob Rossi <bob@brasko.net>
6441
6442 * data/push.c (yypush_parse): Declare prototype regardless of
6443 %locations option.
6444
6445 2006-12-14 Bob Rossi <bob@brasko.net>
6446
6447 * data/push.c (yyparse): Remove the prototype and the #define when in
6448 push-parser mode.
6449
6450 2006-12-13 Bob Rossi <bob@brasko.net>
6451
6452 * data/push.c (yypstate_init): Rename to...
6453 (yypstate_new): ... this and use b4_c_function_def.
6454 (yypstate_delete): New.
6455 (yypush_parse): Change parameters yynval and yynlloc to be const.
6456 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6457 yypstate_delete functions.
6458
6459 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6460
6461 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6462 strange test case titles. Reported by Bob Rossi.
6463
6464 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6465
6466 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6467 of potential ambiguities in GLR grammers.
6468
6469 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6470
6471 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6472 `bison ', use m4_index instead of m4_substr since chopping up a string
6473 containing M4-special characters causes problems here.
6474
6475 Fix a couple of bugs related to special characters in user-specified
6476 file names, and make it easier for skeletons to compute output file
6477 names with the same file name prefix as Bison-computed output file
6478 names.
6479 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6480 b4_parser_file_name and b4_spec_defines_file instead of
6481 @output_parser_name@ and @output_header_name@, which are now redundant.
6482 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6483 b4_parser_file_name, b4_spec_defines_file, and the new
6484 @basename(FILENAME@) instead of @output_parser_name@ and
6485 @output_header_name@, which inappropriately escaped the file names as
6486 C string literals.
6487 * src/files.c (all_but_ext): Remove static qualifier.
6488 (compute_output_file_names): Move `free (all_but_ext)' to...
6489 (output_file_names_free): ... here since all_but_ext is needed later.
6490 * src/files.h (all_but_ext): Extern.
6491 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6492 exactly what MUSCLE_INSERT_STRING used to do.
6493 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6494 characters are escaped properly.
6495 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6496 all_but_ext.
6497 For pkgdatadir muscle, maintain previous functionality by using
6498 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6499 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6500 digraphs would never be expanded. Hopefully no one has M4-special
6501 characters in his Bison installation path.
6502 * src/scan-skel.l: Don't parse @output_header_name@ and
6503 @output_parser_name@ anymore since they're now redundant.
6504 In @output, use decode_at_digraphs.
6505 Parse a new @basename command that invokes last_component.
6506 (decode_at_digraphs): New.
6507 (BASE_QPUTS): Remove unused.
6508 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6509 (Output file name): New tests.
6510
6511 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6512
6513 Warn about output files that are generated by the skeletons and that
6514 conflict with other output files.
6515 * data/glr.c: Don't generate the header file here when glr.cc does.
6516 * src/files.c (file_names, file_names_count): New static globals.
6517 (compute_output_file_names): Invoke output_file_name_check for files
6518 not generated by the skeletons and remove existing checks.
6519 (output_file_name_check): New function that warns about conflicting
6520 output file names.
6521 (output_file_names_free): Free file_names.
6522 * src/files.h (output_file_name_check): Declare.
6523 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6524 the skeletons.
6525 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6526 (Conflicting output files): New tests.
6527
6528 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6529
6530 * doc/bison.texinfo: Fix a couple of typos.
6531
6532 2006-12-08 Bob Rossi <bob@brasko.net>
6533
6534 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6535 Rename to...
6536 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6537 update all uses.
6538 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6539 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6540 local pv.
6541 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6542 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6543
6544 2006-12-07 Bob Rossi <bob@brasko.net>
6545 and Joel Denny <jdenny@ces.clemson.edu>
6546
6547 * data/push.c (yypvarsinit): Change return type from void* to struct
6548 yypvars*. No longer cast to void* on return.
6549 (struct yypvars): Remove yylen since it need not be remembered between
6550 yypushparse invocations.
6551 (yypushparse): Don't copy between yylen and pv->yylen.
6552
6553 2006-12-05 Bob Rossi <bob@brasko.net>
6554
6555 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6556 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6557 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6558 (struct yypvars): Remove b4_declare_parser_variables.
6559 (yypvarsinit): Remove init code for removed variables.
6560 (global scope): Do not declare b4_declare_parser_variables if
6561 push or pure mode.
6562 (yypushparse): Add b4_declare_parser_variables.
6563 Init new local variables, and remove init code for removed
6564 yypvars variables.
6565 (yyparse): Delete.
6566 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6567 and yyparse for other modes.
6568 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6569 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6570 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6571 (AT_PURE_LEX_IF): True if pure or push parser.
6572
6573 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 Document Yacc prologue alternatives and default %destructor's and
6576 %printer's as experimental. Don't mention Java yet. Discussed at
6577 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6578 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6579 (2.3a): Annotate this entry to say the old forms of these features were
6580 also experimental.
6581 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6582 Table of Symbols): Say they're experimental. Comment out any mention
6583 of Java (we'll want this back eventually).
6584
6585 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6586
6587 Support a file name argument to %defines. Deprecate `=' in
6588 %file-prefix, %name-prefix, and %output. Discussed at
6589 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6590 * NEWS (2.3a+): Mention.
6591 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6592 form of %defines, and remove `=' from entries for %file-prefix,
6593 %name-prefix, and %output.
6594 * src/parse-gram.y (prologue_declaration): Implement.
6595 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6596 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6597 all but one occurrence of %name-prefix.
6598 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6599 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6600 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6601 occurrence of each of %file-prefix and %output. Add check for %defines
6602 with argument.
6603 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6604 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6605 Remove the `=' from %output.
6606
6607 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6608
6609 Don't escape $ in test case titles since Autoconf 2.61 now does that
6610 correctly.
6611 * tests/actions.at (Default %printer and %destructor are not for error
6612 or $undefined): Here.
6613 (Default %printer and %destructor are not for $accept): Here.
6614 * tests/input.at (Invalid $n and @n): Here.
6615
6616 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6617
6618 Rename <!> to <>. Discussed starting at
6619 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6620 * NEWS (2.3a+): Update.
6621 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6622 Update.
6623 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6624 * src/scan-gram.l (INITIAL): Implement.
6625 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6626 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6627 comment.
6628 * tests/actions.at (Default tagless %printer and %destructor,
6629 Default tagged and per-type %printer and %destructor,
6630 Default %printer and %destructor are not for error or $undefined,
6631 Default %printer and %destructor are not for $accept,
6632 Default %printer and %destructor for mid-rule values): Update.
6633 * tests/input.at (Default %printer and %destructor redeclared,
6634 Unused values with default %destructor): Update.
6635
6636 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6637
6638 Don't let %prec take a nonterminal.
6639 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6640 token.
6641 * tests/input.at (%prec takes a token): New test checking that %prec
6642 won't take a nonterminal.
6643
6644 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6645
6646 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6647 it was double-quoted.
6648 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6649 grammar is maintained with Bison's highest standards.
6650 * src/getargs.c: Fix some typos in Doxygen comments.
6651
6652 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6653
6654 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6655 later. Reported by Paul Eggert in
6656 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6657 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6658 * src/scan-code.l (translate_action): Don't bother invoking
6659 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6660 (code_scanner_free): Instead of invoking
6661 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6662 which frees more.
6663 * src/scan-gram.l (gram_scanner_free): Likewise.
6664 * src/scan-skel.l (scan_skel): Likewise.
6665
6666 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6667
6668 * src/files.c (tr): Change return type to void.
6669 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6670 has been called previously for the same key.
6671 (muscle_find): Return storage instead of value so that
6672 --enable-gcc-warnings doesn't produce warnings that the return discards
6673 const. aver that the value and storage are the same since storage
6674 could potentially be NULL when value is not.
6675 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6676 same as 0.
6677
6678 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6679
6680 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6681 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6682 us a slightly cleaner distribution, and also works.
6683 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6684 gnulib changes.
6685
6686 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6687 and Paul Eggert <eggert@cs.ucla.edu>
6688
6689 Don't let Bison leak memory except when it complains.
6690 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6691 (spec_defines_file, dir_prefix): Now char *, not const char *,
6692 since they are freed.
6693 * src/files.c: Likewise.
6694 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6695 Likewise.
6696 (tr): Now operates in-place. All uses changed.
6697 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6698 values.
6699 (compute_file_name_parts, compute_output_file_names): Don't store
6700 read-only data in variables that will be freed.
6701 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6702 src_extension, and header_extension.
6703 (output_file_names_free): New public function to free
6704 spec_verbose_file, spec_graph_file, spec_defines_file,
6705 parser_file_name, and dir_prefix.
6706 * src/getargs.c (getargs): Don't store read-only data in variables that
6707 will be freed.
6708 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6709 (which previously existed but was unused), and quotearg_free.
6710 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6711 * src/muscle_tab.c: Likewise.
6712 (muscle_entry): Make the value char const *,
6713 and add a new storage member that is char * and can be freed.
6714 (muscle_entry_free): New private function.
6715 (muscle_init): Use it instead of free.
6716 (muscle_insert, muscle_grow): Update and use new storage member.
6717 (muscle_code_grow): Free the string passed to muscle_grow
6718 since it's not needed anymore.
6719 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6720 add a new `char *code' member.
6721 ("{...}"): Declare semantic type as code.
6722 * src/scan-code.h (translate_rule_action):
6723 (translate_symbol_action, translate_code, translate_action): Return
6724 `char const *' rather than `char *' since external code should not free
6725 these strings.
6726 * src/scan-code.l: Likewise.
6727 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6728 which is "{...}" in the parser.
6729 * tests/Makefile.am (maintainer-check-valgrind): Set
6730 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6731 Valgrind.
6732 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6733 complain.
6734 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6735 expecting a non-zero exit status sets --leak-check=summary and
6736 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6737 this case, and we don't want to hear about it.
6738
6739 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6740
6741 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6742 instead of from the template, to simplify configuration a bit.
6743 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6744 and m4/wint_t.m4, as they are needed with the latest gnulib.
6745
6746 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6747
6748 Disable unset/unused mid-rule value warnings by default, and recognize
6749 --warnings=midrule-values to enable them. Discussed starting at
6750 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6751 * NEWS (2.3a+): Mention.
6752 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6753 warnings): Add entry for midrule-values subargument.
6754 * src/reader.c (symbol_should_be_used): Don't return true just because
6755 the value is a set/used mid-rule value unless
6756 --warnings=midrule-values was specified.
6757 * tests/input.at (Unused values, Unused values before symbol
6758 declarations): Run tests with and without --warnings=midrule-values.
6759
6760 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6761 than LIST_FREE directly.
6762
6763 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6764
6765 Finish implementing --warnings=error, which should not be implied by
6766 --warnings=all (or by its synonyms -W and --warnings without
6767 subarguments).
6768 * src/complain.c (set_warning_issued): New function to report that
6769 warnings are being treated as errors and to record an error if so.
6770 Invoke...
6771 (warn_at, warn): ... here.
6772 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6773 "error - warnings are errors" does not appear above "all - all of the
6774 above".
6775 (getargs): For -W and --warnings without subarguments, don't let
6776 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6777 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6778
6779 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6780
6781 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6782 empty subargument list. For example: `bison --warnings= parser.y'.
6783
6784 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6785
6786 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6787 the parser header file so that gcc doesn't warn.
6788
6789 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6790
6791 Split the default %destructor/%printer into two kinds: <*> and <!>.
6792 Discussed starting at
6793 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6794 * NEWS (2.3a+): Mention.
6795 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6796 previous change today related to mid-rules.
6797 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6798 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6799 (TYPE_TAG_ANY): Add as <*>.
6800 (TYPE_TAG_NONE): Add as <!>.
6801 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6802 for <*> and <!>.
6803 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6804 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6805 * src/symlist.c (symbol_list_default_new): Split into tagged and
6806 tagless versions.
6807 (symbol_list_destructor_set, symbol_list_printer_set): Split
6808 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6809 SYMLIST_DEFAULT_TAGLESS.
6810 * src/symlist.h: Update symbol_list_default*_new prototypes.
6811 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6812 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6813 * src/symtab.c (default_destructor, default_destructor_location,
6814 default_printer, default_printer_location): Split each into tagged and
6815 tagless versions.
6816 (symbol_destructor_get, symbol_destructor_location_get,
6817 symbol_printer_get, symbol_printer_location_get): Implement tagged
6818 default and tagless default cases.
6819 (default_destructor_set, default_printer_set): Split each into tagged
6820 and tagless versions.
6821 * src/symtab.h: Update prototypes.
6822 * tests/actions.at (Default %printer and %destructor): Rename to...
6823 (Default tagless %printer and %destructor): ... this, and extend.
6824 (Per-type %printer and %destructor): Rename to...
6825 (Default tagged and per-type %printer and %destructor): ... this, and
6826 extend.
6827 (Default %printer and %destructor for user-defined end token): Extend.
6828 (Default %printer and %destructor are not for error or $undefined):
6829 Update.
6830 (Default %printer and %destructor are not for $accept): Update.
6831 (Default %printer and %destructor for mid-rule values): Extend.
6832 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6833 (Unused values with default %destructor): Extend.
6834
6835 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6836
6837 Don't apply the default %destructor/%printer to an unreferenced midrule
6838 value. Mentioned at
6839 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6840 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6841 like $@n instead of just @n so that the default %destructor/%printer
6842 logic doesn't see them as user-defined symbols.
6843 (symbol_is_dummy): Check for both forms of the name.
6844 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6845 name for which the midrule value is referenced in any action.
6846 * tests/actions.at (Default %printer and %destructor for mid-rule
6847 values): New test.
6848 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6849 for change to dummy symbol names.
6850
6851 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6852
6853 Warn about unset midrule $$ if the corresponding $n is used.
6854 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6855 $n usage.
6856 (packgram): Before invoking grammar_rule_check on any rule, make sure
6857 all actions have already been scanned in order to set `used' flags.
6858 Otherwise, checking that a midrule's $$ is set will not always work
6859 properly because the midrule check must forward-reference the midrule's
6860 parent rule.
6861 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6862 warning.
6863
6864 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6865
6866 More improvements to the documentation of the prologue alternatives:
6867 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6868 Bison manual.
6869 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6870 some text to clarify the relative importance of the new directives and
6871 to show how these directives may be viewed as code labels.
6872
6873 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6874
6875 Similar to the recently removed %before-header, add %code-top as the
6876 alternative to the pre-prologue. Mentioned at
6877 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6878 Also, let the prologue alternatives appear in the grammar section.
6879 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6880 (prologue_declaration): Move the existing prologue alternatives to...
6881 (grammar_declaration): ... here and add %code-top.
6882 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6883
6884 Clean up and extend documentation for the prologue alternatives.
6885 * NEWS (2.3a+): Describe prologue alternatives.
6886 * doc/bison.texinfo (Prologue): Move discussion of prologue
6887 alternatives to...
6888 (Prologue Alternatives): ... this new section, and extend it to discuss
6889 all 4 directives in detail.
6890 (Table of Symbols): Clean up discussion of prologue alternatives and
6891 add %code-top.
6892
6893 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6894
6895 DJGPP specific issues.
6896
6897 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6898 config.bat accordingly.
6899 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6900 * djgpp/config.site: Likewise.
6901
6902 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6903
6904 Replace %*-header with %provides, %requires, %code. See discussion at
6905 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6906
6907 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6908 (b4_user_start_header): Remove.
6909 * data/glr.c: Use new macros instead of b4_*start_header
6910 and b4_*end_header.
6911 * data/glr.cc: Likewise.
6912 * data/lalr1.cc: Likewise.
6913 * data/push.c: Likewise.
6914 * data/yacc.c: Likewise.
6915
6916 * doc/bison.texinfo: Remove %before-header, rename
6917 %{start,end,after}-header to %requires, %provides, %code.
6918
6919 * src/parse-gram.y: Likewise (also rename token names accordingly).
6920 * src/scan-gram.l: Likewise.
6921 * tests/actions.at: Likewise.
6922
6923 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6924
6925 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6926 Problem reported by Joel E. Denny.
6927
6928 2006-10-14 Jim Meyering <jim@meyering.net>
6929
6930 (Sync from coreutils.)
6931 Work also when the working directory (with e.g. coreutils sources)
6932 is version controlled with git, rather than CVS.
6933 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6934 rather than CVS.
6935 In messages and comments, say e.g., "checked-out sources",
6936 rather than "CVS sources".
6937 (version_controlled_file): New function. Work for git as well as
6938 for CVS. Don't use grep's -q option.
6939 (slurp): Call it here, in place of CVS-specific code.
6940
6941 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6942
6943 Fix testsuite for ./configure --enable-gcc-warnings:
6944 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6945 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6946 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6947 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6948 * test/regression.at (Diagnostic that expects two alternatives):
6949 Likewise.
6950
6951 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6952
6953 * bootstrap.conf (gnulib_modules): Add config-h.
6954 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6955 worry about HAVE_CONFIG_H.
6956 * lib/abitset.c: Likewise.
6957 * lib/bitset.c: Likewise.
6958 * lib/bitset_stats.c: Likewise.
6959 * lib/bitsetv-print.c: Likewise.
6960 * lib/bitsetv.c: Likewise.
6961 * lib/ebitset.c: Likewise.
6962 * lib/get-errno.c: Likewise.
6963 * lib/lbitset.c: Likewise.
6964 * lib/subpipe.c: Likewise.
6965 * lib/timevar.c: Likewise.
6966 * lib/vbitset.c: Likewise.
6967 * lib/bitset.c: Include "bitset.h" first, to test interface.
6968 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6969 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6970 * lib/bitsetv.c: Include "bitsetv.h" first.
6971 * lib/get-errno.c: Include "get-errno.h" first.
6972 * m4/.cvsignore: Add config-h.m4.
6973 * tests/actions.at (Default %printer and %destructor for ...):
6974 Adjust expected line numbers in output to reflect removal of #if
6975 HAVE_CONFIG_H lines.
6976 * tests/glr-regression.at (Missed %merge type warnings when ...):
6977 Likewise.
6978 * tests/regression.at (Braced code in declaration in rules section):
6979 Likewise.
6980 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6981 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6982 Include <config.h> unconditionally.
6983
6984 * bootstrap: Sync from coreutils, as follows:
6985
6986 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6987
6988 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6989 variable was sometimes used without being initialized. This
6990 messed up the installation of the INSTALL file in some cases.
6991
6992 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6993
6994 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6995 --copy. Inspired by a suggestion from Bruno Haible.
6996
6997 2006-10-03 Jim Meyering <jim@meyering.net>
6998
6999 * bootstrap: Undo last change to this file, since now gnulib-tool
7000 sticks with the automake default in generating dependencies.
7001
7002 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7003
7004 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7005 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7006
7007 * doc/bison.1: Add copyright notice.
7008
7009 * data/glr.c: Don't include <stdarg.h>; not used.
7010
7011 * NEWS: The -g and --graph options now output graphs in Graphviz
7012 DOT format, not VCG format.
7013 * doc/bison.1: Likewise.
7014 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
7015 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7016 of this change in
7017 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
7018 * TODO: Remove Graphviz entry.
7019 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7020 remove vcg.c, vcg.h, vcg_defaults.h.
7021 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7022 * src/graphviz.c, src/graphviz.h: New files.
7023 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7024 * src/files.h: Make comment more generic.
7025 * src/main.c (main): Likewise.
7026 * src/print_graph.h: Likewise.
7027 * src/getargs.c (usage): Make usage description more generic.
7028 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7029 (static_graph, fgraph): Remove. All uses changed to pass
7030 arguments instead of sharing a static var.
7031 (print_core, print_actions, print_state, print_graph):
7032 Output graphviz format rather than VCG format.
7033 * tests/.cvsignore: Remove *.vcg; add *.dot.
7034 * tests/output.at: Expect *.dot files, not *.vcg files.
7035
7036 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7037 accommodates the 2006-10-08 change.
7038
7039 2006-10-11 Bob Rossi <bob@brasko.net>
7040
7041 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7042 (b4_yyssa, b4_yyerror_range): New macros.
7043 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7044 (yypvarsinit): Remove init of removed fields.
7045 (yypushparse): Remove use of removed fields; use new macros instead.
7046
7047 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7048
7049 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7050 in a push parser. Reindent slightly to match yacc.c better.
7051
7052 2006-10-11 Bob Rossi <bob@brasko.net>
7053
7054 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7055 yymsg_alloc fields.
7056 (yypvarsinit, yypushparse): Remove init of removed fields.
7057 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7058
7059 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7060
7061 * THANKS: Add Paolo Bonzini and Bob Rossi.
7062
7063 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7064
7065 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7066 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7067 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7068 b4_define_user_cde and uses): Remove.
7069 (b4_comment, b4_prefix, b4_sync_start): New.
7070 * data/bison.m4: New file, with most of the content removed from c.m4.
7071 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7072 * src/output.c (output_skeleton): Pass bison.m4.
7073 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7074 only if specified.
7075
7076 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7077
7078 Fix test failure reported by Tom Lane in
7079 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7080 and try to make such failures easier to catch in the future.
7081 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7082 that's now the caller's responsibility.
7083 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7084 Set yychar = YYEOF if it's negative.
7085 * tests/actions.at (yylex): Abort if asked to read past EOF.
7086 * tests/conflicts.at (yylex): Likewise.
7087 * tests/cxx-type.at (yylex): Likewise.
7088 * tests/glr-regression.at (yylex): Likewise.
7089 * tests/input.at (yylex): Likewise.
7090 * tests/regression.at (yylex): Likewise.
7091 * tests/torture.at (yylex): Likewise.
7092
7093 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7094
7095 Fix problems with translating English-language diagnostics.
7096 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7097 respect to bison-runtime pot generation. The YY_ stuff
7098 wasn't being captured.
7099 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7100 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7101 * runtime-po/POTFILES.in: Add data/push.c.
7102
7103 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7104
7105 Merge bootstrap changes from coreutils.
7106
7107 2006-09-28 Jim Meyering <jim@meyering.net>
7108
7109 Automatically generated dependencies are important even
7110 when all of the sources in a directory come from gnulib.
7111 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7112 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7113
7114 2006-09-23 Jim Meyering <jim@meyering.net>
7115
7116 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7117
7118 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7119
7120 * bootstrap: Add support for --force.
7121 (usage): New function. Describe usage less tersely.
7122 (CVS_only_file): New var.
7123
7124 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7125
7126 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7127 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7128 Adjust white space and comments to match GNU style better.
7129
7130 2006-09-20 Bob Rossi <bob@brasko.net>
7131
7132 * data/push.c (yyresult_get): Remove function.
7133 (YYPUSH_MORE): Add #define.
7134 (yypushparse): Modify return value.
7135
7136 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7137
7138 * stamp-h.in: Remove; no longer needed.
7139 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7140 Remove config.h, config.hin, intl (no longer created).
7141 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7142 stamp-h1.
7143
7144 Sync bootstrap from coreutils, as follows:
7145
7146 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7147
7148 * bootstrap (symlink_to_gnulib): New function.
7149 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7150 to copies-of-gnulib.
7151 (cp_mark_as_generated, slurp, gnulib_files):
7152 Avoid making a copy if it's the same as the old version.
7153 (gnulib_files): Add support for this variable (used by Bison).
7154
7155 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7156
7157 * src/getargs.c (usage): Rework to use conventions similar to
7158 coreutils, to make translation a bit easier and the code a bit
7159 smaller. Problem reported by Tim Van Holder.
7160
7161 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7162
7163 Use some of gnulib's new modules, taken from coreutils.
7164
7165 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7166 * bootstrap.conf: New file.
7167 (gnulib_modules): Add configmake, inttypes, unistd.
7168 (XGETTEXT_OPTIONS): Add complain, complain_at,
7169 fatal, fatal_at, warn, warn_at, unexpected_end.
7170 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7171 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7172 (gl_EARLY): Add.
7173 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7174 (gl_INIT): Add
7175 (GNULIB_AUTOCONF_SNIPPET): Remove.
7176 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7177 the pickiest.
7178 * lib/.cvsignore: Add inttypes_.h.
7179 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7180 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7181 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7182 no-longer-necessary initializations.
7183 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7184 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7185 use the unistd module.
7186 * src/system.h: Likewise.
7187 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7188 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7189 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7190 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7191 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7192 * src/system.h: Include inttypes.h unconditionally, now that we
7193 use the inttypes module. Don't bother to include stdint.h, since
7194 inttypes.h now does that for us.
7195 (LOCALEDIR): Remove, now that we use the configmake module.
7196 * src/getargs.c: Include configmake.h.
7197 * src/main.c: Likewise.
7198 * src/output.c: Likewise.
7199 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7200 not from $abs_top_builddir, since config.h moved.
7201
7202
7203 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7204 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7205
7206 * src/parse-gram.y (symbol_declaration): Don't put statements
7207 before declarations; it's not portable to C89.
7208 * src/scan-code.l (handle_action_at): Likewise.
7209
7210 * src/scan-code.l: Always initialize braces_level; the old code
7211 left it uninitialized and therefore had undefined behavior.
7212
7213 Don't attempt to redefine 'assert', since it runs afoul of
7214 systems where standard headers (mistakenly) include <assert.h>.
7215 Instead, define and use our own alternative, called 'aver'.
7216 * src/reader.c: Don't include assert.h, since we no longer
7217 use assert.
7218 * src/scan-code.l: Likewise.
7219 * src/system.h (assert): Remove, replacing with....
7220 (aver): New function, taking a bool arg. All uses changed.
7221 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7222 not merely an integer.
7223
7224 2006-09-15 Bob Rossi <bob@brasko.net>
7225
7226 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7227 * data/c.m4 (YYPUSH): New.
7228 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7229 * src/getargs.c (push_parser): New var.
7230 * src/getargs.h (push_parser): New declaration.
7231 * src/output.c (prepare): Add macro insertion of `push_flag'.
7232 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7233 (prologue_declaration): Parse %push-parser.
7234 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7235 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7236 list of removed lines from the traces observed.
7237 (AT_CHECK_CALC_LALR): Added push parser tests.
7238
7239 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7240
7241 * NEWS: Version 2.3a.
7242 * configure.ac (AC_INIT): Likewise.
7243
7244 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7245 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7246 due to header ordering dependencies. I don't know why the #define
7247 was there.
7248
7249 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7250 runtime cost when YYDEBUG is not defined, and so that some tests
7251 that used to fail now work. Problem and initial suggestion by
7252 Paolo Bonzini.
7253 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7254 * data/glr.cc (b4_parser_class_name):
7255 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7256 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7257 (yydebug_) [YYDEBUG]: New member.
7258 (yycdebug_): Now defined only if YYDEBUG.
7259 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7260 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7261 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7262 if YYYDEBUG.
7263 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7264 Define only if YYDEBUG.
7265 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7266 set_debug_level.
7267 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7268 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7269 AT_CHECK_CALC_GLR_CC that are working now.
7270
7271 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7272
7273 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7274 We don't need them in glr.cc, and glr.c defines them.
7275 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7276 assumes that defining it to anything is the same as defining
7277 it to 1. Problem reported by Paolo Bonzini.
7278
7279 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7280
7281 * data/c.m4 (b4_null, b4_case): Define.
7282 * src/output.c (prepare_symbols): Use b4_null.
7283 (user_actions_output): Use b4_case.
7284
7285 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * data/glr.c (b4_shared_declarations): Put start-header first,
7288 before any #includes that we generate, so that feature-test
7289 macros work. Problem reported by Michael Deutschmann in
7290 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7291 * data/lalr1.cc: Likewise.
7292 * doc/bison.texinfo (Prologue): Document that feature-test macros
7293 should be defined before any Bison declarations.
7294 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7295 that depend on location.hh after, not before, Bison decls, since
7296 we now include location.hh after the first user prologue.
7297
7298 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7299 Sander Brandenburg in
7300 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7301 Also, fix minor white space and comment issues.
7302 (Prologue): Mention that it's better to define feature-test macros
7303 before Bison declarations. Problem reported by Michael Deutschmann.
7304
7305 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7306 by Jim Meyering.
7307 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7308 This adjusts to recent gnulib changes.
7309
7310 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7311
7312 Finish implementation of per-type %destructor/%printer. Discussed
7313 starting at
7314 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7315 and
7316 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7317 * NEWS (2.3+): Add a description of this feature to the default
7318 %destructor/%printer description.
7319 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7320 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7321 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7322 list node contains a semantic type.
7323 * src/symtab.c, src/symtab.h: Extend with a table that associates
7324 semantic types with their %destructor's and %printer's.
7325 (semantic_type_from_uniqstr, semantic_type_get,
7326 semantic_type_destructor_set, semantic_type_printer_set): New functions
7327 composing the public interface of that table.
7328 (symbol_destructor_get, symbol_destructor_location_get,
7329 symbol_printer_get, symbol_printer_location_get): If there's no
7330 per-symbol %destructor/%printer, look up the per-type before trying
7331 the default.
7332 * tests/actions.at (Per-type %printer and %destructor): New test case.
7333 * tests/input.at (Default %printer and %destructor redeclared):
7334 Extend to check that multiple occurrences of %symbol-default in a
7335 single %destructor/%printer declaration is an error.
7336 (Per-type %printer and %destructor redeclared, Unused values with
7337 per-type %destructor): New test cases.
7338
7339 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7340
7341 Require default %destructor/%printer to be declared using
7342 %symbol-default instead of an empty symbol list, and start working on
7343 new per-type %destructor/%printer. Discussed at
7344 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7345 * NEWS (2.3+): Add %symbol-default to example.
7346 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7347 (Table of Symbols): Add entry for %symbol-default.
7348 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7349 (generic_symlist, generic_symlist_item): New nonterminals for creating
7350 a list in which each item is a symbol, semantic type, or
7351 %symbol-default.
7352 (grammar_declaration): Use generic_symlist in %destructor and %printer
7353 declarations instead of symbols.1 or an empty list.
7354 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7355 for changes to symbol_list.
7356 * src/reader.c: Update for changes to symbol_list.
7357 * src/scan-code.l: Likewise.
7358 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7359 * src/symlist.c, src/symlist.h: Extend such that a list node may
7360 represent a semantic type or a %symbol-default in addition to just an
7361 ordinary symbol. Add switched functions for setting %destructor's and
7362 %printer's.
7363 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7364 %destructor/%printer declarations.
7365
7366 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7367
7368 Whether the default %destructor/%printer applies to a particular symbol
7369 isn't a question of whether the user *declares* that symbol (in %token,
7370 for example). It's a question of whether the user by any means
7371 *defines* the symbol at all (by simply using a char token, for
7372 example). $end is defined by Bison whereas any other token with token
7373 number 0 is defined by the user. The error token is always defined by
7374 Bison regardless of whether the user declares it with %token, but we
7375 may one day let the user define error as a nonterminal instead.
7376 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7377 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7378 the meaning of "user-defined".
7379 * tests/actions.at (Default %printer and %destructor for user-declared
7380 end token): Rename to...
7381 (Default %printer and %destructor for user-defined end token): ...
7382 this.
7383
7384 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7385 computation of whether to apply the default, don't maintain a list of
7386 every Bison-defined symbol. Instead, just check for a first character
7387 of '$', which a user symbol cannot have, and check for the error token.
7388
7389 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7390
7391 Don't apply the default %destructor or %printer to the error token,
7392 $undefined, or $accept. This change fits the general rule that the
7393 default %destructor and %printer are only for user-declared symbols,
7394 and it solves several difficulties that are described in the new test
7395 cases listed below.
7396 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7397 * tests/actions.at (Default %printer and %destructor are not for error
7398 or $undefined, Default %printer and %destructor are not for $accept):
7399 New test cases.
7400
7401 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7402
7403 Allow %start after the first rule.
7404 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7405 when parsing the first rule.
7406 (check_and_convert_grammar): Search for it here after all grammar
7407 declarations have been parsed. Skip midrules, which have dummy LHS
7408 nonterminals.
7409 * src/symtab.c (symbol_is_dummy): New function.
7410 * src/symtab.h (symbol_is_dummy): Declare it.
7411 * tests/input.at (%start after first rule): New test.
7412
7413 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7414
7415 Redo some of the previous commit: add back the ability to use
7416 non-aliased/undeclared string literals since it might be useful to
7417 those declaring %token-table.
7418 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7419 commit: don't worry about complaints from symbols_pack.
7420 * src/symtab.c (symbol_new, symbol_class_set,
7421 symbol_check_alias_consistency): Undo changes in previous commit: count
7422 each string literal as a new symbol and token, assign it a symbol
7423 number, and don't complain about non-aliased string literals.
7424 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7425 and token counts but does still set aliased tokens to the same number,
7426 symbol_pack_processor now leaves empty slots in the symbols array.
7427 Remove those slots.
7428 * tests/regression.at (Undeclared string literal): Remove test case
7429 added in previous commit since non-aliased string literals are allowed
7430 again.
7431 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7432 remove unnecessary string literal declarations.
7433 * tests/sets.at (Firsts): Likewise.
7434
7435 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7436
7437 Don't allow an undeclared string literal, but allow a string literal to
7438 be used before its declaration.
7439 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7440 symbols_pack complained.
7441 * src/symtab.c (symbol_new): Don't count a string literal as a new
7442 symbol.
7443 (symbol_class_set): Don't count a string literal as a new token, and
7444 don't assign it a symbol number since symbol_make_alias does that.
7445 (symbol_make_alias): It's not necessary to decrement the symbol and
7446 token counts anymore. Don't assume that an alias declaration occurs
7447 before any uses of the identifier or string, and thus don't assert that
7448 one of them has the highest symbol number so far.
7449 (symbol_check_alias_consistency): Complain if there's a string literal
7450 that wasn't declared as an alias.
7451 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7452 symbol_pack asserts that every token has been assigned a symbol number
7453 although undeclared string literals have not.
7454 * tests/regression.at (String alias declared after use, Undeclared
7455 string literal): New test cases.
7456 (Characters Escapes, Web2c Actions): Declare string literals as
7457 aliases.
7458 * tests/sets.at (Firsts): Likewise.
7459
7460 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7461
7462 In the grammar scanner, STRING_FINISH unclosed constructs and return
7463 them to the parser in order to improve error messages.
7464 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7465 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7466 * tests/input.at (Unclosed constructs): New test case.
7467 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7468 seen.
7469
7470 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7471 unused global.
7472
7473 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7474
7475 Handle string aliases for character tokens correctly.
7476 * src/symtab.c (symbol_user_token_number_set): If the token has an
7477 alias, check and set its alias's user token number instead of its own,
7478 which is set to indicate the alias. Previously, every occurrence of
7479 the character token in the grammar overwrote that alias indicator with
7480 the character code.
7481 * tests/input.at (String aliases for character tokens): New test.
7482
7483 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7484
7485 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7486
7487 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7488
7489 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7490 to prevent failures when building on older platforms.
7491 Check for autopoint failure.
7492 Set XGETTEXT_OPTIONS to values that check for C format strings,
7493 so that translators are warned about them (this also helps
7494 prevent core dumps).
7495
7496 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7497 function, since it simplifies our code a bit.
7498
7499 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7500 rather than -W, so we don't get bogus warnings about sign comparisons.
7501 Add -Wpointer-arith, since that warning is useful (it reports code
7502 that does not conform to C89 and that some compilers reject).
7503 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7504 since it's no longer needed.
7505
7506 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7507
7508 Clean up scanners a bit.
7509 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7510 definitions so gcc won't warn when obstack_for_string is unused.
7511 * src/scan-code.l: config.h and system.h are already #include'd by
7512 scan-code-c.c, so get rid of them here.
7513 * src/scan-gram.l: Likewise.
7514 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7515 definitions rather than duplicating the rest of it.
7516 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7517
7518 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7519
7520 Suppress signed/unsigned comparison warnings for yycheck.
7521 * data/c.m4 (b4_safest_int_type): New macro.
7522 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7523 a signed int type, cast it to b4_safest_int_type first.
7524 * data/yacc.c: Likewise.
7525 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7526 also overwritten.
7527
7528 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7529
7530 * doc/bison.texinfo: Fix some typos.
7531
7532 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7533
7534 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7535 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7536
7537 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7538 the latest gnulib does this a different way.
7539 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7540 translation was patched, so stop omitting it.
7541
7542 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7543
7544 Enable declaration of default %printer/%destructor. Make the parser
7545 use these for all user-declared grammar symbols for which the user does
7546 not declare a specific %printer/%destructor. Thus, the parser uses it
7547 for token 0 if the user declares it but not if Bison generates it as
7548 $end. Discussed starting at
7549 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7550 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7551 and
7552 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7553 * NEWS (2.3+): Mention.
7554 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7555 declare a %destructor for a mid-rule's semantic value. It's just
7556 impossible to declare one specific to it.
7557 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7558 code. Describe default %destructor form.
7559 * src/parse-gram.y (grammar_declaration): Parse default
7560 %printer/%destructor declarations.
7561 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7562 and symbol_destructor_location_get rather than accessing the destructor
7563 and destructor_location members of struct symbol.
7564 (symbol_printers_output): Likewise but for %printer's.
7565 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7566 again.
7567 * src/symtab.c (default_destructor, default_destructor_location,
7568 default_printer, default_printer_location): New static global
7569 variables to record the default %destructor and %printer.
7570 (symbol_destructor_get, symbol_destructor_location_get,
7571 symbol_printer_get, symbol_printer_location_get): New functions to
7572 compute the appropriate %destructor and %printer for a symbol.
7573 (default_destructor_set, default_printer_set): New functions to set the
7574 default %destructor and %printer.
7575 * src/symtab.h: Prototype all those new functions.
7576 * tests/actions.at (Default %printer and %destructor): New test to
7577 check that the right %printer and %destructor are called, that they're
7578 not called for $end, and that $$ and @$ work correctly.
7579 (Default %printer and %destructor for user-declared end token): New
7580 test to check that the default %printer and %destructor are called for
7581 a user-declared end token.
7582 * tests/input.at (Default %printer and %destructor redeclared, Unused
7583 values with default %destructor): New tests to check related grammar
7584 warnings and errors.
7585
7586 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7587
7588 Clean up handling of %destructor for the end token (token 0).
7589 Discussed starting at
7590 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7591 and
7592 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7593
7594 Make the skeletons consistent in how they pop the end token and invoke
7595 its %destructor.
7596 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7597 state, which has token number 0, since this would invoke the
7598 %destructor for the end token.
7599 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7600 until after shifting the end token, or else it won't be popped.
7601 * data/yacc.c (yyparse): Likewise.
7602
7603 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7604 it's the end token. Upon termination, destroy an unshifted lookahead
7605 even when it's the end token.
7606 * data/lalr1.cc (yy::parser::parse): Likewise.
7607 * data/yacc.c (yyparse): Likewise.
7608
7609 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7610 value warnings for the end token when the user gives the end token a
7611 %destructor.
7612
7613 * tests/actions.at (Printers and Destructors): Test all the above.
7614
7615 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 Update to latest gnulib and gettext versions.
7618 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7619 Add fopen-safer.
7620 (gnulib_files): Add m4/warning.m4. Don't worry about files
7621 overwritten by autopoint.
7622 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7623 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7624 rejects them.
7625 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7626 so that we can remove the intl files at a better time.
7627 (intl_files_to_remove): Remove aclocal.m4, since it gets
7628 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7629 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7630 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7631 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7632 Remove datarootdir hack; no longer needed.
7633 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7634 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7635 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7636 strdup.h.
7637 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7638 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7639
7640 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7641
7642 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7643 it with --assume-autoconf='latest-stable'.
7644
7645 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7646
7647 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7648 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7649 YYSTYPE' and `{'.
7650 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7651 those from muscle_tab.c since the old ones are misleading.
7652
7653 2006-07-13 Akim Demaille <akim@epita.fr>
7654
7655 Support %define "KEY" {VALUE}.
7656 * src/scan-code.h, src/scan-code.l (translate_action)
7657 (translate_rule_action, translate_symbol_action, translate_code):
7658 Return char *, not const char *.
7659 * src/parse-gram.y (declaration): Rename as...
7660 (prologue_declaration): this.
7661 (string_content): Remove this nonterminal, use STRING.
7662 (braceless, content, content.opt): New nonterminal.
7663 Use them.
7664 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7665 as value.
7666 * src/scan-gram.l (getargs.h): Don't include it.
7667
7668 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7669
7670 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7671 rather than a for-loop that declares a local bool variable. This
7672 should work around a compatibility problem with a Cray x1e C++
7673 compiler reported by Hung Nguyen in
7674 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7675 The for-loop was introduced in the 2004-11-17 change but I don't
7676 know why it was needed.
7677
7678 2006-07-12 Akim Demaille <akim@epita.fr>
7679
7680 * data/c.m4: Comment changes.
7681
7682 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7683
7684 * src/complain.c (error_message, ERROR_MESSAGE): New.
7685 To factor...
7686 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7687 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7688
7689 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7690
7691 * NEWS: Instead of %union, you can define and use your own union type
7692 YYSTYPE if your grammar contains at least one <type> tag.
7693 Your YYSTYPE need not be a macro; it can be a typedef.
7694 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7695 (Union Decl, Decl Summary): Document this.
7696 * data/glr.c (YYSTYPE): Implement this.
7697 * data/glr.cc (YYSTYPE): Likewise.
7698 * data/lalr1.cc (YYSTYPE): Likewise.
7699 * data/yacc.c (YYSTYPE): Likewise.
7700 * src/output.c (prepare): Output tag_seen_flag.
7701 * src/parse-gram.y (declaration, grammar_declaration):
7702 Use 'union_seen' rather than 'typed' to determine whether
7703 %union has been seen, since grammars can now be typed without
7704 %union.
7705 (symbol_declaration, type.opt, symbol_def):
7706 Keep track of whether a tag has been seen.
7707 * src/reader.c (union_seen, tag_seen): New vars.
7708 (typed): remove.
7709 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7710 * src/scan-code.l (untyped_var_seen): New variable.
7711 (handle_action_dollar): Adjust to above changes.
7712 (handle_action_dollar, handle_action_at):
7713 Improve overflow checking for outlandish numbers.
7714 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7715 avoid new diagnostics generated by above changes.
7716 * tests/regression.at (YYSTYPE typedef): Add test to check
7717 for type tags without %union.
7718
7719 * src/symlist.c (symbol_list_length): Return int, not unsigned
7720 int, since callers expect int. This may need to get revisited
7721 once we have proper integer overflow checking.
7722
7723 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7724 object is now static.
7725
7726 * src/getargs.c (flags_argmatch): Return void, not int,
7727 to pacify ./configure --enable-gcc-warnings.
7728
7729 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7730 since last_string is already defined to FLEX_PREFIX (last_string).
7731
7732 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7733
7734 Implement --warnings/-W.
7735 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7736 replaced by...
7737 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7738 Adjust callers.
7739 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7740 (warnings_args, warnings_types): New.
7741 (getargs, short_options, long_options): Accept -W/--warnings.
7742 Sort the options by alphabetical order, upper case letter right
7743 before its lower case.
7744
7745 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7746
7747 Change %merge result type clash warnings to errors. Discussed at
7748 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7749 * src/reader.c (record_merge_function_type): Use complain_at.
7750 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7751 declared later): Update test case results.
7752
7753 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7754
7755 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7756 to be in alphabetical order.
7757 (trace_args): Spelling fixes.
7758
7759 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7760
7761 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7762 so they don't collide with user-defined macros.
7763 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7764 this was never guaranteed, and now that we're using gnulib stdint,
7765 which defines int_fast16_t to long int, the problem is exposed.
7766
7767 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7768
7769 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7770 need the full POSIX semantics (and weren't implementing them
7771 anyway).
7772
7773 Adjust to Autoconf 2.60 and today's gnulib.
7774 * bootstrap (gnulib_modules): Add stdint.
7775 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7776 no longer copies it.
7777 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7778 since stdint needs the former and wcwidth (which is now required
7779 by mbswidth) needs the latter.
7780 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7781 work around a compatibility glitch between gettext 0.14.6 and
7782 Autoconf 2.60.
7783 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7784 Do not check for uintptr_t, since new stdint module does the right
7785 thing.
7786 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7787 Add stdint.h, stdint_.h, wcwidth.h.
7788 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7789 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7790 stdint.m4, wchar_t.m4, wcwidth.m4.
7791 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7792 usual order for ../lib/*.h files.
7793 (file_name_split): Use last_component, not base_name, to adjust
7794 to gnulib changes.
7795 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7796 for ../lib/*.h files.
7797 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7798 Define unconditionally, since we now assume the stdint module.
7799 * src/scan-skel.l: Include <dirname.h>.
7800 (BASE_QPUTS): Use last_component, not base_name.
7801 * src/system.h: Include <unlocked-io.h> in the usual order
7802 for ../lib/*.h files. Include <stdint.h> unconditionally,
7803 since we now use the stdint module.
7804 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7805 HAVE_UINTPTR_T, since we now use the stdint module.
7806 (base_name): Remove decl, since files now include <dirname.h>
7807 to get the decl.
7808
7809 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7810
7811 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7812 New, default to 1.
7813 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7814 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7815 default.
7816 * tests/calc.at: Adjust.
7817
7818 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7819
7820 * data/c.m4 (b4_basename): New.
7821 (b4_syncline): Also output the location of its invocation (from
7822 the skeleton).
7823 (b4_user_action, b4_define_user_action, b4_user_actions)
7824 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7825 (b4_user_stype): New.
7826 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7827
7828 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7829
7830 In the grammar file, the first column is 1 not 0 on the first line as
7831 on every other line.
7832 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7833 * tests/input.at (Torturing the Scanner): Update output.
7834
7835 * src/scan-gram.l (scanner_cursor): Declare it static.
7836
7837 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7838
7839 In warnings, say "previous declaration" rather than "first
7840 declaration".
7841 * src/symtab.c (redeclaration): Do that here.
7842 * src/reader.c (record_merge_function_type): In the case of a result
7843 type clash, report the previous declaration rather than the very first
7844 one in the grammar file.
7845 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7846 declared later): Add a third declaration to check this behavior.
7847 * tests/input.at (Incompatible Aliases): Update output.
7848
7849 2006-06-27 Akim Demaille <akim@epita.fr>
7850
7851 * doc/Doxyfile.in: New.
7852 * doc/Makefile.am: Use it.
7853 * src/lalr.h, src/symtab.h: Initial doxygenation.
7854
7855 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7856
7857 Don't miss %merge result type warnings just because the LHS types are
7858 declared after the %merge. This continues the effort of the previous
7859 patch.
7860 * src/reader.c (get_merge_function): Don't set the merger type yet.
7861 (record_merge_function_type): New function for setting the merger type
7862 and checking for clashes.
7863 (grammar_current_rule_merge_set): Set the location of the %merge for
7864 the current rule.
7865 (packgram): Invoke record_merge_function_type for each rule now that
7866 all symbol type declarations have been parsed.
7867 * src/reader.h (merger_list.type_declaration_location): New member
7868 storing the location of the first %merge from which the type for this
7869 merging function was derived.
7870 * src/symlist.h (symbol_list.merger_declaration_location): New member
7871 storing the location of a rule's %merge, if any.
7872 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7873 declared later): New test to catch the error fixed by the above patch.
7874
7875 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7876
7877 Get action warnings (grammar_rule_check) right even when symbol
7878 declarations appear after the rules. Discussed at
7879 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7880 and
7881 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7882 Don't mistake the type of $$ in a midrule to be that of its parent
7883 rule's $$.
7884 * src/reader.c (grammar_current_rule_end): Don't invoke
7885 grammar_rule_check yet since not all symbol declarations may have been
7886 parsed yet.
7887 (grammar_midrule_action): Likewise.
7888 Don't record whether the midrule's $$ has been used yet since actions
7889 haven't been translated yet.
7890 Record the midrule's parent rule and its RHS index within the parent
7891 rule.
7892 (grammar_current_rule_action_append): Don't translate the action yet
7893 since not all symbol declarations may have been parsed yet and, thus,
7894 warnings about types for $$, $n, @$, and @n can't be reported yet.
7895 (packgram): Translate the action and invoke grammar_rule_check now that
7896 all symbol declarations have been parsed.
7897 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7898 after parsing the entire grammar file, the symbol list here in the case
7899 of a midrule is actually the midrule's empty RHS, so reference its
7900 parent rule's RHS where necessary.
7901 On the other hand, now that you can already know it's a midrule, you
7902 aren't forced to think $$ has the same type as its parent rule's $$.
7903 (handle_action_at): In the case of a midrule, reference the parent rule
7904 where necessary.
7905 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7906 members.
7907 (symbol_list_length): Now that this is invoked after all rules have
7908 been parsed, a NULL symbol (rather than a NULL symbol list node)
7909 terminates a rule. symbol_list_print already does this correctly.
7910 * src/symlist.h (symbol_list.midrule_parent_rule,
7911 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7912 remember their relationships with their parents.
7913 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7914 fixed by the above patch.
7915 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7916 implementing...
7917 (Unused values): ... this old test case and...
7918 (Unused values before symbol declarations): ... this new test case.
7919 This one is the same as `Unused values' except that all symbol
7920 declarations appear after the rules in order to catch the rest of the
7921 errors fixed by the above patch.
7922
7923 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7924
7925 More cleanup.
7926 * src/reader.c (current_rule): Declare it static since it's no longer
7927 used outside this file.
7928 (grammar_current_rule_action_append): Remove redundant arguments from
7929 translate_rule_action invocation.
7930 * src/reader.h (current_rule): Remove this unused extern.
7931 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7932 * src/scan-code.l (translate_rule_action): Likewise.
7933
7934 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7935
7936 Clean up yesterday's patch.
7937 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7938 to...
7939 * src/reader.c (grammar_current_rule_action_append): ... here for
7940 consistency with grammar_current_rule_symbol_append.
7941 * tests/regression.at (Braced code in declaration in rules section):
7942 Make yyerror and yylex static as usual.
7943
7944 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7945
7946 Fix bug that mistakes braced code in a declaration in the rules section
7947 to be a rule action. Mentioned at
7948 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7949 * src/scan-gram.l: Move midrule action detection from the start of the
7950 scanning of any braced code to...
7951 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7952 action. For readability, use $2 and @2 rather than the equivalent
7953 global variables.
7954 * tests/regression.at (Braced code in declaration in rules section):
7955 New test to catch the error fixed by the above patch.
7956
7957 Work on code readability some.
7958 * src/scan-code.l (current_rule): Get rid of this misleading and
7959 redundant declaration: it's actually extern'ed in reader.h.
7960 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7961 translate_action): Add a rule argument and use it instead of the global
7962 current_rule.
7963 (translate_rule_action): This already receives current_rule through an
7964 argument, so pass it on to translate_action instead of assigning
7965 current_rule to current_rule.
7966 (translate_symbol_action, translate_code): Pass rule = NULL to
7967 translate_action.
7968
7969 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7970
7971 Rename %before-definitions to %start-header and %after-definitions to
7972 %end-header. Don't use these declarations to separate pre-prologue
7973 blocks from post-prologue blocks. Add new order-independent
7974 declarations %before-header and %after-header as alternatives to the
7975 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7976 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7977 * NEWS (2.3+): Update for these changes.
7978 * data/glr.c (b4_before_definitions): Update to...
7979 (b4_start_header): ... this.
7980 (b4_after_definitions): Update to...
7981 (b4_end_header): ... this.
7982 * data/glr.cc: Likewise.
7983 * data/lalr1.cc: Likewise.
7984 * data/yacc.c: Likewise.
7985 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7986 prologue blocks with %*-header declarations.
7987 (Calc++ Parser): Likewise.
7988 (Decl Summary): Update names.
7989 (Table of Symbols): Update description.
7990 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7991 (PERCENT_END_HEADER): ... this.
7992 (PERCENT_BEFORE_DEFINITIONS): Update to...
7993 (PERCENT_START_HEADER): ... this.
7994 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7995 (declaration): Update token names and m4 macro names.
7996 When parsing %end-header and %start-header, invoke translate_code
7997 before muscle_code_grow, and no longer set global booleans to remember
7998 whether these declarations have been seen.
7999 Parse new %after-header and %before-header.
8000 * src/reader.c (before_definitions, after_definitions): Remove.
8001 (prologue_augment): Accept a new bool argument to specify whether to
8002 augment the pre-prologue or post-prologue.
8003 * src/reader.h (before_definitions, after_definitions): Remove these
8004 extern's.
8005 (prologue_augment): Add new bool argument.
8006 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8007 (PERCENT_END_HEADER): ... this.
8008 (PERCENT_BEFORE_DEFINITIONS): Update to...
8009 (PERCENT_START_HEADER): ... this.
8010 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8011 * tests/actions.at (Printers and Destructors): Update names.
8012
8013 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8014
8015 Add comparison operators for C++ location classes. Discussed at
8016 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8017 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8018 declaration indicating whether filename_type has an operator==. If
8019 filename_type is `std::string', it defaults to `1', `0' otherwise.
8020 * data/location.cc: Iff b4_define_location_comparison is `1', add
8021 operator== and operator!= for class position and for class location.
8022
8023 Some minor fixes.
8024 * src/scan-action.l: Remove unused file.
8025 * src/symtab.c (symbol_printer_set): Use printer_location not
8026 destructor_location.
8027 * src/symtab.h (struct symbol): Replace incorrect source comment for
8028 printer members.
8029 * tests/input.at (Incompatible Aliases): Update output with correct
8030 printer location.
8031
8032 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8033
8034 Don't put the pre-prologue in the header file. For the yacc.c code
8035 file and the glr.c header and code files, move the pre-prologue before
8036 the token definitions. Add new %before-definitions and
8037 %after-definitions to declare code that will go in both the header file
8038 and code file. Discussed at
8039 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8040 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8041 and
8042 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8043 * NEWS (2.3+): Describe these changes.
8044 * data/glr.c (b4_pre_prologue): Move from within to before...
8045 (b4_shared_declarations): ... this.
8046 Add new b4_before_definitions before b4_token_enums.
8047 Add new b4_after_definitions at the end.
8048 * data/glr.cc (b4_pre_prologue): Replace with...
8049 (b4_before_definitions): ... this in the header file.
8050 (b4_after_definitions): New near the end of the header file.
8051 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8052 code file right before including the header file.
8053 (b4_before_definitions): New in the previous position of
8054 b4_pre_prologue in the header file.
8055 (b4_after_definitions): New near the end of the header file.
8056 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8057 (b4_token_enums_defines): In the code file, move to right before
8058 YYSTYPE for consistency with the header file.
8059 (b4_before_definitions): New right before b4_token_enums_defines in
8060 both the header and code file.
8061 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8062 header and code file.
8063 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8064 of prologues for %union dependencies.
8065 (Decl Summary): In %defines description, mention the effect of
8066 %before-definitions and %after-definitions on the header file.
8067 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8068 than in the pre-prologue so that make check succeeds.
8069 (Table of Symbols): Add entries for %before-definitions and
8070 %after-definitions.
8071 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8072 %before-definitions.
8073 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8074 (declaration): Parse those declarations and append to
8075 b4_before_definitions and b4_after_definitions, respectively.
8076 * src/reader.c (before_definitions, after_definitions): New bools to
8077 track whether those declarations have been seen.
8078 (prologue_augment): Add to the post-prologue if %union,
8079 %before-definitions, or %after-definitions has been seen.
8080 * src/reader.h (before_definitions, after_definitions): New extern's.
8081 * src/scan-gram.l: Scan the new declarations.
8082 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8083 prologue block in a %before-definitions or a %after-definitions based
8084 on whether the %union is declared.
8085 * tests/regression.at (Early token definitions with --yacc, Early token
8086 definitions without --yacc): Move tests for token definitions into the
8087 post-prologue since token names are no longer defined in the
8088 pre-prologue.
8089
8090 2006-06-20 Akim Demaille <akim@epita.fr>
8091
8092 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8093 (symbol_get): Use it.
8094 * src/parse-gram.y: Use it.
8095
8096 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8097
8098 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8099 build succeeds when configured with --enable-gcc-warnings.
8100
8101 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8102
8103 * src/parse-gram.y (char_name): New function.
8104 (CHAR, STRING, string_content): For %printer, properly escape.
8105 (ID): Prefer fputs to fprintf.
8106 (id): Reindent to be consistent with other rules.
8107 Properly quote char.
8108
8109 The Translation Project changed its way of publishing translations
8110 to maintainers. I haven't received any responses to my request
8111 for supporting the old way, or for documenting the new way. I
8112 have modified 'bootstrap' to use screen scraping
8113 (in this case, HTML scraping). This is unreliable and inelegant,
8114 but I don't see any better way. Yuck.
8115 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8116 (get_translations): New function, which uses HTML scraping to
8117 deduce locations of latest translations.
8118 Use this function to grab both bison and bison-runtime .po files.
8119 Don't bother priming the pump for the runtime-po domain any more,
8120 as it's now translated better than bison is.
8121
8122 2006-06-19 Akim Demaille <akim@epita.fr>
8123
8124 * src/scan-gram.l: No longer "parse" things after `%union' until
8125 `{'. Rather, return a single "%union" token.
8126 No longer make symbols: return strings, and leave the conversion
8127 to symbols to the parser.
8128 (SC_PRE_CODE, token_type): Remove.
8129 * src/parse-gram.y (%union): New field `character'.
8130 Sort tokens.
8131 (CHAR): New token.
8132 (ID, ID_COLON): Now that the scanner no longer makes them
8133 identifiers, adjust all uses to invoke symbol_get.
8134 (id_colon): New, wraps the conversion from string to symbol.
8135 (%union): Accept a possible union_name.
8136 (symbol): Now can be a char.
8137 * data/c.m4 (b4_union_name): Leave a default value.
8138 * data/glr.c, data/yacc.c: Use it.
8139
8140 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8141
8142 For associating token numbers with token names for "yacc.c", don't use
8143 #define statements unless `--yacc' is specified; always use enum
8144 yytokentype. Most important discussions start at:
8145 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8146 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8147 and
8148 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8149 * NEWS (2.3+): Mention.
8150 * data/c.m4 (b4_yacc_if): New.
8151 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8152 token #define's.
8153 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8154 on token name definitions.
8155 * src/getargs.c (usage): Capitalize `Yacc' in English.
8156 * src/output.c (prepare): Define b4_yacc_flag.
8157 * tests/regression.at (Early token definitions): Test that tokens names
8158 are defined before the pre-prologue not just before the post-prologue.
8159 Remove this test case and copy to...
8160 (Early token definitions with --yacc): ... this to test #define's.
8161 (Early token definitions without --yacc): ... and this to test enums.
8162
8163 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8164
8165 * NEWS: Reword the post-2.3 change to not be so optimistic about
8166 removing the old "look-ahead" spelling.
8167 Update previous look-ahead/lookahead change reports.
8168 * REFERENCES: look-ahead -> lookahead (since that's
8169 what he actually wrote).
8170 * doc/refcard.tex: look ahead -> lookahead,
8171 look-ahead -> lookahead
8172
8173 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8174
8175 For consistency, use `lookahead' instead of `look-ahead' or
8176 `look_ahead'. Discussed starting at
8177 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8178 and then at
8179 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8180 * NEWS: For the next release, note the change to `--report'.
8181 * TODO, doc/bison.1: Update English.
8182 * doc/bison.texinfo: Update English.
8183 (Understanding Your Parser, Bison Options): Document as
8184 `--report=lookahead' rather than `--report=look-ahead'.
8185 * src/conflicts.c: Update English in comments.
8186 (lookahead_set): Rename from look_ahead_set.
8187 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8188 (resolve_sr_conflict): Rename local look_ahead_tokens to
8189 lookahead_tokens, and update other uses.
8190 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8191 count_rr_conflicts, conflicts_free): Update uses.
8192 * src/getargs.c (report_args): Move "lookahead" before alternate
8193 spellings.
8194 (report_types): Update uses.
8195 (usage): For `--report' usage description, state `lookahead' spelling
8196 rather than `look-ahead'.
8197 * src/getargs.h (report.report_lookahead_tokens): Rename from
8198 report_look_ahead_tokens.
8199 * src/lalr.c: Update English in comments.
8200 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8201 (state_lookahead_tokens_count): Rename from
8202 state_look_ahead_tokens_count.
8203 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8204 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8205 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8206 Update other uses.
8207 Update English in output.
8208 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8209 * src/print.c: Update English in comments.
8210 (lookahead_set): Rename from look_ahead_set.
8211 (print_reduction): Rename argument lookahead_token from
8212 look_ahead_token.
8213 (print_core, state_default_rule, print_reductions, print_results):
8214 Update uses.
8215 * src/print_graph.c: Update English in comments.
8216 (print_core): Update uses.
8217 * src/state.c: Update English in comments.
8218 (reductions_new): Update uses.
8219 (state_rule_lookahead_tokens_print): Rename from
8220 state_rule_look_ahead_tokens_print, and update other uses.
8221 * src/state.h: Update English in comments.
8222 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8223 (state_rule_lookahead_tokens_print): Rename from
8224 state_rule_look_ahead_tokens_print.
8225 * src/tables.c: Update English in comments.
8226 (conflict_row, action_row): Update uses.
8227 * tests/glr-regression.at
8228 (Incorrect lookahead during deterministic GLR,
8229 Incorrect lookahead during nondeterministic GLR): Rename
8230 print_look_ahead to print_lookahead.
8231 * tests/torture.at: Update English in comments.
8232 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8233 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8234 (Many lookahead tokens): Update uses.
8235 * data/glr.c: Update English in comments.
8236 * lalr1.cc: Likewise.
8237 * yacc.c: Likewise.
8238 * src/conflicts.h: Likewise.
8239 * src/lalr.h: Likewise.
8240 * src/main.c: Likewise.
8241 * src/output.c: Likewise.
8242 * src/parse-gram.c: Likewise.
8243 * src/tables.h: Likewise.
8244 * tests/calc.at: Likewise.
8245
8246 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8247
8248 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8249
8250 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * TODO: Add request from Nelson H. F. Beebe to be able to install
8253 Bison without installing the yacc script.
8254
8255 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8256
8257 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8258 and yytext if they're already #define'd.
8259 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8260 * src/scan-code-c.c: ... here.
8261 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8262 <config.h>.
8263
8264 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8265
8266 Get Bison to build again when configured with --enable-gcc-warnings.
8267 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8268 missing #include's.
8269 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8270 loc argument as it shadows a global.
8271 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8272 invocation.
8273
8274 * src/.cvsignore: Add scan-code.c.
8275
8276 2006-06-07 Akim Demaille <akim@epita.fr>
8277
8278 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8279 to...
8280 * src/scan-code.l: here.
8281 * tests/input.at (Torturing the Scanner): Fix another location
8282 error.
8283
8284 2006-06-07 Akim Demaille <akim@epita.fr>
8285
8286 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8287
8288 2006-06-06 Akim Demaille <akim@epita.fr>
8289
8290 Extract the parsing of user actions from the grammar scanner.
8291 As a consequence, the relation between the grammar scanner and
8292 parser is much simpler. We can also split "composite tokens" back
8293 into simple tokens.
8294 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8295 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8296 rename as...
8297 * src/location.h, src/location.c (add_column_width)
8298 (location_compute): these.
8299 Fix the column count: the initial column is 0.
8300 (location_print): Be robust to ending column being 0.
8301 * src/location.h (boundary_set): New.
8302 * src/main.c: Adjust to scanner_free being renamed as
8303 gram_scanner_free.
8304 * src/output.c: Include scan-code.h.
8305 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8306 Use boundary_set.
8307 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8308 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8309 which is now, again, a separate token.
8310 Adjust all dependencies.
8311 Whereever actions with $ and @ are used, use translate_code.
8312 (action): Remove this nonterminal which is now useless.
8313 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8314 (grammar_current_rule_action_append): Use translate_code.
8315 (packgram): Bound check ruleno, itemno, and rule_length.
8316 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8317 (last_string, last_braced_code_loc, max_left_semantic_context)
8318 (scanner_initialize, scanner_free, scanner_last_string_free)
8319 (gram_out, gram_lineno, YY_DECL_): Move to...
8320 * src/scan-gram.h: this new file.
8321 (YY_DECL): Rename as...
8322 (GRAM_DECL): this.
8323 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8324 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8325 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8326 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8327 Move these declarations, and...
8328 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8329 these to...
8330 * src/flex-scanner.h: this new file.
8331 * src/scan-gram.l (rule_length, rule_length_overflow)
8332 (increment_rule_length): Remove.
8333 (last_braced_code_loc): Rename as...
8334 (gram_last_braced_code_loc): this.
8335 Adjust to the changes of the parser.
8336 Move all the handling of $ and @ into...
8337 * src/scan-code.l: here.
8338 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8339 (handle_action_dollar, handle_action_at): Move to...
8340 * src/scan-code.l: here.
8341 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8342 scan-code.h, scan-code-c.c, scan-gram.h.
8343 (EXTRA_bison_SOURCES): Add scan-code.l.
8344 (BUILT_SOURCES): Add scan-code.c.
8345 (yacc): Be robust to white spaces.
8346
8347 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8348 * tests/regression.at: Adjust the column numbers.
8349 * tests/regression.at: Adjust the error message.
8350
8351 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8352
8353 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8354 Use Akim's wording from
8355 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8356
8357 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8358
8359 Between Bison releases, manually append `+' to the previous Bison
8360 release number, and use that as a signal to automatically print the
8361 ChangeLog's CVS Id keyword from --version. Discussed starting at
8362 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8363 * ChangeLog: Add Id header.
8364 * configure.ac (AC_INIT): Append `+' to `2.3'.
8365 * src/.cvsignore: Add revision.c.
8366 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8367 (BUILT_SOURCES): Add revision.c.
8368 (revision.c): New target rule. This file defines a new global variable
8369 named revision. It initializes it with either the Id from ChangeLog
8370 or, if VERSION doesn't contain `+', with the empty string.
8371 * src/getargs.c (version): Print the value of revision.
8372 * src/revision.h: Extern revision.
8373
8374 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8375
8376 * NEWS: Version 2.3.
8377 * configure.ac (AC_INIT): Likewise.
8378
8379 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8380
8381 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8382 with no arguments, not as an object-like macro. This is for
8383 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8384 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8385 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8386 Document this.
8387
8388 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8389
8390 * src/getargs.c (usage): Back out yesterday's modification of the
8391 --help output so that we don't have to wait for translation before
8392 releasing 2.3.
8393
8394 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8395
8396 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8397 Problem reported by Akim Demaille.
8398
8399 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8400
8401 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8402
8403 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8406 generated source code. Problem reported by Frans Englich in
8407 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8408
8409 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8410
8411 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8412 shell, not within 'make', so that 'make' by an ordinary builder
8413 (using GNU make) does not worry about configuring gzip. This also
8414 works around a bug reported independently by Keith Thompson and by
8415 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8416 stderr rather than stdout, messing up the build logs.
8417
8418 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8419
8420 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8421 to make sure that YYID will never be unused. This fixes a 'make
8422 maintainer-check' failure caused by the recent changes to the 'Trivial
8423 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8424 not used.
8425 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8426
8427 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8428
8429 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8430 state before an empty RHS is always resolved here. Only the location
8431 of that state is guaranteed to be resolved, and that's enough. This
8432 fixes the remaining bug reported by Derek M. Jones in
8433 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8434 * tests/glr-regression.at (Uninitialized location when reporting
8435 ambiguity): Test the above case.
8436 Also, the embedded comments in this test case claim it checks the case
8437 of an empty RHS that has inherited the initial location. However, the
8438 corresponding LHS was already resolved, so yyresolveLocations didn't
8439 actually have reason to modify it. Fix this by forcing
8440 nondeterministic operation at the beginning of the parse.
8441
8442 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8443
8444 * data/c.m4 (b4_yy_symbol_print_generate):
8445 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8446 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8447 of the bugs reported today by Derek M Jones in
8448 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8449 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8450 defined to be a type name without parens or brackets.
8451 (Location Type): Similarly for YYLTYPE.
8452 * tests/regression.at (Trivial grammars): Put in a test for this
8453 bug that will be caught by 'make maintainer-check' (though not,
8454 alas, by 'make check' unless your compiler is picky).
8455
8456 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8457
8458 * NEWS: Version 2.2.
8459 * configure.ac (AC_INIT): Likewise.
8460
8461 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8462
8463 * data/glr.c (yyreportTree): Make room in yystates for the state
8464 preceding the RHS. This fixes the segmentation fault reported by Derek
8465 M. Jones in
8466 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8467 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8468 to the user. Reported for yyreportTree by Derek M. Jones later in the
8469 same thread.
8470 * THANKS: Add Derek M. Jones.
8471 Update my email address.
8472 Fix typo in Steve Murphy's name.
8473
8474 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8475
8476 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8477 checking against YYLAST that caused the parser to miss a potential
8478 alternative in its diagnostic.
8479 Problem reported by Maria Jose Moron Fernandez in
8480 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8481 * data/lalr1.cc (yysyntax_error_): Likewise.
8482 * data/yacc.c (yysyntax_error): Likewise.
8483 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8484 tokens, in case we run into an older C compiler.
8485 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8486 Use them to check for the off-by-one error fixed above.
8487
8488 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8489 YYSIZE_T, not size_t.
8490 * tests/regression.at (Trivial grammars): New test, to catch
8491 the error fixed by the above patch.
8492
8493 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8494
8495 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8496 scheme.
8497 Reported by Steve Murphy.
8498
8499 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8500
8501 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8502 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8503
8504 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8505
8506 Implement --trace=m4.
8507 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8508 * src/output.c (output_skeleton): When set, pass -dV to m4.
8509
8510 Factor the handling of flags in m4.
8511 * src/output.c (prepare): Rename the muscle names debug, defines,
8512 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8513 * data/c.m4: Adjust.
8514 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8515 Use b4_define_flag_if to define other b4_FLAG_if macros.
8516 (b4_location_if): As a consequence, rename as...
8517 (b4_locations_if): this, for consistency.
8518 Adjust all the skeletons.
8519
8520 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8521
8522 * etc/bench.pm: Shorten bench names.
8523
8524 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8525
8526 * src/output.h, src/output.c (error_verbose): Move to...
8527 * src/getargs.h, src/getargs.c: here.
8528 Sort the flags.
8529 Adjust dependencies.
8530
8531 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8532
8533 * data/c.m4 (b4_copyright): Put the special exception for Bison
8534 skeletons here, so we don't have to put it in each skeleton. All
8535 uses changed. Suggested by Akim Demaille. Also, wrap the
8536 copyright notice, in case it is longer than 80 columns. Replace
8537 comma by newline after title.
8538
8539 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8540
8541 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8542 incompatibility, not a bug. Mention that it wasn't fixed as of
8543 flex 2.5.33.
8544
8545 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8546
8547 * examples/extexi: Enforce the precedence of concatenation over
8548 >>.
8549 Reported by Tommy Nordgren.
8550
8551 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8552
8553 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8554 with the member "token".
8555 Reported by Martin Nylin.
8556
8557 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8558
8559 * data/glr.c: Switch to Bison 2.2 special-exception language in
8560 the copyright notice. Use more-regular format for titles and
8561 copyright notices.
8562 * data/glr.cc: Likewise.
8563 * data/location.cc: Likewise.
8564 * data/yacc.cc: Likewise.
8565 * doc/bison.texinfo (Conditions): Document this.
8566 * NEWS: likewise. Upgrade version to 2.2.
8567
8568 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8569
8570 * data/glr.cc: Remove dead code.
8571
8572 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8573
8574 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8575 that variable and the line breaks the bootstrap. Problem reported
8576 by Juan M. Guerrero.
8577
8578 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8579
8580 * doc/bison.texinfo (Multiple start-symbols): New.
8581
8582 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8583
8584 * etc/README, etc/bench.pl: New.
8585
8586 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8587
8588 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8589 rule.
8590 Reported by Mickael Labau.
8591 * tests/input.at (Torturing the Scanner): Test it.
8592
8593 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8594
8595 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8596 Problem reported by Bob Rossi.
8597
8598 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8599
8600 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8601 and didn't really work.
8602 For the index, use @ifnotinfo, not @iftex.
8603 Minor cleanups of spacing and terminology.
8604
8605 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8606
8607 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8608 of AT_NAME_PREFIX when %name-prefix is not used.
8609
8610 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8611
8612 Apply --prefix to C++ skeletons too: they change the namespace.
8613 The test suite already exercize these cases.
8614 * data/c++.m4 (b4_namespace): New.
8615 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8616 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8617 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8618 * doc/bison.texinfo: Document it.
8619 (Option Cross Key): Use @multitable in all formats. It looks
8620 nicer, even in TeX outputs.
8621 (Rules): Use the same code whatever the output type is.
8622 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8623 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8624 * tests/calc.at: Use it, instead of hard coding `yy'.
8625
8626 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8627
8628 * TODO: Remove dead items.
8629
8630 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8631
8632 * doc/FAQ: Remove, merged into...
8633 * doc/bison.texinfo (FAQ): this.
8634 * doc/Makefile.am (EXTRA_DIST): Adjust.
8635
8636 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8637
8638 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8639 even if empty.
8640 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8641 * doc/bison.texinfo (Calc++ Scanner): Use it.
8642
8643 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8644
8645 Fix two nits reported by twlevo, plus one more that I discovered.
8646
8647 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8648 this is the usual Bison style.
8649 * src/location.h (location_print): Likewise.
8650
8651 * src/reader.h (token_name): Likewise.
8652
8653 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8654
8655 Fix some nits reported by twlevo.
8656 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8657 and "POSIX". Use more-modern syntax for URLs. Mention C++
8658 and ask for Java. Don't hardwire OS version numbers. Add
8659 copyright notice.
8660 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8661 * src/conflicts.c (solved_conflicts_obstack): Now static.
8662
8663 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8664
8665 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8666 page. Say "you can use it" not "you may use it" as on the web page;
8667 we're describing capabilities not granting permission.
8668
8669 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8670
8671 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8672 shadowing warnings. Use usual patter for iterating through RHS.
8673 * tests/glr-regression.at
8674 (Uninitialized location when reporting ambiguity):
8675 Modify yylex so that it uses its argument, rather than trying
8676 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8677 const char -> char const.
8678
8679 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8680 Don't use tabs inside commands; it messes up 'ps'.
8681 Problem reported by twlevo.
8682
8683 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8684
8685 * tests/glr-regression.at (Uninitialized location when reporting
8686 ambiguity): New test case.
8687 * data/glr.c (yyresolveLocations): New function, which uses
8688 YYLLOC_DEFAULT.
8689 (yyresolveValue): Invoke yyresolveLocations before reporting an
8690 ambiguity.
8691 * doc/bison.texinfo (Default Action for Locations): Note
8692 YYLLOC_DEFAULT's usage for ambiguity locations.
8693 (GLR Semantic Actions): Cross-reference those notes.
8694
8695 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8696
8697 * tests/glr-regression.at (Leaked semantic values when reporting
8698 ambiguity): Remove unnecessary union and type declarations.
8699 (Leaked lookahead after nondeterministic parse syntax error): New test
8700 case.
8701 * data/glr.c (yyparse): Check for zero stacks remaining before
8702 attempting to shift the lookahead so that you don't lose it.
8703
8704 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8705
8706 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8707 * tests/glr-regression.at (Leaked semantic values when reporting
8708 ambiguity): New test case.
8709 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8710 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8711 now unnecessary yystackp parameter.
8712 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8713 destructors can be called.
8714
8715 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8716 in existing testcases.
8717
8718 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8719
8720 Don't leak semantic values for parent RHS when a user action cuts the
8721 parser, and clean up related code a bit.
8722 * tests/glr-regression.at (Leaked merged semantic value if user action
8723 cuts parse): Rename to...
8724 (Leaked semantic values if user action cuts parse): ... this. Add check
8725 for leaked parent RHS values.
8726 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8727 between an unresolved state (non-empty chain of semantic options) and
8728 an incomplete one (signaled by an empty chain).
8729 (yyresolveStates): Document the interface. Move all manipulation of a
8730 successfully or unsuccessfully resolved yyGLRState to...
8731 (yyresolveValue): ... here so that yyresolveValue always leaves a
8732 yyGLRState with consistent data and thus is easier to understand.
8733 Remove the yyvalp and yylocp parameters since they are always just
8734 taken from the yys parameter. When reporting a discarded merged value
8735 in debugging output, note that it is incompletely merged. Document the
8736 interface.
8737 (yyresolveAction): If resolving any of the RHS states fails, destroy
8738 them all rather than leaking them. Thus, as long as user actions are
8739 written to clean up the RHS correctly, yyresolveAction always cleans up
8740 the RHS of a semantic option. Document the interface.
8741
8742 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8743
8744 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8745 led to a segmentation fault in GNU Pascal. Problem reported
8746 by Waldek Hebisch.
8747
8748 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8749
8750 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8751 mid-rule action inside a nonterminal symbol in order to declare a
8752 destructor for its semantic value.
8753
8754 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8755
8756 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8757 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8758 __cplusplus && ! defined _STDLIB_H && !
8759 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8760 defined free))]: Include <stdlib.h> rather than rolling our own
8761 declarations of malloc and free, to avoid problems with
8762 incompatible declarations (using 'throw') C++'s stdlib.h. This
8763 should fix Debian bug 340012
8764 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8765 reported by Guillaume Melquiond.
8766
8767 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8768
8769 * NEWS: Clarify symbols versus types in unused-value warnings.
8770
8771 * configure.ac (AC_INIT): Bump version number.
8772
8773 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8774
8775 * NEWS: Version 2.1a.
8776 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8777 since C99 requires this.
8778
8779 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8780
8781 * m4/c-working.m4: New file.
8782 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8783
8784 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8785
8786 * Makefile.maint: Merge from coreutils.
8787
8788 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8789
8790 More portability fixes for problems summarized by Nelson H. F. Beebe.
8791
8792 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8793 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8794 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8795 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8796 messes up because C++ code is compiled in 32-bit mode but linked
8797 in 64-bit mode.
8798
8799 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8800
8801 More portability fixes for problems summarized by Nelson H. F. Beebe.
8802
8803 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8804 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8805
8806 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8807 nodist_PROGRAMS, since we don't need to actually compile the
8808 example if we're just doing a plain 'make'. This avoids bothering
8809 the installer unnecessarily about problems due to weird C++
8810 compilers.
8811
8812 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8813
8814 More portability fixes for problems summarized by Nelson H. F. Beebe.
8815
8816 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8817 than #include "...", and compile with -I'.'. The old method was
8818 not portable, according to Posix and the C standard, and it does
8819 not work with Sun C 5.7, where previous #line directives affect
8820 the working directory used in later #include "..." directives.
8821
8822 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8823
8824 Various DJGGP specific issues in /djgpp
8825
8826 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8827
8828 More portability fixes for problems summarized by Nelson H. F. Beebe.
8829
8830 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8831 '#include <map>' works and that you can apply ++ to iterators.
8832
8833 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8834
8835 Work around portability problems summarized by Nelson H. F. Beebe in
8836 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8837
8838 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8839 that '#include <string>' works.
8840
8841 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8842 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8843 "warning: sorry: semantics of inline function static data `const
8844 unsigned char translate_table[262]' are wrong (you'll wind up with
8845 multiple copies)".
8846
8847 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8848 or, xor to not_, and_, or_, and xor_, respectively. This works
8849 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8850 random system header somewhere that includes the equivalent of
8851 <iso646.h>.
8852
8853 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8854 -E" works; it apparently doesn't work with PathScale EKO Compiler
8855 Suite Version 2.0.
8856
8857 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8858
8859 During deterministic GLR operation, user actions should be able to
8860 influence the parse by changing yychar. To make this easier to fix and
8861 to make glr.c easier to evolve in general, don't maintain yytoken in
8862 parallel with yychar; just compute yytoken when needed.
8863 * tests/glr-regression.at (Incorrect lookahead during deterministic
8864 GLR): Check that setting yychar in a user action has the intended
8865 effect.
8866 * data/glr.c (yyGLRStack): Remove yytokenp member.
8867 (yyclearin): Don't set *yytokenp.
8868 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8869 yychar rather than *yytokenp to determine the current lookahead.
8870 Compute yytoken locally when needed.
8871 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8872 point to.
8873
8874 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8875 after `--report' documentation.
8876
8877 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8878
8879 * src/parse-gram.y (grammar_declaration): Location of printer
8880 symbol is @1, not list->location. Bug reported by twlevo.
8881 * tests/input.at (Incompatible Aliases): Adjust to above change.
8882
8883 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8884
8885 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8886 all the test at once. This makes the output easier to read in the
8887 normal case.
8888
8889 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8890 got from <http://bro-ids.org/download.html>. The bug is that
8891 when two actions appeared in succession, the second one was
8892 scanned before the first one was added to the grammar rule
8893 as a midrule action. Bison then output the incorrect warning
8894 "parse.y:905.17-906.36: warning: unused value: $3".
8895 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8896 associated with a value.
8897 (rhs): Don't invoke grammar_current_rule_action_append.
8898 (action): Invoke it here instead.
8899 * src/reader.c (grammar_midrule_action): Now extern.
8900 (grammar_current_rule_action_append): Don't invoke
8901 grammar_midrule_action; that is now the scanner's job.
8902 * src/reader.h (last_string, last_braced_code_loc):
8903 (grammar_midrule_action): New decls.
8904 * src/scan-gram.l (last_string): Now extern, sigh.
8905 (last_braced_code_loc): New extern variable.
8906 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8907 rule already has an action.
8908 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8909 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8910 Add some tests to check that the above changes fixed the bug.
8911
8912 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8913
8914 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8915 All used changed. Check whether the symbol has a destructor,
8916 not whether it is typed.
8917 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8918 that the values are still reported as unused. All line numbers
8919 adjusted.
8920
8921 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8922
8923 Work around a bug in bro 0.8, which underparenthesizes its
8924 definition of YYLLOC_DEFAULT.
8925 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8926 their arguments.
8927 * data/lalr1.cc: Likewise.
8928 * data/yacc.cc: Likewise.
8929
8930 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8931
8932 Work around a bug in Pike 7.0, and give the Pike folks a
8933 better way to override the usual int widths.
8934 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8935 user can override the types.
8936 (short): #undef, to work around a bug in Pike 7.0.
8937 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8938 (union yyalloc.yyss): Use yytype_int16 rather than short.
8939 All uses changed.
8940 (yysigned_char): Remove.
8941 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8942 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8943 * tests/regression.at (Web2c Actions): Adjust to above changes.
8944
8945 * src/reader.c (check_and_convert_grammar): New function.
8946 (reader): Close the input file even if something went wrong during
8947 parsing. Minor file descriptor leak reported by twlevo.
8948
8949 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8950 to pacify gcc -Wswitch-default.
8951 * src/scan-gram.l (adjust_location): Use a default: break; case
8952 to pacify gcc -Wswitch-default.
8953 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8954 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8955 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8956 Move these decls to scan-skel.l, since they don't need to be
8957 visible elsewhere.
8958 * src/scan-skel.l: Accept the above decls.
8959 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8960 is used.
8961
8962 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8963
8964 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8965 since we don't want to insist on a version number at the start
8966 of the changelog every time.
8967 * Makefile.maint: Sync from coreutils a bit better.
8968 (sc_trailing_blank): Renamed from sc_trailing_space.
8969 All uses changed.
8970 (sc_no_if_have_config_h, sc_require_config_h):
8971 (sc_prohibit_assert_without_use): New rules.
8972 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8973 (sc_dd_max_sym_length): Fix leading spaces in rule.
8974 (sc_system_h_headers): Prefix with @.
8975 (sc_useless_cpp_parens, m4-check): Output line numbers.
8976 (changelog-check): Allow version only in head.
8977 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8978 satisfy new Makefile.maint rule.
8979 * data/glr.c: Likewise.
8980 * data/glr.cc: Likewise.
8981 * data/lalr1.cc: Likewise.
8982 * data/yacc.c: Likewise.
8983 * lib/ebitsetv.c: Likewise.
8984 * lib/lbitset.c: Likewise.
8985 * lib/subpipe.c: Likewise.
8986 * lib/timevar.c: Likewise.
8987 * src/system.h: Likewise.
8988 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8989 * djgpp/Makefile.maint: Add copyright notice.
8990 * djgpp/README.in: Likewise.
8991 * djgpp/config.bat: Likewise.
8992 * djgpp/config.site: Likewise.
8993 * djgpp/config_h.sed: Likewise.
8994 * djgpp/djunpack.bat: Likewise.
8995 * djgpp/config.sed: Fix copyright notice to match standard format.
8996 * djgpp/subpipe.h: Likewise.
8997 * lib/bitsetv-print.c: Likewise.
8998 * lib/bitsetv.c: Likewise.
8999 * lib/subpipe.h: Likewise.
9000 * lib/timevar.c: Likewise.
9001 * lib/timevar.h: Likewise.
9002 * djgpp/subpipe.c: Use standard recipe for config.h.
9003 * lib/abitset.c: Likewise.
9004 * lib/bitset.c: Likewise.
9005 * lib/bitset_stats.c: Likewise.
9006 * lib/bitsetv-print.c: Likewise.
9007 * lib/bitsetv.c: Likewise.
9008 * lib/ebitsetv.c: Likewise.
9009 * lib/get-errno.c: Likewise.
9010 * lib/lbitset.c: Likewise.
9011 * lib/subpipe.c: Likewise.
9012 * lib/timevar.c: Likewise.
9013 * lib/vbitset.c: Likewise.
9014 * tests/local.at: Likewise.
9015 * src/scan-gram.l: Don't include verify.h, since system.h does
9016 that for us.
9017 * .x-sc_require_config_h: New file.
9018 * .x-sc_unmarked_diagnostics: New file.
9019
9020 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9021
9022 Be a bit more systematic about using 'abort'.
9023 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9024 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9025 Put 'default: abort ();' before some other case, to satisfy older
9026 pedantic compilers.
9027 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9028 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9029 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9030 * src/conflicts.c (resolve_sr_conflict): Likewise.
9031 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9032 (get_decision_str, get_orientation_str, get_node_alignment_str):
9033 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9034 (get_linestyle_str, get_arrowstyle_str): Likewise.
9035 * src/conflicts.c (resolve_sr_conflict):
9036 Use a default case rather than one for the one remaining enum
9037 value, to catch invalid enum values as well.
9038 * src/lalr.c (set_goto_map, map_goto):
9039 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9040 * src/nullable.c (nullable_compute, token_definitions_output):
9041 Likewise.
9042 * src/reader.c (packgram, reader): Likewise.
9043 * src/state.c (transitions_to, state_new, state_reduction_find):
9044 Likewise.
9045 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9046 (symbol_pack): Likewise.
9047 * src/tables.c (conflict_row, pack_vector): Likewise.
9048 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9049 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9050 * src/system.h: Don't include <assert.h>.
9051 (assert): New macro.
9052
9053 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9054 (Destructor Decl, Parser Function, Pure Calling):
9055 Describe rules for braces inside C code more carefully.
9056
9057 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9058
9059 Fix some porting glitches found by Nelson H. F. Beebe.
9060 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9061 compilers that don't understand that abort () does not return.
9062 * src/state.c (transitions_to): Likewise.
9063 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9064 that '#include <cstdlib>' works.
9065 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9066 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9067 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9068 for the benefit of some pre-C99 compilers.
9069
9070 * bootstrap: Undo changes to gnulib files that autoreconf made.
9071
9072 Minor fixups to get 'make maintainer-check' to work.
9073 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9074 with the new verify.h implementation.
9075 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9076 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9077 * data/yacc.c (YYUSE): Likewise.
9078 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9079 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9080 * src/parse-gram.y (declaration): Don't pass a string constant
9081 to a function that expects char *, since GCC might complain
9082 about the constant value.
9083 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9084 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9085 before #defining them.
9086 * tests/glr-regression.at
9087 (Incorrectly initialized location for empty right-hand side in GLR):
9088 In yyerror, use the msg arg.
9089 (Corrupted semantic options if user action cuts parse):
9090 (Incorrect lookahead during deterministic GLR):
9091 (Incorrect lookahead during nondeterministic GLR):
9092 Don't name a local var 'index'; it shadows string.h's 'index'.
9093
9094 2006-01-19 Akim Demaille <akim@epita.fr>
9095
9096 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9097 location, not just parts of it.
9098
9099 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9100
9101 * NEWS: Document the fact that multiple %unions are now allowed.
9102 * doc/bison.texinfo (Union Decl): Likewise.
9103 * TODO: This feature is now implemented, so remove it from
9104 the wishlist.
9105
9106 * Makefile.maint: Merge with coreutils Makefile.maint.
9107 (CVS_LIST): Use build-aux version if available.
9108 (VERSION_REGEXP): New macro.
9109 (syntax-check-rules): Add sc_no_if_have_config_h,
9110 sc_prohibit_assert_without_use, sc_require_config_h,
9111 sc_useless_cpp_parens.
9112 (sc_obsolete_symbols): Check for O_NDELAY.
9113 (sc_dd_max_sym_length): Track coreutils.
9114 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9115 (sc_useless_cpp_parens): New rule.
9116 (news-date-check): Look for version or today's date.
9117 (changelog-check): Don't require version number near head.
9118 (copyright-check): Use current year instead of hardwiring 2005.
9119 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9120 (announcement): Add --gpg-key-ID.
9121
9122 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9123 with "file system".
9124
9125 Avoid undefined behavior that addressed just before the start of an
9126 array. Problem reported by twlevo.
9127 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9128 * src/lalr.c (build_relations): Rely on new sentinel.
9129 * src/gram.c (gram_free): Adjust to new sentinel.
9130
9131 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9132
9133 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9134 yylookaheadNeeds. All uses updated.
9135 (yysplitStack): Rename local yynewLookaheadStatuses to
9136 yynewLookaheadNeeds.
9137 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9138 GLR): In comments, change `lookahead status' to `lookahead need'.
9139
9140 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9141
9142 * data/glr.c (yysplitStack): A little stylistic rewrite.
9143
9144 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9145
9146 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9147
9148 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9149
9150 * doc/bison.texinfo: Fix some typos.
9151 (GLR Semantic Actions): New subsection discussing special
9152 considerations because GLR semantic actions might be deferred.
9153 (Actions): Mention look-ahead usage of yylval.
9154 (Actions and Locations): Mention look-ahead usage of yylloc.
9155 (Special Features for Use in Actions): Add YYEOF entry and mention it
9156 in the yychar entry.
9157 In the yychar entry, remove mention of the local yychar case (pure
9158 parser) since this is irrelevant information when writing semantic
9159 actions and since it's already discussed in `Table of Symbols' where
9160 yychar is otherwise described as an external variable.
9161 In the yychar entry, don't call it the `current' look-ahead since it
9162 isn't when semantic actions are deferred.
9163 In the yychar and yyclearin entries, add note about deferred semantic
9164 actions.
9165 Add yylloc and yylval entries discussing look-ahead usage.
9166 (Look-Ahead Tokens): When discussing yychar, don't call it the
9167 `current' look-ahead, and do mention yylval and yylloc.
9168 (Error Recovery): Cross-reference `Action Features' when mentioning
9169 yyclearin.
9170 (Table of Symbols): In the yychar entry, don't call it the `current'
9171 look-ahead.
9172 In the yylloc and yylval entries, mention look-ahead usage.
9173
9174 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9175
9176 * tests/glr-regression.at: Update copyright year to 2006.
9177
9178 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9179
9180 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9181 use during nondeterministic operation to track which stacks have
9182 actually needed the current lookahead.
9183 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9184 Allocate, deallocate, resize, and otherwise shuffle space for
9185 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9186 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9187 appropriately during nondeterministic operation.
9188 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9189 members to store the current lookahead to be used by the deferred
9190 user action.
9191 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9192 from which the RHS is taken. Set the lookahead members of the new
9193 yySemanticOption according to the lookahead status for stack yyk.
9194 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9195 yyaddDeferredAction.
9196 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9197 members of yySemanticOption before invoking yyuserAction, and then set
9198 them back to their current values afterward.
9199 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9200 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9201 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9202 titles for consistency.
9203 (Leaked merged semantic value if user action cuts parse): In order to
9204 suppress lint warnings, use arguments in merge function, and assign
9205 char value < 128 in main.
9206 (Incorrect lookahead during deterministic GLR): New test case.
9207 (Incorrect lookahead during nondeterministic GLR): New test case.
9208
9209 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9210
9211 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9212 !yyvaluep as signal that no semantic value is available to print.
9213 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9214 to print a semantic value.
9215
9216 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9217
9218 * tests/glr-regression.at: For consistency with my newer test cases,
9219 don't thank myself.
9220
9221 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9222
9223 * data/glr.c (yyresolveValue): When merging semantic options, if at
9224 least one user action succeeds but a later one cuts the parse, then
9225 destroy the semantic value before returning rather than leaking it.
9226 (yyresolveStates): If a user action cuts the parse and thus
9227 yyresolveValue fails, ignore the (unset) semantic value rather than
9228 corrupting the yyGLRState, and empty the semantic options list since
9229 the user actions should have called all necessary destructors.
9230 Simplify code with YYCHK.
9231 * tests/glr-regression.at (Corrupted semantic options if user action
9232 cuts parse): New test case.
9233 (Undesirable destructors if user action cuts parse): New test case.
9234 Before applying any of this patch, this test case never actually failed
9235 for me... but only because the corrupted semantic options usually
9236 masked this bug.
9237 (Leaked merged semantic value if user action cuts parse): New test
9238 case.
9239
9240 2006-01-05 Akim Demaille <akim@epita.fr>
9241
9242 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9243
9244 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9245
9246 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9247 _MSC_VER. Problem reported by Cenzato Marco.
9248 (b4_c_function_def): Use it.
9249 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9250 b4_c_modern.
9251 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9252 than rolling our own.
9253
9254 2006-01-04 Akim Demaille <akim@epita.fr>
9255
9256 Also warn about non-used mid-rule values.
9257 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9258 member.
9259 (symbol_list_new): Adjust.
9260 * src/reader.c (symbol_typed_p): New.
9261 (grammar_rule_check): Use it.
9262 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9263 Check its rule.
9264 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9265 Use it.
9266 * tests/actions.at (Exotic Dollars): Adjust.
9267
9268 2006-01-04 Akim Demaille <akim@epita.fr>
9269
9270 * src/reader.c (grammar_midrule_action): If $$ is set in a
9271 mid-rule, move the `used' bit to its lhs.
9272 * tests/input.at (Unused values): New.
9273 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9274
9275 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9276
9277 * doc/bison.texinfo (Bison Options): Say more accurately what
9278 --yacc does.
9279 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9280 about declarations in the grammar when in Yacc mode, as POSIX does
9281 not require a diagnostic when the grammar uses extensions.
9282
9283 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9284
9285 Warn about dubious constructions like "%token T T".
9286 Reported by twlevo.
9287 * src/symtab.h (struct symbol.declared): New member.
9288 * src/symtab.c (symbol_new): Initialize it to false.
9289 (symbol_class_set): New arg DECLARING, specifying whether
9290 this is a declaration that we want to warn about, if there
9291 is more than one of them. All uses changed.
9292
9293 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9294 Allow multiple %union directives, whose contents concatenate.
9295 * src/parse-gram.y (grammar_declaration): Likewise.
9296 Use muscle_code_grow, so that we don't need stype_line any more.
9297 All uses changed.
9298
9299 * src/muscle_tab.c (muscle_grow): Fix comment.
9300
9301 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9302 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9303 Update copyright year to 2006.
9304
9305 2006-01-03 Akim Demaille <akim@epita.fr>
9306
9307 Have glr.cc pass (some of) the calc.at tests.
9308 * data/glr.cc (b4_parse_param_orig): New.
9309 (b4_parse_param): Improve its definition, and bound it more
9310 clearly in the skeleton.
9311 (b4_epilogue): Append, instead of prepending, in order to keep
9312 #line consistency.
9313 Simplify the generation of auxiliary functions: locations and
9314 purity are mandated.
9315 (b4_global_tokens_and_yystype): Honor it.
9316 * data/location.cc (c++.m4): Don't include it.
9317 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9318 and AT_SKEL_CC_IF.
9319 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9320 AT_LALR1_CC_IF.
9321 Be sure to initialize the first position's filename.
9322 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9323 mandated anyway.
9324 (AT_CHECK_CALC_GLR_CC): New.
9325 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9326
9327 2006-01-02 Akim Demaille <akim@epita.fr>
9328
9329 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9330 c.m4.
9331 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9332 * data/glr.cc: Do not include stack.hh.
9333
9334 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9335
9336 * data/glr.c: Reformat whitespace with tabs.
9337 (b4_lpure_formals): Remove this unused m4 macro.
9338 * tests/cxx-type.at: Reformat whitespace with tabs.
9339 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9340 since it's a member. Rename type to isNterm for clarity.
9341
9342 2005-12-29 Akim <akim@sulaco.local>
9343
9344 Let glr.cc catch up with symbol_value_print.
9345 * data/glr.cc (b4_yysymprint_generate): Replace by...
9346 (b4_yy_symbol_print_generate): this.
9347 (yy_symbol_print, yy_symbol_value_print): Declare them.
9348
9349 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9350
9351 * src/location.h (boundary): Note that a line or column equal
9352 to INT_MAX indicates an overflow.
9353 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9354 (rule_length_overflow, increment_rule_length, add_column_width):
9355 New functions.
9356 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9357 (<SC_BRACED_CODE>"}"):
9358 Use increment_rule_length rather than incrementing it by hand.
9359 (adjust_location, handle_syncline): Diagnose overflow.
9360 (handle_action_dollar, handle_action_at):
9361 Fix bug with monstrosities like $-2147483648.
9362 Remove now-unnecessary checks.
9363 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9364 (convert_ucn_to_byte): Verify assumptions.
9365 (handle_syncline): New arg LOC. All callers changed.
9366 Don't store through a value derived from char const * pointer.
9367
9368 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9369 GCC warnings.
9370
9371 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9372
9373 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9374 Remove unnecessary forward static decls.
9375
9376 2005-12-27 Akim Demaille <akim@epita.fr>
9377
9378 * src/reader.c (grammar_current_rule_check): Also check that $$
9379 is used.
9380 Take the rule to check as argument, hence rename as...
9381 (grammar_rule_check): this.
9382 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9383 Rename as...
9384 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9385 (grammar_midrule_action, grammar_symbol_append): Now static.
9386 * tests/torture.at (input): Don't rely on the default action
9387 being always performed.
9388 * tests/calc.at: "Set" $$ even when the action is "cut" with
9389 YYERROR or other.
9390 * tests/actions.at (Exotic Dollars): Instead of using unused
9391 values, check that the warning is issued.
9392
9393 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9394
9395 * NEWS: Improve wording for unused-value warnings.
9396
9397 2005-12-22 Akim Demaille <akim@epita.fr>
9398
9399 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9400 (b4_yysymprint_generate): Rename as...
9401 (b4_yy_symbol_print_generate): this.
9402 Generate yy_symbol_print instead of yysymprint.
9403 Generate also yy_symbol_value_print, and use it.
9404
9405 2005-12-22 Akim Demaille <akim@epita.fr>
9406
9407 * NEWS: Warn about unused values.
9408 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9409 a `used' member.
9410 (symbol_list_n_get, symbol_list_n_used_set): New.
9411 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9412 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9413 * src/reader.c (grammar_current_rule_check): Check that values are
9414 used.
9415 * src/symtab.c (symbol_print): Accept 0.
9416 * tests/existing.at: Remove the type information.
9417 Empty the actions.
9418 Remove useless actions (beware of mid-rule actions: perl -000
9419 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9420 * tests/actions.at (Exotic Dollars): Use unused values.
9421 * tests/calc.at: Likewise.
9422 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9423 Likewise.
9424
9425 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9426 rule_useful_p.
9427
9428 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9429
9430 Undo 2005-12-01 tentative license wording change. The wording is
9431 still being reviewed by the lawyers, and we don't want to wait for
9432 them before publishing a test release. For now, revert to the
9433 previous wording.
9434 * NEWS: Undo 2005-12-01 change.
9435 * data/glr.c: Revert to previous license wording.
9436 * data/glr.cc: Likewise.
9437 * data/lalr1.cc: Likewise.
9438 * data/location.cc: Likewise.
9439 * data/yacc.c: Likewise.
9440
9441 * NEWS: Reword %destructor vs YYABORT etc.
9442 * data/glr.c: Use American spacing, for consistency.
9443 * data/glr.cc: Likewise.
9444 * data/lalr1.cc: Likewise.
9445 * data/yacc.c: Likewise.
9446 * data/yacc.c: Reformat comments slightly.
9447 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9448 for consistency. Fix some spelling errors and reword recently-included
9449 text slightly.
9450 * tests/cxx-type.at: Cast results of malloc, for C++.
9451
9452 2005-12-21 Joel E. Denny <address@hidden>
9453
9454 * tests/cxx-type.at: Construct a tree, count the parents of shared
9455 nodes, and free each node once and only once. Previously, the memory
9456 for semantic values was leaked instead.
9457
9458 2005-12-21 Joel E. Denny <address@hidden>
9459
9460 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9461 (yylval, yylloc): If pure, #define to yystackp->yyval and
9462 yystackp->yyloc similar to yychar and yynerrs.
9463 (yyparse): If pure, remove local yylval and yylloc. Add local
9464 yystackp to accommodate pure definitions of yylval and yylloc.
9465 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9466 yylvalp and yyllocp to &yylval and &yylloc.
9467 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9468 namespace. Previously, nerrs and char were missing, but lval and lloc
9469 weren't necessary.
9470 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9471 yylvalp and yyllocp parameters since, if pure, these are now always
9472 accessible through yystackp. If not pure, they are still accessible
9473 globally.
9474 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9475 `if (YYID (N))' to pacify lint.
9476
9477 2005-12-21 Akim Demaille <akim@epita.fr>
9478
9479 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9480 destroy the RHS symbols of a rule.
9481 * data/yacc.c (yylen): Initialize to 0.
9482 Keep its value to the number of items to possibly shift.
9483 In particular, a regular successful parse that ends on YYFINAL by
9484 a (internal) YYACCEPT must not have yylen != 0.
9485 (yyerrorlab, yyreturn): Pop the RHS.
9486 Reorder a bit to emphasize the `shifting' bits of code.
9487 (YYPOPSTACK): Now accept a number of items to pop.
9488 * data/lalr1.cc: Likewise.
9489 * data/glr.c: Formatting changes.
9490 Use goto instead of fall through.
9491 * doc/bison.texinfo (Destructor Decl): Complete.
9492
9493 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9494
9495 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9496 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9497 * djgpp/config.bat: Replace every occurence of the file name
9498 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9499 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9500 * djgpp/config.sed: Replace every occurence of the file name
9501 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9502 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9503 * djgpp/djunpack.bat: DJGPP specific file.
9504 * djgpp/fnchange.lst: DJGPP specific file.
9505 * djgpp/README.in: Add new information about how to unpack the bison
9506 source on MSDOS and other systems which have 8.3 file name restrictions
9507 using djunpack.bat and fnchange.lst.
9508
9509 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9510
9511 * bootstrap (build_cvs_prefix): Remove; unused.
9512 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9513 when getting gnulib.
9514
9515 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9516
9517 * data/glr.c: Reorder typedef declarations for structs to match order
9518 of struct declarations.
9519 Rename yystack everywhere to yystackp except in yyparse where it's not
9520 a pointer.
9521 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9522 consistency.
9523 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9524 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9525 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9526 lint.
9527
9528 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9529
9530 * tests/sets.at (Accept): Fix typos in regular expression used to
9531 sed out the final state number.
9532
9533 Work around portability problem on Solaris 10: flex-generated
9534 files include <stdio.h> before <config.h>, which messes up
9535 because the latter defines __EXTENSIONS__. Address the problem
9536 by creating two new little files that include <config.h> first,
9537 then include the flex-generated files. Rewrite everyone else
9538 to include <config.h> first, as well.
9539 * lib/timevar.c: Always include "config.h".
9540 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9541 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9542 (EXTRA_bison_SOURCES): New macro.
9543 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9544 * src/system.h: Don't include config.h.
9545 * src/LR0.c: Include <config.h> first.
9546 * src/assoc.c: Likewise.
9547 * src/closure.c: Likewise.
9548 * src/complain.c: Likewise.
9549 * src/conflicts.c: Likewise.
9550 * src/derives.c: Likewise.
9551 * src/files.c: Likewise.
9552 * src/getargs.c: Likewise.
9553 * src/gram.c: Likewise.
9554 * src/lalr.c: Likewise.
9555 * src/location.c: Likewise.
9556 * src/main.c: Likewise.
9557 * src/muscle_tab.c: Likewise.
9558 * src/nullable.c: Likewise.
9559 * src/output.c: Likewise.
9560 * src/parse-gram.y: Likewise.
9561 * src/print.c: Likewise.
9562 * src/print_graph.c: Likewise.
9563 * src/reader.c: Likewise.
9564 * src/reduce.c: Likewise.
9565 * src/relation.c: Likewise.
9566 * src/state.c: Likewise.
9567 * src/symlist.c: Likewise.
9568 * src/symtab.c: Likewise.
9569 * src/tables.c: Likewise.
9570 * src/uniqstr.c: Likewise.
9571 * src/vcg.c: Likewise.
9572
9573 * src/parse-gram.y: Fix minor problems uncovered by lint.
9574 (current_lhs, current_lhs_location): Now static.
9575 (current_assoc): Remove unused variable.
9576
9577 Cleanups so that Bison-generated parsers have less lint.
9578 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9579 Prepend /*ARGSUSED*/, for lint's sake.
9580 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9581 definition if 'lint' is defined.
9582 (YYID): New macro (or function, if lint).
9583 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9584 * data/yacc.c: Likewise.
9585 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9586 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9587 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9588 is C++ only.
9589 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9590 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9591 Use YYID(0) rather than 0, for lint.
9592 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9593 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9594
9595 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9596
9597 * tests/glr-regression.at
9598 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9599 Close memory leak reported by twlevo.
9600
9601 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9602
9603 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9604 all stacks.
9605 (yyparse): Iterate another stack in order to call user destructors.
9606 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9607 New test case.
9608 (Duplicated user destructor for lookahead): This test now is expected
9609 to succeed.
9610
9611 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9612
9613 * NEWS: Document the following change.
9614 * data/yacc.c: Say "parser skeleton" rather than "file", since
9615 it's no longer just a file.
9616 * data/glr.c: Grant a special exception for C GLR parsers, that
9617 reads like the already-existing exception for C LALR(1) parsers.
9618 * data/glr.cc: Likewise.
9619 * data/lalr1.cc: Likewise.
9620 * data/location.cc: Likewise.
9621 * data/yacc.c: Reword the "written by" statement to clarify that
9622 it was the parser skeleton, not the entire output file.
9623 * data/glr.c: Written by Paul Hilfinger.
9624 * data/glr.cc: Written by Akim Demaille.
9625 * data/lalr1.cc: Likewise.
9626
9627 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9628
9629 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9630 Fix typos in previous change that broke 'make check'.
9631 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9632 supported in C.
9633 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9634 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9635 We can revert this once things settle down.
9636
9637 * src/conflicts.c (conflicts_print): Don't print file name twice
9638 when %expect fails because there were no conflicts.
9639 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9640 change.
9641 * tests/conflicts.at (%expect not enough, %expect too much):
9642 (%expect with reduce conflicts): Adjust to new behavior.
9643
9644 2005-11-18 Akim Demaille <akim@epita.fr>
9645
9646 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9647 errors.
9648 * NEWS: Document this.
9649 * doc/bison.texinfo (Expect Decl): Likewise.
9650
9651 2005-11-16 Akim Demaille <akim@epita.fr>
9652
9653 Generalize the display of semantic values and locations in traces.
9654 * data/glr.c (yy_reduce_print): Fix indices (again).
9655 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9656 literal integers.
9657 * data/lalr1.cc (yyreduce_print): Rename as...
9658 (yy_reduce_print): this.
9659 Display values and locations.
9660 * data/yacc.c (yy_reduce_print): Likewise.
9661 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9662 (yysymprint): Move higher to be visible from yy_reduce_print).
9663 (yyparse): Adjust.
9664 * tests/calc.at: Adjust the expected length of the traces.
9665
9666 2005-11-14 Akim Demaille <akim@epita.fr>
9667
9668 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9669 from 1 to N, while values and location start at 0.
9670 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9671
9672 2005-11-14 Akim Demaille <akim@epita.fr>
9673
9674 * data/glr.c (yy_reduce_print): Fix the $ number.
9675
9676 2005-11-14 Akim Demaille <akim@epita.fr>
9677
9678 "Use" parse parameters.
9679 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9680 * data/glr.c, data/glr.cc: Use them.
9681 * data/glr.c (YYUSE): Have a C++ definition that supports
9682 non-pointer types.
9683
9684 2005-11-14 Akim Demaille <akim@epita.fr>
9685
9686 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9687
9688 2005-11-14 Akim Demaille <akim@epita.fr>
9689
9690 * data/glr.cc: New.
9691 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9692
9693 2005-11-12 Akim Demaille <akim@epita.fr>
9694
9695 Let position and location be PODs.
9696 * data/location.cc (position::initialize, location::initialize): New.
9697 (position::position, location::location): Define only if
9698 b4_location_constructors is defined.
9699 * data/lalr1.cc (b4_location_constructors): Define it for backward
9700 compatibility.
9701 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9702
9703 2005-11-12 Akim Demaille <akim@epita.fr>
9704
9705 * data/lalr1.cc: Move the body of the ctor and dtor into the
9706 parser file (instead of the header).
9707 Wrap the implementations in a "namespace yy".
9708
9709 2005-11-12 Akim Demaille <akim@epita.fr>
9710
9711 Have glr.c include its header file when created.
9712 * data/glr.c (b4_shared_declarations): New.
9713 Output them verbatim in the parser if !%defines, otherwise
9714 output then in the header file, and include it instead.
9715
9716 2005-11-11 Akim Demaille <akim@epita.fr>
9717
9718 * data/glr.c: Comment changes.
9719
9720 2005-11-11 Akim Demaille <akim@epita.fr>
9721
9722 When yydebug, report semantic and location values for reductions.
9723 * data/glr.c (yy_reduce_print): Report the semantic values and the
9724 locations.
9725 (YY_REDUCE_PRINT): Adjust.
9726 (yyglrReduce): Use them.
9727 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9728 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9729 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9730 traces.
9731
9732 2005-11-10 Akim Demaille <akim@epita.fr>
9733
9734 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9735 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9736 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9737
9738 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9739
9740 * m4/cxx.m4, examples/Makefile.am: Don't build
9741 examples/calc++ if no C++ compiler is available. (trivial change)
9742
9743 2005-11-09 Akim Demaille <akim@epita.fr>
9744
9745 * src/scan-skel.l: Use a couple of asserts.
9746
9747 2005-11-03 Akim Demaille <akim@epita.fr>
9748
9749 In some (weird) cases, the final state number is incorrect.
9750 Reported by Alexandre Duret-Lutz.
9751 * src/LR0.c (state_list_append): Remove the computation of
9752 final_state.
9753 (save_reductions): Do it here.
9754 (get_state): Alpha conversion.
9755 (generate_states): Use a for loop.
9756 * src/gram.h (item_number_is_rule_number)
9757 (item_number_is_symbol_number): New.
9758 * src/state.c: Use assert.
9759 * src/system.h: Include assert.h.
9760 * tests/sets.at (Accept): New.
9761
9762 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9763
9764 * data/glr.c (yyfill): Adjust comment.
9765 (yyresolveAction): Initialize default location properly
9766 for empty right-hand sides.
9767 (yydoAction): Ditto.
9768 Add comment explaining apparently dead code.
9769 * tests/glr-regression.at
9770 (Incorrectly initialized location for empty right-hand side in GLR):
9771 New test.
9772
9773 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9774
9775 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9776 gnulib when interrupted. This fixes some race conditions and
9777 works around some portability problems (one noted by Paul
9778 Hilfinger).
9779
9780 2005-10-22 Akim <akim@epita.fr>
9781
9782 * Makefile.cfg: Adjust to config -> build-aux.
9783 Reported by twledo.
9784
9785 2005-10-21 Akim Demaille <akim@epita.fr>
9786
9787 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9788 the %parse-params.
9789 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9790 * data/yacc.c (b4_Pure_if): Rename as...
9791 (b4_yacc_pure_if): this.
9792 (YY_SYMBOL_PRINT, yyparse): Adjust.
9793 * doc/bison.texinfo: Formatting changes.
9794
9795 2005-10-21 Akim Demaille <akim@epita.fr>
9796
9797 Finish the transition config -> build-aux.
9798 * configure.ac, Makefile.am: Use build-aux.
9799 * config/prev-version, config/announce-gen, config/Makefile.am:
9800 Move to...
9801 * build-aux/prev-version, build-aux/announce-gen,
9802 * build-aux/Makefile.am: here.
9803
9804 2005-10-14 Akim Demaille <akim@epita.fr>
9805
9806 * examples/calc++/test: Use set -x only when VERBOSE.
9807
9808 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9809
9810 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9811 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9812
9813 2005-10-13 Akim Demaille <akim@epita.fr>
9814
9815 * src/scan-skel.l: Output the base name parts of the parser and
9816 header file names.
9817 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9818 additional checks.
9819 Use this to exercise C++ outputs in subdirs.
9820 Reported by Oleg Smolsky.
9821
9822 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9823
9824 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9825 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9826 Problem reported by John P. Hartmann.
9827 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9828 already defined it.
9829
9830 2005-10-12 Akim Demaille <akim@epita.fr>
9831
9832 * src/parse-gram.y (version_check): Exit 63 to please missing
9833 (stands for "version mismatch).
9834 * tests/input.at, doc/bison.texinfo: Adjust.
9835
9836 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9837
9838 Work around portability problems with Visual Age C compiler
9839 (xlc and xlC_r) reported by John P. Hartmann.
9840 * data/location.cc (initial_column, initial_line): Remove.
9841 All uses replaced by 0 and 1.
9842 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9843 that xlc complains about.
9844 * src/scan-skel.l (skel_wrap): Likewise.
9845 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9846 as __STDC__.
9847 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9848 __STDC_VERSION__. Use it everywhere instead of looking at
9849 __STDC__ and __cplusplus.
9850
9851 2005-10-10 Akim Demaille <akim@epita.fr>
9852
9853 * examples/calc++/test: Be quiet unless VERBOSE.
9854
9855 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9856
9857 * data/c.m4 (yydestruct, yysymprint):
9858 Use YYUSE instead of casting to void.
9859 * data/glr.c (YYUSE): New macro.
9860 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9861 Use it instead of rolling our own.
9862 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9863 (YYCHK1):
9864 Use /*CONSTCOND*/ to suppress lint warnings.
9865 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9866 (YY_STACK_PRINT): Use 'false' not '0'.
9867 (YYUSE): New macro.
9868 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9869 * data/yacc.c (YYUSE): New macro.
9870 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9871 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9872 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9873
9874
9875 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9876 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9877
9878 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9879
9880 Undo the parts of the unlocked-I/O change that substituted
9881 putc or puts for printf. This might hurt performance a bit,
9882 but some people prefer the printf style.
9883 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9884 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9885 All uses replaced by YYFPRINTF and YYDPRINTF.
9886 * data/yacc.c: Likewise.
9887 * lib/bitset.c (bitset_print): Likewise.
9888 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9889 putc and puts.
9890 * lib/lbitset.c (debug_lbitset): Likewise.
9891 * src/closure.c (print_firsts, print_fderives): Likewise.
9892 * src/gram.c (grammar_dump): Likewise.
9893 * src/lalr.c (look_ahead_tokens_print): Likewise.
9894 * src/output.c (escaped_output): Likewise.
9895 (user_actions_output): Break apart two printfs.
9896 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9897 * src/reduce.c (reduce_print): Likewise.
9898 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9899 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9900
9901 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9902 Use assignments rather than casts-to-void to suppress
9903 unused-variable warnings. This pacifies 'lint'.
9904 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9905 unused-variable warnings.
9906
9907 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9908
9909 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9910
9911 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9912
9913 Use unlocked I/O for a minor performance improvement on hosts like
9914 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9915 is to use the gnlib unlocked-io module, and to prefer putc and
9916 puts to printf when either will work (since the latter doesn't
9917 come in an unlocked flavor).
9918 * bootstrap (gnulib_modules): Add unlocked-io.
9919 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9920 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9921 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9922 and similarly for puts and putc and printf.
9923 * data/yacc.c: Likewise.
9924 * lib/bitset.c (bitset_print): Likewise.
9925 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9926 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9927 to printf.
9928 * lib/lbitset.c (debug_lbitset): Likewise.
9929 * src/closure.c (print_firsts, print_fderives): Likewise.
9930 * src/gram.c (grammar_dump): Likewise.
9931 * src/lalr.c (look_ahead_tokens_print): Likewise.
9932 * src/output.c (escaped_output): Likewise.
9933 (user_actions_output): Coalesce two printfs.
9934 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9935 * src/reduce.c (reduce_print): Likewise.
9936 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9937 * src/system.h: Include unlocked-io.h rather than stdio.h.
9938
9939 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9940 this confuses xgettext.
9941
9942 2005-10-02 Akim Demaille <akim@epita.fr>
9943
9944 * bootstrap (gnulib_modules): Add strverscmp.
9945 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9946 * m4/.cvsignore: Add strverscmp.m4.
9947 * src/parse-gram.y (%require): New token, new rule.
9948 (version_check): New.
9949 * src/scan-gram.l (%require): Adjust.
9950 * tests/input.at (AT_REQUIRE): New.
9951 Use it.
9952 * doc/bison.texinfo (Require Decl): New.
9953 (Calc++ Parser): Use %require.
9954
9955 2005-10-02 Akim Demaille <akim@epita.fr>
9956
9957 * data/location.cc: New.
9958
9959 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9960 Akim Demaille <akim@epita.fr>
9961
9962 Make sure -odir/foo.cc creates dir/location.hh etc.
9963 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9964 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9965 (spec_defines_file): Now const.
9966 (dir_prefix): New.
9967 (short_base_name): Remove.
9968 * src/files.c: Adjust.
9969 (dirname.h): Include.
9970 (base_name): Don't prototype it.
9971 (finput): Remove, duplicates gram_in.
9972 (full_base_name, short_base_name): Replace by...
9973 (all_but_ext, all_but_tab_ext): these.
9974 (compute_base_names): Rename as...
9975 (compute_file_name_parts): this.
9976 Update to compute the new variables, including dir_prefix.
9977 Adjust dependencies.
9978 * src/output.c (prepare): Output them.
9979 * src/reader.c: Adjust to use gram_in, not finput.
9980 * src/scan-skel.l (@dir_prefix@): New.
9981
9982 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9983
9984 * lib/subpipe.c: New function end_of_output_subpipe() added
9985 to allow support for non-posix systems. This is a no-op function
9986 for posix systems.
9987
9988 * lib/subpipe.h: New function end_of_output_subpipe() added
9989 to allow support for non-posix systems. This is a no-op function
9990 for posix systems.
9991
9992 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9993 handle the lack of pipe/fork functionality on non-posix systems.
9994
9995 * djgpp/Makefile.maint: DJGPP specific file.
9996
9997 * djgpp/README.in: DJGPP specific file.
9998
9999 * djgpp/config.bat: DJGPP specific configuration file.
10000
10001 * djgpp/config.sed: DJGPP specific configuration file.
10002
10003 * djgpp/config.site: DJGPP specific configuration file.
10004
10005 * djgpp/config_h.sed: DJGPP specific configuration file.
10006
10007 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10008
10009 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10010
10011 2005-10-02 Akim Demaille <akim@epita.fr>
10012
10013 * data/location.cc: New, extract from...
10014 * data/lalr1.cc: here.
10015 (location.hh): Include it after the user prologue, in case the
10016 filename type is defined by the user.
10017 Forward declation location and position before the pre-prologue.
10018 (yyresult_): Rename as...
10019 (yyresult): this, it's a local variable, not an attribute.
10020 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10021
10022 2005-10-01 Akim Demaille <akim@epita.fr>
10023
10024 * examples/extexi: Restore the #line generation.
10025
10026 2005-09-30 Akim Demaille <akim@epita.fr>,
10027 Alexandre Duret-Lutz <adl@gnu.org>
10028
10029 Move the token type and YYSTYPE in the parser class.
10030 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10031 (parser::token): New, from the moved free definition of tokens.
10032 (parser::semantic_value): Now a full definition instead of an
10033 indirection to YYSTYPE.
10034 (b4_post_prologue): No longer included in the header file, but
10035 in the implementation file.
10036 * doc/bison.texi (C+ Language Interface): Update.
10037 * src/parse-gram.y: Support unary %define.
10038 * tests/actions.at: Define global_tokens_and_yystype for backward
10039 compatibility until we update the tests.
10040 * tests/calc.at: Idem.
10041 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10042 to simplify the code.
10043
10044 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10045
10046 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10047 Ah, the good old days! Problem reported by Peter Klein.
10048 * bootstrap (gnulib_modules): Add strerror, strtoul.
10049 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10050 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10051
10052 2005-09-29 Akim Demaille <akim@epita.fr>
10053
10054 * data/c.m4 (b4_error_verbose_if): New.
10055 * data/lalr1.cc: Use it.
10056 (YYERROR_VERBOSE_IF): Remove.
10057 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10058 parser members, replaced by...
10059 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10060 local variables.
10061 (yysyntax_error_): Takes the state number as argument.
10062 (yyreduce_print_): Use the argument yyrule, not the former
10063 attribute yyn_.
10064
10065 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10066
10067 * bootstrap (gnulib_modules): Add verify.
10068 * lib/.cvsignore: Add verify.h.
10069 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10070 * src/system.h (verify): Remove.
10071 Include verify.h instead.
10072 * src/tables.c (tables_generate): Use new API for 'verify'.
10073
10074 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10075
10076 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10077 local variables whose names begin with 'yy'.
10078 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10079 Trivial changes from Joel E. Denny.
10080
10081 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10082 it itself.
10083 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10084 don't use alloca any more.
10085
10086 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10087 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10088 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10089 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10090 to match yacc.c, to test more hosts.
10091
10092 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10093
10094 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10095 doesn't affect behavior.
10096 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10097 Solaris, AIX, MSC.
10098 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10099 This works a bit better with glibc, if user code has already included
10100 stdlib.h.
10101 * doc/bison.texinfo (Bison Parser): Document that users can't
10102 arbitrarily use malloc and free for other purposes. Document
10103 that <alloca.h> and <malloc.h> might be included.
10104 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10105 user must declare alloca.
10106
10107 * HACKING (release): Forwarn the Translation Project about
10108 stable releses.
10109
10110 2005-09-20 Akim Demaille <akim@epita.fr>
10111
10112 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10113
10114 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10115
10116 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10117 (YYSTACK_ALLOC_MAXIMUM): Use it.
10118 (yysyntax_error): New function.
10119 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10120 multiple syntax errors are reported, and alloca is being used.
10121 Instead, reallocate buffers twice as big each time, so that
10122 we waste at most half the allocated memory. Start with a small
10123 (128-byte) buffer that will suffice in most cases anyway.
10124 Use yysyntax_error to do most of the work.
10125
10126 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10127 yynerrs is the number of errors reported, not the number of
10128 errors encountered.
10129
10130 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10131 Mark it as expected to fail.
10132 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10133 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10134 Don't start user-code symbols with "yy", to avoid name space problems.
10135
10136 2005-09-19 Akim Demaille <akim@epita.fr>
10137
10138 Remove the traits, failed experiment.
10139 It never proved useful, and anyway because of the current
10140 definition, it was not possible to have several specialization of
10141 this traits, making it useless.
10142 * data/lalr1.cc (yy:traits): Remove.
10143 Inline its definitions in the parser class.
10144
10145 2005-09-19 Akim Demaille <akim@epita.fr>
10146
10147 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10148 least Mac OSX with a /usr/local install of gettext.
10149
10150 2005-09-19 Akim Demaille <akim@epita.fr>
10151
10152 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10153 and yytoken for similarity with the other skeletons.
10154
10155 2005-09-19 Akim Demaille <akim@epita.fr>
10156
10157 * NEWS, configure.ac: update version number to 2.1a.
10158
10159 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10160
10161 * NEWS: Version 2.1.
10162
10163 * NEWS: Remove notice of yytname change, since it was never in an
10164 official release.
10165 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10166 diagnostic.
10167 * src/output.c (prepare): Likewise.
10168 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10169 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10170 is not defined. This is an awful hack, but it's enough for now.
10171 All callers changed.
10172 * tests/glr-regression-at (make_value): Args are const pointers now,
10173 to avoid GCC warning.
10174 (Duplicated user destructor for lookahead): New test. Currently
10175 skipped. It fails on my host but I'm not sure it'll always fail.
10176
10177 2005-09-16 Akim Demaille <akim@epita.fr>
10178
10179 * src/symtab.h (struct symbol): Declare the printer and destructor
10180 as const, to avoid accidental calls to free.
10181 (symbol_destructor_set, symbol_printer_set): Adjust.
10182 * src/symtab.c: Adjust.
10183
10184 2005-09-16 Akim Demaille <akim@epita.fr>
10185
10186 * data/c.m4 (b4_token_enums): New.
10187 (b4_token_defines): Rename as...
10188 (b4_token_enums_defines): this.
10189 (b4_token_defines): New, output only the #defines.
10190 * data/yacc.c, data/glr.c: Adjust.
10191 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10192 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10193 as default values.
10194
10195 2005-09-16 Akim Demaille <akim@epita.fr>
10196
10197 * data/lalr1.cc (yylex_): Remove, inline its code.
10198 (yyreport_syntax_error_): Remove, replaced by...
10199 (yysyntax_error_): this which returns a string and leaves to the
10200 caller the call to the users' error function.
10201 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10202 Move from members of the parser object...
10203 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10204 to local variables of the parse function.
10205
10206 2005-09-16 Akim Demaille <akim@epita.fr>
10207
10208 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10209 since it's in Bison's name space.
10210
10211 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10212
10213 * data/glr.c (yyresolveValue): Add default case to pacify
10214 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10215
10216 * NEWS: Document when yyparse started to return 2.
10217 * doc/bison.texinfo (Parser Function): Document when yyparse
10218 returns 2.
10219
10220 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10221 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10222 changed.
10223 (class position): file_name -> filename (reverting). All uses changed.
10224
10225 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10226
10227 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10228 do anything if $@ exists. This reverts part of the 2005-07-07
10229 patch.
10230
10231 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10232
10233 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10234 contains obsolete information and isn't worth distributing as a
10235 separate file anyway.
10236 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10237 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10238 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10239 (yyparse): Abort if user code uses longjmp to throw an unexpected
10240 value.
10241
10242 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10243
10244 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10245 Suggested by twlevo@xs4all.nl.
10246
10247 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10248 This avoids a diagnostic from gcc -Wswitch-enum.
10249 Problem reported by twlevo@xs4all.nl.
10250
10251 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10252 standards. Use "file name" or "file" or "name", depending on
10253 the context.
10254 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10255 not to hack/foo.tab.c.
10256 (Calc++ Top Level): 2nd arg of main is not const.
10257 * data/glr.c: b4_filename -> b4_file_name.
10258 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10259 All uses changed.
10260 (class position): filename -> file_name. All uses changed.
10261 * data/yacc.c: b4_filename -> b4_file_name.
10262 * lib/bitset.h: filename -> file_name in local vars.
10263 * lib/bitset_stats.c: Likewise.
10264 * src/files.c: Likewise.
10265 * src/scan-skel.l ("@output ".*\n): Likewise.
10266 * src/files.c (file_name_split): Renamed from filename_split.
10267 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10268
10269 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10270
10271 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10272 to accommodate latest gnulib.
10273
10274 * tests/glr-regression.at (Duplicate representation of merged trees):
10275 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10276
10277 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10278 needed.
10279
10280 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10281
10282 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10283 All uses changed. Invoke user destructor after an error during a
10284 split parse (trivial change from Joel E. Denny).
10285
10286 * tests/glr-regression.at
10287 (User destructor after an error during a split parse): New test case.
10288 Problem reported by Joel E. Denny in:
10289 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10290
10291 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10292
10293 * README-cvs: Give URLs for recommended tools.
10294 Mention Gzip version problem, and bootstrapping issues.
10295 Remove troubleshooting section, as it's somewhat obsolete.
10296
10297 * bootstrap (no_cache): New var, to accommodate different wget
10298 variants. Use it instead of '-C off'. Problem reported by
10299 twlevo@xs4all.nl.
10300
10301 * data/glr.c (yydestroyStackItem): New function.
10302 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10303 debugging information. Problem reported by Joel E. Denny.
10304
10305 2005-08-25 Akim Demaille <akim@epita.fr>
10306
10307 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10308
10309 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10310
10311 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10312 Don't invoke destructor on unresolved entries.
10313 * tests/glr-regression.at
10314 (User destructor for unresolved GLR semantic value): New test case.
10315 Problem reported by Joel E. Denny in:
10316 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10317
10318 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10319
10320 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10321 Add strnlen.c.
10322 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10323 lib-prefix.m4, po.m4.
10324
10325 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10326 in yydestruct diagnostic, since it might not be an error.
10327 Problem reported by Joel Denny near end of
10328 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10329 * data/lalr1.cc (yyerturn): Likewise.
10330 * data/yacc.c (yyreturn): Likewise.
10331 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10332
10333 * src/files.c: Remove obsolete FIXME comment.
10334
10335 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10336 with the other templates, and to fix bogus run-on messages such
10337 as the one reported at the end of
10338 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10339 All callers changed to avoid the newline.
10340 (yyprocessOneStack): Output two lines rather than one, to accommodate
10341 the above change. This changes the debug output format slightly.
10342
10343 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10344 reported by Joel E. Denny in
10345 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10346 (trivial change).
10347 * tests/glr-regression.at (Duplicate representation of merged trees):
10348 New test, from Joel E. Denny in:
10349 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10350 * THANKS: Add Joel E. Denny.
10351
10352 * configure.ac (AC_INIT): Bump to 2.0c.
10353
10354 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10355
10356 * NEWS: Version 2.0b.
10357
10358 * Makefile.am (SUBDIRS): Put examples before tests, so that
10359 "make check" doesn't finish with "All 1 tests passed".
10360
10361 * tests/regression.at (Token definitions): Don't rely on
10362 AT_PARSER_CHECK for data that contains backslashes. It currently
10363 uses 'echo', and 'echo' isn't portable if its argument contains
10364 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10365 that the byte '\0xff' is not printable in the C locale; it is,
10366 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10367 not printable, so use '\0x81' to test.
10368
10369 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10370 version of GCC, since the macro is used with non-GCC compilers.
10371
10372 Fix core dump reported by Pablo De Napoli in
10373 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10374 * tests/regression.at (Invalid inputs with {}): New test.
10375 * src/parse-gram.y (token_name): Translate type before using
10376 it as an index.
10377
10378 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10379 the user's name space. All uses changed to __attribute__
10380 ((__unused__)).
10381 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10382 Add __attribute__ ((__noreturn__)).
10383
10384 * etc/clcommit: Remove. We weren't using it, and it failed
10385 "make maintainer-distcheck".
10386 * Makefile.maint: Merge from coreutils.
10387 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10388 (syntax-check-rules): Change list of rules as described below.
10389 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10390 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10391 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10392 (sc_trailing_space): New rules.
10393 (sc_xalloc_h_in_src): Remove.
10394 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10395 (sc_space_tab, sc_error_exit_success, sc_changelog):
10396 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10397 (makefile-check, po-check, author_mark_check):
10398 (makefile_path_separator_check, copyright-check):
10399 Use grep -n, to make it easier to find violations.
10400 Use CVS_LIST and CVS_LIST_EXCEPT.
10401 (header_regexp, h_re): Remove.
10402 (dd_c): New macro.
10403 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10404 (my-distcheck): Use more-modern GCC flags.
10405 (signatures, %.asc): Remove.
10406 (rel-files, announcement): Remove signatures.
10407 Restore old updating code, even though we don't use it, so
10408 that we're the same as coreutils.
10409 (alpha, beta, major): Depend on news-date-check.
10410 Make the upload commands.
10411
10412 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10413 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10414 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10415 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10416 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10417 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10418 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10419 * tests/sets.at: Likewise.
10420
10421 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10422 we comment out the Autoconf version number.
10423 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10424 it's error-prone and "make maintainer-distcheck" rejects it.
10425
10426 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10427 Indent calls to "error" to pacify "make maintainer-distcheck",
10428 when the calls are not intended to be translated.
10429 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10430
10431 * src/Makefile.am (DEFS): Use +=, to pacify
10432 "make maintainer-distcheck".
10433 (bison_SOURCES): Add scan-skel.h.
10434 (sc_tight_scope): New rule, from coreutils.
10435
10436 * src/files.c (src_extension, header_extension):
10437 Now static, not extern.
10438 * src/getargs.c (short_options): Likewise.
10439 * src/muscle_tab.c (muscle_table): Likewise.
10440 * src/parse-gram.y (current_class, current_type, current_prec):
10441 Likewise.
10442 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10443 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10444 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10445 void, to avoid warning when NLS is disabled.
10446 * src/output.c: Include scan-skel.h.
10447 (scan_skel): Remove decl, since scan-skel.h does this.
10448 (output_skeleton):
10449 Indent calls to "error" to pacify "make maintainer-distcheck".
10450 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10451 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10452 "make maintainer-distcheck".
10453 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10454 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10455 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10456 (skel_lex_destroy, scan_skel): Move these decls to...
10457 * src/scan-skel.h: New file.
10458 * src/uniqstr.c (uniqstr_assert):
10459 Indent calls to "error" to pacify "make maintainer-distcheck".
10460
10461 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10462 not @VAR@.
10463
10464 * tests/torture.at: Revamp to avoid misuse of atoi that
10465 "make maintainer-distcheck" complained about.
10466
10467 * examples/extexi (message): Don't print a message more than once,
10468 and omit line-number decoration that makes Emacs compile think
10469 that informative messages are worth worrying about.
10470
10471 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10472
10473 * configure.ac: Update version number.
10474
10475 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10476 accidentally.
10477 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10478 autogenerated by the maintainer.
10479 * examples/calc++/.cvsignore: Add *.yy.
10480
10481 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10482 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10483 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10484
10485 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10486
10487 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10488 from maintainer-distcheck about casting the argument of 'free'.
10489
10490 * NEWS: Mention recent yytname changes.
10491 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10492
10493 * bootstrap: For translations that have not yet been upgraded to
10494 the new runtime-po domain, prime the pump by extracting the
10495 relevant strings from the obsolete translations. This code can be
10496 removed once the bison-runtime domain has been translated by each
10497 team.
10498
10499 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10500 now that token names are already quoted.
10501
10502 Fix problem reported by Anthony Heading.
10503 * data/glr.c (YYTOKEN_TABLE): New macro.
10504 (yytname): Define if YYTOKEN_TABLE.
10505 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10506 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10507 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10508 * src/output.c (prepare_symbols): Output token_table_flag.
10509
10510 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10511
10512 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10513 again if the first call fails.
10514
10515 * data/glr.c (yytnamerr): New function.
10516 (yyreportSyntaxError): Use it to dequote most string literals.
10517 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10518 with other skeletons. All uses changed.
10519 (yytnameerr_): New function.
10520 (yyreport_syntax_error): Use it to dequote most string literals.
10521 * data/yacc.c (yytnamerr): New function.
10522 (yyerrlab): Use it to decode most string literals.
10523 * doc/bison.texinfo (Decl Summary, Calling Convention):
10524 Clarify quoting convention of yytname.
10525 * src/output.c (prepare_symbols): Quote all names. This undoes
10526 the 2005-04-17 change, which is now accomplished (mostly) via
10527 changes in the parsers as described above.
10528 * tests/regression.at (Token definitions, Web2c Actions):
10529 Undo most 2005-04-17 change here, too.
10530
10531 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10532
10533 Fix more problems reported by twlevo@xs4all.nl.
10534 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10535 remove trailing spaces. This loses the exit status of ./types,
10536 and isn't needed since ./types shouldn't be emitting trailing
10537 spaces.
10538 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10539 as the stack isn't valid in that case.
10540
10541 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10542 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10543 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10544 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10545 is used.
10546 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10547 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10548 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10549 Likewise.
10550
10551 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10552 overly-picky compilers that reject 'char *foo = "bar";'.
10553
10554 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10555 to FILE * parameter, not to stderr. This fixes a typo introduced
10556 in the 2005-07-12 change.
10557
10558 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10559 warnings from GCC 4.
10560
10561 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10562 (yyglrShiftDefer, yysplitStack):
10563 Remove unused parameters b4_pure_formals. All uses changed.
10564 (yyglrShift): Remove unused parameters b4_user_formals.
10565 All uses changed.
10566 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10567
10568 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10569
10570 Destructor cleanups and regularization among the three skeletons.
10571 * NEWS: Document the behavior changes.
10572 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10573 stack before failing, as the cleanup code will do it for us now.
10574 * data/lalr1.cc (yyerrlab): Likewise.
10575 * data/glr.c (yyparse): Pop everything off the stack before
10576 freeing it, so that destructors get called properly.
10577 * data/lalr1.cc (yyreturn): Likewise.
10578 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10579 This is more consistent.
10580 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10581 why destructors might be called. 1.875 -> 2.1.
10582 (Destructor Decl, Decl Summary, Table of Symbols):
10583 Some English-language cleanups for %destructor.
10584 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10585 Add output line for destructor of start symbol.
10586 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10587 because of that same extra output line.
10588
10589 * NEWS: Document minor wording changes in diagnostics of
10590 Bison-generated parsers.
10591 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10592 Remove unused formals. All uses changed.
10593 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10594 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10595 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10596 Rename yyoverflowab to yyexhaustedlab.
10597 When memory exhaustion occurs during syntax-error reporting,
10598 report it separately rather than in a single diagnostic; this
10599 eases translation.
10600 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10601 (Memory Exhausted): Renamed from Parser Stack Overflow.
10602 Revamp wording slightly to prefer "memory exhaustion".
10603 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10604
10605 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10606
10607 Add i18n support to the GLR skeleton. Partially fix the C++
10608 skeleton; a C++ expert needs to finish this. Remove debugging
10609 msgids; there's little point to having them translated, since they
10610 can be understood only by someone who can read the
10611 (English-language) source code.
10612
10613 Generate runtime-po/bison-runtime.pot automatically, so that we
10614 don't have to worry about garbage getting in that file. We'll
10615 make sure after the next official release that old msgids don't
10616 get lost. See
10617 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10618
10619 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10620 Now auto-generated.
10621 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10622 Fix typos in explanations of the runtime file.
10623 * bootstrap: Change gettext keyword from YYI18N to YY_.
10624 Use standard Makefile.in.in in runtime-po, since we'll arrange
10625 for backward-compatible bison-runtime.po files in a different way.
10626 * data/glr.c (YY_): New macro, from yacc.c.
10627 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10628 Translate messages intended for users.
10629 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10630 the wording in the other skeletons. We don't know that the memory
10631 is virtual.
10632 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10633 Use same method that yacc.c uses.
10634 Don't translate debugging messages.
10635 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10636 it doesn't work (yet), and requires C++ expertise to fix.
10637 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10638 Move defn to a more logical place, to be consistent with other
10639 skeletons.
10640 Don't translate debugging messages.
10641 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10642 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10643 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10644 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10645
10646 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10647 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10648 void, not int.
10649 * tests/glr-regression.at (Badly Collapsed GLR States):
10650 Likewise.
10651 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10652 yylex should return 0 at EOF rather than aborting.
10653
10654 Improve tests for stack overflow in GLR parser.
10655 Problem reported by twlevo@xs4all.nl.
10656 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10657 All uses removed.
10658 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10659 can handle the problem.
10660 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10661 (yyparse): New local variable yyresult to record the result.
10662 Use result of setjmp to set it, rather than storing itinto
10663 struct.
10664 (yyDone): Remove label.
10665 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10666 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10667 if YYABORT is used).
10668 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10669 yyparse status; put status > 1 into diagnostic.
10670 Check that status==2 works.
10671 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10672 Use exit status 3 for failure to open (which shouldn't happen).
10673
10674 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10675
10676 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10677 1 on syntax error; just let yyparse do its thing.
10678 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10679 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10680 (Exploding the Stack Size with Alloca):
10681 (Exploding the Stack Size with Malloc):
10682 Expect exit status 2, not 1, since the parser is supposed to blow
10683 its stack. Problem reported by twlevo@xs4all.nl.
10684
10685 * data/glr.c (yyparse): Don't assume that the initial calls
10686 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10687 Print a stack-overflow message and fail instead.
10688 Initialize the line-number information before creating the stack,
10689 so that the stack-overflow message can report line zero safely.
10690
10691 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10692
10693 Fix problems reported by twlevo@xs4all.nl.
10694 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10695 (yyuserMerge): Provide a default case if b4_mergers is empty.
10696 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10697 * tests/glr-regression.at
10698 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10699 Add casts to pacify C++ compilers.
10700 * tests/glr-regression.at (Improper merging of GLR delayed action
10701 sets): Declare yylex before using it.
10702 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10703 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10704 test for valgrind; valgrind is independent of g++.
10705 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10706 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10707 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10708 Use a destructor, so that we can expand the stack. Change
10709 YYSTYPE to char * so that we can free it. Cast result of malloc.
10710
10711 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10712
10713 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10714 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10715
10716 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10717
10718 * PACKAGING: New file, suggested by Bruno Haible and taken from
10719 similar wording in gettext's PACKAGING file.
10720 * NEWS: Mention PACKAGING.
10721 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10722
10723 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10724
10725 * NEWS: Document recent i18n improvements.
10726 * bootstrap: Get runtime translations into runtime-po.
10727 Create runtime-po files automatically, if possible.
10728 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10729 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10730 does not infringe on the user's name space.
10731 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10732 * doc/bison.texinfo (Internationalization): Revamp the English
10733 and Texinfo syntax a bit, to try to make it clearer.
10734 (Bison Options, Option Cross Key): Mention --print-localedir.
10735 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10736 YYENABLE_NLS. Quote a bit more.
10737 * runtime-po/.cvsignore: New file.
10738 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10739 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10740 * runtime-po/quot.sed: Likewise.
10741 * runtime-po/boldquot.sed: Likewise.
10742 * runtime-po/en@quot.header: Likewise.
10743 * runtime-po/en@boldquot.header: Likewise.
10744 * runtime-po/insert-header.sin: Likewise.
10745 * runtime-po/remove-potcdate.sin: Likewise.
10746 * runtime-po/Makevars: Likewise.
10747 * runtime-po/LINGUAS: Likewise.
10748 * runtime-po/de.po: Likewise; we will rely on the translation project
10749 to maintain this, so "bootstrap" should get it.
10750 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10751 its value.
10752 * src/main.c (main): Bind the bison-runtime domain, too.
10753
10754 2005-07-12 Bruno Haible <bruno@clisp.org>
10755
10756 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10757 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10758 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10759 * runtime-po: New directory.
10760 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10761 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10762 * runtime-po/Rules-quot: New file, copied from po/.
10763 * runtime-po/quot.sed: Likewise.
10764 * runtime-po/boldquot.sed: Likewise.
10765 * runtime-po/en@quot.header: Likewise.
10766 * runtime-po/en@boldquot.header: Likewise.
10767 * runtime-po/insert-header.sin: Likewise.
10768 * runtime-po/remove-potcdate.sin: Likewise.
10769 * runtime-po/Makevars: New file.
10770 * runtime-po/POTFILES.in: New file.
10771 * runtime-po/LINGUAS: New file.
10772 * runtime-po/bison-runtime.pot: New file.
10773 * runtime-po/de.po: New file.
10774 * m4/bison.m4: New file.
10775 * Makefile.am (SUBDIRS): Add runtime-po.
10776 (aclocaldir, aclocal_DATA): New variables.
10777 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10778 Define aclocaldir.
10779 * src/getargs.c (usage): Document --print-localedir option.
10780 (PRINT_LOCALEDIR_OPTION): New enum item.
10781 (long_options): Add --print-localedir option.
10782 (getargs): Handle --print-localedir option.
10783 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10784 (Internationalization): New section.
10785
10786 2005-07-12 Akim Demaille <akim@epita.fr>
10787
10788 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10789 for consistency with the rest of the code.
10790 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10791 Add separators.
10792
10793 2005-07-12 Akim Demaille <akim@epita.fr>
10794
10795 * src/parse-gram.y: Use %printer instead of YYPRINT.
10796
10797 2005-07-12 Akim Demaille <akim@epita.fr>
10798
10799 * src/symtab.h, src/symtab.c (symbol_print): New.
10800 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10801 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10802
10803 2005-07-12 Akim Demaille <akim@epita.fr>
10804
10805 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10806 b4_at_dollar and b4_dollar_dollar.
10807
10808 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10809
10810 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10811 and Pennello's paper.
10812
10813 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10814
10815 * data/yacc.c (yyparse): Undo previous patch. Instead,
10816 set yylsp[0] and yyvsp[0] only if the initial action
10817 sets yylloc and yylval, respectively.
10818
10819 * data/yacc.c (yyparse): In the initial action, set
10820 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10821 This avoids the use of undefined variables if the initial
10822 action does not set yylloc and/or yylval.
10823
10824 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10825
10826 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10827 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10828 Remove from CVS. These files are automatically generated.
10829 * examples/extexi: Clarify that this file is now part of Bison,
10830 not GNU M4, and that it works with any POSIX-compatible Awk.
10831 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10832 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10833 so that we also get calc++-parser.yy. Geneate it.
10834 Use $(AWK), not gawk, since any conforming Awk will do.
10835 Put comment before action, since older 'make' can't handle comment
10836 in action.
10837 $(BUILT_SOURCES): List all built sources, not just some of them.
10838 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10839 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10840 $($(calc_sources_generated)): Remove unnecessary test for existence
10841 of target. (This had a shell syntax error anyway; a stray "x".)
10842 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10843 calc++-parser.yy.
10844 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10845
10846 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10847 implied by the other modules.
10848
10849 2005-07-06 Akim Demaille <akim@epita.fr>
10850
10851 Bind examples/calc++ to the package.
10852 * examples/calc++/Makefile: Remove, replaced by...
10853 * examples/calc++/Makefile.am: ... this new file.
10854 * examples/calc++/test: Remove input.
10855 * examples/calc++/compile: Remove.
10856 * examples/Makefile.am: New.
10857 * configure.ac, Makefile.am: Adjust.
10858 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10859
10860 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * data/glr.c (yyFail): Drastically simplify; since the format argument
10863 never had any % directives, we can simply pass it to yyerror.
10864 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10865 be modified later, as that is the usual style in glr.c.
10866 Problems reported by Paul Hilfinger.
10867
10868 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10869 and size overflow errors.
10870 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10871 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10872 (YYSIZEMAX): New macro.
10873 (yystpcpy): New function, taken from yacc.c.
10874 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10875 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10876 so that we don't have to maintain their signatures.
10877 (yyFail): Check for buffer overflow, by using vsnprintf rather
10878 than vsprintf. Allocate a bigger buffer if possible.
10879 Report an error if buffer allocation fails.
10880 (yyStackOverflow): New function.
10881 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10882 the initialization was successful. It might fail if storage was
10883 exhausted.
10884 (yyexpandGLRStack): Add more checks for storage allocation failure.
10885 Use yyStackOverflow to report failures.
10886 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10887 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10888 Don't assume stack number fits in int.
10889 (yysplitStack): Check for storage allocation failure.
10890 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10891 can print diagnostics on storage allocation failure. All callers
10892 changed.
10893 (yyresolveValue): Use yybool for boolean.
10894 (yyreportSyntaxError): Check for size-calculation overflow.
10895 This code is taken from yacc.c.
10896 (yyparse): Check for storage allocation errors when allocating
10897 the initial stack.
10898
10899 2005-07-05 Akim Demaille <akim@epita.fr>
10900
10901 Extract calc++ from the documentation.
10902 * doc/bison.texinfo (Calc++): Add the extraction marks.
10903 * examples/extexi: New, from the aborted GNU Programming 2E.
10904 Separate the different paragraph of a file with empty lines.
10905 * examples/Makefile: Use it to extract the whole calc++ example.
10906
10907 2005-06-24 Akim Demaille <akim@epita.fr>
10908
10909 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10910 class typedefs.
10911
10912 2005-06-22 Akim Demaille <akim@epita.fr>
10913
10914 * doc/bison.texinfo (C++ Language Interface): First stab.
10915 (C++ Parsers): Remove.
10916
10917 2005-06-22 Akim Demaille <akim@epita.fr>
10918
10919 * data/lalr1.cc (yylex_): Honor %lex-param.
10920
10921 2005-06-22 Akim Demaille <akim@epita.fr>
10922
10923 Start a set of simple examples.
10924 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10925 * examples/calc++/calc++-driver.hh,
10926 * examples/calc++/calc++-parser.yy,
10927 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10928 * examples/calc++/compile, examples/calc++/test: New.
10929
10930 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10931
10932 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10933 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10934 which stems from the 2005-05-27 patch.
10935
10936 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10937
10938 * data/glr.c: Modify treatment of unused parameters to permit use
10939 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10940
10941 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10942
10943 Fix infringement on user name space reported by Janos Zoltan Szabo.
10944 * data/yacc.c (yyparse): strlen -> yystrlen.
10945
10946 2005-05-30 Akim Demaille <akim@epita.fr>
10947
10948 * data/lalr1.cc (_): New.
10949 Translate the various messages.
10950
10951 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10952
10953 Fix infringement on user name space reported by Bruno Haible.
10954 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10955 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10956 the user's name space.
10957 (alloca): Include <stdlib.h> to get it, if it's not built in.
10958 (YYMALLOC, YYFREE): Define only if needed.
10959 (malloc, free): Declare, but only if needed, as this infringes on
10960 the user name space.
10961
10962 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10963
10964 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10965 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10966 with %d format.
10967 * lib/ebitset.c (min, max): Undef before defining.
10968 * lib/vbitset.c (min, max): Likewise.
10969 * lib/subpipe.c (create_subpipe): Save local variables in case
10970 vfork clobbers them.
10971
10972 2005-05-24 Bruno Haible <bruno@clisp.org>
10973
10974 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10975 error message syntax used by gcc-4.0.
10976
10977 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10978
10979 * README: Mention m4 1.4.3. Remove obsolete advice about
10980 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10981
10982 * bootstrap: Remove workaround for problem I encountered with
10983 gettext 0.14.1; it seems to be fixed now.
10984
10985 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10986
10987 * NEWS: Version 2.0a.
10988
10989 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10990 the previous change.
10991
10992 Various maintainer cleanups.
10993 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10994 conftest*, for benefit of CVS commands run at the same time as
10995 "configure". Add build-aux, since "bootstrap" now creates it and
10996 its subfiles.
10997 * Makefile.cfg (move_if_change): Remove.
10998 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10999 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11000 (po_repo, do-po-update, po-update, wget_files, get-targets):
11001 (config.guess-url_prefix, config.sub-url_prefix):
11002 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11003 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11004 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11005 Remove.
11006 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11007 this is now the recommended name.
11008 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11009 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11010 ylwrap. These files now go into build-aux.
11011 * config/move-if-change: Remove.
11012 * config/prev-version.txt: Bump from 1.75 to 2.0.
11013
11014 * bootstrap: Add stdio-safer, unistd-safer modules.
11015 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11016 we don't need it).
11017 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11018 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11019 * lib/subpipe.c: Include "unistd-safer.h".
11020 (create_subpipe): Make sure all the newly-created
11021 file descriptors are > 2, so that diagnostics don't
11022 get sent down them (which might cause Bison to hang, in theory).
11023 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11024 * src/files.c (xfopen): Use fopen_safer, not fopen.
11025
11026 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11027 yesterday's yacc.c fix.
11028
11029 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11030
11031 * data/glr.c, data/lalr1.cc: Update copyright date.
11032
11033 Fix a destructor bug reported by Wolfgang Spraul in
11034 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11035 * data/yacc.c (yyabortlab): Don't call destructor, and
11036 don't set yychar to EMPTY.
11037 (yyoverflowlab): Don't call destructor.
11038 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11039 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11040 since we no longer output the message "discarding lookahead token
11041 end of input ()".
11042
11043 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11044
11045 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11046 fix a small glitch in debugging output.
11047 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11048 after YY_SYMBOL_PRINT where needed.
11049
11050 (struct yyGLRState): Add some comments.
11051 (struct yySemanticOption): Add some comments.
11052 (union yyGLRStackItem): Add comment.
11053
11054 (yymergeOptionSets): Correct this to properly perform the union,
11055 avoiding infinite reported by Michael Rosien.
11056 Update comment.
11057
11058 * tests/glr-regression.at: Add test for GLR merging error reported
11059 by M. Rosien.
11060
11061 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11062
11063 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11064 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11065 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11066 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11067 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11068 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11069 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11070 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11071 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11072 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11073 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11074 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11075 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11076 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11077 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11078 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11079 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11080 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11081 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11082 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11083 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11084 src/output.h, src/parse-gram.c, src/parse-gram.h,
11085 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11086 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11087 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11088 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11089 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11090 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11091 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11092 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11093 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11094 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11095 tests/reduce.at, tests/regression.at, tests/sets.at,
11096 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11097 Update FSF postal mail address.
11098
11099 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11100
11101 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11102 Problem reported by Ralf Menzel.
11103
11104 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11105
11106 * tests/actions.at: Test that stack overflow invokes destructors.
11107 From Marcus Holland-Moritz.
11108 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11109 from here....
11110 (yyreturn): to here. That way, destructors are called properly
11111 even if the stack overflows, or the user calls YYACCEPT or
11112 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11113 (yyoverflowlab): Destroy the lookahead.
11114
11115 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11116
11117 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11118
11119 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11120
11121 * NEWS: Bison-generated C parsers no longer quote literal strings
11122 associated with tokens.
11123 * src/output.c (prepare_symbols): Don't escape strings,
11124 since users don't want to see C escapes.
11125 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11126 in diagnostics.
11127 * tests/input.at (Torturing the Scanner): Likewise.
11128 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11129
11130 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11131
11132 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11133 the data size is known to be too small and we can't increase it.
11134 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11135
11136 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11137
11138 * src/parse-gram.y: Include quotearg.h.
11139 (string_as_id): Quote $1 before using it as a key, since the
11140 lexer no longer quotes it for us.
11141 (string_content): Don't strip quotes, since lexer no longer
11142 quotes it for us.
11143 * src/scan-gram.l: Include quotearg.h.
11144 ("\""): Omit quote.
11145 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11146 a key, since the rest of the lexer doesn't quote it.
11147 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11148 * tests/regression.at (Token definitions): Check for backslashes
11149 in token strings.
11150
11151 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11152 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11153 (yyparse): Revamp code to generate long syntax error message, to
11154 make it easier to translate, and to avoid problems with arithmetic
11155 overflow. Change "virtual memory" to "memory" in diagnostic, since
11156 we don't know whether the memory is virtual.
11157
11158 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11159
11160 * NEWS: Bison-generated C parsers now use the _ macro to
11161 translate strings.
11162 * data/yacc.c (_) [!defined _]: New macro.
11163 All English strings wrapped inside this macro.
11164 * doc/bison.texinfo (Bison Parser): Document _.
11165 * po/POTFILES.in: Include src/parse-gram.c, since it now
11166 includes translateable strings that parse-gram.y doesn't.
11167
11168 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11169
11170 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11171 reverting the 2004-10-11 change to this function.
11172 (symbol_check_alias_consistency): Don't call symbol_type_set
11173 if the type name is already correct.
11174 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11175
11176 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11177
11178 * tests/regression.at (Token definitions): Don't use a token named
11179 c, as that generates a "#define c ..." that runs afoul of buggy
11180 stdlib.h that uses the identifier c as a member of struct
11181 drand48_data. Problem reported by Horst Wente.
11182
11183 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11184
11185 * bootstrap: Change translation URL from
11186 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11187 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11188 redirection glitches. Problem reported by twlevo@xs4all.nl.
11189
11190 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11191
11192 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11193 after operands; POSIX says this isn't portable for the c99 command.
11194
11195 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11196
11197 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11198 immediately if a data overrun has occurred; this may help us track
11199 down what may be a spurious failure on MacOS.
11200
11201 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11202
11203 Respond to problems reported by twlevo@xs4all.nl.
11204
11205 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11206
11207 * src/vcg.h: Comment fix.
11208 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11209 (G_CMAX): Change to -1 instead of INT_MAX.
11210
11211 * data/yacc.c (yyparse): Omit spaces before #line.
11212
11213 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11214
11215 * src/tables.c (state_number_to_vector_number): Put it inside an
11216 "#if 0", since it's not currently used. Problem reported by
11217 Roland McGrath.
11218
11219 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11220
11221 * src/output.c (escaped_output): Renamed from
11222 escaped_file_name_output, since we now use it for symbol tags as
11223 well. All uses changed.
11224 (symbol_destructors_output, symbol_printers_output):
11225 Escape symbol tags too.
11226 Problem reported by Matyas Forstner in
11227 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11228
11229 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11230 not needed.
11231 * src/output.c (user_actions_output, token_definitions_output,
11232 symbol_destructors_output, symbol_printers_output): Likewise.
11233 * src/reader.c (prologue_augment): Likewise.
11234 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11235
11236 * src/vcg.c (output_edge): Don't quote linestyle arg.
11237 Problem reported by twlevo@xs4all.nl.
11238
11239 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11240
11241 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11242 example, reported by Derek M Jones. Also, make the example even
11243 more outrageous, to better illustrate how bad the problem is.
11244
11245 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11246
11247 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11248 putsym. Typo reported by Sebastian Piping.
11249
11250 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11251
11252 * doc/bison.texinfo (Language and Grammar): some -> same
11253 (Epilogue): int he -> in the
11254 Typos reported by Sebastian Piping via Justin Pence.
11255
11256 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11257
11258 * tests/glr-regression.at (Improper handling of embedded actions
11259 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11260 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11261 with dollar signs in test names.
11262 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11263 for a similar reason.
11264
11265 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11266
11267 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11268 wants to redefine G_VIEW.
11269
11270 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11271
11272 * src/vcg.c (get_view_str): Remove case for normal_view.
11273 Problem reported by twlevo@xs4all.nl.
11274
11275 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11276
11277 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11278 Problem reported by twlevo@xs4all.nl.
11279
11280 * doc/bison.texinfo: Change @dircategory from "GNU programming
11281 tools" to "Software development". Requested by Richard Stallman
11282 via Karl Berry.
11283
11284 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11285
11286 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11287 Problem reported by twlevo@xs4all.nl.
11288
11289 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11290
11291 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11292 keyword; it's not needed with modern compilers, and it doesn't
11293 affect correctness with older compilers. Suggested by
11294 twlevo@xs4all.nl.
11295
11296 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11297
11298 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11299 gcc -Wswitch-default.
11300 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11301 * data/yacc.c (yyparse): Likewise.
11302
11303 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11304
11305 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11306 already. Let config.h define any nonstandard values.
11307
11308 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11309
11310 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11311 for the benefit of slower hosts. Problem reported by
11312 Nelson H. F. Beebe.
11313
11314 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11315
11316 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11317 being defined and not used.
11318 * data/lalr1.cc (yyparse): Likewise.
11319 Use "if (false)" rather than "if (0)".
11320
11321 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11322
11323 * TODO: Mention that we should allow NUL bytes in tokens.
11324
11325 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11326
11327 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11328 Problem reported by Hans Aberg.
11329
11330 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11331
11332 * src/getargs.c (version): Happy new year; update overall
11333 program copyright date from 2004 to 2005.
11334
11335 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11336 Problem reported by Hans Aberg.
11337 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11338 (Output file names.): Add a test for the case when standard output
11339 is closed.
11340
11341 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11342
11343 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11344 to fix an oversight in the Bison 2.0 manual.
11345
11346 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11347
11348 * NEWS: Version 2.0. Reformat the existing news items since
11349 1.875, so that related items are grouped together.
11350 * configure.ac (AC_INIT): Bump version to 2.0.
11351 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11352
11353 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11354 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11355 otherwise, we're not testing alloca. Unfortunately there's no
11356 simple way to consult HAVE_ALLOCA here.
11357
11358 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11359 for yymsg, too.
11360
11361 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11362 hand. This avoids a warning about comparing int to size_t when
11363 GCC warnings are enabled.
11364
11365 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11366
11367 * NEWS: Bison-generated parsers no longer default to using the
11368 alloca function (when available) to extend the parser stack, due
11369 to widespread problems in unchecked stack-overflow detection.
11370 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11371 responsibility to set it to a positive value. This lets the user
11372 specify a value that is not a preprocessor constant.
11373 * data/yacc.c (YYMAXDEPTH): Likewise.
11374 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11375 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11376 to be a compile-time constant. However, explain the constraints on it.
11377 Also, explain the constraints on YYINITDEPTH.
11378 (Table of Symbols): Explain that alloca is no longer the default.
11379 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11380 to 1.
11381
11382 * doc/bison.texinfo (Location Default Action): Mention that n must
11383 be zero when k is zero. Suggested by Frank Heckenbach.
11384
11385 2004-12-22 Akim Demaille <akim@epita.fr>
11386
11387 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11388 (parser::state_type, parser::semantic_type, parser::location_type):
11389 Private, not public.
11390 (parser::parse): Return ints, not bool.
11391 Returning a bool introduces a problem: 0 corresponds to false, and
11392 it seems weird to return false on success. Returning true changes
11393 the conventions for yyparse.
11394 Alternatively we could return void and send an exception.
11395 There is no clear consensus (yet?).
11396 (state_stack, semantic_stack, location_stack): Rename as...
11397 (state_stack_type, semantic_stack_type, location_stack_type): these.
11398 Private, not public.
11399 * tests/c++.at: New.
11400 * tests/testsuite.at, tests/Makefile.am: Adjust.
11401
11402 2004-12-21 Akim Demaille <akim@epita.fr>
11403
11404 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11405
11406 2004-12-21 Akim Demaille <akim@epita.fr>
11407
11408 Don't impose std::string for filenames.
11409
11410 * data/lalr1.cc (b4_filename_type): New.
11411 (position::filename): Use it.
11412 (parser.hh): Move the inclusion of stack.hh and location.hh below
11413 the user code, so that needed headers for the filename type can be
11414 included first.
11415 Forward declare them before the user code.
11416 * tests/Makefile.am (check-local, installcheck-local): Pass
11417 TESTSUITEFLAGS to the TESTSUITE.
11418
11419 2004-12-20 Akim Demaille <akim@epita.fr>
11420
11421 Use more STL like names: my_class instead of MyClass.
11422
11423 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11424 (SemanticStack, SemanticType, StateStack, StateType)
11425 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11426 (Parser::value): Rename as...
11427 (location_stack, location_type, rhs_number_type, semantic_stack)
11428 (semantic_type, state_stack, state_type, token_number_type, stack)
11429 (slice, traits, parser::yylloc, parser::yylval): these.
11430
11431 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11432
11433 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11434
11435 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11436 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11437
11438 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11439
11440 Remove uses of 'short int' and 'unsigned short int'. This raises
11441 some arbitrary limits. It uses more memory but nowadays that's
11442 not much of an issue.
11443
11444 This change does not affect the generated parsers; that's a different
11445 task, as some users will want to conserve memory there.
11446
11447 Ideally we should use size_t to represent all object counts, and
11448 something like ptrdiff_t to represent signed differences of object
11449 counts; but that will require more code-cleanup than I have the
11450 time to do right now.
11451
11452 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11453 Use size_t, not int or short int, to count objects.
11454 * src/closure.c (nritemset, closure): Likewise.
11455 * src/closure.h (nritemset, closure): Likewise.
11456 * src/nullable.c (nullable_compute): Likewise.
11457 * src/print.c (print_core): Likewise.
11458 * src/print_graph.c (print_core): Likewise.
11459 * src/state.c (state_compare, state_hash): Likewise.
11460 * src/state.h (struct state): Likewise.
11461 * src/tables.c (default_goto, goto_actions): Likewise.
11462
11463 * src/gram.h (rule_number, rule): Use int, not short int.
11464 * src/output.c (prepare_rules): Likewise.
11465 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11466 errs, reductions): Likewise.
11467 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11468 Likewise.
11469 * src/tables.c (vector_number, tally, action_number,
11470 ACTION_NUMBER_MINIMUM): Likewise.
11471 * src/output.c (muscle_insert_short_int_table): Remove.
11472
11473 2004-12-17 Akim Demaille <akim@epita.fr>
11474
11475 * data/lalr1.cc: Extensive Doxygenation.
11476 (error_): Rename as...
11477 (error): this, since it is visible to the user.
11478 Adjust callers.
11479 (Parser::message): Now an automatic variable from...
11480 (Parser::yyreport_syntax_error_): here.
11481 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11482 Parser::error.
11483 * tests/input.at: Escape $.
11484
11485 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11486
11487 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11488 Parenthesize rhs to avoid obscure problems with mistakes like
11489 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11490 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11491 b4_rhs_location): Likewise.
11492 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11493 b4_rhs_location): Likewise.
11494
11495 2004-12-16 Akim Demaille <akim@epita.fr>
11496
11497 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11498 yacc.c: be sure to stay within yycheck_.
11499 * tests/actions.at: Re-enable C++ tests.
11500
11501 2004-12-16 Akim Demaille <akim@epita.fr>
11502
11503 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11504 real.
11505
11506 2004-12-16 Akim Demaille <akim@epita.fr>
11507
11508 Use #define to handle the %name-prefix.
11509
11510 * data/glr.c, data/yacc.c: Comment changes.
11511 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11512 so that one can refer to yylex in the parser file, and have it
11513 renamed, as is the case with other skeletons.
11514
11515 2004-12-16 Akim Demaille <akim@epita.fr>
11516
11517 Move lalr1.cc internals into yy*.
11518
11519 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11520 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11521 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11522 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11523 (empty_, final_, terror_, errcode_, ntokens_)
11524 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11525 (looka_, ilooka_, error_range_, nerrs_):
11526 Rename as...
11527 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11528 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11529 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11530 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11531 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11532 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11533 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11534 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11535 these.
11536
11537 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11538
11539 Fix some problems reported by twlevo at xs4all.
11540 * src/symtab.c (symbol_new): Report an error if the input grammar
11541 contains too many symbols. This is better than calling abort() later.
11542 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11543 (struct node, struct graph):
11544 Rename member expand to stretch. All uses changed.
11545 (struct graph): Remove member layoutalgorithm. All uses removed.
11546 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11547 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11548 All uses changed.
11549 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11550
11551 2004-12-15 Akim Demaille <akim@epita.fr>
11552
11553 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11554 Add more Doxygen comments.
11555 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11556 (report_syntax_error_, translate_): Rename as...
11557 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11558 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11559
11560 2004-12-15 Akim Demaille <akim@epita.fr>
11561
11562 * data/lalr1.cc (lex_): Rename as...
11563 (yylex_): this.
11564 Move the trace here.
11565 Take the %name-prefix into account.
11566 Reported by Alexandre Duret-Lutz.
11567
11568 2004-12-15 Akim Demaille <akim@epita.fr>
11569
11570 Simplify the C++ parser constructor.
11571
11572 * data/lalr1.cc (debug_): Rename as...
11573 (yydebug_): so that the parser's internals are always in the yy*
11574 pseudo namespace.
11575 Adjust uses.
11576 (b4_parse_param_decl): Remove the leading comma as it is now only
11577 called as unique argument list.
11578 (Parser::Parser): Remove the constructor accepting a location and
11579 an initial debugging level.
11580 Remove from the other ctor the argument for the debugging level.
11581 (debug_level_type, debug_level, set_debug_level): New.
11582
11583 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11584 constructor calls.
11585
11586 2004-12-15 Akim Demaille <akim@epita.fr>
11587
11588 Remove b4_root related material: failure experiment
11589 (which goal was to allow to derive from a class).
11590
11591 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11592 definitions and uses.
11593
11594 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11595
11596 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11597 not 2, since it's not portable to subtract 1 from the start of an
11598 array. The new item 0 is never set or used. All uses changed.
11599
11600 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11601 the default definition of YYLLOC_DEFAULT. Problem reported
11602 by Frank Heckenbach.
11603
11604 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11605
11606 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11607 the normal case and one for the error case. Just use the
11608 first one uniformly. Problem reported by Frank Heckenbach.
11609 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11610 use exactly the same macro in both places.
11611 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11612 so that the normal-case YYRHSLOC works for the error case too.
11613 All uses changed.
11614 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11615 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11616 * doc/bison.texinfo (Location Default Action): Don't claim that
11617 we have an array of locations. Use the same macro for both glr
11618 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11619 the index is 0.
11620
11621 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11622
11623 * HACKING: Update email addresses to send announcements to.
11624
11625 * configure.ac (AC_INIT): Bump version to 1.875f.
11626
11627 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11628
11629 * NEWS: Version 1.875e.
11630 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11631
11632 * src/scan-skel.l: Include "complain.h", for "fatal".
11633
11634 * src/relation.h (relation_print, relation_digraph):
11635 Relation sizes are of type relation_node, not size_t (this is
11636 merely a doc fix, since the two types are equivalent).
11637 (relation_transpose): Relation sizes are of type relation_node,
11638 not int.
11639 * src/relation.c: Likewise.
11640 (top, infinity): Now of type relation_node, not int.
11641 (traverse, relation_transpose): Use relation_node, not int.
11642
11643 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11644 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11645 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11646
11647 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11648 specifying whether the test should be skipped. Use it tp
11649 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11650 fail on some hosts, and should be skipped.
11651
11652 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11653
11654 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11655 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11656 unless otherwise specified below.
11657
11658 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11659 to allocate kernel_base, kernel_items, kernel_size, since
11660 they needn't be initialized to 0.
11661 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11662 * src/closure.c (new_closure): Likewise, for itemset.
11663 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11664 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11665 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11666 (build_relations): Likewise for edge, states1, includes.
11667 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11668 * src/reader.c (packgram): Likewise, for ritem, rules.
11669 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11670 * src/relation.c (relation_digraph): Likewise for VERTICES.
11671 (relation_transpose): Likewise for new_R, end_R.
11672 * src/symtab.c (symbols_token_translations_init): Likewise for
11673 token_translations.
11674 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11675 (token_actions): Likewise for yydefact, actrow, conflrow,
11676 conflict_list.
11677 (save_column): Likewise for froms[symno], tos[symno].
11678 (goto_actions): Likewise for state_count.
11679 (pack_table): Likewise for base, pos, check.
11680 (tables_generate): Likewise for width.
11681
11682 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11683 for initial core. Just have a separate core, so we needn't worry
11684 about whether kernel_size and kernel_base are initialized.
11685
11686 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11687 kernel_size, kernel_items): Remove unnecessary initialization.
11688 * src/conflicts.c (conflicts): Likewise.
11689 * src/derives.c (derives): Likewise.
11690 * src/muscle_tablc (muscle_insert): Likewise.
11691 * src/relation.c (relation_digraph): Likewise.
11692 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11693 conflrow, conflict_table, conflict_list, table, check):
11694 Likewise.
11695
11696 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11697 This is because all callers pass unsigned int.
11698 * src/closure.h (new_closure): Likewise.
11699
11700 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11701 (build_relations): Initialize includes[i] in all cases.
11702 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11703 and rules[ruleno].precsym. Initialize members in order.
11704 * src/relation.c (relation_transpose): Always initialize new_R[i]
11705 and end_R[i].
11706 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11707
11708 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11709 conflict_list[0] was always 0, but now it isn't initialized.
11710
11711 * src/table.c (table_grow): When conflict_table grew, the grown
11712 area wasn't cleared. Fix this.
11713
11714 * lib/.cvsignore: Add strdup.c, strdup.h.
11715 * m4/.cvsignore: Add strdup.m4.
11716
11717 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11718
11719 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11720 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11721 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11722 ngotos + 1 without checking for overflow.
11723 (build_relations): Use END_NODE, not -1, to denote end of edges.
11724 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11725 build_relations): Use goto_number, not int, for goto numbers.
11726 * src/tables.c (save_column, default_goto): Likewise.
11727
11728 2004-11-23 Akim Demaille <akim@epita.fr>
11729
11730 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11731 of #defining from yystype.
11732 Don't typedef yystype, C++ does not need it.
11733 This lets it possible to forward declare it as union.
11734
11735 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11736
11737 * bootstrap (gnulib_modules): Add extensions.
11738 Problem reported by Jim Meyering.
11739
11740 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11741
11742 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11743 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11744 src/system.h, src/tables.c: XFREE -> free, to accommodate
11745 recent change to gnulib xalloc.h.
11746 Problem reported by Jim Meyering.
11747
11748 2004-11-17 Akim Demaille <akim@epita.fr>
11749
11750 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11751
11752 2004-11-17 Akim Demaille <akim@epita.fr>,
11753 Alexandre Duret-Lutz <adl@gnu.org>
11754
11755 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11756 changes.
11757 (YYCDEBUG): Adjust.
11758 Use it instead of cdebug_.
11759 (Parser::debug_stream, Parser::set_debug_stream): New.
11760 (Parser::symprint_): Define cdebug_ for temporary backward
11761 compatibility.
11762 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11763 debug_stream ().
11764
11765 2004-11-17 Akim Demaille <akim@epita.fr>
11766
11767 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11768 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11769 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11770 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11771
11772 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11773
11774 * data/glr.c (yyloc_default): Remove; not used.
11775 Problem reported by Frank Heckenbach.
11776
11777 2004-10-25 Akim Demaille <akim@epita.fr>
11778
11779 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11780 Introduce another definition to address simple location arrays.
11781 (yyGLRStack): New member: yyerror_range.
11782 (yyrecoverSyntaxError, yyparse): Update it.
11783 (yyrecoverSyntaxError): Use it when shifting the error token to
11784 have an accurate range, equivalent to the one computed by both
11785 yacc.c and lalr1.cc.
11786 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11787 that column numbers start at column 0, as per GNU Coding
11788 Standards, the others tests, and the doc.
11789 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11790 Adjust to the above change (first column is 0).
11791 And adjust the location of the "<error>", now covering the whole
11792 line.
11793
11794 2004-10-22 Akim Demaille <akim@epita.fr>
11795 and Paul Eggert <eggert@cs.ucla.edu>
11796
11797 Remove some arbitrary limits on goto numbers and relations.
11798 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11799 initial values, since they're never used.
11800 (set_goto_map): ngotos is now unsigned, so test for overflow
11801 by seeing whether it wraps around to zero.
11802 * src/lalr.h (goto_number): Now size_t, not short int.
11803 (GOTO_NUMBER_MAXIMUM): Remove.
11804 * src/relation.c (relation_print, traverse, relation_transpose):
11805 Check for END_NODE rather than looking at sign.
11806 * src/relation.h (END_NODE): New macro.
11807 (relation_node): Now size_t, not short int.
11808
11809 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11810
11811 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11812 keyword, not an identifier. Problem reported by Baron Schwartz in
11813 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11814
11815 2004-10-11 Akim Demaille <akim@epita.fr>
11816
11817 * src/symtab.c (symbol_check_alias_consistency): Also check
11818 type names, destructors, and printers.
11819 Reported by Alexandre Duret-Lutz.
11820 Recode the handling of associativity and precedence in terms
11821 of symbol_precedence_set.
11822 Accept no redeclaration at all, not even equal to the previous
11823 value.
11824 (redeclaration): New.
11825 Use it to factor redeclaration complaints.
11826 (symbol_make_alias): Don't set the type of the alias, let
11827 symbol_check_alias_consistency do it as for other features.
11828 * src/symtab.h (symbol): Add new member prec_location, and
11829 type_location.
11830 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11831 * tests/input.at (Incompatible Aliases): New.
11832
11833 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11834
11835 .cvsignore fixes to accommodate gnulib changes,
11836 and the practice of naming build directories "_build".
11837 * .cvsignore: Add "_*". Sort.
11838 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11839 * m4/.cvsignore: Add "*_gl.m4".
11840
11841 2004-10-06 Akim Demaille <akim@epita.fr>
11842
11843 * src/parse-gram.y (add_param): Fix the truncation of trailing
11844 spaces.
11845
11846 2004-10-05 Akim Demaille <akim@epita.fr>
11847
11848 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11849 whether the reducion was empty or not. This leaves room to
11850 improve the use of YYLLOC_DEFAULT in such a case.
11851 lalr1.cc is still experimental, so changing this is acceptable.
11852 And finally, there are probably not many users who changed the
11853 handling of locations in GLR, so changing is admissible too.
11854
11855 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11856 empty reduction, set @$ to an empty location ending the previously
11857 stacked symbol.
11858 Adjust uses to make sure the code is triggered on empty
11859 reductions.
11860 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11861 expected output: empty reductions have empty locations.
11862
11863 2004-09-29 Akim Demaille <akim@epita.fr>
11864
11865 * data/lalr1.cc: Move towards a more standard C++ coding style
11866 for templates: Class < T > -> Class<T>.
11867
11868 2004-09-29 Akim Demaille <akim@epita.fr>
11869
11870 * data/lalr1.cc: Reinstall the former ctor, for sake of
11871 compatibility, but warn it will be removed.
11872 Move towards a more standard C++ coding style (i.e., type *var ->
11873 type* var).
11874
11875 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11876
11877 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11878 since it's less likely to work if NULs are involved in the future.
11879
11880 2004-09-27 Akim Demaille <akim@epita.fr>
11881
11882 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11883
11884 2004-09-27 Akim Demaille <akim@epita.fr>
11885
11886 * data/lalr1.cc (b4_parse_param_decl_1): New.
11887 (b4_parse_param_decl): Use it to have different names between attribute
11888 and argument names.
11889 (b4_cc_constructor_call): Likewise.
11890
11891 2004-09-24 Akim Demaille <akim@epita.fr>
11892
11893 * src/parse-gram.y (add_param): Strip the leading and trailing
11894 blanks from a formal argument declaration.
11895 (YY_LOCATION_PRINT): New.
11896
11897 2004-09-24 Akim Demaille <akim@epita.fr>
11898
11899 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11900 after the location.
11901
11902 2004-09-24 Akim Demaille <akim@epita.fr>
11903
11904 * doc/bison.texinfo (Table of Symbols): Sort.
11905
11906 2004-09-21 Akim Demaille <akim@epita.fr>
11907
11908 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11909 the useless parentheses.
11910 Suggested by Paul Eggert.
11911
11912 2004-09-20 Akim Demaille <akim@epita.fr>
11913
11914 Let the initial-action act on the look-ahead, and use it for the
11915 "initial push" (corresponding to an hypothetical beginning-of-file).
11916 And let lalr1.cc honor %initial-action.
11917
11918 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11919 example.
11920 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11921 (Parser::Parser): Remove the ctor that used to initialize it.
11922 (Parser::parse): Like in the other skeletons, issue the "starting
11923 parse" message before any action.
11924 Honor %initial-action.
11925 Initialize the stacks with the lookahead.
11926 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11927 look-ahead.
11928 Push them in the stacks.
11929 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11930
11931 2004-09-20 Akim Demaille <akim@epita.fr>
11932
11933 * doc/bison.texinfo (Initial Action Decl): New.
11934
11935 2004-09-20 Akim Demaille <akim@epita.fr>
11936
11937 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11938 clearer criterion to define it.
11939 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11940 When reducing on an empty RHS, use the latest stacked location as
11941 location.
11942 yylloc is not always available.
11943 * data/glr.c: Likewise.
11944 Also, honor initial-actions.
11945
11946 2004-09-20 Akim Demaille <akim@epita.fr>
11947
11948 * data/yacc.c (YY_LOCATION_PRINT): New.
11949 Define when we know YYLTYPE's structure, i.e., when the default
11950 YYLLOC_DEFAULT is used.
11951 * data/c.m4 (b4_yysymprint_generate): Use it.
11952 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11953 value of the result.
11954 (error_start_): Replace with...
11955 (error_range_): this location array.
11956 This allows to replace code relying on the implementation of
11957 locations by portable code.
11958 * data/yacc.c (yylerrsp): Replace with...
11959 (yyerror_range): this.
11960 Every time a token is popped, update yyerror_range[0], to have an
11961 accurate location for the error token.
11962 * data/glr.c (YY_LOCATION_PRINT): New.
11963 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11964 deference a pointer.
11965 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11966 report the location in %printers.
11967
11968 * src/scan-skel.l: Instead of abort, report error messages to ease
11969 understanding skeleton scanning failures.
11970
11971 2004-09-16 Akim Demaille <akim@epita.fr>
11972
11973 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11974 (iterator, const_iterator): these, to be more in the C++ spirit.
11975 Also, return reverse iterators so that when displaying the stack
11976 we display its bottom first.
11977 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11978 from yacc.c.
11979 We should probably use vector here though.
11980
11981 2004-09-16 Akim Demaille <akim@epita.fr>
11982
11983 Have more complete shift traces.
11984
11985 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11986 to report Shifts instead of ad hoc YYDPRINTF invocations,
11987 including for the error token.
11988 * data/lalr1.cc (symprint_): Output the location.
11989 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11990 output the location within the %printer.
11991 Activate GLR tests, at least to make sure they compile properly.
11992 They still don't pass though.
11993 * tests/calc.at: Adjust expect verbose output, since now "Entering
11994 state..." is on a different line than the "Shifting" message.
11995
11996 2004-09-08 Akim Demaille <akim@epita.fr>
11997
11998 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11999 Bison directive from the Bison file to the invocation of this
12000 macro, so that these directives are passed to
12001 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12002 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12003 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12004 the extra Bison directives instead of the whole series.
12005 Change the grammar so that there are recoverable errors, and
12006 unrecoverable errors. Now we can have the parser give up before
12007 consuming the whole input. As a result we now can observe that
12008 the lookahead is freed when needed.
12009 Change the parser source to parse argv[1] instead of a hard coded
12010 string.
12011 Simplify yylex, and give a value and location to EOF.
12012 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12013 passed directives already coded in the file.
12014 Add some tests to check the location of "error".
12015 For some tests, the C++ parser is correct, and not yacc.c.
12016 For other tests, they provide different, but unsatisfying, values,
12017 so keep the C++ value so that at least one parser is "correct"
12018 according to the test suite.
12019 (Actions after errors): Remove, this is subsumed by the
12020 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12021
12022 2004-09-06 Akim Demaille <akim@epita.fr>
12023
12024 * data/lalr1.cc: Adjust the indentation of the labels.
12025 (Parser::pop): New.
12026 Use it.
12027
12028 2004-09-06 Akim Demaille <akim@epita.fr>
12029
12030 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12031 argument, an informative message.
12032 Call YY_SYMBOL_PRINT.
12033 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12034 * data/lalr1.cc (destruct_): Likewise.
12035 In addition, no longer depend on b4_yysymprint_generate and
12036 b4_yydestruct_generate to generate these functions, do it "by
12037 hand".
12038
12039 2004-09-03 Akim Demaille <akim@epita.fr>
12040
12041 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12042 invoked, yydestruct the lookahead.
12043 * tests/calc.at (Calculator $1): Update the expected lengths of
12044 traces: there is an added line for the discarded lookahead.
12045 * doc/bison.texinfo (Destructor Decl): Some rewording.
12046 Define "discarded" symbols.
12047
12048 2004-09-02 Akim Demaille <akim@epita.fr>
12049
12050 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12051
12052 2004-09-02 Akim Demaille <akim@epita.fr>
12053
12054 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12055 (YYDSYMPRINTF): Rename as...
12056 (YY_SYMBOL_PRINT): this.
12057 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12058 two.
12059 Use it instead of direct symprint_ calls.
12060 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12061 one.
12062
12063 2004-09-02 Akim Demaille <akim@epita.fr>
12064
12065 * data/lalr1.cc (b4_yysymprint_generate): New.
12066 (symprint_): New member function, defined when YYDEBUG.
12067 Use it consistently instead of token/nterm debugging output by
12068 hand.
12069 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12070 %printer calls to use cdebug_ when using lalr1.cc.
12071
12072 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12073
12074 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12075 with #ifdef YYDEBUG.
12076
12077 2004-08-26 Akim Demaille <akim@epita.fr>
12078
12079 * doc/bison.texinfo (Implementing Loops): Rename as...
12080 (Implementing Gotos/Loops): this.
12081
12082 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12083
12084 Adjust to latest gnulib.
12085 * bootstrap (gnulib_modules): Add xalloc-die.
12086 Set LC_ALL=C so that file names sort consistently.
12087 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12088 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12089 uintmax_t.m4, ulonglong.m4.
12090 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12091 po.m4 since we are now using _gl.m4 instead.
12092
12093 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12094
12095 * src/scan-action.l: Remove. Scanning of semantic actions is
12096 handled in scan-gram.l.
12097
12098 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12099
12100 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12101
12102 * src/location.h (struct): The file member is a uniqstr.
12103 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12104
12105 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12106
12107 Fix bug with non-%union parsers that have printers or destructors,
12108 which led to a Bison core dump. Reported by Peter Fales in
12109 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12110
12111 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12112 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12113 not to our own type.
12114 * src/output.c (symbol_destructors_output, symbol_printers_output):
12115 Don't assume %union.
12116 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12117 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12118 UNION-FLAG. All callers changed.
12119 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12120 Use type char, not unsigned int, when declaring an array of char;
12121 this lets us remove a cast.
12122 (Printers and Destructors): Add non-%union test cases.
12123
12124 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12125
12126 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12127 GLR writeups. E.g., avoid frenchspacing and the future tense,
12128 change "lookahead" to "look-ahead", and change "wrt" to "with
12129 respect to".
12130
12131 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12132
12133 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12134 New sections, split off from the GLR Parsers section. Put the new
12135 Simple GLR Parser near the start of the GLR section, for clarity.
12136 Rewrite connective text.
12137
12138 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12139
12140 * doc/bison.texinfo (Simple GLR Parsers): New section.
12141
12142 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12143
12144 * NEWS, TODO, doc/bison.texinfo:
12145 Use "look-ahead" instead of "lookahead", to be consistent.
12146 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12147 while we're fixing "look-ahead".
12148 * src/conflicts.c (shift_set): Renamed from shiftset.
12149 (look_ahead_set): Renamed from lookaheadset.
12150 * src/print.c: Likewise.
12151 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12152 name for "lookahead".
12153 (report_types, usage): Likewise.
12154 * src/getargs.h (report_look_ahead_tokens): Renamed from
12155 report_lookaheads.
12156 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12157 compute_lookaheads.
12158 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12159 (look_ahead_tokens_print): Renamed from lookaheads_print.
12160 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12161 state_rule_lookaheads_print.
12162 * src/state.h: Likewise.
12163 (reductions.look_ahead_tokens): Renamed from lookaheads.
12164 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12165 AT_DATA_LOOKAHEADS_GRAMMAR.
12166
12167 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12168
12169 * README: Update location of patched M4 distribution.
12170
12171 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12172
12173 Don't assume the C++ compiler takes the same arguments as the C compiler
12174 (trivial change).
12175 * configure.ac (O0CXXFLAGS): New var.
12176 * tests/atlocal.in (CXXFLAGS): Use it.
12177
12178 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12179
12180 Fix some "make check" problems with C++ reported by
12181 Albert Chin-A-Young for Tru64 C++ in this thread:
12182 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12183
12184 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12185 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12186 Output to a .cc file for C++, not to a .c file.
12187 * tests/calc.at (AT_CHECK_CALC): Likewise.
12188 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12189 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12190
12191 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12192
12193 * tests/calc.at, tests/actions.at: Workaround for SGI
12194 C++ compiler. (trivial change)
12195
12196 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12197
12198 Spent a few hours checking out which prerequisite versions the
12199 current sources actually require. I went all the way back to
12200 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12201 a seemingly endless set of combinations of versions more recent
12202 than that. The bottom line is that the current sources require
12203 fairly recent versions of the build tools, and it'll be some work
12204 to change this.
12205 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12206 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12207 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12208 Add comments explaining why those particular versions are
12209 currently needed.
12210
12211 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12212 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12213 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12214
12215 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12216 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12217
12218 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12219
12220 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12221 0.11.5. Suggested by Bruno Haible.
12222 * bootstrap: Remove gettext version checking.
12223
12224 * doc/bison.texinfo (Decl Summary): Also mention that %union
12225 can depend on prerequisite types. Problem reported by Tim
12226 Van Holder.
12227
12228 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12229
12230 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12231 * README-alpha: Don't tell people not to package this.
12232
12233 * bootstrap: Don't assume $(...) works; use `...` instead.
12234 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12235 gettext better.
12236
12237 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12238 put into the -d output file, and mention what to do if YYSTYPE is
12239 defined as a macro.
12240
12241 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12242
12243 Undo change made earlier today: it caused autopoint to not bring
12244 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12245 autopoint's.
12246
12247 * bootstrap: Check that gettext version matches what's in
12248 configure.ac. Warn users to ignore robots.txt ERROR 404.
12249 * bootstrap: Undo today's earlier change (logged below).
12250 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12251
12252 The gettext version checking is causing more trouble than it's
12253 curing; remove it. Problem reported by Paul Hilfinger.
12254
12255 * bootstrap: Issue a warning that one can expect a message
12256 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12257 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12258
12259 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12260
12261 Ensure that the C++ compiler used for testing actually works on a
12262 simple test program; if not, skip the C++-related tests. Problem
12263 reported by Vin Shelton in:
12264 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12265
12266 * m4/cxx.m4: New file.
12267 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12268 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12269 * tests/local.at (AT_COMPILE_CXX): Use it.
12270
12271 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12272
12273 * data/glr.c (yylloc): Output this macro even if locations are not
12274 being generated, as the GLR parser needs it even in that case.
12275 Problem reported by Troy A. Johnson
12276 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12277
12278 * configure.ac (AC_INIT): Update to 1.875e.
12279
12280 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12281
12282 * NEWS: Version 1.875d.
12283 * configure.ac (AC_INIT): Likewise.
12284 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12285
12286 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12287 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12288 lalr1.cc runs afoul of the first, and the last two are no longer
12289 supported by GCC 3.4.0.
12290 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12291 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12292
12293 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12294
12295 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12296 unsigned int, for compatibility with latest gnulib hash module.
12297 * src/state.c (state_hash, state_hasher): Likewise.
12298 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12299 * src/uniqstr.c (hash_uniqstr): Likewise.
12300
12301 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12302
12303 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12304
12305 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12306 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12307 character and string literals.
12308 (unexpected_end): New function.
12309 (unexpected_eof): Use it.
12310 (unexpected_newline): New function.
12311 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12312 actions.
12313
12314 * NEWS: Document %expect-rr.
12315
12316 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12317 Fix typo by replacing $1 with $option.
12318 Remove more 'intl'-related files.
12319 Don't DEFUN AM_INTL_SUBDIR twice.
12320
12321 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12322 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12323 strtoul.c.
12324 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12325 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12326 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12327 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12328 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12329 * src/.cvsignore: Add *.output.
12330
12331 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12332 gets copied to the output file.
12333
12334 2004-04-28 Paul Eggert <eggert@twinsun.com>
12335
12336 Get files from the gnulib and po repositories, instead of relying
12337 on them being in our CVS. Upgrade to latest versions of gnulib
12338 and Automake.
12339
12340 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12341 * bootstrap: Bootstrap from gnulib and po repositories.
12342 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12343 * README-cvs: Document these changes. Remove version numbers from
12344 mentions of build tools, since they change so often. Mention Flex.
12345
12346 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12347 (gl_USE_SYSTEM_EXTENSIONS): Add.
12348 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12349 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12350 does this for us.
12351 (AC_ISC_POSIX): Remove; we no longer support this
12352 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12353 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12354 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12355 Do not check for C89 headers, except for locale.h which is used
12356 by the Yacc library and must port to K&R hosts.
12357 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12358 Do not check for C89 functions, except for setlocale which is
12359 used by the Yacc library.
12360 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12361 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12362 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12363 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12364 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12365 AM_GNU_GETTEXT): Remove; now done by:
12366 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12367 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12368 for us.
12369
12370 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12371 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12372 Define to empty, as gnulib.mk will do the rest for us.
12373 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12374 for us.
12375 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12376 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12377
12378 * src/files.c: Include gnulib's xstrndup.h.
12379
12380 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12381 (REALLOC): Use xnrealloc, for likewise.
12382 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12383 (strnlen, memrchr): Remove decls; functions no longer used.
12384 Include <stpcpy.h>.
12385
12386 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12387 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12388 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12389 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12390 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12391 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12392 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12393 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12394 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12395 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12396 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12397 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12398 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12399 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12400 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12401 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12402 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12403 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12404 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12405 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12406 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12407 Remove, as these files are now generated automatically
12408 by bootstrap or automake.
12409
12410 * po/ChangeLog: Remove: all but one entry was a duplicate
12411 of this file, and I moved that 2000-11-02 entry here.
12412
12413 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12414 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12415 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12416 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12417 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12418 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12419 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12420 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12421 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12422 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12423 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12424 xstrndup.h.
12425 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12426 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12427 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12428 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12429 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12430 * src/.cvsignore: Remove *_.c.
12431
12432
12433 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12434 support it. (The latest stable gzip doesn't.)
12435
12436 2004-04-27 Paul Eggert <eggert@twinsun.com>
12437
12438 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12439 case, as stos_ is now used by destructors due to the 2004-02-09
12440 change.
12441
12442 Remove more K&R C support.
12443 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12444 * lib/subpipe.c (errno): Remove decl.
12445 Include <stdlib.h> unconditionally.
12446 (EXIT_FAILURE): Remove macro.
12447 * src/complain.c (vfprintf, strerror): Remove.
12448 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12449 unconditionally.
12450 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12451 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12452 (strchr, strspn, memchr): Remove decls.
12453 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12454 unconditionally. Do not declare perror.
12455 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12456 unconditionally.
12457
12458 * src/complain.c (_): Remove useless defn, as system.h defines this.
12459
12460 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12461 with latest obstack.h.
12462 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12463 to procedure types, as obstack.h now does that for us.
12464 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12465
12466 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12467 so that this include file can stand alone.
12468 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12469 does this now. Include subpipe.h first after config.h, to
12470 test whether it can stand alone.
12471
12472 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12473 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12474 unused declaration.
12475
12476 * tests/synclines.at (%union synch line): Put a dummy member in
12477 the union, because empty unions aren't allowed in C. Caught
12478 by GCC 3.4.0.
12479
12480 2004-04-13 Jim Meyering <jim@meyering.net>
12481
12482 * src/conflicts.c (conflicts_print): Correct format string typo:
12483 use `%%' to produce literal `%'. (trivial change)
12484
12485 2004-03-30 Paul Eggert <eggert@twinsun.com>
12486
12487 * src/getargs.c (version): Update copyright year to 2004.
12488
12489 * data/c.m4 (b4_int_type): Use 'short int' rather than
12490 'short', and similarly for 'long', 'unsigned', etc.
12491 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12492 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12493 yy_yypstack, yydumpstack): Likewise.
12494 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12495 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12496 Likewise.
12497 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12498 yy_stack_print, yyparse): Likewise.
12499 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12500 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12501 * lib/bitset.c (bitset_print): Likewise.
12502 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12503 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12504 * lib/bitsetv.c (bitsetv_dump): Likewise.
12505 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12506 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12507 Likewise.
12508 * src/LR0.c (allocate_itemsets): Likewise.
12509 * src/gram.h (rule_number, rule): Likewise.
12510 * src/lalr.h (goto_number): Likewise.
12511 * src/nullable.c (nullable_compute): Likewise.
12512 * src/output.c (prepare_rules): Likewise.
12513 * src/relation.c (relation_print, relation_digraph): Likewise.
12514 * src/relation.h (relation_node): Likewise.
12515 * src/state.h (state_number, transitions, errs, reductions,
12516 struct state): Likewise.
12517 * src/symtab.h (symbol_number, struct symbol): Likewise.
12518 * src/tables.c (vector_number, tally, action_number,
12519 default_goto, goto_actions): Likewise.
12520 * tests/existing.at (GNU Cim Grammar): Likewise.
12521 * tests/regression.at (Web2c Actions): Likewise.
12522
12523 * src/output.c (muscle_insert_short_int_table): Renamed from
12524 muscle_insert_short_table. All uses changed.
12525
12526 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12527
12528 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12529 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12530 Add %expect-rr rule.
12531
12532 * src/scan-gram.l: Recognize %expect-rr.
12533
12534 * src/conflicts.h (expected_sr_conflicts): Rename from
12535 expected_conflicts.
12536 (expected_rr_conflicts): Declare.
12537
12538 * src/conflicts.c (expected_sr_conflicts): Rename from
12539 expected_conflicts.
12540 (expected_rr_conflicts): Define.
12541 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12542 for GLR parsers.
12543 Use expected_sr_conflicts in place of expected_conflicts.
12544 Warn if expected_rr_conflicts used in non-GLR parser.
12545
12546 * doc/bison.texinfo: Add documentation for %expect-rr.
12547
12548 2004-03-08 Paul Eggert <eggert@gnu.org>
12549
12550 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12551 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12552
12553 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12554 in lalr1.cc.
12555 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12556 * src/scan-gram.l (scan_integer): New function.
12557 ({int}): Use it.
12558 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12559 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12560 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12561 Say "long int", not "long", for uniformity with GNU style.
12562
12563 2004-02-25 Paul Eggert <eggert@twinsun.com>
12564
12565 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12566 compilers. This fixes a problem with Intel's C++ compiler being
12567 chatty, reported by Guido Trentalancia in
12568 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12569
12570 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12571
12572 Support %destructor and merge error locations in lalr1.cc.
12573
12574 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12575 (Parser::stos_): Define unconditionally.
12576 (Parser::destruct_): New method. Generate its body with
12577 b4_yydestruct_generate.
12578 (Parser::error_start_): New attribute.
12579 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12580 token which are discarded.
12581 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12582 error_start_ when erroneous token are discarded.
12583 (Parser::parse) <yyerrlab1>: Compute the location of the error
12584 token so that it covers all the discarded tokens.
12585 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12586 it can be called with `%skeleton "lalr1.cc"', and do that.
12587
12588 2004-02-02 Paul Eggert <eggert@twinsun.com>
12589
12590 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12591 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12592 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12593 There's no need to mention top_builddir since Automake does that
12594 for us.
12595 (INCLUDES): Remove, as Automake says it's obsolescent.
12596 Contents migrated into AM_CPPFLAGS as described above.
12597 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12598
12599 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12600
12601 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12602 (yyreportSyntaxError): Handle case where lookahead token is
12603 YYEMPTY.
12604
12605 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12606
12607 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12608 resulting parsers are compilable with C++.
12609
12610 2003-12-23 Paul Eggert <eggert@twinsun.com>
12611
12612 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12613 * src/output.c (output_skeleton): Rename local var.
12614 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12615 Bison tokens, as this runs afoul of the 2003-10-07 change that
12616 disallowed NUL bytes in character constants or string literals.
12617
12618 * tests/local.at: Require Autoconf 2.59's Autotest.
12619 * tests/testsuite.at: Don't include local.at, since we now assume
12620 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12621 including it.
12622 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12623 multiple inclusion warnings.
12624
12625 2003-12-02 Akim Demaille <akim@epita.fr>
12626
12627 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12628 conditions.
12629 From Bruno Haible.
12630
12631 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12632
12633 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12634
12635 2003-10-07 Paul Eggert <eggert@twinsun.com>
12636
12637 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12638 if testsuite doesn't exist.
12639
12640 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12641 literals, unfortunately.
12642 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12643 Complain about NUL bytes in character constants or string literals.
12644
12645 2003-10-05 Paul Eggert <eggert@twinsun.com>
12646
12647 * NEWS: Don't document %no-default-prec, as it's still
12648 too experimental.
12649 * doc/bison.texinfo: Document %no-default-prec only if
12650 the defaultprec flag is set. Normally it's not.
12651
12652 2003-10-04 Paul Eggert <eggert@twinsun.com>
12653
12654 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12655 non-modifiable lvalue, instead of a modifiable one.
12656 * doc/bison.texinfo (Actions): Document that $$ can
12657 be assigned to. Do not claim that $$ and $N are
12658 array element references: user code should not rely on this.
12659
12660 2003-10-01 Paul Eggert <eggert@twinsun.com>
12661
12662 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12663 (grammar_declaration): Use it.
12664 * src/scan-gram.l: New token %no-default-prec.
12665 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12666 * NEWS, doc/bison.texinfo: Document the above.
12667
12668 2003-10-01 Akim Demaille <akim@epita.fr>
12669
12670 VCG no longer supports long_straight_phase.
12671
12672 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12673 * src/print_graph.c (print_graph): Adjust.
12674
12675 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12676 and Paul Eggert <eggert@twinsun.com>
12677
12678 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12679 Table of Symbols): Document %default-prec.
12680 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12681 (grammar_declaration): Set default_prec on %default-prec.
12682 * src/scan-gram.l (%default-prec): New token.
12683 * src/reader.h (default_prec): New flag.
12684 * src/reader.c: Likewise.
12685 (packgram): Handle it.
12686 * tests/conflicts.at (%default-prec without %prec,
12687 %default-prec with %prec, %default-prec 1): New tests.
12688
12689 2003-09-30 Paul Eggert <eggert@twinsun.com>
12690
12691 * tests/testsuite.at: Include local.at, not input.at, fixing
12692 a typo in the 2003-08-25 patch.
12693
12694 2003-08-27 Akim Demaille <akim@epita.fr>
12695
12696 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12697 GCC warnings.
12698
12699 2003-08-26 Akim Demaille <akim@epita.fr>
12700
12701 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12702 "<\#" to avoid magic from Gnus when posting parts of this script.
12703
12704 2003-08-26 Akim Demaille <akim@epita.fr>
12705
12706 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12707 (Parser::parse): here.
12708 Adjust: nerrs and errstatus is now replaced by...
12709 (Parser::nerrs_, Parser::errstatus_): New.
12710
12711 2003-08-25 Akim Demaille <akim@epita.fr>
12712
12713 * config/announce-gen, Makefile.cfg: New.
12714 * Makefile.am: Adjust.
12715 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12716 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12717
12718 2003-08-25 Akim Demaille <akim@epita.fr>
12719
12720 When reducing initial empty rules, Bison parser read an initial
12721 location that is not defined. This results in garbage, and that
12722 affects Bison's own parser. Therefore we need (i) to extend Bison
12723 to support a means to initialize this location, and (ii) to use
12724 this CVS Bison to fix CVS Bison's parser.
12725
12726 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12727 with...
12728 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12729 * src/parse-gram.y: Adjust.
12730 (%initial-action): New.
12731 (%error-verbose): Since we require CVS Bison, there is no reason
12732 not to use it.
12733 * src/scan-gram.l: Adjust.
12734 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12735 * data/yacc.c (yyparse): Use b4_initial_action.
12736
12737 2003-08-25 Akim Demaille <akim@epita.fr>
12738
12739 * doc/bison.texinfo: Don't promote stdout for error messages.
12740
12741 2003-08-25 Akim Demaille <akim@epita.fr>
12742
12743 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12744 From Alexandre Duret-Lutz.
12745
12746 2003-08-25 Akim Demaille <akim@epita.fr>
12747
12748 Version 1.875c.
12749
12750 2003-08-25 Akim Demaille <akim@epita.fr>
12751
12752 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12753 Use them.
12754
12755 2003-08-25 Akim Demaille <akim@epita.fr>
12756
12757 * data/lalr1.cc (Parser::reduce_print_): New.
12758 Use it.
12759
12760 2003-08-25 Akim Demaille <akim@epita.fr>
12761
12762 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12763 error recovery loops. This patch is based on
12764 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12765 Also, augment the similarity between lalr1.cc and yacc.c.
12766 Note: the locations of error recovery rules are not correct yet.
12767
12768 * data/lalr1.cc: Comment changes to augment the similarity between
12769 lalr1.cc and yacc.c.
12770 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12771 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12772 yyerrlab), when hitting EOF, pop the whole stack here instead of
12773 merely falling thru the default error handling mechanism.
12774 (yyerrorlab): New label, with the old contents of YYERROR,
12775 plus the following change: pop the stack of rhs corresponding
12776 to the production that invoked YYERROR. That is how Yacc
12777 behaves (required by POSIX).
12778 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12779 fail.
12780
12781 2003-08-25 Akim Demaille <akim@epita.fr>
12782
12783 Tune local.at so that people can "autom4te -l autotest calc.at -o
12784 calc" for instance, to extract a sub test suite.
12785
12786 * tests/testsuite.at: Move the initialization, Autotest version
12787 requirement, and AT_TESTED invocation into...
12788 * tests/local.at: here.
12789 * tests/testsuite.at: Include it for compatibility with Autoconf
12790 2.57.
12791 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12792 be ignore.
12793
12794 2003-08-04 Paul Eggert <eggert@twinsun.com>
12795
12796 Rework code slightly to avoid gcc -Wtraditional warnings.
12797 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12798 The returned value is now stored in *YY0. All callers changed.
12799 * src/output.c (merge_output): Adjust to the above change.
12800
12801 2003-07-26 Paul Eggert <eggert@twinsun.com>
12802
12803 * data/glr.c (YYASSERT): New macro.
12804 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12805 yyresolveStates, yyprocessOneStack):
12806 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12807 Derived from a suggestion by Frank Heckenbach.
12808
12809 2003-07-25 Paul Eggert <eggert@twinsun.com>
12810
12811 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12812 for portability to K&R C (after ansi2knr, presumably). See
12813 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12814 by Frank Heckenbach, though I have omitted the structure-initialization
12815 part of his glr-knr.diff patch since I recall that the Portable
12816 C Compiler didn't require that change.
12817
12818 Let the user specify how to allocate and free memory.
12819 Derived from a suggestion by Frank Heckenbach in
12820 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12821 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12822 All uses of free, malloc, realloc changed to use these macros,
12823 and unnecessary casts removed.
12824 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12825
12826 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12827
12828 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12829 use s.empty() rather than s == "" to test for empty string; see
12830 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12831 (trivial change)
12832
12833 2003-06-25 Akim Demaille <akim@epita.fr>
12834
12835 * config/depcomp, config/install-sh: Update from masters.
12836
12837 2003-06-20 Paul Eggert <eggert@twinsun.com>
12838
12839 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12840 and return properly parenthesized result.
12841 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12842 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12843 Remove unnecessary parentheses from uses.
12844 * doc/bison.texinfo (Location Default Action): Describe the
12845 conventions for parentheses.
12846
12847 2003-06-19 Paul Eggert <eggert@twinsun.com>
12848
12849 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12850 yyreportTree): Do not assume that size_t is the same width as int,
12851 when printing sizes. Print sizes using an unsigned format.
12852 Problem reported by Frank Heckenbach in
12853 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12854
12855 Port to Forte Developer 7 C compiler.
12856 * data/glr.c (struct YYLTYPE): If locations are not being used,
12857 declare a single dummy member, as empty structs do not conform
12858 to the C standard.
12859 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12860 the Forte Developer 7 C compiler complains that end-of-loop
12861 code is not reached.
12862
12863 2003-06-17 Paul Eggert <eggert@twinsun.com>
12864
12865 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12866 avoid warnings from picky compilers about redefinition of PARAMS.
12867
12868 2003-06-17 Paul Eggert <eggert@twinsun.com>
12869
12870 Version 1.875b.
12871
12872 * NEWS: Document 1.875b.
12873
12874 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12875 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12876 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12877 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12878 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12879 per recent gettext manual's suggestion.
12880 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12881 Use prototypes, not old-style definitions.
12882 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12883 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12884 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12885 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12886 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12887 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12888 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12889 vbitset_or_and_cmp, vbitset_copy): Likewise.
12890
12891 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12892 Do not include <stdlib.h>.
12893 (PARAMS): Define unconditionally for C89.
12894 (ATTRIBUTE_NORETURN): Remove.
12895 (ATTRIBUTE_UNUSED): Define unconditionally.
12896
12897 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12898 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12899 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12900 * lib/vbitset.c, lib/vbitset.h: New files.
12901 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12902 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12903 from libbitset.
12904
12905 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12906 `How Can I Reset @code{yyparse}', since texinfo does not allow
12907 arbitrary @ in node names.
12908
12909 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12910 shouldn't be needed according to the gettext 0.12.1 documentation
12911 but which seem to be needed anyway: codeset.m4 glibc21.m4
12912 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12913 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12914 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12915
12916 * lib/.cvsignore: Add stdbool.h.
12917 * m4/.cvsignore: Add nls.m4, po.m4.
12918
12919 Upgrade to CVS gnulib.
12920 * stdbool_.h: File renamed from stdbool.h.in.
12921 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12922 AC_HEADER_STDBOOL.
12923 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12924 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12925 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12926 (MOSTLYCLEANFILES): New var.
12927 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12928 (stdbool.h): New rule.
12929 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12930 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12931 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12932 m4/quote.m4: Upgrade to today's gnulib.
12933
12934 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12935 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12936 the tests right now.
12937 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12938 yyerror are declared before use; C99 requires this.
12939
12940 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12941
12942 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12943 first.
12944 (yyrecoverSyntaxError): Correct the logic for setting and testing
12945 yyerrState.
12946 Correct comment on handling EOF.
12947 Allow states with only a default reduction, rather than failing
12948 (I can't quite reconstruct why these were not allowed before).
12949
12950 Fixes to avoid problem that $-N rules in GLR parsers can cause
12951 buffer overruns, corrupting state.
12952
12953 * src/output.c (prepare_rules): Output max_left_semantic_context
12954 definition.
12955 * src/reader.h (max_left_semantic_context): New variable declaration.
12956 * src/scan-gram.l (max_left_semantic_context): Define.
12957 (handle_action_dollar): Update max_left_semantic_context.
12958 * data/glr.c (YYMAXLEFT): New definition.
12959 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12960 (yyresolveAction): Ditto.
12961
12962 Fixes to problems with location handling in GLR parsers reported by
12963 Frank Heckenbach (2003/06/05).
12964
12965 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12966 (YYRHSLOC): Add parentheses, and define only if locations used.
12967 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12968 locations not used.
12969 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12970 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12971
12972 * tests/cxx-type.at: Exercise location information; update tests
12973 to differentiate output with and without locations.
12974 Remove forward declarations of yylex and yyerror---caused errors
12975 because default YYLTYPE not yet defined.
12976 Change semantic actions to compute strings, rather than printing
12977 them directly (to test proper passing of semantics values). Change
12978 output to prefix notation and update test data and expected results.
12979 (yylex): Track locations.
12980 (stmtMerge): Return value rather than printing, and include arguments
12981 in value.
12982
12983 2003-06-03 Paul Eggert <eggert@twinsun.com>
12984
12985 Avoid warnings generated by GCC 2.95.4 when Bison is
12986 configured with --enable-gcc-warnings.
12987 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12988 yy::]b4_parser_class_name[::translate_,
12989 yy::Stack::operator[] (unsigned),
12990 yy::Stack::operator[] (unsigned) const,
12991 yy::Slice::operator[] (unsigned),
12992 yy::Slice::operator[] (unsigned) const):
12993 Rename local vars to avoid warnings.
12994 * tests/glr-regression.at (Improper handling of embedded actions
12995 and $-N in GLR parsers): Remove unused local variable from yylex.
12996 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12997 (void) as arg when not pure, since we now assume C89 when building
12998 Bison. Pacify GCC by using parameter.
12999
13000 2003-06-02 Paul Eggert <eggert@twinsun.com>
13001
13002 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13003 yy::Location::lines, yy::Location::columns): Rename arguments
13004 to avoid shadowing; this removes a warning generated by GCC 3.3.
13005
13006 2003-06-01 Paul Eggert <eggert@twinsun.com>
13007
13008 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13009 to g++, as GCC 3.3 complains if you do it.
13010 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13011 everything that WARNING_CFLAGS has, except omit warnings
13012 not suitable for C++.
13013 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13014 * tests/atlocal.in (CXXFLAGS): New var.
13015 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13016
13017 Fix a GLR parser bug I reported in February; see
13018 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
13019 The problem was that GLR parsers did not conform to the C standard,
13020 because actions like { $1 = $2 + $3; } expanded to expressions
13021 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13022 to a local variable. The C standard says that expressions
13023 like (var = f ()) + (var = f ()) have undefined behavior.
13024 Another problem was that GCC sometimes issues warnings that
13025 yyfill and its parameters are unused.
13026
13027 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13028 as possibly unused.
13029 (yyfill): New function.
13030 (YYFILL): Use it.
13031 (yyuserAction): Change type of yynormal to bool, so that it matches
13032 the new yyfill signature. Mark it as possibly unused.
13033
13034
13035 Follow up on a bug I reported in February, where a Bison-generated
13036 parser can loop. Provide a test case and a fix for yacc.c. I
13037 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13038 The original bug report is in:
13039 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13040
13041 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13042 macro's size was becoming unwieldy.
13043 (yyerrlab): Do not discard an empty lookahead symbol, as this
13044 might destroy garbage.
13045 (yyerrorlab): New label, with the old contents of YYERROR,
13046 plus the following change: pop the stack of rhs corresponding
13047 to the production that invoked YYERROR. That is how Yacc
13048 behaves, and POSIX requires this behavior.
13049 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13050 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13051 Define 'alarm' to do nothing if unistd.h is not available.
13052 Add a new rule "exp: '-' error;" to test the above change to
13053 data/yacc.c. Use 'alarm' to abort any test taking longer than
13054 10 seconds, as it's probably looping.
13055 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13056 Also, the new yacc.c generates two fewer diagnostics for an
13057 existing test.
13058
13059 2003-05-24 Paul Eggert <eggert@twinsun.com>
13060
13061 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13062 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13063 This fixes a problem reported by John Bowman when the Compaq/HP
13064 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13065 -ansi -Wall -gall).
13066 * data/yacc.c (union yyalloc): Likewise.
13067 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13068
13069 Switch from 'int' to 'bool' where that makes sense.
13070
13071 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13072 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13073 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13074 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13075 Return or accept bool, not int. All callers changed.
13076 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13077 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13078 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13079 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13080 bitset_or_and_cmp_): Likewise.
13081 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13082 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13083 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13084 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13085 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13086 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13087 bitset_stats_or_and_cmp): Likewise.
13088 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13089 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13090 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13091 ebitset_xor_cmp): Likewise.
13092 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13093 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13094 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13095 lbitset_xor_cmp): Likewise.
13096 * lib/bbitset.h: Include <stdbool.h>.
13097 (struct bitset_vtable): The following members now return bool, not
13098 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13099 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13100 or_and_cmp).
13101 * src/conflicts.c (count_rr_conflicts): Likewise.
13102 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13103 All uses changed.
13104 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13105 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13106 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13107 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13108 graph_flag): Likewise.
13109 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13110 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13111 graph_flag): Likewise.
13112 * src/output.c (error_verbose): Likewise.
13113 * src/output.h (error_verbose): Likewise.
13114 * src/reader.c (start_flag, typed): Likewise.
13115 * src/reader.h (typed): Likewise.
13116 * src/getargs.c (LOCATIONS_OPTION): New constant.
13117 (long_options, getargs): Use it.
13118 * src/lalr.c (build_relations): Use bool, not int.
13119 * src/nullable.c (nullable_compute): Likewise.
13120 * src/print.c (print_reductions): Likewise.
13121 * src/tables.c (action_row, pack_vector): Likewise.
13122 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13123 * src/output.c (prepare): Use it.
13124 * src/output.c (token_definitions_output,
13125 symbol_destructors_output, symbol_destructors_output): Use string,
13126 not boolean integer, to keep track of whether to output separator.
13127 * src/print_graph.c (print_core): Likewise.
13128 * src/state.c (state_rule_lookaheads_print): Likewise.
13129
13130 * config/install-sh: Sync from automake 1.7.5.
13131
13132 2003-05-14 Paul Eggert <eggert@twinsun.com>
13133
13134 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13135 semicolon after a grammar declaration, in the interest of possible
13136 future changes to the Bison input language.
13137 Do not allow a stray semicolon at the start of the grammar.
13138 (rhses.1): Allow one or more semicolons after any rule, including
13139 just before "|" as required by POSIX.
13140 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13141 grammar.
13142
13143 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13144
13145 %parse-param support for lalr1.cc.
13146
13147 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13148 b4_cc_constructor_calls, b4_cc_constructor_call,
13149 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13150 definitions.
13151 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13152 parse-param arguments.
13153 (yy::b4_parser_class_name): Declare instance variables to
13154 hold parse-param arguments.
13155 * tests/calc.at: s/value/semantic_value/ because value clashes
13156 with a member of yy::b4_parser_class_name. Adjust C++ code
13157 to handle %parse-param. Enable %parse-param test in C++.
13158
13159 2003-05-12 Paul Eggert <eggert@twinsun.com>
13160
13161 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13162 English a bit. Fix fclose typo. Change "const char" to "char
13163 const", and use ANSI C rather than K&R for "main". Suggest
13164 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13165 and suggest yy_switch_to_buffer.
13166
13167 2003-05-05 Paul Eggert <eggert@twinsun.com>
13168
13169 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13170 C89. This avoids a diagnostic on compilers that define __STDC__
13171 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13172 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13173
13174 2003-05-03 Paul Eggert <eggert@twinsun.com>
13175
13176 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13177 Do not overrun array bounds.
13178 This should fix a bug reported today by Olatunji Oluwabukunmi in
13179 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13180
13181 2003-04-29 Akim Demaille <akim@epita.fr>
13182
13183 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13184 * src/getargs.c, src/getargs.h: here, as bool, not int.
13185 (nondeterministic_parser): New.
13186 * src/parse-gram.y, src/scan-gram.l: Support
13187 %nondeterministic-parser.
13188 * src/output.c (prepare): Use nondeterministic_parser instead
13189 of glr_parser where appropriate.
13190 * src/tables.c (conflict_row, action_row, save_row)
13191 (token_actions, token_actions, pack_vector): Ditto.
13192
13193 2003-04-29 Akim Demaille <akim@epita.fr>
13194
13195 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13196
13197 2003-04-29 Akim Demaille <akim@epita.fr>
13198
13199 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13200 with %pure-parser and %locations to exercise the patch from Yakov
13201 Markovitch below.
13202
13203 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13204
13205 * data/yacc.c: (b4_lex_param): Corrected for the case where
13206 %lex-param is provided and %pure-parser isn't.
13207
13208 2003-04-27 Paul Eggert <eggert@twinsun.com>
13209
13210 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13211 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13212 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13213 if it is not defined.
13214 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13215
13216 2003-04-26 Paul Eggert <eggert@twinsun.com>
13217
13218 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13219 Declare to be of type suitable for the ninf value itself, not of
13220 type suitable for the corresponding table, since the latter might
13221 be unsigned but the ninf value might be negative. This fixes a
13222 bug reported by Alexandre Duret-Lutz in
13223 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13224
13225 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13226 invokes it. We shouldn't invoke it twice because it will attempt
13227 to put error.o in the archive twice. This fixes a glitch reported
13228 by Martin Mokrejs in
13229 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13230
13231 2003-04-21 Paul Eggert <eggert@twinsun.com>
13232
13233 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13234 to gnulib.
13235
13236 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13237
13238 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13239 Fix obvious typo that results in uncompilable GLR parsers
13240 when both %pure-parser and %locations are used. (trivial change)
13241
13242 2003-04-17 Paul Eggert <eggert@twinsun.com>
13243
13244 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13245 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13246 Do not insert the expected token via unput, as this runs afoul
13247 of a POSIX-compatibility bug in flex 2.5.31.
13248 All uses changed to BEGIN the parent state,
13249 since we no longer insert the expected token via unput.
13250 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13251 that is no longer emitted after the above change.
13252
13253 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13254 the first one. This change is from Paul Hilfinger, and it fixes
13255 regression reported by Werner Lemberg in
13256 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13257
13258 (resolve_sr_conflict): Don't invoke state_errs_set
13259 unless one or more tokens have been explicitly made errors.
13260 Otherwise, the above change causes Bison to abort.
13261
13262 * tests/existing.at (GNU pic Grammar): New test case, taken from
13263 Lemberg's email.
13264
13265 2003-03-31 Akim Demaille <akim@epita.fr>
13266
13267 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13268
13269 2003-03-31 Akim Demaille <akim@epita.fr>
13270
13271 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13272 output.
13273
13274 2003-03-31 Akim Demaille <akim@epita.fr>
13275
13276 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13277 From Paul Hilfinger.
13278
13279 2003-03-29 Akim Demaille <akim@epita.fr>
13280
13281 * m4/error.m4: Do not put under dynamic conditions some code which
13282 expansion is under static control.
13283
13284 2003-03-29 Akim Demaille <akim@epita.fr>
13285
13286 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13287
13288 2003-03-29 Akim Demaille <akim@epita.fr>
13289
13290 * doc/bison.texinfo (Strings are Destroyed): New.
13291
13292 2003-03-13 Paul Eggert <eggert@twinsun.com>
13293
13294 * .cvsignore: Add configure.lineno.
13295 * src/.cvsignore: Add yacc.
13296 * tests/.cvsignore: Add testsuite.log.
13297 * doc/fdl.texi: Sync with latest FSF version.
13298
13299 2003-03-12 Paul Eggert <eggert@twinsun.com>
13300
13301 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13302 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13303 cursor, instead of leaving it undefined. This fixes a bug
13304 reported by Tim Van Holder in
13305 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13306 * tests/input.at (Torturing the Scanner): Test the scanner on
13307 an empty input file, which was Tim Van Holder's test case.
13308
13309 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13310 <sys/resource.h> can be included, include sys/time.h and
13311 sys/times.h first, if available. This works around the SunOS
13312 4.1.4 porting bug reported by Bruce Becker in
13313 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13314
13315 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13316 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13317 AC_HEADER_SYS_WAIT.
13318
13319 Merge changes from gnulib. This was prompted because the CVS
13320 snapshot didn't build on Solaris 7 due to strnlen problems.
13321
13322 These changes need to be merged back into gnulib:
13323 * lib/hash.c: Include <stdbool.h> unconditionally.
13324 * m4/onceonly.m4 (m4_quote): New macro.
13325 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13326 Quote AC_FOREACH variable-expansions properly.
13327 The 2003-01-03 obstack.h change also needs merging.
13328 {end of changes requiring merging}
13329
13330 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13331 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13332 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13333 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13334 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13335 New files, imported from gnulib.
13336 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13337 above.
13338
13339 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13340 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13341 gnulib sources.
13342
13343 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13344 Add.
13345 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13346 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13347 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13348 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13349 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13350 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13351 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13352 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13353 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13354 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13355 (jm_PREREQ_ARGMATCH): Remove.
13356 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13357 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13358
13359 * src/system.h: Include <stdbool.h> unconditionally.
13360
13361 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13362 assuming at least C89 in the bitset code for some time now.
13363
13364 2003-03-03 Akim Demaille <akim@epita.fr>
13365
13366 * ro.po: New.
13367
13368 2003-03-02 Akim Demaille <akim@epita.fr>
13369
13370 * doc/bison.texinfo (Table of Symbols): Reactivate the
13371 documentation for %lex-param, and %parse-param.
13372
13373 2003-03-02 Akim Demaille <akim@epita.fr>
13374
13375 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13376 generate verbose error messages.
13377 Use the number of tokens as an upper bound in yytname, as it
13378 cannot be a non terminal.
13379
13380 2003-03-02 Akim Demaille <akim@epita.fr>
13381
13382 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13383 message.
13384
13385 2003-03-02 Akim Demaille <akim@epita.fr>
13386
13387 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13388 Use them to exercise yycheck overrun.
13389 Based on Andrew Suffield's grammar.
13390
13391 2003-03-02 Akim Demaille <akim@epita.fr>
13392
13393 Create tests/local.at for Bison generic testing macros.
13394
13395 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13396 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13397 This new file.
13398 * tests/calc.at (AT_CHECK_CALC): Adjust.
13399 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13400 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13401 * tests/local.at: here.
13402 (AT_COMPILE_CXX): Tags the tests using it as c++.
13403 Ignore the test if CXX is not functional.
13404
13405 2003-03-01 Paul Eggert <eggert@twinsun.com>
13406
13407 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13408 not loc->end, since loc->end might contain garbage and this leads
13409 to undefined behavior on some platforms.
13410 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13411 depend on *loc, so that the reader doesn't give the the false
13412 impression that *loc is initialized.
13413 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13414 does not survive the return.
13415
13416 2003-03-01 Akim Demaille <akim@epita.fr>
13417
13418 * src/scan-gram.l (code_start): Always initialize it when entering
13419 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13420 yylex invocation. An alternative would be making it static, but
13421 then it starts with the second %%'s beginning, instead of its end.
13422
13423 2003-02-28 Paul Eggert <eggert@twinsun.com>
13424
13425 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13426 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13427 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13428
13429 2003-02-26 Paul Eggert <eggert@twinsun.com>
13430
13431 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13432 Remove Sequent/Pyramid discussion (nobody uses them any more).
13433 Merge VMS and MS-DOS discussion; these ports may well be dead
13434 but let's keep mentioning them for now. Put <> around email
13435 addresses. Add copyright notice.
13436
13437 2003-02-24 Paul Eggert <eggert@twinsun.com>
13438
13439 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13440 to avoid collision with flex use of yylineno.
13441 Problem reported by Bruce Lilly in
13442 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13443 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13444 * data/yacc.c (yy_reduce_print): Likewise.
13445
13446 * config/depcomp: Sync with Automake 1.7.3.
13447
13448 2003-02-21 Akim Demaille <akim@epita.fr>
13449
13450 * data/lalr1.cc: Use temporary variables instead of casts to
13451 change integer types.
13452 Suggested by Paul Eggert.
13453
13454 2003-02-21 Akim Demaille <akim@epita.fr>
13455
13456 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13457 to avoid confusions with lalr1.cc's notion of Position.
13458 Suggested by Paul Eggert.
13459
13460 2003-02-20 Akim Demaille <akim@epita.fr>
13461
13462 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13463 before initial_columns.
13464 (location.hh): Use consistent variable names when defining the
13465 operator<<.
13466 Use "last" so that we subtract from Positions, not from unsigned.
13467
13468 2003-02-20 Akim Demaille <akim@epita.fr>
13469
13470 * data/lalr1.cc (position.hh): New subfile, including the extended
13471 and Doxygen'ed documentation of class Position.
13472 (location.hh): Use it.
13473 Document a` la Doxygen.
13474 With the help of Benoit Perrot.
13475
13476 2003-02-20 Akim Demaille <akim@epita.fr>
13477
13478 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13479 AT_YACC_IF.
13480 Redefine AT_YYERROR_SEES_LOC_IF using it.
13481 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13482 not defined.
13483 Don't use the location in yy::Parser::error_ and
13484 yy::Parser::print_ when not %locations.
13485 Activate more lalr1.cc tests.
13486
13487 2003-02-19 Akim Demaille <akim@epita.fr>
13488
13489 * data/lalr1.cc: When displaying a line number, be sure to make it
13490 an int.
13491
13492 2003-02-19 Akim Demaille <akim@epita.fr>
13493
13494 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13495 Remove, useless.
13496 (YYABORT, YYACCEPT, YYERROR): New.
13497 * tests/calc.at: Renable the lalr1.cc test.
13498
13499 2003-02-19 Akim Demaille <akim@epita.fr>
13500
13501 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13502 error recovery, mixing with/without pops and discarding of the
13503 lookahead.
13504 Exercise YYERROR.
13505 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13506
13507 2003-02-17 Paul Eggert <eggert@twinsun.com>
13508
13509 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13510 * tests/testsuite.at (AT_COMPILE): Use them.
13511 This fixes the testsuite problem reported by Robert Lentz in
13512 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13513
13514 2003-02-12 Paul Eggert <eggert@twinsun.com>
13515
13516 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13517 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13518 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13519 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13520 Check for malloc failure, for consistency with yacc.c.
13521 (yytname_size): Remove, for consistency with yacc.c.
13522
13523 The bug still remains in data/lalr1.cc, as I didn't have time
13524 to fix it there.
13525
13526 2003-02-06 Akim Demaille <akim@epita.fr>
13527
13528 * configure.ac (GXX): Rename as...
13529 (CXX): this, to keep the original Autoconf semantics.
13530 Require 2.57.
13531 * data/lalr1.cc: Fix b4_copyright invocations.
13532 If YYDEBUG is not defined, don't depend upon name_ being defined.
13533 (location.hh): Include string and iostream.
13534 (Position::filename): New member.
13535 (Position::Position ()): New.
13536 (operator<< (Position)): New.
13537 (operator- (Position, int)): New.
13538 (Location::first, Location::last): Rename as...
13539 (Location::begin, Location::end): these, to mock the conventional
13540 iterator names.
13541 (operator<< (Location)): New.
13542 * tests/atlocal.in (CXX): New.
13543 * tests/testsuite.at (AT_COMPILE_CXX): New.
13544 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13545 locations in a more synthetic way.
13546 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13547 lalr1.cc is used.
13548 Adjust the C locations to match those from Emacs: first column is
13549 column 0.
13550 Change all the expected results.
13551 Conform to the GCS: simplify the locations when applicable.
13552 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13553 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13554 these CPP macros with the m4 macros new defined by...
13555 (AT_CHECK_PUSHDEFS): this, i.e.:
13556 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13557 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13558 New macros.
13559 (AT_CHECK_POPDEFS): Undefine them.
13560 (AT_CHECK_CALC_LALR1_CC): New.
13561 Use it for the first lalr1.cc test.
13562
13563 2003-02-04 Akim Demaille <akim@epita.fr>
13564
13565 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13566 Location as is defined.
13567
13568 2003-02-04 Akim Demaille <akim@epita.fr>
13569
13570 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13571 name_ being defined.
13572
13573 2003-02-03 Paul Eggert <eggert@twinsun.com>
13574
13575 * src/gram.h (start_symbol): Remove unused decl.
13576
13577 Use more-consistent naming conventions for local vars.
13578
13579 * src/derives.c (derives_compute): Change type of local var from
13580 int to rule_number.
13581 * src/gram.c (grammar_rules_partial_print): Likewise.
13582 * src/print.c (print_core): Likewise.
13583 * src/reduce.c (reduce_grammar_tables): Likewise.
13584
13585 * src/gram.c (grammar_dump): Change name of item_number *
13586 local var from r to rp.
13587 * src/nullable.c (nullable_compute): Likewise.
13588
13589 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13590
13591 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13592 for symbol or symbol_number var.
13593 * src/reader.c (grammar_start_symbol_set): Likewise.
13594 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13595 Likewise.
13596 * src/state.c (transitions_to): Likewise.
13597 * src/state.h: Likewise.
13598 * src/tables.c (symbol_number_to_vector_number): Likewise.
13599
13600 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13601 char * var.
13602
13603 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13604 var.
13605
13606 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13607 var.
13608
13609 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13610 Use str, not s, for char * var. Use ch, not c, for character var.
13611 Use size for size var.
13612
13613 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13614 char * var.
13615 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13616 uniqstr var.
13617 * src/uniqstr.h: Likewise.
13618
13619 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13620 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13621 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13622 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13623 param to have same name as that of enum, so that we don't use
13624 "s" to stand for a non-state.
13625
13626 2003-02-02 Akim Demaille <akim@epita.fr>
13627
13628 * src/scan-skel.l: Scan more than one inert character per yylex
13629 invocation.
13630
13631 2003-02-01 Paul Eggert <eggert@twinsun.com>
13632
13633 Version 1.875a.
13634
13635 * po/LINGUAS: Add ms.
13636
13637 2003-01-30 Akim Demaille <akim@epita.fr>
13638
13639 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13640
13641 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13642
13643 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13644 of $1.
13645
13646 Changes in response to error report by S. Eken: GLR mode does not
13647 handle negative $ indices or $ indices in embedded rules correctly.
13648 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13649
13650 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13651 (b4_rhs_location): Ditto.
13652 (yyfill): New function to copy from stack tree into array
13653 incrementally.
13654 (yyuserAction): Modify to allow incremental move of semantic values
13655 to rhs array when in GLR mode.
13656 Define YYFILL to use in user-defined actions to fill semantic array
13657 as needed.
13658 Remove dummy use of yystack, as there is now a guaranteed use.
13659 (yydoAction): Modify to allow incremental move of semantic values
13660 to rhs array when in GLR mode.
13661 (yyresolveAction): Ditto.
13662 (yyglrShiftDefer): Update comment.
13663 (yyresolveStates): Use X == NULL for pointers, not !X.
13664 (yyglrReduce): Ditto.
13665 (yydoAction): Ditto
13666
13667 * tests/glr-regr1.at: Rename to ...
13668 * tests/glr-regression.at: Add new regression test for the problems
13669 described above (adapted from S. Eken).
13670 Update copyright notice.
13671 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13672 * tests/Makefile.am: Ditto.
13673
13674 2003-01-28 Paul Eggert <eggert@twinsun.com>
13675
13676 * data/lalr1.cc: Do not use @output_header_name@ unless
13677 b4_defines_flag is set. This fixes two bugs reported by
13678 Tim Van Holder in
13679 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13680 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13681
13682 2003-01-21 Paul Eggert <eggert@twinsun.com>
13683
13684 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13685 we don't need to worry about yyerrlab1 being reported as an
13686 "unused label" by non-GCC C compilers. The downside is that if
13687 locations are used then a couple of statements are duplicated each
13688 time YYERROR is invoked, but the upside is that the warnings
13689 should vanish.
13690 (yyerrlab1): Move code to YERROR.
13691 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13692 This reverts some of the 2002-12-27 change.
13693
13694 2003-01-17 Paul Eggert <eggert@twinsun.com>
13695
13696 * src/output.c (symbol_printers_output): Fix typo that led
13697 to core dump. Problem reported by Antonio Rus in
13698 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13699
13700 2003-01-13 Akim Demaille <akim@epita.fr>,
13701 Quoc Peyrot <chojin@lrde.epita.fr>,
13702 Robert Anisko <anisko_r@lrde.epita.fr>
13703
13704 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13705 when the stacks contain one element, as the loop would otherwise
13706 free the last state, and then use the top state (the one we just
13707 popped). This means that the initial elements will not be freed
13708 explicitly, as is the case in yacc.c; it is not a problem, as
13709 these elements have fake values.
13710
13711 2003-01-11 Paul Eggert <eggert@twinsun.com>
13712
13713 * NEWS: %expect-violations are now just warnings, reverting
13714 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13715 bootstrapping problem reported by Matthias Klose; see
13716 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13717 * src/conflicts.c (conflicts_print): Likewise.
13718 * tests/conflicts.at (%expect not enough, %expect too much,
13719 %expect with reduce conflicts): Likewise.
13720 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13721 that the warning is enabled if the number of conflicts changes
13722 (not necessarily increases).
13723
13724 * src/getargs.c (version): Update copyright year.
13725
13726 2003-01-09 Akim Demaille <akim@epita.fr>
13727
13728 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13729
13730 2003-01-08 Paul Eggert <eggert@twinsun.com>
13731
13732 * Makefile.maint (WGETFLAGS):
13733 New macro, containing "-C off" to disable proxy caches.
13734 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13735 (rel-check): Use $(WGET) instead of wget.
13736
13737 2003-01-06 Paul Eggert <eggert@twinsun.com>
13738
13739 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13740 the GLR paper of Scott, Johnstone and Hussain.
13741
13742 2003-01-04 Paul Eggert <eggert@twinsun.com>
13743
13744 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13745 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13746 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13747 (EXTRA_LIBRARIES): New var, for liby.a.
13748 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13749 (EXTRA_SCRIPTS): New var, for yacc.
13750
13751 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13752 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13753 Problem reported by Nelson H. F. Beebe.
13754
13755 2003-01-03 Paul Eggert <eggert@twinsun.com>
13756
13757 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13758 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13759 when compiling Bison 1.875's `bitset bset = obstack_alloc
13760 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13761
13762 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13763 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13764 grow to a huge size with typical invocation.
13765
13766 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13767 Use the pattern recommended by Autoconf 2.57, except also protect
13768 against double-definition.
13769 * src/system.h: Likewise.
13770 Portability issues reported by Nelson H. F. Beebe.
13771
13772 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13773 All uses changed. Provide a definition in both C and C++.
13774 (yytrue, yyfalse): Define even if defined (__cplusplus).
13775
13776 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13777 Reported by Nelson H. F. Beebe.
13778
13779 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13780
13781 2003-01-02 Paul Eggert <eggert@twinsun.com>
13782
13783 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13784 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13785 Bug reported by Nelson H. F. Beebe.
13786
13787 2003-01-01 Paul Eggert <eggert@twinsun.com>
13788
13789 * Version 1.875.
13790
13791 2002-12-30 Paul Eggert <eggert@twinsun.com>
13792
13793 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13794 Moved here from...
13795 (<INITIAL>","): Here. This causes stray "," to be treated
13796 more uniformly.
13797
13798 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13799 last brace in braced code when not in Yacc mode, for compatibility
13800 with Bison 1.35. This resurrects the 2001-12-15 patch to
13801 src/reader.c.
13802
13803 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13804 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13805
13806 2002-12-28 Paul Eggert <eggert@twinsun.com>
13807
13808 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13809 that of SYM's type. This fixes Debian bug 168069, reported by
13810 Thomas Olsson.
13811
13812 2002-12-28 Paul Eggert <eggert@twinsun.com>
13813
13814 Version 1.75f.
13815
13816 Switch back to the Yacc style of conflict reports, undoing some
13817 of the 2002-07-30 change.
13818 * doc/bison.texinfo (Understanding): Use Yacc style for
13819 conflict reports. Also, use new way of locating rules.
13820 * src/conflicts.c (conflict_report):
13821 Renamed from conflict_report_yacc, removing the old
13822 'conflict_report'. Translate the entire conflict report at once,
13823 so that we don't assume that "," has the same interpretation in
13824 all languages.
13825 (conflicts_output): Use Yacc-style conflict report for each state,
13826 instead of our more-complicated style.
13827 (conflicts_print): Use Yacc-style conflict report, except print
13828 the input file name when not emulating Yacc.
13829 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13830 Conflicted Reduction, %expect not enough, %expect too much,
13831 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13832 * tests/existing.at (GNU Cim Grammar): Likewise.
13833 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13834
13835 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13836 fatal): Don't invoke fflush; it's not needed and it might even be
13837 harmful for stdout, as stdout might not be open.
13838 * src/reduce.c (reduce_print): Likewise.
13839
13840 2002-12-27 Paul Eggert <eggert@twinsun.com>
13841
13842 Fix a bug where error locations were not being recorded correctly.
13843 This problem was originally reported by Paul Hilfinger in
13844 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13845
13846 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13847 top of the location stack's error locations.
13848 (yyerrlab): Set it. When discarding a token, push its location
13849 onto yylerrsp so that we don't lose track of the error's end.
13850 (yyerrlab1): Now is only the target of YYERROR, so that we can
13851 properly record the location of the action that failed. For GCC
13852 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13853 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13854 (yyerrlab2): New label, which yyerrlab now falls through to.
13855 Compute the error's location by applying YYLLOC_DEFAULT to
13856 the locations of all the symbols that went into the error.
13857 * doc/bison.texinfo (Location Default Action): Mention that
13858 YYLLOC_DEFAULT is also invoked for syntax errors.
13859 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13860 Error locations include the locations of all the tokens that were
13861 discarded, not just the last token.
13862
13863 2002-12-26 Paul Eggert <eggert@twinsun.com>
13864
13865 * src/files.c: Include quote.h.
13866 (compute_output_file_names): Warn if we detect conflicting
13867 outputs to the same file. This should catch the misunderstanding
13868 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13869
13870 * src/conflicts.c (conflicts_print): If the user specifies
13871 "%expect N", report an error if there are any reduce/reduce
13872 conflicts. This is what the manual says should happen.
13873 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13874 * tests/conflicts.at (%expect with reduce conflicts): New test.
13875
13876 Don't use m4_include on relative file names, as it doesn't work as
13877 desired if there happens to be a file with that name under ".".
13878
13879 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13880 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13881 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13882 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13883 * src/output.c (output_skeleton): Use full path names when
13884 specifying a file to include; don't rely on include path, as
13885 it's unreliable when the working file contains a file with
13886 that name.
13887
13888 2002-12-25 Paul Eggert <eggert@twinsun.com>
13889
13890 Remove obsolete references to bison.simple and bison.hairy.
13891 Problem mentioned by Aubin Mahe in
13892 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13893 * data/glr.c: Comment fix.
13894 * doc/bison.1: Remove references. Also, mention "yacc".
13895
13896 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13897 with -g option.
13898
13899 * src/parse-gram.y (declaration): Use enum "report_states" rather
13900 than its numeric value 1.
13901
13902 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13903 opening a new one. This fixes Debian bug 165349, reported by
13904 Bruce Stephens.
13905
13906 2002-12-24 Paul Eggert <eggert@twinsun.com>
13907
13908 Version 1.75e.
13909
13910 * Makefile.maint (cvs-update): Don't assume that the shell
13911 supports $(...), as Solaris sh doesn't.
13912
13913 * src/parse-gram.y (lloc_default): Remove test for empty
13914 nonterminals at the end, since it didn't change the result.
13915
13916 2002-12-24 Paul Eggert <eggert@twinsun.com>
13917
13918 If the user does not define YYSTYPE as a macro, Bison now declares it
13919 using typedef instead of defining it as a macro. POSIX requires this.
13920 For consistency, YYLTYPE is also declared instead of defined.
13921
13922 %union directives can now have a tag before the `{', e.g., the
13923 directive `%union foo {...}' now generates the C code
13924 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13925 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13926 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13927 instead of `yyltype'.
13928
13929 `yystype' and `yyltype' are now obsolescent macros instead of being
13930 typedefs or tags; they are no longer documented and will be
13931 withdrawn in a future release.
13932
13933 * data/glr.c (b4_location_type): Remove.
13934 (YYSTYPE): Renamed from yystype.
13935 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13936 (struct YYLTYPE): Renamed from struct yyltype.
13937 (YYLTYPE): Renamed from yyltype.
13938 (yyltype, yystype): New (and obsolescent) macros,
13939 for backward compatibility.
13940 * data/yacc.c: Likewise.
13941
13942 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13943 does not specify a union tag. This is for compatibility with
13944 Solaris 9 yacc.
13945
13946 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13947 const *, since it is now modified by stripping surrounding { }.
13948 (current_braced_code): Remove.
13949 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13950 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13951 trailing " {...}". Now of type <chars>.
13952 (grammar_declaration): Adjust to bundled tokens.
13953 (code_content): Remove; stripping is now done by add_param.
13954 (print_token_value): Print contents of bundled tokens.
13955 (token_name): New function.
13956
13957 * src/reader.h (braced_code, current_braced_code): Remove.
13958 (token_name): New decl.
13959
13960 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13961 token_type, not braced_code code_kind. All uses changed.
13962 (SC_PRE_CODE): New state, for scanning after a keyword that
13963 has (or usually has) an immediately-following braced code.
13964 (token_type): New local var, to keep track of which token type
13965 to return when scanning braced code.
13966 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13967 <INITIAL>"%parse-param", <INITIAL>"%printer",
13968 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13969 instead of returning a token type immediately.
13970 (<INITIAL>"{"): Set token type.
13971 (<SC_BRACED_CODE>"}"): Use it.
13972 (handle_action_dollar, handle_action_at): Now returns bool
13973 indicating success. Fail if ! current_rule; this prevents a core dump.
13974 (handle_symbol_code_dollar, handle_symbol_code_at):
13975 Remove; merge body into caller.
13976 (handle_dollar, handle_at): Complain in invalid contexts.
13977
13978 * NEWS, doc/bison.texinfo: Document the above.
13979 * NEWS: Fix years and program names in copyright notice.
13980
13981 2002-12-17 Paul Eggert <eggert@twinsun.com>
13982
13983 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13984 Reporting, Table of Symbols): Omit mentions of %lex-param and
13985 %parse-param from the documentation for now.
13986
13987 2002-12-15 Paul Eggert <eggert@twinsun.com>
13988
13989 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13990 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13991 lookahead symbol, and which sets yychar in parser actions) and it
13992 disagreed with the Bison documentation. Bug
13993 reported by Andrew Walrond.
13994
13995 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13996 as the caller now does that.
13997 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13998 (YYEMPTY): Parenthesize right hand side, since others use it.
13999 (yyparse): Don't assume that our generated code is the only code
14000 that sets yychar.
14001
14002 2002-12-13 Paul Eggert <eggert@twinsun.com>
14003
14004 Version 1.75d.
14005
14006 POSIX requires a "yacc" command.
14007 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14008 (MOSTLYCLEANFILES): Add yacc.
14009 (yacc): New rule.
14010 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
14011 as an alias for bison y.
14012
14013 * po/LINGUAS: Add da.
14014
14015 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14016 problem with latest <getopt.h>.
14017 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14018
14019 * doc/fdl.texi: Upgrade to 1.2.
14020 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14021 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14022 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14023 gnulib.
14024 * config/install-sh: Sync with autotools.
14025
14026 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14027 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14028 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14029 locations are requested.
14030 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14031 locations are requested.
14032
14033 2002-12-12 Paul Eggert <eggert@twinsun.com>
14034
14035 Remove unportable casts and storage allocation tricks.
14036 While we're at it, remove almost all casts, since they
14037 usually aren't needed and are a sign of trouble.
14038
14039 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14040
14041 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14042 the pointer DSET returned by malloc; this isn't portable.
14043 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14044 Similarly for DERIVES.
14045 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14046 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14047 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14048
14049 * src/derives.c (derives_compute): Do not bother invoking
14050 int_of_rule_number, since rule numbers are integers.
14051
14052 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14053 rather than XMALLOC (char, N).
14054
14055 * src/files.c (filename_split): Rewrite to avoid cast.
14056
14057 * src/gram.h (symbol_number_as_item_number,
14058 item_number_as_symbol_number, rule_number_as_item_number,
14059 item_number_as_rule_number):
14060 Now inline functions rather than macros, to avoid casts.
14061 * src/state.h (state_number_as_int): Likewise.
14062 * src/tables.c (state_number_to_vector_number,
14063 symbol_number_to_vector_number): Likewise.
14064
14065 * src/gram.h (int_of_rule_number): Remove; no longer used.
14066
14067 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14068 since the resulting storage is always stored into.
14069
14070 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14071 where it's needed.
14072
14073 * src/muscle_tab.c (muscle_m4_output):
14074 Now inline. Return bool, not int.
14075 * src/state.c (state_compare): Likewise.
14076 * src/symtab.c (symbol_check_defined,
14077 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14078 hash_compare_symbol, hash_symbol):
14079 Likewise.
14080 * src/uniqstr.c (uniqstr_print): Likewise.
14081 * src/muscle_tab.c (muscle_m4_output_processor):
14082 New function, to avoid casts.
14083 * src/state.c (state_comparator, stage_hasher): Likewise.
14084 * src/symtab.c (symbol_check_defined_processor,
14085 symbol_check_alias_consistency_processor, symbol_pack_processor,
14086 symbol_translation_processor, hash_symbol_comparator,
14087 hash_symbol_hasher): Likewise.
14088 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14089 * src/muscle_tab.c (muscles_m4_output):
14090 Use new functions instead of casting old functions unportably.
14091 * src/state.c (state_hash_new): Likewise.
14092 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14093 symbols_token_translations_init):
14094 Likewise.
14095 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14096
14097 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14098 var instead of casting to long, to avoid casts.
14099 (prepare_states): Use MALLOC rather than alloca, so that we don't
14100 have to worry about alloca.
14101 * src/state.c (state_hash_lookup): Likewise.
14102
14103 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14104 local var instead of casting to unsigned char, to avoid casts.
14105
14106 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14107 STATE_ALLOC): Remove.
14108 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14109 rather than calloc, and use offsetof to avoid allocating slightly
14110 too much storage.
14111 (state_new): Initialize all members.
14112
14113 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14114
14115 * src/symtab.c (symbol_free): Remove; unused.
14116 (symbol_get): Remove cast in lhs of assignment.
14117 (symbols_do): Now static. Accept generic arguments, not
14118 hashing-related ones.
14119
14120 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14121 (symbol_processor): Remove.
14122 (symbols_do): Remove decl; now static.
14123
14124 * src/system.h (alloca): Remove; decl no longer needed.
14125 (<stddef.h>): Include, for offsetof.
14126 (<inttypes.>, <stdint.h>): Include if available.
14127 (uintptr_t): New type, if system lacks it.
14128 (CALLOC, MALLOC, REALLOC): New macros.
14129 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14130 new macros.
14131
14132 * src/tables.c (table_size): Now int, to pacify GCC.
14133 (table_grow, table_ninf_remap): Use signed table size.
14134 (save_row): Don't bother initializing locals when not needed.
14135 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14136 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14137
14138 * src/vcg.h: Correct misspellings.
14139
14140 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14141
14142
14143 * src/getargs.c (getargs): Don't assume EOF == -1.
14144
14145 2002-12-09 Paul Eggert <eggert@twinsun.com>
14146
14147 Change identifier spellings to avoid collisions with names
14148 that are reserved by POSIX.
14149
14150 Don't use names ending in _t, since POSIX reserves them.
14151 For consistency, remove _e and _s endings -- they're weren't
14152 needed to remove ambiguity. All uses changed.
14153 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14154 turn was just renamed from struniq_t.
14155 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14156 which in turn was just renamed from struniq_processor_t.
14157 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14158 in turn was renamed from hash_compare_struniq_t.
14159 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14160 (state_list): Renamed from state_list_t.
14161 * src/assoc.h (assoc): Renamed from assoc_t.
14162 * src/conflicts.c (enum conflict_resolution): Renamed from
14163 enum conflict_resolution_e.
14164 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14165 (rule_list): Renamed from rule_list_t.
14166 * src/getargs.h (enum trace): Renamed from enum trace_e.
14167 (enum report): Renamed from enum report_e.
14168 * src/gram.h (item_number): Renamed from item_number_t.
14169 (rule_number): Renamed from rule_number_t.
14170 (struct rule_s): Remove the "rule_s" part; not used.
14171 (rule): Renamed from rule_t.
14172 (rule_filter): Renamed from rule_filter_t.
14173 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14174 (goto_list): Renamed from goto_list_t.
14175 * src/lalr.h (goto_number): Renamed from goto_number_t.
14176 * src/location.h (location): Renamed from location_t.
14177 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14178 and moved here from:
14179 * src/muscle_tab.h (muscle_entry_t): here.
14180 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14181 (rule_list): Renamed from rule_list_t.
14182 * src/print_graph.c (static_graph): Renamed from graph.
14183 * src/reader.h (braced_code): Renamed from braced_code_t.
14184 Remove brace_code_e tag.
14185 * src/relation.h (relation_node): Renamed from relation_node_t.
14186 (relation_nodes): Renamed from relation_nodes_t.
14187 (relation): Renamed from relation_t.
14188 * src/state.h (state_number): Renamed from state_number_t.
14189 (struct state): Renamed from struct state_s.
14190 (state): Renamed from state_t.
14191 (transitions): Renamed from transitions_t. Unused (and
14192 misspelled) transtion_s tag removed.
14193 (errs): Renamed from errs_t. Unused errs_s tag removed.
14194 (reductions): Renamed from reductions_t. Unused tag
14195 reductions_s removed.
14196 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14197 (struct symbol_list): Renamed from struct symbol_list_s.
14198 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14199 (struct symbol): Renamed from struct symbol_s.
14200 (symbol): Renamed from symbol_t.
14201 * src/tables.c (vector_number): Renamed from vector_number_t.
14202 (action_number): Renamed from action_t.
14203 * src/tables.h (base_number): Renamed from base_t.
14204 * src/vcg.h (enum color): Renamed from enum color_e.
14205 (enum textmode): Renamed from enum textmode_e.
14206 (enum shape): Renamed from enum shape_e.
14207 (struct colorentry): Renamed from struct colorentry_s.
14208 (struct classname): Renamed from struct classname_s.
14209 (struct infoname): Renamed from struct infoname_s.
14210 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14211 (enum decision): Renamed from enum decision_e.
14212 (enum orientation): Renamed from enum orientation_e.
14213 (enum alignment): Renamed from enum alignment_e.
14214 (enum arrow_mode): Renamed from enum arrow_mode_e.
14215 (enum crossing_type): Renamed from enum crossing_type_e.
14216 (enum view): Renamed from enum view_e.
14217 (struct node): Renamed from struct node_s.
14218 (node): Renamed from node_t.
14219 (enum linestyle): Renamed from enum linestyle_e.
14220 (enum arrowstyle): Renamed from enum arrowstyle_e.
14221 (struct edge): Renamed from struct edge.
14222 (edge): Renamed from edge_t.
14223 (struct graph): Renamed from struct graph_s.
14224 (graph): Renamed from graph_t.
14225 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14226 Rename value_t -> value.
14227 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14228 value_t_as_yystype -> value_as_yystype.
14229
14230 Don't include <errno.h> in the mainstream code, since it
14231 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14232 * lib/get-errno.c, lib/get-errno.h: New files.
14233 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14234 get-errno.c.
14235 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14236 * src/output.c (output_skeleton): Likewise.
14237 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14238 instead of errno.
14239 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14240 Likewise.
14241 (handle_action_dollar, handle_action_at): Likewise.
14242 * src/system.h: Do not include <errno.h>.
14243 (TAB_EXT): Renamed from EXT_TAB.
14244 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14245
14246 Avoid str[a-z]*, since <string.h> reserves that name space.
14247 Change all instances of "struniq" in names to "uniqstr", and
14248 likewise for "STRUNIQ" and "UNIQSTR".
14249 * src/uniqstr.c: Renamed from src/struniq.c.
14250 * src/uniqstr.h: Renamed from src/struniq.h.
14251 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14252 * src/files.c (strsuffix): Remove; unused.
14253 (concat2): Renamed from stringappend. Now static.
14254 * src/files.h (strsuffix, stringappend): Remove; unused.
14255 * src/parse-gram.y (<chars>): Renamed from <string>.
14256 (<uniqstr>): Renamed from <struniq>.
14257 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14258 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14259 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14260 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14261 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14262 (N_EXPAND): Renamed from N_STRETCH.
14263
14264 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14265 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14266 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14267 Remove; unused.
14268 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14269 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14270 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14271 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14272 (BASE_MAXIMUM): Renamed from BASE_MAX.
14273 (BASE_MINIMUM): Renamed from BASE_MIN.
14274 (ACTION_MAX): Remove; unused.
14275 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14276 Unnecessary casts removed from above defines.
14277
14278
14279 Fix misspelling in names.
14280 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14281 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14282 G_NODE_ALIGNEMENT.
14283
14284
14285 * lib/timevar.c (timevar_report): Renamed from time_report,
14286 for consistency with other names.
14287 * lib/timevar.h (timevar_report): New decl.
14288 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14289
14290
14291 Sort include-file uses.
14292
14293 Reorder all include files under src to be in the order "system.h".
14294 then the ../lib include files in angle brackets (alphabetized),
14295 then the . include files in double-quotes (alphabetized). Fix
14296 dependency breakages encountered in this process, as follows:
14297 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14298 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14299 * src/state.h: Include "symtab.h".
14300
14301 2002-12-08 Paul Eggert <eggert@twinsun.com>
14302
14303 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14304 since this causes problems when __file__ contains character
14305 sequences like "@" that are treated specially by src/scan-skel.l.
14306 Instead, just use the file's basename. This fixes the bug
14307 reported by Martin Mokrejs in
14308 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14309
14310 2002-12-06 Paul Eggert <eggert@twinsun.com>
14311
14312 Add support for rules that do not have trailing semicolons, as
14313 POSIX requires. Improve the quality of locations in Bison
14314 diagnostics.
14315
14316 * src/location.c: Include <quotearg.h>.
14317 (empty_location): Now const.
14318 (location_print): New function. Follow the recommendation of the
14319 GNU Coding Standards for locations that span file boundaries.
14320 * src/location.h: Do not include <quotearg.h>; no longer needed.
14321 (boundary): New type.
14322 (location_t): Use it. This allows locations to span file boundaries.
14323 All member uses changed: file -> start.file or end.file (as needed),
14324 first_line -> start.line, first_column -> start.column,
14325 last_line -> end.line, last_column -> end.column.
14326 (equal_boundaries): New function.
14327 (LOCATION_RESET, LOCATION_STEP): Remove.
14328 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14329 (empty_location): Now const.
14330 (location_print): New decl.
14331 * src/parse-gram.y (lloc_default): New function, which handles
14332 empty locations more accurately.
14333 (YYLLOC_DEFAULT): Use it.
14334 (%token COLON): Remove.
14335 (%token ID_COLON): New token.
14336 (rules): Use it.
14337 (declarations, rules): Remove trailing semicolon.
14338 (declaration, rules_or_grammar_declaration):
14339 Allow empty (";") declaration.
14340 (symbol_def): Remove empty actions; no longer needed.
14341 (rules_or_grammar_declaration): Remove trailing semicolon.
14342 (semi_colon.opt): Remove.
14343 * src/reader.h: Include location.h.
14344 (scanner_cursor): New decl.
14345 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14346 rolling our own.
14347 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14348 of *loc.
14349 (STEP): Remove. No longer needed, now that adjust_location does
14350 the work. All uses removed.
14351 (scanner_cursor): New var.
14352 (adjust_location): Renamed from extend_location. It now sets
14353 *loc and adjusts the scanner cursor. All uses changed.
14354 Don't bother testing for CR.
14355 (handle_syncline): Remove location arg; now updates scanner cursor.
14356 All callers changed.
14357 (unexpected_end_of_file): Now accepts start boundary of token or
14358 comment, not location. All callers changed. Update scanner cursor,
14359 not the location.
14360 (SC_AFTER_IDENTIFIER): New state.
14361 (context_state): Renamed from c_context. All uses changed.
14362 (id_loc, code_start, token_start): New local vars.
14363 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14364 processing of Yacc white space and equivalents here.
14365 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14366 instead of returning ID immediately, since we need to search for
14367 a subsequent colon.
14368 (<INITIAL>"'", "\""): Save token_start.
14369 (<INITIAL>"%{", "{", "%%"): Save code_start.
14370 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14371 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14372 BEGIN context_state at end, not INITIAL.
14373 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14374 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14375 Return correct token start.
14376 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14377 the start of a character, string or multiline comment is found.
14378 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14379 Reduction): Adjust reported locations to match the more-precise
14380 results now expected.
14381 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14382 * tests/reduce.at (Useless Rules, Reduced Automaton,
14383 Underivable Rules): Likewise.
14384 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14385 or "|"' now that so many other tokens are allowed by the new grammar.
14386
14387 * src/complain.h (current_file): Remove duplicate decl;
14388 current_file is now owned by files.h.
14389 * src/complain.c, src/scan-gram.l: Include files.h.
14390
14391 2002-12-06 Paul Eggert <eggert@twinsun.com>
14392
14393 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14394 promotes to int; it might be unsigned int.
14395 * data/yacc.c (yy_reduce_print): Likewise.
14396
14397 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14398 be #defined in the prologue, not in the Bison declarations.
14399 This fixes Debian Bug 102878, reported by Shaul Karl.
14400
14401 2002-12-02 Paul Eggert <eggert@twinsun.com>
14402
14403 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14404 * lib/strtoul.c: New file, from gnulib.
14405 This fixes a porting bug reported by Peter Klein in
14406 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14407
14408 2002-11-30 Paul Eggert <eggert@twinsun.com>
14409
14410 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14411 and put only a forward declaration in the prologue. This is for
14412 consistency with the other scanner helper functions.
14413
14414 Type clashes now generate warnings, not errors, since it
14415 appears that POSIX may allow some grammars with type clashes.
14416 * src/reader.c (grammar_current_rule_check): Warn about
14417 type clashes instead of complaining.
14418 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14419
14420 Add Yacc library, since POSIX requires it.
14421 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14422 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14423 * lib/main.c, lib/yyerror.c: New files.
14424
14425 gram_error can be static; it need not be extern.
14426 * src/reader.h (gram_error): Remove decl.
14427 * src/parse-gram.y (gram_error): Now static. Add static decl.
14428 (print_token_value): Omit parameter names from forward decl,
14429 for consistency.
14430
14431 2002-11-29 Paul Eggert <eggert@twinsun.com>
14432
14433 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14434 be declared before being used. E.g., one should typically
14435 declare them in the prologue. Use GNU coding style in examples.
14436 Put "const" consistently after the type it modifies. Mention
14437 that C99 supports "inline". Mention that yyerror traditionally
14438 returns "int".
14439
14440 %parse-param and %lex-param now take just one argument, the
14441 declaration; the argument name is deduced from the declaration.
14442
14443 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14444 Reporting, Table of Symbols): Document this.
14445 * src/parse-gram.y (add_param): New function.
14446 (COMMA): Remove.
14447 (declaration): Implement new rule for %parse-param and %lex-param.
14448 * src/scan-gram.l: "," now elicits a warning, rather than being
14449 a token; this is more compatible with byacc.
14450 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14451
14452 2002-11-27 Paul Eggert <eggert@twinsun.com>
14453
14454 Rename identifiers to avoid real and potential collisions.
14455
14456 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14457 to avoid collision with lex macro described by Bruce Lilly in
14458 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14459 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14460 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14461 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14462 All uses changed.
14463 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14464 The name "yycontrol" violates the name space rules, and this stuff
14465 wasn't being used anyway.
14466 (input): Remove action; this stuff wasn't being used.
14467 (gram_error): Rename local variable yylloc -> loc.
14468 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14469 (YY_DECL): Don't use "yy" at start of local variables.
14470 All uses changed, e.g., yylloc -> loc.
14471 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14472 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14473 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14474 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14475
14476 * src/parse-gram.y (gram_error): loc is now const *.
14477 * src/reader.h (gram_error): Likewise.
14478
14479 2002-11-24 Paul Eggert <eggert@twinsun.com>
14480
14481 Version 1.75c.
14482
14483 * tests/actions.at (Actions after errors): Use an output format
14484 more similar to that of the Printers and Destructors test.
14485 Test the position of the ';' token too.
14486 (Printers and Destructors): Likewise.
14487 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14488 unnecessarily alarming people when the test fails.
14489
14490 * data/yacc.c (yyerrlab1): Move this label down, so that the
14491 parser does not discard the lookahead token if the user code
14492 invokes YYERROR. This change is required for POSIX conformance.
14493
14494 * lib/error.c: Sync with gnulib.
14495
14496 2002-11-22 Paul Eggert <eggert@twinsun.com>
14497
14498 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14499 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14500 * lib/xmalloc.c: Likewise.
14501
14502 2002-11-20 Paul Eggert <eggert@twinsun.com>
14503
14504 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14505
14506 2002-11-20 Paul Eggert <eggert@twinsun.com>
14507
14508 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14509 should use `if (! x) abort ();' rather than `assert (x);', and
14510 anyway it's one less thing to worry about configuring.
14511
14512 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14513 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14514 and replace all instances of assert with abort.
14515 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14516 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14517
14518 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14519 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14520 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14521 hash_find_entry, hash_rehash, hash_insert): Likewise.
14522 * src/conflicts.c (resolve_sr_conflict): Likewise.
14523 * src/lalr.c (set_goto_map, map_goto): Likewise.
14524 * src/nullable.c (nullable_compute): Likewise.
14525 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14526 * src/reader.c (packgram, reader): Likewise.
14527 * src/state.c (state_new, state_free, state_transitions_set,
14528 state_reduction_find): Likewise.
14529 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14530 symbol_pack): Likewise.
14531 * src/tables.c (conflict_row, pack_vector): Likewise.
14532 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14533 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14534 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14535 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14536
14537 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14538 (ARGMATCH_CONSTRAINT): New macro.
14539 (ARGMATCH_ASSERT): Use it.
14540
14541 * src/system.h (verify): New macro.
14542 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14543 rather than assert.
14544 * src/tables.c (tables_generate): Likewise.
14545
14546 * src/struniq.c (struniq_assert): Now returns void, and aborts
14547 if the assertion is false.
14548 (struniq_assert_p): Remove.
14549 * src/struniq.h: Likewise.
14550
14551 2002-11-18 Paul Eggert <eggert@twinsun.com>
14552
14553 * data/glr.c (yygetLRActions): Replace `yyindex' with
14554 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14555 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14556 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14557
14558 2002-11-18 Akim Demaille <akim@epita.fr>
14559
14560 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14561 space.
14562 From Tim Van Holder.
14563
14564 2002-11-17 Paul Eggert <eggert@twinsun.com>
14565
14566 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14567 to "SyntaxError" for consistency with my 2002-11-15 change.
14568
14569 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14570 not define to {}, since this breaks the common use of `YYDPRINTF
14571 ((...));' if a single statement is desired (e.g. before `else').
14572 Work around GCC warnings by surrounding corresponding calls with
14573 {} if needed.
14574 (yyhasResolvedValue): Remove unused function.
14575 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14576 loop body.
14577 (yyreportSyntaxError): Renamed from yyreportParseError.
14578 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14579 All uses changed.
14580 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14581 extern when possible. Remove unused initializations.
14582
14583 2002-11-16 Akim Demaille <akim@epita.fr>
14584
14585 Augment the similarity between GLR and LALR traces.
14586
14587 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14588 (YY_REDUCE_PRINT): New.
14589 (yyparse): Use them.
14590 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14591 YYDPRINT here.
14592 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14593 state reached after the reduction/recovery, since...
14594 (yyparse, yyprocessOneStack): Report the state we are entering in.
14595
14596 2002-11-16 Akim Demaille <akim@epita.fr>
14597
14598 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14599 Add support for --trace=skeleton.
14600 * src/scan-skel.l: %option debug.
14601 Scan strings of non-@ or \n instead of character by character.
14602 (scan_skel): Handle trace_skeleton.
14603 (QPUTS): New.
14604 (@output_parser_name@, @output_header_name@): ``Restore'' their
14605 support (used to be M4 macros).
14606 * data/yacc.c: Quote larger chunks, a la glr.c.
14607 * data/lalr1.cc: Likewise.
14608 The header guards are no longer available, so use some other
14609 string than `YYLSP_NEEDED'.
14610
14611 2002-11-16 Akim Demaille <akim@epita.fr>
14612
14613 Make the ``Printers and Destructors'' test more verbose, taking
14614 `yacc.c''s behavior as (possibly wrong) reference.
14615
14616 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14617 instead of fprint on stdout.
14618 Set and report the last_line of the symbols.
14619 Consistently display values and locations.
14620
14621 2002-11-16 Paul Eggert <eggert@twinsun.com>
14622
14623 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14624
14625 2002-11-15 Paul Eggert <eggert@twinsun.com>
14626
14627 * tests/actions.at (Actions after errors): New test case.
14628
14629 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14630 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14631 tests/action.at, tests/calc.at, tests/conflicts.at,
14632 tests/cxx-type.at, tests/regression.at:
14633 "parse error" -> "syntax error" for POSIX compatibility.
14634 "parsing stack overflow..." -> "parser stack overflow" so
14635 that code matches Bison documentation.
14636
14637 2002-11-15 Akim Demaille <akim@epita.fr>
14638
14639 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14640 take two BRACED_CODE, not two string_content.
14641 Free the scanner's obstack when we are done.
14642 (code_content): New.
14643 * tests/calc.at: Adjust.
14644 * doc/bison.texinfo: Adjust.
14645 Also, make sure to include the `,' for these declarations.
14646
14647 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14648
14649 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14650 definition; avoids potential autoreconf problems.
14651
14652 2002-11-15 Akim Demaille <akim@epita.fr>
14653
14654 Always check the value returned by yyparse.
14655
14656 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14657 returned by yyparse.
14658 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14659 Adjust calls.
14660 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14661 returned by yyparse.
14662
14663 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14664
14665 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14666 on input.at test.
14667
14668 2002-11-14 Paul Eggert <eggert@twinsun.com>
14669
14670 * src/output.c (output_skeleton): Call xfopen instead of
14671 duplicating xfopen's body.
14672
14673 Fix bugs reported by Nelson H. F. Beebe in
14674 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14675
14676 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14677 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14678 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14679 file twice in the grammar, as an extra check.
14680
14681 * tests/input.at (Torturing the Scanner): Surround the
14682 backslash-newline tests with "#if 0", to make it less likely that
14683 we'll run into compiler bugs. Bring back solitary \ inside
14684 comment, but add a closing comment to work around HP C bug. Don't
14685 test backslash-newline in C character constant.
14686
14687 2002-11-14 Akim Demaille <akim@epita.fr>
14688
14689 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14690 status of the compiler.
14691 Calling `exit 1' is no longer needed.
14692 Reported by Nelson H. F. Beebe.
14693
14694 2002-11-14 Akim Demaille <akim@epita.fr>
14695
14696 * tests/atlocal.in (CPPFLAGS): We have config.h.
14697 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14698 New.
14699 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14700 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14701 * tests/regression.at, tests/torture.at: Use them for all the
14702 grammars that are to be compiled.
14703 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14704 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14705 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14706
14707 2002-11-14 Akim Demaille <akim@epita.fr>
14708
14709 * doc/bison.texinfo: Various formatting changes (alignments in
14710 samples, additional @group/@end group, GCS in samples.
14711 Use @deffn instead of simple @table to define the directives,
14712 macros, variables etc.
14713
14714 2002-11-13 Paul Eggert <eggert@twinsun.com>
14715
14716 Fix some bugs reported by Albert Chin-A-Young in
14717 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14718
14719 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14720 -o c"; the HP C compiler chatters during compilation.
14721 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14722 * tests/headers.at (export YYLTYPE): Likewise.
14723
14724 * tests/input.at (Torturing the Scanner): Remove lines containing
14725 solitary backslashes, as they tickle a bug in the HP C compiler.
14726
14727 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14728 comments, since they're not portable. Use GNU coding style.
14729
14730 2002-11-13 Akim Demaille <akim@epita.fr>
14731
14732 * data/yacc.c: Leave bigger chunks of quoted text.
14733 (YYDSYMPRINTF): New.
14734 Use it to report symbol activities.
14735 * data/glr.c (YYDSYMPRINTF): New.
14736 Use it.
14737
14738 2002-11-12 Paul Eggert <eggert@twinsun.com>
14739
14740 Version 1.75b.
14741
14742 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14743 (yyglrReduce): Return yyok, not 0.
14744 This should avoid the enumerated-type warnings reported
14745 by Nelson H. F. Beebe in
14746 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14747
14748 * lib/bbitset.h (BITSET_INLINE): Remove.
14749 * lib/bitset.h [! BITSET_INLINE]: Remove.
14750 (bitset_set, bitset_reset, bitset_test): Rename local vars
14751 to avoid shadowing warnings by GCC.
14752
14753 * data/glr.c (inline): Remove #define. It's the user's
14754 responsibility to #define it away, just like 'const'.
14755 This fixes one of the bugs reported by Nelson H. F. Beebe in
14756 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14757
14758 * Makefile.maint (po-check): Scan .l and .y files instead of the
14759 .c and the .h files that they generate. This fixes the bug
14760 reported by Tim Van Holder in:
14761 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14762 Look for N_ as well as for _. Try to avoid matching #define for
14763 N_ and _.
14764 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14765 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14766 * src/scan-gram.l: Revamp regular expressions so that " and '
14767 do not confuse xgettext.
14768
14769 * src/struniq.h (struniq_new): Do not declare the return type
14770 to be 'const'; this violates the C standard.
14771 * src/struniq.c (struniq_new): Likewise.
14772
14773 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14774
14775 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14776 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14777 linker.
14778
14779 2002-11-12 Akim Demaille <akim@epita.fr>
14780
14781 * Makefile.maint: Sync with Autoconf:
14782 (local_updates): New.
14783
14784 2002-11-12 Akim Demaille <akim@epita.fr>
14785
14786 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14787
14788 2002-11-12 Akim Demaille <akim@epita.fr>
14789
14790 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14791 locations.
14792
14793 2002-11-12 Akim Demaille <akim@epita.fr>
14794
14795 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14796 not yyvalue.
14797
14798 2002-11-12 Akim Demaille <akim@epita.fr>
14799
14800 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14801 Use it to test the GLR parser.
14802
14803 2002-11-12 Akim Demaille <akim@epita.fr>
14804
14805 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14806 defines it.
14807 * data/glr.c (yystos): New.
14808 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14809 (YYDSYMPRINT): New.
14810 (yyval): Don't define it, it is handled via M4.
14811 (yyrecoverParseError): Free verbosely the discarded symbols.
14812 * data/yacc.c (yysymprint): Remove, rather...
14813 (b4_yysymprint_generate): invoke.
14814 * data/c.m4 (b4_yysymprint_generate): New.
14815 Accept pointers as arguments, as opposed to the version from
14816 yacc.c.
14817 (b4_yydestruct_generate): Likewise.
14818 * tests/cations.at (Printers and Destructors): Use Bison directives
14819 instead of CPP macros.
14820 Don't rely on internal details.
14821
14822 2002-11-12 Akim Demaille <akim@epita.fr>
14823
14824 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14825 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14826 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14827 it against YYEMPTY and so forth), work on yytoken (i.e., set
14828 it to YYEMPTY etc.).
14829 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14830 (b4_symbol_actions): Remove.
14831 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14832 for 0, end-of-input.
14833
14834 2002-11-12 Akim Demaille <akim@epita.fr>
14835
14836 * doc/bison.texinfo (Destructor Decl): New.
14837
14838 2002-11-12 Akim Demaille <akim@epita.fr>
14839
14840 * src/tables.c (tables_generate): Use free for pointers that
14841 cannot be NULL, not XFREE.
14842 (pack_vector): Use assert, not fatal, for bound violations.
14843 * src/state.c (state_new): Likewise.
14844 * src/reader.c (reader): Likewise.
14845 * src/lalr.c (set_goto_map): Likewise.
14846 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14847 the file name.
14848
14849 2002-11-12 Akim Demaille <akim@epita.fr>
14850
14851 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14852 Restore.
14853 * src/scan-gram.l (last_string): Is global to the file, not to
14854 yylex.
14855 * src/parse-gram.y (input): Don't append the epilogue here,
14856 (epilogue.opt): do it here, and free the scanner's obstack.
14857 * src/reader.c (epilogue_set): Rename as...
14858 (epilogue_augment): this.
14859 * data/c.m4 (b4_epilogue): Defaults to empty.
14860
14861 2002-11-12 Akim Demaille <akim@epita.fr>
14862
14863 * src/getargs.c (long_options): Remove duplicates.
14864 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14865 Remove.
14866 * doc/bison.rnh: Remove.
14867 * doc/bison.texinfo (VMS Invocation): Remove.
14868
14869 2002-11-12 Akim Demaille <akim@epita.fr>
14870
14871 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14872 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14873
14874 Use struniq for symbols.
14875
14876 * src/symtab.h (symbol_t): The tag member is a struniq.
14877 (symbol_type_set): Adjust.
14878 * src/symtab.c (symbol_new): Takes a struniq.
14879 (symbol_free): Don't free the tag member.
14880 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14881 (hash_compare_symbol, hash_symbol): these.
14882 Use the fact that tags as struniqs.
14883 (symbol_get): Use struniq_new.
14884 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14885 Returns a strniq.
14886 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14887 and type members are struniqs.
14888 * src/reader.c (get_merge_function)
14889 (grammar_current_rule_merge_set): Adjust.
14890 (TYPE, current_type): Are struniq.
14891
14892 Use struniq for file names.
14893
14894 * src/files.h, src/files.c (infile): Split into...
14895 (grammar_file, current_file): these.
14896 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14897 * src/reduce.c (reduce_print): Likewise.
14898 * src/getargs.c (getargs): Likewise.
14899 * src/complain.h, src/complain.c: Likewise.
14900 * src/main.c (main): Call struniqs_new early enough to use it for
14901 file names.
14902 Don't free the input file name.
14903
14904 2002-11-12 Akim Demaille <akim@epita.fr>
14905
14906 * src/symtab.c (symbol_free): Remove dead deactivated code:
14907 type_name are properly removed.
14908 Don't use XFREE to free items that cannot be NULL.
14909 * src/struniq.h, src/struniq.c: New.
14910 * src/main.c (main): Initialize/free struniqs.
14911 * src/parse-gram.y (%union): Add astruniq member.
14912 (yyprint): Adjust.
14913 * src/scan-gram.l (<{tag}>): Return a struniq.
14914 Free the obstack bit that used to store it.
14915 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14916
14917 2002-11-11 Paul Eggert <eggert@twinsun.com>
14918
14919 Revamp to fix many (but not all) of the C- and M4-related quoting
14920 problems. Among other things, this fixes the Bison bug reported
14921 by Jan Hubicka when processing the Bash grammar; see:
14922 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14923
14924 Use new @ escapes consistently. Represent brackets with @{ and @}
14925 rather than @<:@ and @:>@, since this works a bit better with dumb
14926 editors like vi. Represent @ with @@, since @ is now consistently
14927 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14928 __ofile__, to avoid unexpected expansions. Similarly, use @output
14929 rather than #output.
14930
14931 * data/c.m4 (b4_copyright): Omit file name from comment, since
14932 the file name could contain "*/".
14933 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14934 be quoted. All uses changed.
14935
14936 * data/glr.c: Use new @ escapes consistently.
14937 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14938 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14939 Remove, since they couldn't handle arbitrary characters in file
14940 names.
14941 * data/lalr1.cc: Likewise.
14942 * data/yacc.c: Likewise.
14943
14944 * src/files.c (output_infix): Remove; all uses removed.
14945 * src/files.h: Likewise.
14946
14947 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14948 mishandled funny characters in file names, and anyway it isn't
14949 needed any more.
14950 * data/yacc.c: Likewise.
14951 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14952
14953 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14954 * data/yacc.c: Likewise.
14955
14956 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14957 strings now.
14958 (muscle_init): Quote filename as a C string.
14959 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14960 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14961 * src/output.c (escaped_file_name_output): New function.
14962 (prepare_symbols): Quote tokens for M4.
14963 (prepare): Don't insert output_infix, output_prefix,
14964 output_parser_name, output_header_name; this is now down by scan-skel.
14965 Insert skeleton as a C string.
14966
14967 * src/output.c (user_actions_output, symbol_destructors_output,
14968 symbol_printers_output): Quote filenames for C and M4.
14969 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14970
14971 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14972 escapes other than \\ and \'; this simplifies the code.
14973 (<SC_STRING>): Likewise, for \\ and \".
14974 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14975 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14976 Use new escapes @{ and @} for [ and ].
14977
14978 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14979 them with auto vars.
14980 Switch to new escape scheme, where @ is the escape character uniformly.
14981 Abort if a stray escape character is found. Avoid unbounded input
14982 buffer when parsing non-escaped text.
14983
14984 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14985 __oline__, #output, $@, and @{ do not have unintended meanings.
14986
14987 2002-11-09 Paul Eggert <eggert@twinsun.com>
14988
14989 Fix the test failure due to GCC warnings described in
14990 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14991 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14992 evaluate to 0 if it's impossible for NINF to be in the respective
14993 table.
14994 (yygetLRActions, yyrecoverParseError): Use them.
14995
14996 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14997 counted in the token inserted at end of file. Now takes
14998 location_t *, not location_t, so that the location can be
14999 adjusted. All uses changed.
15000
15001 * tests/regression.at (Invalid inputs): Adjust wording in
15002 diagnostic to match the new behavior.
15003
15004 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15005 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15006 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15007 abort ();'. This reduces the runtime of the "Many lookaheads"
15008 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15009 GCC 3.2.
15010
15011 2002-11-07 Paul Eggert <eggert@twinsun.com>
15012
15013 * src/parse-gram.y (CHARACTER): Remove unused token.
15014 All uses removed.
15015
15016 * src/scan-gram.l: Remove stack option. We no longer use the
15017 stack, since the stack was never deeper than 1; instead, use the
15018 new auto var c_context to record the stacked value.
15019
15020 Remove nounput option. At an unexpected end of file, we now unput
15021 the minimal input necessary to end cleanly; this simplifies the
15022 code.
15023
15024 Avoid unbounded token sizes where this is easy.
15025
15026 (unexpected_end_of_file): New function.
15027 Use it to systematize the error message on unexpected EOF.
15028 (last-string): Now auto, not static.
15029 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15030 (scanner_last_string_free): Remove; not used.
15031 (percent_percent_count): Move decl to just before use.
15032 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15033 not the (never otherwised-used) CHARACTER.
15034
15035 2002-11-07 Akim Demaille <akim@epita.fr>
15036
15037 Let yyerror always receive the msg as last argument, so that
15038 yyerror can be variadic.
15039
15040 * data/yacc.c (b4_yyerror_args): New.
15041 Use it when calling yyerror.
15042 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15043 Use it when calling yyerror.
15044 * doc/bison.texinfo (Error Reporting): Adjust.
15045 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15046 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15047
15048 2002-11-06 Akim Demaille <akim@epita.fr>
15049
15050 #line should have quoted strings.
15051 Ideally, this should be done by m4_quotearg.
15052
15053 * src/scan-skel.l: Include quotearg.h.
15054 Quote __ofile__.
15055 * src/output.c (symbol_printers_output)
15056 (symbol_destructors_output): Quote the file name.
15057
15058 2002-11-06 Akim Demaille <akim@epita.fr>
15059
15060 * tests/regression.at (Invalid inputs): Adjust to the recent
15061 messages.
15062
15063 2002-11-06 Akim Demaille <akim@epita.fr>
15064
15065 Restore --no-lines.
15066 Reported by Jim Kent.
15067
15068 * data/c.m4 (b4_syncline): New.
15069 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15070 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15071 * src/output.c (user_actions_output): Likewise.
15072 (prepare): Define 'b4_synclines_flag'.
15073 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15074
15075 2002-11-06 Akim Demaille <akim@epita.fr>
15076
15077 * src/main.c (main): Free `infile'.
15078 * src/scan-gram.l (handle_syncline): New.
15079 Recognize `#line'.
15080 * src/output.c (user_actions_output, symbol_destructors_output)
15081 (symbol_printers_output): Use the location's file name, not
15082 infile.
15083 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15084
15085 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15086
15087 * src/tables.c (matching_state): Don't allow states to match if
15088 either has GLR conflict entries.
15089
15090 2002-11-05 Paul Eggert <eggert@twinsun.com>
15091
15092 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15093 "integer out of range" rather than "invalid value".
15094 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15095 accordingly.
15096
15097 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15098 Also, remove one static variable in the scanner.
15099
15100 * src/scan-gram.l (braces_level): Now auto, not static.
15101 Initialize to zero if the compiler is being picky.
15102 (INITIAL): Clear braces_level instead of incrementing it.
15103 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15104 as POSIX 1003.1-2001 requires.
15105 * src/system.h (IF_LINT): New macro, taken from coreutils.
15106 * configure.ac: Define "lint" if --enable-gcc-warnings.
15107
15108 2002-11-05 Akim Demaille <akim@epita.fr>
15109
15110 * src/scan-gram.l: When it starts with `%', complain about the
15111 whole directive, not just that `invalid character: %'.
15112
15113 2002-11-04 Akim Demaille <akim@epita.fr>
15114
15115 * Makefile.maint: Update from Autoconf.
15116 (update, cvs-update, po-update, do-po-update): New.
15117
15118 2002-11-04 Akim Demaille <akim@epita.fr>
15119
15120 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15121 and yyerror.
15122 Have yyerror `use' its arguments.
15123 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15124 returns true when location & yacc & pure & parse-param.
15125 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15126
15127 2002-11-04 Akim Demaille <akim@epita.fr>
15128
15129 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15130 clashes.
15131 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15132 font-lock-mode.
15133 Use complain_at.
15134 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15135 slot 0.
15136
15137 2002-11-03 Paul Eggert <eggert@twinsun.com>
15138
15139 * src/reader.c (get_merge_function, grammar_current_rule_check):
15140 Use consistent diagnostics for reporting type name clashes.
15141 Quote the types with <>, for consistency with Yacc.
15142 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15143
15144 2002-11-03 Akim Demaille <akim@epita.fr>
15145
15146 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15147 New.
15148 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15149 (b4_parse_param): Remove.
15150 Use b4_identification.
15151 Propagate b4_pure_args where needed to pass them to yyerror.
15152 * data/glr.m4 (b4_parse_param): Remove.
15153 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15154 (b4_lpure_formals): New.
15155 Use b4_identification.
15156 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15157 b4_user_formals and b4_user_args.
15158 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15159 (yyreportAmbiguity): When using a pure parser, also need
15160 the location, and the parse-params.
15161 Adjust callers.
15162 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15163 When using a pure parser, also need the parse-params.
15164 Adjust callers.
15165 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15166 (%pure-parser + %parse-param) LALR and GLR parsers.
15167 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15168 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15169 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15170 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15171 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15172 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15173 * doc/bison.texinfo: Untabify the whole file.
15174 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15175 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15176 (Error Reporting): Adjust to these new directives.
15177 Document %error-verbose, deprecate YYERROR_VERBOSE.
15178
15179 2002-11-03 Akim Demaille <akim@epita.fr>
15180
15181 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15182 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15183 command line options.
15184 * tests/cxx-type.at: Formatting changes.
15185
15186 2002-11-03 Paul Eggert <eggert@twinsun.com>
15187
15188 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15189 to count columns correctly, and to check for invalid inputs.
15190
15191 Use mbsnwidth to count columns correctly. Account for tabs, too.
15192 Include mbswidth.h.
15193 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15194 (extend_location): New function.
15195 (YY_LINES): Remove.
15196
15197 Handle CRLF in C code rather than in Lex code.
15198 (YY_INPUT): New macro.
15199 (no_cr_read): New function.
15200
15201 Scan UCNs, even though we don't fully handle them yet.
15202 (convert_ucn_to_byte): New function.
15203
15204 Handle backslash-newline correctly in C code.
15205 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15206 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15207 all uses changed.
15208 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15209 Use {splice} wherever C allows backslash-newline.
15210 YY_STEP after space, newline, vertical-tab.
15211 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15212
15213 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15214
15215 ({int}, handle_action_dollar, handle_action_at): Check for integer
15216 overflow.
15217
15218 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15219
15220 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15221 as well as \000. Check for UCHAR_MAX, not 255.
15222 Allow \x with an arbitrary positive number of digits, as in C.
15223 Check for overflow here.
15224 Allow \? and UCNs, for compatibility with C.
15225
15226 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15227 with quote slot used by complain_at.
15228
15229 * tests/input.at: Add tests for backslash-newline, m4 quotes
15230 in symbols, long literals, and funny escapes in strings.
15231
15232 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15233 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15234 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15235 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15236 * m4/mbswidth.m4: New file, from GNU coreutils.
15237
15238 * doc/bison.texinfo (Grammar Outline): Document // comments.
15239 (Symbols): Document that trigraphs have no special meaning in Bison,
15240 nor is backslash-newline allowed.
15241 (Actions): Document that trigraphs have no special meaning.
15242
15243 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15244 no longer used.
15245
15246 2002-11-02 Paul Eggert <eggert@twinsun.com>
15247
15248 * src/reader.c: Don't include quote.h; not needed.
15249 (get_merge_function): Reword warning to be consistent with
15250 type clash diagnostic in grammar_current_rule_check.
15251
15252 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15253 bug in trigraph handling.
15254
15255 * src/output.c (prepare_symbols): When printing token names,
15256 escape "[" as "@<:@" and likewise for "]".
15257
15258 * src/system.h (errno): Remove declaration, as we are now
15259 assuming C89 or better, and C89 guarantees errno.
15260
15261 2002-10-30 Paul Eggert <eggert@twinsun.com>
15262
15263 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15264 Check for close failures.
15265 * src/files.h (xfclose): Return void, not int, since it always
15266 returned zero.
15267 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15268 indicates one.
15269 * src/output.c (output_skeleton): Use xfclose rather than fclose
15270 and ferror. xfclose now checks ferror.
15271
15272 * data/glr.c (YYLEFTMOST_STATE): Remove.
15273 (yyreportTree): Use a stack-based leftmost state. This avoids
15274 our continuing battles with bogus warnings about initializers.
15275
15276 2002-10-30 Akim Demaille <akim@epita.fr>
15277
15278 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15279 #if.
15280
15281 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15282
15283 * tests/glr-regr1.at: New test for reported regressions.
15284 * tests/testsuite.at: Add glr-regr1.at test.
15285 * tests/Makefile.am: Add glr-regr1.at test.
15286
15287 2002-10-24 Paul Eggert <eggert@twinsun.com>
15288
15289 Version 1.75a.
15290
15291 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15292 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15293 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15294 Don't assume strdup exists; POSIX says its an XSI extension.
15295 Check for buffer overflow on input.
15296
15297 2002-10-24 Akim Demaille <akim@epita.fr>
15298
15299 * src/output.c (output_skeleton): Don't disable M4sugar comments
15300 too soon: it results in comments being expanded.
15301 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15302 first output.
15303
15304 2002-10-24 Akim Demaille <akim@epita.fr>
15305
15306 * data/yacc.c (m4_int_type): New.
15307 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15308 char' as only yacc.c wants K&R portability.
15309 * data/glr.c (yysigned_char): Remove.
15310 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15311 Reported by Quoc Peyrot.
15312
15313 2002-10-23 Paul Eggert <eggert@twinsun.com>
15314
15315 * src/main.c (main): With --trace=time, report times even if a
15316 non-fatal error occurs. Formerly, the times were reported in some
15317 such cases but not in others.
15318 * src/reader.c (reader): Just return if a complaint has been issued,
15319 instead of exiting, so that 'main' can report times.
15320
15321 2002-10-22 Akim Demaille <akim@epita.fr>
15322
15323 * src/system.h: Include sys/types.
15324 Reported by Bert Deknuydt.
15325
15326 2002-10-23 Paul Eggert <eggert@twinsun.com>
15327
15328 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15329 Suggested by Art Haas.
15330
15331 2002-10-22 Paul Eggert <eggert@twinsun.com>
15332
15333 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15334 decl; not needed any more.
15335 * src/main.c (main): Use return to exit, undoing yesterday's change.
15336 The last OS that we could find where this wouldn't work is
15337 SunOS 3.5, and that's too old to worry about now.
15338
15339 * data/glr.c (struct yyltype): Define members even when not
15340 doing locations. This is more consistent with yacc.c, and it
15341 works around the following bug reports:
15342 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15343 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15344
15345 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15346 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15347 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15348
15349 2002-10-22 Akim Demaille <akim@epita.fr>
15350
15351 * data/README: New.
15352
15353 2002-10-21 Paul Eggert <eggert@twinsun.com>
15354
15355 Be consistent about 'bool'; the old code used an enum in one
15356 module and an int in another, and this violates the C standard.
15357 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15358 * configure.ac (AC_HEADER_STDBOOL): Add.
15359 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15360 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15361 * src/symtab.c (hash_compare_symbol_t): Likewise.
15362 * src/system.h (bool, false, true): Use a definition consistent
15363 with ../lib/hash.c. All uses changed.
15364
15365 * src/complain.c (warning_issued): Renamed from warn_message_count,
15366 so that we needn't worry about integer overflow (!).
15367 Now of type bool. All uses changed.
15368 (complaint_issued): Renamed from complain_message_count; likewise.
15369
15370 * src/main.c (main): Use exit to exit with failure.
15371
15372 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15373 rather than 1 and 0.
15374 * src/main.c (main): Likewise.
15375 * src/getargs.c (getargs): Likewise.
15376 * src/reader.c (reader): Likewise.
15377
15378 * src/getarg.c (getargs): Remove duplicate code for
15379 "Try `bison --help'".
15380
15381 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15382 What was that "2" for?
15383
15384 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15385 * src/getargs.c (usage): Likewise.
15386
15387 * src/getargs.c (getargs): When there are too few operands, report
15388 the last one. When there are too many, report the first extra
15389 one. This is how diffutils does it.
15390
15391 2002-10-20 Paul Eggert <eggert@twinsun.com>
15392
15393 Remove K&R vestiges.
15394 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15395 * src/complain.c (VA_START): Remove. Assume prototypes.
15396 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15397 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15398 fatal): Assume prototypes.
15399 * src/complain.h: Assume prototypes.
15400 * src/system.h (PARAMS): Remove.
15401 Include <limits.h> unconditionally, since it's guaranteeed even
15402 for a freestanding C89 compiler.
15403 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15404 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15405
15406 2002-10-20 Akim Demaille <akim@epita.fr>
15407
15408 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15409 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15410 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15411 (yyresolveStates, yyresolveAction, yyresolveStack)
15412 (yyprocessOneStack): Use them.
15413 (yy_reduce_print): New.
15414 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15415
15416 2002-10-20 Akim Demaille <akim@epita.fr>
15417
15418 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15419 arguments and output `void'.
15420 (b4_c_function): Rename as...
15421 (b4_c_function_def): this.
15422 (b4_c_function_decl, b4_c_ansi_function_def)
15423 (b4_c_ansi_function_decl): New.
15424 Change the interpretation of the arguments: before `int, foo', now
15425 `int foo, foo'.
15426 * data/yacc.c (yyparse): Prototype and define thanks to these.
15427 Adjust b4_c_function_def uses.
15428 * data/glr.c (yyparse): Likewise, but ANSI only.
15429
15430 2002-10-20 Akim Demaille <akim@epita.fr>
15431
15432 * src/output.c (prepare): Move the definition of `tokens_number',
15433 `nterms_number', `undef_token_number', `user_token_number_max'
15434 to...
15435 (prepare_tokens): Here.
15436 (prepare_tokens): Rename as...
15437 (prepare_symbols): this.
15438 (prepare): Move the definition of `rules_number' to...
15439 (prepare_rules): here.
15440 (prepare): Move the definition of `last', `final_state_number',
15441 `states_number' to...
15442 (prepare_states): here.
15443 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15444
15445 2002-10-20 Akim Demaille <akim@epita.fr>
15446
15447 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15448
15449 2002-10-20 Akim Demaille <akim@epita.fr>
15450
15451 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15452 * data/c.m4: here.
15453
15454 2002-10-20 Akim Demaille <akim@epita.fr>
15455
15456 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15457 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15458 `pair'.
15459 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15460 `name' to...
15461 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15462 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15463 These.
15464
15465 2002-10-19 Paul Eggert <eggert@twinsun.com>
15466
15467 Do not create a temporary file, as that involves security and
15468 cleanup headaches. Instead, use a pair of pipes.
15469 Derived from a suggestion by Florian Krohm.
15470 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15471 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15472 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15473 (BISON_PREREQ_SUBPIPE): Add.
15474 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15475 Add subpipe.h, subpipe.c.
15476 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15477 * po/POTFILES.in: Add lib/subpipe.c.
15478 * src/output.c: Include "subpipe.h".
15479 (m4_invoke): Remove decl.
15480 (scan_skel): New decl.
15481 (output_skeleton): Use pipe rather than temporary file for m4 input.
15482 Check that m4sugar.m4 is readable, to avoid deadlock.
15483 Check for pipe I/O error.
15484 * src/scan-skel.l (readpipe): Remove decl.
15485 (scan_skel): New function, to be used in place of m4_invoke.
15486 Read from stream rather than file.
15487
15488 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15489 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15490 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15491 this generates a more-accurate value anyway.
15492
15493 * lib/timevar.c (timervar_accumulate): Rename locals to
15494 avoid confusion with similarly-named more-global.
15495 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15496
15497 * src/output.c (prepare): Use xstrdup to convert char const *
15498 to char *, to avoid GCC warning.
15499
15500 2002-10-19 Akim Demaille <akim@epita.fr>
15501
15502 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15503 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15504 Use them to have `calc.y' ready for %pure-parser.
15505 * data/yacc.c (YYLEX): Pass a yylex return type to
15506 b4_c_function_call.
15507
15508 2002-10-19 Akim Demaille <akim@epita.fr>
15509
15510 Prototype support of %lex-param and %parse-param.
15511
15512 * src/parse-gram.y: Add the definition of the %lex-param and
15513 %parse-param tokens, plus their rules.
15514 Drop the `_' version of %glr-parser.
15515 Add the "," token.
15516 * src/scan-gram.l (INITIAL): Scan them.
15517 * src/muscle_tab.c: Comment changes.
15518 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15519 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15520 (muscle_entry_s): The `value' member is no longer const.
15521 Adjust all dependencies.
15522 * src/muscle_tab.c (muscle_init): Adjust: use
15523 MUSCLE_INSERT_STRING.
15524 Initialize the obstack earlier.
15525 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15526 (muscle_pair_list_grow): New.
15527 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15528 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15529 * tests/calc.at: Use %locations, not --locations.
15530 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15531
15532 2002-10-19 Akim Demaille <akim@epita.fr>
15533
15534 * src/getargs.c (usage): Take status as argument and exit
15535 accordingly.
15536 Report the traditional `Try ... --help' message when status != 0.
15537 (usage, version): Don't take a FILE * as arg, it is pointless.
15538 (getargs): When there is an incorrect number of arguments, make it
15539 an error, and report it GNUlically thanks to `usage ()'.
15540
15541 2002-10-18 Paul Eggert <eggert@twinsun.com>
15542
15543 * data/glr.c (yyreportParseError): Don't assume that sprintf
15544 yields the length of the printed string, as this is not true
15545 on SunOS 4.1.4. Reported by Peter Klein.
15546
15547 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15548 * tests/conflicts.at (%nonassoc and eof): Likewise.
15549 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15550
15551 2002-10-17 Akim Demaille <akim@epita.fr>
15552
15553 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15554 * src/getargs.c (trace_types, trace_args): Adjust.
15555 * src/reader.c (grammar_current_rule_prec_set)
15556 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15557 Standardize error messages.
15558 And s/@prec/%prec/!
15559 (reader): Use trace_flag to enable scanner/parser debugging,
15560 instead of an adhoc scheme.
15561 * src/scan-gram.l: Remove trailing debugging code.
15562
15563 2002-10-16 Paul Eggert <eggert@twinsun.com>
15564
15565 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15566 MUSCLE_TAB_H.
15567
15568 * NEWS: Officially drop support for building Bison with K&R C,
15569 since it didn't work anyway and it's not worth worrying about.
15570 * Makefile.maint (wget_files): Remove ansi2knr.c.
15571 (ansi2knr.c-url_prefix): Remove.
15572 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15573 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15574 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15575
15576 2002-10-15 Paul Eggert <eggert@twinsun.com>
15577
15578 Stop using the "enum_" trick for K&R-style function definitions;
15579 it confused me, and I was the author! Instead, assume that people
15580 who want to use K&R C compilers (when using these modules in GCC,
15581 perhaps?) will run ansi2knr.
15582
15583 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15584 All uses of "enum_" changed to "enum ".
15585 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15586 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15587
15588 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15589 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15590 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15591 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15592 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15593 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15594 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15595 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15596 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15597 Use function prototypes; this removes the need for declaring
15598 static functions simply to provide their prototypes.
15599 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15600 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15601 bitset_count_, bitset_create, bitset_dump, bitset_first,
15602 bitset_free, bitset_init, bitset_last, bitset_next,
15603 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15604 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15605 bitset_print, bitset_release_memory, bitset_toggle_,
15606 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15607 debug_bitset): Likewise.
15608 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15609 * lib/bitset_stats.c (bitset_log_histogram_print,
15610 bitset_percent_histogram_print, bitset_stats_and,
15611 bitset_stats_and_cmp, bitset_stats_and_or,
15612 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15613 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15614 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15615 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15616 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15617 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15618 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15619 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15620 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15621 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15622 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15623 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15624 bitset_stats_zero): Likewise.
15625 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15626 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15627 bitsetv_dump, debug_bitsetv): Likewise.
15628 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15629 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15630 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15631 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15632 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15633 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15634 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15635 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15636 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15637 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15638 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15639 Likewise.
15640 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15641 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15642 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15643 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15644 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15645 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15646 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15647 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15648 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15649 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15650 lbitset_xor_cmp, lbitset_zero): Likewise.
15651
15652 2002-10-14 Akim Demaille <akim@epita.fr>
15653
15654 Version 1.75.
15655
15656 2002-10-14 Akim Demaille <akim@epita.fr>
15657
15658 * tests/Makefile.am (maintainer-check-posix): New.
15659
15660 2002-10-14 Akim Demaille <akim@epita.fr>
15661
15662 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15663 member.
15664
15665 2002-10-14 Akim Demaille <akim@epita.fr>
15666
15667 * src/tables.c (table_ninf_remap): base -> tab.
15668 Reported by Matt Rosing.
15669
15670 2002-10-14 Paul Eggert <eggert@twinsun.com>
15671
15672 * tests/action.at, tests/calc.at, tests/conflicts.at,
15673 tests/cxx-type.at, tests/headers.at, tests/input.at,
15674 tests/regression.at, tests/synclines.at, tests/torture.at:
15675 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15676 so that the tests still work even if POSIXLY_CORRECT is set.
15677 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15678
15679 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15680 for portability to K&R hosts. Fix typo: signed char is guaranteed
15681 only to 127, not to 128.
15682 * data/glr.c (yysigned_char): New type.
15683 * data/yacc.c (yysigned_char): Likewise.
15684 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15685
15686 2002-10-13 Paul Eggert <eggert@twinsun.com>
15687
15688 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15689 true due to limited range of data type" warning from GCC.
15690
15691 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15692 by wrapping enum yytokentype's definition inside #ifndef
15693 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15694
15695 2002-10-13 Akim Demaille <akim@epita.fr>
15696
15697 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15698 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15699
15700 2002-10-13 Akim Demaille <akim@epita.fr>
15701
15702 * Makefile.maint: Update from Autoconf 2.54.
15703 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15704
15705 2002-10-13 Akim Demaille <akim@epita.fr>
15706
15707 * src/print.c (print_state): Separate the list of solved conflicts
15708 from the other items.
15709 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15710
15711 2002-10-13 Akim Demaille <akim@epita.fr>
15712
15713 Let nondeterministic skeletons be usable with deterministic
15714 tables.
15715
15716 With the patch, GAWK compiled by GCC without -O2 passes its test
15717 suite using a GLR parser driven by LALR tables. It fails with -O2
15718 because `struct stat' gives two different answers on my machine:
15719 88 (definition of an auto var) and later 96 (memset on this var).
15720 Hence the stack is badly corrumpted. The headers inclusion is to
15721 blame: if I move the awk.h inclusion before GLR's system header
15722 inclusion, the two struct stat have the same size.
15723
15724 * src/tables.c (pack_table): Always create conflict_table.
15725 (token_actions): Always create conflict_list.
15726 * data/glr.c (YYFLAG): Remove, unused.
15727
15728 2002-10-13 Akim Demaille <akim@epita.fr>
15729
15730 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15731 (O0FLAGS): New.
15732 (VALGRIND, GXX): New.
15733 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15734 * tests/bison.in: Run $PREBISON a pre-command.
15735 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15736 (maintainer-check-g++): New.
15737 * Makefile.am (maintainer-check): New.
15738
15739 2002-10-13 Akim Demaille <akim@epita.fr>
15740
15741 * data/glr.c: Formatting changes.
15742 Tweak some trace messages to match yacc.c's.
15743
15744 2002-10-13 Akim Demaille <akim@epita.fr>
15745
15746 GLR parsers sometimes raise parse errors instead of performing the
15747 default reduction.
15748 Reported by Charles-Henry de Boysson.
15749
15750 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15751 check the length of the traces when %glr.
15752 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15753 GLR's traces.
15754 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15755 Test GLR parsers.
15756 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15757 (yyltype): Remove the yy prefix from the member names.
15758 (yytable): Complete its comment.
15759 (yygetLRActions): Map error action number from YYTABLE from
15760 YYTABLE_NINF to 0.
15761 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15762 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15763 not satisfying as we could compare an YYACTION computed from
15764 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15765 only value for error actions.
15766 (yyreportParseError): In verbose parse error messages, don't issue
15767 `error' in the list of expected tokens.
15768 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15769 next action to perform to match glr.c's decoding.
15770 (yytable): Complete its comment.
15771
15772 2002-10-13 Paul Eggert <eggert@twinsun.com>
15773
15774 Fix problem reported by Henrik Grubbstroem in
15775 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15776 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15777 because the Bison parser reads the second action before reducing
15778 the first one.
15779 * src/scan-gram.l (rule_length): New static var.
15780 Use it to keep track of the rule length in the scanner, since
15781 we can't expect the parser to be in lock-step sync with the scanner.
15782 (handle_action_dollar, handle_action_at): Use this var.
15783 * tests/actions.at (Exotic Dollars): Test for the problem.
15784
15785 2002-10-12 Paul Eggert <eggert@twinsun.com>
15786
15787 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15788 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15789 Include <sys/time.h> when checking for clock_t and struct tms.
15790 Use same include order as source.
15791 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15792 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15793
15794 * lib/timevar.c: Update copyright date and clarify comments.
15795 (get_time) [IN_GCC]: Keep the GCC version for reference.
15796
15797 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15798 GCC version as of today, then merge Bison's changes.
15799 Change "GCC" to "Bison" in copyright notice. timevar.def's
15800 author is Akim, so change that too.
15801
15802 * src/reader.c (grammar_current_rule_check):
15803 Don't worry about the default action if $$ is untyped.
15804 Prevents bogus warnings reported by Jim Gifford in
15805 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15806
15807 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15808 * data/glr.c, data/lalr1.cc, data/yacc.c:
15809 Output token definitions before the first part of user declarations.
15810 Fixes compatibility problem reported by Jim Gifford for kbd in
15811 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15812
15813 2002-10-11 Paul Eggert <eggert@twinsun.com>
15814
15815 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15816 (yyparse): here. This undoes some of the 2002-07-25 change.
15817 Compatibility problem reported by Ralf S. Engelschall with
15818 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15819
15820 2002-10-11 Akim Demaille <akim@epita.fr>
15821
15822 * tests/regression.at Characters Escapes): New.
15823 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15824 characters.
15825 Reported by Jan Nieuwenhuizen.
15826
15827 2002-10-11 Akim Demaille <akim@epita.fr>
15828
15829 * po/id.po: New.
15830
15831 2002-10-10 Paul Eggert <eggert@twinsun.com>
15832
15833 Portability fixes for bitsets; this also avoids several GCC
15834 warnings.
15835
15836 * lib/abitset.c: Include <stddef.h>, for offsetof.
15837 * lib/lbitset.c: Likewise.
15838
15839 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15840 properly for vectors of objects. Do not assume that adding a
15841 header size to a multiple of a word size yields a value that is
15842 properly aligned for the whole union.
15843 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15844
15845 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15846 unique names for structures.
15847 * lib/ebitset.c (ebitset_bytes): Likewise.
15848 * lib/lbitset.c (lbitset_bytes): Likewise.
15849
15850 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15851 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15852 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15853 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15854 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15855 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15856 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15857 to improve the type-checking that GCC can do.
15858 * lib/bitset.c (bitset_op4_cmp): Likewise.
15859 * lib/bitset_stats.c (bitset_stats_count,
15860 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15861 bitset_stats_copy, bitset_stats_disjoint_p,
15862 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15863 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15864 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15865 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15866 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15867 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15868 bitset_stats_or_and_cmp): Likewise.
15869 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15870 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15871 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15872 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15873
15874 * lib/abitset.h: Include bitset.h, not bbitset.h.
15875 * lib/ebitset.h: Likewise.
15876 * lib/lbitset.h: Likewise.
15877
15878 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15879 All instances of parameters of type enum bitset_opts are now of
15880 type enum_bitset_opts, to conform to the C Standard, and similarly
15881 for enum_bitset_type.
15882 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15883 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15884
15885 Do not use "struct bitset_struct" to mean different things in
15886 different modules. Not only is this confusing, it violates
15887 the C Standard, which requires that structure types in different
15888 modules must be compatible if one is to be passed to the other.
15889 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15890 All instances of "struct bitset_struct *" replaced with "bitset".
15891 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15892 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15893 struct lbitset_struct, struct bitset_stats_struct): New types.
15894 All uses of struct bitset_struct changed to union bitset_union,
15895 etc.
15896 * lib/abitset.c (struct abitset_struct, abitset,
15897 struct bitset_struct): Remove.
15898 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15899 struct bitset_struct): Remove.
15900 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15901 bitset_struct): Remove.
15902 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15903 Likewise.
15904
15905 Do not call a function of type T using a call that assumes the
15906 function is of a different type U. Standard C requires that a
15907 function must be called with a type that is compatible with its
15908 definition.
15909 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15910 New decls.
15911 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15912 New functions.
15913 * lib/ebitset.c (PFV): Remove.
15914 * lib/lbitset.c (PFV): Likewise.
15915 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15916 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15917 decls.
15918 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15919 (ebitset_vtable): Use them.
15920 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15921 lbitset_xor): New functions.
15922 (lbitset_vtable): Use them.
15923
15924 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15925 Declare.
15926
15927 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15928 GCC warning.
15929 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15930 Use offsetof, for simplicity.
15931
15932 2002-10-06 Paul Eggert <eggert@twinsun.com>
15933
15934 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15935 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15936 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15937 which was inadvertently undone by the 2002-09-30 patch.
15938 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15939 the same width as int.
15940
15941 2002-10-04 Paul Eggert <eggert@twinsun.com>
15942
15943 Version 1.50.
15944
15945 * configure.ac (AC_INIT), NEWS: Increment version number.
15946
15947 * doc/bison.texinfo: Minor spelling, grammar, and white space
15948 fixes.
15949 (Symbols): Mention that any negative value returned from yylex
15950 signifies end-of-input. Warn about negative chars. Mention
15951 the portable Standard C character set.
15952
15953 The GNU coding standard says CFLAGS and YFLAGS are reserved
15954 for the installer to set.
15955 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15956 * src/Makefile.am (AM_CFLAGS): Likewise.
15957 (AM_YFLAGS): Renamed from YFLAGS.
15958
15959 Fix some MAX and MIN problems.
15960 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15961 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15962 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15963 * src/reader.c (reader): Use it.
15964
15965 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15966 POSIX 1003.1-2001 has removed fgrep.
15967
15968 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15969
15970 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15971 interpreted as signed.
15972 * lib/ebitset.c (ebitset_list): Fix bug.
15973
15974 2002-10-01 Paul Eggert <eggert@twinsun.com>
15975
15976 More fixes for 64-bit hosts and large bitsets.
15977
15978 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15979 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15980 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15981 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15982 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15983 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15984 bitset_count_): Likewise.
15985 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15986 bitset_first, bitset_last): Likewise.
15987 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15988 bitset_stats_list_reverse, bitset_stats_size,
15989 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15990 Likewise.
15991 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15992 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15993 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15994 bitsetv_reflexive_transitive_closure): Likewise.
15995 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15996 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15997 Likewise.
15998 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15999 Likewise.
16000
16001 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16002 Use size_t, not unsigned int, to count bytes.
16003 * lib/abitset.h (abitset_bytes): Likewise.
16004 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16005 Likewise.
16006 * lib/bitset.h (bitset_bytes): Likewise.
16007 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16008 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16009 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16010 * lib/ebitset.c (ebitset_bytes): Likewise.
16011 * lib/ebitset.h (ebitset_bytes): Likewise.
16012 * lib/lbitset.c (lbitset_bytes): Likewise.
16013 * lib/lbitset.h (lbitset_bytes): Likewise.
16014
16015 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16016 abitset_subset_p, abitset_disjoint_p, abitset_and,
16017 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16018 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16019 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16020 abitset_or_and, abitset_or_and_cmp):
16021 Use bitset_windex instead of unsigned int.
16022 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16023 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16024 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16025 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16026 Likewise.
16027 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16028
16029 * lib/bitset.c (bitset_print):
16030 Use proper printf formats for widths of integer types.
16031 * lib/bitset_stats.c (bitset_percent_histogram_print,
16032 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16033 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16034 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16035 * lib/lbitset.c (lbitset_bytes): Likewise.
16036
16037 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16038 BITSET_SIZE_MAX): New macros.
16039 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16040 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16041 to BITSET_WINDEX_MAX.
16042
16043 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16044 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16045 since we now return the bitset_bindex type (not int).
16046
16047 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16048 when computing sizes.
16049 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16050
16051 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16052 and avoid cast to unsigned.
16053
16054 2002-09-30 Akim Demaille <akim@epita.fr>
16055
16056 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16057 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16058 Updates from Michael Hayes.
16059
16060 2002-09-30 Art Haas <ahaas@neosoft.com>
16061
16062 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16063 invocations.
16064 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16065 defined.
16066
16067 2002-09-27 Akim Demaille <akim@epita.fr>
16068
16069 Version 1.49c.
16070
16071 2002-09-27 Akim Demaille <akim@epita.fr>
16072
16073 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16074 (Because of AC_LIBSOURCE).
16075
16076 2002-09-27 Akim Demaille <akim@epita.fr>
16077
16078 Playing with Autoscan.
16079
16080 * configure.ac: Remove the old LIBOBJ tweaks.
16081 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16082 * lib/strrchr.c: New.
16083 * lib/strtol.c: New, from the Coreutils 4.5.1.
16084
16085 2002-09-27 Akim Demaille <akim@epita.fr>
16086
16087 Playing with Autoscan.
16088
16089 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16090 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16091 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16092 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16093 Coreutils 4.5.1.
16094
16095 2002-09-24 Akim Demaille <akim@epita.fr>
16096
16097 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16098 (Frequently Asked Questions, Parser Stack Overflow): New.
16099
16100 2002-09-13 Akim Demaille <akim@epita.fr>
16101
16102 Playing with autoscan.
16103
16104 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16105 * src/files.c (skeleton_find): Remove, unused.
16106 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16107 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16108
16109 2002-09-13 Akim Demaille <akim@epita.fr>
16110
16111 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16112 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16113
16114 2002-09-13 Akim Demaille <akim@epita.fr>
16115
16116 * configure.ac: Require 2.54.
16117 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16118 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16119 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16120 Remove, provided by Autoconf macros.
16121
16122 2002-09-12 Akim Demaille <akim@epita.fr>
16123
16124 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16125
16126 2002-09-12 Akim Demaille <akim@epita.fr>
16127
16128 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16129 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16130 Reported by Martin Mokrejs.
16131
16132 2002-09-10 Akim Demaille <akim@epita.fr>
16133
16134 * src/parse-gram.y: Associate a human readable string to each
16135 token type.
16136 * tests/regression.at (Invalid inputs): Adjust.
16137
16138 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16139
16140 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16141 with an Autoconf-2.5x style configure.ac.
16142
16143 2002-09-06 Paul Eggert <eggert@twinsun.com>
16144
16145 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16146 exception applies only to yacc.c. This is a modification of a
16147 patch originally suggested by Akim Demaille.
16148
16149 2002-09-06 Akim Demaille <akim@epita.fr>
16150
16151 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16152 here to...
16153 * data/yacc.c: here.
16154
16155 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16156 LocationType.
16157 (b4_ltype): Default to yy::Location from location.hh.
16158
16159 2002-09-04 Jim Meyering <jim@meyering.net>
16160
16161 * data/yacc.c: Guard the declaration of yytoknum also with
16162 `#ifdef YYPRINT', so it is declared only when used.
16163
16164 2002-09-04 Akim Demaille <akim@epita.fr>
16165
16166 * configure.in: Rename as...
16167 * configure.ac: this.
16168 Bump to 1.49c.
16169
16170 2002-09-04 Akim Demaille <akim@epita.fr>
16171
16172 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16173 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16174 translate maintainer only messages.
16175
16176 2002-08-12 Paul Eggert <eggert@twinsun.com>
16177
16178 Version 1.49b.
16179
16180 * Makefile.am (SUBDIRS): Remove intl.
16181 (DISTCLEANFILES): Remove.
16182 * NEWS: Mention that GNU M4 is now required. Clarify what is
16183 meant by "larger grammars". Mention the pt_BR translation.
16184 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16185 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16186 Bump version from 0.11.2 to 0.11.5.
16187 (BISON_PREREQ_STAGE): Remove.
16188 (AM_GNU_GETTEXT): Use external gettext.
16189 (AC_OUTPUT): Remove intl/Makefile.
16190
16191 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16192
16193 * data/glr.c: Include string.h, for strlen.
16194 (yyreportParseError): Use size_t for yysize.
16195 (yy_yypstack): No longer nested inside yypstates, as nested
16196 functions are not portable. Do not assume size_t is the
16197 same width as int.
16198 (yypstates): Do not assume that ptrdiff_t is the same width
16199 as int, and similarly for yyposn and YYINDEX.
16200
16201 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16202
16203 * lib/Makefile.am (INCLUDES): Do not include from the intl
16204 directory, which has been removed.
16205 * src/Makefile.am (INCLUDES): Likewise.
16206
16207 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16208 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16209 New vars.
16210
16211 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16212 * tests/Makefile.am (EXTRA_DIST): Likewise.
16213
16214 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16215 Do not assume that bitset_windex is the same width as unsigned.
16216
16217 * lib/abitset.c (abitset_unused_clear): Do not assume that
16218 bitset_word is the same width as int.
16219 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16220 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16221 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16222 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16223 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16224
16225 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16226 portability to one's complement hosts!).
16227 * lib/ebitset.c (ebitset_op1): Likewise.
16228 * lib/lbitset.c (lbitset_op1): Likewise.
16229
16230 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16231 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16232 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16233 Sync with fileutils.
16234 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16235 lib/gettext.h: Sync with diffutils.
16236
16237 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16238 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16239
16240 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16241 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16242 check for void *.
16243
16244 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16245 size_t; the old version tried to do this but casted improperly.
16246 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16247 (bitset_test): Now returns int, not unsigned long.
16248
16249 * lib/bitset_stats.c: Include "gettext.h".
16250 (_): New macro.
16251 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16252 name locals "index", as it generates unnecessary warnings on some
16253 hosts that have an "index" function.
16254
16255 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16256 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16257 they need translation.
16258 * src/LR0.c (state_list_append, new_itemsets, get_state,
16259 append_states, generate_states): Likewise.
16260 * src/assoc.c (assoc_to_string): Likewise.
16261 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16262 * src/gram.c (grammar_dump): Likewise.
16263 * src/injections.c (injections_compute): Likewise.
16264 * src/lalr.c (lookaheads_print): Likewise.
16265 * src/relation.c (relation_transpose): Likewise.
16266 * src/scan-gram.l: Likewise.
16267 * src/tables.c (table_grow, pack_vector): Likewise.
16268
16269 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16270 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16271 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16272 * m4/mbstate_t.m4: Sync with fileutils.
16273 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16274
16275 * po/LINGUAS: Add pt_BR.
16276 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16277 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16278 lib/timevar.c.
16279 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16280 manual recommends.
16281 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16282
16283 * src/complain.c (strerror_r): Remove decl; not needed.
16284 (strerror): Use same pattern as ../lib/error.c.
16285
16286 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16287
16288 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16289
16290 * src/main.c (main): Cast result of bindtextdomain and textdomain
16291 to void, to avoid a GCC warning when --disable-nls is in effect.
16292
16293 * src/scan-gram.l: Use strings rather than escapes when possible,
16294 to minimize the number of warnings from xgettext.
16295 (handle_action_dollar, handle_action_at): Don't use isdigit,
16296 as it mishandles negative chars and it may not work as expected
16297 outside the C locale.
16298
16299 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16300 this is a GCC extension and is not portable to other compilers.
16301
16302 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16303 Do not include <ctype.h>; no longer needed.
16304 Do not include <malloc.h>; no longer needed (and generates
16305 warnings on OpenBSD 3.0).
16306
16307 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16308 it's not portable.
16309
16310 * tests/regression.at: Do not use 'cc -c input.c -o input';
16311 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16312
16313 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16314 exit status as failure, not just exit status 1. Sun C exits
16315 with status 2 sometimes.
16316
16317 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16318 Use it for the two large tests.
16319
16320 2002-08-02 Akim Demaille <akim@epita.fr>
16321
16322 * src/conflicts.c (conflicts_output): Don't output rules never
16323 reduced here, since anyway that computation doesn't work.
16324 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16325 (rule_useless_p, rule_never_reduced_p): New.
16326 (grammar_rules_partial_print): Use a filter instead of a range.
16327 Display the title only if needed.
16328 (grammar_rules_print): Adjust.
16329 (grammar_rules_never_reduced_report): New.
16330 * src/tables.c (action_row): Move the computation of rules never
16331 reduced to...
16332 (token_actions): here.
16333 * src/main.c (main): Make the parser before making the report, so
16334 that rules never reduced are computed.
16335 Call grammar_rules_never_reduced_report.
16336 * src/print.c (print_results): Report rules never reduced.
16337 * tests/conflicts.at, tests/reduce.at: Adjust.
16338
16339 2002-08-01 Akim Demaille <akim@epita.fr>
16340
16341 Instead of attaching lookaheads and duplicating the rules being
16342 reduced by a state, attach the lookaheads to the reductions.
16343
16344 * src/state.h (state_t): Remove the `lookaheads',
16345 `lookaheads_rule' member.
16346 (reductions_t): Add a `lookaheads' member.
16347 Use a regular array for the `rules'.
16348 * src/state.c (reductions_new): Initialize the lookaheads member
16349 to 0.
16350 (state_rule_lookaheads_print): Adjust.
16351 * src/state.h, src/state.c (state_reductions_find): New.
16352 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16353 (count_rr_conflicts): Adjust.
16354 * src/lalr.c (LArule): Remove.
16355 (add_lookback_edge): Adjust.
16356 (state_lookaheads_count): New.
16357 (states_lookaheads_initialize): Merge into...
16358 (initialize_LA): this.
16359 (lalr_free): Adjust.
16360 * src/main.c (main): Don't free nullable and derives too early: it
16361 is used by --verbose.
16362 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16363
16364 2002-08-01 Akim Demaille <akim@epita.fr>
16365
16366 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16367 `rule_number_t**'.
16368 (set_derives, free_derives): Rename as...
16369 (derives_compute, derives_free): this.
16370 Adjust all dependencies.
16371 * src/nullable.c (set_nullable, free_nullable): Rename as...
16372 (nullable_compute, nullable_free): these.
16373 (rule_list_t): Store rule_t *, not rule_number_t.
16374 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16375 pointers, instead of their numbers.
16376 * src/main.c (main): Call nullable_free, and derives_free earlier,
16377 as they were lo longer used.
16378
16379 2002-08-01 Akim Demaille <akim@epita.fr>
16380
16381 * lib/timevar.c (get_time): Include children time.
16382 * src/lalr.h (LA, LArule): Don't export them: used with the
16383 state_t.
16384 * src/lalr.c (LA, LArule): Static.
16385 * src/lalr.h, src/lalr.c (lalr_free): New.
16386 * src/main.c (main): Call it.
16387 * src/tables.c (pack_vector): Check whether loc is >= to the
16388 table_size, not >.
16389 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16390 (tables_generate): do it, since that's also it which allocates
16391 them.
16392 Don't free LA and LArule, main does.
16393
16394 2002-07-31 Akim Demaille <akim@epita.fr>
16395
16396 Separate parser tables computation and output.
16397
16398 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16399 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16400 (yydefgoto, yydefact, high): Move to...
16401 * src/tables.h, src/tables.c: here.
16402 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16403 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16404 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16405 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16406 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16407 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16408 (action_row, save_row, token_actions, save_column, default_goto)
16409 (goto_actions, sort_actions, matching_state, pack_vector)
16410 (table_ninf_remap, pack_table, prepare_actions): Move to...
16411 * src/tables.c: here.
16412 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16413 * src/output.c (token_actions, output_base, output_conflicts)
16414 (output_check): Merge into...
16415 (prepare_actions): this.
16416 (actions_output): Rename as...
16417 (user_actions_output): this.
16418 * src/main.c (main): Call tables_generate and tables_free.
16419
16420 2002-07-31 Akim Demaille <akim@epita.fr>
16421
16422 Steal GCC's --time-report support.
16423
16424 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16425 stolen/adjusted from GCC.
16426 * m4/stage.m4: Remove time related checks.
16427 * m4/timevar.m4: New.
16428 * configure.in: Adjust.
16429 * src/system.h: Adjust to using timevar.h.
16430 * src/getargs.h, src/getargs.c: Support trace_time for
16431 --trace=time.
16432 * src/main.c (stage): Remove.
16433 (main): Replace `stage' invocations with timevar calls.
16434 * src/output.c: Insert pertinent timevar calls.
16435
16436 2002-07-31 Akim Demaille <akim@epita.fr>
16437
16438 Let --trace have arguments.
16439
16440 * src/getargs.h (enum trace_e): New.
16441 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16442 (long_options, short_options): --trace/-T takes an optional
16443 argument.
16444 Change all the uses of trace_flag to reflect the new flags.
16445 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16446
16447 Strengthen `stage' portability.
16448
16449 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16450 * configure.in: Use it.
16451 Don't check for malloc.h and sys/times.h.
16452 * src/system.h: Include them when appropriate.
16453 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16454 times and struct tms are available.
16455
16456 2002-07-30 Akim Demaille <akim@epita.fr>
16457
16458 In verbose parse error message, don't report `error' as an
16459 expected token.
16460 * tests/actions.at (Printers and Destructors): Adjust.
16461 * tests/calc.at (Calculator $1): Adjust.
16462 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16463 error message, do not report the parser accepts the error token in
16464 that state.
16465
16466 2002-07-30 Akim Demaille <akim@epita.fr>
16467
16468 Normalize conflict related messages.
16469
16470 * src/complain.h, src/complain.c (warn, complain): New.
16471 * src/conflicts.c (conflicts_print): Use them.
16472 (conflict_report_yacc): New, extracted from...
16473 (conflicts_print): here.
16474 * tests/conflicts.at, tests/existing.at: Adjust.
16475
16476 2002-07-30 Akim Demaille <akim@epita.fr>
16477
16478 Report rules which are never reduced by the parser: those hidden
16479 by conflicts.
16480
16481 * src/LR0.c (save_reductions): Don't make the final state too
16482 different: save its reduction (accept) instead of having a state
16483 without any action (no shift or goto, no reduce).
16484 Note: the final state is now a ``regular'' state, i.e., the
16485 parsers now contain `reduce 0' as default reduction.
16486 Nevertheless, since they decide to `accept' when yystate =
16487 final_state, they still will not reduce rule 0.
16488 * src/print.c (print_actions, print_reduction): Adjust.
16489 * src/output.c (action_row): Track reduced rules.
16490 (token_actions): Report rules never reduced.
16491 * tests/conflicts.at, tests/regression.at: Adjust.
16492
16493 2002-07-30 Akim Demaille <akim@epita.fr>
16494
16495 `stage' was accidently included in a previous patch.
16496 Initiate its autoconfiscation.
16497
16498 * configure.in: Look for malloc.h and sys/times.h.
16499 * src/main.c (stage): Adjust.
16500 Report only when trace_flag.
16501
16502 2002-07-29 Akim Demaille <akim@epita.fr>
16503
16504 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16505 state_number_t.
16506 (errs_t): symbol_t*, not symbol_number_t.
16507 (reductions_t): rule_t*, not rule_number_t.
16508 (FOR_EACH_SHIFT): New.
16509 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16510 * src/print.c, src/print_graph.c: Adjust.
16511
16512 2002-07-29 Akim Demaille <akim@epita.fr>
16513
16514 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16515
16516 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16517 (endtoken, accept): these.
16518 * src/reader.c (reader): Set endtoken's default tag to "$end".
16519 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16520 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16521 Adjust.
16522
16523 2002-07-29 Akim Demaille <akim@epita.fr>
16524
16525 * src/reduce.c (reduce_grammar): When the language is empty,
16526 complain about the start symbol, not the axiom.
16527 Use its location.
16528 * tests/reduce.at (Empty Language): New.
16529
16530 2002-07-26 Akim Demaille <akim@epita.fr>
16531
16532 * src/reader.h, src/reader.c (gram_error): ... can't get
16533 yycontrol without making too strong assumptions on the parser
16534 itself.
16535 * src/output.c (prepare_tokens): Use the real 0th value of
16536 token_translations instead of `0'.
16537 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16538 visible here.
16539 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16540 for the time being: %locations ought to provide it to yyerror.
16541
16542 2002-07-25 Akim Demaille <akim@epita.fr>
16543
16544 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16545 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16546 * tests/regression.at (Web2c Actions): Adjust.
16547
16548 2002-07-25 Akim Demaille <akim@epita.fr>
16549
16550 Stop storing rules from 1 to nrules + 1.
16551
16552 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16553 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16554 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16555 Iterate from 0 to nrules.
16556 Use rule_number_as_item_number and item_number_as_rule_number.
16557 Adjust to `derive' now containing possibly 0.
16558 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16559 Handle the `- 1' part in rule numbers from/to item numbers.
16560 * src/conflicts.c (log_resolution): Fix the message which reversed
16561 shift and reduce.
16562 * src/output.c (action_row): Initialize default_rule to -1.
16563 (token_actions): Adjust.
16564 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16565 expected output.
16566 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16567
16568 2002-07-25 Akim Demaille <akim@epita.fr>
16569
16570 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16571 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16572 (b4_c_knr_arg_decl): New.
16573 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16574 yyreport_parse_error.
16575
16576 2002-07-25 Akim Demaille <akim@epita.fr>
16577
16578 * data/yacc.c (yyreport_parse_error): New, extracted from...
16579 (yyparse): here.
16580 (yydestruct, yysymprint): Move above yyparse.
16581 Be K&R compliant.
16582
16583 2002-07-25 Akim Demaille <akim@epita.fr>
16584
16585 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16586 replace...
16587 (b4_sint_type, b4_uint_type): these.
16588 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16589 * tests/regression.at (Web2c Actions): Adjust.
16590
16591 2002-07-25 Akim Demaille <akim@epita.fr>
16592
16593 * src/gram.h (TIEM_NUMBER_MAX): New.
16594 (item_number_of_rule_number, rule_number_of_item_number): Rename
16595 as...
16596 (rule_number_as_item_number, item_number_as_rule_number): these.
16597 Adjust dependencies.
16598 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16599 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16600 (symbol_number_to_vector_number): New.
16601 (order): Of vector_number_t* type.
16602 (base_t, BASE_MAX, BASE_MIN): New.
16603 (froms, tos, width, pos, check): Of base_t type.
16604 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16605 (actrow): Of action_number_t type.
16606 (conflrow): Of unsigned int type.
16607 (table_ninf, base_ninf): New.
16608 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16609 (muscle_insert_int_table, muscle_insert_base_table)
16610 (muscle_insert_rule_number_table): New.
16611 (prepare_tokens): Output `toknum' as int_table.
16612 (action_row): Returns a rule_number_t.
16613 Use ACTION_MIN, not SHRT_MIN.
16614 (token_actions): yydefact is rule_number_t*.
16615 (table_ninf_remap): New.
16616 (pack_table): Use it for `base' and `table'.
16617 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16618 replaced with...
16619 (YYPACT_NINF, YYTABLE_NINF): these.
16620 (yypact, yytable): Compute their types instead of hard-coded
16621 `short'.
16622 * tests/regression.at (Web2c Actions): Adjust.
16623
16624 2002-07-19 Akim Demaille <akim@epita.fr>
16625
16626 * src/scan-gram.l (id): Can start with an underscore.
16627
16628 2002-07-16 Akim Demaille <akim@epita.fr>
16629
16630 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16631 Adjust all former `associativity' dependencies.
16632 * src/symtab.c (symbol_new): Default associativity is `undef', not
16633 `right'.
16634 (symbol_check_alias_consistence): Adjust.
16635
16636 2002-07-09 Akim Demaille <akim@epita.fr>
16637
16638 * doc/bison.texinfo: Properly set the ``header'' part.
16639 Use @dircategory ``GNU programming tools'' as per Texinfo's
16640 documentation.
16641 Use @copying.
16642
16643 2002-07-09 Akim Demaille <akim@epita.fr>
16644
16645 * lib/quotearg.h: Protect against multiple inclusions.
16646 * src/location.h (location_t): Add a `file' member.
16647 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16648 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16649 `error_one_per_line' support.
16650
16651 2002-07-09 Akim Demaille <akim@epita.fr>
16652
16653 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16654 * src/reader.c (lineno): Remove.
16655 Adjust all dependencies.
16656 (get_merge_function): Take a location and use complain_at.
16657 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16658 * tests/regression.at (Invalid inputs, Mixing %token styles):
16659 Adjust.
16660
16661 2002-07-09 Akim Demaille <akim@epita.fr>
16662
16663 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16664 recovery rule, and forbid extensions when --yacc.
16665 (gram_error): Use complain_at.
16666 * src/reader.c (reader): Exit if there were parse errors.
16667
16668 2002-07-09 Akim Demaille <akim@epita.fr>
16669
16670 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16671 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16672 Reported by R Blake <blakers@mac.com>.
16673
16674 2002-07-09 Akim Demaille <akim@epita.fr>
16675
16676 * data/yacc.c: Output the copyright notive in the header.
16677
16678 2002-07-03 Akim Demaille <akim@epita.fr>
16679
16680 * src/output.c (froms, tos): Are state_number_t.
16681 (save_column): sp, sp1, and sp2 are state_number_t.
16682 (prepare): Rename `final' as `final_state_number', `nnts' as
16683 `nterms_number', `nrules' as `rules_number', `nstates' as
16684 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16685 unused.
16686 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16687 * data/lalr1.cc (nsym_): Remove, unused.
16688
16689 2002-07-03 Akim Demaille <akim@epita.fr>
16690
16691 * src/lalr.h, src/lalr.c (goto_number_t): New.
16692 * src/lalr.c (goto_list_t): New.
16693 Propagate them.
16694 * src/nullable.c (rule_list_t): New.
16695 Propagate.
16696 * src/types.h: Remove.
16697
16698 2002-07-03 Akim Demaille <akim@epita.fr>
16699
16700 * src/closure.c (print_fderives): Use rule_rhs_print.
16701 * src/derives.c (print_derives): Use rule_rhs_print.
16702 (rule_list_t): New, replaces `shorts'.
16703 (set_derives): Add comments.
16704 * tests/sets.at (Nullable, Firsts): Adjust.
16705
16706 2002-07-03 Akim Demaille <akim@epita.fr>
16707
16708 * src/output.c (prepare_actions): Free `tally' and `width'.
16709 (prepare_actions): Allocate and free `order'.
16710 * src/symtab.c (symbols_free): Free `symbols'.
16711 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16712 * src/output.c (m4_invoke): Move to...
16713 * src/scan-skel.l: here.
16714 (<<EOF>>): Close yyout, and free its name.
16715
16716 2002-07-03 Akim Demaille <akim@epita.fr>
16717
16718 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16719
16720 * src/LR0.c (new_state): Merge into...
16721 (state_list_append): this.
16722 (new_states): Merge into...
16723 (generate_states): here.
16724 (set_states): Don't ensure a proper `errs' state member here, do it...
16725 * src/conflicts.c (conflicts_solve): here.
16726 * src/state.h, src/state.c: Comment changes.
16727 (state_t): Rename member `shifts' as `transitions'.
16728 Adjust all dependencies.
16729 (errs_new): For consistency, also take the values as argument.
16730 (errs_dup): Remove.
16731 (state_errs_set): New.
16732 (state_reductions_set, state_transitions_set): Assert that no
16733 previous value was assigned.
16734 (state_free): New.
16735 (states_free): Use it.
16736 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16737 temporary storage: use `errs' and `nerrs' as elsewhere.
16738 (set_conflicts): Allocate and free this `errs'.
16739
16740 2002-07-02 Akim Demaille <akim@epita.fr>
16741
16742 * lib/libiberty.h: New.
16743 * lib: Update the bitset implementation from upstream.
16744 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16745 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16746 * src/main.c: Adjust bitset stats calls.
16747
16748 2002-07-01 Paul Eggert <eggert@twinsun.com>
16749
16750 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16751 char, so that negative chars don't collide with $.
16752
16753 2002-06-30 Akim Demaille <akim@epita.fr>
16754
16755 Have the GLR tests be `warning' checked, and fix the warnings.
16756
16757 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16758 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16759 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16760 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16761 (yyaddDeferredAction): static.
16762 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16763 (yyreportParseError): yyprefix is const.
16764 yytokenp is used only when verbose.
16765 (yy__GNUC__): Replace with __GNUC__.
16766 (yypdumpstack): yyi is size_t.
16767 (yypreference): Un-yy local variables and arguments, to avoid
16768 clashes with `yyr1'. Anyway, we are not in the user name space.
16769 (yytname_size): be an int, as is compared with ints.
16770 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16771 Use them.
16772 * tests/cxx-gram.at: Use quotation to protect $1.
16773 Use AT_COMPILE to enable warnings hunts.
16774 Prototype yylex and yyerror.
16775 `Use' argc.
16776 Include `string.h', not `strings.h'.
16777 Produce and prototype stmtMerge only when used.
16778 yylex takes a location.
16779
16780 2002-06-30 Akim Demaille <akim@epita.fr>
16781
16782 We spend a lot of time in quotearg, in particular when --verbose.
16783
16784 * src/symtab.c (symbol_get): Store a quoted version of the key.
16785 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16786 Adjust all callers.
16787
16788 2002-06-30 Akim Demaille <akim@epita.fr>
16789
16790 * src/state.h (reductions_t): Rename member `nreds' as num.
16791 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16792 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16793
16794 2002-06-30 Akim Demaille <akim@epita.fr>
16795
16796 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16797 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16798 (shifts_to): Rename as...
16799 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16800 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16801 (TRANSITION_IS_DISABLED, transitions_to): these.
16802
16803 2002-06-30 Akim Demaille <akim@epita.fr>
16804
16805 * src/print.c (print_shifts, print_gotos): Merge into...
16806 (print_transitions): this.
16807 (print_transitions, print_errs, print_reductions): Align the
16808 lookaheads columns.
16809 (print_core, print_transitions, print_errs, print_state,
16810 print_grammar): Output empty lines separator before, not after.
16811 (state_default_rule_compute): Rename as...
16812 (state_default_rule): this.
16813 * tests/conflicts.at (Defaulted Conflicted Reduction),
16814 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16815 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16816
16817 2002-06-30 Akim Demaille <akim@epita.fr>
16818
16819 Display items as we display rules.
16820
16821 * src/gram.h, src/gram.c (rule_lhs_print): New.
16822 * src/gram.c (grammar_rules_partial_print): Use it.
16823 * src/print.c (print_core): Likewise.
16824 * tests/conflicts.at (Defaulted Conflicted Reduction),
16825 (Unresolved SR Conflicts): Adjust.
16826 (Unresolved SR Conflicts): Adjust and rename as...
16827 (Resolved SR Conflicts): this, as was meant.
16828 * tests/regression.at (Web2c Report): Adjust.
16829
16830 2002-06-30 Akim Demaille <akim@epita.fr>
16831
16832 * src/print.c (state_default_rule_compute): New, extracted from...
16833 (print_reductions): here.
16834 Pessimize, but clarify the code.
16835 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16836
16837 2002-06-30 Akim Demaille <akim@epita.fr>
16838
16839 * src/output.c (action_row): Let default_rule be always a rule
16840 number.
16841
16842 2002-06-30 Akim Demaille <akim@epita.fr>
16843
16844 * src/closure.c (print_firsts, print_fderives, closure):
16845 Use BITSET_EXECUTE.
16846 * src/lalr.c (lookaheads_print): Likewise.
16847 * src/state.c (state_rule_lookaheads_print): Likewise.
16848 * src/print_graph.c (print_core): Likewise.
16849 * src/print.c (print_reductions): Likewise.
16850 * src/output.c (action_row): Likewise.
16851 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16852
16853 2002-06-30 Akim Demaille <akim@epita.fr>
16854
16855 * src/print_graph.c: Use report_flag.
16856
16857 2002-06-30 Akim Demaille <akim@epita.fr>
16858
16859 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16860 to...
16861 * src/relation.h, src/relation.c (traverse, relation_digraph)
16862 (relation_print, relation_transpose): New.
16863
16864 2002-06-30 Akim Demaille <akim@epita.fr>
16865
16866 * src/state.h, src/state.c (shifts_to): New.
16867 * src/lalr.c (build_relations): Use it.
16868
16869 2002-06-30 Akim Demaille <akim@epita.fr>
16870
16871 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16872 (item_number_of_rule_number, rule_number_of_item_number): New.
16873 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16874 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16875 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16876 Propagate their use.
16877 Much remains to be done, in particular wrt `shorts' from types.h.
16878
16879 2002-06-30 Akim Demaille <akim@epita.fr>
16880
16881 * src/symtab.c (symbol_new): Initialize the `printer' member.
16882
16883 2002-06-30 Akim Demaille <akim@epita.fr>
16884
16885 * src/LR0.c (save_reductions): Remove, replaced by...
16886 * src/state.h, src/state.c (state_reductions_set): New.
16887 (reductions, errs): Rename as...
16888 (reductions_t, errs_t): these.
16889 Adjust all dependencies.
16890
16891 2002-06-30 Akim Demaille <akim@epita.fr>
16892
16893 * src/LR0.c (state_list_t, state_list_append): New.
16894 (first_state, last_state): Now symbol_list_t.
16895 (this_state): Remove.
16896 (new_itemsets, append_states, save_reductions): Take a state_t as
16897 argument.
16898 (set_states, generate_states): Adjust.
16899 (save_shifts): Remove, replaced by...
16900 * src/state.h, src/state.c (state_shifts_set): New.
16901 (shifts): Rename as...
16902 (shifts_t): this.
16903 Adjust all dependencies.
16904 * src/state.h (state_t): Remove the `next' member.
16905
16906 2002-06-30 Akim Demaille <akim@epita.fr>
16907
16908 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16909 escaped in slot 0.
16910
16911 2002-06-30 Akim Demaille <akim@epita.fr>
16912
16913 Use hash.h for the state hash table.
16914
16915 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16916 (allocate_storage): Use state_hash_new.
16917 (free_storage): Use state_hash_free.
16918 (new_state, get_state): Adjust.
16919 * src/lalr.h, src/lalr.c (states): Move to...
16920 * src/states.h (state_t): Remove the `link' member, no longer
16921 used.
16922 * src/states.h, src/states.c: here.
16923 (state_hash_new, state_hash_free, state_hash_lookup)
16924 (state_hash_insert, states_free): New.
16925 * src/states.c (state_table, state_compare, state_hash): New.
16926 * src/output.c (output_actions): Do not free states now, since we
16927 still need to know the final_state number in `prepare', called
16928 afterwards. Do it...
16929 * src/main.c (main): here: call states_free after `output'.
16930
16931 2002-06-30 Akim Demaille <akim@epita.fr>
16932
16933 * src/state.h, src/state.c (state_new): New, extracted from...
16934 * src/LR0.c (new_state): here.
16935 * src/state.h (STATE_ALLOC): Move to...
16936 * src/state.c: here.
16937 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16938 * src/state.h, src/state.c: here.
16939
16940 2002-06-30 Akim Demaille <akim@epita.fr>
16941
16942 * src/reader.c (gensym): Rename as...
16943 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16944 (getsym): Rename as...
16945 (symbol_get): this.
16946
16947 2002-06-30 Akim Demaille <akim@epita.fr>
16948
16949 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16950 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16951 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16952 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16953
16954 2002-06-30 Akim Demaille <akim@epita.fr>
16955
16956 Make the test suite pass with warnings checked.
16957
16958 * tests/actions.at (Printers and Destructors): Improve.
16959 Avoid unsigned vs. signed issues.
16960 * tests/calc.at: Don't exercise the scanner here, do it...
16961 * tests/input.at (Torturing the Scanner): here.
16962
16963 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16964
16965 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16966 reorganize first lines parallel to yacc.c.
16967
16968 2002-06-28 Akim Demaille <akim@epita.fr>
16969
16970 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16971 (b4_token_enum, b4_token_defines): New, factored from...
16972 * data/lalr1.cc, data/yacc.c, glr.c: here.
16973
16974 2002-06-28 Akim Demaille <akim@epita.fr>
16975
16976 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16977 unused variables.
16978 * src/output.c (merger_output): static.
16979
16980 2002-06-28 Akim Demaille <akim@epita.fr>
16981
16982 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16983 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16984 pacify GCC.
16985 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16986
16987 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16988
16989 Accumulated changelog for new GLR parsing features.
16990
16991 * src/conflicts.c (count_total_conflicts): Change name to
16992 conflicts_total_count.
16993 * src/conflicts.h: Ditto.
16994 * src/output.c (token_actions): Use the new name.
16995 (output_conflicts): Change conflp => conflict_list_heads, and
16996 confl => conflict_list for better readability.
16997 * data/glr.c: Use the new names.
16998 * NEWS: Add self to GLR announcement.
16999
17000 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17001
17002 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17003 Akim Demaille.
17004
17005 * data/bison.glr: Change name to glr.c
17006 * data/glr.c: Renamed from bison.glr.
17007 * data/Makefile.am: Add glr.c
17008
17009 * src/getargs.c:
17010
17011 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
17012 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
17013
17014 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17015
17016 * data/bison.glr: Be sure to restore the
17017 current #line when returning to the skeleton contents after having
17018 exposed the input file's #line.
17019
17020 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17021
17022 * data/bison.glr: Bring up to date with changes to bison.simple.
17023
17024 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17025
17026 * data/bison.glr: Correct definitions that use b4_prefix.
17027 Various reformatting.
17028 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17029 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17030 yytokenp argument; now part of stack.
17031 (yychar): Define to behave as documented.
17032 (yyclearin): Ditto.
17033
17034 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17035
17036 * src/reader.h: Add declaration for free_merger_functions.
17037
17038 * src/reader.c (merge_functions): New variable.
17039 (get_merge_function): New function.
17040 (free_merger_functions): New function.
17041 (readgram): Check for %prec that is not followed by a symbol.
17042 Handle %dprec and %merge declarations.
17043 (packgram): Initialize dprec and merger fields in rules array.
17044
17045 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17046 conflict_list_cnt, conflict_list_free): New variables.
17047 (table_grow): Also grow conflict_table.
17048 (prepare_rules): Output dprec and merger tables.
17049 (conflict_row): New function.
17050 (action_row): Output conflict lists for GLR parser. Don't use
17051 default reduction in conflicted states for GLR parser so that there
17052 are spaces for the conflict lists.
17053 (save_row): Also save conflict information.
17054 (token_actions): Allocate conflict list.
17055 (merger_output): New function.
17056 (pack_vector): Pack conflict table, too.
17057 (output_conflicts): New function to output yyconflp and yyconfl.
17058 (output_check): Allocate conflict_tos.
17059 (output_actions): Output conflict tables, also.
17060 (output_skeleton): Output b4_mergers definition.
17061 (prepare): Output b4_max_rhs_length definition.
17062 Use 'bison.glr' as default skeleton for GLR parsers.
17063
17064 * src/gram.c (glr_parser): New flag.
17065 (grammar_free): Call free_merger_functions.
17066
17067 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17068 all pairs of conflicting reductions, rather than just all tokens
17069 causing conflicts. Needed to size conflict tables.
17070 (conflicts_output): Modify call to count_rr_conflicts for new
17071 interface.
17072 (conflicts_print): Ditto.
17073 (count_total_conflicts): New function.
17074
17075 * src/reader.h (merger_list): New type.
17076 (merge_functions): New variable.
17077
17078 * src/lex.h (tok_dprec, tok_merge): New token types.
17079
17080 * src/gram.h (rule_s): Add dprec and merger fields.
17081 (glr_parser): New flag.
17082
17083 * src/conflicts.h (count_total_conflicts): New function.
17084
17085 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17086
17087 * doc/bison.texinfo (Generalized LR Parsing): New section.
17088 (GLR Parsers): New section.
17089 (Language and Grammar): Mention GLR parsing.
17090 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17091 Correct typo ("tge" -> "the").
17092
17093 * data/bison.glr: New skeleton for GLR parsing.
17094
17095 * tests/cxx-gram.at: New tests for GLR parsing.
17096
17097 * tests/testsuite.at: Include cxx-gram.at.
17098
17099 * tests/Makefile.am: Add cxx-gram.at.
17100
17101 * src/parse-gram.y:
17102
17103 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17104
17105 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17106
17107 2002-06-27 Akim Demaille <akim@epita.fr>
17108
17109 * src/options.h, src/options.c: Remove.
17110 * src/getargs.c (short_options, long_options): New.
17111
17112 2002-06-27 Akim Demaille <akim@epita.fr>
17113
17114 * data/bison.simple, data/bison.c++: Rename as...
17115 * data/yacc.c, data/lalr1.cc: these.
17116 * doc/bison.texinfo (Environment Variables): Remove.
17117
17118 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17119
17120 * src/getargs.c (report_argmatch): Initialize strtok().
17121
17122 2002-06-20 Akim Demaille <akim@epita.fr>
17123
17124 * data/bison.simple (b4_symbol_actions): New, replaces...
17125 (b4_symbol_destructor, b4_symbol_printer): these.
17126 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17127 user token numbers.
17128
17129 2002-06-20 Akim Demaille <akim@epita.fr>
17130
17131 * data/bison.simple (yydestructor): Rename as...
17132 (yydestruct): this.
17133
17134 2002-06-20 Akim Demaille <akim@epita.fr>
17135
17136 * src/symtab.h, src/symtab.c (symbol_type_set)
17137 (symbol_destructor_set, symbol_precedence_set): The location is
17138 the last argument.
17139 Adjust all callers.
17140
17141 2002-06-20 Akim Demaille <akim@epita.fr>
17142
17143 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17144 internals.
17145 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17146 Takes a location.
17147 * src/symtab.h, src/symtab.c (symbol_class_set)
17148 (symbol_user_token_number_set): Likewise.
17149 Adjust all callers.
17150 Promote complain_at.
17151 * tests/input.at (Type Clashes): Adjust.
17152
17153 2002-06-20 Akim Demaille <akim@epita.fr>
17154
17155 * data/bison.simple (YYLEX): Fix the declaration when
17156 %pure-parser.
17157
17158 2002-06-20 Akim Demaille <akim@epita.fr>
17159
17160 * data/bison.simple (yysymprint): Don't print the token number,
17161 just its name.
17162 * tests/actions.at (Destructors): Rename as...
17163 (Printers and Destructors): this.
17164 Also exercise %printer.
17165
17166 2002-06-20 Akim Demaille <akim@epita.fr>
17167
17168 * data/bison.simple (YYDSYMPRINT): New.
17169 Use it to remove many of the #if YYDEBUG/if (yydebug).
17170
17171 2002-06-20 Akim Demaille <akim@epita.fr>
17172
17173 * src/symtab.h, src/symtab.c (symbol_t): printer and
17174 printer_location are new members.
17175 (symbol_printer_set): New.
17176 * src/parse-gram.y (PERCENT_PRINTER): New token.
17177 Handle its associated rule.
17178 * src/scan-gram.l: Adjust.
17179 (handle_destructor_at, handle_destructor_dollar): Rename as...
17180 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17181 * src/output.c (symbol_printers_output): New.
17182 (output_skeleton): Call it.
17183 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17184 since there are already many grammar files with a user `yyprint'.
17185 Replace the calls to YYPRINT to calls to yysymprint.
17186 * tests/calc.at: Adjust.
17187 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17188 taking advantage of parser very internal details (stack size!).
17189
17190 2002-06-20 Akim Demaille <akim@epita.fr>
17191
17192 * src/scan-gram.l: Complete the scanner with the missing patterns
17193 to pacify Flex.
17194 Use `quote' and `symbol_tag_get' where appropriate.
17195
17196 2002-06-19 Akim Demaille <akim@epita.fr>
17197
17198 * tests/actions.at (Destructors): Augment to test locations.
17199 * data/bison.simple (yydestructor): Pass it the current location
17200 if locations are enabled.
17201 Prototype only when __STDC__ or C++.
17202 Change the argument names to move into the yy name space: there is
17203 user code here.
17204
17205 2002-06-19 Akim Demaille <akim@epita.fr>
17206
17207 * data/bison.simple (b4_pure_if): New.
17208 Use it instead of #ifdef YYPURE.
17209
17210 2002-06-19 Akim Demaille <akim@epita.fr>
17211
17212 * data/bison.simple (b4_location_if): New.
17213 Use it instead of #ifdef YYLSP_NEEDED.
17214
17215 2002-06-19 Akim Demaille <akim@epita.fr>
17216
17217 Prepare @$ in %destructor, but currently don't bind it in the
17218 skeleton, as %location use is not cleaned up yet.
17219
17220 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17221 (handle_action_at): New.
17222 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17223 a braced_code_t and a location as additional arguments.
17224 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17225 unquote one when outputting `b4_dollar_dollar'.
17226 Adjust callers.
17227 * data/bison.simple (b4_eval): Remove.
17228 (b4_symbol_destructor): Adjust.
17229 * tests/input.at (Invalid @n): Adjust.
17230
17231 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17232
17233 * doc/bison.texinfo: Document ability to have multiple
17234 prologue sections.
17235
17236 2002-06-18 Akim Demaille <akim@epita.fr>
17237
17238 * src/files.c (compute_base_names): When computing the output file
17239 names from the input file name, strip the directory part.
17240
17241 2002-06-18 Akim Demaille <akim@epita.fr>
17242
17243 * data/bison.simple.new: Comment changes.
17244 Reported by Andreas Schwab.
17245
17246 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17247
17248 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17249 there are no `label `yyoverflowlab' defined but not used' warnings
17250 when yyoverflow is defined.
17251
17252 2002-06-18 Akim Demaille <akim@epita.fr>
17253
17254 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17255 new member.
17256 (symbol_destructor_set): Adjust.
17257 * src/output.c (symbol_destructors_output): Output the destructor
17258 locations.
17259 Output the symbol name.
17260 * data/bison.simple (b4_symbol_destructor): Adjust.
17261
17262 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17263 and Akim Demaille <akim@epita.fr>
17264
17265 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17266 what's left on the stack when the error recovery hits EOF.
17267 * tests/actions.at (Destructors): Complete to exercise this case.
17268
17269 2002-06-17 Akim Demaille <akim@epita.fr>
17270
17271 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17272 arguments is really empty, not only equal to `[]'.
17273 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17274 member.
17275 (symbol_destructor_set): New.
17276 * src/output.c (symbol_destructors_output): New.
17277 * src/reader.h (brace_code_t, current_braced_code): New.
17278 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17279 (handle_dollar): Rename as...
17280 (handle_action_dollar): this.
17281 (handle_destructor_dollar): New.
17282 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17283 (grammar_declaration): Use it.
17284 * data/bison.simple (yystos): Is always defined.
17285 (yydestructor): New.
17286 * tests/actions.at (Destructors): New.
17287 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17288
17289 2002-06-17 Akim Demaille <akim@epita.fr>
17290
17291 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17292 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17293 rule_length only when needed.
17294 * src/output.c (actions_output, token_definitions_output): Output
17295 the full M4 block.
17296 * src/symtab.c: Don't access directly to the symbol tag, use
17297 symbol_tag_get.
17298 * src/parse-gram.y: Use symbol_list_free.
17299
17300 2002-06-17 Akim Demaille <akim@epita.fr>
17301
17302 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17303 (symbol_list_prepend, get_type_name): Move to...
17304 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17305 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17306 Adjust all callers.
17307 (symbol_list_free): New.
17308 * src/scan-gram.l (handle_dollar): Takes a location.
17309 * tests/input.at (Invalid $n): Adjust.
17310
17311 2002-06-17 Akim Demaille <akim@epita.fr>
17312
17313 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17314 (symbol_list_prepend): New.
17315 * src/parse-gram.y (%union): `list' is a new member.
17316 (symbols.1): New, replaces...
17317 (terms_to_prec.1, nterms_to_type.1): these.
17318 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17319 Take a location as additional argument.
17320 Adjust all callers.
17321
17322 2002-06-15 Akim Demaille <akim@epita.fr>
17323
17324 * src/parse-gram.y: Move %token in the declaration section so that
17325 we don't depend upon CVS Bison.
17326
17327 2002-06-15 Akim Demaille <akim@epita.fr>
17328
17329 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17330 * src/print.c (print_core): Use it.
17331
17332 2002-06-15 Akim Demaille <akim@epita.fr>
17333
17334 * src/conflicts.c (log_resolution): Accept the rule involved in
17335 the sr conflicts instead of the lookahead number that points to
17336 that rule.
17337 (flush_reduce): Accept the current lookahead vector as argument,
17338 instead of the index in LA.
17339 (resolve_sr_conflict): Accept the current number of lookahead
17340 bitset to consider for the STATE, instead of the index in LA.
17341 (set_conflicts): Adjust.
17342 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17343
17344 2002-06-15 Akim Demaille <akim@epita.fr>
17345
17346 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17347 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17348 Adjust all dependencies.
17349 * src/lalr.c (initialize_lookaheads): Split into...
17350 (states_lookaheads_count, states_lookaheads_initialize): these.
17351 (lalr): Adjust.
17352
17353 2002-06-15 Akim Demaille <akim@epita.fr>
17354
17355 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17356 out of...
17357 (grammar_rules_print): here.
17358 * src/reduce.c (reduce_output): Use it.
17359 * tests/reduce.at (Useless Rules, Reduced Automaton)
17360 (Underivable Rules): Adjust.
17361
17362 2002-06-15 Akim Demaille <akim@epita.fr>
17363
17364 Copy BYacc's nice way to report the grammar.
17365
17366 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17367 New.
17368 Don't print the rules' location, it is confusing and useless.
17369 (rule_print): Use grammar_rhs_print.
17370 * src/print.c (print_grammar): Use grammar_rules_print.
17371
17372 2002-06-15 Akim Demaille <akim@epita.fr>
17373
17374 Complete and rationalize `useless thing' warnings.
17375
17376 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17377 (symbol_tag_print): New.
17378 Use them everywhere in place of accessing directly the tag member.
17379 * src/gram.h, src/gram.c (rule_print): New.
17380 Use it where a rule used to be printed `by hand'.
17381 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17382 (reduce_grammar_tables): Report the useless rules.
17383 (reduce_print): Useless things are a warning, not an error.
17384 Report it as such.
17385 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17386 (Reduced Automaton, Underivable Rules): Adjust.
17387 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17388 * tests/conflicts.at (Unresolved SR Conflicts)
17389 (Solved SR Conflicts): Adjust.
17390
17391 2002-06-15 Akim Demaille <akim@epita.fr>
17392
17393 Let symbols have a location.
17394
17395 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17396 (getsym): Adjust.
17397 Adjust all callers.
17398 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17399 Use location_t, not int.
17400 * src/symtab.c (symbol_check_defined): Take advantage of the
17401 location.
17402 * tests/regression.at (Invalid inputs): Adjust.
17403
17404 2002-06-15 Akim Demaille <akim@epita.fr>
17405
17406 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17407 (input): Don't try to initialize yylloc here, do it in the
17408 scanner.
17409 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17410 * src/gram.h (rule_t): Change line and action_line into location
17411 and action_location, of location_t type.
17412 Adjust all dependencies.
17413 * src/location.h, src/location.c (empty_location): New.
17414 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17415 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17416 (grammar_current_rule_symbol_append)
17417 (grammar_current_rule_action_append): Expect a location as argument.
17418 * src/reader.c (grammar_midrule_action): Adjust to attach an
17419 action's location as dummy symbol location.
17420 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17421 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17422 the line numbers.
17423
17424 2002-06-14 Akim Demaille <akim@epita.fr>
17425
17426 Grammar declarations may be found in the grammar section.
17427
17428 * src/parse-gram.y (rules_or_grammar_declaration): New.
17429 (declarations): Each declaration may end with a semicolon, not
17430 just...
17431 (grammar_declaration): `"%union"'.
17432 (grammar): Branch to rules_or_grammar_declaration.
17433
17434 2002-06-14 Akim Demaille <akim@epita.fr>
17435
17436 * src/main.c (main): Invoke scanner_free.
17437
17438 2002-06-14 Akim Demaille <akim@epita.fr>
17439
17440 * src/output.c (m4_invoke): Extracted from...
17441 (output_skeleton): here.
17442 Free tempfile.
17443
17444 2002-06-14 Akim Demaille <akim@epita.fr>
17445
17446 * src/parse-gram.y (directives, directive, gram)
17447 (grammar_directives, precedence_directives, precedence_directive):
17448 Rename as...
17449 (declarations, declaration, grammar, grammar_declaration)
17450 (precedence_declaration, precedence_declarator): these.
17451 (symbol_declaration): New.
17452
17453 2002-06-14 Akim Demaille <akim@epita.fr>
17454
17455 * src/files.c (action_obstack): Remove, unused.
17456 (output_obstack): Remove it, and all its dependencies, as it is no
17457 longer needed.
17458 * src/reader.c (epilogue_set): Build the epilogue in the
17459 muscle_obstack.
17460 * src/output.h, src/output.c (muscle_obstack): Move to...
17461 * src/muscle_tab.h, src/muscle_tab.h: here.
17462 (muscle_init): Initialize muscle_obstack.
17463 (muscle_free): New.
17464 * src/main.c (main): Call it.
17465
17466 2002-06-14 Akim Demaille <akim@epita.fr>
17467
17468 * src/location.h: New, extracted from...
17469 * src/reader.h: here.
17470 * src/Makefile.am (noinst_HEADERS): Merge into
17471 (bison_SOURCES): this.
17472 Add location.h.
17473 * src/parse-gram.y: Use location_t instead of Bison's.
17474 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17475 Use location_t instead of ints.
17476
17477 2002-06-14 Akim Demaille <akim@epita.fr>
17478
17479 * data/bison.simple, data/bison.c++: Be sure to restore the
17480 current #line when returning to the skeleton contents after having
17481 exposed the input file's #line.
17482
17483 2002-06-12 Akim Demaille <akim@epita.fr>
17484
17485 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17486 eager.
17487 * tests/actions.at (Exotic Dollars): New.
17488
17489 2002-06-12 Akim Demaille <akim@epita.fr>
17490
17491 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17492 ['"/] too eagerly.
17493 * tests/input.at (Torturing the Scanner): New.
17494
17495 2002-06-11 Akim Demaille <akim@epita.fr>
17496
17497 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17498 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17499 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17500 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17501 * src/reader.c (reader): Use it.
17502
17503 2002-06-11 Akim Demaille <akim@epita.fr>
17504
17505 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17506 Adjust all callers.
17507 (scanner_last_string_free): New.
17508
17509 2002-06-11 Akim Demaille <akim@epita.fr>
17510
17511 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17512 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17513 (last_string, YY_OBS_FREE): New.
17514 Use them when returning an ID.
17515
17516 2002-06-11 Akim Demaille <akim@epita.fr>
17517
17518 Have Bison grammars parsed by a Bison grammar.
17519
17520 * src/reader.c, src/reader.h (prologue_augment): New.
17521 * src/reader.c (copy_definition): Remove.
17522
17523 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17524 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17525 (grammar_current_rule_prec_set, grammar_current_rule_check)
17526 (grammar_current_rule_symbol_append)
17527 (grammar_current_rule_action_append): Export.
17528 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17529 (symbol_list_action_append): Remove.
17530 Hook the routines from reader.
17531 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17532 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17533
17534 * src/reader.c (read_declarations): Remove, unused.
17535
17536 * src/parse-gram.y: Handle the epilogue.
17537 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17538 (grammar_start_symbol_set): this.
17539 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17540 * src/reader.c (readgram): Remove, unused.
17541 (reader): Adjust to insert eoftoken and axiom where appropriate.
17542
17543 * src/reader.c (copy_dollar): Replace with...
17544 * src/scan-gram.h (handle_dollar): this.
17545 * src/parse-gram.y: Remove `%thong'.
17546
17547 * src/reader.c (copy_at): Replace with...
17548 * src/scan-gram.h (handle_at): this.
17549
17550 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17551 New.
17552
17553 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17554 time being.
17555
17556 * src/reader.h, src/reader.c (grammar_rule_end): New.
17557
17558 * src/parse.y (current_type, current_class): New.
17559 Implement `%nterm', `%token' support.
17560 Merge `%term' into `%token'.
17561 (string_as_id): New.
17562 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17563 type name.
17564
17565 * src/parse-gram.y: Be sure to handle properly the beginning of
17566 rules.
17567
17568 * src/parse-gram.y: Handle %type.
17569 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17570
17571 * src/parse-gram.y: More directives support.
17572 * src/options.c: No longer handle source directives.
17573
17574 * src/parse-gram.y: Fix %output.
17575
17576 * src/parse-gram.y: Handle %union.
17577 Use the prologue locations.
17578 * src/reader.c (parse_union_decl): Remove.
17579
17580 * src/reader.h, src/reader.c (epilogue_set): New.
17581 * src/parse-gram.y: Use it.
17582
17583 * data/bison.simple, data/bison.c++: b4_stype is now either not
17584 defined, then default to int, or to the contents of %union,
17585 without `union' itself.
17586 Adjust.
17587 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17588
17589 * src/output.c (actions_output): Don't output braces, as they are
17590 already handled by the scanner.
17591
17592 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17593 characters to themselves.
17594
17595 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17596 that the epilogue has a proper #line.
17597
17598 * src/parse-gram.y: Handle precedence/associativity.
17599
17600 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17601 a terminal.
17602 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17603 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17604 at all to define terminals that cannot be emitted.
17605
17606 * src/scan-gram.l: Escape M4 characters.
17607
17608 * src/scan-gram.l: Working properly with escapes in user
17609 strings/characters.
17610
17611 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17612 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17613 grammar.
17614 Use more modest sizes, as for the time being the parser does not
17615 release memory, and therefore the process swallows a huge amount
17616 of memory.
17617
17618 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17619 stricter %token grammar.
17620
17621 * src/symtab.h (associativity): Add `undef_assoc'.
17622 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17623 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17624
17625 * tests/regression.at (Invalid %directive): Remove, as it is now
17626 meaningless.
17627 (Invalid inputs): Adjust to the new error messages.
17628 (Token definitions): The new grammar doesn't allow too many
17629 eccentricities.
17630
17631 * src/lex.h, src/lex.c: Remove.
17632 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17633 (copy_character, copy_string2, copy_string, copy_identifier)
17634 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17635 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17636 (parse_action): Remove.
17637 * po/POTFILES.in: Adjust.
17638
17639 2002-06-11 Akim Demaille <akim@epita.fr>
17640
17641 * src/reader.c (parse_action): Don't store directly into the
17642 rule's action member: return the action as a string.
17643 Don't require `rule_length' as an argument: compute it.
17644 (grammar_current_rule_symbol_append)
17645 (grammar_current_rule_action_append): New, eved out from
17646 (readgram): here.
17647 Remove `action_flag', `rulelength', unused now.
17648
17649 2002-06-11 Akim Demaille <akim@epita.fr>
17650
17651 * src/reader.c (grammar_current_rule_prec_set).
17652 (grammar_current_rule_check): New, eved out from...
17653 (readgram): here.
17654 Remove `xaction', `first_rhs': useless.
17655 * tests/input.at (Type clashes): New.
17656 * tests/existing.at (GNU Cim Grammar): Adjust.
17657
17658 2002-06-11 Akim Demaille <akim@epita.fr>
17659
17660 * src/reader.c (grammar_midrule_action): New, Eved out from
17661 (readgram): here.
17662
17663 2002-06-11 Akim Demaille <akim@epita.fr>
17664
17665 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17666 New.
17667 (readgram): Use them as replacement of inlined code, crule and
17668 crule1.
17669
17670 2002-06-11 Akim Demaille <akim@epita.fr>
17671
17672 * src/reader.c (grammar_end, grammar_symbol_append): New.
17673 (readgram): Use them.
17674 Make the use of `p' as local as possible.
17675
17676 2002-06-10 Akim Demaille <akim@epita.fr>
17677
17678 GCJ's parser requires the tokens to be defined before the prologue.
17679
17680 * data/bison.simple: Output the token definition before the user's
17681 prologue.
17682 * tests/regression.at (Braces parsing, Duplicate string)
17683 (Mixing %token styles): Check the output from bison.
17684 (Early token definitions): New.
17685
17686 2002-06-10 Akim Demaille <akim@epita.fr>
17687
17688 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17689 assigning twice the same user number to a token, so that we can
17690 use it in...
17691 * src/lex.c (lex): here.
17692 Also use `symbol_class_set' instead of hand written code.
17693 * src/reader.c (parse_assoc_decl): Likewise.
17694
17695 2002-06-10 Akim Demaille <akim@epita.fr>
17696
17697 * src/symtab.c, src/symtab.c (symbol_class_set)
17698 (symbol_user_token_number_set): New.
17699 * src/reader.c (parse_token_decl): Use them.
17700 Use a switch instead of ifs.
17701 Use a single argument.
17702
17703 2002-06-10 Akim Demaille <akim@epita.fr>
17704
17705 Remove `%thong' support as it is undocumented, unused, duplicates
17706 `%token's job, and creates useless e-mail traffic with people who
17707 want to know what it is, why it is undocumented, unused, and
17708 duplicates `%token's job.
17709
17710 * src/reader.c (parse_thong_decl): Remove.
17711 * src/options.c (option_table): Remove "thong".
17712 * src/lex.h (tok_thong): Remove.
17713
17714 2002-06-10 Akim Demaille <akim@epita.fr>
17715
17716 * src/symtab.c, src/symtab.c (symbol_type_set)
17717 (symbol_precedence_set): New.
17718 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17719 (value_components_used): Remove, unused.
17720
17721 2002-06-09 Akim Demaille <akim@epita.fr>
17722
17723 Move symbols handling code out of the reader.
17724
17725 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17726 (axiom): Move to...
17727 * src/symtab.h, src/symtab.c: here.
17728
17729 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17730 * src/reader.c (startval): Rename as...
17731 * src/symtab.h, src/symtab.c (startsymbol): this.
17732 * src/reader.c: Adjust.
17733
17734 * src/reader.c (symbol_check_defined, symbol_make_alias)
17735 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17736 (token_translations_init)
17737 Move to...
17738 * src/symtab.c: here.
17739 * src/reader.c (packsymbols): Move to...
17740 * src/symtab.h, src/symtab.c (symbols_pack): here.
17741 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17742 argument.
17743
17744 2002-06-03 Akim Demaille <akim@epita.fr>
17745
17746 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17747 then statements.
17748
17749 2002-06-03 Akim Demaille <akim@epita.fr>
17750
17751 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17752 structs with non literals.
17753 * src/scan-skel.l: never-interactive.
17754 * src/conflicts.c (enum conflict_resolution_e): No trailing
17755 comma.
17756 * src/getargs.c (usage): Split long literal strings.
17757 Reported by Hans Aberg.
17758
17759 2002-05-28 Akim Demaille <akim@epita.fr>
17760
17761 * data/bison.c++: Use C++ ostreams.
17762 (cdebug_): New member.
17763
17764 2002-05-28 Akim Demaille <akim@epita.fr>
17765
17766 * src/output.c (output_skeleton): Be sure to allocate enough room
17767 for `/' _and_ for `\0' in full_skeleton.
17768
17769 2002-05-28 Akim Demaille <akim@epita.fr>
17770
17771 * data/bison.c++: Catch up with bison.simple:
17772 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17773 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17774 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17775 and popping traces.
17776
17777 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17778
17779 * src/output.c (output_skeleton): Put an explicit path in front of
17780 the skeleton file name, rather than relying on the -I directory,
17781 to partially alleviate effects of having a skeleton file lying around
17782 in the current directory.
17783
17784 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17785
17786 * src/conflicts.c (log_resolution): Correct typo:
17787 obstack_printf should be obstack_fgrow1.
17788
17789 2002-05-26 Akim Demaille <akim@epita.fr>
17790
17791 * src/state.h (state_t): `solved_conflicts' is a new member.
17792 * src/LR0.c (new_state): Set it to 0.
17793 * src/conflicts.h, src/conflicts.c (print_conflicts)
17794 (free_conflicts, solve_conflicts): Rename as...
17795 (conflicts_print, conflicts_free, conflicts_solve): these.
17796 Adjust callers.
17797 * src/conflicts.c (enum conflict_resolution_e)
17798 (solved_conflicts_obstack): New, used by...
17799 (log_resolution): this.
17800 Adjust to attach the conflict resolution to each state.
17801 Complete the description with the precedence/associativity
17802 information.
17803 (resolve_sr_conflict): Adjust.
17804 * src/print.c (print_state): Output its solved_conflicts.
17805 * tests/conflicts.at (Unresolved SR Conflicts)
17806 (Solved SR Conflicts): Exercise --report=all.
17807
17808 2002-05-26 Akim Demaille <akim@epita.fr>
17809
17810 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17811 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17812 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17813 (token_number_t, item_number_as_token_number)
17814 (token_number_as_item_number, muscle_insert_token_number_table):
17815 Rename as...
17816 (symbol_number_t, item_number_as_symbol_number)
17817 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17818 these, since it is more appropriate.
17819
17820 2002-05-26 Akim Demaille <akim@epita.fr>
17821
17822 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17823 `Error:' lines.
17824 * data/bison.simple (yystos) [YYDEBUG]: New.
17825 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17826 error recovery.
17827 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17828
17829 2002-05-25 Akim Demaille <akim@epita.fr>
17830
17831 * doc/bison.texinfo (Debugging): Split into...
17832 (Tracing): this new section, its former contents, and...
17833 (Understanding): this new section.
17834 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17835 by...
17836 (report_flag): this.
17837 Adjust all dependencies.
17838 (report_args, report_types, report_argmatch): New.
17839 (usage, getargs): Report/support -r, --report.
17840 * src/options.h
17841 (struct option_table_struct): Rename as..,
17842 (struct option_table_s): this.
17843 Rename the `set_flag' member to `flag' to match with getopt_long's
17844 struct.
17845 * src/options.c (option_table): Split verbose into an entry for
17846 %verbose, and another for --verbose.
17847 Support --report/-r, so remove -r from the obsolete --raw.
17848 * src/print.c: Attach full item sets and lookaheads reports to
17849 report_flag instead of trace_flag.
17850 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17851
17852 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17853 and Paul Eggert <eggert@twinsun.com>
17854
17855 * data/bison.simple (yyparse): Correct error handling to conform to
17856 POSIX and yacc. Specifically, after syntax error is discovered,
17857 do not reduce further before shifting the error token.
17858 Clean up the code a bit by removing the labels yyerrdefault,
17859 yyerrhandle, yyerrpop.
17860 * NEWS: Document the above.
17861
17862 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17863
17864 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17865 type; it isn't always big enough, since it doesn't necessarily
17866 include non-terminals.
17867 (yytranslate): Expand definition of yy_token_number_type, so that
17868 the latter can be removed.
17869 (yy_token_number_type): Remove, only one use.
17870 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17871 don't use TokenNumberType as element type.
17872
17873 * tests/regression.at: Modify expected output to agree with change
17874 to yyr1 and yytranslate.
17875
17876 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17877
17878 * src/reader.c (parse_action): Use copy_character instead of
17879 obstack_1grow.
17880
17881 2002-05-13 Akim Demaille <akim@epita.fr>
17882
17883 * tests/regression.at (Token definitions): Prototype yylex and
17884 yyerror.
17885
17886 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17887
17888 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17889 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17890 32-bit arithmetic.
17891 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17892
17893 2002-05-07 Akim Demaille <akim@epita.fr>
17894
17895 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17896 avoid GCC warnings.
17897
17898 2002-05-07 Akim Demaille <akim@epita.fr>
17899
17900 Kill GCC warnings.
17901
17902 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17903 over the RHS of each rule.
17904 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17905 * src/state.h (state_t): Member `nitems' is unsigned short.
17906 * src/LR0.c (get_state): Adjust.
17907 * src/reader.c (packgram): Likewise.
17908 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17909 `Type'.
17910 (muscle_insert_int_table): Remove, unused.
17911 (prepare_rules): Remove `max'.
17912
17913 2002-05-06 Akim Demaille <akim@epita.fr>
17914
17915 * src/closure.c (print_firsts): Display of the symbol tags.
17916 (bitmatrix_print): Move to...
17917 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17918 here.
17919 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17920
17921 2002-05-06 Akim Demaille <akim@epita.fr>
17922
17923 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17924 hash_do_for_each.
17925
17926 2002-05-06 Akim Demaille <akim@epita.fr>
17927
17928 * src/LR0.c (new_state, get_state): Instead of using the global
17929 `kernel_size' and `kernel_base', have two new arguments:
17930 `core_size' and `core'.
17931 Adjust callers.
17932
17933 2002-05-06 Akim Demaille <akim@epita.fr>
17934
17935 * src/reader.c (packgram): No longer end `ritem' with a 0
17936 sentinel: it is not used.
17937
17938 2002-05-05 Akim Demaille <akim@epita.fr>
17939
17940 New experimental feature: display the lookaheads in the report and
17941 graph.
17942
17943 * src/print (print_core): When --trace-flag, display the rules
17944 lookaheads.
17945 * src/print_graph.c (print_core): Likewise.
17946 Swap the arguments.
17947 Adjust caller.
17948
17949 2002-05-05 Akim Demaille <akim@epita.fr>
17950
17951 * tests/torture.at (Many lookaheads): New test.
17952
17953 2002-05-05 Akim Demaille <akim@epita.fr>
17954
17955 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17956 (GENERATE_MUSCLE_INSERT_TABLE): this.
17957 (output_int_table, output_unsigned_int_table, output_short_table)
17958 (output_token_number_table, output_item_number_table): Replace with...
17959 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17960 (muscle_insert_short_table, muscle_insert_token_number_table)
17961 (muscle_insert_item_number_table): these.
17962 Adjust all callers.
17963 (prepare_tokens): Don't free `translations', since...
17964 * src/reader.h, src/reader.c (grammar_free): do it.
17965 Move to...
17966 * src/gram.h, src/gram.c (grammar_free): here.
17967 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17968 b4_translate_max.
17969
17970 2002-05-05 Akim Demaille <akim@epita.fr>
17971
17972 * src/output.c (output_unsigned_int_table): New.
17973 (prepare_rules): `i' is unsigned.
17974 `prhs', `rline', `r2' are unsigned int.
17975 Rename muscle `rhs_number_max' as `rhs_max'.
17976 Output muscles `prhs_max', `rline_max', and `r2_max'.
17977 Free rline and r1.
17978 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17979 to compute types instead of constant types.
17980 * tests/regression.at (Web2c Actions): Adjust.
17981
17982 2002-05-04 Akim Demaille <akim@epita.fr>
17983
17984 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17985 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17986 Adjust dependencies.
17987 * src/output.c (token_definitions_output): Be sure not to output a
17988 `#define 'a'' when fed with `%token 'a' "a"'.
17989 * tests/regression.at (Token definitions): New.
17990
17991 2002-05-03 Paul Eggert <eggert@twinsun.com>
17992
17993 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17994 for K&R C.
17995
17996 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17997
17998 * Makefile.am (SUBDIRS): Remove intl.
17999 (EXTRA_DIST): Add config/config.rpath.
18000
18001 2002-05-03 Akim Demaille <akim@epita.fr>
18002
18003 * data/bison.simple (m4_if): Don't output empty enums.
18004 And actually, output valid enum definitions :(.
18005
18006 2002-05-03 Akim Demaille <akim@epita.fr>
18007
18008 * configure.bat: Remove, completely obsolete.
18009 * Makefile.am (EXTRA_DIST): Adjust.
18010 Don't distribute config.rpath...
18011 * config/Makefile.am (EXTRA_DIST): Do it.
18012
18013 2002-05-03 Akim Demaille <akim@epita.fr>
18014
18015 * configure.in (GETTEXT_VERSION): New.
18016 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18017
18018 2002-05-03 Akim Demaille <akim@epita.fr>
18019
18020 * data/bison.simple (b4_token_enum): New.
18021 (b4_token_defines): Use it to output tokens both as #define and
18022 enums.
18023 Suggested by Paul Eggert.
18024 * src/output.c (token_definitions_output): Don't output spurious
18025 white spaces.
18026
18027 2002-05-03 Akim Demaille <akim@epita.fr>
18028
18029 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18030
18031 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18032
18033 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18034 Update the stack class, give a try to deque as the default container.
18035
18036 2002-05-02 Akim Demaille <akim@epita.fr>
18037
18038 * data/bison.simple (yyparse): Do not implement @$ = @1.
18039 (YYLLOC_DEFAULT): Adjust to do it.
18040 * doc/bison.texinfo (Location Default Action): Fix.
18041
18042 2002-05-02 Akim Demaille <akim@epita.fr>
18043
18044 * src/reader.c (parse_braces): Merge into...
18045 (parse_action): this.
18046
18047 2002-05-02 Akim Demaille <akim@epita.fr>
18048
18049 * configure.in (ALL_LINGUAS): Remove.
18050 * po/LINGUAS, hr.po: New.
18051
18052 2002-05-02 Akim Demaille <akim@epita.fr>
18053
18054 Remove the so called hairy (semantic) parsers.
18055
18056 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18057 * src/gram.h, src/gram.c (semantic_parser): Remove.
18058 (rule_t): Remove the guard and guard_line members.
18059 * src/lex.h (token_t): remove tok_guard.
18060 * src/options.c (option_table): Remove %guard and %semantic_parser
18061 support.
18062 * src/output.c, src/output.h (guards_output): Remove.
18063 (prepare): Adjust.
18064 (token_definitions_output): Don't output the `T'
18065 tokens (???).
18066 (output_skeleton): Don't output the guards.
18067 * src/files.c, src/files.c (attrsfile): Remove.
18068 * src/reader.c (symbol_list): Remove the guard and guard_line
18069 members.
18070 Adjust dependencies.
18071 (parse_guard): Remove.
18072 * data/bison.hairy: Remove.
18073 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18074 BISON_HAIRY.
18075
18076 2002-05-02 Akim Demaille <akim@epita.fr>
18077
18078 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18079 (parse_guard): Rename the formal argument `stack_offset' as
18080 `rule_length', which is more readable.
18081 Adjust callers.
18082 (copy_at, copy_dollar): Instead of outputting the hard coded
18083 values of $$, $n and so forth, output invocation to b4_lhs_value,
18084 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18085 Note: this patch partially drops `semantic-parser' support: it
18086 always does `rule_length - n', where semantic parsers ought to
18087 always use `-n'.
18088 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18089 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18090
18091 2002-05-02 Akim Demaille <akim@epita.fr>
18092
18093 * configure.in (AC_INIT): Bump to 1.49b.
18094 (AM_INIT_AUTOMAKE): Short invocation.
18095
18096 2002-05-02 Akim Demaille <akim@epita.fr>
18097
18098 Version 1.49a.
18099
18100 2002-05-01 Akim Demaille <akim@epita.fr>
18101
18102 * src/skeleton.h: Remove.
18103
18104 2002-05-01 Akim Demaille <akim@epita.fr>
18105
18106 * src/skeleton.h: Fix the #endif.
18107 Reported by Magnus Fromreide.
18108
18109 2002-04-26 Paul Eggert <eggert@twinsun.com>
18110
18111 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18112 Define if we define YYSTYPE and YYLTYPE, respectively.
18113 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18114
18115 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18116
18117 * src/scan-skel.l: Postprocess quadrigraphs.
18118
18119 * src/reader.c (copy_character): New function, used to output
18120 single characters while replacing `[' and `]' with quadrigraphs, to
18121 avoid troubles with M4 quotes.
18122 (copy_comment): Output characters with copy_character.
18123 (read_additionnal_code): Likewise.
18124 (copy_string2): Likewise.
18125 (copy_definition): Likewise.
18126
18127 * tests/calc.at: Exercise M4 quoting.
18128
18129 2002-04-25 Akim Demaille <akim@epita.fr>
18130
18131 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18132 between `!' and the command.
18133 Reported by Paul Eggert.
18134
18135 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18136
18137 * tests/calc.at: Exercise prologue splitting.
18138
18139 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18140 `b4_post_prologue' instead of `b4_prologue'.
18141
18142 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18143 muscles.
18144 (output): Free pre_prologue_obstack and post_prologue_obstack.
18145 * src/files.h, src/files.c (attrs_obstack): Remove.
18146 (pre_prologue_obstack, post_prologue_obstack): New.
18147 * src/reader.c (copy_definition): Add a parameter to specify the
18148 obstack to fill, instead of using attrs_obstack unconditionally.
18149 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18150 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18151
18152 2002-04-23 Paul Eggert <eggert@twinsun.com>
18153
18154 * data/bison.simple: Remove unnecessary commentary and white
18155 space differences from 1_29-branch.
18156 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18157
18158 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18159 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18160 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18161 constructors or destructors.
18162
18163 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18164
18165 2002-04-23 Akim Demaille <akim@epita.fr>
18166
18167 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18168 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18169 location with columns.
18170 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18171 All reported by Paul Eggert.
18172
18173 2002-04-22 Akim Demaille <akim@epita.fr>
18174
18175 * src/reduce.c (dump_grammar): Move to...
18176 * src/gram.h, src/gram.c (grammar_dump): here.
18177 Be sure to separate long item numbers.
18178 Don't read the members of a rule's prec if its nil.
18179
18180 2002-04-22 Akim Demaille <akim@epita.fr>
18181
18182 * src/output.c (table_size, table_grow): New.
18183 (MAXTABLE): Remove, replace uses with table_size.
18184 (pack_vector): Instead of dying when the table is too big, grow it.
18185
18186 2002-04-22 Akim Demaille <akim@epita.fr>
18187
18188 * data/bison.simple (yyr1): Its type is that of a token number.
18189 * data/bison.c++ (r1_): Likewise.
18190 * tests/regression.at (Web2c Actions): Adjust.
18191
18192 2002-04-22 Akim Demaille <akim@epita.fr>
18193
18194 * src/reader.c (token_translations_init): 256 is now the default
18195 value for the error token, i.e., it will be assigned another
18196 number if the user assigned 256 to one of her tokens.
18197 (reader): Don't force 256 to error.
18198 * doc/bison.texinfo (Symbols): Adjust.
18199 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18200 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18201 etc. instead of 10, 20, 30 (which was used to `jump' over error
18202 (256) and undefined (2)).
18203
18204 2002-04-22 Akim Demaille <akim@epita.fr>
18205
18206 Propagate more token_number_t.
18207
18208 * src/gram.h (token_number_as_item_number)
18209 (item_number_as_token_number): New.
18210 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18211 Use it to create output_item_number_table and
18212 output_token_number_table.
18213 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18214 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18215 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18216 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18217
18218 2002-04-22 Akim Demaille <akim@epita.fr>
18219
18220 * src/output.h, src/output.c (get_lines_number): Remove.
18221
18222 2002-04-19 Akim Demaille <akim@epita.fr>
18223
18224 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18225 as Lex/Flex'.
18226 (Debugging): More details about enabling the debugging features.
18227 (Table of Symbols): Describe $$, $n, @$, and @n.
18228 Suggested by Tim Josling.
18229
18230 2002-04-19 Akim Demaille <akim@epita.fr>
18231
18232 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18233
18234 2002-04-10 Akim Demaille <akim@epita.fr>
18235
18236 * src/system.h: Rely on HAVE_LIMITS_H.
18237 Suggested by Paul Eggert.
18238
18239 2002-04-09 Akim Demaille <akim@epita.fr>
18240
18241 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18242 full stderr, and strip it according to the bison options, instead
18243 of composing the error message from different bits.
18244 This makes it easier to check for several error messages.
18245 Adjust all the invocations.
18246 Add an invocation exercising the error token.
18247 Add an invocation demonstrating a stupid error message.
18248 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18249 Adjust the tests.
18250 Error message are for stderr, not stdout.
18251
18252 2002-04-09 Akim Demaille <akim@epita.fr>
18253
18254 * src/gram.h, src/gram.c (error_token_number): Remove, use
18255 errtoken->number.
18256 * src/reader.c (reader): Don't specify the user token number (2)
18257 for $undefined, as it uselessly prevents using it.
18258 * src/gram.h (token_number_t): Move to...
18259 * src/symtab.h: here.
18260 (state_t.number): Is a token_number_t.
18261 * src/print.c, src/reader.c: Use undeftoken->number instead of
18262 hard coded 2.
18263 (Even though this 2 is not the same as above: the number of the
18264 undeftoken remains being 2, it is its user token number which
18265 might not be 2).
18266 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18267 `user_token_number_max'.
18268 Output `undef_token_number'.
18269 * data/bison.simple, data/bison.c++: Use them.
18270 Be sure to map invalid yylex return values to
18271 `undef_token_number'. This saves us from gratuitous SEGV.
18272
18273 * tests/conflicts.at (Solved SR Conflicts)
18274 (Unresolved SR Conflicts): Adjust.
18275 * tests/regression.at (Web2c Actions): Adjust.
18276
18277 2002-04-08 Akim Demaille <akim@epita.fr>
18278
18279 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18280 Adding #line.
18281 Remove the duplicate `typedefs'.
18282 (RhsNumberType): Fix the declaration and various other typos.
18283 Use __ofile__.
18284 * data/bison.simple: Use __ofile__.
18285 * src/scan-skel.l: Handle __ofile__.
18286
18287 2002-04-08 Akim Demaille <akim@epita.fr>
18288
18289 * src/gram.h (item_number_t): New, the type of item numbers in
18290 RITEM. Note that it must be able to code symbol numbers as
18291 positive number, and the negation of rule numbers as negative
18292 numbers.
18293 Adjust all dependencies (pretty many).
18294 * src/reduce.c (rule): Remove this `short *' pointer: use
18295 item_number_t.
18296 * src/system.h (MINSHORT, MAXSHORT): Remove.
18297 Include `limits.h'.
18298 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18299 (shortcpy): Remove.
18300 (MAXTABLE): Move to...
18301 * src/output.c (MAXTABLE): here.
18302 (prepare_rules): Use output_int_table to output rhs.
18303 * data/bison.simple, data/bison.c++: Adjust.
18304 * tests/torture.at (Big triangle): Move the limit from 254 to
18305 500.
18306 * tests/regression.at (Web2c Actions): Ajust.
18307
18308 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18309 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18310 passes, but produces negative #line number, once fixed, GCC is
18311 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18312 C), it passes.
18313 * src/state.h (state_h): Code input lines on ints, not shorts.
18314
18315 2002-04-08 Akim Demaille <akim@epita.fr>
18316
18317 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18318 and then the grammar.
18319
18320 2002-04-08 Akim Demaille <akim@epita.fr>
18321
18322 * src/system.h: No longer using strndup.
18323
18324 2002-04-07 Akim Demaille <akim@epita.fr>
18325
18326 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18327 * src/output.c (output_table_data): Return the longest number.
18328 (prepare_tokens): Output `token_number_max').
18329 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18330 New.
18331 Use them to define yy_token_number_type/TokenNumberType.
18332 Use this type for yytranslate.
18333 * tests/torture.at (Big triangle): Push the limit from 124 to
18334 253.
18335 * tests/regression.at (Web2c Actions): Adjust.
18336
18337 2002-04-07 Akim Demaille <akim@epita.fr>
18338
18339 * tests/torture.at (Big triangle): New.
18340 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18341 * tests/existing.at: here.
18342
18343 2002-04-07 Akim Demaille <akim@epita.fr>
18344
18345 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18346 nritems.
18347 Adjust dependencies.
18348
18349 2002-04-07 Akim Demaille <akim@epita.fr>
18350
18351 * src/reader.c: Normalize increments to prefix form.
18352
18353 2002-04-07 Akim Demaille <akim@epita.fr>
18354
18355 * src/reader.c, symtab.c: Remove debugging code.
18356
18357 2002-04-07 Akim Demaille <akim@epita.fr>
18358
18359 Rename all the `bucket's as `symbol_t'.
18360
18361 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18362 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18363 * src/symtab.c, src/symtab.h (bucket): Rename as...
18364 (symbol_t): this.
18365 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18366 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18367 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18368 (buckets_new, buckets_free, buckets_do): Rename as...
18369 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18370 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18371 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18372 (symbols_new, symbols_free, symbols_do): these.
18373
18374 2002-04-07 Akim Demaille <akim@epita.fr>
18375
18376 Use lib/hash for the symbol table.
18377
18378 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18379 EOF.
18380 * src/lex.c (lex): Set the `number' member of new terminals.
18381 * src/reader.c (bucket_check_defined, bucket_make_alias)
18382 (bucket_check_alias_consistence, bucket_translation): New.
18383 (reader, grammar_free, readgram, token_translations_init)
18384 (packsymbols): Adjust.
18385 (reader): Number the predefined tokens.
18386 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18387 for predefined tokens.
18388 * src/symtab.h (bucket): Remove all the hash table related
18389 members.
18390 * src/symtab.c (symtab): Replace by...
18391 (bucket_table): this.
18392 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18393 (buckets_new, buckets_do): New.
18394
18395 2002-04-07 Akim Demaille <akim@epita.fr>
18396
18397 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18398 (start_symbol, max_user_token_number, semantic_parser)
18399 (error_token_number): Initialize.
18400 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18401 Initialize.
18402 (reader): Don't.
18403 (errtoken, eoftoken, undeftoken, axiom): Extern.
18404
18405 2002-04-07 Akim Demaille <akim@epita.fr>
18406
18407 * src/gram.h (rule_s): prec and precsym are now pointers
18408 to the bucket giving the priority/associativity.
18409 Member `associativity' removed: useless.
18410 * src/reduce.c, src/conflicts.c: Adjust.
18411
18412 2002-04-07 Akim Demaille <akim@epita.fr>
18413
18414 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18415 Properly escape the symbols' TAG when outputting them.
18416
18417 2002-04-07 Akim Demaille <akim@epita.fr>
18418
18419 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18420
18421 2002-04-07 Akim Demaille <akim@epita.fr>
18422
18423 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18424 (LArule): this, which is an array to rule_t*.
18425 * src/print.c, src/conflicts.c: Adjust.
18426
18427 2002-04-07 Akim Demaille <akim@epita.fr>
18428
18429 * src/gram.h (rule_t): Rename `number' as `user_number'.
18430 `number' is a new member.
18431 Adjust dependencies.
18432 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18433
18434 2002-04-07 Akim Demaille <akim@epita.fr>
18435
18436 As a result of the previous patch, it is no longer needed
18437 to reorder ritem itself.
18438
18439 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18440
18441 2002-04-07 Akim Demaille <akim@epita.fr>
18442
18443 Be sure never to walk through RITEMS, but use only data related to
18444 the rules themselves. RITEMS should be banished.
18445
18446 * src/output.c (output_token_translations): Rename as...
18447 (prepare_tokens): this.
18448 In addition to `translate', prepare the muscles `tname' and
18449 `toknum', which were handled by...
18450 (output_rule_data): this.
18451 Remove, and move the remainder of its outputs into...
18452 (prepare_rules): this new routines, which also merges content from
18453 (output_gram): this.
18454 (prepare_rules): Be sure never to walk through RITEMS.
18455 (output_stos): Rename as...
18456 (prepare_stos): this.
18457 (output): Always invoke prepare_states, after all, just don't use it
18458 in the output if you don't need it.
18459
18460 2002-04-07 Akim Demaille <akim@epita.fr>
18461
18462 * src/LR0.c (new_state): Display `nstates' as the name of the
18463 newly created state.
18464 Adjust to initialize first_state and last_state if needed.
18465 Be sure to distinguish the initial from the final state.
18466 (new_states): Create the itemset of the initial state, and use
18467 new_state.
18468 * src/closure.c (closure): Now that the initial state has its
18469 items properly set, there is no need for a special case when
18470 creating `ruleset'.
18471
18472 As a result, now the rule 0, reducing to $axiom, is visible in the
18473 outputs. Adjust the test suite.
18474
18475 * tests/conflicts.at (Solved SR Conflicts)
18476 (Unresolved SR Conflicts): Adjust.
18477 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18478 * tests/conflicts.at (S/R in initial): New.
18479
18480 2002-04-07 Akim Demaille <akim@epita.fr>
18481
18482 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18483 the RHS of the rules.
18484 * src/output.c (output_gram): Likewise.
18485
18486 2002-04-07 Akim Demaille <akim@epita.fr>
18487
18488 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18489 bucket.
18490 Adjust all dependencies.
18491 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18492 `number' of the buckets too.
18493 * src/gram.h: Include `symtab.h'.
18494 (associativity): Move to...
18495 * src/symtab.h: here.
18496 No longer include `gram.h'.
18497
18498 2002-04-07 Akim Demaille <akim@epita.fr>
18499
18500 * src/gram.h, src/gram.c (rules_rhs_length): New.
18501 (ritem_longest_rhs): Use it.
18502 * src/gram.h (rule_t): `number' is a new member.
18503 * src/reader.c (packgram): Set it.
18504 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18505 the end of `rules', and count them out of `nrules'.
18506 (reduce_output, dump_grammar): Adjust.
18507 * src/print.c (print_grammar): It is no longer needed to check for
18508 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18509 * tests/reduce.at (Reduced Automaton): New test.
18510
18511 2002-04-07 Akim Demaille <akim@epita.fr>
18512
18513 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18514 lacking `+ 1' to nrules, Bison reported as useless a token if it
18515 was used solely to set the precedence of the last rule...
18516
18517 2002-04-07 Akim Demaille <akim@epita.fr>
18518
18519 * data/bison.c++, data/bison.simple: Don't output the current file
18520 name in #line, to avoid useless diffs between two identical
18521 outputs under different names.
18522
18523 2002-04-07 Akim Demaille <akim@epita.fr>
18524
18525 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18526 Normalize loops to using `< nrules + 1', not `<= nrules'.
18527
18528 2002-04-07 Akim Demaille <akim@epita.fr>
18529
18530 * TODO: Update.
18531
18532 2002-04-07 Akim Demaille <akim@epita.fr>
18533
18534 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18535 bucket.value as bucket.number.
18536
18537 2002-04-07 Akim Demaille <akim@epita.fr>
18538
18539 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18540 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18541 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18542 RHS, instead of being an index in RITEMS.
18543
18544 2002-04-04 Paul Eggert <eggert@twinsun.com>
18545
18546 * doc/bison.texinfo: Update copyright date.
18547 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18548 (Symbols): Warn about running Bison in one character set,
18549 but compiling and/or running in an incompatible one.
18550 Warn about character code 256, too.
18551
18552 2002-04-03 Paul Eggert <eggert@twinsun.com>
18553
18554 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18555 YYERROR_VERBOSE is nonzero, not whether it is defined.
18556
18557 Merge changes from bison-1_29-branch.
18558
18559 2002-03-20 Paul Eggert <eggert@twinsun.com>
18560
18561 Merge fixes from Debian bison_1.34-1.diff.
18562
18563 * configure.in (AC_PREREQ): 2.53.
18564
18565 2002-03-20 Akim Demaille <akim@epita.fr>
18566
18567 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18568
18569 2002-03-19 Paul Eggert <eggert@twinsun.com>
18570
18571 * src/bison.simple (YYCOPY): New macro.
18572 (YYSTACK_RELOCATE): Use it.
18573 Remove Type arg; no longer needed. All callers changed.
18574 (yymemcpy): Remove; no longer needed.
18575
18576 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18577 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18578
18579 2002-03-19 Akim Demaille <akim@epita.fr>
18580
18581 Test and fix the #line outputs.
18582
18583 * tests/atlocal.at (GCC): New.
18584 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18585 (Prologue synch line, %union synch line, Postprologue synch line)
18586 (Action synch line, Epilogue synch line): New tests.
18587 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18588 * data/bison.simple, data/bison.c++: Use it.
18589
18590 2002-03-19 Akim Demaille <akim@epita.fr>
18591
18592 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18593 (Solved SR Conflicts, %expect not enough, %expect right)
18594 (%expect too much): Move to...
18595 * tests/conflicts.at: this new file.
18596
18597 2002-03-19 Akim Demaille <akim@epita.fr>
18598
18599 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18600 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18601 that we can move to enums for instance.
18602 * src/output.c (token_definitions_output): Output a list of
18603 `token-name, token-number' instead of the #define.
18604 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18605
18606 2002-03-14 Akim Demaille <akim@epita.fr>
18607
18608 Use Gettext 0.11.1.
18609
18610 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18611
18612 * data/bison.c++: Make the user able to add members to the generated
18613 parser by subclassing.
18614
18615 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18616
18617 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18618 a character.
18619 Reported by Nicolas Tisserand and Nicolas Burrus.
18620
18621 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18622
18623 * src/reader.c: Warn about lacking semi-colons, do not complain.
18624
18625 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18626
18627 * data/bison.c++: Remove a debug line.
18628
18629 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18630
18631 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18632 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18633 provide a default implementation.
18634
18635 2002-03-04 Akim Demaille <akim@epita.fr>
18636
18637 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18638 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18639 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18640 * tests/semantic.at (Parsing Guards): Similarly.
18641 * src/reader.at (readgram): Complain if the last rule is not ended
18642 with a semi-colon.
18643
18644 2002-03-04 Akim Demaille <akim@epita.fr>
18645
18646 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18647 * src/closure.c: here.
18648 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18649 RTC.
18650 * src/warshall.h, src/warshall.c: Remove.
18651 * tests/sets.at (Broken Closure): Adjust.
18652
18653 2002-03-04 Akim Demaille <akim@epita.fr>
18654
18655 * src/output.c (output_skeleton): tempdir is const.
18656 bytes_read is unused.
18657
18658 2002-03-04 Akim Demaille <akim@epita.fr>
18659
18660 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18661 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18662 Update.
18663 From Michael Hayes.
18664
18665 2002-03-04 Akim Demaille <akim@epita.fr>
18666
18667 * src/closure.c (closure): `r' is unused.
18668
18669 2002-03-04 Akim Demaille <akim@epita.fr>
18670
18671 * tests/sets.at (Broken Closure): Add the ending `;'.
18672 * src/reader.at (readgram): Complain if a rule is not ended with a
18673 semi-colon.
18674
18675 2002-03-04 Akim Demaille <akim@epita.fr>
18676
18677 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18678 (count_sr_conflicts): Use bitset_count.
18679 * src/reduce.c (inaccessable_symbols): Ditto.
18680 (bits_size): Remove.
18681 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18682
18683 2002-03-04 Akim Demaille <akim@epita.fr>
18684
18685 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18686 * src/reduce.c: Remove the `bitset_zero's following the
18687 `bitset_create's, as now it is performed by the latter.
18688
18689 2002-03-04 Akim Demaille <akim@epita.fr>
18690
18691 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18692 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18693 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18694 latest sources from Michael.
18695
18696 2002-03-04 Akim Demaille <akim@epita.fr>
18697
18698 * src/output.c (output): Don't free the grammar.
18699 * src/reader.c (grammar_free): New.
18700 * src/main.c (main): Call it and don't free symtab here.
18701
18702 2002-03-04 Akim Demaille <akim@epita.fr>
18703
18704 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18705 before returning.
18706 Reported by Benoit Perrot.
18707
18708 2002-03-04 Akim Demaille <akim@epita.fr>
18709
18710 Use bitset operations when possible, not loops over bits.
18711
18712 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18713 bitset_or.
18714 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18715 * src/reduce.c (useless_nonterminals): Formatting changes.
18716 * src/warshall.c (TC): Use bitset_or.
18717
18718 2002-03-04 Akim Demaille <akim@epita.fr>
18719
18720 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18721 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18722 Ditto.
18723
18724 2002-03-04 Akim Demaille <akim@epita.fr>
18725
18726 * src/lalr.c (F): Now a bitset*.
18727 Adjust all dependencies.
18728
18729 2002-03-04 Akim Demaille <akim@epita.fr>
18730
18731 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18732 Adjust all dependencies.
18733
18734 2002-03-04 Akim Demaille <akim@epita.fr>
18735
18736 * src/L0.c, src/LR0.h (nstates): Be size_t.
18737 Adjust comparisons (signed vs unsigned).
18738 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18739 bitset*.
18740 Adjust all dependencies.
18741
18742 2002-03-04 Akim Demaille <akim@epita.fr>
18743
18744 * src/closure.c (firsts): Now, also a bitset.
18745 Adjust all dependencies.
18746 (varsetsize): Remove, now unused.
18747 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18748
18749 2002-03-04 Akim Demaille <akim@epita.fr>
18750
18751 * src/print.c: Convert to use bitset.h, not hand coded iterations
18752 over ints.
18753
18754 2002-03-04 Akim Demaille <akim@epita.fr>
18755
18756 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18757
18758 2002-03-04 Akim Demaille <akim@epita.fr>
18759
18760 * src/closure.c (ruleset): Be a bitset.
18761 (rulesetsize): Remove.
18762
18763 2002-03-04 Akim Demaille <akim@epita.fr>
18764
18765 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18766 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18767 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18768 * src/closure.c (fderives): Be an array of bitsets.
18769
18770 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18771
18772 * data/bison.c++: Merge the two generated headers. Insert a copyright
18773 notice in each output file.
18774
18775 2002-02-28 Akim Demaille <akim@epita.fr>
18776
18777 * data/bison.c++: Copy the prologue of bison.simple to fetch
18778 useful M4 definitions, such as b4_header_guard.
18779
18780 2002-02-25 Akim Demaille <akim@epita.fr>
18781
18782 * src/getargs.c (version): Give the name of the authors, and use a
18783 translator friendly scheme for the bgr
18784 copyright notice.
18785
18786 2002-02-25 Akim Demaille <akim@epita.fr>
18787
18788 * src/output.c (header_output): Remove, now handled completely via
18789 M4.
18790
18791 2002-02-25 Akim Demaille <akim@epita.fr>
18792
18793 * m4/m4.m4: New, from CVS Autoconf.
18794 * configure.in: Invoke it.
18795 * src/output.c (output_skeleton): Use its result instead of the
18796 hard coded name.
18797
18798 2002-02-25 Akim Demaille <akim@epita.fr>
18799
18800 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18801 Fileutils 4.1.5.
18802 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18803 * src/output.c (output_skeleton): Use mkstemp to create a real
18804 temporary file.
18805 Move the filling of `skeleton' and its muscle to...
18806 (prepare): here.
18807 (output): Move the definition of the prologue muscle to...
18808 (prepare): here.
18809 * src/system.h (DEFAULT_TMPDIR): New.
18810
18811 2002-02-14 Paul Eggert <eggert@twinsun.com>
18812
18813 Remove the support for C++ namespace cleanliness; it was
18814 causing more problems than it was curing, since it didn't work
18815 properly on some nonstandard C++ compilers. This can wait
18816 for a proper C++ parser.
18817
18818 * NEWS: Document this.
18819 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18820 of C++, as it's treated like C now.
18821 * src/bison.simple (YYSTD): Remove.
18822 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18823 Treat C++ just like Standard C instead of trying to support
18824 namespace cleanliness.
18825
18826 2002-02-14 Akim Demaille <akim@epita.fr>
18827
18828 * tests/regression.at (else): Adjust to Andreas' change.
18829
18830 2002-02-14 Akim Demaille <akim@epita.fr>
18831
18832 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18833
18834 2002-02-13 Andreas Schwab <schwab@suse.de>
18835
18836 * src/output.c (output_rule_data): Don't output NULL, it might
18837 not be defined yet.
18838
18839 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18840
18841 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18842 (Copyright notice): Update.
18843
18844 2002-02-11 Akim Demaille <akim@epita.fr>
18845
18846 * tests/regression.at (%nonassoc and eof): Don't include
18847 nonportable headers.
18848
18849 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18850
18851 * data/bison.c++: Correct error recovery. Make the user able to
18852 initialize the starting location.
18853
18854 2002-02-07 Akim Demaille <akim@epita.fr>
18855
18856 * tests/input.at: New.
18857
18858 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18859
18860 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18861 more consistent when naming methods and variables. Put preprocessor
18862 directives around tables only needed for debugging.
18863
18864 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18865
18866 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18867 C++ parsers.
18868 (yy::b4_name::parse): Use print_.
18869
18870 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18871
18872 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18873
18874 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18875
18876 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18877 C++ parsers.
18878 (yy::b4_name::parse): Build verbose error messages, and use error_.
18879
18880 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18881
18882 * data/bison.c++: Fix m4 quoting in comments.
18883
18884 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18885
18886 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18887 not expanded by m4.
18888
18889 2002-02-05 Akim Demaille <akim@epita.fr>
18890
18891 * data/bison.c++: Adjust to the M4 back end.
18892 More is certainly needed.
18893
18894 2002-02-05 Akim Demaille <akim@epita.fr>
18895
18896 Give a try to M4 as a back end.
18897
18898 * lib/readpipe.c: New, from wdiff.
18899 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18900 BISON_HAIRY.
18901 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18902 specific values. Now it is m4 that performs the lookup.
18903 * src/parse-skel.y: Remove.
18904 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18905 * src/output.c (actions_output, guards_output)
18906 (token_definitions_output): No longer keeps track of the output
18907 line number, hence remove the second argument.
18908 (guards_output): Check against the guard member of a rule, not the
18909 action member.
18910 Adjust callers.
18911 (output_skeleton): Don't look for the skeleton location, let m4 do
18912 that.
18913 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18914 file will be used.
18915 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18916 (prepare): Given that for the time being changesyntax is not
18917 usable in M4, rename the muscles using `-' to `_'.
18918 Define `defines_flag', `output_parser_name' and `output_header_name'.
18919 * src/output.h (actions_output, guards_output)
18920 (token_definitions_output): Adjust prototypes.
18921 * src/scan-skel.l: Instead of scanning the skeletons, it now
18922 processes the output of m4: `__oline__' and `#output'.
18923 * data/bison.simple: Adjust to be used by M4(sugar).
18924 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18925 to date.
18926 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18927 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18928 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18929 shamelessly stolen from CVS Autoconf.
18930
18931 2002-02-05 Akim Demaille <akim@epita.fr>
18932
18933 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18934 * configure.in: Check for the declarations of free and malloc.
18935 * src/muscle_tab.c: Adjust.
18936
18937 2002-02-05 Akim Demaille <akim@epita.fr>
18938
18939 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18940 which have no values.
18941
18942 2002-02-05 Akim Demaille <akim@epita.fr>
18943
18944 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18945 * data/: here.
18946
18947 2002-01-29 Paul Eggert <eggert@twinsun.com>
18948
18949 * src/bison.simple (YYSIZE_T): Do not define merely because
18950 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18951 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18952
18953 2002-01-27 Akim Demaille <akim@epita.fr>
18954
18955 Fix `%nonassoc and eof'.
18956
18957 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18958 which were not properly copied! Replace
18959 memcpy (res->errs, src->errs, src->nerrs);
18960 with
18961 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18962 !!!
18963 * tests/regression.at (%nonassoc and eof): Adjust to newest
18964 Autotest: `.' is not in the PATH.
18965
18966 2002-01-27 Akim Demaille <akim@epita.fr>
18967
18968 * tests/sets.at (AT_EXTRACT_SETS): New.
18969 (Nullable): Use it.
18970 (Firsts): New.
18971
18972 2002-01-26 Akim Demaille <akim@epita.fr>
18973
18974 * tests/actions.at, tests/calc.at, tests/headers.at,
18975 * tests/torture.at: Adjust to the newest Autotest which no longer
18976 forces `.' in the PATH.
18977
18978 2002-01-25 Akim Demaille <akim@epita.fr>
18979
18980 * tests/regression.at (%nonassoc and eof): New.
18981 Suggested by Robert Anisko.
18982
18983 2002-01-24 Akim Demaille <akim@epita.fr>
18984
18985 Bison dumps core when trying to complain about broken input files.
18986 Reported by Cris van Pelt.
18987
18988 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18989 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18990 into...
18991 (Invalid inputs): Strengthen: exercise parse_percent_token.
18992
18993 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18994
18995 * src/Makefile.am: Add bison.c++.
18996 * src/bison.c++: New skeleton.
18997
18998 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18999
19000 * po/it.po: New.
19001
19002 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19003
19004 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19005
19006 2002-01-20 Marc Autret <marc@gnu.org>
19007
19008 * src/files.c (compute_output_file_names): Fix
19009
19010 2002-01-20 Marc Autret <marc@gnu.org>
19011
19012 * tests/output.at: New test.
19013 * src/files.c (compute_base_names): Don't map extensions when
19014 the YACC flag is set, use defaults.
19015 Reported by Evgeny Stambulchik.
19016
19017 2002-01-20 Marc Autret <marc@gnu.org>
19018
19019 * src/system.h: Need to define __attribute__ away for non-GCC
19020 compilers as well (i.e., the vendor C compiler).
19021 Suggested by Albert Chin-A-Young.
19022
19023 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19024
19025 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19026 canonical definition.
19027 * src/system.h: Use the canonical definition for PARAMS (avoids
19028 a conflict with the macro from lib/hash.h).
19029
19030 2002-01-11 Akim Demaille <akim@epita.fr>
19031
19032 * configure.in: Use AC_FUNC_STRNLEN.
19033 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19034
19035 2002-01-09 Akim Demaille <akim@epita.fr>
19036
19037 * src/files.c, src/files.h (output_infix): New.
19038 (tab_extension): Remove.
19039 (compute_base_names): Compute the former, drop the latter.
19040 * src/output.c (prepare): Insert the muscles `output-infix', and
19041 `output-suffix'.
19042 * src/parse-skel.y (string, string.1): New.
19043 (section.header): Use it.
19044 (section.yacc): Remove.
19045 (prefix): Remove too.
19046 * src/scan-skel.l: Adjust.
19047 * src/bison.simple, src/bison.hairy: Adjust.
19048
19049 2002-01-09 Akim Demaille <akim@epita.fr>
19050
19051 * configure.in (WERROR_CFLAGS): Compute it.
19052 * src/Makefile.am (CFLAGS): Pass it.
19053 * tests/atlocal.in (CFLAGS): Idem.
19054 * src/files.c: Fix a few warnings.
19055 (get_extension_index): Remove, unused.
19056
19057 2002-01-08 Akim Demaille <akim@epita.fr>
19058
19059 * src/getargs.c (AS_FILE_NAME): New.
19060 (getargs): Use it to convert DOSish file names.
19061 * src/files.c (base_name): Rename as full_base_name to avoid
19062 clashes with `base_name ()'.
19063 (filename_split): New.
19064 (compute_base_names): N-th rewrite, using filename_split.
19065
19066 2002-01-08 Akim Demaille <akim@epita.fr>
19067
19068 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19069 New, stolen from the Fileutils 4.1.
19070 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19071 * configure.in: Check for the presence of memrchr, and of its
19072 prototype.
19073
19074 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19075
19076 * lib/hash.h (__P): Added definition for this macro.
19077 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19078 BUILT_SOURCES, to ensure they are generated first.
19079 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19080 %error-verbose to allow bootstrapping with bison 1.30x.
19081
19082 2002-01-06 Akim Demaille <akim@epita.fr>
19083
19084 * src/reader.c (parse_braces): Don't fetch the next char, the
19085 convention is to fetch on entry.
19086 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19087 'switch' without a following semicolon.
19088 * tests/regression.at (braces parsing): New.
19089
19090 2002-01-06 Akim Demaille <akim@epita.fr>
19091
19092 Bison is dead wrong in its RR conflict reports.
19093
19094 * tests/torture.at (GNU Cim Grammar): New.
19095 * src/conflicts.c (count_rr_conflicts): Fix.
19096
19097 2002-01-06 Akim Demaille <akim@epita.fr>
19098
19099 Creating package.m4 from configure.ac causes too many problems.
19100
19101 * tests/Makefile.am (package.m4): Create it by hand,
19102 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19103
19104 2002-01-06 Akim Demaille <akim@epita.fr>
19105
19106 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19107 skeleton.h.
19108
19109 2002-01-04 Paul Eggert <eggert@twinsun.com>
19110
19111 * doc/bison.texinfo (Debugging):
19112 Remove YYSTDERR; it's no longer defined or used.
19113 Also, s/cstdio.h/cstdio/.
19114
19115 2002-01-03 Akim Demaille <akim@epita.fr>
19116
19117 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19118
19119 2002-01-03 Akim Demaille <akim@epita.fr>
19120
19121 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19122 tracing code to --trace, wait for a better --trace option, with
19123 args.
19124
19125 2002-01-03 Akim Demaille <akim@epita.fr>
19126
19127 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19128 The ISO C++ standard is extremely clear about it: stderr is
19129 considered a macro, not a regular symbol (see table 94 `Header
19130 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19131 Therefore std:: does not apply to it. It still does with fprintf.
19132 Also, s/cstdio.h/cstdio/.
19133
19134 2002-01-03 Akim Demaille <akim@epita.fr>
19135
19136 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19137 for non system headers.
19138
19139 2002-01-02 Akim Demaille <akim@epita.fr>
19140
19141 Equip the skeleton chain with location tracking, runtime trace,
19142 pure parser and scanner.
19143
19144 * src/parse-skel.y: Request a pure parser, locations, and prefix
19145 renaming.
19146 (%union): Having several members with the same type does not help
19147 type mismatches, simplify.
19148 (YYPRINT, yyprint): New.
19149 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19150 (skel_error): this.
19151 Handle locations.
19152 * src/scan-skel.l: Adjust to these changes.
19153 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19154 (LOCATION_PRINT, skel_control_t): New.
19155
19156 2001-12-30 Akim Demaille <akim@epita.fr>
19157
19158 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19159 replace `gb' with BLANKS.
19160 * src/scan-skel.l: Adjust.
19161
19162 2001-12-30 Akim Demaille <akim@epita.fr>
19163
19164 * src/system.h: We don't need nor want bcopy.
19165 Throw away MS-DOS crap: we don't need getpid.
19166 * configure.in: We don't need strndup. It was even causing
19167 problems: because Flex includes the headers *before* us,
19168 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19169 not visible.
19170 * lib/xstrndup.c: New.
19171 * src/scan-skel.l: Use it.
19172 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19173 * src/parse-skel.y: Use %directives instead of #defines.
19174
19175 2001-12-30 Akim Demaille <akim@epita.fr>
19176
19177 * src/skeleton.h: New.
19178 * src/output.c (output_parser, output_master_parser): Remove, dead
19179 code.
19180 * src/output.h (get_lines_number, actions_output, guards_output)
19181 (token_definitions_output): Prototype them.
19182 * src/parse-skel.y: Add the license notice.
19183 Include output.h and skeleton.h.
19184 (process_skeleton): Returns void, and takes a single parameter.
19185 * src/scan-skel.l: Add the license notice.
19186 Include skeleton.h.
19187 Don't use %option yylineno: it seems that then Flex imagines
19188 REJECT has been used, and therefore it won't reallocate its
19189 buffers (which makes no other sense to me than a bug). It results
19190 in warnings for `unused: yy_flex_realloc'.
19191
19192 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19193
19194 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19195 (MUSCLE_INSERT_PREFIX): ...to there.
19196 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19197 (MUSCLE_INSERT_PREFIX): Move from here...
19198
19199 * src/bison.hairy: Add a section directive. Put braces around muscle
19200 names. This parser skeleton is still broken, but Bison should not
19201 choke on a bad muscle 'syntax'.
19202 * src/bison.simple: Add a section directive. Put braces around muscle
19203 names.
19204
19205 * src/files.h (strsuffix, stringappend): Add declarations.
19206 (tab_extension): Add declaration.
19207 (short_base_name): Add declaration.
19208
19209 * src/files.c (strsuffix, stringappend): No longer static. These
19210 functions are used in the skeleton parser.
19211 (tab_extension): New.
19212 (compute_base_names): Use the computations done in this function
19213 to guess if the generated parsers should have '.tab' in their
19214 names.
19215 (short_base_name): No longer static.
19216
19217 * src/output.c (output_skeleton): New.
19218 (output): Disable call to output_master_parser, and give a try to
19219 a new skeleton handling system.
19220 (guards_output, actions_output): No longer static.
19221 (token_definitions_output, get_lines_number): No longer static.
19222
19223 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19224
19225 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19226 parse-skel.y.
19227
19228 * src/parse-skel.y: New file.
19229 * src/scan-skel.l: New file.
19230
19231 2001-12-29 Akim Demaille <akim@epita.fr>
19232
19233 %name-prefix is broken.
19234
19235 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19236 Adjust all dependencies.
19237 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19238 %name-prefix.
19239
19240 Renaming yylval but not yylloc is not consistent. Now we do.
19241
19242 * src/bison.simple: Prefix yylloc if used.
19243 * doc/bison.texinfo (Decl Summary): Document that.
19244
19245 2001-12-29 Akim Demaille <akim@epita.fr>
19246
19247 * doc/bison.texinfo: Promote `%long-directive' over
19248 `%long_directive'.
19249 Remove all references to fixed-output-files, yacc is enough.
19250
19251 2001-12-29 Akim Demaille <akim@epita.fr>
19252
19253 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19254 user prologue. These are defaults.
19255 * tests/actions.at (Mid-rule actions): Make sure the user can
19256 define YYDEBUG and YYERROR_VERBOSE.
19257
19258 2001-12-29 Akim Demaille <akim@epita.fr>
19259
19260 * src/output.c (header_output): Don't forget to export YYLTYPE and
19261 yylloc.
19262 * tests/headers.at (export YYLTYPE): New, make sure it does.
19263 * tests/regression.at (%union and --defines, Invalid CPP headers):
19264 Move to...
19265 * tests/headers.at: here.
19266
19267 2001-12-29 Akim Demaille <akim@epita.fr>
19268
19269 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19270
19271 2001-12-29 Akim Demaille <akim@epita.fr>
19272
19273 * tests/actions.at (Mid-rule actions): Output on a single line
19274 instead of several.
19275
19276 2001-12-29 Akim Demaille <akim@epita.fr>
19277
19278 * doc/bison.texinfo: Formatting changes.
19279
19280 2001-12-29 Akim Demaille <akim@epita.fr>
19281
19282 Don't store the token defs in a muscle, just be ready to output it
19283 on command. Now possible via `symbols'. Fixes a memory leak.
19284
19285 * src/output.c (token_definitions_output): New.
19286 (output_parser, header_output): Use it.
19287 * src/reader.c (symbols_save): Remove.
19288
19289 2001-12-29 Akim Demaille <akim@epita.fr>
19290
19291 * src/bison.simple: Do not provide a default for YYSTYPE and
19292 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19293 default.
19294
19295 2001-12-29 Akim Demaille <akim@epita.fr>
19296
19297 Mid-rule actions are simply... ignored!
19298
19299 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19300 the empty-rule associated to the dummy symbol, not to the host
19301 rule.
19302 * tests/actions.at (Mid-rule actions): New.
19303
19304 2001-12-29 Akim Demaille <akim@epita.fr>
19305
19306 Memory leak.
19307
19308 * src/reader.c (reader): Free grammar.
19309
19310 2001-12-29 Akim Demaille <akim@epita.fr>
19311
19312 Memory leak.
19313
19314 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19315 since it allocates it for each state, although only one is needed.
19316 (allocate_storage): Do it here.
19317
19318 2001-12-29 Akim Demaille <akim@epita.fr>
19319
19320 * src/options.h, src/options.c (create_long_option_table): Rename
19321 as...
19322 (long_option_table_new): this, with a clearer prototype.
19323 (percent_table): Remove, unused,
19324 * src/getargs.c (getargs): Adjust.
19325
19326 2001-12-29 Akim Demaille <akim@epita.fr>
19327
19328 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19329 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19330 as states.
19331
19332 2001-12-29 Akim Demaille <akim@epita.fr>
19333
19334 * src/lalr.c (build_relations): Rename `states' as `states1'.
19335 Sorry, I don't understand exactly what it is, no better name...
19336
19337 2001-12-29 Akim Demaille <akim@epita.fr>
19338
19339 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19340 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19341 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19342 as rules.
19343
19344 2001-12-29 Akim Demaille <akim@epita.fr>
19345
19346 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19347 ago.
19348
19349 2001-12-29 Akim Demaille <akim@epita.fr>
19350
19351 * src/reader.c, src/reader.h (user_toknums): Remove.
19352 Adjust all users to use symbols[i]->user_token_number.
19353
19354 2001-12-29 Akim Demaille <akim@epita.fr>
19355
19356 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19357 Adjust all users to use symbols[i]->prec or ->assoc.
19358
19359 2001-12-29 Akim Demaille <akim@epita.fr>
19360
19361 * src/reader.c, src/reader.h (tags): Remove.
19362 Adjust all users to use symbols[i]->tag.
19363
19364 2001-12-29 Akim Demaille <akim@epita.fr>
19365
19366 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19367 and rule_table.
19368 * src/reader.c (packsymbols): Fill this table.
19369 Drop sprec.
19370 * src/conflicts.c (resolve_sr_conflict): Adjust.
19371 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19372 single table.
19373 Use symbols[i]->tag instead of tags[i].
19374
19375 2001-12-29 Akim Demaille <akim@epita.fr>
19376
19377 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19378 In addition, put a comment in there, to replace...
19379 * tests/regression.at (%union and C comments): Remove.
19380
19381 2001-12-29 Akim Demaille <akim@epita.fr>
19382
19383 * tests/regression.at (Web2c Actions): Blindly move the actual
19384 output as expected output. The contents *seem* right to me, but I
19385 can't pretend reading perfectly parser tables... Nonetheless, all
19386 the other tests pass correctly, the table look OK, even though the
19387 presence of `$axiom' is to be noted: AFAICS it is useless (but
19388 harmless).
19389
19390 2001-12-29 Akim Demaille <akim@epita.fr>
19391
19392 * src/reader.c (readgram): Don't add the rule 0 if there were no
19393 rules read. In other words, add it _after_ having performed
19394 grammar sanity checks.
19395 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19396
19397 2001-12-29 Akim Demaille <akim@epita.fr>
19398
19399 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19400 visible, and some states have now a different number.
19401
19402 2001-12-29 Akim Demaille <akim@epita.fr>
19403
19404 * src/reader.c (readgram): Bind the initial rule's lineno to that
19405 of the first rule.
19406 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19407 (Solved SR Conflicts): Adjust rule 0's line number.
19408
19409 2001-12-29 Akim Demaille <akim@epita.fr>
19410
19411 Fix the `GAWK Grammar' failure.
19412
19413 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19414 the reductions of the first state which was mistakenly confused
19415 with the final state because precisely final_state was initialized
19416 to 0.
19417 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19418 now noticed by Bison.
19419 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19420 have a reduction on $default.
19421
19422 2001-12-29 Akim Demaille <akim@epita.fr>
19423
19424 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19425 rule line numbers.
19426 * src/closure.c (print_closure): Likewise.
19427 * src/derives.c (print_derives): Likewise.
19428 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19429 now.
19430
19431 2001-12-29 Akim Demaille <akim@epita.fr>
19432
19433 * src/lalr.c (lookaheads_print): New.
19434 (lalr): Call it when --trace-flag.
19435 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19436 are dumped.
19437
19438 2001-12-29 Akim Demaille <akim@epita.fr>
19439
19440 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19441 when walking through ritem, even via rule->rhs.
19442 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19443 (useful_production, useless_nonterminals): Likewise.
19444 (reduce_grammar_tables): Likewise, plus update nritems.
19445 * src/nullable.c (set_nullable): Likewise.
19446 * src/lalr.c (build_relations): Likewise.
19447 * tests/sets.at (Nullable): Adjust.
19448 Fortunately, now, the $axiom is no longer nullable.
19449
19450 2001-12-29 Akim Demaille <akim@epita.fr>
19451
19452 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19453 the 0-sentinel.
19454 * src/gram.c (ritem_longest_rhs): Likewise.
19455 * src/reduce.c (nonterminals_reduce): Likewise.
19456 * src/print_graph.c (print_graph): Likewise.
19457 * src/output.c (output_rule_data): Likewise.
19458 * src/nullable.c (set_nullable): Likewise.
19459
19460 2001-12-29 Akim Demaille <akim@epita.fr>
19461
19462 * src/output.c: Comment changes.
19463
19464 2001-12-27 Paul Eggert <eggert@twinsun.com>
19465
19466 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19467 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19468 Sparc, as they were causing more porting problems than the
19469 (minor) performance improvement was worth.
19470
19471 Also, catch up with 1.31's YYSTD.
19472
19473 2001-12-27 Akim Demaille <akim@epita.fr>
19474
19475 * src/output.c (output_gram): Rely on nritems, not the
19476 0-sentinel. See below.
19477 Use -1 as separator, not 0.
19478 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19479 Rely on -1 as separator in yyrhs, instead of 0.
19480 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19481 twice `Now at end of input', therefore there are two lines less to
19482 expect.
19483
19484 2001-12-27 Akim Demaille <akim@epita.fr>
19485
19486 * tests/regression.at (Unresolved SR Conflicts):
19487 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19488 below.
19489
19490 2001-12-27 Akim Demaille <akim@epita.fr>
19491
19492 * src/LR0.c (new_state): Recognize the final state by the fact it
19493 is reached by eoftoken.
19494 (insert_start_shifting_state, insert_eof_shifting_state)
19495 (insert_accepting_state, augment_automaton): Remove, since now
19496 these states are automatically computed from the initial state.
19497 (generate_states): Adjust.
19498 * src/print.c: When reporting a rule number to the user, substract
19499 1, so that the axiom rule is rule 0, and the first user rule is 1.
19500 * src/reduce.c: Likewise.
19501 * src/print_graph.c (print_core): For the time being, just as for
19502 the report, depend upon --trace-flags to dump the full set of
19503 items.
19504 * src/reader.c (readgram): Once the grammar read, insert the rule
19505 0: `$axiom: START-SYMBOL $'.
19506 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19507 number of the states has changed (the final state is no longer
19508 necessarily the last), catch up.
19509
19510 2001-12-27 Akim Demaille <akim@epita.fr>
19511
19512 Try to make the use of the eoftoken valid. Given that its value
19513 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19514 is used instead of > 0 where appropriate, (ii), depend upon nritems
19515 instead of the 0-sentinel.
19516
19517 * src/gram.h, src/gram.c (nritems): New.
19518 Expected to be duplication of nitems, but for the time being...
19519 * src/reader.c (packgram): Assert nritems and nitems are equal.
19520 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19521 * src/closure.c (print_closure, print_fderives): Likewise.
19522 * src/gram.c (ritem_print): Likewise.
19523 * src/print.c (print_core, print_grammar): Likewise.
19524 * src/print_graph.c: Likewise.
19525
19526 2001-12-27 Akim Demaille <akim@epita.fr>
19527
19528 * src/main.c (main): If there are complains after grammar
19529 reductions, then output the report anyway if requested, then die.
19530 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19531 * src/reader.c (eoftoken): New.
19532 (parse_token_decl): If the token being defined has value `0', it
19533 is the eoftoken.
19534 (packsymbols): No longer hack `tags' to insert `$' by hand.
19535 Be sure to preserve the value of the eoftoken.
19536 (reader): Make sure eoftoken is defined.
19537 Initialize nsyms to 0: now eoftoken is created just like the others.
19538 * src/print.c (print_grammar): Don't special case the eof token.
19539 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19540 lie anyway, albeit pleasant.
19541 * tests/calc.at: Exercise error messages with eoftoken.
19542 Change the grammar so that empty input is invalid.
19543 Adjust expectations.
19544 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19545
19546 2001-12-27 Akim Demaille <akim@epita.fr>
19547
19548 * configure.in: Check the protos of strchr ans strspn.
19549 Replace strchr if needed.
19550 * src/system.h: Provide the protos of strchr, strspn and memchr if
19551 missing.
19552 * lib/strchr.c: New.
19553 * src/reader.c (symbols_save): Use strchr.
19554
19555 2001-12-27 Akim Demaille <akim@epita.fr>
19556
19557 * src/print.c, src/print_graph.c (escape): New.
19558 Use it to quote the TAGS outputs.
19559 * src/print_graph.c (print_state): Now errors are in red, and
19560 reductions in green.
19561 Prefer high to wide: output the state number on a line of its own.
19562
19563 2001-12-27 Akim Demaille <akim@epita.fr>
19564
19565 * src/state.h, src/state.c (reductions_new): New.
19566 * src/LR0.c (set_state_table): Let all the states have a
19567 `reductions', even if reduced to 0.
19568 (save_reductions): Adjust.
19569 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19570 * src/print.c (print_reductions, print_actions): Adjust.
19571 * src/output.c (action_row): Adjust.
19572
19573 2001-12-27 Akim Demaille <akim@epita.fr>
19574
19575 * src/state.h, src/state.c (errs_new, errs_dup): New.
19576 * src/LR0.c (set_state_table): Let all the states have an errs,
19577 even if reduced to 0.
19578 * src/print.c (print_errs, print_reductions): Adjust.
19579 * src/output.c (output_actions, action_row): Adjust.
19580 * src/conflicts.c (resolve_sr_conflict): Adjust.
19581
19582 2001-12-27 Akim Demaille <akim@epita.fr>
19583
19584 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19585
19586 2001-12-27 Akim Demaille <akim@epita.fr>
19587
19588 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19589 * src/print.c: here.
19590 (lookaheadset, shiftset): New, used as additional storage by
19591 print_reductions.
19592 (print_results): Adjust.
19593 (print_shifts, print_gotos, print_errs): New, extracted from...
19594 (print_actions): here.
19595 * src/print_graph.c (print_actions): Remove dead code.
19596
19597 2001-12-27 Akim Demaille <akim@epita.fr>
19598
19599 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19600 `$n' and `@n'.
19601
19602 2001-12-27 Akim Demaille <akim@epita.fr>
19603
19604 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19605 (build_relations): Adjust.
19606
19607 2001-12-27 Akim Demaille <akim@epita.fr>
19608
19609 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19610 duplication.
19611
19612 2001-12-27 Akim Demaille <akim@epita.fr>
19613
19614 * src/reader.c (packgram): Catch nitems overflows.
19615
19616 2001-12-27 Akim Demaille <akim@epita.fr>
19617
19618 * src/files.c, src/files.h (guard_obstack): Remove.
19619 * src/output.c (output): Adjust.
19620 * src/reader.c (parse_braces): New, factoring...
19621 (copy_action, copy_guard): these two which are renamed as...
19622 (parse_action, parse_guard): these.
19623 As a voluntary consequence, using braces around guards is now
19624 mandatory.
19625
19626 2001-12-27 Akim Demaille <akim@epita.fr>
19627
19628 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19629 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19630 members.
19631 (symbol_list_new): Adjust.
19632 (copy_action): action_line is the first line, not the last.
19633 (copy_guard): Just as for actions, store the `action' only, not
19634 the switch/case/break flesh.
19635 Don't parse the user action that might follow the guard, let...
19636 (readgram): do it, i.e., now, there can be an action after a
19637 guard.
19638 In other words the guard is just explicitly optional.
19639 (packgram): Adjust.
19640 * src/output.c (guards_output): New.
19641 (output_parser): Call it when needed.
19642 (output): Also free the guard and attrs obstacks.
19643 * src/files.c, src/files.h (obstack_save): Remove.
19644 (output_files): Remove.
19645 As a result, if one needs the former `.act' file, using an
19646 appropriate skeleton which requires actions and guards is now
19647 required.
19648 * src/main.c (main): Adjust.
19649 * tests/semantic.at: New.
19650 * tests/regression.at: Use `input.y' as input file name.
19651 Avoid 8+3 problems by requiring input.c when the test needs the
19652 parser.
19653
19654 2001-12-27 Akim Demaille <akim@epita.fr>
19655
19656 * src/reader.c (symbol_list_new): Be sure to initialize all the
19657 fields.
19658
19659 2001-12-27 Akim Demaille <akim@epita.fr>
19660
19661 All the hacks using a final pseudo state are now useless.
19662
19663 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19664 * src/lalr.c (nLA): New.
19665 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19666 instead of lookaheadsp from the pseudo state (nstate + 1).
19667
19668 2001-12-27 Akim Demaille <akim@epita.fr>
19669
19670 * src/output.c (action_row, token_actions): Use a state_t instead
19671 of a integer, and nlookaheads instead of the following state's
19672 lookaheadsp.
19673
19674 2001-12-27 Akim Demaille <akim@epita.fr>
19675
19676 * src/conflicts.c (log_resolution, flush_shift)
19677 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19678 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19679 (conflicts_print, print_reductions): Use a state_t instead of an
19680 integer when referring to a state.
19681 As much as possible, depend upon nlookaheads, instead of the
19682 `lookaheadsp' member of the following state (since lookaheads of
19683 successive states are successive, the difference between state n + 1
19684 and n served as the number of lookaheads for state n).
19685 * src/lalr.c (add_lookback_edge): Likewise.
19686 * src/print.c (print_core, print_actions, print_state)
19687 (print_results): Likewise.
19688 * src/print_graph.c (print_core, print_actions, print_state)
19689 (print_graph): Likewise.
19690 * src/conflicts.h: Adjust.
19691
19692 2001-12-27 Akim Demaille <akim@epita.fr>
19693
19694 * src/bison.hairy: Formatting/comment changes.
19695 ANSIfy.
19696 Remove `register' indications.
19697 Add plenty of `static'.
19698
19699 2001-12-27 Akim Demaille <akim@epita.fr>
19700
19701 * src/output.c (prepare): Drop the muscle `ntbase' which
19702 duplicates ntokens.
19703 * src/bison.simple: Formatting/comment changes.
19704 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19705 is an undocumented synonym.
19706
19707 2001-12-22 Akim Demaille <akim@epita.fr>
19708
19709 * src/output.c (output_table_data): Change the prototype to use
19710 `int' for array ranges: some invocations do pass an int, not a
19711 short.
19712 Reported by Wayne Green.
19713
19714 2001-12-22 Akim Demaille <akim@epita.fr>
19715
19716 Some actions of web2c.y are improperly triggered.
19717 Reported by Mike Castle.
19718
19719 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19720 * tests/regression.at (Web2c): Rename as...
19721 (Web2c Report): this.
19722 (Web2c Actions): New.
19723
19724 2001-12-22 Akim Demaille <akim@epita.fr>
19725
19726 Reductions in web2c.y are improperly reported.
19727 Reported by Mike Castle.
19728
19729 * src/conflicts.c (print_reductions): Fix.
19730 * tests/regression.at (Web2c): New.
19731
19732 2001-12-18 Akim Demaille <akim@epita.fr>
19733
19734 Some host fail on `assert (!"foo")', which expands to
19735 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19736 Reported by Nelson Beebee.
19737
19738 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19739 `#define it_succeeded 0' and `assert (it_succeeded)'.
19740
19741 2001-12-17 Marc Autret <autret_m@epita.fr>
19742
19743 * src/bison.simple: Don't hard code the skeleton line and filename.
19744 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19745 New line counter 'skeleton_line' (skeleton-line muscle).
19746
19747 2001-12-17 Paul Eggert <eggert@twinsun.com>
19748
19749 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19750 YYDEBUG must be defined to a nonzero value.
19751
19752 * src/bison.simple (yytname): Do not assume that the user defines
19753 YYDEBUG to a properly parenthesized expression.
19754
19755 2001-12-17 Akim Demaille <akim@epita.fr>
19756
19757 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19758 nlookaheads is a new member.
19759 Adjust all users.
19760 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19761 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19762 state.
19763
19764 2001-12-17 Akim Demaille <akim@epita.fr>
19765
19766 * src/files.h, src/files.c (open_files, close_files): Remove.
19767 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19768 let...
19769 * src/reader.c (reader): Do it.
19770
19771 2001-12-17 Akim Demaille <akim@epita.fr>
19772
19773 * src/conflicts.c (print_reductions): Formatting changes.
19774
19775 2001-12-17 Akim Demaille <akim@epita.fr>
19776
19777 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19778 (flush_reduce): New.
19779 (resolve_sr_conflict): Adjust.
19780
19781 2001-12-17 Akim Demaille <akim@epita.fr>
19782
19783 * src/output.c (output_obstack): Be static and rename as...
19784 (format_obstack): this, to avoid any confusion with files.c's
19785 output_obstack.
19786 * src/reader.h (muscle_obstack): Move to...
19787 * src/output.h: here, since it's defined in output.c.
19788
19789 2001-12-17 Akim Demaille <akim@epita.fr>
19790
19791 * src/output.c (action_row, save_column, default_goto)
19792 (sort_actions, matching_state, pack_vector): Better variable
19793 locality.
19794
19795 2001-12-17 Akim Demaille <akim@epita.fr>
19796
19797 * src/output.c: Various formatting changes.
19798
19799 2001-12-17 Akim Demaille <akim@epita.fr>
19800
19801 * src/files.c (output_files): Free the output_obstack.
19802 * src/main.c (main): Call print and print_graph conditionally.
19803 * src/print.c (print): Work unconditionally.
19804 * src/print_graph.c (print_graph): Work unconditionally.
19805 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19806
19807 2001-12-16 Marc Autret <autret_m@epita.fr>
19808
19809 * src/output.c (actions_output): Fix. When we use %no-lines,
19810 there is one less line per action.
19811
19812 2001-12-16 Marc Autret <autret_m@epita.fr>
19813
19814 * src/bison.simple: Remove a useless #line directive.
19815 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19816 * src/output.c (get_lines_number): New.
19817 (output_parser): Adjust, now takes care about the lines of a
19818 output muscles.
19819 Fix line numbering.
19820 (actions_output): Computes the number of lines taken by actions.
19821 (output_master_parser): Insert new skeleton which is the name of
19822 the output parser file name.
19823
19824 2001-12-15 Marc Autret <autret_m@epita.fr>
19825
19826 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19827
19828 2001-12-15 Marc Autret <autret_m@epita.fr>
19829
19830 * src/output.c (output_gram): Keep track of the hairy one.
19831
19832 2001-12-15 Akim Demaille <akim@epita.fr>
19833
19834 Make `make distcheck' work.
19835
19836 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19837 system.h which uses libgettext.h.
19838
19839 2001-12-15 Akim Demaille <akim@epita.fr>
19840
19841 * src/nullable.c (set_nullable): Useless rules must be skipped,
19842 otherwise, since we range over their symbols, we might look at a
19843 nonterminal which no longer ``exists'', i.e., it is not counted in
19844 `nvars', hence we overflow our arrays.
19845
19846 2001-12-15 Akim Demaille <akim@epita.fr>
19847
19848 The header can also be produced directly, without any obstack!
19849 Yahoo!
19850
19851 * src/files.c, src/files.h (defines_obstack): Remove.
19852 (compute_header_macro): Global.
19853 (defines_obstack_save): Remove.
19854 * src/reader.c (parse_union_decl): No longer output to
19855 defines_obstack: its content can be found in the `stype' muscle
19856 anyway.
19857 (output_token_translations): Merge into...
19858 (symbols_output): this.
19859 Rename as...
19860 (symbols_save): this.
19861 (reader): Adjust.
19862 * src/output.c (header_output): New.
19863 (output): Call it.
19864
19865 2001-12-15 Akim Demaille <akim@epita.fr>
19866
19867 * src/reader.c (parse_union_decl): Instead of handling two obstack
19868 simultaneously, use one to define the `stype' muscle, and use the
19869 value of the latter to fill defines_obstack.
19870 (copy_comment): Remove.
19871 (copy_comment2): Work for a single obstack.
19872 Rename as...
19873 (copy_comment): this.
19874
19875 2001-12-15 Akim Demaille <akim@epita.fr>
19876
19877 * src/lex.c, src/lex.h (xgetc): No longer static.
19878 * src/reader.c (parse_union_decl): Revamp.
19879
19880 2001-12-15 Akim Demaille <akim@epita.fr>
19881
19882 Still making progress in separating Bison into (i) input, (ii)
19883 process, (iii) output: now we can directly output the parser file
19884 without using table_obstack at all.
19885
19886 * src/files.c, src/files.h (table_obstack): Bye bye.
19887 (parser_file_name): New.
19888 * src/files.c (compute_output_file_names): Compute it.
19889 * src/output.c (actions_output, output_parser)
19890 (output_master_parser): To a file instead of an obstack.
19891
19892 2001-12-15 Akim Demaille <akim@epita.fr>
19893
19894 Attach actions to rules, instead of pre-outputting them to
19895 actions_obstack.
19896
19897 * src/gram.h (rule_t): action and action_line are new members.
19898 * src/reader.c (symbol_list): Likewise.
19899 (copy_action): Save the actions within the rule.
19900 (packgram): Save them in rule_table.
19901 * src/output.c (actions_output): New.
19902 (output_parser): Use it on `%%actions'.
19903 (output_rule_data): Don't free rule_table.
19904 (output): Do it.
19905 (prepare): Don't save the `action' muscle.
19906 * src/bison.simple: s/%%action/%%actions/.
19907
19908 2001-12-15 Akim Demaille <akim@epita.fr>
19909
19910 * src/reader.c (copy_action): When --yacc, don't append a `;'
19911 to the user action: let it fail if lacking.
19912 Suggested by Arnold Robbins and Tom Tromey.
19913
19914 2001-12-14 Akim Demaille <akim@epita.fr>
19915
19916 * src/lex.c (literalchar): Simply return the char you decoded, non
19917 longer mess around with obstacks and int pointers.
19918 Adjust all callers.
19919
19920 2001-12-14 Akim Demaille <akim@epita.fr>
19921
19922 * src/lex.c (literalchar): Don't escape the special characters,
19923 just decode them, and keep them as char (before, eol was output as
19924 the 2 char string `\n' etc.).
19925 * src/output.c (output_rule_data): Use quotearg to output the
19926 token strings.
19927
19928 2001-12-13 Paul Eggert <eggert@twinsun.com>
19929
19930 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19931 Do not infringe on the global user namespace when using C++.
19932 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19933 All uses of `fprintf' and `stderr' changed.
19934
19935 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19936
19937 2001-12-13 Akim Demaille <akim@epita.fr>
19938
19939 The computation of nullable is broken: it doesn't handle empty
19940 RHS's properly.
19941
19942 * tests/torture.at (GNU AWK Grammar): New.
19943 * tests/sets.at (Nullable): New.
19944 * src/nullable.c (set_nullable): Instead of blindly looping over
19945 `ritems', loop over the rules, and then over their rhs's.
19946
19947 Work around Autotest bugs.
19948
19949 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19950 frame, because Autotest understand lines starting with a `+' as
19951 traces from the shell. Then, they are not processed properly.
19952 Admittedly an Autotest bug, but we don't have time to wait for
19953 Autotest to catch up.
19954 * tests/regression.at (Broken Closure): Adjust to the new table
19955 frames.
19956 Move to...
19957 * tests/sets.at: here.
19958
19959 2001-12-13 Akim Demaille <akim@epita.fr>
19960
19961 * src/closure.c (closure): Use nrules instead of playing tricks
19962 with BITS_PER_WORD.
19963
19964 2001-12-13 Akim Demaille <akim@epita.fr>
19965
19966 * src/print.c (print_actions): Output the handling of `$' as the
19967 traces do: shifting the token EOF. Before EOF was treated as a
19968 nonterminal.
19969 * tests/regression.at: Adjust some tests.
19970 * src/print_graph.c (print_core): Complete the set of items via
19971 closure. The next-to-final and final states are still unsatisfying,
19972 but that's to be addressed elsewhere.
19973 No longer output the rule numbers, but do output the state number.
19974 A single loop for the shifts + gotos is enough, but picked a
19975 distinct color for each.
19976 (print_graph): Initialize and finalize closure.
19977
19978 2001-12-13 Akim Demaille <akim@epita.fr>
19979
19980 * src/reader.c (readgram): Remove dead code, an strip useless
19981 braces.
19982 (get_type): Remove, unused.
19983
19984 2001-12-12 Akim Demaille <akim@epita.fr>
19985
19986 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19987 on that of lib/error.c.
19988
19989 2001-12-12 Akim Demaille <akim@epita.fr>
19990
19991 Some hosts don't like `/' in includes.
19992
19993 * src/system.h: Include libgettext.h without qualifying the path.
19994 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19995 $(top_srcdir).
19996
19997 2001-12-11 Marc Autret <autret_m@epita.fr>
19998
19999 * src/output.c (output_parser): Remove useless muscle.
20000
20001 2001-12-11 Marc Autret <autret_m@epita.fr>
20002
20003 * src/bison.simple: Remove #line just before %%epilogue. It
20004 is now handled in ...
20005 * src/reader.c (read_additionnal_code): Add the output of a
20006 #line for the epilogue.
20007
20008 2001-12-10 Marc Autret <autret_m@epita.fr>
20009
20010 * src/reader.c (copy_definition): Re-use CPP-outed code which
20011 replace precedent remove.
20012 * src/bison.simple: Remove #line before %%prologue because
20013 %%input-line is wrong at this time.
20014
20015 2001-12-10 Marc Autret <autret_m@epita.fr>
20016
20017 * src/reader.c (symbols_output): Clean up.
20018 * src/output.c (output_gram, output): Clean up.
20019
20020 2001-12-10 Akim Demaille <akim@epita.fr>
20021
20022 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20023 * src/LR0.c (set_state_table): here.
20024 * src/lalr.c (lalr): Call it.
20025
20026 2001-12-10 Akim Demaille <akim@epita.fr>
20027
20028 * src/state.h (shifts): Remove the `number' member: shifts are
20029 attached to state, hence no longer need to be labelled with a
20030 state number.
20031
20032 2001-12-10 Akim Demaille <akim@epita.fr>
20033
20034 Now that states have a complete set of members, the linked list of
20035 shifts is useless: just fill directly the state's shifts member.
20036
20037 * src/state.h (shifts): Remove the `next' member.
20038 * src/LR0.c (first_state, last_state): Remove.
20039 Adjust the callers.
20040 (augment_automaton): Don't look for the shifts that must be added
20041 a shift on EOF: it is those of the state we looked for! But now,
20042 since shifts are attached, it is no longer needed to looking
20043 merely by its id: its number.
20044
20045 2001-12-10 Akim Demaille <akim@epita.fr>
20046
20047 * src/LR0.c (augment_automaton): Better variable locality.
20048 Remove an impossible branch: if there is a state corresponding to
20049 the start symbol being shifted, then there is shift for the start
20050 symbol from the initial state.
20051
20052 2001-12-10 Akim Demaille <akim@epita.fr>
20053
20054 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20055 only when appropriate: when insert_start_shifting_state' is not
20056 invoked.
20057 * tests/regression.at (Rule Line Numbers): Adjust.
20058
20059 2001-12-10 Akim Demaille <akim@epita.fr>
20060
20061 * src/LR0.c (augment_automaton): Now that all states have shifts,
20062 merge the two cases addition shifts to the initial state.
20063
20064 2001-12-10 Akim Demaille <akim@epita.fr>
20065
20066 * src/lalr.c (set_state_table): Move to...
20067 * src/LR0.c: here.
20068 * src/lalr.c (lalr): Don't call it...
20069 * src/LR0.c (generate_states): do it.
20070 * src/LR0.h (first_state): Remove, only the table is used.
20071
20072 2001-12-10 Akim Demaille <akim@epita.fr>
20073
20074 * src/LR0.h (first_shift, first_reduction): Remove.
20075 * src/lalr.c: Don't use first_shift: find shifts through the
20076 states.
20077
20078 2001-12-10 Akim Demaille <akim@epita.fr>
20079
20080 * src/LR0.c: Attach shifts to states as soon as they are
20081 computed.
20082 * src/lalr.c (set_state_table): Instead of assigning shifts to
20083 state, just assert that the mapping was properly done.
20084
20085 2001-12-10 Akim Demaille <akim@epita.fr>
20086
20087 * src/LR0.c (insert_start_shift): Rename as...
20088 (insert_start_shifting_state): this.
20089 (insert_eof_shifting_state, insert_accepting_state): New.
20090 (augment_automaton): Adjust.
20091 Better locality of the variables.
20092 When looking if the start_symbol is shifted from the initial
20093 state, using `while (... symbol != start_symbol ...)' sounds
20094 better than `while (... symbol < start_symbol ...)': If fail
20095 to see how the order between symbols could be relevant!
20096
20097 2001-12-10 Akim Demaille <akim@epita.fr>
20098
20099 * src/getargs.h: Don't declare `spec_name_prefix' and
20100 `spec_file_prefix', declared by src/files.h.
20101 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20102 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20103 * src/output.c (prepare): Adjust.
20104 * src/reader.c (symbols_output): Likewise.
20105 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20106
20107 2001-12-10 Akim Demaille <akim@epita.fr>
20108
20109 * src/muscle_tab.c (muscle_init): NULL is a better default than
20110 `"0"'.
20111
20112 2001-12-10 Akim Demaille <akim@epita.fr>
20113
20114 * src/reader.c (reader): Calling symbols_output once is enough.
20115
20116 2001-12-10 Akim Demaille <akim@epita.fr>
20117
20118 Now that states have a complete set of members, the linked list of
20119 reductions is useless: just fill directly the state's reductions
20120 member.
20121
20122 * src/state.h (struct reductions): Remove member `number' and
20123 `next'.
20124 * src/LR0.c (first_reduction, last_reduction): Remove.
20125 (save_reductions): Don't link the new reductions, store them in
20126 this_state.
20127 * src/lalr.c (set_state_table): No need to attach reductions to
20128 states, it's already done.
20129 * src/output.c (output_actions): No longer free the shifts, then
20130 the reductions, then the states: free all the states and their
20131 members.
20132
20133 2001-12-10 Akim Demaille <akim@epita.fr>
20134
20135 * src/options.c (OPTN, DRTV, BOTH): New.
20136 (option_table): Use them.
20137
20138 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20139 the job of system.h.
20140 * src/options.c: Don't include stdio.h and xalloc.h for the same
20141 reasons.
20142
20143 2001-12-10 Akim Demaille <akim@epita.fr>
20144
20145 * src/output.c (output, prepare): Make sure the values of the
20146 muscles `action' and `prologue' are 0-terminated.
20147
20148 2001-12-10 Akim Demaille <akim@epita.fr>
20149
20150 Clean up GCC warnings.
20151
20152 * src/reader.c (copy_action): `buf' is not used.
20153 (parse_skel_decl): Be static.
20154 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20155 * src/options.h (create_long_option_table): Have a real prototype.
20156 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20157 (hash_delete_at): Return const void *.
20158 Adjust casts to preserve the const.
20159
20160 2001-12-10 Akim Demaille <akim@epita.fr>
20161
20162 * configure.in: Require 2.52g.
20163 M4 is not needed, but AUTOM4TE is.
20164 * m4/m4.m4: Remove.
20165 * tests/Makefile.am: Adjust.
20166
20167 2001-12-10 Akim Demaille <akim@epita.fr>
20168
20169 One structure for states is enough, even though theoretically
20170 there are LR(0) states and LALR(1) states.
20171
20172 * src/lalr.h (state_t): Remove.
20173 (state_table): Be state_t **, not state_t *.
20174 * src/state.h (core, CORE_ALLOC): Rename as...
20175 (state_t, STATE_ALLOC): this.
20176 Add the LALR(1) members: shifts, reductions, errs.
20177 * src/LR0.c (state_table): Rename as...
20178 (state_hash): this, to avoid name clashes with the global
20179 `state_table'.
20180 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20181 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20182
20183 2001-12-10 Akim Demaille <akim@epita.fr>
20184
20185 Bison dumps core on bash.y.
20186 Reported by Pascal Bart.
20187
20188 * src/warshall.c (bitmatrix_print): New.
20189 (TC): Use it.
20190 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20191 j must be the outer loop.
20192 * tests/regression.at (Broken Closure): New.
20193
20194 2001-12-05 Akim Demaille <akim@epita.fr>
20195
20196 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20197 its argument.
20198 Reported by Peter Hamorsky.
20199
20200 2001-12-05 Akim Demaille <akim@epita.fr>
20201
20202 * src/conflicts.c (err_table): Remove.
20203 (resolve_sr_conflict): Adjust.
20204 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20205 Rename as...
20206 (state_t.reductions, state_t.shifts): this.
20207
20208 2001-12-05 Akim Demaille <akim@epita.fr>
20209
20210 * src/reduce.c (reduce_grammar_tables): No longer disable the
20211 removal of useless rules via CPP but via `if (0)', so that the
20212 compiler still check the code is valid.
20213 For instance, it should have noticed `rline' no longer exists: use
20214 the `line' member of rule_t.
20215 * src/gram.c (dummy, rline): Remove, unused.
20216
20217 2001-12-05 Akim Demaille <akim@epita.fr>
20218
20219 * src/output.c (pack_vector): Use assert, not berror.
20220 * src/main.c (berror): Remove, unused.
20221
20222 2001-12-05 Akim Demaille <akim@epita.fr>
20223
20224 New experimental feature: if --verbose --trace output all the
20225 items of a state, not only its kernel.
20226
20227 * src/print.c (print_core): If `trace_flag', then invoke closure
20228 before outputting the items of the state (print_core is no longer
20229 a correct name them).
20230 (print_results): Invoke new_closure/free_closure if needed.
20231
20232 2001-12-05 Akim Demaille <akim@epita.fr>
20233
20234 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20235 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20236 (nitemset): for consistency with the rest of the project.
20237
20238 2001-12-05 Akim Demaille <akim@epita.fr>
20239
20240 * src/closure.c (print_closure): Improve.
20241 (closure): Use it for printing input and output.
20242
20243 2001-12-05 Akim Demaille <akim@epita.fr>
20244
20245 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20246 indexed by nonterminals.
20247
20248 2001-12-05 Akim Demaille <akim@epita.fr>
20249
20250 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20251 what it was!).
20252 * src/warshall.h: Remove accidental duplication of the content.
20253
20254 2001-12-05 Akim Demaille <akim@epita.fr>
20255
20256 * src/closure.c (set_fderives): De-obfuscate.
20257
20258 2001-12-05 Akim Demaille <akim@epita.fr>
20259
20260 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20261
20262 2001-12-05 Akim Demaille <akim@epita.fr>
20263
20264 * src/closure.c (set_firsts): De-obfuscate.
20265
20266 2001-12-05 Akim Demaille <akim@epita.fr>
20267
20268 * src/output.c (action_row): De-obfuscate
20269 using the good o' techniques: arrays not pointers, variable
20270 locality, BITISSET, RESETBIT etc.
20271
20272 2001-12-05 Akim Demaille <akim@epita.fr>
20273
20274 Pessimize the code to simplify it: from now on, all the states
20275 have a valid SHIFTS, which NSHIFTS is possibly 0.
20276
20277 * src/LR0.c (shifts_new): Be global and move to..
20278 * src/state.c, src/state.h: here.
20279 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20280 * src/print_graph: Adjust.
20281
20282 2001-12-05 Akim Demaille <akim@epita.fr>
20283
20284 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20285 * src/conflicts.c: Use it.
20286 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20287 incorrectly ``simplified''.
20288
20289 2001-12-05 Akim Demaille <akim@epita.fr>
20290
20291 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20292 using the good o' techniques: arrays not pointers, variable
20293 locality, BITISSET, RESETBIT etc.
20294
20295 2001-12-05 Akim Demaille <akim@epita.fr>
20296
20297 * src/state.h (SHIFT_SYMBOL): New.
20298 * src/conflicts.c: Use it to deobfuscate.
20299
20300 2001-12-05 Akim Demaille <akim@epita.fr>
20301
20302 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20303 (print_reductions): De-obfuscate using the good o' techniques:
20304 arrays not pointers, variable locality, BITISSET.
20305
20306 2001-12-05 Akim Demaille <akim@epita.fr>
20307
20308 * src/conflicts.c (print_reductions): Arrays, not pointers.
20309 Use BITISSET.
20310
20311 2001-12-05 Akim Demaille <akim@epita.fr>
20312
20313 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20314
20315 2001-12-05 Akim Demaille <akim@epita.fr>
20316
20317 * src/conflicts.c (print_reductions): Improve variable locality.
20318
20319 2001-12-05 Akim Demaille <akim@epita.fr>
20320
20321 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20322
20323 2001-12-05 Akim Demaille <akim@epita.fr>
20324
20325 * src/conflicts.c (print_reductions): Improve variable locality.
20326
20327 2001-12-05 Akim Demaille <akim@epita.fr>
20328
20329 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20330 * src/lalr.c: Use them.
20331
20332 2001-12-05 Akim Demaille <akim@epita.fr>
20333
20334 * src/LR0.c (augment_automaton): Formatting changes.
20335 Better variable locality.
20336
20337 2001-12-05 Akim Demaille <akim@epita.fr>
20338
20339 * src/lalr.c (matrix_print): New.
20340 (transpose): Use it.
20341 Use arrays instead of pointers.
20342
20343 2001-12-05 Akim Demaille <akim@epita.fr>
20344
20345 * src/lalr.c (maxrhs): Move to...
20346 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20347 * src/lalr.c (build_relations): Adjust.
20348
20349 2001-12-05 Akim Demaille <akim@epita.fr>
20350
20351 * src/lalr.c (transpose): Free the memory allocated to the
20352 argument, as it is replaced by the results by the unique caller.
20353 (build_relations): Merely invoke transpose: it handles the memory
20354 deallocation.
20355 Improve variable locality.
20356 Avoid variables used as mere abbreviations.
20357 (compute_lookaheads): Use arrays instead of pointers.
20358
20359 2001-12-05 Akim Demaille <akim@epita.fr>
20360
20361 * src/lalr.c (initialize_F): Improve variable locality.
20362 Avoid variables used as mere abbreviations.
20363
20364 2001-12-05 Akim Demaille <akim@epita.fr>
20365
20366 * src/derives.c (print_derives): Display the ruleno.
20367 * src/lalr.c (initialize_F, transpose): Better variable locality
20368 to improve readability.
20369 Avoid variables used as mere abbreviations.
20370
20371 2001-12-05 Akim Demaille <akim@epita.fr>
20372
20373 * src/lalr.c (traverse): Use arrays instead of pointers.
20374
20375 2001-12-05 Akim Demaille <akim@epita.fr>
20376
20377 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20378 the handling of squeue.
20379 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20380
20381 2001-12-05 Akim Demaille <akim@epita.fr>
20382
20383 Because useless nonterminals are now kept alive (instead of being
20384 `destroyed'), we now sometimes examine them, and store information
20385 related to them. Hence we need to know their number, and adjust
20386 memory allocations.
20387
20388 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20389 static.
20390 * src/LR0.c (allocate_itemsets): The memory allocated to
20391 `symbol_count' was used for two different purpose: once to count
20392 the number of occurrences of each symbol, and later reassigned to
20393 `shift_symbol', containing the symbol that can be shifted from a
20394 given state.
20395 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20396 only, and...
20397 (new_itemsets): Allocate `shift_symbol' here.
20398 (allocate_itemsets): symbol_count includes useless nonterminals.
20399 Make room for them.
20400 (free_storage): Use `free', not `XFREE', for pointers that cannot
20401 be null.
20402
20403 2001-12-05 Akim Demaille <akim@epita.fr>
20404
20405 * src/nullable.c (set_nullable): Deobfuscate the handling of
20406 ritem.
20407 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20408
20409 2001-12-05 Akim Demaille <akim@epita.fr>
20410
20411 * src/gram.c, src/gram.h (ritem_print): New.
20412 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20413 (This useless function was defined only to work around VMS linkers
20414 that can't handle compilation units with variables only).
20415 * src/reduce.c (dump_grammar): Use it to trace the construction of
20416 ritem.
20417
20418 2001-12-04 Paul Eggert <eggert@twinsun.com>
20419
20420 * src/bison.simple (union yyalloc): Change member names
20421 to be the same as the stack names.
20422 (yyparse): yyptr is now union yyalloc *, not char *.
20423 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20424 and may generate better code on some machines.
20425 (yystpcpy): Use prototype if __STDC__ is defined, not just
20426 if __cplusplus is defined.
20427
20428 2001-11-30 Akim Demaille <akim@epita.fr>
20429
20430 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20431 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20432 Gettext doesn't compile cleanly, and dies with -Werror.
20433 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20434 Include WARNING_CFLAGS here.
20435 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20436 before being defined.
20437
20438 2001-11-27 Paul Eggert <eggert@twinsun.com>
20439
20440 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20441 First arg is int, not unsigned.
20442 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20443 (SIZE_MAX, UINT_MAX): New macros.
20444 (quotearg_n_options): Abort if N is negative.
20445 Avoid overflow check on hosts where size_t is 64 bits and int
20446 is 32 bits, as overflow is impossible there.
20447 Fix off-by-one typo that caused unnecessary reallocation.
20448
20449 2001-11-29 Paul Eggert <eggert@twinsun.com>
20450
20451 Name space cleanup in generated parser.
20452
20453 * doc/bison.texinfo (Bison Parser): Discuss system headers
20454 and their effect on the user name space.
20455
20456 * src/bison.simple:
20457 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20458 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20459 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20460
20461 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20462 on user names when possible.
20463
20464 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20465 Simplify test for whather <alloca.h> exists.
20466
20467 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20468
20469 (<stdio.h>): Include if YYDEBUG.
20470
20471 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20472 ! defined (yyoverflow) && ! defined (yymemcpy).
20473
20474 (yymemcpy, yyparse): Rename local variables as needed so that
20475 they all begin with 'yy'.
20476
20477 (yystrlen, yystpcpy): New functions.
20478
20479 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20480 All uses changed.
20481
20482 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20483 instead of relying on string.h functions. Use YYSTACK_ALLOC
20484 and YYSTACK_FREE instead of malloc and free.
20485
20486 2001-11-30 Akim Demaille <akim@epita.fr>
20487
20488 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20489 before their first uses.
20490 (YYBISON, YYPURE): Move to the top of the output.
20491
20492 2001-11-30 Akim Demaille <akim@epita.fr>
20493
20494 * tests/reduce.at (Useless Nonterminals): Fix.
20495
20496 2001-11-30 Akim Demaille <akim@epita.fr>
20497
20498 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20499 if body instead of `;' to pacify GCC's warnings.
20500
20501 2001-11-30 Akim Demaille <akim@epita.fr>
20502
20503 Instead of mapping the LHS of unused rules to -1, keep the LHS
20504 valid, but flag the rules as invalid.
20505
20506 * src/gram.h (rule_t): `useful' is a new member.
20507 * src/print.c (print_grammar): Adjust.
20508 * src/derives.c (set_derives): Likewise.
20509 * src/reader.c (packgram, reduce_output): Likewise.
20510 * src/reduce.c (reduce_grammar_tables): Likewise.
20511 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20512
20513 2001-11-30 Akim Demaille <akim@epita.fr>
20514
20515 * src/reduce.c (reduce_output): Formatting changes.
20516 * src/print.c (print_results, print_grammar): Likewise.
20517 * tests/regression.at (Rule Line Numbers)
20518 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20519
20520 2001-11-30 Akim Demaille <akim@epita.fr>
20521
20522 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20523 useless nonterminals, move them at the end of the symbol arrays.
20524 (reduce_output): Adjust.
20525 * tests/reduce.at (Useless Nonterminals): Adjust.
20526
20527 2001-11-30 Akim Demaille <akim@epita.fr>
20528
20529 * src/reduce.c: Various comment/formatting changes.
20530 (nonterminals_reduce): New, extracted from...
20531 (reduce_grammar_tables): here.
20532 (reduce_grammar): Call nonterminals_reduce.
20533
20534 2001-11-29 Paul Eggert <eggert@twinsun.com>
20535
20536 * src/bison.simple (YYSTACK_REALLOC): Remove.
20537 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20538 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20539 New macros.
20540 (union yyalloc): New type.
20541 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20542 an arbitrary restriction on hosts where size_t is wider than int.
20543
20544 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20545 a parser stack overflow. Allocate just one block of memory for all
20546 three stacks, instead of allocating three blocks; this typically is
20547 faster and reduces fragmentation.
20548
20549 Do not limit the number of items in the stack to a value that fits
20550 in 'int', as this is an arbitrary limit on hosts with 64-bit
20551 size_t and 32-bit int.
20552
20553 2001-11-29 Marc Autret <autret_m@epita.fr>
20554
20555 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20556 of defining YYERROR_VERBOSE.
20557 [AT_DATA]: $4 is now out of C declarations in the prologue.
20558
20559 2001-11-28 Marc Autret <autret_m@epita.fr>
20560
20561 * src/reader.c (parse_dquoted_param): New.
20562 (parse_skel_decl): Use it.
20563 * src/lex.h: Add its prototype.
20564 * src/lex.c (literalchar): Become not static.
20565
20566 2001-11-28 Marc Autret <autret_m@epita.fr>
20567
20568 * src/output.h: And put its extern declaration here.
20569 * src/output.c (error_verbose): Define here.
20570 (prepare): Echo name modification.
20571 * src/getargs.h: Clean its extern declaration.
20572 * src/getargs.c (error_verbose_flag): Remove.
20573 (getargs): Remove case 'e'.
20574 * src/options.c (option_table): 'error-verbose' is now seen as simple
20575 percent option.
20576 Include output.h.
20577
20578 * src/reader.c (read_declarations): Remove case tok_include.
20579 (parse_include_decl): Remove.
20580 * src/lex.h (token_t): Remove tok_include.
20581 * src/options.c (option_table): 'include' is now a simple command line
20582 option.
20583
20584 2001-11-28 Marc Autret <autret_m@epita.fr>
20585
20586 * src/bison.simple: Adjust muscle names.
20587 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20588 * src/output.c (prepare): s/_/-/ for the muscles names.
20589 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20590
20591 2001-11-28 Marc Autret <autret_m@epita.fr>
20592
20593 * src/bison.simple: Fix debug.
20594 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20595
20596 2001-11-28 Akim Demaille <akim@epita.fr>
20597
20598 * src/LR0.c (shifts_new): New.
20599 (save_shifts, insert_start_shift, augment_automaton): Use it.
20600
20601 2001-11-28 Akim Demaille <akim@epita.fr>
20602
20603 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20604 keep ruleno only.
20605
20606 2001-11-28 Akim Demaille <akim@epita.fr>
20607
20608 * src/closure.c (closure): Instead of looping over word in array
20609 then bits in words, loop over bits in array.
20610
20611 2001-11-28 Akim Demaille <akim@epita.fr>
20612
20613 * src/closure.c (closure): No longer optimize the special case
20614 where all the bits of `ruleset[r]' are set to 0, to make the code
20615 clearer.
20616
20617 2001-11-28 Akim Demaille <akim@epita.fr>
20618
20619 * src/closure.c (closure): `r' and `c' are new variables, used to
20620 de-obfuscate accesses to RULESET and CORE.
20621
20622 2001-11-28 Akim Demaille <akim@epita.fr>
20623
20624 * src/reduce.c (reduce_print): Use ngettext.
20625 (dump_grammar): Improve the trace accuracy.
20626
20627 2001-11-28 Akim Demaille <akim@epita.fr>
20628
20629 * src/reduce.c (dump_grammar): Don't translate trace messages.
20630
20631 2001-11-28 Akim Demaille <akim@epita.fr>
20632
20633 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20634 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20635 as all tags are free'ed afterwards.
20636 From Enrico Scholz.
20637
20638 2001-11-27 Paul Eggert <eggert@twinsun.com>
20639
20640 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20641 use alloca when we didn't want to, and vice versa.
20642
20643 2001-11-27 Marc Autret <autret_m@epita.fr>
20644
20645 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20646 initialization.
20647 * src/output.c (prepare): Remove its update.
20648
20649 2001-11-27 Marc Autret <autret_m@epita.fr>
20650
20651 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20652 Use %error-verbose.
20653
20654 2001-11-27 Marc Autret <autret_m@epita.fr>
20655
20656 * src/bison.simple: Remove YYERROR_VERBOSE using.
20657 Use %%error_verbose.
20658 (yyparse): Likewise.
20659 * src/output.c (prepare): Give its final value.
20660 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20661 * src/getargs.h: Add its extern declaration.
20662 * src/getargs.c (error_verbose_flag): New int.
20663 (getargs): Update to catch new case.
20664 * src/options.c (option_table): 'error-verbose' is a new option.
20665 (shortopts): Update.
20666
20667 2001-11-27 Akim Demaille <akim@epita.fr>
20668
20669 * src/system.h: Use intl/libgettext.h.
20670 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20671
20672 2001-11-27 Akim Demaille <akim@epita.fr>
20673
20674 * tests/torture.at (Exploding the Stack Size with Malloc):
20675 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20676
20677 2001-11-27 Akim Demaille <akim@epita.fr>
20678
20679 * src/files.c: Include error.h.
20680 Reported by Hans Aberg.
20681
20682 2001-11-26 Marc Autret <autret_m@epita.fr>
20683
20684 * src/reader.c (parse_include_decl): New, not yet implemented.
20685 (read_declarations): Add case tok_include.
20686 * src/getargs.h (include): Add its extern definition.
20687 * src/getargs.c (include): New const char *.
20688 (getargs): Add case '-I'.
20689 * src/options.c (option_table): Add include as command line and
20690 percent option.
20691 * src/lex.h (token_t): Add tok_include.
20692
20693 2001-11-26 Akim Demaille <akim@epita.fr>
20694
20695 * src/reader.c (readgram): Make sure rules for mid-rule actions
20696 have a lineno equal to that of their host rule.
20697 Reported by Hans Aberg.
20698 * tests/regression.at (Rule Line Numbers): New.
20699
20700 2001-11-26 Akim Demaille <akim@epita.fr>
20701
20702 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20703 size_ts.
20704
20705 2001-11-26 Akim Demaille <akim@epita.fr>
20706
20707 * src/complain.c, src/complain.h (error): Remove, provided by
20708 lib/error.[ch].
20709
20710 2001-11-26 Akim Demaille <akim@epita.fr>
20711
20712 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20713 issue an error message.
20714 * tests/regression.at (Invalid %directive): New.
20715 Reported by Hans Aberg.
20716
20717 2001-11-26 Akim Demaille <akim@epita.fr>
20718
20719 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20720 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20721
20722 2001-11-26 Akim Demaille <akim@epita.fr>
20723
20724 * src/conflicts.c (conflicts_print): Don't complain at all when
20725 there are no reduce/reduce conflicts, and as many shift/reduce
20726 conflicts as expected.
20727 * tests/regression.at (%expect right): Adjust.
20728
20729 2001-11-23 Akim Demaille <akim@epita.fr>
20730
20731 * lib/alloca.c: Update, from fileutils.
20732
20733 2001-11-23 Akim Demaille <akim@epita.fr>
20734
20735 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20736
20737 2001-11-23 Akim Demaille <akim@epita.fr>
20738
20739 * src/system.h: Include alloca.h.
20740 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20741
20742 2001-11-23 Akim Demaille <akim@epita.fr>
20743
20744 * src/print_graph.c (print_actions): Remove `rule', unused.
20745 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20746 pacify GCC's signed < unsigned warnings.
20747 * src/closure.c (itemsetsize): Likewise.
20748 * src/reader.c (symbol_list_new): Static.
20749
20750 2001-11-23 Akim Demaille <akim@epita.fr>
20751
20752 Attaching lineno to buckets is stupid, since only one copy of each
20753 symbol is kept, only the line of the first occurrence is kept too.
20754
20755 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20756 * src/reader.c (rline_allocated): Remove, unused.
20757 (symbol_list): Have a `line' member.
20758 (symbol_list_new): New.
20759 (readgram): Use it.
20760 * src/print.c (print_grammar): Output the rule line numbers.
20761 * tests/regression.at (Solved SR Conflicts)
20762 (Unresolved SR Conflicts): Adjust.
20763 Reported by Hans Aberg.
20764
20765 2001-11-22 Marc Autret <autret_m@epita.fr>
20766
20767 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20768
20769 2001-11-22 Marc Autret <autret_m@epita.fr>
20770
20771 * src/muscle_tab.c (muscle_init): Remove initialization of
20772 skeleton muscle.
20773 * src/output.c (output_master_parser): Do it here.
20774
20775 2001-11-20 Akim Demaille <akim@epita.fr>
20776
20777 * po/sv.po: New.
20778 * configure.in (ALL_LINGUAS): Adjust.
20779 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20780 longer contains strings to translate.
20781
20782 2001-11-19 Akim Demaille <akim@epita.fr>
20783
20784 * src/conflicts.c (conflicts_print): Add a missing \n.
20785
20786 2001-11-19 Akim Demaille <akim@epita.fr>
20787
20788 * src/nullable.c (nullable_print): New.
20789 (set_nullable): Call it when tracing.
20790 Better locality of variables.
20791
20792 2001-11-19 Akim Demaille <akim@epita.fr>
20793
20794 * src/print.c (print_actions): Better locality of variables.
20795
20796 2001-11-19 Akim Demaille <akim@epita.fr>
20797
20798 * src/derives.c (print_derives): Fix and enrich.
20799 * src/closure.c (print_fderives): Likewise.
20800
20801 2001-11-19 Akim Demaille <akim@epita.fr>
20802
20803 * src/closure.c (itemsetend): Remove, replaced with...
20804 (itemsetsize): new.
20805
20806 2001-11-19 Akim Demaille <akim@epita.fr>
20807
20808 * src/LR0.c (kernel_end): Remove, replaced with...
20809 (kernel_size): new.
20810
20811 2001-11-19 Akim Demaille <akim@epita.fr>
20812
20813 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20814 to clarify.
20815
20816 2001-11-19 Akim Demaille <akim@epita.fr>
20817
20818 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20819
20820 2001-11-19 Akim Demaille <akim@epita.fr>
20821
20822 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20823 trace messages.
20824 * src/LR0.c: Likewise.
20825 (allocate_itemsets): Use arrays instead of pointers to clarify.
20826
20827 2001-11-19 Akim Demaille <akim@epita.fr>
20828
20829 * src/getargs.c (statistics_flag): Replace with...
20830 (trace_flag): New.
20831 (longopts): Accept --trace instead of --statistics.
20832 * src/getargs.h, src/options.c: Adjust.
20833 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20834 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20835
20836 2001-11-19 Akim Demaille <akim@epita.fr>
20837
20838 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20839 pointers to clarify the code.
20840 (save_reductions, save_shifts): Factor common parts of alternatives.
20841
20842 2001-11-19 Akim Demaille <akim@epita.fr>
20843
20844 * src/LR0.c (new_state, get_state): Complete TRACE code.
20845 * src/closure.c: Include `reader.h' to get `tags', needed by the
20846 trace code.
20847 Rename the conditional DEBUG as TRACE.
20848 Output consistently TRACEs to stderr, not stdout.
20849 * src/derives.c: Likewise.
20850 * src/reduce.c: (inaccessable_symbols): Using if is better style
20851 than goto.
20852 Use `#if TRACE' instead of `#if 0' for tracing code.
20853
20854 2001-11-19 Akim Demaille <akim@epita.fr>
20855
20856 * src/system.h (LIST_FREE, shortcpy): New.
20857 * src/LR0.c: Use them.
20858 * src/output.c (free_itemsets, free_reductions, free_shifts):
20859 Remove, replaced by LIST_FREE.
20860
20861 2001-11-19 Akim Demaille <akim@epita.fr>
20862
20863 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20864 (REDUCTIONS_ALLOC): New.
20865 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20866 allocation.
20867
20868 2001-11-19 Akim Demaille <akim@epita.fr>
20869
20870 * src/LR0.c (new_state): Complete trace code.
20871 * src/nullable.c (set_nullable): Don't translate traces.
20872
20873 2001-11-19 Akim Demaille <akim@epita.fr>
20874
20875 * src/print_graph.c (print_core): Better locality of variables.
20876 * src/print.c (print_core): Likewise.
20877
20878 2001-11-19 Akim Demaille <akim@epita.fr>
20879
20880 * src/vcg.c: You do the output, so you are responsible of the
20881 handling of VCG syntax, in particular: use quotearg.
20882 * src/print_graph.c: Don't.
20883 (print_actions): Don't output the actions as part of the nodes,
20884 since that's the job of the edges.
20885 (print_state): Don't output by hand: fill the node description,
20886 and ask for its output.
20887
20888 2001-11-19 Akim Demaille <akim@epita.fr>
20889
20890 * src/bison.simple (yyparse): When verbosely reporting an error,
20891 no longer put additional quotes around token names.
20892 * tests/calc.at: Adjust.
20893
20894 2001-11-19 Akim Demaille <akim@epita.fr>
20895
20896 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20897 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20898 * src/output.c: Adjust.
20899
20900 2001-11-19 Akim Demaille <akim@epita.fr>
20901
20902 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20903 (rule_t): this.
20904 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20905
20906 2001-11-19 Akim Demaille <akim@epita.fr>
20907
20908 * src/gram.h (rule_t): New.
20909 (rule_table): New.
20910 (rrhs, rlhs): Remove, part of state_t.
20911 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20912 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20913 * src/reader.c, src/reduce.c: Adjust.
20914
20915 2001-11-19 Akim Demaille <akim@epita.fr>
20916
20917 * src/reader.c (symbols_output): New, extracted from...
20918 (packsymbols): Here.
20919 (reader): Call it.
20920
20921 2001-11-19 Akim Demaille <akim@epita.fr>
20922
20923 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20924 (maxrhs): this new function.
20925
20926 2001-11-19 Akim Demaille <akim@epita.fr>
20927
20928 * src/lalr.c (F): New macro to access the variable F.
20929 Adjust.
20930
20931 2001-11-19 Akim Demaille <akim@epita.fr>
20932
20933 * src/lalr.h (LA): New macro to access the variable LA.
20934 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20935 * src/lalr.c: Adjust.
20936
20937 2001-11-19 Akim Demaille <akim@epita.fr>
20938
20939 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20940 (set_state_table): handle the `lookaheads' members.
20941
20942 2001-11-19 Akim Demaille <akim@epita.fr>
20943
20944 * src/lalr.h (lookaheads): Removed array, whose contents is now
20945 a member of...
20946 (state_t): this structure.
20947 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20948 Adjust.
20949
20950 2001-11-19 Akim Demaille <akim@epita.fr>
20951
20952 * src/lalr.h (consistent): Removed array, whose contents is now
20953 a member of...
20954 (state_t): this structure.
20955 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20956 Adjust.
20957
20958 2001-11-19 Akim Demaille <akim@epita.fr>
20959
20960 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20961 contents are now members of...
20962 (state_t): this structure.
20963 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20964 Adjust.
20965
20966 2001-11-19 Akim Demaille <akim@epita.fr>
20967
20968 * src/lalr.h (state_t): New.
20969 (state_table): Be a state_t * instead of a core **.
20970 (accessing_symbol): Remove, part of state_t.
20971 * src/lalr.c: Adjust.
20972 (set_accessing_symbol): Merge into...
20973 (set_state_table): this.
20974 * src/print_graph.c, src/conflicts.c: Adjust.
20975
20976 2001-11-14 Akim Demaille <akim@epita.fr>
20977
20978 * tests/calc.at, tests/output.at, tests/regression.at,
20979 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20980 now the tests are run in private dirs, therefore AC_CLEANUP and
20981 family can be simplified to 0-ary.
20982 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20983 use abs. path to find config.h.
20984 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20985 stderr, there can be way too much random noise.
20986 Instead pass -Werror to GCC and rely on the exit status.
20987 Reported by Wolfram Wagner.
20988
20989 2001-11-14 Akim Demaille <akim@epita.fr>
20990
20991 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20992 defined only if yyoverflow is defined, to avoid `warning: unused
20993 variable `yyvs1''.
20994 Reported by The Test Suite.
20995
20996 2001-11-14 Akim Demaille <akim@epita.fr>
20997
20998 * src/print.c: Include reduce.h.
20999 Reported by Hans Aberg.
21000
21001 2001-11-14 Akim Demaille <akim@epita.fr>
21002
21003 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21004 Revert a previous patch: these are really const.
21005 * src/conflicts.c (conflict_report): Additional useless pair of
21006 braces to pacify GCC's warnings for `if () if () {} else {}'.
21007 * src/lex.c (parse_percent_token): Replace equal_offset with
21008 arg_offset.
21009 arg is const.
21010 Be sure to strdup `arg' when used, since there is no reason for
21011 token_buffer not to change.
21012
21013 2001-11-14 Akim Demaille <akim@epita.fr>
21014
21015 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21016 definition.
21017 * src/main.c (main): Use them.
21018 Suggested by Hans Aberg.
21019
21020 2001-11-12 Akim Demaille <akim@epita.fr>
21021
21022 * src/system.h (ngettext): Now that we use ngettext, be sure to
21023 provide a default definition when NLS are not used.
21024
21025 2001-11-12 Akim Demaille <akim@epita.fr>
21026
21027 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21028 Use @kbd to denote user input.
21029 (Language and Grammar): ANSIfy the example.
21030 Adjust its layout for info/notinfo.
21031 (Location Tracking Calc): Output error messages to stderr.
21032 Output locations in a more GNUtically correct way.
21033 Fix a couple of Englishos.
21034 Adjust @group/@end group pairs.
21035
21036 2001-11-12 Akim Demaille <akim@epita.fr>
21037
21038 %expect was not functioning at all.
21039
21040 * src/conflicts.c (expected_conflicts): Set to -1.
21041 (conflict_report): Use ngettext.
21042 (conflicts_print): Check %expect and make its violation an error.
21043 * doc/bison.texinfo (Expect Decl): Adjust.
21044 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21045 * tests/regression.at (%expect not enough, %expect right)
21046 (%expect too much): New.
21047
21048 2001-11-12 Akim Demaille <akim@epita.fr>
21049
21050 * tests/regression.at (Conflicts): Rename as...
21051 (Unresolved SR Conflicts): this.
21052 (Solved SR Conflicts): New.
21053
21054 2001-11-12 Akim Demaille <akim@epita.fr>
21055
21056 * src/reduce.c (print_results): Rename as...
21057 (reduce_output): This.
21058 Output to OUT, passed as argument, instead of output_obstack.
21059 (dump_grammar): Likewise.
21060 (reduce_free): New.
21061 Also free V1.
21062 (reduce_grammar): No longer call reduce_output, since...
21063 * src/print.c (print_results): do it.
21064 * src/main.c (main): Call reduce_free;
21065
21066 2001-11-12 Akim Demaille <akim@epita.fr>
21067
21068 * src/conflicts.c (print_reductions): Accept OUT as argument.
21069 Output to it, not to output_obstack.
21070 * src/print.c (print_actions): Adjust.
21071
21072 2001-11-12 Akim Demaille <akim@epita.fr>
21073
21074 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21075 the result instead of using...
21076 (src_total, rrc_total, src_count, rrc_count): Remove.
21077 (any_conflicts): Remove.
21078 (print_conflicts): Split into...
21079 (conflicts_print, conflicts_output): New.
21080 * src/conflicts.h: Adjust.
21081 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21082 * src/print.c (print_grammar): Issue `\n' between two rules.
21083 * tests/regression.at (Conflicts): New.
21084 Reported by Tom Lane.
21085
21086 2001-11-12 Akim Demaille <akim@epita.fr>
21087
21088 * tests/regression.at (Invalid input): Remove, duplicate with
21089 ``Invalid input: 1''.
21090
21091 2001-11-12 Akim Demaille <akim@epita.fr>
21092
21093 * tests/torture.at (AT_DATA_STACK_TORTURE)
21094 (Exploding the Stack Size with Alloca)
21095 (Exploding the Stack Size with Malloc): New.
21096
21097 2001-11-12 Akim Demaille <akim@epita.fr>
21098
21099 * src/bison.simple (YYSTACK_REALLOC): New.
21100 (yyparse) [!yyoverflow]: Use it and free the old stack.
21101 Reported by Per Allansson.
21102
21103 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21104
21105 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21106 define CPP macro, which substitute YYSTYPE by yystype.
21107 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21108 with yyltype/YYLTYPE. This allows inclusion of the generated
21109 header within the parser if the compiler, such as GGC, accepts
21110 multiple equivalent #defines.
21111 From Akim.
21112
21113 2001-11-05 Akim Demaille <akim@epita.fr>
21114
21115 * src/reader.c (symbols_output): New, extracted from...
21116 (packsymbols): here.
21117 (reader): Adjust.
21118
21119 2001-11-05 Akim Demaille <akim@epita.fr>
21120
21121 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21122
21123 2001-11-05 Akim Demaille <akim@epita.fr>
21124
21125 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21126 pattern.
21127
21128 2001-11-05 Akim Demaille <akim@epita.fr>
21129
21130 * src/options.h (struct option_table_struct): set_flags is void*.
21131 * src/options.c (longopts): Support `--output' and `%output'.
21132 (usage): Adjust.
21133 * src/lex.h (tok_setopt): Remove, replaced with...
21134 (tok_intopt, tok_stropt): these new guys.
21135 * src/lex.c (getopt.h): Not needed.
21136 (token_buffer, unlexed_token_buffer): Not const.
21137 (percent_table): Promote `-' over `_' in directive names.
21138 Active `%name-prefix', `file-prefix', and `output'.
21139 (parse_percent_token): Accept possible arguments to directives.
21140 Promote `-' over `_' in directive names.
21141
21142 2001-11-04 Akim Demaille <akim@epita.fr>
21143
21144 * doc/bison.texinfo (Decl Summary): Split the list into
21145 `directives for grammars' and `directives for bison'.
21146 Sort'em.
21147 Add description of `%name-prefix', `file-prefix', and `output'.
21148 Promote `-' over `_' in directive names.
21149 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21150 Simplify the description of `--name-prefix'.
21151 Promote `-' over `_' in directive names.
21152 Promote `--output' over `--output-file'.
21153 Fix the description of `--defines'.
21154 * tests/output.at: Exercise %file-prefix and %output.
21155
21156 2001-11-02 Akim Demaille <akim@epita.fr>
21157
21158 * doc/refcard.tex: Update.
21159
21160 2001-11-02 Akim Demaille <akim@epita.fr>
21161
21162 * src/symtab.h (SUNDEF): New.
21163 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21164 stand for `uninitialized', instead of 0.
21165 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21166 * src/lex.c (lex): Adjust.
21167
21168 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21169 Number it 0.
21170 Let yylex return it instead of a plain 0.
21171 Reported by Dick Streefland.
21172
21173 2001-11-02 Akim Demaille <akim@epita.fr>
21174
21175 * tests/regression.at (Mixing %token styles): New test.
21176
21177 2001-11-02 Akim Demaille <akim@epita.fr>
21178
21179 * src/reader.c (parse_thong_decl): Formatting changes.
21180 (token_translations_init): New, extracted from...
21181 (packsymbols): Here.
21182 Adjust.
21183
21184 2001-11-01 Akim Demaille <akim@epita.fr>
21185
21186 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21187 Check that `9foo.y' produces correct cpp guards.
21188 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21189 guards.
21190 Reported by Wwp.
21191
21192 2001-11-01 Akim Demaille <akim@epita.fr>
21193
21194 * tests/regression.at (Invalid input: 2): New.
21195 * src/lex.c (unlexed_token_buffer): New.
21196 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21197 too.
21198 Reported by Wwp.
21199
21200 2001-11-01 Akim Demaille <akim@epita.fr>
21201
21202 * tests/calc.at: Catch up with 1.30.
21203 * configure.in: Bump to 1.49a.
21204 Adjust to newer Autotest.
21205
21206 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21207
21208 * src/conflicts.c: Move global variables rrc_total and src_total ...
21209 (print_conflicts): here.
21210 * src/output.c (output): Free global variable user_toknums.
21211 * src/lex.c (token_obstack): Become static.
21212
21213 2001-10-18 Akim Demaille <akim@epita.fr>
21214
21215 * tests/atlocal.in (GCC): Add.
21216 * tests/calc.at: s/m4_match/m4_bmatch/.
21217 s/m4_patsubst/m4_bpatsubst/.
21218 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21219 * configure.in: AC_SUBST(GCC).
21220
21221 2001-10-14 Marc Autret <autret_m@epita.fr>
21222
21223 * src/options.c (create_long_option_table): Fix.
21224
21225 2001-10-10 Akim Demaille <akim@epita.fr>
21226
21227 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21228
21229 2001-10-04 Akim Demaille <akim@epita.fr>
21230
21231 * src/reader.c (parse_union_decl): Push the caracters in
21232 union_obstack, not attrs_obstack.
21233
21234 2001-10-04 Akim Demaille <akim@epita.fr>
21235
21236 Merge in the branch 1.29.
21237
21238 * src/reader.c (packsymbols): Use a temporary obstack for
21239 `%%tokendef', since output_stack is already used elsewhere.
21240
21241 2001-10-02 Akim Demaille <akim@epita.fr>
21242
21243 Bump 1.29d.
21244
21245 2001-10-02 Akim Demaille <akim@epita.fr>
21246
21247 Version 1.29c.
21248
21249 2001-10-02 Akim Demaille <akim@epita.fr>
21250
21251 * tests/regression.at (Invalid CPP headers): New.
21252 From Alexander Belopolsky.
21253 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21254
21255 2001-10-02 Akim Demaille <akim@epita.fr>
21256
21257 * tests/regression.at (Invalid input): New.
21258 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21259 Reported by Shura.
21260
21261 2001-10-02 Akim Demaille <akim@epita.fr>
21262
21263 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21264
21265 2001-10-02 Akim Demaille <akim@epita.fr>
21266
21267 * src/output.c (output_parser): Assert `skeleton'.
21268 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21269 systems.
21270 From Shura.
21271
21272 2001-10-01 Marc Autret <autret_m@epita.fr>
21273
21274 * src/lex.h: Echo modifications.
21275 * src/lex.c (unlex): Parameter is now token_t.
21276 From Hans Aberg.
21277
21278 2001-10-01 Marc Autret <autret_m@epita.fr>
21279
21280 * src/main.c: Include lex.h.
21281 From Hans Aberg.
21282
21283 2001-09-29 Akim Demaille <akim@epita.fr>
21284
21285 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21286
21287 2001-09-28 Akim Demaille <akim@epita.fr>
21288
21289 * tests/testsuite.at: Update to newer Autotest.
21290 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21291
21292 2001-09-27 Akim Demaille <akim@epita.fr>
21293
21294 Position independent wrapper.
21295
21296 * tests/bison: Remove.
21297 * tests/bison.in: New.
21298 * configure.in: Adjust.
21299
21300 2001-09-27 Paul Eggert <eggert@twinsun.com>
21301
21302 Port quotearg fixes from tar 1.13.24.
21303
21304 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21305 tm to be declared.
21306 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21307 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21308
21309 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21310 * m4/mbrtowc.m4: New file.
21311 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21312 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21313
21314 2001-09-27 Akim Demaille <akim@epita.fr>
21315
21316 Bump to 1.29c.
21317
21318 2001-09-27 Akim Demaille <akim@epita.fr>
21319
21320 Version 1.29b.
21321
21322 2001-09-25 Akim Demaille <akim@epita.fr>
21323
21324 * src/system.h: Include `xalloc.h'.
21325 Remove it from the C files.
21326 * src/files.c (output_files): Free the obstacks.
21327 * src/lex.c (init_lex): Rename as...
21328 (lex_init): this.
21329 (lex_free): New.
21330 * src/main.c (main): Use it.
21331
21332 2001-09-24 Marc Autret <autret_m@epita.fr>
21333
21334 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21335 to output informations in fout (FILE*).
21336 (open_graph, close_graph): Likewise.
21337 (output_graph, output_edge, output_node): Likewise.
21338 * src/vcg.h: Update function prototypes.
21339 * src/print_graph.c (print_graph): Open output graph file.
21340 (print_actions): Adjust.
21341 * src/files.h: Remove extern declaration.
21342 * src/files.c: Remove graph_obstack declaration.
21343 (open_files): Remove graph_obstack initialization.
21344 (output_files): Remove graph_obstack saving.
21345
21346 2001-09-24 Marc Autret <autret_m@epita.fr>
21347
21348 * src/files.c (compute_output_file_names): Fix.
21349
21350 2001-09-24 Marc Autret <autret_m@epita.fr>,
21351 Akim Demaille <akim@epita.fr>
21352
21353 * src/reader.c (reader): Remove call to free_symtab ().
21354 * src/main.c (main): Call it here.
21355 Include symtab.h.
21356 * src/conflicts.c (initialize_conflicts): Rename as...
21357 (solve_conflicts): this.
21358 * src/print.c (print_core, print_actions, print_state)
21359 (print_grammar): Dump to a file instead a `output_obstack'.
21360 (print_results): Dump `output_obstack', and then proceed with the
21361 FILE *.
21362 * src/files.c (compute_output_file_names, close_files): New.
21363 (output_files): Adjust.
21364 * src/main.c (main): Adjust.
21365
21366 2001-09-23 Marc Autret <autret_m@epita.fr>
21367
21368 * src/files.c (compute_header_macro): Computes header macro name
21369 from spec_defines_file when given.
21370
21371 2001-09-23 Marc Autret <autret_m@epita.fr>
21372
21373 * src/files.c (output_files): Add default extensions.
21374
21375 2001-09-22 Akim Demaille <akim@epita.fr>
21376
21377 * src/conflicts.c (finalize_conflicts): Rename as...
21378 (free_conflicts): this.
21379
21380 2001-09-22 Akim Demaille <akim@epita.fr>
21381
21382 * src/gram.c (gram_free): Rename back as...
21383 (dummy): this.
21384 (output_token_translations): Free `token_translations'.
21385 * src/symtab.c (free_symtab): Free the tag field.
21386
21387 2001-09-22 Akim Demaille <akim@epita.fr>
21388
21389 Remove `translations' as it is always set to true.
21390
21391 * src/gram.h: Adjust.
21392 * src/reader.c (packsymbols, parse_token_decl): Adjust
21393 * src/print.c (print_grammar): Adjust.
21394 * src/output.c (output_token_translations): Adjust.
21395 * src/lex.c (lex): Adjust.
21396 * src/gram.c: Be sure the set pointers to NULL.
21397 (dummy): Rename as...
21398 (gram_free): this.
21399
21400 2001-09-22 Akim Demaille <akim@epita.fr>
21401
21402 * configure.in: Invoke AM_LIB_DMALLOC.
21403 * src/system.h: Use dmalloc.
21404 * src/LR0.c: Be sure to have pointers initialized to NULL.
21405 (allocate_itemsets): Allocate kernel_items only if needed.
21406
21407 2001-09-22 Akim Demaille <akim@epita.fr>
21408
21409 * configure.in: Bump to 1.29b.
21410 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21411 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21412 need xmalloc.c in calc.y.
21413 From Pascal Bart.
21414
21415 2001-09-21 Akim Demaille <akim@epita.fr>
21416
21417 Version 1.29a.
21418 * Makefile.maint, config/config.guess, config/config.sub,
21419 * config/missing: Update from masters.
21420 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21421 upon package.m4.
21422 * configure.in (ALL_LINGUAS): Add `tr'.
21423
21424 2001-09-21 Akim Demaille <akim@epita.fr>
21425
21426 * tests/Makefile.am (package.m4): Move to...
21427 ($(srcdir)/$(TESTSUITE)): here.
21428
21429 2001-09-20 Akim Demaille <akim@epita.fr>
21430
21431 * src/complain.c: No longer try to be standalone: use system.h.
21432 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21433 * src/complain.h: Likewise.
21434 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21435 Remove the unused variable `n'.
21436 From Albert Chin-A-Young.
21437
21438 2001-09-18 Marc Autret <autret_m@epita.fr>
21439
21440 * doc/bison.1: Update.
21441 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21442 descriptions.
21443 (Option Cross Key): Update.
21444 Add --graph.
21445
21446 2001-09-18 Marc Autret <autret_m@epita.fr>
21447
21448 * tests/regression.at: New test (comment in %union).
21449
21450 2001-09-18 Marc Autret <autret_m@epita.fr>
21451
21452 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21453 do that.
21454 Reported by Keith Browne.
21455
21456 2001-09-18 Marc Autret <autret_m@epita.fr>
21457
21458 * tests/output.at: Add tests for --defines and --graph.
21459
21460 2001-09-18 Marc Autret <autret_m@epita.fr>
21461
21462 * tests/output.at: Removes tests of %{header,src}_extension features.
21463
21464 2001-09-18 Akim Demaille <akim@epita.fr>
21465
21466 * tests/Makefile.am (package.m4): New.
21467 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21468 (_AT_CHECK_CALC_ERROR): Likewise.
21469 Factor the `, ' part of verbose error messages.
21470
21471 2001-09-18 Marc Autret <autret_m@epita.fr>
21472
21473 * src/getargs.c (longopts): Declare --defines and --graph as options
21474 with optional arguments.
21475 * src/files.h: Add extern declarations.
21476 * src/files.c (spec_graph_file, spec_defines_file): New.
21477 (output_files): Update.
21478 Remove CPP-outed code.
21479
21480 2001-09-18 Marc Autret <autret_m@epita.fr>
21481
21482 Turn off %{source,header}_extension feature.
21483
21484 * src/files.c (compute_exts_from_gf): Update.
21485 (compute_exts_from_src): Update.
21486 (output_files): CPP-out useless code.
21487 * src/files.h: Remove {header,source}_extension extern declarations.
21488 * src/reader.c (parse_dquoted_param): CPP-out.
21489 (parse_header_extension_decl): Remove.
21490 (parse_source_extension_decl): Remove.
21491 (read_declarations): Remove cases tok_{hdrext,srcext}.
21492 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21493 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21494
21495 2001-09-10 Akim Demaille <akim@epita.fr>
21496
21497 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21498 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21499 (AT_CHECK_OUTPUT): this.
21500 Merely check ls' exit status, its output is useless.
21501
21502 2001-09-10 Akim Demaille <akim@epita.fr>
21503
21504 * tests/calc.at: Use m4_match.
21505 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21506
21507 2001-09-10 Marc Autret <autret_m@epita.fr>,
21508 Akim Demaille <akim@epita.fr>
21509
21510 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21511 enum color_e.
21512 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21513 to `normal'.
21514 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21515 * src/lex.h: Adjust prototype.
21516 (token_t): Add `tok_undef'.
21517 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21518 (parse_percent_token): Now returns token_t.
21519 Add default statement in switch.
21520 (lex): Separate `c' as an input variable, from the token_t result
21521 part.
21522 (unlexed): Is a token_t.
21523
21524 2001-09-10 Akim Demaille <akim@epita.fr>
21525
21526 * configure.in: Bump to 1.29a.
21527
21528 2001-09-07 Akim Demaille <akim@epita.fr>
21529
21530 Version 1.29.
21531
21532 2001-08-30 Akim Demaille <akim@epita.fr>
21533
21534 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21535 * m4/atconfig.m4: Remove.
21536 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21537 * tests/bison: New.
21538 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21539 m4_if, m4_patsubst, and m4_regexp.
21540 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21541 `input' file instead of echo.
21542
21543 2001-08-29 Akim Demaille <akim@epita.fr>
21544
21545 Bump to 1.28e.
21546
21547 2001-08-29 Akim Demaille <akim@epita.fr>
21548
21549 Version 1.28d.
21550
21551 2001-08-29 Paul Eggert <eggert@twinsun.com>
21552
21553 * src/bison.simple (yyparse): Don't take the address of an
21554 item before the start of an array, as that doesn't conform to
21555 the C Standard.
21556
21557 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21558
21559 * doc/bison.texinfo (Location Tracking Calc): New node.
21560
21561 2001-08-29 Paul Eggert <eggert@twinsun.com>
21562
21563 * src/output.c (output): Do not define const, as this now
21564 causes more problems than it cures.
21565
21566 2001-08-29 Akim Demaille <akim@epita.fr>
21567
21568 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21569 the nodes.
21570 Be sure to tag the `detailmenu'.
21571
21572 2001-08-29 Akim Demaille <akim@epita.fr>
21573
21574 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21575 download in a tmp dir.
21576
21577 2001-08-28 Marc Autret <autret_m@epita.fr>
21578
21579 * config/depcomp: New file.
21580
21581 2001-08-28 Marc Autret <autret_m@epita.fr>
21582
21583 * doc/bison.1 (mandoc): Adjust.
21584 From Juan Manuel Guerrero.
21585
21586 2001-08-28 Marc Autret <autret_m@epita.fr>
21587
21588 * src/print_graph.c (print_state): Fix.
21589
21590 2001-08-27 Marc Autret <autret_m@epita.fr>
21591
21592 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21593 char * members.
21594 Echo modifications to the functions prototypes.
21595 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21596
21597 2001-08-27 Marc Autret <autret_m@epita.fr>
21598
21599 * src/vcg.c: Include `xalloc.h'.
21600 (add_colorentry): New.
21601 (add_classname): New.
21602 (add_infoname): New.
21603 * src/vcg.h: Add new prototypes.
21604
21605 2001-08-27 Akim Demaille <akim@epita.fr>
21606
21607 * Makefile.maint: Sync. again with CVS Autoconf.
21608
21609 2001-08-27 Akim Demaille <akim@epita.fr>
21610
21611 * Makefile.maint: Formatting changes.
21612 (po-update, cvs-update, update): New targets.
21613 (AMTAR): Remove.
21614
21615 2001-08-27 Akim Demaille <akim@epita.fr>
21616
21617 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21618 * Makefile.maint: Sync. with CVS Autoconf.
21619
21620 2001-08-27 Marc Autret <autret_m@epita.fr>
21621
21622 * src/vcg.h (struct infoname_s): New.
21623 (struct colorentry_s): New.
21624 (graph_s): New fields {vertical,horizontal}_order in structure.
21625 Add `infoname' field.
21626 Add `colorentry' field;
21627 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21628 (G_HORIZONTAL_ORDER): New.
21629 (G_INFONAME): New.
21630 (G_COLORENTRY): New.
21631 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21632 Add output of `infoname'.
21633 Add output of `colorentry'.
21634
21635 2001-08-27 Marc Autret <autret_m@epita.fr>
21636
21637 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21638 This one shadowed a global parameter.
21639
21640 2001-08-24 Marc Autret <autret_m@epita.fr>
21641
21642 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21643 instead of `unsigned'.
21644 (print_state): Do not call obstack_object_size () in obstack_grow ()
21645 to avoid macro variables shadowing.
21646
21647 2001-08-23 Marc Autret <autret_m@epita.fr>
21648
21649 * src/lex.c (percent_table): Typo: s/naem/name/.
21650 Add graph option.
21651 Normalize new options declarations.
21652
21653 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21654
21655 * tests/suite.at: Exercise %header_extension and %source_extension.
21656
21657 2001-08-16 Marc Autret <autret_m@epita.fr>
21658
21659 * src/reader.c (parse_dquoted_param): New.
21660 (parse_header_extension_decl): Use it.
21661 (parse_source_extension_decl): Likewise.
21662
21663 2001-08-16 Marc Autret <autret_m@epita.fr>
21664
21665 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21666 (get_xxxx_str): Use assert () instead of complain ().
21667 Remove return invokations in default cases.
21668 (get_decision_str): Modify default behaviour. Remove second argument.
21669 Echo modifications on calls.
21670 (output_graph): Fix.
21671
21672 2001-08-16 Marc Autret <autret_m@epita.fr>
21673
21674 * src/getargs.c (usage): Update with ``-g, --graph''.
21675
21676 2001-08-16 Marc Autret <autret_m@epita.fr>
21677
21678 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21679 (Option Cross Key): Likewise.
21680 * doc/bison.1: Update.
21681
21682 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21683
21684 * src/output.c (output_master_parser): Don't finish action_obstack.
21685 (output_parser): Don't care about the muscle action, here.
21686 (prepare): Copy the action_obstack in the action muscle.
21687 (output): Free action_obstack.
21688
21689 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21690
21691 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21692 will contain `%union' declaration.
21693 (parse_union_decl): Delete #line directive output.
21694 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21695 informations about %union.
21696 (parse_union_decl): Copy the union_obstack in the muscle stype.
21697 * src/bison.simple: Add new #line directive.
21698 Add typdef %%stype YYSTYPE.
21699
21700 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21701
21702 * src/bison.simple: Add new `#line' directive.
21703
21704 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21705
21706 * src/bison.simple: New `#line' directive.
21707 * src/output.c (output_parser): Support new dynamic muscle input_line.
21708
21709 2001-09-22 Marc Autret <autret_m@epita.fr>
21710
21711 * src/output.c (output_master_parser): New.
21712 (output_parser): Be more re-entrant.
21713
21714 2001-09-21 Marc Autret <autret_m@epita.fr>
21715
21716 * src/reader.c (copy_definition, parse_union_decl): Update and use
21717 `linef' muscle.
21718 (copy_action): Likewise.
21719 Use obstack_1grow ().
21720 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21721
21722 2001-09-21 Marc Autret <autret_m@epita.fr>
21723
21724 * src/options.c (option_table): Adjust.
21725 * src/lex.c (parse_percent_token): Fix.
21726
21727 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21728
21729 * src/options.c (symtab.h): Include it, need by lex.h.
21730
21731 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21732
21733 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21734 is now an option_table_struct*.
21735 (option_strcmp): New function option_strcmp.
21736 (parse_percent_token): Call option_strcmp.
21737 * src/getargs.c (xalloc.h, options.h): Include it.
21738 (getargs): Call create_long_option_table.
21739 (getargs): Free longopts at the end of the function.
21740 (shortopts): Move in options.c.
21741 * src/options.c (create_long_option_table): New function. Convert
21742 information from option_table to option structure.
21743 * src/reader.c (options.h): Include it.
21744
21745 * src/Makefile.am: Adjust.
21746 * src/options.c (option_table): Create from longopts and percent_table.
21747 * src/getargs.c (longopts): Delete.
21748 * src/lex.c (struct percent_table_struct): Delete.
21749 (percent_table): Delete.
21750 (options.h): Include it.
21751 * src/options.c: Create.
21752 * src/options.h: Create.
21753 Declare enum opt_access_e.
21754 Define struct option_table_struct.
21755
21756 2001-09-20 Marc Autret <autret_m@epita.fr>
21757
21758 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21759 sections of Bison.
21760
21761 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21762
21763 * src/bison.simple: s/%%filename/%%skeleton.
21764 * src/muscle_tab.c (getargs.h): Include it.
21765 (muscle_init): Insert new muscle skeleton.
21766
21767 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21768
21769 * src/output.c (output_parser): Delete unused variable actions_dumped.
21770
21771 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21772
21773 * src/output.c (output): Delete call to reader_output_yylsp.
21774 * src/reader.c (reader): Likewise.
21775 * src/reader.h: Delete declaration of reader_output_yylsp.
21776
21777 2001-09-02 Marc Autret <autret_m@epita.fr>
21778
21779 * src/reader.c: Include muscle_tab.h.
21780 (parse_union_decl): Update.
21781 (parse_macro_decl): Rename parse_muscle_decl.
21782 Update to use renamed functions and variable.
21783 (read_declarations, copy_action, read_additionnal_code, : Updated
21784 with correct variables and functions names.
21785 (packsymbols, reader): Likewise.
21786
21787 * src/reader.h (muscle_obstack): Extern declaration update.
21788
21789 * src/output.c: Include muscle_tab.h
21790 In all functions using macro_insert, change by using muscle_insert ().
21791 (macro_obstack): Rename muscle_obstack.
21792 Echo modifications in the whole file.
21793 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21794 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21795 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21796
21797 * src/muscle_tab.h: Update double inclusion macros.
21798 (macro_entry_s): Rename muscle_entry_s.
21799 Update prototypes.
21800
21801 * src/muscle_tab.c: Include muscle_tab.h.
21802 Rename macro_tabble to muscle_table.
21803 (mhash1, mhash2, mcmp): Use muscle_entry.
21804 (macro_init): Rename muscle_init. Update.
21805 (macro_insert): Rename muscle_insert. Update.
21806 (macro_find): Rename muscle_find. Update.
21807
21808 * src/main.c: Include muscle_tab.h.
21809 (main): Call muscle_init ().
21810 * src/Makefile.am (bison_SOURCES): Echo modifications.
21811
21812 2001-09-02 Marc Autret <autret_m@epita.fr>
21813
21814 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21815
21816 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21817
21818 2001-09-02 Marc Autret <autret_m@epita.fr>
21819
21820 * src/macrotab.c, src/macrotab.h: Remove.
21821
21822 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21823
21824 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21825 filename.
21826
21827 2001-09-01 Marc Autret <autret_m@epita.fr>
21828
21829 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21830 to an explicit value to activate the feature. We do it here.
21831
21832 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21833
21834 * src/output.c (prepare): Delete the `filename' muscule insertion.
21835 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21836 (parse_union_decl): Likewise.
21837 * src/macrotab.c (macro_init): Initialize filename by infile.
21838
21839 2001-08-31 Marc Autret <autret_m@epita.fr>
21840
21841 * src/bison.simple (YYLSP_NEEDED): New definition.
21842 * src/output.c (prepare): Add macro insertion of `locations_flag'
21843
21844 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21845
21846 * src/output.c (prepare): Delete insertion of previous muscles,
21847 and insert the `prefix' muscles.
21848 * src/macrotab.c (macro_init): Likewise.
21849 (macro_init): Initialization prefix directive by `yy'.
21850 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21851 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21852 yylval, yydebug, yyerror, yynerrs and yyparse.
21853 New directive `#define' to substitute yydebug, ... with option
21854 name_prefix.
21855
21856 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21857
21858 * src/main.c (main): Standardize.
21859 * src/output.c (output_table_data, output_parser): Likewise.
21860 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21861
21862 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21863
21864 * src/reader.c (read_additionnal_code): Rename %%user_code to
21865 %%epilogue.
21866 * src/output.c (output): Rename %%declarations to %%prologue.
21867 * src/bison.simple: Echo modifications.
21868
21869 2001-08-31 Marc Autret <autret_m@epita.fr>
21870
21871 * src/reader.c (readgram): CleanUp.
21872 (output_token_defines): Likewise.
21873 (packsymbols): Likewise.
21874 (reader): Likewise.
21875 * src/output.c (output): CPP-out useless code.
21876
21877 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21878
21879 * src/reader.c (reader): Delete obsolete call to function
21880 output_trailers and output_headers.
21881 * src/output.h: Remove obsolete functions prototypes of output_headers
21882 and output_trailers.
21883
21884 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21885
21886 * src/main.c: Include macrotab.h.
21887 * src/macrotab.h (macro_entry_s): Constify fields.
21888 Adjust functions prototypes.
21889 * src/macrotab.c (macro_insert): Constify key and value.
21890 (macro_find): Constify key.
21891 (macro_insert): Include 'xalloc.h'
21892 (macro_insert): Use XMALLOC.
21893 (macro_find): Constify return value.
21894 * src/output.c (output_table_data): Rename table to table_data.
21895 (output_parser): Constify macro_key, macro_value.
21896
21897 2001-08-30 Marc Autret <autret_m@epita.fr>
21898
21899 * src/reader.c (parse_skel_decl): New.
21900 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21901 * src/lex.h (token_t): New token `tok_skel'.
21902 * src/lex.c (percent_table): Add skeleton option entry.
21903 Standardize.
21904
21905 2001-08-29 Marc Autret <autret_m@epita.fr>
21906
21907 * src/bison.simple: Add %%user_code directive at the end.
21908 * src/reader.c (read_additionnal_code): New.
21909 (reader): Use it.
21910 * src/output.c (output_program): Remove.
21911 (output): Update.
21912
21913 2001-08-28 Marc Autret <autret_m@epita.fr>
21914
21915 * src/output.c (output_actions): Clean up.
21916 (output_gram): CPP-out useless code.
21917 * src/reader.c (reader): Clean up, CPP-out useless code.
21918
21919 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21920
21921 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21922 directive.
21923 * src/bison.simple: Add `%%definitions'.
21924
21925 2001-08-28 Marc Autret <autret_m@epita.fr>
21926
21927 * config/depcomp: New file.
21928
21929 2001-08-27 Paul Eggert <eggert@twinsun.com>
21930
21931 * src/bison.simple (yyparse): Don't take the address of an
21932 item before the start of an array, as that doesn't conform to
21933 the C Standard.
21934
21935 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21936
21937 * src/output.c (output): Remove the initialization of the macro
21938 obstack. It was done too late here.
21939
21940 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21941 completely wrong.
21942 (reader): Initialize the macro obstack here, since we need it to grow
21943 '%define' directives.
21944
21945 * src/reader.h: Declare the macro obstack as extern.
21946
21947 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21948
21949 * src/output.c (output_parser): Fix. Store single '%' characters in
21950 the output obstack instead of throwing them away.
21951
21952 2001-08-27 Akim Demaille <akim@epita.fr>
21953
21954 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21955
21956 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21957
21958 * lib/Makefile.am: Adjust.
21959
21960 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21961
21962 * src/bison.simple: Update and add '%%' directives.
21963
21964 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21965
21966 * src/reader.c (reader): Remove calls to 'output_headers' and
21967 'output_trailers'. Remove some C output.
21968 (readgram): Disable a piece of code that was writing a default
21969 definition for 'YYSTYPE'.
21970 (reader_output_yylsp): Remove.
21971 (packsymbols): Output token defintions to a macro.
21972 (copy_definition): Disable C output.
21973
21974 * src/reader.c (parse_macro_decl): New function used to parse macro
21975 declarations.
21976 (copy_string2): Put the body of copy_string into this new function.
21977 Add a parameter to let the caller choose whether he wants to copy the
21978 string delimiters or not.
21979 (copy_string): Be a simple call to copy_string2 with the last argument
21980 bound to true.
21981 (read_declarations): Add case for macro definition.
21982 (copy_identifier): New.
21983 (parse_macro_decl): Read macro identifiers using copy_identifier
21984 rather than lex.
21985
21986 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21987
21988 * src/output.c (prepare): Add prefixed names.
21989 (output_parser): Output semantic actions.
21990 (output_parser): Fix bug on '%%line' directives.
21991
21992 * src/output.c (output_headers): Remove. The C code printed by this
21993 function should now be in the skeletons.
21994 (output_trailers): Remove.
21995 (output): Disable call to 'reader_output_yylsp'.
21996 (output_rule_data): Do not output tables to the table obstack.
21997
21998 * src/output.c: Remove some C dedicated output.
21999 Improve the use of macro and output obstacks.
22000 (output_defines): Remove.
22001
22002 * src/output.c (output_token_translations): Associate 'translate'
22003 table with a macro. No output to the table obstack.
22004 (output_gram): Same for 'rhs' and 'prhs'.
22005 (output_stos): Same for 'stos'.
22006 (output_rule_data): Same for 'r1' and 'r2'.
22007 (token_actions): Same for 'defact'.
22008 (goto_actions): Same for 'defgoto'.
22009 (output_base): Same for 'pact' and 'pgoto'.
22010 (output_table): Same for 'table'.
22011 (output_check): Same for 'check'.
22012
22013 * src/output.c (output_table_data): New function.
22014 (output_short_table): Remove.
22015 (output_short_or_char_table): Remove.
22016
22017 * src/output.c (output_parser): Replace most of the skeleton copy code
22018 with something new. Skeletons are now processed character by character
22019 rather than line by line, and Bison looks for '%%' macros. This is the
22020 first step in making Bison's output process (a lot) more flexible.
22021 (output_parser): Use the macro table.
22022
22023 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22024
22025 * src/main.c (main): Initialize the macro table.
22026
22027 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22028
22029 * src/lex.c (percent_table): Add tok_define.
22030 * src/lex.h: Add tok_define.
22031
22032 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22033
22034 * src/macrotab.c: New file.
22035 * src/macrotab.h: New file.
22036 * src/Makefile.am: Update.
22037
22038 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22039
22040 * lib/hash.c: New file.
22041 * lib/hash.h: New file.
22042 * lib/Makefile.am: Update.
22043
22044 2001-08-15 Akim Demaille <akim@epita.fr>
22045
22046 Version 1.28c.
22047
22048 2001-08-15 Marc Autret <autret_m@epita.fr>
22049
22050 * src/reader.c (readgram): Indent output macro YYSTYPE.
22051 (packsymbols): Likewise.
22052 (output_token_defines): Likewise.
22053 * src/files.c: Standardize.
22054 (compute_header_macro): New.
22055 (defines_obstack_save): New. Use compute_header_macro.
22056 (output_files): Update. Use defines_obstack_save.
22057
22058 2001-08-15 Akim Demaille <akim@epita.fr>
22059
22060 * doc/bison.texinfo (Table of Symbols): Document
22061 YYSTACK_USE_ALLOCA.
22062
22063 2001-08-15 Akim Demaille <akim@epita.fr>
22064
22065 * missing: Update from CVS Automake.
22066 * config/config.guess, config/config.sub, config/texinfo.tex:
22067 Update from gnu.org.
22068
22069 2001-08-15 Akim Demaille <akim@epita.fr>
22070
22071 * Makefile.maint: Sync with CVS Autoconf.
22072
22073 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22074
22075 * doc/bison.texinfo: Include GNU Free Documentation License from
22076 `fdl.texi'.
22077 * doc/fdl.texi: Add to package.
22078
22079 2001-08-14 Marc Autret <autret_m@epita.fr>
22080
22081 Turn on %{source,header}_extension features.
22082
22083 * src/lex.c (percent_table): Un-CPP out header_extension and
22084 source_extension.
22085 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22086 (compute_exts_from_src): Remove conditions. It restores priorities
22087 between options.
22088
22089 2001-08-14 Marc Autret <autret_m@epita.fr>
22090
22091 * src/files.c (compute_base_names): Add extensions computing when
22092 `--file-prefix' used.
22093 Standardize function calls.
22094
22095 2001-08-13 Marc Autret <autret_m@epita.fr>
22096
22097 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22098 defining it (defined but null disables alloca).
22099
22100 2001-08-13 Marc Autret <autret_m@epita.fr>
22101
22102 * src/bison.simple (_yy_memcpy): CPP reformat.
22103
22104 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22105
22106 * tests/atconfig.in (CPPFLAGS): Fix.
22107
22108 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22109
22110 * doc/bison.texinfo: Include GNU General Public License from
22111 `gpl.texi'.
22112 * doc/gpl.texi: Add to package.
22113
22114 2001-08-10 Marc Autret <autret_m@epita.fr>
22115
22116 * src/print_graph.h: Fix.
22117 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22118
22119 2001-08-10 Akim Demaille <akim@epita.fr>
22120
22121 * src/system.h: Provide default declarations for stpcpy, strndup,
22122 and strnlen.
22123
22124 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22125
22126 * doc/bison.texinfo (Locations): Update @$ stuff.
22127
22128 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22129
22130 * src/bison.simple (YYLLOC_DEFAULT): Update.
22131 (yyparse): Adjust.
22132
22133 2001-08-08 Marc Autret <autret_m@epita.fr>
22134
22135 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22136 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22137 Reported by Fabrice Bauzac.
22138
22139 2001-08-08 Marc Autret <autret_m@epita.fr>
22140
22141 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22142 * src/vcg.c (output_node): Fix.
22143 * src/vcg.h: Cleanup.
22144 * src/print_graph.c: Add comments.
22145 (node_output_size): New global variable. Simplify the formatting of
22146 the VCG graph output.
22147 (print_actions): Unused code is now used. It notifies the final state
22148 and no action states in the VCG graph. It also give the reduce actions.
22149 The `shift and goto' edges are red and the `go to state' edges are
22150 blue.
22151 Get the current node name and node_obstack by argument.
22152 (node_obstack): New variable.
22153 (print_state): Manage node_obstack.
22154 (print_core): Use node_obstack given by argument.
22155 A node is not only computed here but in print_actions also.
22156 (print_graph): CPP out useless code instead of commenting it.
22157
22158 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22159
22160 * tests/atconfig.in (CPPFLAGS): Fix.
22161
22162 2001-08-07 Akim Demaille <akim@epita.fr>
22163
22164 * src/print_graph.c (quote): New.
22165 (print_core): Use it.
22166
22167 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22168
22169 * src/vcg.c (complain.h): Include it.
22170 Unepitaize `return' invocations.
22171 [NDEBUG] (main): Remove.
22172 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22173 * src/files.c (open_files): Initialize graph_obstack.
22174 * src/print_graph.c (print_actions): CPP out useless code.
22175 (print_core): Don't output the last `\n' in labels.
22176 Use `quote'.
22177 * src/files.c (output_files): Output the VCG file.
22178 * src/main.c (main): Invoke print_graph ();
22179
22180 2001-08-06 Marc Autret <autret_m@epita.fr>
22181
22182 Automaton VCG graph output.
22183 Using option ``-g'' or long option ``--graph'', you can generate
22184 a gram_filename.vcg file containing a VCG description of the LALR (1)
22185 automaton of your grammar.
22186
22187 * src/main.c: Call to print_graph() function.
22188 * src/getargs.h: Update.
22189 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22190 (graph_flag): New flag.
22191 (longopts): Update.
22192 (getargs): Add case `g'.
22193 * src/files.c (graph_obstack): New obstack struct.
22194 (open_files): Initialize new obstack.
22195 (output_files): Saves graph_obstack if required.
22196 * src/files.h (graph_obstack): New extern declaration.
22197 * src/Makefile.am: Add new source files.
22198
22199 2001-08-06 Marc Autret <autret_m@epita.fr>
22200
22201 * src/print_graph.c, src/print_graph.h (graph): New.
22202 * src/vcg.h: New file.
22203 * src/vcg.c: New file, VCG graph handling.
22204
22205 2001-08-06 Marc Autret <autret_m@epita.fr>
22206
22207 Add of %source_extension and %header_extension which specify
22208 the source or/and the header output file extension.
22209
22210 * src/files.c (compute_base_names): Remove initialisation of
22211 src_extension and header_extension.
22212 (compute_exts_from_gf): Update.
22213 (compute_exts_from_src): Update.
22214 (output_files): Update.
22215 * src/reader.c (parse_header_extension_decl): New.
22216 (parse_source_extension_decl): New.
22217 (read_declarations): New case statements for the new tokens.
22218 * src/lex.c (percent_table): Add entries for %source_extension
22219 and %header_extension.
22220 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22221
22222 2001-08-06 Marc Autret <autret_m@epita.fr>
22223
22224 * configure.in: Bump to 1.28c.
22225 * doc/bison.texinfo: Texinfo thingies.
22226
22227 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22228
22229 * tests/atconfig.in (CPPFLAGS): Add.
22230 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22231
22232 2001-08-03 Akim Demaille <akim@epita.fr>
22233
22234 Version 1.28b.
22235
22236 2001-08-03 Akim Demaille <akim@epita.fr>
22237
22238 * tests/Makefile.am (check-local): Ship testsuite.
22239 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22240 Include `string.h'.
22241
22242 2001-08-03 Akim Demaille <akim@epita.fr>
22243
22244 * configure.in: Try using -Wformat when compiling.
22245
22246 2001-08-03 Akim Demaille <akim@epita.fr>
22247
22248 * configure.in: Bump to 1.28b.
22249
22250 2001-08-03 Akim Demaille <akim@epita.fr>
22251
22252 * src/complain.c: Adjust strerror_r portability issues.
22253
22254 2001-08-03 Akim Demaille <akim@epita.fr>
22255
22256 Version 1.28a.
22257
22258 2001-08-03 Akim Demaille <akim@epita.fr>
22259
22260 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22261 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22262 * src/getargs.c: Include complain.h.
22263 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22264 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22265
22266 2001-08-03 Akim Demaille <akim@epita.fr>
22267
22268 * src/reader.c (readgram): Display hidden chars in error messages.
22269
22270 2001-08-03 Akim Demaille <akim@epita.fr>
22271
22272 Update to gettext 0.10.39.
22273
22274 2001-08-03 Akim Demaille <akim@epita.fr>
22275
22276 * lib/strspn.c: New.
22277
22278 2001-08-01 Marc Autret <autret_m@epita.fr>
22279
22280 * doc/bison.texinfo: Update.
22281 * doc/bison.1 (mandoc): Update.
22282 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22283 * src/files.c: Support output files extensions computing.
22284 (src_extension): New static variable.
22285 (header_extension): New static variable.
22286 (tr): New function.
22287 (get_extension_index): New function, gets the index of an extension
22288 filename in a string.
22289 (compute_exts_from_gf): New function, computes extensions from the
22290 grammar file extension.
22291 (compute_exts_from_src): New functions, computes extensions from the
22292 C source file extension, file given by ``-o'' option.
22293 (compute_base_names): Update.
22294 (output_files): Update.
22295
22296 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22297
22298 * doc/bison.texi: Document @$.
22299 (Locations): New section.
22300
22301 2001-07-18 Akim Demaille <akim@epita.fr>
22302
22303 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22304 * config/prev-version.txt, config/move-if-change: New.
22305 * Makefile.am: Adjust.
22306
22307 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22308
22309 * src/bison.simple (yyparse): Suppress warning `comparaison
22310 between signed and unsigned'.
22311
22312 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22313
22314 * src/getargs.h (raw_flag): Remove.
22315 * src/getargs.c: Die on `-r'/`--raw'.
22316 * src/lex.c (parse_percent_token): Die on `%raw'.
22317 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22318 * tests/calc.at: Suppress test with option `--raw'.
22319
22320 2001-07-14 Akim Demaille <akim@epita.fr>
22321
22322 * config/: New.
22323 * configure.in: Require Autoconf 2.50.
22324 Update to gettext 0.10.38.
22325
22326 2001-03-16 Akim Demaille <akim@epita.fr>
22327
22328 * doc/bison.texinfo: ANSIfy the examples.
22329
22330 2001-03-16 Akim Demaille <akim@epita.fr>
22331
22332 * getargs.c (skeleton): New variable.
22333 (longopts): --skeleton is a new option.
22334 (shortopts, getargs): -S is a new option.
22335 * getargs.h: Declare skeleton.
22336 * output.c (output_parser): Use it.
22337
22338 2001-03-16 Akim Demaille <akim@epita.fr>
22339
22340 * m4/strerror_r.m4: New.
22341 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22342 * lib/error.h, lib/error.c: Update.
22343
22344 2001-03-16 Akim Demaille <akim@epita.fr>
22345
22346 * src/getargs.c (longopts): Clean up.
22347
22348 2001-02-21 Akim Demaille <akim@epita.fr>
22349
22350 * src/reader.c (gensym): `gensym_count' is your own.
22351 Use a static buf to create the symbol name, as token_buffer is no
22352 longer a buffer.
22353
22354 2001-02-08 Akim Demaille <akim@epita.fr>
22355
22356 * src/conflicts.c (conflict_report): Be sure not to append to res
22357 between two calls, which could happen if both first sprintf were
22358 skipped, but not the first cp += strlen.
22359
22360 2001-02-08 Akim Demaille <akim@epita.fr>
22361
22362 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22363 New, from fileutils 4.0.37.
22364 * configure.in: Require Autoconf 2.49c. I took some time before
22365 making this decision. This is the only way out for portability
22366 issues in Bison, it would mean way too much duplicate effort to
22367 import in Bison features implemented in 2.49c since 2.13.
22368 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22369
22370 2001-02-02 Akim Demaille <akim@epita.fr>
22371
22372 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22373 * lib/xalloc.h, lib/xmalloc.c: Update.
22374
22375 2001-01-19 Akim Demaille <akim@epita.fr>
22376
22377 Get rid of the ad hoc handling of token_buffer in the scanner: use
22378 the obstacks.
22379
22380 * src/lex.c (token_obstack): New.
22381 (init_lex): Initialize it. No longer call...
22382 (grow_token_buffer): this. Remove it.
22383 Adjust all the places which used it to use the obstack.
22384
22385 2001-01-19 Akim Demaille <akim@epita.fr>
22386
22387 * src/lex.h: Rename all the tokens:
22388 s/\bENDFILE\b/tok_eof/g;
22389 s/\bIDENTIFIER\b/tok_identifier/g;
22390 etc.
22391 Let them be enums, not #define, to ease debugging.
22392 Adjust all the code.
22393
22394 2001-01-18 Akim Demaille <akim@epita.fr>
22395
22396 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22397 * src/lex.c (maxtoken, grow_token_buffer): Static.
22398
22399 2001-01-18 Akim Demaille <akim@epita.fr>
22400
22401 Since we now use obstacks, more % directives can be enabled.
22402
22403 * src/lex.c (percent_table): Also accept `%yacc',
22404 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22405 `%debug'.
22406 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22407 instead of returning a token.
22408 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22409 * src/reader.c (read_declarations): Adjust.
22410 * src/files.c (open_files): Don't call `compute_base_names', don't
22411 compute `attrsfile' since they depend upon data which might be
22412 *in* the input file now.
22413 (output_files): Do it here.
22414 * src/output.c (output_headers): Document the fact that this patch
22415 introduces a guaranteed SEGV for semantic parsers.
22416 * doc/bison.texinfo: Document them.
22417 * tests/suite.at: Exercise these %options.
22418
22419 2000-12-20 Akim Demaille <akim@epita.fr>
22420
22421 Also handle the output file (--verbose) with obstacks.
22422
22423 * files.c (foutput): Remove.
22424 (output_obstack): New.
22425 Adjust all dependencies.
22426 * src/conflicts.c: Return a string.
22427 * src/system.h (obstack_grow_string): Rename as...
22428 (obstack_sgrow): this. Be ready to work with non literals.
22429 (obstack_fgrow4): New.
22430
22431 2000-12-20 Akim Demaille <akim@epita.fr>
22432
22433 * src/files.c (open_files): Fix the computation of short_base_name
22434 in the case of `-o foo.tab.c'.
22435
22436 2000-12-20 Akim Demaille <akim@epita.fr>
22437
22438 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22439 (copy_dollar): Now that everything uses obstacks, get rid of the
22440 FILE * parameters.
22441
22442 2000-12-20 Akim Demaille <akim@epita.fr>
22443
22444 * src/files.c (open_files): Actually the `.output' file is based
22445 on the short_base_name, not base_name.
22446 * tests/suite.at (Checking output file names): Adjust.
22447
22448 2000-12-20 Akim Demaille <akim@epita.fr>
22449
22450 * src/bison.s1: Remove, we now use directly...
22451 * src/bison.simple: this.
22452 * src/Makefile.am: Use pkgdata instead of data.
22453
22454 2000-12-20 Akim Demaille <akim@epita.fr>
22455
22456 * src/files.c (guard_obstack): New.
22457 (open_files): Initialize it.
22458 (output_files): Dump it...
22459 * src/files.h: Export it.
22460 * src/reader.c (copy_guard): Use it.
22461
22462 2000-12-19 Akim Demaille <akim@epita.fr>
22463
22464 * src/files.c (outfile, defsfile, actfile): Removed as global
22465 vars.
22466 (open_files): Don't compute them.
22467 (output_files): Adjust.
22468 (base_name, short_base_name): Be global.
22469 Adjust dependencies.
22470
22471 2000-12-19 Akim Demaille <akim@epita.fr>
22472
22473 * src/files.c (strsuffix): New.
22474 (stringappend): Be just like strcat but allocate.
22475 (base_names): Eve out from open_files.
22476 Try to simplify the rather hairy computation of base_name and
22477 short_base_name.
22478 (open_files): Use it.
22479 * tests/suite.at (Checking output file names): New test.
22480
22481 2000-12-19 Akim Demaille <akim@epita.fr>
22482
22483 * src/system.h (obstack_grow_literal_string): Rename as...
22484 (obstack_grow_string): this.
22485 * src/output.c (output_parser): Recognize `%% actions' instead of
22486 `$'.
22487 * src/bison.s1: s/$/%% actions/.
22488 * src/bison.hairy: Likewise.
22489
22490 2000-12-19 Akim Demaille <akim@epita.fr>
22491
22492 * src/output.c (output_parser): Compute the `#line' lines when
22493 there are.
22494 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22495 Suggested by Hans Aberg.
22496
22497 2000-12-19 Akim Demaille <akim@epita.fr>
22498
22499 Let the handling of the skeleton files be local to the procedures
22500 that use it.
22501
22502 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22503 longer static.
22504 (fparser, open_extra_files): Remove.
22505 (open_files, output_files): Don't take care of fparser.
22506 * src/files.h: Adjust.
22507 * src/output.c (output_parser): Open and close the file to the
22508 skeleton.
22509 * src/reader.c (read_declarations): When %semantic_parser, open
22510 fguard.
22511
22512 2000-12-19 Akim Demaille <akim@epita.fr>
22513
22514 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22515 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22516
22517 2000-12-19 Akim Demaille <akim@epita.fr>
22518
22519 * src/files.c (open_files): Yipee! We no longer need all the code
22520 looking for `/tmp' since we have no tmp file.
22521
22522 2000-12-19 Akim Demaille <akim@epita.fr>
22523
22524 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22525 New macros.
22526 * src/files.c (open_files): Less dependency on MSDOS etc.
22527
22528 2000-12-14 Akim Demaille <akim@epita.fr>
22529
22530 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22531 Provide a default definition.
22532 Use it when executing the default @ action.
22533 * src/reader.c (reader_output_yylsp): No longer include
22534 `timestamp' and `text' in the default YYLTYPE.
22535
22536 2000-12-12 Akim Demaille <akim@epita.fr>
22537
22538 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22539 (copy_guard): Quote the file names.
22540 Reported by Laurent Mascherpa.
22541
22542 2000-12-12 Akim Demaille <akim@epita.fr>
22543
22544 * src/output.c (output_headers, output_program, output): Be sure
22545 to escape special characters when outputting filenames.
22546 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22547 (output_headers): Don't depend on them, Use ACTSTR.
22548
22549 2000-11-17 Akim Demaille <akim@epita.fr>
22550
22551 * lib/obstack.h: Formatting changes.
22552 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22553 prevents type checking.
22554 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22555 cast the value to (void *): assigning a `foo *' to a `void *'
22556 variable is valid.
22557 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22558 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22559 append characters.
22560
22561 2000-11-17 Akim Demaille <akim@epita.fr>
22562
22563 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22564 as...
22565 (suite.m4, regression.m4, calc.m4): these.
22566 * tests/atgeneral.m4: Update from CVS Autoconf.
22567
22568 2000-11-17 Akim Demaille <akim@epita.fr>
22569
22570 * tests/regression.m4 (%union and --defines): New test,
22571 demonstrating a current bug in the obstack implementation.
22572
22573 2000-11-17 Akim Demaille <akim@epita.fr>
22574
22575 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22576 macros.
22577 Use them to declare the variables which are global or local to
22578 `yyparse'.
22579
22580 2000-11-17 Akim Demaille <akim@epita.fr>
22581
22582 * acconfig.h: Remove, no longer used.
22583
22584 2000-11-07 Akim Demaille <akim@epita.fr>
22585
22586 * src: s/Copyright (C)/Copyright/g.
22587
22588 2000-11-07 Akim Demaille <akim@epita.fr>
22589
22590 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22591 defining.
22592 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22593
22594 2000-11-07 Akim Demaille <akim@epita.fr>
22595
22596 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22597 Merge in a single CPP if/else.
22598
22599 2000-11-07 Akim Demaille <akim@epita.fr>
22600
22601 * src/output.c (output): Remove useless variables.
22602 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22603 argument `data' for consistency with the prototypes.
22604 Qualify it `const'.
22605 (obstack_copy, obstack_copy0): Rename the second argument as
22606 `address' for consistency. Qualify it `const'.
22607 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22608 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22609 `const' their input argument (`data' or `address').
22610 Adjust the corresponding macros to include `const' in casts.
22611
22612 2000-11-03 Akim Demaille <akim@epita.fr>
22613
22614 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22615 s/PFILE1/BISON_HAIRY/.
22616 Adjust dependencies.
22617
22618 2000-11-03 Akim Demaille <akim@epita.fr>
22619
22620 For some reason, this was not applied.
22621
22622 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22623 `unlink': it's no longer used.
22624
22625 2000-11-03 Akim Demaille <akim@epita.fr>
22626
22627 * src/files.c (skeleton_find): New function, eved out of...
22628 (open_files, open_extra_files): here.
22629
22630 2000-11-03 Akim Demaille <akim@epita.fr>
22631
22632 Don't use `atexit'.
22633
22634 * src/files.c (obstack_save): New function.
22635 (done): Rename as...
22636 (output_files): this.
22637 Use `obstack_save'.
22638 * src/main.c (main): Don't use `atexit' to register `done', since
22639 it no longer has to remove tmp files, just call `output_files'
22640 when there are no errors.
22641
22642 2000-11-02 Akim Demaille <akim@epita.fr>
22643
22644 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22645 `unlink': it's no longer used.
22646 * src/files.h: Formatting changes.
22647
22648 2000-11-02 Akim Demaille <akim@epita.fr>
22649
22650 Remove the last uses of mktemp and unlink/delete.
22651
22652 * src/files.c (fdefines, ftable): Removed.
22653 (defines_ostack, table_obstack): New.
22654 Adjust dependencies of the former into uses of the latter.
22655 * src/output.c (output_short_or_char_table, output_short_table):
22656 Convert to using obstacks.
22657 * src/reader.c (copy_comment2): Accept one FILE * and two
22658 obstacks.
22659 (output_token_defines, reader_output_yylsp): Use obstacks.
22660 * src/system.h (obstack_fgrow3): New.
22661 * po/POTFILES.in: Adjust.
22662
22663 2000-11-01 Akim Demaille <akim@epita.fr>
22664
22665 Change each use of `fattrs' into a use of `attrs_obstack'.
22666
22667 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22668 * src/files.c (fattrs): Remove.
22669 (attrs_obstack): New.
22670 Adjust all dependencies.
22671 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22672
22673 2000-11-01 Akim Demaille <akim@epita.fr>
22674
22675 Introduce obstacks.
22676 Change each use of `faction' into a use of `action_obstack'.
22677
22678 * lib/obstack.h, lib/obstack.c: New files.
22679 * src/files.c (faction): Remove.
22680 (action_obstack): New.
22681 Adjust all dependencies.
22682
22683 2000-10-20 Akim Demaille <akim@epita.fr>
22684
22685 * lib/quote.h (PARAMS): New macro. Use it.
22686
22687 2000-10-16 Akim Demaille <akim@epita.fr>
22688
22689 * src/output.c (output_short_or_char_table): New function.
22690 (output_short_table, output_token_translations): Use it.
22691 (goto_actions): Use output_short_table.
22692
22693 2000-10-16 Akim Demaille <akim@epita.fr>
22694
22695 * src/symtab.c (bucket_new): New function.
22696 (getsym): Use it.
22697
22698 * src/output.c (output_short_table): New argument to display the
22699 comment associated with the table.
22700 Adjust dependencies.
22701 (output_gram): Use it.
22702 (output_rule_data): Nicer output layout for YYTNAME.
22703
22704 2000-10-16 Akim Demaille <akim@epita.fr>
22705
22706 * src/lex.c (read_typename): New function.
22707 (lex): Use it.
22708 * src/reader.c (copy_dollar): Likewise.
22709
22710 2000-10-16 Akim Demaille <akim@epita.fr>
22711
22712 * src/reader.c (copy_comment2): Expect the input stream to be on
22713 the `/' which is suspected to open a comment, instead of being
22714 called after `//' or `/*' was read.
22715 (copy_comment, copy_definition, parse_union_decl, copy_action)
22716 (copy_guard): Adjust.
22717
22718 2000-10-16 Akim Demaille <akim@epita.fr>
22719
22720 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22721 `read_signed_integer'.
22722
22723 2000-10-16 Akim Demaille <akim@epita.fr>
22724
22725 * src/reader.c (copy_dollar): New function.
22726 (copy_guard, copy_action): Use it.
22727
22728 2000-10-16 Akim Demaille <akim@epita.fr>
22729
22730 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22731 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22732 New files, from Fileutils 4.0.27.
22733 * src/main.c (printable_version): Remove.
22734 * src/lex.c, src/reader.c: Use `quote'.
22735
22736 2000-10-04 Akim Demaille <akim@epita.fr>
22737
22738 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22739
22740 2000-10-04 Akim Demaille <akim@epita.fr>
22741
22742 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22743
22744 2000-10-04 Akim Demaille <akim@epita.fr>
22745
22746 When a literal string is used to define two different tokens,
22747 `bison -v' segfaults.
22748 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22749
22750 * tests/regression.m4: New file.
22751 Include the core of the sample provided by Piotr Gackiewicz.
22752 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22753 properly.
22754
22755 2000-10-04 Akim Demaille <akim@epita.fr>
22756
22757 * src/reader.c (parse_expect_decl): Keep `count' within the size
22758 of `buffer'.
22759 From Neil Booth.
22760
22761 2000-10-02 Paul Eggert <eggert@twinsun.com>
22762
22763 * bison.s1 (yyparse): Assign the default value
22764 unconditionally, to avoid a GCC warning and make the parser a
22765 tad smaller.
22766
22767 2000-10-02 Akim Demaille <akim@epita.fr>
22768
22769 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22770 options.
22771
22772 2000-10-02 Akim Demaille <akim@epita.fr>
22773
22774 * src/derives.c, src/print.c, src/reduce.c: To ease the
22775 translation, move some `\n' out of the translated strings.
22776
22777 2000-10-02 Akim Demaille <akim@epita.fr>
22778
22779 The location tracking mechanism is precious for parse error
22780 messages. Nevertheless, it is enabled only when `@n' is used in
22781 the grammar, which is a different issue (you can use it in error
22782 message, but not in the grammar per se). Therefore, there should
22783 be another means to enable it.
22784
22785 * src/getargs.c (getargs): Support `--locations'.
22786 (usage): Report it.
22787 * src/getargs.h (locationsflag): Export it.
22788 * src/lex.c (percent_table): Support `%locations'.
22789 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22790 with `locationsflag'.
22791 * doc/bison.texinfo: Document `--locations' and `%locations'.
22792 Sort the options.
22793 * tests/calc.m4: Test it.
22794
22795 For regularity of the names, replace each
22796 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22797 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22798 In addition replace each `flag' with `_flag'.
22799
22800 2000-10-02 Akim Demaille <akim@epita.fr>
22801
22802 Also test parse error messages, including with YYERROR_VERBOSE.
22803
22804 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22805 associative).
22806 Use it to check the computations.
22807 Use it to check `nonassoc' is honored.
22808 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22809 `--yyerror-verbose'.
22810 (_AT_CHECK_CALC): Adjust to this option.
22811 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22812
22813 2000-10-02 Akim Demaille <akim@epita.fr>
22814
22815 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22816 the latter demonstrates a flaw in the handling of non debugging
22817 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22818 was used in order to simplify:
22819
22820 #if YYDEBUG
22821 if (yydebug)
22822 {
22823 ...
22824 }
22825 #endif
22826
22827 into
22828
22829 if (yydebug)
22830 {
22831 ...
22832 }
22833
22834 unfortunately this leads to a CPP conflict when
22835 `--name-prefix=foo' is used since it produces `#define yydebug
22836 foodebug'.
22837
22838 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22839 (YYDPRINTF): New macro.
22840 Spread its use.
22841 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22842 the bison options.
22843 Also test `--verbose', `--defines' and `--name-prefix'.
22844
22845 2000-10-02 Akim Demaille <akim@epita.fr>
22846
22847 Improve the readability of the produced parsers.
22848
22849 * src/bison.s1: Formatting changes.
22850 Improve the comment related to the `$' mark.
22851 (yydefault): Don't fall through to `yyresume': `goto' there.
22852 * src/output.c (output_parser): When the `$' is met, skip the end
22853 of its line.
22854 New variable, `number_of_dollar_signs', to check there's exactly
22855 one `$' in the parser skeleton.
22856
22857 2000-10-02 Akim Demaille <akim@epita.fr>
22858
22859 * lib/xstrdup.c: New file, from the fileutils.
22860 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22861 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22862 instead of strlen + xmalloc + strcpy.
22863 * src/symtab.c (copys): Remove, use xstrdup instead.
22864
22865 2000-10-02 Akim Demaille <akim@epita.fr>
22866
22867 * src/gram.h (associativity): New enum type which replaces the
22868 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22869 `right_assoc', `left_assoc' and `non_assoc'.
22870 Adjust all dependencies.
22871 * src/reader.c: Formatting changes.
22872 (LTYPESTR): Don't define it, use it as a literal in
22873 `reader_output_yylsp'.
22874 * src/symtab.h (symbol_class): New enum type which replaces the
22875 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22876 `sunknown', `stoken and `snterm'.
22877
22878 2000-10-02 Akim Demaille <akim@epita.fr>
22879
22880 * src/getargs.c (fixed_outfiles): Rename as...
22881 (yaccflag): for consistency and accuracy.
22882 Adjust dependencies.
22883
22884 2000-10-02 Akim Demaille <akim@epita.fr>
22885
22886 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22887 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22888 difficult and introduced a lot of core dump. It turns out that
22889 Bison used an implementation of `xmalloc' based on `calloc', and
22890 at various places it does depend upon the initialization to 0. I
22891 have not tried to isolate the pertinent places, and all the former
22892 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22893 someone should address this issue.
22894
22895 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22896 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22897 files.
22898 Adjust dependencies.
22899 * src/warshall.h: New file.
22900 Propagate.
22901
22902 2000-10-02 Akim Demaille <akim@epita.fr>
22903
22904 Various anti-`extern in *.c' changes.
22905
22906 * src/system.h: Include `assert.h'.
22907
22908 2000-10-02 Akim Demaille <akim@epita.fr>
22909
22910 * src/state.h (nstates, final_state, first_state, first_shift)
22911 (first_reduction): Move their exportation from here...
22912 * src/LR0.h: to here.
22913 Adjust dependencies.
22914 * src/getargs.c (statisticsflag): New variable.
22915 Add support for `--statistics'.
22916 Adjust dependencies.
22917
22918 Remove a lot of now useless `extern' statements in most files.
22919
22920 2000-10-02 Akim Demaille <akim@epita.fr>
22921
22922 * src/LR0.h: New file.
22923 Propagate its use.
22924
22925 2000-10-02 Akim Demaille <akim@epita.fr>
22926
22927 * src/print.h: New file.
22928 Propagate its use.
22929 * src/print.c: Formatting and ordering changes.
22930 (verbose, terse): Replace with...
22931 (print_results): this new function.
22932 Adjust dependencies.
22933
22934 2000-10-02 Akim Demaille <akim@epita.fr>
22935
22936 * src/conflicts.c (conflict_report): New function.
22937 (conflict_log, verbose_conflict_log): Replace with...
22938 (print_conflicts): this function.
22939 Adjust dependencies.
22940 * src/conflicts.h: New file.
22941 Propagate its inclusion.
22942
22943 2000-10-02 Akim Demaille <akim@epita.fr>
22944
22945 * src/nullable.h: New file.
22946 Propagate its inclusion.
22947 * src/nullable.c: Formatting changes.
22948
22949 2000-10-02 Akim Demaille <akim@epita.fr>
22950
22951 * src/reduce.h: New file.
22952 Propagate its inclusion.
22953 * src/reduce.c: Topological sort and other formatting changes.
22954 (bool, TRUE, FALSE): Move their definition to...
22955 * src/system.h: here.
22956
22957 2000-10-02 Akim Demaille <akim@epita.fr>
22958
22959 * src/files.c: Formatting changes.
22960 (tryopen, tryclose, openfiles): Rename as...
22961 (xfopen, xfclose, open_files): this.
22962 (stringappend): static.
22963 * src/files.h: Complete the list of exported symbols.
22964 Propagate its use.
22965
22966 2000-10-02 Akim Demaille <akim@epita.fr>
22967
22968 * src/reader.h: New file.
22969 Propagate its use instead of tedious list of `extern' and
22970 prototypes.
22971 * src/reader.c: Formatting changes, topological sort,
22972 s/register//.
22973
22974 2000-10-02 Akim Demaille <akim@epita.fr>
22975
22976 * src/lex.h: Prototype `lex.c' exported functions.
22977 * src/reader.c: Adjust.
22978 * src/lex.c: Formatting changes.
22979 (safegetc): Rename as...
22980 (xgetc): this.
22981
22982 2000-10-02 Akim Demaille <akim@epita.fr>
22983
22984 * src/lalr.h: New file.
22985 Propagate its inclusion instead of prototypes and `extern'.
22986 * src/lalr.c: Formatting changes, topological sorting etc.
22987
22988 2000-10-02 Akim Demaille <akim@epita.fr>
22989
22990 * src/output.c (token_actions): Introduce a temporary array,
22991 YYDEFACT, that makes it possible for this function to use
22992 output_short_table.
22993
22994 2000-10-02 Akim Demaille <akim@epita.fr>
22995
22996 `user_toknums' is output as a `short[]' in `output.c', while it is
22997 defined as a `int[]' in `reader.c'. For consistency with the
22998 other output tables, `user_toknums' is now defined as a table of
22999 shorts.
23000
23001 * src/reader.c (user_toknums): Be a short table instead of an int
23002 table.
23003 Adjust dependencies.
23004
23005 Factor the short table outputs.
23006
23007 * src/output.c (output_short_table): New function.
23008 * src/output.c (output_gram, output_stos, output_rule_data)
23009 (output_base, output_table, output_check): Use it.
23010
23011 2000-10-02 Akim Demaille <akim@epita.fr>
23012
23013 * src/output.c (output): Topological sort of the functions, in
23014 order to get rid of the `static' prototypes.
23015 No longer use `register'.
23016 * src/output.h: New file.
23017 Propagate its inclusion in files explicitly prototyping functions
23018 from output.c.
23019
23020 2000-09-21 Akim Demaille <akim@epita.fr>
23021
23022 * src/atgeneral.m4: Update from Autoconf.
23023
23024 2000-09-21 Akim Demaille <akim@epita.fr>
23025
23026 * src/closure.h: New file.
23027 * src/closure.c: Formatting changes, topological sort over the
23028 functions, use of closure.h.
23029 (initialize_closure, finalize_closure): Rename as...
23030 (new_closure, free_closure): these. Adjust dependencies.
23031 * src/LR0.c: Formatting changes, topological sort, use of
23032 cloture.h.
23033 (initialize_states): Rename as...
23034 (new_states): this.
23035 * src/Makefile.am (noinst_HEADERS): Adjust.
23036
23037 2000-09-20 Akim Demaille <akim@epita.fr>
23038
23039 * src/acconfig.h: Don't protect config.h against multiple
23040 inclusion.
23041 Don't define PARAMS.
23042 * src/system.h: Define PARAMS.
23043 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23044 purpose of config.h. system.h must not try to fix wrong
23045 definitions in config.h.
23046
23047 2000-09-20 Akim Demaille <akim@epita.fr>
23048
23049 * src/derives.h: New file.
23050 * src/main.c, src/derives.h: Use it.
23051 Formatting changes.
23052 * src/Makefile.am (noinst_HEADERS): Adjust.
23053
23054 2000-09-20 Akim Demaille <akim@epita.fr>
23055
23056 * tests/atgeneral.m4: Update from Autoconf.
23057 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23058 (AT_CHECK_CALC): New macros.
23059 Use these macros to test bison with options `', `--raw',
23060 `--debug', `--yacc', `--yacc --debug'.
23061
23062 2000-09-19 Akim Demaille <akim@epita.fr>
23063
23064 * src/output.c: Formatting changes.
23065 * src/machine.h: Remove, leaving its contents in...
23066 * src/system.h: here.
23067 Include stdio.h.
23068 Adjust all dependencies on stdio.h and machine.h.
23069 * src/getargs.h: New file.
23070 Let all `extern' declarations about getargs.c be replaced with
23071 inclusion of `getargs.h'.
23072 * src/Makefile.am (noinst_HEADERS): Adjust.
23073
23074 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23075 scope.
23076 (yyerror): Returns void, not int.
23077 * doc/bison.texinfo: Formatting changes.
23078
23079 2000-09-19 Akim Demaille <akim@epita.fr>
23080
23081 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23082 portable.
23083
23084 2000-09-18 Akim Demaille <akim@epita.fr>
23085
23086 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23087 * src/Makefile.am (INCLUDES): Don't.
23088 Be ready to fetch headers in lib/.
23089
23090 2000-09-18 Akim Demaille <akim@epita.fr>
23091
23092 * doc/bison.texinfo: Update the copyright.
23093 ANSIfy and GNUify the examples.
23094 Remove the old menu.
23095
23096 2000-09-18 Akim Demaille <akim@epita.fr>
23097
23098 First set of tests: use the `calc' example from the documentation.
23099
23100 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23101 is defined only when YYDEBUG is.
23102 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23103 * src/files.c (tryopen, tryclose): Formatting changes.
23104 Move to the top and be static.
23105 * src/reader.c (read_signed_integer): Likewise.
23106 * tests/calc.m4: New file.
23107 * Makefile.am, suite.m4: Adjust.
23108 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23109
23110 2000-09-18 Akim Demaille <akim@epita.fr>
23111
23112 Add support for an Autotest test suite for Bison.
23113
23114 * m4/m4.m4, m4/atconfig.m4: New files.
23115 * m4/Makefile.am (EXTRA_DIST): Adjust.
23116 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23117 files.
23118 * src/getargs.c: Display a more standard --version message.
23119 * src/reader.c (reader): Formatting changes.
23120 No longer depend upon VERSION_STRING.
23121 * configure.in: No longer use `dnl'.
23122 Set up the test suite and the new directory `tests/.
23123 (VERSION_STRING): Remove.
23124
23125 2000-04-14 Akim Demaille <akim@epita.fr>
23126
23127 * src/reader.c (copy_comment2): New function, same as former
23128 `copy_comment', but outputs into two FILE *.
23129 (copy_comment): Use it.
23130 (parse_union_decl): Use it.
23131 (get_type, parse_start_decl): Use the same `invalid' message.
23132 (parse_start_decl, parse_union_decl): Use the same `multiple'
23133 message.
23134 (parse_union_decl, copy_guard, copy_action): Use the same
23135 `unmatched' message.
23136 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23137
23138 2000-03-31 Akim Demaille <akim@epita.fr>
23139
23140 * src/files.c (tryopen, tryclose): Move to the top.
23141 Be static.
23142
23143 2000-03-31 Akim Demaille <akim@epita.fr>
23144
23145 * src/main.c (main): Don't call `done', exit does it.
23146
23147 2000-03-31 Akim Demaille <akim@epita.fr>
23148
23149 * allocate.c: s/return (foo)/return foo/.
23150 * lalr.c: Likewise.
23151 * LR0.c: Likewise.
23152 * output.c: Likewise.
23153 * reader.c: Likewise.
23154 * symtab.c: Likewise.
23155 * vmsgetargs.c: Likewise.
23156
23157 2000-03-31 Akim Demaille <akim@epita.fr>
23158
23159 Clean up the error reporting functions.
23160
23161 * src/report.c: New file.
23162 * src/report.h: Likewise.
23163 * src/Makefile.am: Adjust.
23164 * m4/error.m4: New file.
23165 * m4/Makefile.am: Adjust.
23166 * configure.in (jm_PREREQ_ERROR): Call it.
23167 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23168 Remove.
23169 (fatal, fatals): Remove. All callers use complain.c::fatal.
23170 (warn, warni, warns, warnss, warnss): Remove. All callers use
23171 complain.c::complain.
23172 (toomany): Remove, use fatal instead.
23173 * src/files.c (done): No argument, use complain_message_count.
23174 * src/main.c (main): Register `done' to `atexit'.
23175
23176 * src/getargs.c (usage): More `fputs', less `fprintf'.
23177
23178 2000-03-28 Akim Demaille <akim@epita.fr>
23179
23180 * lib/: New directory.
23181 * Makefile.am (SUBDIRS): Adjust.
23182 * configure.in: Adjust.
23183 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23184 useless.
23185 * src/alloca.c: Moved to lib/.
23186 * src/getopt.c: Likewise.
23187 * src/getopt1.c: Likewise.
23188 * src/getopt.h: Likewise.
23189 * src/ansi2knr.c: Likewise.
23190 * src/ansi2knr.1: Likewise.
23191 * src/Makefile.am: Adjust.
23192 * lib/Makefile.am: New file.
23193
23194 2000-03-28 Akim Demaille <akim@epita.fr>
23195
23196 * src/getargs.c (usage): Refresh the help message.
23197
23198 2000-03-17 Akim Demaille <akim@epita.fr>
23199
23200 * src/getopt1.c: Updated from textutils 2.0e
23201 * src/getopt.c: Likewise.
23202 * src/getopt.h: Likewise.
23203
23204 2000-03-17 Akim Demaille <akim@epita.fr>
23205
23206 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23207 the file name, not the whole `#line LINE FILE'.
23208
23209 2000-03-17 Akim Demaille <akim@epita.fr>
23210
23211 On syntax errors, report the token on which we choked.
23212
23213 * src/bison.s1 (yyparse): In the label yyerrlab, when
23214 YYERROR_VERBOSE, add yychar in msg.
23215
23216 2000-03-17 Akim Demaille <akim@epita.fr>
23217
23218 * src/reader.c (copy_at): New function.
23219 (copy_guard): Use it.
23220 (copy_action): Use it.
23221
23222 2000-03-17 Akim Demaille <akim@epita.fr>
23223
23224 Be kind to translators, save some useless translations.
23225
23226 * src/main.c (banner): New function.
23227 (fatal_banner): Use it.
23228 (warn_banner): Use it.
23229
23230 2000-03-17 Akim Demaille <akim@epita.fr>
23231
23232 * src/reader.c (copy_definition): Use copy_string and
23233 copy_comment. Removed now unused `match', `ended',
23234 `cplus_comment'.
23235 (copy_comment, copy_string): Moved, to be visible from
23236 copy_definition.
23237
23238 2000-03-17 Akim Demaille <akim@epita.fr>
23239
23240 * src/reader.c (copy_string): Declare `static inline'. No
23241 problems with inline, since it is checked by configure.
23242 (copy_comment): Likewise.
23243
23244 2000-03-17 Akim Demaille <akim@epita.fr>
23245
23246 * src/reader.c (packsymbols): Formatting changes.
23247
23248 2000-03-17 Akim Demaille <akim@epita.fr>
23249
23250 * src/reader.c (copy_comment): New function, factored out from:
23251 (copy_action): Use it. Removed now unused `match', `ended',
23252 `cplus_comment'.
23253 (copy_guard): Likewise.
23254
23255 2000-03-17 Akim Demaille <akim@epita.fr>
23256
23257 * src/reader.c (copy_string): New function, factored out from:
23258 (copy_action): Use it.
23259 (copy_guard): Likewise.
23260
23261 2000-03-17 Akim Demaille <akim@epita.fr>
23262
23263 Change the handling of @s so that they behave exactly like $s.
23264 There is now a pseudo variable @$ (readble and writable), location
23265 of the lhs of the rule (by default ranging from the location of
23266 the first symbol of the rhs, to the location of the last symbol,
23267 or, if the rhs is empty, YYLLOC).
23268
23269 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23270 yyval.
23271 (yyparse): When providing a default semantic action, provide a
23272 default location action.
23273 (after the $): No longer change `*YYLSP', just stack YYLOC the
23274 same way you stack YYVAL.
23275 * src/reader.c (read_declarations): Use warns.
23276 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23277 (copy_action, case '@'): Likewise.
23278 Use a standard error message, to save useless work from
23279 translators.
23280
23281 2000-03-17 Akim Demaille <akim@epita.fr>
23282
23283 * src/bison.s1: Formatting and cosmetics changes.
23284 * src/reader.c: Likewise.
23285 Update the Copyright notice.
23286
23287 2000-03-17 Akim Demaille <akim@epita.fr>
23288
23289 * src/bison.s1 (#line): All set to `#line' only, since the
23290 Makefile now handles them.
23291
23292 2000-03-16 Akim Demaille <akim@epita.fr>
23293
23294 * src/output.c (output_rule_data): Output the documentation of
23295 some of the tables.
23296 (Copyright notice): Update.
23297 Formatting changes.
23298
23299 2000-03-16 Akim Demaille <akim@epita.fr>
23300
23301 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23302 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23303 One `#if YYDEBUG' remains, since it uses variables which are
23304 defined only if `YYDEBUG != 0'.
23305
23306 2000-03-16 Akim Demaille <akim@epita.fr>
23307
23308 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23309 and related variables so that the similarities are highlighted.
23310
23311 2000-03-16 Akim Demaille <akim@epita.fr>
23312
23313 * src/bison.s1: Properly indent CPP directives.
23314
23315 2000-03-16 Akim Demaille <akim@epita.fr>
23316
23317 * src/bison.s1: Properly indent the `alloca' CPP section.
23318
23319 2000-03-16 Akim Demaille <akim@epita.fr>
23320
23321 Do not hard code values of directories in `configure.in'.
23322 Update the `configure' tool chain.
23323
23324 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23325 src/makefile.am.
23326 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23327 (AC_OUTPUT): Add m4/Makefile.
23328 Bump to bison 1.28a, 1.29 has never been released.
23329 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23330 handled via src/Makefile.am.
23331 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23332 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23333 autoheader.
23334 * Makefile.am (SUBDIRS): Add m4.
23335 (ACLOCAL_AM_FLAGS): New variable.
23336 (AUTOMAKE_OPTIONS): Add check-news.
23337 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23338 the proper line number and file name.
23339 (DEFS): Propagate the location of bison library files and of the
23340 locale files.
23341 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23342 builddir.
23343 * acinclude.m4: Remove, replaced by the directory m4.
23344 * m4/Makefile.am (EXTRA_DIST): New variable.
23345 * m4/gettext.m4: New file, from the fileutils.
23346 * m4/lcmessage.m4: Likewise
23347 * m4/progtest.m4: Likewise.
23348 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23349
23350 2000-03-10 Akim Demaille <akim@epita.fr>
23351
23352 * src/closure.c:
23353 Formatting changes of various comments.
23354 Respect the GNU coding standards at various places.
23355 Don't use `_()' when no translation is needed.
23356
23357 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23358
23359 * src/files.c:
23360 OS/2 honors TMPDIR environment variable.
23361
23362 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23363
23364 * doc/bison.texinfo: Tweaked spelling and grammar.
23365 Updated ISBN.
23366 Removed reference to price of printed copy.
23367 Mention BISON_SIMPLE and BISON_HAIRY.
23368
23369 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23370
23371 * configure.in, NEWS:
23372 Bison 1.29 released.
23373
23374 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23375
23376 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23377 Added reference card.
23378
23379 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23380
23381 * po/ru.po: Added Russian translation.
23382
23383 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23384
23385 * configure.in: Added Russian translation.
23386
23387 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23388
23389 * configure.in, NEWS, README:
23390 Released version 1.28.
23391
23392 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23393
23394 * src/system.h:
23395 Squashed redefinition warning on some systems.
23396
23397 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23398 Have configure build version string instead of relying on ANSI string
23399 concatentation.
23400
23401 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23402
23403 * po/POTFILES.in: Got rid of version.c.
23404
23405 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23406
23407 * acconfig.h, configure.in:
23408 Have configure build version string instead of relying on ANSI string
23409 concatentation.
23410
23411 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23412
23413 * doc/bison.1:
23414 Dropped mention of `+' for long-named options.
23415
23416 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23417
23418 * src/files.c: Added <unistd.h> for unlink().
23419
23420 * src/Makefile.am, src/system.h:
23421 I18n fixes.
23422
23423 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23424
23425 * README: Added a FAQ list.
23426
23427 * configure.in, acconfig.h:
23428 I18n fixes.
23429
23430 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23431
23432 * doc/FAQ, doc/Makefile.am:
23433 Added a FAQ list.
23434
23435 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23436
23437 * src/alloc.h, src/symtab.h, src/version.c:
23438 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23439
23440 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23441
23442 * src/.cvsignore, src/Makefile.am:
23443 Reorganized: sources in `src', documentation in `doc'.
23444
23445 * src/lex.c (literalchar):
23446 fixed the code for escaping double quotes (thanks
23447 Jonathan Czisny.)
23448
23449 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23450
23451 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23452 Adjusted paths to reflect directory reorganization.
23453
23454 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23455
23456 * doc/.cvsignore, doc/Makefile.am:
23457 Reorganized: sources in `src', documentation in `doc'.
23458
23459 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23460
23461 * configure.in:
23462 Updated AC_INIT file to reflect directory reorganization.
23463
23464 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23465 Reorganized: sources in `src', documentation in `doc'.
23466
23467 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23468
23469 * src/allocate.c:
23470 Don't declare calloc() and realloc() if not necessary.
23471
23472 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23473
23474 * configure.in, acconfig.h, acinclude.m4:
23475 Don't declare calloc() and realloc() if not necessary.
23476
23477 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23478
23479 * po/.cvsignore: Added i18n support.
23480
23481 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23482
23483 * acconfig.h, configure.in, Makefile.am:
23484 Added i18n support.
23485
23486 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23487
23488 * src/bison.s1: Fixed #line numbers.
23489
23490 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23491
23492 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23493 Added PO files from Translation Project.
23494
23495 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23496
23497 * Makefile.am:
23498 Added support for non-ANSI compilers (ansi2knr).
23499
23500 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23501
23502 * configure.in: Bumped version number to 1.27.
23503
23504 * Makefile.am:
23505 Added `bison.simple' to list of files removed by `make distclean'.
23506
23507 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23508
23509 * src/files.c, src/files.h:
23510 Defined locations of parser files in config.h instead of Makefile.
23511
23512 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23513
23514 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23515 Defined locations of parser files in config.h instead of Makefile.
23516
23517 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23518
23519 * Makefile.am:
23520 Removed inappropriate use of $< macro.
23521
23522 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23523
23524 * po/Makefile.in.in, po/POTFILES.in:
23525 Add `po' directory skeleton.
23526
23527 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23528
23529 * README: Document help-bison list.
23530
23531 * configure.in: Add check for mkstemp().
23532
23533 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23534
23535 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23536 Hush a few compiler warnings.
23537
23538 * src/files.c:
23539 Add tryclose(), which verifies that fclose was successful.
23540 Hush a couple of compiler warnings.
23541
23542 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23543
23544 * Makefile.am, OChangeLog:
23545 ChangeLog is now automatically generated. Include the old version as
23546 OChangeLog.
23547
23548 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23549
23550 * 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:
23551 Update FSF address.
23552
23553 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23554
23555 * doc/bison.texinfo: Fix formatting glitch.
23556
23557 * doc/bison.texinfo: Update FSF address.
23558
23559 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23560
23561 * acconfig.h: Update FSF address.
23562
23563 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23564
23565 * src/system.h:
23566 Don't define PACKAGE here, since config.h defines it.
23567
23568 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23569
23570 * src/reader.c: Update copyright date.
23571
23572 * src/main.c:
23573 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23574 favor of output directly to stderr (avoids buffer overruns).
23575
23576 * src/reader.c: Some checks for premature EOF.
23577
23578 * 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:
23579 Use prototypes if the compiler understands them.
23580
23581 * src/files.c: Honor TMPDIR on Unix hosts.
23582 Use prototypes if the compiler understands them.
23583
23584 * src/reader.c:
23585 Fix a couple of buffer overrun bugs.
23586 Use prototypes if the compiler understands them.
23587
23588 * src/system.h: Include unistd.h and ctype.h.
23589 Use #ifdef instead of #if for NLS symbols.
23590
23591 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23592
23593 * doc/bison.texinfo:
23594 Delete comment "consider using @set for edition number, etc..." since
23595 we now are doing so.
23596
23597 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23598
23599 * configure.in:
23600 Use prototypes if the compiler understands them.
23601
23602 * NEWS: Document 1.26 highlights.
23603
23604 * Makefile.am: Require Automake 1.3 or later.
23605
23606 * acconfig.h:
23607 Use prototypes if the compiler understands them.
23608
23609 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23610
23611 * src/version.c:
23612 Use VERSION symbol from automake for version number.
23613
23614 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23615
23616 * acconfig.h, configure.in, version.cin:
23617 Use VERSION symbol from automake for version number.
23618
23619 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23620
23621 * Makefile.am:
23622 Distribute original version of simple parser (bison.s1), not built
23623 version (bison.simple).
23624
23625 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23626
23627 * doc/bison.texinfo: Add info dir entry.
23628
23629 * doc/bison.texinfo:
23630 Let automake put version number into documentation.
23631
23632 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23633
23634 * src/bison.cld, src/build.com, src/vmshlp.mar:
23635 Add non-RCS files from /gd/gnu/bison.
23636
23637 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23638
23639 * doc/bison.1:
23640 Document the BISON_HAIRY and BISON_SIMPLE variables.
23641
23642 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23643
23644 * src/version.c: Build version.c automatically.
23645
23646 * src/reader.c:
23647 Fix token numbering (used to start at 258, not 257).
23648
23649 * src/system.h: Include config.h.
23650
23651 * src/getargs.c: Update bug report address.
23652
23653 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23654 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23655
23656 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23657
23658 * Makefile.am:
23659 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23660
23661 * configure.in, version.cin:
23662 Build version.c automatically.
23663
23664 * AUTHORS: Add AUTHORS file.
23665
23666 * README: Update bug report address.
23667
23668 * bison.simple:
23669 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23670
23671 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23672 Add automake stuff.
23673
23674 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23675
23676 * doc/bison.texinfo: Clean up some formatting.
23677
23678 1998-05-05 Richard Stallman <rms@gnu.org>
23679
23680 * doc/bison.texinfo:
23681 Explain better why to make a pure parser.
23682
23683 1998-01-05 Richard Stallman <rms@gnu.org>
23684
23685 * src/files.c (openfiles):
23686 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23687 find a temporary directory, if possible. Do not unlink files while
23688 they are open.
23689
23690 1997-08-25 Richard Stallman <rms@gnu.org>
23691
23692 * src/reader.c (stack_offset;):
23693 Change some warni to warns.
23694
23695 * src/lex.c (literalchar): Use warns, not warni.
23696
23697 1997-06-28 Richard Stallman <rms@gnu.org>
23698
23699 * src/bison.s1: Add a Bison version comment.
23700
23701 * src/main.c (fatal, warn, berror):
23702 Use program_name.
23703
23704 1997-06-28 Richard Stallman <rms@gnu.org>
23705
23706 * Makefile.in (bison_version): New variable.
23707 (dist): Use that variable.
23708 (bison.s1): Substitute the Bison version into bison.simple.
23709
23710 * bison.simple: Add a Bison version comment.
23711
23712 1997-06-18 Richard Stallman <rms@gnu.org>
23713
23714 * src/main.c (fatal, warn, berror):
23715 Make error messages standard.
23716 (toomany): Improve error message text.
23717
23718 * 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:
23719 new.h renamed to alloc.h.
23720
23721 1997-06-18 Richard Stallman <rms@gnu.org>
23722
23723 * Makefile.in: new.h renamed to alloc.h.
23724
23725 1997-05-24 Richard Stallman <rms@gnu.org>
23726
23727 * src/lex.c (literalchar):
23728 Fix the code for escaping \, " and '.
23729
23730 (lex): Avoid trouble when there are many chars
23731 to discard in a char literal with just several chars in it.
23732
23733 1997-05-17 Richard Stallman <rms@gnu.org>
23734
23735 * src/bison.s1:
23736 Use malloc, if using alloca is troublesome.
23737 (YYSTACK_USE_ALLOCA): New flag macro.
23738 Define it for some systems and compilers.
23739 (YYSTACK_ALLOC): New macro.
23740 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23741 If it was malloc'd, free it.
23742
23743 1997-05-17 Richard Stallman <rms@gnu.org>
23744
23745 * bison.simple:
23746 Use malloc, if using alloca is troublesome.
23747 (YYSTACK_USE_ALLOCA): New flag macro.
23748 Define it for some systems and compilers.
23749 (YYSTACK_ALLOC): New macro.
23750 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23751 If it was malloc'd, free it.
23752
23753 1997-04-23 Richard Stallman <rms@gnu.org>
23754
23755 * src/bison.s1:
23756 (alloca) [__hpux]: Always define as __builtin_alloca.
23757
23758 1997-04-23 Richard Stallman <rms@gnu.org>
23759
23760 * bison.simple:
23761 (alloca) [__hpux]: Always define as __builtin_alloca.
23762
23763 1997-04-22 Richard Stallman <rms@gnu.org>
23764
23765 * src/bison.s1:
23766 [__hpux]: Include alloca.h (right for HPUX 10)
23767 instead of declaring alloca (right for HPUX 9).
23768
23769 * src/bison.s1 (__yy_memcpy):
23770 Declare arg `count' as unsigned int.
23771 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23772
23773 1997-04-22 Richard Stallman <rms@gnu.org>
23774
23775 * bison.simple:
23776 [__hpux]: Include alloca.h (right for HPUX 10)
23777 instead of declaring alloca (right for HPUX 9).
23778
23779 * bison.simple (__yy_memcpy):
23780 Declare arg `count' as unsigned int.
23781 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23782
23783 1997-01-03 Richard Stallman <rms@gnu.org>
23784
23785 * src/allocate.c: [__STDC__ or _MSC_VER]:
23786 Declare calloc and realloc to return void *.
23787
23788 1997-01-02 Richard Stallman <rms@gnu.org>
23789
23790 * src/system.h:
23791 [_MSC_VER]: Include stdlib.h and process.h.
23792 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23793
23794 * src/main.c (main): Return FAILURE as a value.
23795 (printable_version): Declare arg as int, not char.
23796
23797 1997-01-02 Richard Stallman <rms@gnu.org>
23798
23799 * Makefile.in (dist):
23800 Explicitly check for symlinks, and copy them.
23801
23802 1996-12-19 Richard Stallman <rms@gnu.org>
23803
23804 * src/files.c:
23805 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23806
23807 1996-12-18 Paul Eggert <eggert@gnu.org>
23808
23809 * src/bison.s1 (yyparse):
23810 If __GNUC__ and YYPARSE_PARAM are both defined,
23811 declare yyparse to have a void * argument.
23812
23813 1996-12-18 Paul Eggert <eggert@gnu.org>
23814
23815 * bison.simple (yyparse):
23816 If __GNUC__ and YYPARSE_PARAM are both defined,
23817 declare yyparse to have a void * argument.
23818
23819 1996-12-17 Richard Stallman <rms@gnu.org>
23820
23821 * src/reduce.c (nbits): Add some casts.
23822
23823 1996-08-12 Richard Stallman <rms@gnu.org>
23824
23825 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23826
23827 1996-08-12 Richard Stallman <rms@gnu.org>
23828
23829 * bison.simple: Test _MSDOS as well as _MSDOS_.
23830
23831 1996-07-31 Richard Stallman <rms@gnu.org>
23832
23833 * src/bison.s1:
23834 [__sun && __i386]: Include alloca.h.
23835
23836 1996-07-31 Richard Stallman <rms@gnu.org>
23837
23838 * bison.simple:
23839 [__sun && __i386]: Include alloca.h.
23840
23841 1996-07-30 Richard Stallman <rms@gnu.org>
23842
23843 * src/bison.s1: Comment change.
23844
23845 * src/bison.s1: Test _MSDOS_, not MSDOS.
23846
23847 1996-07-30 Richard Stallman <rms@gnu.org>
23848
23849 * bison.simple: Comment change.
23850
23851 * bison.simple: Test _MSDOS_, not MSDOS.
23852
23853 1996-06-01 Richard Stallman <rms@gnu.org>
23854
23855 * 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:
23856 Insert `_' macro around many string constants.
23857
23858 * src/main.c:
23859 Insert `_' macro around many string constants.
23860
23861 (main): Call setlocale, bindtextdomain and textdomain.
23862
23863 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23864 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23865 [ENABLE_NLS]: Include libintl.h.
23866 [ENABLE_NLS] (gettext): Define.
23867 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23868 (N_, PACKAGE, LOCALEDIR): New macros.
23869
23870 1996-06-01 Richard Stallman <rms@gnu.org>
23871
23872 * POTFILES.in: New file.
23873
23874 * Makefile.in (allocate.o):
23875 Define target explicitly.
23876
23877 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23878 (LDFLAGS): Set to @LDFLAGS@.
23879 (configure): Run autoconf only if preceding `cd' succeeds.
23880 (bison.s1): Redirect output to temporary file then move the
23881 temporary to the target, rather than redirecting directly to bison.s1.
23882 (clean): Remove config.status and config.log.
23883 (distclean): Don't remove config.status here.
23884
23885 1996-05-12 Richard Stallman <rms@gnu.org>
23886
23887 * src/bison.s1:
23888 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23889
23890 1996-05-12 Richard Stallman <rms@gnu.org>
23891
23892 * bison.simple:
23893 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23894
23895 1996-05-11 Richard Stallman <rms@gnu.org>
23896
23897 * src/bison.s1 (__yy_memcpy):
23898 Really reorder the args, as was supposedly done on Feb 14 1995.
23899 (yyparse): Calls changed accordingly.
23900
23901 1996-05-11 Richard Stallman <rms@gnu.org>
23902
23903 * Makefile.in (dist): Don't use $(srcdir).
23904
23905 * bison.simple (__yy_memcpy):
23906 Really reorder the args, as was supposedly done on Feb 14 1995.
23907 (yyparse): Calls changed accordingly.
23908
23909 1996-01-27 Richard Stallman <rms@gnu.org>
23910
23911 * src/output.c (output_rule_data):
23912 Test YYERROR_VERBOSE in the conditional
23913 around the definition of ttyname.
23914
23915 1995-12-29 Richard Stallman <rms@gnu.org>
23916
23917 * src/bison.s1:
23918 Fix line numbers in #line commands.
23919
23920 1995-12-29 Richard Stallman <rms@gnu.org>
23921
23922 * bison.simple:
23923 Fix line numbers in #line commands.
23924
23925 1995-12-27 Richard Stallman <rms@gnu.org>
23926
23927 * src/bison.s1 (YYPARSE_PARAM_DECL):
23928 In C++, make it always null.
23929 (YYPARSE_PARAM_ARG): New macro.
23930 (yyparse): Use YYPARSE_PARAM_ARG.
23931
23932 1995-12-27 Richard Stallman <rms@gnu.org>
23933
23934 * bison.simple (YYPARSE_PARAM_DECL):
23935 In C++, make it always null.
23936 (YYPARSE_PARAM_ARG): New macro.
23937 (yyparse): Use YYPARSE_PARAM_ARG.
23938
23939 1995-11-29 Richard Stallman <rms@gnu.org>
23940
23941 * doc/bison.texinfo:
23942 Describe literal string tokens, %raw, %no_lines, %token_table.
23943
23944 1995-11-29 Daniel Hagerty <hag@gnu.org>
23945
23946 * doc/bison.texinfo: Fixed update date
23947
23948 1995-10-16 Richard Stallman <rms@gnu.org>
23949
23950 * src/version.c: Version 1.25.
23951
23952 1995-10-16 Richard Stallman <rms@gnu.org>
23953
23954 * NEWS: *** empty log message ***
23955
23956 1995-10-16 Richard Stallman <rms@gnu.org>
23957
23958 * doc/bison.1, doc/bison.rnh:
23959 Add new options.
23960
23961 1995-10-15 Richard Stallman <rms@gnu.org>
23962
23963 * src/vmsgetargs.c, src/getargs.c:
23964 Added -n, -k, and -raw switches.
23965 (noparserflag, toknumflag, rawtoknumflag): New variables.
23966
23967 * src/symtab.h (SALIAS):
23968 New #define for adding aliases to %token.
23969 (struct bucket): Added `alias' field.
23970
23971 * src/reduce.c (reduce_grammar):
23972 Revise error message.
23973 (print_notices): Remove final `.' from error message.
23974
23975 * src/reader.c (reader_output_yylsp):
23976 New function.
23977 (readgram): Use `#if 0' around code that accepted %command
23978 inside grammar rules: The documentation doesn't allow it,
23979 and it will fail since the %command processors scan for the next %.
23980 (parse_token_decl): Extended the %token
23981 declaration to allow a multi-character symbol as an alias.
23982 (parse_thong_decl): New function.
23983 (read_declarations): Added %thong declarations.
23984 (read_declarations): Handle NOOP to deal with allowing
23985 % declarations as another means to specify the flags.
23986 (readgram): Allow %prec prior to semantics embedded in a rule.
23987 (skip_to_char, read_declarations, copy_definition)
23988 (parse_token_decl, parse_start_decl, parse_type_decl)
23989 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23990 (get_type_name, copy_guard, copy_action, readgram)
23991 (get_type, packsymbols): Revised most error messages.
23992 Changed `fatal' to `warnxxx' to avoid aborting for error.
23993 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23994 (read_declarations): Improve the error message for
23995 an invalid character. Do not abort.
23996 (read_declarations, copy_guard, copy_action): Use
23997 printable_version to avoid unprintable characters in printed output.
23998 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23999 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24000 Allow the type of a non-terminal can be given
24001 more than once, as long as all specifications give the same type.
24002
24003 * src/output.c:
24004 (output_headers, output_trailers, output, output_gram)
24005 (output_rule_data): Implement noparserflag variable.
24006 Implement toknumflag variable.
24007 (output): Call reader_output_yylsp to output LTYPESTR.
24008
24009 * src/main.c (main):
24010 If reader sees an error, don't process the grammar.
24011 (fatals): Updated to not use VARARGS1.
24012 (printable_version, int_to_string, warn, warni, warns, warnss)
24013 (warnsss): New error reporting functions. Avoid abort for error.
24014
24015 * src/lex.h:
24016 Added THONG and NOOP for alias processing.
24017 Added SETOPT for the new code that allows setting options with %flags.
24018
24019 * src/lex.c:
24020 Include getopt.h. Add some extern decls.
24021 (safegetc): New function to deal with EOF gracefully.
24022 (literalchar); new function to deal with reading \ escapes.
24023 (lex): Use literalchar.
24024 (lex): Implemented "..." tokens.
24025 (literalchar, lex, parse_percent_token): Made tokenbuffer
24026 always contain the token. This includes growing the token
24027 buffer while reading an integer.
24028 (parse_percent_token): Replaced if-else statement with percent_table.
24029 (parse_percent_token): Added % declarations as another
24030 way to specify the flags -n, -l, and -r. Also added hooks for
24031 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24032 major changes to files.c.
24033 (lex) Retain in the incoming stream a character following
24034 an incorrect '/'.
24035 (skip_white_space, lex): Revised most error messages
24036 and changed fatal to warn to avoid aborting.
24037 (percent_table): Added %thong declarations.
24038
24039 * src/gram.h: Comment changes.
24040
24041 * src/files.c (openfiles, open_extra_files, done):
24042 Add faction flag
24043 and actfile file. Handle noparserflag. Both for -n switch.
24044
24045 * src/conflicts.c (resolve_sr_conflict):
24046 Remove use of alloca.
24047
24048 1995-06-01 Jim Meyering <meyering@gnu.org>
24049
24050 * doc/bison.texinfo: *** empty log message ***
24051
24052 1995-05-06 Richard Stallman <rms@gnu.org>
24053
24054 * src/bison.s1: Comment change.
24055
24056 1995-05-06 Richard Stallman <rms@gnu.org>
24057
24058 * bison.simple: Comment change.
24059
24060 1995-05-03 Richard Stallman <rms@gnu.org>
24061
24062 * src/version.c: Version now 1.24.
24063
24064 * src/bison.s1: Change distribution terms.
24065
24066 * src/version.c: Version now 1.23.
24067
24068 1995-05-03 Richard Stallman <rms@gnu.org>
24069
24070 * doc/bison.texinfo:
24071 Rewrite "Conditions for Using Bison".
24072 Update version to 1.24.
24073
24074 1995-05-03 Richard Stallman <rms@gnu.org>
24075
24076 * bison.simple: Change distribution terms.
24077
24078 1995-02-23 Richard Stallman <rms@gnu.org>
24079
24080 * src/files.c: Test __VMS_POSIX as well as VMS.
24081
24082 1995-02-14 Jim Meyering <meyering@gnu.org>
24083
24084 * src/bison.s1 (__yy_memcpy):
24085 Renamed from __yy_bcopy to avoid
24086 confusion. Reverse FROM and TO arguments to be consistent with
24087 those of memcpy.
24088
24089 1995-02-14 Jim Meyering <meyering@gnu.org>
24090
24091 * bison.simple (__yy_memcpy):
24092 Renamed from __yy_bcopy to avoid
24093 confusion. Reverse FROM and TO arguments to be consistent with
24094 those of memcpy.
24095
24096 1994-11-10 David J. MacKenzie <djm@gnu.org>
24097
24098 * NEWS: reformat
24099
24100 * NEWS: New file.
24101
24102 * Makefile.in (DISTFILES): Include NEWS.
24103
24104 * Makefile.in (DISTFILES):
24105 Include install-sh, not install.sh.
24106
24107 * configure.in: Update to Autoconf v2 macro names.
24108
24109 1994-10-05 David J. MacKenzie <djm@gnu.org>
24110
24111 * Makefile.in: fix typo
24112
24113 * Makefile.in (prefix, exec_prefix):
24114 Let configure set them.
24115
24116 1994-09-28 David J. MacKenzie <djm@gnu.org>
24117
24118 * Makefile.in: Set datadir to $(prefix)/share.
24119
24120 1994-09-15 Richard Stallman <rms@gnu.org>
24121
24122 * src/bison.s1:
24123 Update copyright notice and GPL version.
24124
24125 1994-09-15 Richard Stallman <rms@gnu.org>
24126
24127 * bison.simple:
24128 Update copyright notice and GPL version.
24129
24130 1994-07-12 Richard Stallman <rms@gnu.org>
24131
24132 * src/reduce.c, src/reader.c:
24133 entered into RCS
24134
24135 1994-05-05 David J. MacKenzie <djm@gnu.org>
24136
24137 * Makefile.in: entered into RCS
24138
24139 1994-03-26 Richard Stallman <rms@gnu.org>
24140
24141 * src/bison.s1: entered into RCS
24142
24143 1994-03-26 Richard Stallman <rms@gnu.org>
24144
24145 * bison.simple: entered into RCS
24146
24147 1994-03-25 Richard Stallman <rms@gnu.org>
24148
24149 * src/main.c: entered into RCS
24150
24151 1994-03-24 Richard Stallman <rms@gnu.org>
24152
24153 * src/conflicts.c: entered into RCS
24154
24155 1994-01-02 Richard Stallman <rms@gnu.org>
24156
24157 * Makefile.in: *** empty log message ***
24158
24159 1993-11-21 Richard Stallman <rms@gnu.org>
24160
24161 * src/bison.s1: *** empty log message ***
24162
24163 1993-11-21 Richard Stallman <rms@gnu.org>
24164
24165 * doc/bison.texinfo: entered into RCS
24166
24167 * doc/bison.texinfo: *** empty log message ***
24168
24169 1993-11-21 Richard Stallman <rms@gnu.org>
24170
24171 * bison.simple: *** empty log message ***
24172
24173 1993-10-25 David J. MacKenzie <djm@gnu.org>
24174
24175 * doc/bison.texinfo: *** empty log message ***
24176
24177 1993-10-19 Richard Stallman <rms@gnu.org>
24178
24179 * src/bison.s1: *** empty log message ***
24180
24181 1993-10-19 Richard Stallman <rms@gnu.org>
24182
24183 * bison.simple: *** empty log message ***
24184
24185 1993-10-14 Richard Stallman <rms@gnu.org>
24186
24187 * src/bison.s1: *** empty log message ***
24188
24189 1993-10-14 Richard Stallman <rms@gnu.org>
24190
24191 * bison.simple: *** empty log message ***
24192
24193 1993-09-14 David J. MacKenzie <djm@gnu.org>
24194
24195 * doc/bison.texinfo: *** empty log message ***
24196
24197 1993-09-13 Noah Friedman <friedman@gnu.org>
24198
24199 * Makefile.in: *** empty log message ***
24200
24201 1993-09-10 Richard Stallman <rms@gnu.org>
24202
24203 * src/conflicts.c: *** empty log message ***
24204
24205 * src/system.h: entered into RCS
24206
24207 1993-09-10 Richard Stallman <rms@gnu.org>
24208
24209 * doc/bison.1: entered into RCS
24210
24211 1993-09-06 Noah Friedman <friedman@gnu.org>
24212
24213 * src/version.c: entered into RCS
24214
24215 1993-09-06 Noah Friedman <friedman@gnu.org>
24216
24217 * Makefile.in: *** empty log message ***
24218
24219 1993-07-30 David J. MacKenzie <djm@gnu.org>
24220
24221 * Makefile.in: *** empty log message ***
24222
24223 1993-07-24 Richard Stallman <rms@gnu.org>
24224
24225 * src/bison.s1: *** empty log message ***
24226
24227 1993-07-24 Richard Stallman <rms@gnu.org>
24228
24229 * bison.simple: *** empty log message ***
24230
24231 1993-07-08 David J. MacKenzie <djm@gnu.org>
24232
24233 * Makefile.in: *** empty log message ***
24234
24235 1993-07-04 Richard Stallman <rms@gnu.org>
24236
24237 * src/bison.s1: *** empty log message ***
24238
24239 1993-07-04 Richard Stallman <rms@gnu.org>
24240
24241 * bison.simple: *** empty log message ***
24242
24243 1993-06-26 David J. MacKenzie <djm@gnu.org>
24244
24245 * src/getargs.c: entered into RCS
24246
24247 1993-06-26 David J. MacKenzie <djm@gnu.org>
24248
24249 * doc/bison.texinfo: *** empty log message ***
24250
24251 * doc/bison.1: New file.
24252
24253 1993-06-25 Richard Stallman <rms@gnu.org>
24254
24255 * src/getargs.c: New file.
24256
24257 1993-06-16 Richard Stallman <rms@gnu.org>
24258
24259 * src/bison.s1: *** empty log message ***
24260
24261 1993-06-16 Richard Stallman <rms@gnu.org>
24262
24263 * bison.simple: *** empty log message ***
24264
24265 1993-06-03 Richard Stallman <rms@gnu.org>
24266
24267 * src/bison.s1: New file.
24268
24269 1993-06-03 Richard Stallman <rms@gnu.org>
24270
24271 * doc/bison.texinfo: *** empty log message ***
24272
24273 1993-06-03 Richard Stallman <rms@gnu.org>
24274
24275 * bison.simple: New file.
24276
24277 1993-05-19 Richard Stallman <rms@gnu.org>
24278
24279 * doc/bison.texinfo: New file.
24280
24281 1993-05-07 Noah Friedman <friedman@gnu.org>
24282
24283 * Makefile.in: *** empty log message ***
24284
24285 1993-04-28 Noah Friedman <friedman@gnu.org>
24286
24287 * src/reader.c: *** empty log message ***
24288
24289 1993-04-23 Noah Friedman <friedman@gnu.org>
24290
24291 * src/alloc.h: entered into RCS
24292
24293 1993-04-20 David J. MacKenzie <djm@gnu.org>
24294
24295 * src/version.c: *** empty log message ***
24296
24297 * src/files.c, src/allocate.c:
24298 entered into RCS
24299
24300 * src/reader.c: *** empty log message ***
24301
24302 * src/lex.c: entered into RCS
24303
24304 * src/conflicts.c: New file.
24305
24306 * src/symtab.c: entered into RCS
24307
24308 * src/alloc.h: New file.
24309
24310 * src/LR0.c: entered into RCS
24311
24312 1993-04-18 Noah Friedman <friedman@gnu.org>
24313
24314 * src/reader.c: New file.
24315
24316 * src/version.c: *** empty log message ***
24317
24318 1993-04-18 Noah Friedman <friedman@gnu.org>
24319
24320 * Makefile.in: *** empty log message ***
24321
24322 1993-04-17 Noah Friedman <friedman@gnu.org>
24323
24324 * Makefile.in: *** empty log message ***
24325
24326 1993-04-15 Richard Stallman <rms@gnu.org>
24327
24328 * src/main.c, src/files.c:
24329 New file.
24330
24331 1993-04-15 Noah Friedman <friedman@gnu.org>
24332
24333 * configure.in: entered into RCS
24334
24335 * configure.in: *** empty log message ***
24336
24337 * configure.in: New file.
24338
24339 1993-04-14 Richard Stallman <rms@gnu.org>
24340
24341 * Makefile.in: New file.
24342
24343 1993-04-13 Richard Stallman <rms@gnu.org>
24344
24345 * src/version.c: New file.
24346
24347 1993-03-25 Richard Stallman <rms@gnu.org>
24348
24349 * src/output.c: entered into RCS
24350
24351 1992-09-25 Richard Stallman <rms@gnu.org>
24352
24353 * configure.bat: entered into RCS
24354
24355 1992-06-22 Richard Stallman <rms@gnu.org>
24356
24357 * src/vmsgetargs.c: entered into RCS
24358
24359 1992-06-22 Richard Stallman <rms@gnu.org>
24360
24361 * doc/bison.rnh: entered into RCS
24362
24363 1992-04-20 David J. MacKenzie <djm@gnu.org>
24364
24365 * README: entered into RCS
24366
24367 1992-01-22 Richard Stallman <rms@gnu.org>
24368
24369 * src/machine.h: entered into RCS
24370
24371 1991-12-21 Richard Stallman <rms@gnu.org>
24372
24373 * src/lalr.c, src/closure.c:
24374 entered into RCS
24375
24376 1991-12-20 Richard Stallman <rms@gnu.org>
24377
24378 * src/state.h: entered into RCS
24379
24380 1991-12-18 Richard Stallman <rms@gnu.org>
24381
24382 * src/print.c, src/nullable.c, src/derives.c:
24383 entered into RCS
24384
24385 1991-11-03 David J. MacKenzie <djm@gnu.org>
24386
24387 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24388 entered into RCS
24389
24390 1988-09-09 Richard Stallman <rms@gnu.org>
24391
24392 * src/bison.hairy: entered into RCS
24393
24394 1987-12-16 Richard Stallman <rms@gnu.org>
24395
24396 * REFERENCES: entered into RCS
24397
24398
24399 -----
24400
24401 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24402 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24403 2008, 2009 Free Software Foundation, Inc.
24404
24405 Copying and distribution of this file, with or without
24406 modification, are permitted provided the copyright notice and this
24407 notice are preserved.