]> git.saurik.com Git - bison.git/blob - ChangeLog
tests: GCC 4.5 compliance.
[bison.git] / ChangeLog
1 2009-08-12 Akim Demaille <demaille@gostai.com>
2
3 tests: GCC 4.5 compliance.
4 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
5 messages about #error.
6
7 2009-08-12 Akim Demaille <demaille@gostai.com>
8
9 build: fix the generation of the documentation.
10 Some of our targets use "bison --help", but they can't depend on
11 "bison" itself (to avoid additional requirements on the user), so
12 they used to call "make src/bison" in the commands. Then
13 concurrent builds may fail: one make might be aiming one of its
14 jobs at compiling src/bison, and another job at generating the man
15 page. If the latter is faster than the former, then we have two
16 makes that concurrently try to compile src/bison.
17
18 This might also be a more convincing explanation for the failure
19 described in the patch "build: fix paths".
20
21 * Makefile.am (SUFFIXES): Initialize.
22 * build-aux/move-if-change: New, symlink to gnulib's.
23 * build-aux/local.mk: Ship it.
24 * doc/common.x: Remove, merged into...
25 * doc/bison.x: here.
26 * doc/local.mk (doc/bison.help): New.
27 ($(CROSS_OPTIONS_TEXI)): Depend on it.
28 Use src/bison.
29 (.x.1): Replace with...
30 (doc/bison.1): this explicit, simpler, target.
31 (common_dep): Remove, inlined where appropriate.
32 (SUFFIXES, PREPATH): Remove, unused.
33
34 2009-08-12 Akim Demaille <demaille@gostai.com>
35
36 gnulib: improve prefixing.
37 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
38 change the value of...
39 (gl_LIBOBJS): this.
40 Adjust more variables.
41 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
42 gl_LIBOBJS.
43 (prefix): Also transform rules whose targets have slashes.
44 Use $prefix liberally.
45 Map @MKDIR_P@ to $(MKDIR_P).
46 Prefix directories that are mkdir'd.
47
48 2009-08-12 Akim Demaille <demaille@gostai.com>
49
50 build: fix paths.
51 When using $(top_builddir) inconsistently, Make (including GNU
52 Make) is sometimes confused. As a result it may want to build
53 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
54 file, different names) concurrently, which, amusingly enough,
55 might end with:
56
57 ranlib lib/libbison.a
58 ranlib lib/libbison.a
59 make[2]: *** [lib/libbison.a] Segmentation fault
60
61 on OS X.
62
63 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
64 needed.
65
66 2009-08-12 Akim Demaille <demaille@gostai.com>
67
68 distcheck: fix.
69
70 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
71
72 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
73
74 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
75
76 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
77
78 Miscellaneous code readability improvements.
79
80 * src/reader.c (reader): Move %define front-end variable
81 defaults and checking into...
82 (prepare_percent_define_front_end_variables): ... this new
83 function.
84
85 * src/scan-gram.l (INITIAL): For consistency with string
86 literals, don't store open quote on character literal. It's
87 discarded before returning anyway.
88 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
89 Make length test more readable, and make the character stored
90 for an empty literal more obvious while consistent with the
91 previous behavior.
92
93 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
94 USER_NUMBER_HAS_STRING_ALIAS throughout.
95 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
96 that is repeated in symtab.h. Improve argument names to make it
97 clear which side of the symbol-string alias pair is which.
98 (symbol_check_alias_consistency): Improve local variable names
99 for the same purpose.
100 * src/symtab.h (struct symbol): Make comments about aliases
101 clearer.
102 (symbol_make_alias): Improve comments and argument name.
103 * src/output.c (token_definitions_output): Update for rename to
104 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
105
106 2009-08-08 Alex Rozenman <rozenman@gmail.com>
107
108 Convert "misleading reference" messages to warnings.
109 * src/scan-code.l: New function 'show_sub_messages', more
110 factoring.
111 * tests/named-ref.at: Adjust tests.
112
113 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
114
115 maint: run "make update-copyright"
116
117 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
118
119 maint: make update-b4-copyright easier to use
120 * build-aux/update-b4-copyright: In warnings, report line
121 numbers rather than character positions.
122 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
123 that update-copyright runs it.
124 * gnulib: Update.
125
126 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
127
128 maint: clean up update-b4-copyright code
129 * build-aux/update-b4-copyright: Do not accept 2-digit
130 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
131 Don't accept a `[' in a b4_copyright argument.
132 Format code more consistently.
133 Don't assume b4*copyright never occurs.
134
135 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
136
137 maint: automate b4_copyright updates.
138 * Makefile.am (update-b4-copyright): New target rule.
139 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
140 * build-aux/update-b4-copyright: New.
141 * data/yacc.c: Remove stray characters around b4_copyright
142 invocations.
143
144 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
145
146 maint: automate annual package-wide copyright-year update.
147 * .x-update-copyright: New.
148 * Makefile.am (EXTRA_DIST): Remove maint.mk.
149 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
150 update-copyright. Remove gnumakefile, which is implied by
151 maintainer-makefile.
152 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
153 * gnulib: Update.
154 * maint.mk: Remove, now copied from gnulib.
155 * examples/extexi: Add missing "(C)" in copyright statement so
156 update-copyright can recognize it.
157 * src/LR0.h: Likewise.
158 * src/print.h: Likewise.
159 * src/print_graph.h: Likewise.
160 * src/gram.c: Add missing comma in copyright statement.
161 * src/gram.h: Likewise.
162
163 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
164
165 Fix "make distcheck".
166 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
167 of just calc.stamp.
168
169 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
170
171 Pacify "gcc -Wunused" for the input function from Flex.
172 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
173 and later.
174 * src/scan-code.l: Add "%option noinput", which I cannot find in
175 the Flex manual, but which Flex has supported since at least as
176 far back as 2.5.4. However, if any of our developers still use
177 Flex 2.5.4, they'll need to stop configuring with
178 --enable-gcc-warnings because "%option noinput" didn't work
179 correctly until Flex 2.5.6.
180 * src/scan-gram.l: Likewise.
181 * src/scan-skel.l: Likewise.
182
183 2009-07-31 Alex Rozenman <rozenman@gmail.com>
184
185 Fix --enable-gcc-warnings problems.
186 * src/reader.c: Adjust variable names.
187 * src/scan-code.l: Fix prototypes and adjust names.
188 * src/named-ref.c: Remove redundant "if".
189
190 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
191
192 Fix a --enable-gcc-warnings problem.
193 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
194 variable.
195
196 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
197
198 Warn about character literals not of length one.
199 * NEWS (2.5): Document.
200 * src/scan-gram.l (INITIAL): Remove comment that we don't check
201 the length.
202 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
203 * tests/input.at (Bad character literals): New test group.
204
205 2009-07-24 Alex Rozenman <rozenman@gmail.com>
206
207 Fix some memory leaks.
208 * src/named-ref.c: Add a pointer check (named_ref_free).
209 * src/scan-code.l: New function (variant_table_free). Called in
210 code_scanner_free.
211 * src/symlist.c: Call to named_ref_free (symbol_list_free).
212
213 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
214
215 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
216
217 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
218
219 Some M4 cleanup in the testsuite.
220 Suggested by Eric Blake at
221 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
222 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
223 complicate the code by distinguishing between a missing value
224 and an empty string value for an optional argument. This fix is
225 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
226 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
227 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
228 arguments are not needed because of the following changes.
229 Fix stale comments.
230 Bison developers should use GNU M4 and should not use
231 POSIXLY_CORRECT when building the test suite, so do not
232 complicate the code by avoiding $10 and above.
233 Do not quote an empty string value for an optional argument, and
234 do not distinguish between a missing value and an empty string
235 value.
236
237 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
238
239 Revert unnecessary column realignment in --help output.
240 Reported by Akim Demaille at
241 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
242 * src/getargs.c (usage): Here.
243
244 2009-07-04 Alex Rozenman <rozenman@gmail.com>
245
246 Alphabetical order in src/local.mk.
247 * src/local.mk: Adjust.
248
249 2009-07-04 Alex Rozenman <rozenman@gmail.com>
250
251 Style changes and factoring.
252 * src/named-ref.h: Add comments.
253 * src/parse-gram.y: Readability and style changes.
254 * src/reader.c: Factoring: assign_named_ref function.
255 * src/scan-code.l: Factoring and style changes. Rename
256 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
257 Use "unsigned" type for variant index. Improve readablity.
258 * src/scan-gram.l: Change error messages and add comments.
259 * src/symlist.h: symbol_list_null: New function decl.
260 * src/symlist.c: symbol_list_null: Implement here.
261 * tests/named-refs.at: Adjust for new error messages.
262
263 2009-06-29 Eric Blake <ebb9@byu.net>
264
265 scan-code: avoid compiler warnings
266 * src/scan-code.l (parse_named_ref): Use correct specifiers.
267
268 2009-06-29 Akim Demaille <demaille@gostai.com>
269
270 build: avoid concurrent extraction of calc++.
271 * examples/calc++/Makefile.am (calc.stamp): New.
272 Depend on it to create the sources of calc++ so that concurrent
273 builds don't launch several "extexi" in parallel.
274 Not only this is inefficient, this also builds incorrect sources
275 with several extractions mixed together.
276
277 2009-06-29 Akim Demaille <demaille@gostai.com>
278
279 parse.error: fix.
280 * data/bison.m4: Move code related to specific variables after the
281 definition of the variable-maintaining macros so that we don't
282 "invoke" b4_percent_define_check_values before it is defined.
283
284 2009-06-29 Akim Demaille <demaille@gostai.com>
285
286 variables: parse.error
287
288 Implement, document, and test the replacement of %error-verbose
289 by %define parse.error "verbose".
290 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
291 values of the parse.error variable.
292 Make "simple" its default value.
293 Check the valid values.
294 * src/parse-gram.y: Use %define parse.error.
295 (PERCENT_ERROR_VERBOSE): New token.
296 Support it.
297 * src/scan-gram.l: Support %error-verbose.
298
299 * doc/bison.texinfo (Decl Summary): Replace the documentation of
300 %define error-verbose by that of %define parse.error.
301 * NEWS: Document it.
302
303 * tests/actions.at, tests/calc.at: Use parse.error instead of
304 %error-verbose.
305
306 2009-06-27 Alex Rozenman <rozenman@gmail.com>
307
308 Implement support for named symbol references.
309 * src/parse-gram.y: Add new syntax (named_ref.opt).
310 * src/reader.c: Store named refs in symbol lists.
311 * src/reader.h: New argument for symbol_append and
312 action_append functions.
313 * src/scan-code.h: Add new field (named_ref) into
314 code_props data structure. Keeps named ref of midrule
315 actions.
316 * src/scan-code.l: Support for named refs in semantic
317 action code. New function 'parse_named_ref'.
318 * src/scan-gram.l: Support bracketed id.
319 * src/symlist.c: Store named refs in symbol lists.
320 * src/symlist.h: New field in symbol list: named_ref.
321 * src/named-ref.h: New file, a struct for named_ref.
322 * src/named-ref.cp: New file, named_ref_new function.
323 * src/local.mk: Add two new files.
324 * tests/testsuite.at: Include new test group:
325 * tests/named-refs.at: this new file.
326
327 2009-06-25 Akim Demaille <demaille@gostai.com>
328
329 hash: check insertion for memory exhaustion.
330 * src/uniqstr.c (uniqstr_new): New.
331
332 2009-06-24 Akim Demaille <demaille@gostai.com>
333
334 variables: rename namespace as api.namespace.
335 Discussed in
336 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
337
338 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
339 New.
340 (b4_percent_define_use): New.
341 Use it where applicable.
342 * data/c++.m4: Replace uses of the variable "namespace" by
343 "api.namespace".
344 Default the latter to the former.
345 * doc/bison.texinfo (Decl Summary): Document "namespace" as
346 obsolete.
347 Document api.namespace.
348 Use @samp to document %define uses, keep @code for identifiers.
349 * NEWS: Likewise.
350 * tests/c++.at, tests/input.at: Test api.namespace instead of
351 namespace. (The tests passed with namespace.)
352
353 2009-06-11 Akim Demaille <demaille@gostai.com>
354
355 style changes.
356 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
357 * src/print-xml.c: Style changes.
358 * tests/conflicts.at: Comment changes.
359
360 2009-06-11 Akim Demaille <demaille@gostai.com>
361
362 xml: beware of user strings used to give a %prec to rules.
363 * tests/conflicts.at (%prec with user strings): New.
364 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
365 XML output.
366
367 2009-06-11 Akim Demaille <demaille@gostai.com>
368
369 hash: check insertion for memory exhaustion.
370 * src/muscle-tab.c (muscle_insert, muscle_grow)
371 * src/state.c (state_hash_insert): Check the return value of
372 hash_insert.
373
374 2009-06-11 Akim Demaille <demaille@gostai.com>
375
376 tests: honor TESTSUITEFLAGS in every check target.
377 * tests/local.mk (RUN_TESTSUITE): New.
378 (check-local, installcheck-local, maintainer-check-g++)
379 (maintainer-check-posix, maintainer-check-valgrind): Use it.
380
381 2009-06-10 Akim Demaille <demaille@gostai.com>
382
383 deterministic test suite.
384 Some consistency checks on symbols are performed after all the
385 symbols were read, by an iteration over the symbol table. This
386 traversal is nondeterministic, which can be a problem for test
387 cases.
388 Avoid this.
389 Addresses another form of nondeterminism reported by Joel E. Denny.
390 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
391
392 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
393 test in two.
394 Use different file names for the three tests to make the
395 maintenance easier.
396
397 2009-06-10 Akim Demaille <demaille@gostai.com>
398
399 gnulib: update.
400 * gnulib: Update to latest.
401 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
402 * m4/.gitignore: Regen.
403 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
404 Call xalloc_die on hash_insert failures.
405 Requested by the new __warn_unused_result__ attribute of
406 hash_insert.
407
408 2009-06-10 Akim Demaille <demaille@gostai.com>
409
410 deterministic user-token-number redeclaration errors.
411 Address nondeterminism reported by Joel E. Denny.
412 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
413
414 * src/uniqstr.h: Comment changes.
415 * src/location.h (boundary_cmp, location_cmp): New.
416 * src/symtab.c (user_token_number_redeclaration): New.
417 (symbol_translation): Use it.
418 * tests/input.at (Numbered tokens): Adjust the expected output.
419
420 2009-05-25 Akim Demaille <demaille@gostai.com>
421
422 build: avoid ignored errors.
423 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
424 errors, they pollute the output.
425
426 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
427
428 Convert multiple variable definition warnings to complaints.
429 * NEWS (2.5): Add a new entry for that change.
430 * doc/bison.texinfo (Decl Summary): Update %define entry.
431 (Bison Options): Update -D/--define/-F/--force-define entry.
432 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
433 * src/muscle-tab.h (muscle_percent_define_insert): Update
434 comments.
435 * tests/input.at (`%define errors'): Update.
436 (`%define, --define, --force-define'): Update.
437
438 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
439
440 -F/--force-define and relative %define/-D/--define priorities.
441 * NEWS (2.5): Add documentation to -D/--define entry.
442 * build-aux/cross-options.pl: Hard-code association of
443 --force-define with %define.
444 * doc/bison.texinfo (Decl Summary): In %define entry,
445 cross-reference command-line options.
446 (Bison Options): Add documentation to -D/--define entry.
447 (Option Cross Key): Widen column for --force-define row.
448 * src/getargs.c (usage): Document -F/--force-define. Realign
449 options in output.
450 (short_options, long_options, getargs): Parse -F/--force-define,
451 and update muscle_percent_define_insert invocations.
452 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
453 (muscle_percent_define_insert): Add argument with that type.
454 * src/muscle-tab.c (muscle_percent_define_insert): Implement
455 -F/--force-define behavior and priorities.
456 (muscle_percent_define_ensure): Update
457 muscle_percent_define_insert invocation.
458 * src/parse-gram.y (prologue_declaration): Update
459 muscle_percent_define_insert invocations.
460 * tests/input.at (`%define, --define'): Rename to...
461 (`%define, --define, --force-define'): ... this and extend.
462
463 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
464
465 Update some comments to make sense for -D.
466 * data/bison.m4 (b4_check_user_names): In header comments, say
467 "user occurrence" instead of "grammar occurrence".
468 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
469 (muscle_percent_code_grow): Likewise just for consistency.
470
471 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
472
473 * data/c++.m4 (b4_namespace_close): Simplify slightly.
474
475 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
476
477 Handle a trailing `:' in a user-supplied C++ namespace better.
478 * data/c++.m4 (b4_namespace_close): Don't let it be printed
479 among the closing braces here. This fix might make the
480 generated code easier to debug, but otherwise it should be
481 insignificant because a trailing `:' is a C++ error already.
482
483 2009-05-19 Akim Demaille <demaille@gostai.com>
484
485 remove useless variable.
486 * src/getargs.c (skeleton_arg): Remove now useless variable.
487 Should help the compiler see that this printf-like call is sane.
488
489 2009-05-15 Akim Demaille <demaille@gostai.com>
490
491 Rename token.prefix as api.tokens.prefix.
492 Discussed here.
493 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
494
495 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
496 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
497 (token.prefix): Rename as...
498 (api.tokens.prefix): this.
499
500 2009-05-11 Akim Demaille <demaille@gostai.com>
501
502 doc: use C++ headers.
503 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
504 headers.
505
506 2009-05-11 Akim Demaille <demaille@gostai.com>
507
508 doc: token.prefix
509 * doc/bison.simple (Decl Summary): Document token.prefix.
510 (Calc++ Parser): Various fixes.
511 Formatting changes.
512 Use token.prefix.
513 Introduce a macro TOKEN to shorten the code and make it more
514 readable.
515 (Calc++ Scanner): Adjust.
516 * NEWS (Variable token.prefix): New.
517
518 2009-05-04 Akim Demaille <demaille@gostai.com>
519
520 bison: catch bad symbol names.
521 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
522 * tests/input.at: Adjust.
523
524 2009-05-04 Akim Demaille <demaille@gostai.com>
525
526 identifiers: dashes are letters.
527 Dashes can now start identifiers (symbols and directives).
528
529 * src/scan-gram.l ({letter}): Add dash.
530 ({id}): Remove it.
531 * tests/input.at (Symbols): Adjust.
532 Remove stray comment.
533 * tests/regression.at (Invalid inputs): Adjust error message.
534 * doc/bison.texinfo (Symbols): Update.
535
536 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
537
538 Declare %code to be a permanent feature.
539 * NEWS (2.4.2): Here.
540 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
541 experimental.
542 (Decl Summary): Likewise.
543
544 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
545
546 Convert underscores to dashes in some %define variable names.
547 For now, just api.push-pull and lr.keep-unreachable-states.
548 Maintain old names for backward compatibility.
549 * NEWS (2.5): Document.
550 * data/c.m4 (b4_identification): Update comment.
551 * data/yacc.c: Update access.
552 * doc/bison.texinfo: Update.
553 * etc/bench.pl.in (bench_push_parser): Update use.
554 * src/files.c (tr): Move to...
555 * src/getargs.c, src/getargs.h (tr): ... here because I can't
556 think of a better place to expose it. My logic is that, for all
557 uses of tr so far, command-line arguments can be involved, and
558 getargs.h is already included.
559 * src/main.c (main): Update access.
560 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
561 variable names to new variable names before assigning value.
562 * src/reader.c (reader): Update setting default.
563 * tests/calc.at: Update uses.
564 * tests/conflicts.at (Unreachable States After Conflict
565 Resolution): Update use.
566 * tests/input.at (%define enum variables): Update use.
567 (%define backward compatibility): New test group.
568 * tests/push.at: Update uses.
569 * tests/reduce.at: Update uses.
570 * tests/torture.at: Update uses.
571
572 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
573
574 Set all front-end %define defaults in one place.
575 * src/main.c (main): Move lr.keep_unreachable_states default...
576 * src/reader.c (reader): ... to here.
577
578 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
579
580 Rename lr.default_reductions to lr.default-reductions.
581 * NEWS (2.5): Here.
582 * doc/bison.texinfo: Here.
583 * src/lalr.c (initialize_LA): Here.
584 * src/print.c (print_reductions): Here.
585 * src/reader.c (reader): Here.
586 * src/tables.c (action_row): Here.
587 * tests/input.at (%define enum variables): Here.
588 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
589
590 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
591
592 Pacify ./configure --enable-gcc-warnings.
593 * tests/input.at (Symbols): Prototype yyerror and yylex.
594
595 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
596
597 Document how `%define "var" "value"' is not M4-friendly.
598 * src/parse-gram.y (variable): In comments here.
599
600 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
601
602 Clean up recent patches a little.
603 Reported by Akim Demaille.
604 * doc/bison.texinfo (Understanding): Fix typos.
605 * src/print.c (print_reductions): Don't use negated variable.
606
607 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
608
609 List accepted values for a %define enum variable with an invalid value.
610 Suggested by Akim Demaille at
611 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
612 * data/bison.m4 (_b4_percent_define_check_values): Implement.
613 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
614 * tests/input.at (%define lr.default_reductions invalid values): Merge
615 into...
616 (%define enum variables): ... here, and update output.
617
618 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
619
620 Rename "default rule" to "default reduction".
621 This includes changing variable names in code, changing
622 comments, and renaming %define lr.default_rules to %define
623 lr.default_reductions.
624 * NEWS (2.5): Update IELR documentation.
625 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
626 documentation.
627 * data/glr.c, data/lalr1.java: Sync copyright dates.
628 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
629 and lr.type documentation. Make some other wording
630 improvements.
631 (Glossary): Adjust cross-references and Default Reduction
632 definition.
633 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
634 Remove a confusing comment pointed out by Akim Demaille.
635 (initialize_LA): Adjust code.
636 * src/print-xml.c (print_reductions): Adjust code.
637 * src/print.c (print_reductions): Adjust code.
638 * src/reader.c (reader): Adjust code.
639 * src/tables.c (action_row): Adjust code.
640 (token_actions): Adjust code.
641 * src/tables.h: Adjust YYDEFACT documentation.
642 * tests/input.at (%define lr.default_rules invalid values):
643 Rename test group to...
644 (%define lr.default_reductions invalid values): ... this, and
645 update grammar file and expected output.
646 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
647 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
648
649 2009-04-21 Akim Demaille <demaille@gostai.com>
650
651 tests: check the use of dashes and periods in symbols.
652 * tests/input.at (Symbol): New test group.
653
654 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
655
656 Document %define lr.type and lr.default_rules.
657 * NEWS (2.5): Add an entry.
658 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
659 besides just LALR(1) and GLR(1).
660 * doc/bison.texinfo (Introduction): Likewise.
661 (Language and Grammar): Bison is no longer limited to LALR(1)
662 restrictions.
663 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
664 when trying to distinguish from GLR. Talk about LR(1) grammars
665 rather than LALR(1) grammars.
666 (Decl Summary): In %define api.push_pull entry, say it applies
667 to deterministic parsers in C rather than LALR(1) parsers in C.
668 Add lr.default_rules entry.
669 Add lr.type entry.
670 (Mystery Conflicts): Bison is no longer limited to LALR(1)
671 restrictions.
672 (Generalized LR Parsing): Same changes as for the previous GLR
673 section.
674 (Memory Management): Say deterministic rather than LALR(1).
675 (Understanding): Correct some bison output.
676 Index discussion of "accepting state".
677 Say deterministic rather than LALR(1).
678 (Bison Options): In --yacc entry, say deterministic rather than
679 LALR(1).
680 In --report, --graph, and --xml entries, just don't mention
681 LALR(1).
682 (C++ Parsers): Say deterministic rather than LALR(1).
683 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
684 (Glossary): Add Accepting State, Consistent State, Default Rule,
685 and IELR(1) definitions.
686 In Generalized LR (GLR) definition, make same changes as in
687 previous GLR sections.
688 In LALR(1) definition, say Bison uses LALR(1) by default rather
689 than implying Bison is limited to LALR(1).
690 (LocalWords): Add IELR.
691
692 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
693
694 Finish implementing %define lr.type.
695 Its value can be "LALR", "IELR", or "canonical LR".
696 * lib/timevar.def (TV_IELR_PHASE1): New var.
697 (TV_IELR_PHASE2): New var.
698 (TV_IELR_PHASE3): New var.
699 (TV_IELR_PHASE4): New var.
700 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
701 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
702 Sbitset.h, ielr.h, and ielr.c.
703 * src/getargs.h, src/getargs.c (enum trace, trace_args,
704 trace_types): Add trace_ielr.
705 * src/lalr.h, src/lalr.c (ngotos): Export it.
706 (F): Rename to...
707 (goto_follows): ... this, update all uses, and export it.
708 (set_goto_map): Export it.
709 (map_goto): Export it.
710 (compute_lookahead_tokens): Don't free goto_follows yet. Now
711 handled in ielr.
712 (initialize_LA): Export it. Move lookback allocation to...
713 (lalr): ... here because, for canonical LR, initialize_LA must
714 be invoked but lookback and much of the rest of LALR isn't
715 needed.
716 * main.c (main): Instead of lalr, invoke ielr, which invokes
717 lalr.
718 * src/reader.c (reader): Default lr.type to "LALR".
719 Default lr.default_rules to "accepting" if lr.type is "canonical
720 LR". Leave the default as "all" otherwise.
721 Check for a valid lr.type value.
722 * src/state.h, src/state.c (struct state_list): Add state_list
723 member.
724 (state_new): Initialize state_list member to NULL.
725 (state_new_isocore): New function, exported.
726 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
727 exercises all values of lr.type.
728 (GNU AWK Grammar): Rename test group to...
729 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
730 AT_TEST_EXISTING_GRAMMAR.
731 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
732 (GNU pic Grammar): Rename test group to...
733 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
734 AT_TEST_EXISTING_GRAMMAR.
735 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
736 all values of lr.type.
737 (Single State Split): New test groups using AT_TEST_LR_TYPE.
738 (Lane Split): Likewise.
739 (Complex Lane Split): Likewise.
740 (Split During Added Lookahead Propagation): Likewise.
741
742 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
743
744 Add new files for IELR and canonical LR implementation.
745 * src/AnnotationList.c: New.
746 * src/AnnotationList.h: New.
747 * src/InadequacyList.c: New.
748 * src/InadequacyList.h: New.
749 * src/Sbitset.c: New.
750 * src/Sbitset.h: New.
751 * src/ielr.c: New.
752 * src/ielr.h: New.
753
754 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
755
756 Implement %define lr.default_rules.
757 Its value describes the states that are permitted to contain
758 default rules: "all", "consistent", or "accepting".
759 * src/reader.c (reader): Default lr.default_rules to "all".
760 Check for a valid lr.default_rules value.
761 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
762 is "accepting", then only mark the accepting state as
763 consistent.
764 (initialize_LA): Tell state_lookahead_tokens_count whether
765 lr.default_rules is "accepting".
766 * src/tables.c (action_row): If lr.default_rules is not "all",
767 then disable default rules in inconsistent states.
768 * src/print.c (print_reductions): Use this opportunity to
769 perform some assertions about whether lr.default_rules was
770 obeyed correctly.
771 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
772 helps with checking the parser tables for a grammar.
773 * tests/input.at (%define lr.default_rules invalid values): New
774 test group.
775 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
776 AT_TEST_TABLES_AND_PARSE.
777 (`no %define lr.default_rules'): New test group generated by
778 AT_TEST_LR_DEFAULT_RULES.
779 (`%define lr.default_rules "all"'): Likewise.
780 (`%define lr.default_rules "consistent"'): Likewise.
781 (`%define lr.default_rules "accepting"'): Likewise.
782
783 2009-04-20 Akim Demaille <demaille@gostai.com>
784
785 Formatting change.
786
787 2009-04-20 Akim Demaille <demaille@gostai.com>
788
789 bison: factoring.
790 * src/output.c (token_definitions_output): Use symbol_id_get
791 instead of duplicating its logic.
792 * TODO (YYERRCODE): Extend.
793
794 2009-04-20 Akim Demaille <demaille@gostai.com>
795
796 variables: prefer error-verbose to error_verbose.
797 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
798 instead of error_verbose.
799 * src/scan-gram.l (%error-verbose): Map to the error-verbose
800 variable.
801 * doc/bison.texinfo: Promote %define error-verbose instead of
802 %error-verbose.
803 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
804
805 2009-04-15 Akim Demaille <demaille@gostai.com>
806
807 variables: accept dashes.
808 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
809 underscores.
810 * src/scan-gram.l ({id}): Also accept dashes after the initial
811 letter.
812 ({directive}): Use {id}.
813 * src/parse-gram.y: Comment and formatting changes.
814 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
815 symbols.
816 * src/complain.h, src/complain.c (yacc_at): New.
817 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
818 symbol names.
819 * src/output.c (token_definitions_output): Do not #define token
820 names with dashes.
821
822 2009-04-20 Akim Demaille <demaille@gostai.com>
823
824 Consistently refer to Yacc, not YACC.
825 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
826
827 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
828
829 Pacify make maintainer-check-posix.
830 * tests/input.at (%define, --define): Move bison command-line
831 options before grammar file name.
832
833 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
834
835 Document semicolon warnings.
836 * NEWS (2.5): Here.
837
838 2009-04-14 Akim Demaille <demaille@gostai.com>
839
840 variables: use `parse.assert' instead of `assert'.
841 * TODO (assert): Remove.
842 * data/bison.m4 (b4_assert_if): Replace with...
843 (b4_parse_assert_if): this.
844 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
845 * doc/bison.texinfo (Decl Summary): Document parse.assert.
846
847 2009-04-14 Akim Demaille <demaille@gostai.com>
848
849 variables: use `parse.trace' instead of `debug'.
850 * src/getargs.c (getargs): Map -t to %define trace.parse.
851 * src/scan-gram.l (%debug): Map to %define trace.parse.
852 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
853 names to `_' in macro names.
854 (b4_debug_if): Replace with...
855 (b4_parse_trace_if): this.
856 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
857 * data/yacc.c: Adjust.
858 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
859 Use @code to label the variable list.
860 Document the variable parse.trace.
861 (Tracing): Promote the parse.trace variable.
862 * TODO: %printer is not documented.
863
864 2009-04-14 Akim Demaille <demaille@gostai.com>
865
866 doc: minor fixes.
867 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
868 (Table of Symbols): Remove duplicate entry for %debug.
869
870 2009-04-10 Eric Blake <ebb9@byu.net>
871
872 submodules: update to latest
873 * submodules/autoconf: Use latest upstream Autoconf.
874
875 2009-04-06 Eric Blake <ebb9@byu.net>
876
877 Work around autoconf 2.63b bug in testsuite.
878 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
879 autoconf bug related to # in test.
880
881 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
882
883 * NEWS (2.5): New section. Describe new -D/--define feature.
884
885 2009-04-06 Akim Demaille <demaille@gostai.com>
886
887 Regen.
888 * src/parse-gram.h, src/parse-gram.c: Regen.
889
890 2009-04-06 Akim Demaille <demaille@gostai.com>
891
892 rename muscle_tab.* as muscle-tab.* for consistency.
893 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
894 * src/muscle-tab.h, src/muscle-tab.c: these.
895 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
896 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
897
898 2009-04-06 Akim Demaille <demaille@gostai.com>
899
900 Makefile: introduce $(BISON).
901 * src/local.mk (BISON): New.
902 (YACC): Use it.
903
904 2009-04-06 Akim Demaille <demaille@gostai.com>
905
906 parser: handle %locations as %define locations.
907 * src/getargs.h, src/getargs.c (locations_flag): Remove.
908 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
909 to set "locations" to true.
910 * src/output.c (prepare): Don't output "locations".
911 * src/scan-gram.l (%locations): Handle it as a %<flag>.
912 * src/parse-gram.y: It's no longer a token.
913 Don't handle it.
914 * data/bison.m4 (b4_locations_if): Define it with
915 b4_percent_define_if_define.
916 * data/c.m4, data/glr.cc: Adjust.
917
918 2009-04-06 Akim Demaille <demaille@gostai.com>
919
920 Regen.
921 * src/parse-gram.c: Regen.
922
923 2009-04-06 Akim Demaille <demaille@gostai.com>
924
925 muscle: factor the handling of obsolete of obsolete directives.
926 Suggested by Joel E. Denny.
927
928 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
929 New, extracted from...
930 * src/parse-gram.y (prologue_declaration: pure-parser): here.
931 Remove it.
932 (prologue_declaration: "%<flag>"): Use
933 muscle_percent_define_ensure.
934 (%error-verbose, %pure-parser): No longer tokens.
935 * src/scan-gram.l (pure-parser): Return as a %<flag>.
936
937 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
938
939 Fix options documentation.
940 * build-aux/cross-options.pl: As in --help output, write optional
941 arguments as [=ARG] not =[ARG].
942 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
943
944 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
945
946 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
947 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
948 requirements for a correct m4 are stricter.
949 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
950 * configure.ac: Update to use AC_PROG_GNU_M4.
951 Reported by Eric Blake.
952
953 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
954
955 Help with updating web manual.
956 * HACKING: Incorporate instructions from gnulib/doc/README.
957 * bootstrap.conf (gnulib_modules): Add gendocs.
958
959 2009-04-03 Akim Demaille <demaille@gostai.com>
960
961 Regen.
962 * src/parse-gram.h, src/parse-gram.c: Regen.
963
964 2009-04-03 Akim Demaille <demaille@gostai.com>
965
966 Factor %FLAG at scan level.
967 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
968 definitions and associated rules, replaced by....
969 (PERCENT_FLAG): this new token type, and rule.
970 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
971 Use it for %debug and %error-verbose.
972
973 2009-04-03 Akim Demaille <demaille@gostai.com>
974
975 Regen.
976 * src/parse-gram.h, src/parse-gram.c: Regen.
977
978 2009-04-03 Akim Demaille <demaille@gostai.com>
979
980 Treat %debug as %define debug.
981 * data/bison.m4 (b4_debug_if): New.
982 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
983 * data/lalr1.java: Use it instead of b4_debug_flag.
984 * src/getargs.h, src/getargs.c (debug_flag): Remove.
985 * src/output.c (prepare): Don't output it.
986 * src/parse-gram.y: Treat %debug as %define debug.
987
988 2009-04-03 Akim Demaille <demaille@gostai.com>
989
990 Treat %error-verbose as %define error_verbose.
991 This allows to pass -Derror_verbose on the command line. Better
992 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
993 ERROR_VERBOSE being defined as false or true.
994 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
995 on b4_percent_define_ifdef, for does not check the defined value,
996 but only whether the symbol is defined, rely on
997 b4_percent_define_flag_if, so that a value of "false" is processed
998 as a false.
999 If not defined, define the flag to "false".
1000 (b4_error_verbose_if): New.
1001 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1002 b4_error_verbose_flag.
1003 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1004 * src/output.c (prepare): Don't output it.
1005 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1006
1007 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1008
1009 Fix strange %define locations for default values.
1010 Reported by Akim Demaille at
1011 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1012 and discussed again starting at
1013 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1014 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1015 because location information is bogus.
1016 Use angle brackets to delimit fake file name because square brackets
1017 look like underexpanded m4. Choose a better fake file name.
1018 Use negative line numbers.
1019 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1020 * src/location.c (location_print): If line for a boundary is negative,
1021 only print that boundary's file name.
1022 * src/location.h: Document that.
1023 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1024 defaults): Update output.
1025
1026 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1027
1028 Pacify ./configure --enable-gcc-warnings.
1029 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1030 in lib won't compile with it.
1031 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1032
1033 2009-03-31 Akim Demaille <demaille@gostai.com>
1034
1035 bootstrap: --help to stdout.
1036 * bootstrap (usage): Don't send --help to stderr.
1037 Use a here doc instead of a long string.
1038
1039 2009-03-31 Akim Demaille <demaille@gostai.com>
1040
1041 bootstrap: README-hacking no longer exists
1042 * bootstrap (checkout_only_file): Set to HACKING.
1043
1044 2009-03-26 Akim Demaille <demaille@gostai.com>
1045
1046 doc: merge HACKING and README-hacking.
1047 Two files is confusing.
1048 Reported by Alexandre Duret-Lutz.
1049
1050 * README-hacking: Merge into...
1051 * HACKING (Working from the repository): here.
1052
1053 2009-03-26 Akim Demaille <demaille@gostai.com>
1054
1055 doc: update README-hacking.
1056 * README-hacking: We now use git and git submodules.
1057 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1058
1059 2009-03-26 Akim Demaille <demaille@gostai.com>
1060
1061 lalr1.cc: avoid GCC 4.3 warnings.
1062 GCC 4.3 now warns about "a || b && c" and asks for explicit
1063 parentheses.
1064 Reported by Alexandre Duret-Lutz.
1065 * data/location.cc: Update copyright years.
1066 (Position::operator==): Use parens to make precedence explicit.
1067 Compare lines and columns first, as they are more likely to be
1068 different, and they are faster to compare.
1069
1070 2009-03-26 Akim Demaille <demaille@gostai.com>
1071
1072 gnulib: update.
1073 * gnulib: Update to latest.
1074 * src/local.mk (AM_CFLAGS): Move to...
1075 * Makefile.am: here.
1076 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1077 AM_CFLAGS.
1078
1079 2009-03-02 Akim Demaille <demaille@gostai.com>
1080
1081 Comment changes.
1082
1083 2009-03-02 Akim Demaille <demaille@gostai.com>
1084
1085 Share b4_yytranslate_define.
1086 * data/lalr1.cc (b4_yytranslate_define): Move to...
1087 * data/c++.m4: here.
1088
1089 2009-03-02 Akim Demaille <demaille@gostai.com>
1090
1091 Use locations in the variant example.
1092 Yes, this obfuscates the point of this example, variants only.
1093 But glr.cc cannot work (yet?) without locations. This change
1094 makes it easier to use this example with glr.cc.
1095
1096 * examples/variant.yy (assert): %define it.
1097 (locations): Request them.
1098 (yylex): Bind the location to the stage.
1099
1100 2009-03-02 Akim Demaille <demaille@gostai.com>
1101
1102 Dub make_TOKEN as a public type interface.
1103 * data/c++.m4 (b4_symbol_constructor_declare)
1104 (b4_symbol_constructor_define): New empty stubs.
1105 (b4_public_types_declare, b4_public_types_define): Use them.
1106 * data/lalr1.cc (b4_symbol_constructor_declare)
1107 (b4_symbol_constructor_declare_)
1108 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1109 Move to...
1110 * data/variant.hh: here.
1111 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1112 needed.
1113 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1114 b4_symbol_constructor_declare, as it is now done by
1115 b4_public_types_define and b4_public_types_declare.
1116
1117 2009-03-02 Akim Demaille <demaille@gostai.com>
1118
1119 Coding style changes.
1120 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1121 (b4_symbol_constructor_declarations)
1122 (b4_symbol_constructor_definition_)
1123 (b4_symbol_constructor_definitions)
1124 (b4_yytranslate_definition): Rename as...
1125 (b4_symbol_constructor_declare_)
1126 (b4_symbol_constructor_declare)
1127 (b4_symbol_constructor_define_)
1128 (b4_symbol_constructor_define)
1129 (b4_yytranslate_define): these.
1130 * data/variant.hh (b4_variant_definition): Rename as...
1131 (b4_variant_define): this.
1132
1133 2009-03-02 Akim Demaille <demaille@gostai.com>
1134
1135 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1136 * data/bison.m4 (b4_percent_define_if_define): New.
1137 * data/c++.m4 (b4_variant_if): Move to...
1138 * data/bison.m4: Here, using b4_percent_define_if_define.
1139 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1140 * data/bison.m4: Here, using b4_percent_define_if_define.
1141
1142 2009-03-02 Akim Demaille <demaille@gostai.com>
1143
1144 Dub symbol_type_base as a public type.
1145 * data/c++.m4 (b4_public_types_declare): Now define
1146 symbol_type_base and symbol_type.
1147 (b4_public_types_define): New.
1148 In both cases, the definitions are taken verbatim from lalr1.cc.
1149 * data/lalr1.cc: Adjust.
1150
1151 2009-03-02 Akim Demaille <demaille@gostai.com>
1152
1153 b4_public_types_declare.
1154 * data/c++.m4 (b4_public_types_declare): New.
1155 * data/glr.cc, data/lalr1.cc: Use it.
1156
1157 2009-03-02 Akim Demaille <demaille@gostai.com>
1158
1159 b4_semantic_type_declare.
1160 * data/c++.m4 (b4_semantic_type_declare): New.
1161 Factors and generalizes what was in glr.cc and lalr1.cc.
1162 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1163 variants.
1164 * data/lalr1.cc, data/glr.cc: Use it.
1165
1166 2009-02-26 Akim Demaille <demaille@gostai.com>
1167
1168 Upgrade gnulib.
1169 * gnulib: Upgrade from master.
1170 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1171 Regen.
1172
1173 2009-02-25 Akim Demaille <demaille@gostai.com>
1174
1175 Remove useless arguments.
1176 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1177 relevant.
1178
1179 2009-02-25 Akim Demaille <demaille@gostai.com>
1180
1181 Comment changes.
1182 * data/lalr1.cc: here.
1183
1184 2009-02-25 Akim Demaille <demaille@gostai.com>
1185
1186 Fix glr.cc's debug level handling.
1187 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1188 glr.c which is used.
1189 (debug_level, set_debug_level): Adjust.
1190
1191 2009-02-25 Akim Demaille <demaille@gostai.com>
1192
1193 Copyright years.
1194 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1195
1196 2009-02-25 Akim Demaille <demaille@gostai.com>
1197
1198 Style changes.
1199 * etc/bench.pl.in (generate_grammar_list): Consitently use
1200 location_type, not yy::location.
1201
1202 2009-02-25 Akim Demaille <demaille@gostai.com>
1203
1204 Comment change.
1205 * data/lalr1.cc: here.
1206
1207 2009-02-19 Akim Demaille <demaille@gostai.com>
1208
1209 Make yyparser::error public.
1210 * data/lalr1.cc: here.
1211 There is no good reason to keep it private (and it is convenient
1212 to use it from the scanner for instance). It is already public in
1213 glr.cc.
1214
1215 2009-02-19 Akim Demaille <demaille@gostai.com>
1216
1217 Comment changes.
1218 * data/glr.cc: here.
1219
1220 2009-02-19 Akim Demaille <demaille@gostai.com>
1221
1222 Remove trailing blanks.
1223 The epilogue has its own ending \n, no need to add another.
1224
1225 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1226 epilogue.
1227 * data/glr.cc: dnl when extending the epilogue.
1228 Remove stray "private:".
1229
1230 2009-02-19 Akim Demaille <demaille@gostai.com>
1231
1232 Use b4_c_modern.
1233 * data/c.m4 (b4_c_function_decl): Here.
1234
1235 2009-02-19 Akim Demaille <demaille@gostai.com>
1236
1237 Comment changes.
1238 * data/lalr1.cc: here.
1239
1240 2009-02-19 Akim Demaille <demaille@gostai.com>
1241
1242 Extract variant.hh
1243 * data/variant.hh: New, extracted from...
1244 * data/lalr1.cc: here.
1245 Adjust.
1246 * data/local.mk: Adjust.
1247
1248 2009-02-19 Akim Demaille <demaille@gostai.com>
1249
1250 Extract stack.hh from lalr1.cc.
1251 * data/stack.hh: New.
1252 * data/lalr1.cc: Extract from here.
1253 * data/local.mk: Adjust.
1254
1255 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1256
1257 Add reminder about uploading public key to keys.gnupg.net.
1258 * HACKING (Release Procedure): Here.
1259
1260 2009-01-28 Akim Demaille <demaille@gostai.com>
1261
1262 * NEWS: Update information about 2.4.1 and 2.4.2.
1263
1264 2008-11-04 Akim Demaille <demaille@gostai.com>
1265
1266 Reformat NEWS.
1267 * NEWS: Use more outline-mode markup.
1268 Suggested by Jim Meyering.
1269
1270 2009-01-08 Akim Demaille <demaille@gostai.com>
1271
1272 Fix grep portability issues.
1273 Grep on Solaris does not support -q.
1274 Reported by Summum Bonum.
1275
1276 * NEWS: Add a stub for 2.4.2.
1277 * THANKS: Add Summum Bonum.
1278 * tests/atlocal.in (EGREP): New.
1279 (CC, CXX, XSLTPROC): Make it possible to override them via
1280 envvars.
1281 * tests/java.at: Use $EGREP instead of egrep.
1282 Use AT_CHECK's ignore instead of grep's -q.
1283
1284 2008-12-11 Akim Demaille <demaille@gostai.com>
1285
1286 Pass the token type to yysyntax_error.
1287 * data/yacc.c (yysyntax_error): Take the transated token instead
1288 of the raw number.
1289 Adjust callers.
1290 * TODO: Update.
1291
1292 2008-12-11 Akim Demaille <demaille@gostai.com>
1293
1294 Formatting changes.
1295 * data/glr.c: Formatting changes.
1296
1297 2008-12-11 Akim Demaille <demaille@gostai.com>
1298
1299 Propagate i18n changes into glr.c.
1300 * TODO: Update.
1301 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1302 building the error message format dynamically.
1303 * data/lalr1.java: Formatting changes.
1304
1305 2008-12-11 Akim Demaille <demaille@gostai.com>
1306
1307 Use testsuite -C.
1308 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1309 Solves problems when top_srcdir is an absolute path.
1310 Suggested by Eric Blake.
1311 * configure.ac: Require Autoconf 2.62.
1312
1313 2008-12-11 Akim Demaille <demaille@gostai.com>
1314
1315 Simplify the i18n of the error messages.
1316 * data/lalr1.cc: Comment changes.
1317 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1318 lalr1.cc instead of building dynamically the format string.
1319
1320 2008-12-08 Akim Demaille <demaille@gostai.com>
1321
1322 Fix portability issue in the test suite.
1323 * tests/local.at (AT_MATCHES_CHECK): New.
1324 Based on Perl instead of Sed. Sed has too many portability
1325 pitfalls, not ever Sed is GNU Sed.
1326 * tests/actions.at (Fix user actions without a trailing semicolon):
1327 Use it.
1328
1329 2008-12-08 Akim Demaille <demaille@gostai.com>
1330
1331 Update data/README.
1332 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1333
1334 2008-12-08 Akim Demaille <demaille@gostai.com>
1335
1336 Install autoconf as a submodule to get m4sugar.
1337 * .gitmodules: Add submodules/autoconf.
1338 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1339 submodules/autoconf.
1340
1341 2008-12-08 Akim Demaille <demaille@gostai.com>
1342
1343 Test token.prefix in all the skeletons.
1344 * data/java.m4 (b4_token_enum): Use the token.prefix.
1345 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1346 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1347 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1348 * tests/java.at: Comment changes.
1349 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1350 (Java parser class and package names): Add token.prefix check.
1351
1352 2008-12-08 Akim Demaille <demaille@gostai.com>
1353
1354 Fix regeneration of atconfig.
1355 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1356 remove it: now that there is no tests/Makefile.am, the top-level
1357 Makefile properly updates atconfig when needed.
1358
1359 2008-12-07 Di-an Jan <dianj@freeshell.org>
1360
1361 Implement the FIXME that ends an user action with a semicolon
1362 if it seems necessary.
1363 * src/scan-code.l (flex rules section): Flag cpp directive from
1364 any `#' to the first unescaped end-of-line. Semicolon is not
1365 needed after `;', `{', '}', or cpp directives and is needed after
1366 any other token (whitespaces and comments have no effect).
1367 * tests/actions.at (Fix user actions without a trailing semicolon):
1368 New test.
1369 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1370 to make user actions complete statements.
1371 Adjust column numbers in error messages.
1372 * tests/regression.at (Fix user actions without a trailing semicolon):
1373 Remove. Covered by new test.
1374
1375 2008-12-07 Akim Demaille <demaille@gostai.com>
1376
1377 Update gnulib.
1378 * gnulib: Update from master.
1379
1380 2008-12-05 Eric Blake <ebb9@byu.net>
1381
1382 Avoid compiler warning.
1383 * src/output.c (muscle_insert_item_number_table): Delete unused
1384 function.
1385
1386 2008-12-02 Eric Blake <ebb9@byu.net>
1387
1388 Build testsuite with newer autoconf.
1389 * tests/output.at (m4_expand): Don't override in newer autoconf,
1390 where the underlying implementation changed.
1391 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1392 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1393 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1394 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1395 since some of them contain unbalanced ')'.
1396
1397 2008-12-01 Akim Demaille <demaille@gostai.com>
1398
1399 Use b4_symbol for printers and destructors everywhere.
1400 * data/bison.m4 (b4_symbol_action_location): New.
1401 * data/c.m4 (b4_symbol_actions): Remove.
1402 Adjust all callers to use by b4_symbol_foreach and the corresponding
1403 b4_symbol_printer/destructor macro.
1404 * data/glr.cc: Adjust.
1405 * data/lalr1.java: Adjust the %destructor sanity check.
1406 * src/output.c (symbol_code_props_output): Remove, we no longer
1407 need the b4_symbol_printers/destructors tables.
1408
1409 2008-12-01 Akim Demaille <demaille@gostai.com>
1410
1411 Use b4_symbol_case_.
1412 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1413 b4_symbol_case_.
1414
1415 2008-12-01 Akim Demaille <demaille@gostai.com>
1416
1417 Move b4_symbol based macro to bison.m4.
1418 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1419 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1420 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1421 (b4_type_foreach): Move to...
1422 * data/bison.m4: Here.
1423 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1424 b4_symbol_value_template instead of b4_symbol_value.
1425
1426 2008-12-01 Akim Demaille <demaille@gostai.com>
1427
1428 b4_symbol/type_foreach.
1429 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1430 Use them.
1431
1432 2008-12-01 Akim Demaille <demaille@gostai.com>
1433
1434 Use the symbol properties to output the printer/destructor for lalr1.cc.
1435 Instead of defining complex list of tuples to define various
1436 properties of the symbols, we now prefer to define symbols as
1437 "structs" in m4: using the symbol key (its number), and the
1438 property name, b4_symbol gives it value. Use this to handle
1439 destructors and printers.
1440
1441 * src/output.c (CODE_PROP): New.
1442 (prepare_symbol_definitions): Use it to define the printer and
1443 destructor related attributes of the symbols.
1444 * data/lalr1.cc (b4_symbol_actions): Rename as...
1445 (b4_symbol_action): this.
1446 Use b4_symbol instead of 6 arguments.
1447 (b4_symbol_printer, b4_symbol_destructor): New.
1448 Use them instead of b4_symbol_actions.
1449
1450 2008-12-01 Akim Demaille <demaille@gostai.com>
1451
1452 Avoid capturing variables too easily.
1453 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1454 v__ and p__ instead of v and p.
1455
1456 2008-12-01 Akim Demaille <demaille@gostai.com>
1457
1458 Remove spurious empty line before syncline.
1459 * data/bison.m4 (b4_syncline): Don't output an empty line before
1460 the output.
1461
1462 2008-11-26 Akim Demaille <demaille@gostai.com>
1463
1464 Convert lib/Makefile.am into lib/local.mk.
1465 The real problem is rather gnulib.mk, which itself is extracted
1466 from a Makefile.am that gnulib expects to the "recursive". The
1467 tool prefix-gnulib-mk converts such a gnulib.mk to be
1468 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1469
1470 * etc/prefix-gnulib-mk: New.
1471 * bootstrap (slurp): Use it to convert further gnulib.mk.
1472 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1473 are deeper.
1474 * lib/Makefile.am: Rename as...
1475 * lib/local.mk: this.
1476 Adjust to be prefixed.
1477 * Makefile.am, configure.ac: Adjust.
1478 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1479
1480 2008-11-26 Akim Demaille <demaille@gostai.com>
1481
1482 s/_FLAGS/FLAGS/.
1483 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1484 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1485 Reported by Eric Blake.
1486
1487 2008-11-26 Akim Demaille <demaille@gostai.com>
1488
1489 Use b4_parser_tables_define in glr.cc.
1490 * data/glr.c: Use b4_parser_tables_define instead of defining the
1491 (deterministic integral) tables by hand.
1492
1493 2008-11-26 Akim Demaille <demaille@gostai.com>
1494
1495 Use b4_parser_tables_define in Java.
1496 * data/java.m4 (b4_typed_parser_table): Rename as...
1497 (b4_typed_parser_table_define): this, for consistency.
1498 Accept a comment as $4.
1499 Move $2 into yy*_.
1500 (b4_integral_parser_table): Rename as...
1501 (b4_integral_parser_table_define): this.
1502 * data/lalr1.java: Adjust all uses.
1503 Use b4_parser_tables_define instead of generation by hand.
1504
1505 2008-11-26 Akim Demaille <demaille@gostai.com>
1506
1507 Prepare the convergence bw C style and Java table generation.
1508 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1509 (b4_tables_define): Rename as...
1510 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1511 (b4_parser_tables_define): these.
1512 * data/c.m4 (b4_table_define): Rename as...
1513 (b4_integral_parser_table_define): this.
1514 * data/lalr1.cc: Adjust.
1515 (b4_table_define, b4_table_declare): Rename as...
1516 (b4_integral_parser_table_define)
1517 (b4_integral_parser_table_declare): these.
1518 (yyrline_): Move the comment where it is actually used.
1519 * data/yacc.c: Adjust.
1520 (yyrline): Use b4_integral_parser_table_define.
1521
1522 2008-11-26 Akim Demaille <demaille@gostai.com>
1523
1524 Regen.
1525 * src/parse-gram.h, src/parse-gram.c: Regen.
1526
1527 2008-11-26 Akim Demaille <demaille@gostai.com>
1528
1529 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1530 * data/lalr1.cc (b4_tables_map): Move to...
1531 * data/bison.m4: here.
1532 Update the comment for yytable during the flight.
1533 (b4_tables_declare, b4_tables_define): New.
1534 * data/lalr1.cc: Use them.
1535 * data/c.m4 (b4_table_define): New.
1536 * data/yacc.c: Use b4_tables_define instead of output the tables
1537 by hand.
1538 * tests/regression.at (Web2c Actions): Adjust the expected output,
1539 the order of the tables changed.
1540
1541 2008-11-26 Akim Demaille <demaille@gostai.com>
1542
1543 Get rid of (yy)rhs and (yy)prhs.
1544 These tables are no longer needed in the parsers, and they don't seem to
1545 be useful. They are not documented either.
1546
1547 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1548 Adjust the computation of (yy)r2.
1549
1550 2008-11-26 Akim Demaille <demaille@gostai.com>
1551
1552 Rule length is unsigned.
1553 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1554
1555 2008-11-26 Akim Demaille <demaille@gostai.com>
1556
1557 Get rid of lalr1-split.cc.
1558 It was no longer maintainer.
1559
1560 * data/lalr1-split.cc: Remove.
1561 * etc/bench.pl.in (bench_fusion_parser): Remove.
1562 Adjust.
1563
1564 2008-11-26 Akim Demaille <demaille@gostai.com>
1565
1566 Use yy* consistently.
1567 * data/glr.c: Now that yyrhs no longer exists as a global
1568 variable, rename local "rhs" variables into "yyrhs" for
1569 consistency.
1570
1571 2008-11-25 Akim Demaille <demaille@gostai.com>
1572
1573 Get rid of yyrhs and yyprhs in glr.c.
1574 * data/glr.c (yyrhs, yyprhs): Remove.
1575 Instead, use the state stack and yystos.
1576
1577 2008-11-25 Akim Demaille <demaille@gostai.com>
1578
1579 Flag glr tests.
1580 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1581 as an Autotest keyword.
1582
1583 2008-11-25 Akim Demaille <demaille@gostai.com>
1584
1585 Prefer TESTSUITE_FLAGS.
1586 TESTSUITEFLAGS is barely readable.
1587
1588 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1589 for backward compatibility.
1590 Use the former instead of the latter.
1591
1592 2008-11-25 Akim Demaille <demaille@gostai.com>
1593
1594 Get rid of yyrhs and yyprhs in larl1.java.
1595 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1596 (yy_reduce_print): Rather, use yystos_ and the state stack.
1597
1598 2008-11-25 Akim Demaille <demaille@gostai.com>
1599
1600 Formatting changes.
1601
1602 2008-11-25 Akim Demaille <demaille@gostai.com>
1603
1604 Get rid of yyrhs and yyprhs in yacc.c.
1605 They were used to get the symbol types, given a rule number, when
1606 displaying the top of the stack before a reduction. But the
1607 symbol type is available from the state stack. This has two be
1608 benefits: two tables less in the parser (making it smaller), and a
1609 more consistent use of the three stacks which will help to fuse
1610 them.
1611
1612 * data/yacc.c (yyprhs, yyrhs): Remove.
1613 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1614 (yy_reduce_print): Take yyssp as argument.
1615 Use it, together with yystos, to get the symbol type.
1616 * tests/regression.at (Web2c Report): Remove these tables from the
1617 expected output.
1618
1619 2008-11-25 Akim Demaille <demaille@gostai.com>
1620
1621 b4_tables_map.
1622 The point is to factor the generation of the tables across skeletons.
1623 This is language dependant.
1624
1625 * data/c.m4 (b4_comment_): New.
1626 Should be usable to define how to generate tables independently of
1627 the language.
1628 (b4_c_comment): New.
1629 (b4_comment): Bounce to b4_c_comment.
1630 Now support $2 = [PREFIX] for indentation.
1631 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1632 there is no comment.
1633 Indent it properly when there is one.
1634 Output the ending semicolon.
1635 (b4_table_define): Space changes.
1636 Output the ending semicolon.
1637 (b4_tables_map): New.
1638 Use it twice instead of declaring and defining the (integral)
1639 tables by hand.
1640
1641 2008-11-25 Akim Demaille <demaille@gostai.com>
1642
1643 b4_table_declare.
1644 * data/lalr1.cc (b4_table_declare): New.
1645 Use it to declare the tables defined with b4_table_define.
1646 (b4_table_define): Declare a third arg to match b4_table_declare
1647 signature.
1648 Move all the comments around invocations of b4_table_define into
1649 the invocations itselves.
1650 Move things around to have the order for declarations and
1651 definitions.
1652
1653 2008-11-25 Akim Demaille <demaille@gostai.com>
1654
1655 Formatting changes.
1656 * data/lalr1.java: here.
1657
1658 2008-11-25 Akim Demaille <demaille@gostai.com>
1659
1660 b4_args is more general than only C++.
1661 * data/lalr1.cc (b4_args, _b4_args): Move to...
1662 * data/bison.m4: here.
1663
1664 2008-11-21 Di-an Jan <dianj@freeshell.org>
1665
1666 Implement no-XXX arguments for --warnings, --report, --trace.
1667 * src/getargs.c (flags_argmatch): Handles no-XXX.
1668 Fix typo in doxygen comment.
1669
1670 2008-11-21 Akim Demaille <demaille@gostai.com>
1671
1672 Display the changes in cross-options.texi.
1673 * build-aux/cross-options.pl ($sep): New, to separate items.
1674 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1675 changes.
1676
1677 2008-11-20 Di-an Jan <dianj@freeshell.org>
1678
1679 Improves options in the manual.
1680 * doc/bison.texinfo (-g, -x): Add space before argument.
1681 (Option Cross Key): Implement FIXME: listing directives also.
1682 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1683 (Short Option): Special case -d. Put arguments inside @option.
1684 (Bison Directive): Add column, automatically extracted from
1685 src/scan-gram.l (actual name passed as the first argument)
1686 with special case for %define.
1687 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1688 to build-aux/cross-options.pl.
1689 * src/getargs.c (usage): Document limitations of cross-options.pl.
1690 * src/scan-gram.l: Likewise.
1691
1692 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1693
1694 Fix unexpanded macros in GLR defines file.
1695 Reported by Csaba Raduly at
1696 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1697 * THANKS (Csaba Raduly): Add.
1698 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1699 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1700 lexer in a separate module that includes the defines file.
1701 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1702 source.
1703 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1704 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1705 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1706 (AT_DATA_SOURCE_PROLOGUE): New.
1707 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1708 (AT_DATA_SOURCE): New.
1709 (AT_FULL_COMPILE): Extend to support an additional source file.
1710
1711 2008-11-18 Akim Demaille <demaille@gostai.com>
1712
1713 More TODO.
1714 * TODO: More short term issues.
1715
1716 2008-11-18 Akim Demaille <demaille@gostai.com>
1717
1718 Regen.
1719 * src/parse-gram.h, src/parse-gram.c: Regen.
1720
1721 2008-11-18 Akim Demaille <demaille@gostai.com>
1722
1723 Use b4_subtract where possible.
1724 * data/lalr1.cc (b4_subtract): Move to...
1725 * data/bison.m4: here.
1726 * data/glr.c (b4_rhs_data): Use it.
1727 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1728
1729 2008-11-18 Akim Demaille <demaille@gostai.com>
1730
1731 Remove incorrect mode specification.
1732 * data/glr.cc: Don't pretend it's C code.
1733
1734 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1735
1736 Simplify last patch slightly.
1737 * src/getargs.c (getargs): Here.
1738
1739 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1740
1741 Fix last warning from --enable-gcc-warnings.
1742 * src/getargs.c (getargs): Don't assign const address to non-const
1743 pointer.
1744
1745 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1746
1747 Don't let maintainer-*-check targets force a version update.
1748 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1749 handled.
1750
1751 2008-11-17 Di-an Jan <dianj@freeshell.org>
1752
1753 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1754 Align menus. Adjust word wrapping. Use node names for menu names.
1755 (Examples): Don't abbreviate node names.
1756 (LocalWords): Remove abbreviations.
1757 (Copying): Make description a sentence.
1758 (Java Action Features): Remove period to match the rest of menu.
1759
1760 2008-11-17 Di-an Jan <dianj@freeshell.org>
1761
1762 Handles several --enable-gcc-warnings.
1763 * src/getargs.c (command_line_location): Set parameters to void.
1764 * src/output.c (symbol_type_name_cmp): Make static.
1765 (symbols_by_type_name): Set parameters to void.
1766 (symbol_definitions_output): Remove unused parameter. Rename as...
1767 (prepare_symbol_definitions): this.
1768 (muscles_output): Move symbol_definitions_output to...
1769 (output): here as prepare_symbol_definitions.
1770 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1771 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1772
1773 2008-11-17 Di-an Jan <dianj@freeshell.org>
1774
1775 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1776 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1777
1778 2008-11-16 Akim Demaille <demaille@gostai.com>
1779
1780 Add missing $(EXEEXT).
1781 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1782 "src/bison$(EXEEXT)".
1783 Reported by Di-an Jan.
1784
1785 2008-11-15 Akim Demaille <demaille@gostai.com>
1786
1787 * TODO: Update.
1788
1789 2008-11-15 Akim Demaille <demaille@gostai.com>
1790
1791 Formatting changes.
1792 * tests/input.at: here.
1793
1794 2008-11-15 Akim Demaille <demaille@gostai.com>
1795
1796 Remove duplicate header inclusion.
1797 * src/LR0.c: here.
1798
1799 2008-11-15 Akim Demaille <demaille@gostai.com>
1800
1801 * src/parse-gram.h, src/parse-gram.c: Regen.
1802
1803 2008-11-15 Akim Demaille <demaille@gostai.com>
1804
1805 Support parametric types.
1806
1807 There are two issues to handle: first scanning nested angle
1808 bracket pairs to support types such as std::pair< std::string,
1809 std::list<std::string> > >.
1810
1811 Another issue is to address idiosyncracies of C++: do not glue two
1812 closing angle brackets together (otherwise it's operator>>), and
1813 avoid sticking blindly a TYPE to the opening <, as it can result
1814 in '<:' which is a digraph for '['.
1815
1816 * src/scan-gram.l (brace_level): Rename as...
1817 (nesting): this.
1818 (SC_TAG): New.
1819 Implement support for complex tags.
1820 (tag): Accept
1821 , but not <.
1822 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1823 (b4_symbol_variant): Leave space around types as parameters.
1824 * examples/variant.yy: Use nested template types and leading ::.
1825 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1826 Rename as...
1827 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1828 * tests/c++.at: Test parametric types.
1829
1830 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1831
1832 Test token.prefix.
1833 This is not sufficient, but we test at least that the make_SYMBOL
1834 interface is not affected by token.prefix. A more general test
1835 will be implemented when the support of token.prefix is generalized
1836 to more skeletons.
1837
1838 * tests/c++.at: One more variant test, using token.prefix.
1839
1840 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1841
1842 Test the make_TOKEN interface.
1843 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1844 Factor the common code in yylex.
1845 Use it to test "%define lex_symbol".
1846
1847 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1848
1849 Formatting change.
1850
1851 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1852
1853 Simplify code for variants bench marks.
1854 * etc/bench.pl.in (&generate_grammar_list): Define and use
1855 location_type.
1856 Factor the common code in yylex.
1857
1858 2008-11-15 Akim Demaille <demaille@gostai.com>
1859
1860 Better error message.
1861 * bootstrap (find_tool): Fix the error message.
1862
1863 2008-11-15 Akim Demaille <demaille@gostai.com>
1864
1865 Update variant.yy to newest interface.
1866 * examples/variant.yy: Define lex_symbol.
1867 Adjust.
1868
1869 2008-11-15 Akim Demaille <demaille@gostai.com>
1870
1871 Don't use locations in variant.yy.
1872 * examples/variant.yy: Adjust to not using locations.
1873
1874 2008-11-15 Akim Demaille <demaille@gostai.com>
1875
1876 Comment changes.
1877 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1878 comments for the license.
1879
1880 2008-11-15 Akim Demaille <demaille@gostai.com>
1881
1882 Remove tests/Makefile.am.
1883 * tests/Makefile.am: Rename as...
1884 * tests/local.mk: this.
1885 * Makefile.am, configure.ac: Adjust.
1886 * Makefile.am (DISTCLEANFILES): Define.
1887 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1888 Remove, we no longer need to bounce to the real targets.
1889
1890 2008-11-15 Akim Demaille <demaille@gostai.com>
1891
1892 Comment changes.
1893
1894 2008-11-15 Akim Demaille <demaille@gostai.com>
1895
1896 djgpp/local.mk.
1897 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1898 * djgpp/local.mk: this new file.
1899
1900 2008-11-15 Akim Demaille <demaille@gostai.com>
1901
1902 Remove doc/Makefile.am.
1903 * doc/Makefile.am: Rename as...
1904 * doc/local.mk: this.
1905 Adjust paths
1906 * Makefile.am, configure.ac: Adjust.
1907 * Makefile.am (MOSTLYCLEANFILES): New.
1908 * src/local.mk: Adjust.
1909
1910 2008-11-15 Akim Demaille <demaille@gostai.com>
1911
1912 Move sc_tight_scope into maint.mk.
1913 It does not work, and I don't know how it was supposed to work: it
1914 seems to be looking for sources in the build tree. I just moved
1915 it at a better place, fixing it is still required.
1916
1917 * src/local.mk (echo): Remove.
1918 (sc_tight_scope): Move to...
1919 * maint.mk: here.
1920
1921 2008-11-15 Akim Demaille <demaille@gostai.com>
1922
1923 Regen.
1924 * src/parse-gram.h, src/parse-gram.h: Regen.
1925
1926 2008-11-15 Akim Demaille <demaille@gostai.com>
1927
1928 Remove src/Makefile.am.
1929 * src/Makefile.am: Rename as...
1930 * src/local.mk: this.
1931 Prefix all the paths with src/.
1932 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1933 (AM_CPPFLAGS): Find find in builddir/src.
1934 (YACC): Move the flags into...
1935 (AM_YFLAGS): here.
1936 * maint.mk (sc_tight_scope): Disable.
1937 It used to bounce to the version in src/Makefile.am which is now
1938 part of this very Makefile.
1939 * Makefile.am, configure.ac: Adjust.
1940 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1941 include "..." to find files "here": we are no longer in src/, so
1942 qualify the includes with src/.
1943 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1944 prefix.
1945 (.x.1): Adjust to be able to create src/foo from the top level
1946 Makefile, instead of going bounce to src/Makefile the creation of
1947 foo.
1948
1949 2008-11-15 Akim Demaille <demaille@gostai.com>
1950
1951 Remove useless variable.
1952 * doc/Makefile.am (srcsrcdir): Remove.
1953
1954 2008-11-15 Akim Demaille <demaille@gostai.com>
1955
1956 Remove data/Makefile.am.
1957 * data/Makefile.am: Rename as...
1958 * data/local.mk: this.
1959 Adjust paths.
1960 * Makefile.am, configure.ac: Adjust.
1961
1962 2008-11-15 Akim Demaille <demaille@gostai.com>
1963
1964 Remove etc/Makefile.am.
1965 * etc/Makefile.am: Rename as...
1966 * etc/local.mk: this.
1967 Adjust.
1968 * Makefile.am, configure.ac: Adjust.
1969
1970 2008-11-15 Akim Demaille <demaille@gostai.com>
1971
1972 Remove examples/local.mk.
1973 examples/calc++/Makefile.am might be interesting to keep as is, since
1974 it is an example in itself.
1975
1976 * examples/Makefile.am: Rename as...
1977 * examples/local.mk: this.
1978 Adjust.
1979 * Makefile.am, configure.ac: Adjust.
1980
1981 2008-11-15 Akim Demaille <demaille@gostai.com>
1982
1983 Remove build-aux/Makefile.am.
1984 Recursive Makefiles are really way too slow, let's get rid of some of
1985 them.
1986
1987 * build-aux/Makefile.am: Rename as...
1988 * build-aux/local.mk: this.
1989 Adjust paths.
1990 * Makefile.am, configure.ac: Adjust.
1991
1992 2008-11-15 Akim Demaille <demaille@gostai.com>
1993
1994 Provide convenience constructors for locations and positions.
1995 * data/location.cc (position::position): Accept file, line and
1996 column as arguments with default values.
1997 Always qualify initial line and column literals as unsigned.
1998 (location::location): Provide convenience constructors.
1999
2000 2008-11-15 Akim Demaille <demaille@gostai.com>
2001
2002 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2003 token type.
2004 Using template buys us nothing, and makes it uselessly complex to
2005 construct a symbol. Besides, it could not be generalized to other
2006 languages, while make_FOO would work in C/Java etc.
2007
2008 * data/lalr1.cc (b4_symbol_): New.
2009 (b4_symbol): Use it.
2010 (b4_symbol_constructor_declaration_)
2011 (b4_symbol_constructor_definition_): Instead of generating
2012 specializations of an overloaded template function, just generate
2013 several functions whose names are forged from the token names
2014 without the token.prefix.
2015 (b4_symbol_constructor_declarations): Generate them for all the
2016 symbols, not just by class of symbol type, now that instead of
2017 specializing a function template by the token, we generate a
2018 function named after the token.
2019 (b4_symbol_constructor_specialization_)
2020 (b4_symbol_constructor_specializations): Remove.
2021 * etc/bench.pl.in: Adjust to this new API.
2022
2023 2008-11-13 Akim Demaille <demaille@gostai.com>
2024
2025 %define token.prefix.
2026 Provide a means to add a prefix to the name of the tokens as
2027 output in the generated files. Because of name clashes, it is
2028 good to have such a prefix such as TOK_ that protects from names
2029 such as EOF, FILE etc. But it clutters the grammar itself.
2030
2031 * data/bison.m4 (token.prefix): Empty by default.
2032 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2033 * data/lalr1.cc (b4_symbol): Ditto.
2034
2035 2008-11-13 Akim Demaille <demaille@gostai.com>
2036
2037 Compute at M4 time some of the subtractions.
2038 * data/lalr1.cc (b4_subtract): New.
2039 (b4_rhs_data): Use it.
2040
2041 2008-11-13 Akim Demaille <demaille@gostai.com>
2042
2043 symbol::token.
2044 This allows the user to get the type of a token returned by yylex.
2045
2046 * data/lalr1.cc (symbol::token): New.
2047 (yytoknum_): Define when %define lex_symbol, independently of
2048 %debug.
2049 (yytoken_number_): Move into...
2050 (symbol::token): here, since that's the only use.
2051 The other one is YYPRINT which was not officially supported
2052 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2053 array under a different name (yytoknum).
2054
2055 2008-11-13 Akim Demaille <demaille@gostai.com>
2056
2057 YYERRCODE.
2058 * TODO (YYERRCODE): Mention the case of $undef.
2059
2060 2008-11-13 Akim Demaille <demaille@gostai.com>
2061
2062 TODO: YYPRINT.
2063 * TODO (YYPRINT): New.
2064
2065 2008-11-13 Akim Demaille <demaille@gostai.com>
2066
2067 Comment changes.
2068 * data/lalr1.cc, data/yacc.c: Fix the description of the
2069 yytranslate and yytoknum tables.
2070
2071 2008-11-13 Akim Demaille <demaille@gostai.com>
2072
2073 Define make_symbol in the header.
2074 To reach good performances these functions should be inlined (yet
2075 this is to measure precisely). To this end they must be available
2076 to the caller.
2077
2078 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2079 location_type with the class name.
2080 Since will now be output in the header, declare "inline".
2081 No longer use b4_symbol_constructor_specializations, but
2082 b4_symbol_constructor_definitions in the header.
2083 Don't call it in the *.cc file.
2084
2085 2008-11-13 Akim Demaille <demaille@gostai.com>
2086
2087 Define yytranslate in the header for lex_symbol.
2088 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2089 into the header file when using %define lex_symbol.
2090 (yytranslate_): Declare inline.
2091
2092 2008-11-13 Akim Demaille <demaille@gostai.com>
2093
2094 Define the constructors of symbol_type in
2095 b4_symbol_constructor_definitions.
2096 The constructors are called by the make_symbol functions, which a
2097 forthcoming patch will move elsewhere. Hence the interest of
2098 putting them together.
2099
2100 The stack_symbol_type does not need to be moved, it is used only
2101 by the parser.
2102
2103 * data/lalr1.cc: Move symbol_type and symbol_base_type
2104 constructors into...
2105 (b4_symbol_constructor_definitions): here.
2106 Adjust.
2107
2108 2008-11-13 Akim Demaille <demaille@gostai.com>
2109
2110 Make it easier to move the definition of yytranslate_.
2111 Forthcoming changes will make it possible to use yytranslate_
2112 from outside the parser implementation file.
2113
2114 * data/lalr1.cc (b4_yytranslate_definition): New.
2115 Use it.
2116
2117 2008-11-13 Akim Demaille <demaille@gostai.com>
2118
2119 Remove useless class specification.
2120 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2121 to refer to the class name to use a type defined by the class for
2122 arguments of member functions.
2123
2124 2008-11-13 Akim Demaille <demaille@gostai.com>
2125
2126 Finer input type for yytranslate.
2127 This patch is debatable: the tradition expects yylex to return an int
2128 which happens to correspond to token_number (which is an enum). This
2129 allows for instance to return characters (such as '*' etc.). But this
2130 goes against the stronger typing I am trying to have with the new
2131 lex interface which return a symbol_type. So in this case, feed
2132 yytranslate_ with a token_type.
2133
2134 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2135 expect a token_type.
2136
2137 2008-11-13 Akim Demaille <demaille@gostai.com>
2138
2139 Honor lex-params in %define lex_symbol mode.
2140 * data/lalr1.cc: Use b4_lex_param.
2141
2142 2008-11-13 Akim Demaille <demaille@gostai.com>
2143
2144 Simplify names.
2145 * src/output.c (symbol_definitions_output): Rename symbol
2146 attributes type_name and has_type_name as type and has_type.
2147 * data/lalr1.cc: Adjust uses.
2148
2149 2008-11-13 Akim Demaille <demaille@gostai.com>
2150
2151 Use b4_type_names for the union type.
2152 The union used to compute the size of the variant used to iterate
2153 over the type of all the symbols, with a lot of redundancy. Now
2154 iterate over the lists of symbols having the same type-name.
2155
2156 * data/lalr1.cc (b4_char_sizeof_): New.
2157 (b4_char_sizeof): Use it.
2158 Adjust to be called with a list of numbers instead of a single
2159 number.
2160 Adjust its caller for new-line issues.
2161
2162 2008-11-13 Akim Demaille <demaille@gostai.com>
2163
2164 Define the "identifier" of a symbol.
2165 Symbols may have several string representations, for instance if
2166 they have an alias. What I call its "id" is a string that can be
2167 used as an identifier. May not exist.
2168
2169 Currently the symbols which have the "tag_is_id" flag set are
2170 those that don't have an alias. Look harder for the id.
2171
2172 * src/output.c (is_identifier): Move to...
2173 * src/symtab.c (is_identifier): here.
2174 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2175 * src/output.c (symbol_definitions_output): Use it to define "id"
2176 and "has_id".
2177 Remove the definition of "tag_is_id".
2178 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2179 "tag_is_id" were used to produce code.
2180 We still use "tag" for documentation.
2181
2182 2008-11-11 Akim Demaille <demaille@gostai.com>
2183
2184 Locations are no longer required by lalr1.cc.
2185 * data/lalr1.cc (_b4_args, b4_args): New.
2186 Adjust all uses of locations to make them optional.
2187 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2188 (AT_CHECK_NAMESPACE): Check the use of locations.
2189 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2190 without locations with lalr1.cc.
2191 Test these cases.
2192 * tests/output.at: Check lalr1.cc with and without location
2193 support.
2194 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2195 Don't use locations.
2196
2197 2008-11-11 Akim Demaille <demaille@gostai.com>
2198
2199 AT_FULL_COMPILE.
2200 * tests/local.at (AT_FULL_COMPILE): New.
2201 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2202
2203 2008-11-11 Akim Demaille <demaille@gostai.com>
2204
2205 Support parens in calc++.
2206 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2207 * examples/calc++/test (run): Check the expected output.
2208 Adjust callers.
2209 Check parens too.
2210
2211 2008-11-11 Akim Demaille <demaille@gostai.com>
2212
2213 Simplify lalr1.cc since %defines is mandatory.
2214 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2215
2216 2008-11-11 Akim Demaille <demaille@gostai.com>
2217
2218 TODO: yyfmt.
2219 * TODO (yysyntax_error): New item.
2220
2221 2008-11-11 Akim Demaille <demaille@gostai.com>
2222
2223 Prefer M4 to CPP.
2224 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2225 YYERROR_VERBOSE.
2226
2227 2008-11-11 Akim Demaille <demaille@gostai.com>
2228
2229 Support i18n of the parse error messages.
2230 * TODO (lalr1.cc/I18n): Remove.
2231 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2232 error messages, as done in yacc.c.
2233 Stay within the yy* pseudo namespace.
2234
2235 2008-11-11 Akim Demaille <demaille@gostai.com>
2236
2237 More TODO.
2238 * TODO (single stack, yysyntax_error): New.
2239
2240 2008-11-11 Akim Demaille <demaille@gostai.com>
2241
2242 Make it possible to return a symbol_type from yylex.
2243 * data/lalr1.cc (b4_lex_symbol_if): New.
2244 (parse): When lex_symbol is defined, expected yylex to return the
2245 complete lookahead.
2246 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2247 yylex interface.
2248 (bench_variant_parser): Exercise it.
2249
2250 2008-11-11 Akim Demaille <demaille@gostai.com>
2251
2252 Remove useless bench case.
2253 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2254 no longer used.
2255
2256 2008-11-11 Akim Demaille <demaille@gostai.com>
2257
2258 Improve display of directives.
2259 * etc/bench.pl.in (parse_term): Don't add useless eol.
2260
2261 2008-11-11 Akim Demaille <demaille@gostai.com>
2262
2263 Use string_cast in the bench.
2264 * etc/bench.pl.in (generate_grammar_list): Define and use
2265 string_cast.
2266
2267 2008-11-11 Akim Demaille <demaille@gostai.com>
2268
2269 Replace yychar with a Boolean.
2270 * data/lalr1.cc (parse::yychar): Replace by...
2271 (parse::yyempty): this.
2272
2273 2008-11-11 Akim Demaille <demaille@gostai.com>
2274
2275 Factor the tables.
2276 * TODO: New item.
2277
2278 2008-11-11 Akim Demaille <demaille@gostai.com>
2279
2280 Let yytranslate handle the eof case.
2281 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2282 Adjust callers.
2283 No longer expect yychar to be equal to yyeof_, rather, test the
2284 lookahead's (translated) kind.
2285
2286 2008-11-11 Akim Demaille <demaille@gostai.com>
2287
2288 yychar cannot be empty in yyerrlab.
2289 * TODO (yychar == yyempty_): New.
2290 * data/lalr1.cc: Remove the handling of this case.
2291 This eases forthcoming changes related to yychar and yytranslate.
2292
2293 2008-11-11 Akim Demaille <demaille@gostai.com>
2294
2295 Bench: syntactic sugar for %define/#define.
2296 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2297 (&bench_push_parser, bench_variant_parser): Use this feature.
2298 (&eat): New.
2299 Use it.
2300
2301 2008-11-11 Akim Demaille <demaille@gostai.com>
2302
2303 Less memory pressure on the "list" bench.
2304 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2305 the values, to limit memory pressure.
2306
2307 2008-11-11 Akim Demaille <demaille@gostai.com>
2308
2309 Introduce make_symbol.
2310 make_symbol provides a means to construct a full symbol (kind,
2311 value, location) in a single shot. It is meant to be a Symbol
2312 constructor, parameterized by the symbol kind so that overloading
2313 would prevent incorrect kind/value pairs. Unfortunately
2314 parameterized constructors do not work well in C++ (unless the
2315 parameter also appears as an argument, which is not acceptable),
2316 hence the use of a function instead of a constructor.
2317
2318 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2319 (b4_symbol_constructor_declarations)
2320 (b4_symbol_constructor_specialization_)
2321 (b4_symbol_constructor_specializations)
2322 (b4_symbol_constructor_definition_)
2323 (b4_symbol_constructor_definitions): New.
2324 Use them where appropriate to generate declaration, declaration of
2325 the specializations, and implementations of the templated
2326 overloaded function "make_symbol".
2327 (variant::variant): Always define a default ctor.
2328 Also provide a copy ctor.
2329 (symbol_base_type, symbol_type): New ctor overloads for value-less
2330 symbols.
2331 (symbol_type): Now public, so that functions such as yylex can use
2332 it.
2333
2334 2008-11-11 Akim Demaille <demaille@gostai.com>
2335
2336 Inform m4 whether a tag is a valid id.
2337 * src/output.c (is_identifier): New.
2338 (symbol_definitions_output): Use it to define tag_is_id.
2339 But maybe this should be done at m4 level?
2340
2341 2008-11-11 Akim Demaille <demaille@gostai.com>
2342
2343 Test 214 was failing: it greps with a pattern containing [ ]*
2344 which obviously meant to catch spaces and tabs, but contained only
2345 spaces. Tabulations in sources are a nuisance, so to simplify the
2346 matter, get rid of all the tabulations in the Java sources. The
2347 other skeletons will be treated equally later.
2348
2349 * data/java.m4, data/lalr1.java: Untabify.
2350 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2351 tabulations are no longer generated.
2352
2353 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2354
2355 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2356 * configure.ac: Adjust usage.
2357 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2358 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2359 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2360
2361 2008-11-10 Di-an Jan <dianj@freeshell.org>
2362
2363 Workaround Java's ``code too large'' problem for parser tables
2364 in most cases, by using one function per initialization.
2365 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2366 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2367 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2368 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2369 (yytname_): Use b4_typed_parser_table.
2370 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2371 ``code too large'' error.
2372
2373 2008-11-10 Di-an Jan <dianj@freeshell.org>
2374
2375 * NEWS: Document them.
2376
2377 General Java skeleton improvements.
2378 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2379 using gcj < 4.3 in the testsuite, according to comments in
2380 gnulib/m4/javacomp.m4.
2381 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2382 location_type, position_type): Remove extraneous brackets from
2383 b4_percent_define_default.
2384 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2385 m4_define and m4_define_default.
2386 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2387 which marks the end of user code with appropriate syncline, like all
2388 the other skeletons.
2389 (b4_user_post_prologue): Add. Don't silently drop.
2390 (yylex): Remove.
2391 (parse): Inline yylex.
2392 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2393 (%{...%}): Fix typo of %code imports.
2394 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2395
2396 Support annotations on parser class with %define annotations.
2397 * data/lalr1.java (annotations): Add to parser class modifier.
2398 * doc/bison.texinfo (Java Parser Interface): Document
2399 %define annotations.
2400 (Java Declarations Summary): Document %define annotations.
2401 * tests/java.at (Java parser class modifiers): Test annotations.
2402
2403 Do not generate code for %error-verbose unless requested.
2404 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2405 Make private. Make conditional on %error-verbose.
2406 (getErrorVerbose, setErrorVerbose): New.
2407 (yytnamerr_): Make conditional on %error-verbose.
2408 (yysyntax_error): Make some code conditional on %error-verbose.
2409 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2410 about %error-verbose having no effect.
2411 (getErrorVerbose, setErrorVerbose): Document.
2412
2413 Move constants for token names to Lexer interface.
2414 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2415 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2416 (parse): Qualify EOF to Lexer.EOF.
2417 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2418 EOF and token names to Java Lexer Interface.
2419 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2420
2421 Make yyerror public.
2422 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2423 (yyerror): Change to public. Add Javadoc comments. Use longer
2424 parameter names. Make the body rather than the declarator
2425 conditional on %locations.
2426 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2427
2428 Allow user to add code to the constructor with %code init.
2429 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2430 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2431 Add %code init to the front of the constructor body.
2432 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2433 and %define init_throws.
2434 (Java Declarations Summary): Document %code init and
2435 %define init_throws.
2436 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2437 (Java constructor init and init_throws): Add tests.
2438
2439 2008-11-10 Akim Demaille <demaille@gostai.com>
2440
2441 Update TODO.
2442 * TODO (-D): is implemented.
2443 (associativity): Same precedence must have the same associativity.
2444 For instance, how can a * b / c be parsed if * is %left and / is
2445 %right?
2446 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2447
2448 2008-11-10 Akim Demaille <demaille@gostai.com>
2449
2450 Formatting changes.
2451
2452 2008-11-10 Akim Demaille <demaille@gostai.com>
2453
2454 More information about the symbols.
2455 * src/output.c (type_names_output): Document all the symbols,
2456 including those that don't have a type-name.
2457 (symbol_definitions_output): Define "is_token" and
2458 "has_type_name".
2459 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2460 type-name, now that they are defined too in b4_type_names.
2461
2462 2008-11-10 Akim Demaille <demaille@gostai.com>
2463
2464 Regen.
2465
2466 2008-11-10 Akim Demaille <demaille@gostai.com>
2467
2468 Make parser::yytranslate static.
2469 Small speedup (1%) on the list grammar. And makes yytranslate_
2470 available in non member functions.
2471
2472 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2473 function.
2474
2475 2008-11-10 Akim Demaille <demaille@gostai.com>
2476
2477 Avoid trailing spaces.
2478 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2479 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2480 they can be empty, and anyway this incorrectly indents the first
2481 action.
2482
2483 2008-11-10 Akim Demaille <demaille@gostai.com>
2484
2485 Comment changes.
2486
2487 2008-11-10 Akim Demaille <demaille@gostai.com>
2488
2489 Use "enum" for integral constants.
2490 This is just nicer to read, I observed no speedup.
2491
2492 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2493 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2494 (yyuser_token_number_max_, yyundef_token_): Move into...
2495 (yytranslate_): here.
2496
2497 2008-11-10 Akim Demaille <demaille@gostai.com>
2498
2499 Shortcuts in bench directives.
2500 * etc/bench.pl.in (parse_dirs): New.
2501 Use it.
2502 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2503 Create the benches in "benches/".
2504
2505 2008-11-10 Akim Demaille <demaille@gostai.com>
2506
2507 Formatting changes.
2508 * data/lalr1.cc: here.
2509
2510 2008-11-10 Akim Demaille <demaille@gostai.com>
2511
2512 Adjust verbose message to using emacs.
2513 * etc/bench.pl.in: Inform compilation-mode when we change the
2514 directory.
2515 (generate_grammar_list): Recognize %define "variant" in addition
2516 to %define variant.
2517
2518 2008-11-10 Akim Demaille <demaille@gostai.com>
2519
2520 Classify symbols by type-name.
2521 * src/uniqstr.h (UNIQSTR_CMP): New.
2522 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2523 (type_names_output): New.
2524 (muscles_output): Use it.
2525 * data/lalr1.cc (b4_symbol_action_): Remove.
2526 (b4_symbol_case_, b4_type_action_): New.
2527 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2528
2529 2008-11-10 Akim Demaille <demaille@gostai.com>
2530
2531 Change the handling of the symbols in the skeletons.
2532 Before we were using tables which lines were the symbols and which
2533 columns were things like number, tag, type-name etc. It is was
2534 difficult to extend: each time a column was added, all the numbers had
2535 to be updated (you asked for colon $2, not for "tag"). Also, it was
2536 hard to filter these tables when only a subset of the symbols (say the
2537 tokens, or the nterms, or the tokens that have and external number
2538 *and* a type-name) was of interest.
2539
2540 Now instead of monolithic tables, we define one macro per cell. For
2541 instance "b4_symbol(0, tag)" is a macro name which contents is
2542 self-decriptive. The macro "b4_symbol" provides easier access to
2543 these cells.
2544
2545 * src/output.c (type_names_output): Remove.
2546 (symbol_numbers_output, symbol_definitions_output): New.
2547 (muscles_output): Call them.
2548 (prepare_symbols): Define b4_symbols_number.
2549
2550 2008-11-10 Akim Demaille <demaille@gostai.com>
2551
2552 --trace=muscles
2553 * src/getargs.h, src/getargs.c (trace_muscle): New.
2554 (trace_types, trace_args): Support it.
2555 * src/output.c (output_skeleton): Use it.
2556
2557 2008-11-10 Akim Demaille <demaille@gostai.com>
2558
2559 muscles_output.
2560 * src/output.c (muscles_output): New, extracted from...
2561 (output_skeleton): here.
2562 Adjust.
2563
2564 2008-11-10 Akim Demaille <demaille@gostai.com>
2565
2566 Formatting changes.
2567
2568 2008-11-10 Akim Demaille <demaille@gostai.com>
2569
2570 Update the variant example.
2571 * examples/variant.yy: Formatting changes.
2572 One stage build.
2573
2574 2008-11-10 Akim Demaille <demaille@gostai.com>
2575
2576 Support constructor with an argument.
2577 This improves the "list" bench by 2%.
2578
2579 * data/lalr1.cc (variant::build): Add an overloaded version with
2580 an argument.
2581 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2582
2583 2008-11-10 Akim Demaille <demaille@gostai.com>
2584
2585 Test variants.
2586 * tests/c++.at (AT_CHECK_VARIANTS): New.
2587 Use it with and without %define assert.
2588
2589 2008-11-10 Akim Demaille <demaille@gostai.com>
2590
2591 Add %precedence support.
2592 Unfortunately it is not possible to reuse the %prec directive. This
2593 is because to please POSIX, we do not require to end the rules with a
2594 semicolon. As a result,
2595
2596 foo: bar %prec baz
2597
2598 is ambiguous: either a rule which precedence is that of baz, or a rule,
2599 and then a declaration of the precedence of the token baz.
2600
2601 * doc/bison.texinfo: Document %precedence.
2602 (Precedence Only): New.
2603 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2604 * src/conflicts.c (resolve_sr_conflict): Support it.
2605 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2606 Parse it.
2607 * tests/calc.at: Use %precedence for NEG.
2608 * tests/conflicts.at (%precedence does not suffice)
2609 (%precedence suffices): New tests.
2610
2611 2008-11-09 Akim Demaille <demaille@gostai.com>
2612
2613 Make benches in a sub dirs.
2614 * etc/bench.pl.in ($dir): New.
2615 Use it.
2616 Check the use of constructors with an argument.
2617 (bench_variant_parser): Fix.
2618
2619 2008-11-09 Akim Demaille <demaille@gostai.com>
2620
2621 fix eof condition
2622
2623 2008-11-09 Akim Demaille <demaille@gostai.com>
2624
2625 Fix --help.
2626
2627 2008-11-09 Akim Demaille <demaille@gostai.com>
2628
2629 Require the generation of parse-gram.output.
2630 * src/Makefile.am (YACC): Pass --report=all.
2631
2632 2008-11-09 Akim Demaille <demaille@gostai.com>
2633
2634 Formatting changes.
2635
2636 2008-11-09 Akim Demaille <demaille@gostai.com>
2637
2638 Update TODO.
2639 * TODO: Remove obsolete items.
2640 Update others.
2641
2642 2008-11-09 Akim Demaille <demaille@gostai.com>
2643
2644 Enhance bench.pl.
2645 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2646 (@token, $grammar, $bench): New.
2647 (generate_grammar_variant): Rename as...
2648 (generate_grammar_list): this.
2649 (generate_grammar): Adjust.
2650 (bench_grammar): Rename as...
2651 (bench): this.
2652 Use it in the various bench-marking routines.
2653 (-b, -g): New options.
2654
2655 2008-11-09 Akim Demaille <demaille@gostai.com>
2656
2657 Use a static hierarchy for symbols in the C++ parser.
2658 * data/lalr1.cc (symbol_base_type, symbol_type)
2659 (stack_symbol_type): Make it a static hierarchy.
2660 Adjust dependencies.
2661
2662 2008-11-09 Akim Demaille <demaille@gostai.com>
2663
2664 bench.pl -d, --directive.
2665 * etc/bench.pl.in (@directive): New.
2666 (&bench_grammar): Use it.
2667 (&bench_list_grammar): New, to provide access to the "variant"
2668 grammar.
2669 Use it.
2670 (getopts): Support -d, --directive.
2671
2672 2008-11-09 Akim Demaille <demaille@gostai.com>
2673
2674 Use inline for small operations.
2675 * data/lalr1.cc (symbol_base_type, symbol_type)
2676 (stack_symbol_type): Declare constructor and other operations as
2677 inline.
2678 (yy_destroy_): Inline.
2679
2680 2008-11-09 Akim Demaille <demaille@gostai.com>
2681
2682 Introduce a hierarchy for symbols.
2683 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2684 (data_type): Rename as...
2685 (stack_symbol_type): this.
2686 Derive from symbol_base_type.
2687 (yy_symbol_value_print_): Merge into...
2688 (yy_symbol_print_): this.
2689 Rename as...
2690 (yy_print_): this.
2691 (yydestruct_): Rename as...
2692 (yy_destroy_): this.
2693 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2694 (parser::parse): yyla is now of symbol_type.
2695 Use its type member instead of yytoken.
2696
2697 2008-11-09 Akim Demaille <demaille@gostai.com>
2698
2699 Rename data_type and stack_symbol_type.
2700 * data/lalr1.cc (data_type): Rename as...
2701 (stack_symbol_type): this.
2702
2703 2008-11-09 Akim Demaille <demaille@gostai.com>
2704
2705 Handle semantic value and location together.
2706 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2707 yydata.value and yydata.location.
2708 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2709 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2710 single arg.
2711 Adjust all callers.
2712 (yydestruct_): New overload for a stack symbol.
2713
2714 2008-11-09 Akim Demaille <demaille@gostai.com>
2715
2716 Push a complete symbol, not connected parts.
2717 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2718 state, value and location.
2719 Adjust callers.
2720
2721 2008-11-09 Akim Demaille <demaille@gostai.com>
2722
2723 Agregate yylval and yylloc.
2724 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2725 (parser::yyla): this.
2726
2727 2008-11-09 Akim Demaille <demaille@gostai.com>
2728
2729 Rely on the state stack to display reduction traces.
2730 To display rhs symbols before a reduction, we used information
2731 about the rule reduced, which required the tables yyrhs and
2732 yyprhs. Now use rely only on the state stack to get the same
2733 information.
2734
2735 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2736 Use them.
2737 (parser::yyrhs_, parser::yyprhs_): Remove.
2738 (parser::yy_reduce_print_): Use the state stack.
2739
2740 2008-11-09 Akim Demaille <demaille@gostai.com>
2741
2742 Fuse yyval and yyloc into yylhs.
2743 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2744 yylhs.
2745 (parse): Replace yyval and yyloc with yylhs.value and
2746 yylhs.location.
2747 After a user action, compute yylhs.state earlier.
2748 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2749 fresh error_token.
2750
2751 2008-11-09 Di-an Jan <dianj@freeshell.org>
2752
2753 Remove unused variable.
2754 * src/output.c (type_names_output): Remove unused variable sep.
2755
2756 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2757
2758 Change tests/output.at quoting.
2759 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2760 expanding arguments.
2761
2762 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2763
2764 Don't add a semicolon to actions for %skeleton or %language.
2765 It breaks Java test cases as reported by Akim Demaille.
2766 * src/scan-code.l: Implement.
2767
2768 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2769
2770 Clean up %skeleton and %language priority implementation.
2771 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2772 remove static qualifier because others will soon need to see it.
2773 (language_prio): Likewise.
2774 (getargs): Use command_line_prio rather than 0.
2775 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2776 enum fields.
2777 (skeleton_prio): Extern it.
2778 (language_prio): Extern it.
2779 * src/parse-gram.y: Use grammar_prio rather than 1.
2780
2781 2008-11-07 Akim Demaille <demaille@gostai.com>
2782
2783 Moving push traces into yypush_.
2784 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2785 Adjust all uses.
2786
2787 2008-11-07 Akim Demaille <demaille@gostai.com>
2788
2789 The single-stack C++ parser is now the standard one.
2790 * data/lalr1.cc: Rename as...
2791 * data/lalr1-split.cc: this.
2792 * data/lalr1-fusion.cc: Rename as...
2793 * data/lalr1.cc: this.
2794 * etc/bench.pl.in: Adjust.
2795
2796 2008-11-07 Akim Demaille <demaille@gostai.com>
2797
2798 Avoid empty-if warnings.
2799 Reported by Quentin Hocquet.
2800
2801 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2802 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2803
2804 2008-11-07 Akim Demaille <demaille@gostai.com>
2805
2806 Pass command line location to skeleton_arg and language_argmatch.
2807 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2808 The location argument is now mandatory.
2809 Adjust all dependencies.
2810 (getargs): Use command_line_location.
2811
2812 2008-11-07 Akim Demaille <demaille@gostai.com>
2813
2814 -D, --define.
2815 * src/getargs.c (usage): Document -D.
2816 Fix help string for --locations.
2817 (command_line_location): New.
2818 (short_options, long_options, getargs): Support -D, --define.
2819 (getargs): Move -d support at the right place.
2820 * doc/bison.texinfo (Bison Options): Update.
2821 * tests/input.at (%define, --define): New.
2822
2823 2008-11-07 Akim Demaille <demaille@gostai.com>
2824
2825 Initialize the muscle table before parsing the command line.
2826 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2827 (getargs): Define file_name.
2828 * src/main.c (main): Initialize muscle_tab before calling
2829 getargs.
2830 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2831 its value is not available yet.
2832
2833 2008-11-07 Akim Demaille <demaille@gostai.com>
2834
2835 Locations without columns for command line arguments.
2836 * src/location.c (location_print): Don't display negative columns.
2837 * src/location.h: Document this.
2838
2839 2008-11-07 Akim Demaille <demaille@gostai.com>
2840
2841 Fix --help.
2842 * src/getargs.c (usage): Fix help string for -W.
2843
2844 2008-11-07 Akim Demaille <demaille@gostai.com>
2845
2846 Handle more general types of option arguments.
2847 * build-aux/cross-options.pl: The argument ends at the first
2848 space, not the first non-symbol character.
2849 Use @var for each word appearing the argument description.
2850
2851 2008-11-07 Akim Demaille <demaille@gostai.com>
2852
2853 Destroy the variants that remain on the stack in case of error.
2854 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2855 destructor.
2856 Display the value only if yymsg is nonnull.
2857 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2858
2859 2008-11-07 Akim Demaille <demaille@gostai.com>
2860
2861 Add "%define assert" to variants.
2862 This is used to help the user catch cases where some value gets
2863 ovewritten by a new one. This should not happen, as this will
2864 probably leak.
2865
2866 Unfortunately this uncovered a bug in the C++ parser itself: the
2867 lookahead value was not destroyed between two calls to yylex. For
2868 instance if the previous lookahead was a std::string, and then an int,
2869 then the value of the std::string was correctly taken (i.e., the
2870 lookahead was now an empty string), but std::string structure itself
2871 was not reclaimed.
2872
2873 This is now done in variant::build(other&) (which is used to take the
2874 value of the lookahead): other is not only stolen from its value, it
2875 is also destroyed. This incurs a new performance penalty of a few
2876 percent, and union becomes faster again.
2877
2878 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2879 (b4_variant_if): New.
2880 (variant::built): New.
2881 Use it whereever the status of the variant changes.
2882 * etc/bench.pl.in: Check the penalty of %define assert.
2883
2884 2008-11-07 Akim Demaille <demaille@gostai.com>
2885
2886 Use "%define variant" in bench.pl.
2887 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2888 just use %define variants.
2889
2890 2008-11-07 Akim Demaille <demaille@gostai.com>
2891
2892 Regen.
2893 * src/parse-gram.h, src/parse-gram.c: Regen.
2894
2895 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2896
2897 Fix user actions without a trailing semicolon.
2898 Reported by Sergei Steshenko at
2899 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2900 * THANKS (Sergei Steshenko): Add.
2901 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2902 * tests/regression.at (Fix user actions without a trailing semicolon):
2903 New test case.
2904
2905 2008-11-04 Akim Demaille <demaille@gostai.com>
2906
2907 Use b4_copyright_years.
2908 * data/yacc.c (b4_copyright_years): New.
2909 Fix its value according to the comments in the file.
2910 Use it and undefine it.
2911
2912 2008-11-04 Akim Demaille <demaille@gostai.com>
2913
2914 Formatting changes.
2915 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2916
2917 2008-11-04 Akim Demaille <demaille@gostai.com>
2918
2919 Formatting changes.
2920 * data/lalr1-fusion.cc: here.
2921
2922 2008-11-04 Akim Demaille <demaille@gostai.com>
2923
2924 Use strict on bench.pl.
2925 * etc/bench.pl.in (&run, &generate_grammar): New.
2926 Rename the grammar generating functions for consistency.
2927 Change the interface so that the list of benches to run is passed
2928 as (optionless) arguments.
2929 (&compile): Use &run.
2930
2931 2008-11-04 Akim Demaille <demaille@gostai.com>
2932
2933 Remove spurious initial empty lines.
2934 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2935 * data/yacc.c: End the @output lines with an @.
2936
2937 2008-11-04 Akim Demaille <demaille@gostai.com>
2938
2939 Improve the display of sizes.
2940 * etc/bench.p.in: Higher precision.
2941 Sort by decreasing size.
2942
2943 2008-11-04 Akim Demaille <demaille@gostai.com>
2944
2945 Don't memcpy C++ structures.
2946 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2947 arguments.
2948 (variant::build): New overload for
2949 copy-construction-that-destroys.
2950 (variant::swap): New.
2951 (parser::yypush_): Use it in variant mode.
2952
2953 2008-11-04 Akim Demaille <demaille@gostai.com>
2954
2955 Better defaults for bench.pl.
2956 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2957 default values.
2958 Adjust &verbose uses.
2959 (-q, --quiet): New.
2960
2961 2008-11-04 Akim Demaille <demaille@gostai.com>
2962
2963 Make variant.yy more complex.
2964 std::list cannot be copied via memcpy, they are more demanding than
2965 std::string. Use one std::list to strengthen the test.
2966
2967 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2968 Adjust.
2969 Create a list of strings, instead of a single large string.
2970
2971 2008-11-04 Akim Demaille <demaille@gostai.com>
2972
2973 bench.pl --bench.
2974 * etc/bench.pl.in (--bench, $bench): New.
2975
2976 2008-11-04 Akim Demaille <demaille@gostai.com>
2977
2978 Sort methods.
2979 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2980 Define it after as().
2981
2982 2008-11-04 Akim Demaille <demaille@gostai.com>
2983
2984 Useless parens.
2985 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2986
2987 2008-11-04 Akim Demaille <demaille@gostai.com>
2988
2989 Issue missing synclines after user actions.
2990 * data/c.m4 (b4_case): Issue synclines on the output file.
2991
2992 2008-11-04 Akim Demaille <demaille@gostai.com>
2993
2994 Remove trailing empty line.
2995 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2996 epilogue.
2997
2998 2008-11-04 Akim Demaille <demaille@gostai.com>
2999
3000 Fix output of copyright years.
3001 * data/bison.m4 (b4_copyright): Fix the indentation of the
3002 copyright year paragraph.
3003 Use b4_copyright_years when no years are given.
3004 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3005 (b4_copyright_years): New.
3006 Use it.
3007
3008 2008-11-04 Akim Demaille <demaille@gostai.com>
3009
3010 Avoid the spurious initial empty line.
3011 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3012 the end of @output request to suppress the empty line that
3013 results.
3014
3015 2008-11-04 Akim Demaille <demaille@gostai.com>
3016
3017 Remove parser::rhs_number_type.
3018 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3019 (yyrhs_): Use b4_table_define.
3020
3021 2008-11-04 Akim Demaille <demaille@gostai.com>
3022
3023 Fix iteration type.
3024 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3025
3026 2008-11-04 Akim Demaille <demaille@gostai.com>
3027
3028 Factor the declaration of the integer tables.
3029 * data/lalr1-fusion.cc (b4_table_define): New.
3030 Use it.
3031
3032 2008-11-03 Akim Demaille <demaille@gostai.com>
3033
3034 Fix indentation of tables in lalr1.cc
3035 * data/lalr1-fusion.cc: Fix the indentation.
3036
3037 2008-11-03 Akim Demaille <demaille@gostai.com>
3038
3039 Destroy the lhs symbols after reduction.
3040 * data/lalr1-fusion.cc (parse): After the user action, when in
3041 variant mode, destroy the lhs symbols.
3042
3043 2008-11-03 Akim Demaille <demaille@gostai.com>
3044
3045 Simplify yysyntax_error_ use.
3046 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3047 type, but make it unnamed in the declaration when it is not used.
3048
3049 2008-11-03 Akim Demaille <demaille@gostai.com>
3050
3051 Let yy::variant::build return an lvalue.
3052 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3053 object.
3054
3055 2008-11-03 Akim Demaille <demaille@gostai.com>
3056
3057 Define yy::variant only when needed.
3058 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3059 used.
3060
3061 2008-11-03 Akim Demaille <demaille@gostai.com>
3062
3063 Bench the three-stack lalr1.cc.
3064 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3065 one-stack one.
3066
3067 2008-11-03 Akim Demaille <demaille@gostai.com>
3068
3069 Fail on parse error in calc++.
3070 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3071 status.
3072 * examples/calc++/test ($me, $number, $exit, run): New.
3073 Use them to propagate errors to the exit status.
3074
3075 2008-11-03 Akim Demaille <demaille@gostai.com>
3076
3077 Don't specify the skeleton twice in the example.
3078 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3079 file does what is needed.
3080
3081 2008-11-03 Akim Demaille <demaille@gostai.com>
3082
3083 bench: Improve output.
3084 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3085
3086 2008-11-03 Akim Demaille <demaille@gostai.com>
3087
3088 bench: check impact of %debug on variants.
3089 * etc/bench.pl.in (variant_grammar): Fix the computation of
3090 $variant.
3091 Generate a grammar file that can work with or without %debug.
3092 Do use the @directive.
3093 (bench_variant_parser): Check impact of %debug.
3094 (@directives): Rename all the occurrences to...
3095 (@directive): this, for consistency.
3096
3097 2008-11-03 Akim Demaille <demaille@gostai.com>
3098
3099 bench: report the size too.
3100 * etc/bench.pl.in ($iterations): Defaults to -3.
3101 (&bench_grammar): Require hireswallclock.
3102 Compute and display the size of the result.
3103 More comments.
3104
3105 2008-11-03 Akim Demaille <demaille@gostai.com>
3106
3107 bench: More use of the verbosity level.
3108 * etc/bench.pl.in ($verbose, &verbose): New.
3109 Use them.
3110 More POD documentation.
3111
3112 2008-11-03 Akim Demaille <demaille@gostai.com>
3113
3114 bench.pl: a command line interface
3115 * etc/bench.pl.in: More doc.
3116 Some fixes in the documentation.
3117 ($cflags, $iterations, &help, &getopt): New.
3118 Use them.
3119 (&variant_grammar): Let the number of stages be 10 times what is
3120 specified.
3121
3122 2008-11-03 Akim Demaille <demaille@gostai.com>
3123
3124 Bench the use of Boost.Variants.
3125 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3126 New.
3127 (&compile): Be ready to compile C++ parsers.
3128 (&bench_push_parser): Move debug information to the outermost
3129 level.
3130 * THANKS: Add Michiel De Wilde.
3131
3132 2008-11-03 Akim Demaille <demaille@gostai.com>
3133
3134 bench.pl: Pass directives as a list instead of as a string.
3135 * etc/bench.pl.in (&directives): New.
3136 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3137 directives.
3138 (&triangular_grammar): Do use the directives (were ignored).
3139 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3140 directives.
3141
3142 2008-11-03 Akim Demaille <demaille@gostai.com>
3143
3144 Improve genericity of bench.pl.
3145 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3146 argument.
3147 (&bench_push_parser): New.
3148 Call it.
3149
3150 2008-11-03 Akim Demaille <demaille@gostai.com>
3151
3152 Add documentation to bench.pl.
3153 * etc/bench.pl.in: Comment changes.
3154
3155 2008-11-03 Akim Demaille <demaille@gostai.com>
3156
3157 Fuse the three stacks into a single one.
3158
3159 In order to make it easy to perform benchmarks to ensure that
3160 there are no performance loss, lalr1.cc is forked into
3161 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3162 lalr1.cc.
3163
3164 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3165 exercized by the test suite, the user must install a symbolic link
3166 from lalr1.cc to it.
3167
3168 Instead of having three stacks (state, value, location), use a
3169 stack of triples. This considerably simplifies the code (and it
3170 will be easier not to require locations as currently does the C++
3171 parser), and also gives a 10% speedup according to
3172 etc/bench (probably mainly since memory allocation is done once
3173 instead of three times).
3174
3175 Another motivation is to make it easier to destruct properly
3176 semantic values: now that they are bound to their state (hence
3177 symbol type) it will be easier to call the appropriate destructor.
3178
3179 These changes should probably benefit the C parser too.
3180
3181 * data/lalr1.cc: Copy as...
3182 * data/lalr1-fusion.cc: this new file.
3183 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3184 from c++.m4.
3185 (state_stack_type, semantic_stack_type, location_stack_type)
3186 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3187 (data_type, stack_type, yystack_): New.
3188 (YYLLOC_DEFAULT, yypush_): Adjust.
3189 (yyerror_range): Now based on data_type, not location_type.
3190
3191 2008-11-03 Akim Demaille <demaille@gostai.com>
3192
3193 Push the state, value, and location at the same time.
3194 This is needed to prepare a forthcoming patch that fuses the three
3195 stacks into one.
3196
3197 * data/lalr1.cc (parser::yypush_): New.
3198 (parser::yynewstate): Change the semantics: instead of arriving to
3199 this label when value and location have been pushed, but yystate
3200 is to be pushed on the state stack, now the three of them must
3201 have been pushed before. yystate still must be the new state.
3202 This allows to use yypush_ everywhere instead of individual
3203 handling of the stacks.
3204
3205 2008-11-03 Akim Demaille <demaille@gostai.com>
3206
3207 Prefer references to pointers.
3208 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3209 definition to use references instead of pointers.
3210 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3211 Take the value and location as references.
3212 Adjust callers.
3213
3214 2008-11-03 Akim Demaille <demaille@gostai.com>
3215
3216 stack::size instead of stack::height.
3217 * data/lalr1.cc (stack::height): Rename as...
3218 (stack::size): this.
3219 Fix the output type.
3220 Comment changes.
3221
3222 2008-11-03 Akim Demaille <demaille@gostai.com>
3223
3224 Use variants to support objects as semantic values.
3225 This patch was inspired by work by Michiel De Wilde. But he used
3226 Boost variants which (i) requires Boost on the user side, (ii) is
3227 slow, and (iii) has useless overhead (the parser knows the type of
3228 the semantic value there is no reason to duplicate this
3229 information as Boost.Variants do).
3230
3231 This implementation reserves a buffer large enough to store the
3232 largest objects. yy::variant implements this buffer. It was
3233 implemented with Quentin Hocquet.
3234
3235 * src/output.c (type_names_output): New.
3236 (output_skeleton): Invoke it.
3237 * data/c++.m4 (b4_variant_if): New.
3238 (b4_symbol_value): If needed, provide a definition for variants.
3239 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3240 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3241 (b4_char_sizeof, yy::variant): New.
3242 (parser::parse): If variants are requested, define
3243 parser::union_type, parser::variant, change the definition of
3244 semantic_type, construct $$ before running the user action instead
3245 of performing a default $$ = $1.
3246 * examples/variant.yy: New.
3247 Based on an example by Michiel De Wilde.
3248
3249 2008-11-03 Akim Demaille <demaille@gostai.com>
3250
3251 Parameterize the extraction of semantic values.
3252 To make future changes easier, no longer rely on ".TYPE" being the
3253 way to get a semantic value.
3254
3255 * data/c.m4 (b4_symbol_value): New.
3256 Use it.
3257 * data/c++.m4, data/yacc.c: Use it.
3258 * data/glr.c: Use b4_symbol_value.
3259 (b4_rhs_data): New.
3260 Use it.
3261
3262 2008-11-03 Akim Demaille <demaille@gostai.com>
3263
3264 Prepare easier M4 changes.
3265 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3266 future changes.
3267
3268 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3269
3270 Initiate further development.
3271 * NEWS: Create an empty section for new entries.
3272 * gnulib: Update submodule to HEAD.
3273
3274 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3275
3276 * NEWS: Version 2.4.
3277
3278 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3279
3280 Prepare for next release.
3281 * NEWS: Briefly mention changes since 2.3b.
3282 * README: Say GNU m4 1.4.6, which we've been requiring in release
3283 announcements already, not 1.4.3, which breaks the build.
3284
3285 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3286
3287 Say %language is experimental.
3288 We're thinking of extending it's effect on output file naming. See the
3289 thread at
3290 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3291 * NEWS: Say it's experimental.
3292 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3293 recommend it over %skeleton for now.
3294 (Bison Options): Likewise.
3295 (C++ Bison Interface): Use %skeleton not %language.
3296 (Calc++ Parser): Use %skeleton not %language.
3297 * src/getargs.c (usage): Say it's experimental.
3298
3299 2008-11-01 Di-an Jan <dianj@freeshell.org>
3300 Paolo Bonzini <bonzini@gnu.org>
3301
3302 Support all Java parser class modifiers.
3303 * data/java.m4 (b4_percent_define_get3): New.
3304 (b4_final_if, b4_strictfp_if): New.
3305 * data/lalr1.java (final, strictfp, extends, implements): Support.
3306 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3307 documentation.
3308 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3309 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3310 (AT_CHECK_JAVA_GREP): New.
3311 (Java parser class modifiers): New test.
3312 (Java parser class extends and implements): New test.
3313
3314 Model exception propagation better with throws and lex_throws.
3315 * data/java.m4 (b4_list2): New.
3316 (throws): Change default.
3317 * data/lalr1.java (yyaction): Add throws.
3318 (parse): Add lex_throws in addition to throws.
3319 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3320 * tests/java.at (Java throws specifications): New test.
3321
3322 Improve documentation for Java parsers.
3323 * doc/bison.texinfo (Java Parsers): Add subsections.
3324 Don't quote first argument of %define.
3325 (Java Bison Interface): Document output files. Move documentation
3326 of parser class and merge into Java Parser Interface. Document
3327 features that error out. Document directives with no effect.
3328 Move note about Javadoc higher.
3329 (Java Semantic Values): Explicitly mention stype.
3330 Document that generic types cannot be used.
3331 (Java Location Values): Use @deftypeivar. Document constructors.
3332 Correct return value for toString.
3333 (Java Parser Interface): List undocumented constants/fields.
3334 Move documentation of fields added by %parse-param closer to list
3335 of members. Document that token names are added as fields.
3336 Document constructors accurately. Remove error method.
3337 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3338 Interface. Describe %code lexer and yylex accutately.
3339 Remove documentation that does not match the code.
3340 (Java Action Features): New.
3341 (Java Differences): Add reference. Add item on semantic values.
3342 Add note about @{ ... @}. Clarify %% epilogue placement.
3343 (Java Declarations Summary): New.
3344
3345 Fix Java skeleton.
3346 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3347 (b4_remove_comma): Quote test argument.
3348 (b4_identification): Remove "bison" field.
3349 * tests/java.at (Java parser class and package names): New test.
3350 (Java %parse-param and %lex-param): New test.
3351 (Java stype, position_class and location_class): New test.
3352
3353 2008-10-31 Di-an Jan <dianj@freeshell.org>
3354
3355 * data/lalr1.jave: Update copyright years.
3356 (YYParser): Correct name of "generated from" file in Javadoc:
3357 use b4_file_name instead of @ofile@.
3358 (Location constructor): Correct Javadoc parameter name.
3359 (yylloc): Add missing opening m4 quote after b4_location_if.
3360 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3361 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3362 (YYParser constructor): Correct Javadoc parameter name.
3363
3364 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3365
3366 Always put auxiliary code files in the same dir as other output files.
3367 * src/files.c (compute_file_name_parts): When the user specifies
3368 --output but not --file-prefix, extract the directory prefix from the
3369 file prefix not from the grammar file name. This affects the location
3370 of files like location.hh generated by the C++ skeleton. The includes
3371 in the other output files require this fix.
3372 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3373 for expected output files.
3374 (Output files): Add a test for the above.
3375
3376 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3377
3378 * gnulib: Update submodule to HEAD.
3379
3380 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3381
3382 Update copyright year.
3383 * src/files.c: Here.
3384
3385 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3386
3387 Don't overwrite the input file.
3388 * src/files.c (output_file_name_check): Fatal error if using input file
3389 for output.
3390 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3391 argument.
3392 (Conflicting output files): Add test.
3393
3394 2008-10-28 Akim Demaille <demaille@gostai.com>
3395
3396 Space changes.
3397 * data/lalr1.cc: Formatting changes.
3398
3399 2008-10-28 Akim Demaille <demaille@gostai.com>
3400
3401 Don't define debugging functions when !YYDEBUG.
3402 * data/lalr1.cc (debug_stream, set_debug_stream)
3403 (debug_level_type, debug_level, set_debug_level): Don't
3404 declare them when YYDEBUG is not defined.
3405 The implementation are already YYDEBUG-aware.
3406
3407 2008-10-28 Akim Demaille <demaille@gostai.com>
3408
3409 Prefer "continue" for empty loop bodies.
3410 * etc/bench.pl.in: Use "continue" instead of {}.
3411
3412 2008-10-28 Akim Demaille <demaille@gostai.com>
3413
3414 Space and comments changes.
3415 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3416 * data/c.m4, data/lalr1.cc: Space changes.
3417
3418 2008-10-28 Akim Demaille <demaille@gostai.com>
3419
3420 Make gnulib a submodule.
3421 * gnulib: New.
3422 * .gitmodules (gnulib): New.
3423
3424 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3425
3426 Fix yyerror_range for user-defined location type in C++. Reported by
3427 Georg Sauthoff at
3428 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3429 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3430 * THANKS (Georg Sauthoff): Add.
3431
3432 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3433
3434 Update several administrative files mainly to facilitate releasing.
3435 * HACKING (Administrivia): Make the git-merge-changelog notes more
3436 helpful.
3437 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3438 (Release Procedure): Update for git and add numerous details that were
3439 previously missing.
3440 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3441 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3442 that announcements don't claim we bootstrapped with whatever bison
3443 happened to be in PATH. Add flex as a bootstrap tool.
3444 * Makefile.maint: Remove, previously replaced by maint.mk.
3445 * Makefile.cfg: Remove, and migrate settings to...
3446 * cfg.mk: ... here for the sake of `make announcement'.
3447 * bootstrap.conf (gnulib_modules): Add announce-gen.
3448 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3449 Berry.
3450
3451 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3452
3453 Small but important bugfixes for the Java skeleton.
3454 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3455 (yy_symbol_print): Call toString on yyvaluep.
3456
3457 2008-08-29 Akim Demaille <demaille@gostai.com>
3458
3459 Clarify UPDATED use.
3460 * doc/bison.texinfo: It refers to the last edition of this file,
3461 not to the release date of Bison.
3462 Reported by Joel E. Denny.
3463
3464 2008-08-29 Akim Demaille <demaille@gostai.com>
3465
3466 * README: Update FAQ pointer.
3467 Reported by Joel E. Denny.
3468
3469 2008-08-27 Eric Blake <ebb9@byu.net>
3470
3471 Resync m4sugar from autoconf.
3472 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3473 (m4_init): Adjust to latest m4.git changes.
3474 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3475 effects.
3476 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3477 (_m4_list_cmp): Reduce side effects.
3478
3479 2008-08-27 Akim Demaille <demaille@gostai.com>
3480
3481 Check yyerrok in calc.at.
3482 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3483 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3484 expected.
3485
3486 2008-08-27 Akim Demaille <demaille@gostai.com>
3487
3488 Support yyerrok in lalr1.cc.
3489 YYBACKUP is still to import back into lalr1.cc.
3490 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3491
3492 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3493
3494 For maintainer-check*, don't recompile for a $(VERSION) update.
3495 * cfg.mk: New file.
3496 (_is-dist-target): Override the one in GNUmakefile.
3497 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3498
3499 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3500
3501 Update for recent change to gnulib.
3502 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3503 string.h now.
3504
3505 2008-08-15 Eric Blake <ebb9@byu.net>
3506
3507 Remaining m4sugar merge from autoconf.
3508 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3509 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3510 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3511 * src/output.c (output_skeleton): Tell m4 how to find it.
3512
3513 Partial m4sugar merge from autoconf: m4_map.
3514 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3515 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3516 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3517 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3518 for empty list.
3519 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3520 Likewise.
3521 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3522 declares it.
3523
3524 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3525
3526 Keep .version and PACKAGE_VERSION in sync.
3527 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3528 dependency, and add comments justifying this in more detail. Discussed
3529 starting at
3530 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3531
3532 2008-08-06 Eric Blake <ebb9@byu.net>
3533
3534 Partial m4sugar merge from autoconf: m4_shiftn.
3535 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3536 (m4_shift2, m4_shift3): New macros.
3537 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3538 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3539 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3540 * data/java.m4 (b4_remove_comma): Likewise.
3541
3542 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3543 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3544 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3545 (m4_init): Consolidate wrapped text into single m4_wrap.
3546 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3547 in wrapped text.
3548
3549 2008-08-05 Eric Blake <ebb9@byu.net>
3550
3551 Partial m4sugar merge from autoconf: builtins, version.m4.
3552 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3553 (m4_prepend): Remove, as it is unused and inherently quadratic,
3554 whereas m4_append is linear in newer m4.
3555 (m4_mkstemp): New builtin.
3556 (m4_symbols): Make rename conditional.
3557 (m4_version_prereq): Ensure fatal error if used in bison, which
3558 intentionally lacks version.m4.
3559
3560 Fix comments in m4sugar.
3561 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3562
3563 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3564
3565 Update for recent .gitignore fix in Gnulib.
3566 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3567 anchored .gitignore entries.
3568
3569 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3570
3571 Set gnu or gnits strictness.
3572 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3573 development and gnits strictness for releases. Based on Eric Blake's
3574 suggestion at
3575 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3576
3577 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3578
3579 * NEWS: Clarify documentation of %language.
3580
3581 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3582
3583 Support usage of git-merge-changelog.
3584 * .gitattributes: New.
3585 * HACKING: Document usage of git-merge-changelog.
3586 * bootstrap: Install git-merge-changelog entries in .git/config
3587 if appropriate.
3588
3589 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3590
3591 Remove remaining dependence on CVS Id keyword.
3592 * ChangeLog: For the sake of people still using CVS, don't use dollars
3593 when mentioning Id.
3594 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3595 unusual anyway.
3596 * data/xslt/xml2dot.xsl: Likewise.
3597 * data/xslt/xml2text.xsl: Likewise.
3598 * data/xslt/xml2xhtml.xsl: Likewise.
3599 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3600 * doc/Makefile.am (neutralize): Remove, no longer needed.
3601 (.x.1): Don't use neutralize.
3602 (edit): Don't substitute for ID.
3603 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3604
3605 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3606
3607 Fix dependence on computed configure variables.
3608 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3609 $(top_srcdir)/configure.ac so that changes to computed variables, such
3610 as PACKAGE_VERSION, are seen.
3611 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3612
3613 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3614
3615 Update copyright dates for recent changes.
3616 * Makefile.am: Here.
3617 * src/Makefile.am: Here.
3618 * src/reduce.c: Here.
3619 * tests/reduce.at: Here.
3620
3621 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3622
3623 Use git-version-gen for version names between releases.
3624 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3625 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3626 * .prev-version: New.
3627 * .version.in: Remove.
3628 * ChangeLog: Remove the Id previously used for capturing the CVS
3629 revision.
3630 * GNUmakefile: Remove, now copied from Gnulib.
3631 * Makefile.am: Add code suggested by comments in
3632 build-aux/git-version-gen.
3633 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3634 .prev-version, and .version.
3635 * NEWS (2.3b+): Rename to...
3636 (?.?): ... this because we're dropping the "+" version naming scheme,
3637 but, in general, we still can't be sure of our next release name.
3638 * bootstrap: Add a quick hack to remove from .gitignore the
3639 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3640 entry. This should really be fixed in gnulib instead.
3641 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3642 * configure.ac (AC_INIT): Set version name by invoking
3643 build-aux/git-version-gen.
3644 (AC_CONFIG_FILES): Remove .version, now generated by
3645 build-aux/git-version-gen.
3646 * maint.mk: New, copied from coreutils.
3647 * doc/.cvsignore (bison.1): Add.
3648 * doc/.gitignore (/bison.1): Add.
3649 * doc/bison.1: Remove, generated.
3650 * src/.cvsignore (revision.c): Remove.
3651 * src/.gitignore (/revision.c): Remove.
3652 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3653 (BUILT_SOURCES): Remove revision.c.
3654 (revision.c): Remove.
3655 * src/getargs.c (version): Don't print revision after the VERSION.
3656 * src/revision.h: Remove.
3657
3658 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3659
3660 Fix untranslatable composition of sentences. Reported by Goran
3661 Uddeborg at
3662 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3663 * THANKS (Goran Uddeborg): Add.
3664 * src/reduce.c (reduce_print): Report the number of nonterminals and
3665 rules useless in the grammar in separate sentences.
3666 * tests/reduce.at (Useless Rules): Update output.
3667 (Reduced Automaton): Likewise.
3668 (Underivable Rules): Likewise.
3669 (Empty Language): Likewise.
3670
3671 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3672
3673 Fix some .gitignore and .cvsignore problems.
3674 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3675 (insert_vc_ignore): ... this new function, which prepends `/' to all
3676 .gitignore entries before passing them to insert_sorted_if_absent.
3677 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3678 .cvsignore files are maintained even though Bison developers run
3679 bootstrap while using Git.
3680 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3681 unneeded by Bison.
3682 (gnulib): Add.
3683 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3684 unneeded. Reported by Eric Blake.
3685 * lib/.gitignore (/*~): Add.
3686 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3687 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3688 Blake.
3689 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3690
3691 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3694 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3695 * bootstrap.conf (gnulib_modules): Add unsetenv.
3696 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3697 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3698 (/setenv.m4): Add.
3699 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3700 the first argument because it may become position-dependent, and unset
3701 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3702 Add comments explaining these issues in more detail.
3703
3704 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3705
3706 Add .gitignore everywhere based on .cvsignore.
3707 * .gitignore: New.
3708 * build-aux/.gitignore: New.
3709 * data/.gitignore: New.
3710 * doc/.gitignore: New.
3711 * etc/.gitignore: New.
3712 * examples/.gitignore: New.
3713 * examples/calc++/.gitignore: New.
3714 * lib/.gitignore: New.
3715 * m4/.gitignore: New.
3716 * po/.gitignore: New.
3717 * runtime-po/.gitignore: New.
3718 * src/.gitignore: New.
3719 * tests/.gitignore: New.
3720
3721 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3722
3723 * NEWS (2.3b+): New section, empty for now.
3724 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3725
3726 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3727
3728 * NEWS (2.3b): Update release date since there has been a delay in
3729 getting the announcements and tarballs out.
3730
3731 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3732
3733 * NEWS: Version 2.3b.
3734 * configure.ac (AC_INIT): Likewise.
3735 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3736
3737 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3738
3739 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3740 been doing it for years.
3741 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3742 (Release Procedure): Add FIXME about make alpha being unmaintained.
3743
3744 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3745
3746 * data/yacc.c: Reformat m4 a little for readability.
3747 * src/lalr.c (build_relations): Correct comment.
3748
3749 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3750
3751 DJGPP specific issue.
3752 * djgpp/config.sed: Fixes required to run configure scripts generated
3753 by autoconf 2.62.
3754
3755 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3756
3757 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3758 coordinator@translationproject.org.
3759
3760 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3761
3762 * THANKS: Add Eric Blake.
3763
3764 2008-04-23 Eric Blake <ebb9@byu.net>
3765
3766 Revert prior patch, by working around autoconf regression.
3767 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3768 ("Output file name: ("): Uncomment test.
3769 ("Output file name: )"): Likewise.
3770 Based on an idea from Noah Misch.
3771
3772 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3773
3774 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3775 2.61. Reported by Juan Manuel Guerrero at
3776 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3777 * tests/output.at ("Output file name: ("): Comment out test case for
3778 now.
3779 ("Output file name: )"): Likewise.
3780
3781 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3782
3783 * GNUmakefile: Update git-version-gen invocation so make dist
3784 succeeds.
3785
3786 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3787
3788 Update to the current gnulib CVS repository, and fix trigraph handling
3789 in Bison.
3790 * bootstrap: Update gnulib CVS repository URL.
3791 (symlink_to_dir): Encapsulate the code that guarantees the destination
3792 directory exists into...
3793 (check_dst_dir): ... this new function, and...
3794 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3795 fail when copying files into lib/uniwidth/.
3796 * src/output.c (prepare_symbols): When writing yytname muscles, where
3797 symbol names will be encoded in C-string literals, tell quotearg to
3798 escape trigraphs. This used to be the default in gnulib.
3799 * tests/regression.at (Token definitions): Because of the change in
3800 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3801 escapes trigraphs in symbol names. Thus, yytname no longer has
3802 trigraphs unnecessarily doubly escaped. Update test case output.
3803 Extend test case to be sure Bison's own error messages will no longer
3804 have trigraphs in symbol names unnecessarily escaped once.
3805
3806 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3807
3808 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3809 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3810 * .cvsignore: Add .version.
3811 * .version.in: New.
3812 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3813 * configure.ac (AC_CONFIG_FILES): Add .version.
3814 * build-aux/.cvsignore: Add git-version-gen.
3815
3816 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3817
3818 * NEWS (2.3a+): Mention that -g now takes an argument.
3819 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3820 consistency. Update the -g and -x entries now that they take
3821 arguments. Use brackets to indicate optional arguments.
3822 * src/getargs.c (usage): Explain the relationship between arguments of
3823 long and short options more completely. Document --defines and -d
3824 separately since the former takes an argument but, for POSIX Yacc, the
3825 latter does not.
3826 (short_options): Let -W take an optional argument like --warnings.
3827 (getargs): Sort cases.
3828
3829 2008-02-28 Akim Demaille <demaille@gostai.com>
3830
3831 * doc/bison.texinfo: Fix a few typos.
3832
3833 2008-02-28 Akim Demaille <akim@epita.fr>
3834
3835 * doc/bison.texinfo (Bison Options): Document -W.
3836 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3837
3838 2008-02-28 Akim Demaille <akim@epita.fr>
3839
3840 * src/getargs.c (short_options): Split and sort for readability.
3841 -g and -x take optional arguments, just like their long options.
3842 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3843 understand.
3844 Fix the handling of $opt which resulted in all the argument to be
3845 considered as optional.
3846
3847 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3848
3849 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3850 say its interface is experimental.
3851 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3852 Java.
3853 (Bison Options): In the -L and --language entry, mention Java.
3854 (Java Bison Interface): Say the interface is experimental.
3855 * src/getargs.c (usage): Mention -L and --language.
3856
3857 * NEWS (2.3a+): Say the push parsing interface is experimental.
3858 * doc/bison.texinfo (Push Decl): Likewise.
3859 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3860 (Push Parser Function): Likewise.
3861 (Pull Parser Function): Likewise.
3862 (Parser Create Function): Likewise.
3863 (Parser Delete Function): Likewise.
3864 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3865 yypull_parse, and yypush_parse entries.
3866
3867 * NEWS (2.3a+): Mention XML support, and say the schema is
3868 experimental.
3869 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3870 * src/getargs.c (usage): Say the XML schema is experimental.
3871
3872 * NEWS (2.3a+): Say option instead of flag.
3873
3874 2008-02-21 Wojciech Polak <polak@gnu.org>
3875
3876 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3877 text.
3878
3879 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 Fix impure push parser compile error reported by Bob Rossi at
3882 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3883 * data/yacc.c: Clean up whitespace in the output a little.
3884 (yypstate_allocated): Define for impure push parsers regardless of
3885 whether the pull interface is also requested.
3886 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3887 check impure push parsers without the pull interface.
3888
3889 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3890 yyerror takes arguments specified by %parse-param while yypstate_new
3891 does not.
3892 * doc/bison.texinfo (Parser Create Function): Document that
3893 yypstate_new returns 0 for multiple impure parser instances.
3894 * tests/push.at (Push Parsing: Multiple impure instances): Update
3895 expected stderr output.
3896
3897 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3898
3899 * runtime-po/POTFILES.in (push.c): Remove.
3900
3901 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3902
3903 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3904 * data/push.c: Rename to...
3905 * data/yacc.c: ... this, overwriting it.
3906 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3907 `%push-pull-parser' -> `%define api.push_pull "both"'.
3908 Remove old yacc.c tests, and update push.c tests to yacc.c.
3909
3910 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3911
3912 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3913 `"%code top" blocks' instead of `%code "top" blocks'.
3914 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3915 Clean up whitespace in the output a little.
3916
3917 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3918
3919 Fix documentation problems reported by Tim Josling at
3920 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3921 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3922 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3923 integers. Explain the effect of literal string aliases on error
3924 messages. Copy token 0 documentation from the C++ skeleton
3925 documentation.
3926
3927 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3928
3929 Accept a token number in a %left, %right, or %nonassoc for POSIX
3930 conformance. Reported by Tim Josling at
3931 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3932 * NEWS (2.3a+): Mention.
3933 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3934 and code numbers are treated by precedence declarations.
3935 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3936 of symbols.1.
3937 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3938 of symbol.
3939 (symbol.prec): New, just like symbol but allows INT.
3940 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3941 longer holds.
3942 * tests/regression.at (Token number in precedence declaration): New
3943 test case.
3944
3945 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3946
3947 DJGPP specific issues.
3948 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3949 be changed. Copyright timestamp adjusted.
3950 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3951 be changed. Copyright timestamp adjusted.
3952 * djgpp/config.site: Copyright timestamp adjusted.
3953 * djgpp/config_h.sed: Copyright timestamp adjusted.
3954 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3955 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3956 filename translation list.
3957 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3958 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3959 files shall be created. Before trying to use the temp dir where the
3960 environment variable points to check that the dir really exists. If
3961 not default to the cwd as temp dir. Copyright timestamp adjusted.
3962 * djgpp/subpipe.h: Copyright timestamp adjusted.
3963 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3964
3965 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3966
3967 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3968
3969 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3970
3971 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3972 Problem reported by Claudio Saavedra in
3973 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3974
3975 2008-01-05 Wojciech Polak <polak@gnu.org>
3976
3977 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3978 document's title with the input grammar file name.
3979
3980 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3981
3982 Automate regression testing of the XML/XSLT implementation. Discussed
3983 starting at
3984 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3985 * configure.ac (XSLTPROC): New substitution.
3986 * Makefile.am (maintainer-xml-check): New phony target invoking...
3987 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3988 invoking make maintainer-check with BISON_TEST_XML=1.
3989 * tests/atlocal.in (XSLTPROC): New.
3990 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3991 not to report reachable memory when Bison is expected to have a
3992 non-zero exit status and (2) to compare XML/XSLT output with --graph
3993 and --report=all output for every working grammar when
3994 BISON_TEST_XML=1.
3995 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3996 (AT_BISON_CHECK_XML): New.
3997 (AT_QUELL_VALGRIND): New.
3998 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3999 (AT_CHECK): ... don't redefine this since this was the old way to
4000 quell Valgrind.
4001 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4002 AT_BISON_CHECK invocations.
4003 * tests/c++.at: Likewise.
4004 * tests/calc.at: Likewise.
4005 * tests/conflicts.at: Likewise.
4006 * tests/cxx-type.at: Likewise.
4007 * tests/existing.at: Likewise.
4008 * tests/glr-regression.at: Likewise.
4009 * tests/headers.at: Likewise.
4010 * tests/input.at: Likewise.
4011 * tests/java.at: Likewise.
4012 * tests/output.at: Likewise.
4013 * tests/push.at: Likewise.
4014 * tests/reduce.at: Likewise.
4015 * tests/regression.at: Likewise.
4016 * tests/sets.at: Likewise.
4017 * tests/skeletons.at: Likewise.
4018 * tests/synclines.at: Likewise.
4019 * tests/torture.at: Likewise.
4020 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4021 tends to hang xsltproc.
4022 (Big horizontal): Likewise.
4023
4024 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4025
4026 In XML output, remove redundant class attribute on symbol element.
4027 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4028 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4029 look up a symbol to determine whether it's a nonterminal or terminal.
4030 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4031 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4032
4033 Add prec/assoc information to XML output.
4034 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4035 %prec, add a percent_prec attribute.
4036 * src/print-xml.c (print_grammar): For each terminal that has a
4037 precedence or associativity, add a prec or assoc attribute.
4038 (xml_indent): New.
4039 (xml_puts): Use xml_indent.
4040 (xml_printf): Use xml_indent.
4041 * src/print-xml.h (xml_indent): Prototype.
4042
4043 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4044 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4045
4046 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4047
4048 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4049 (bison:ruleByNumber): ... this for clarity.
4050 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4051 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4052 (xsl:template match="reduction"): Update.
4053 (xsl:template match="item"): Update.
4054 (xsl:template match="reduction"): Update.
4055
4056 In the XML output, don't print the list of rules where symbols appear.
4057 Compute it in XSLT instead. Discussed at
4058 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4059 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4060 (bison:ruleByRhs): New.
4061 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4062 bison:ruleByRhs.
4063 (xsl:template match="terminal/rule"): Remove.
4064 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4065 bison:ruleByRhs.
4066 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4067 Remove.
4068 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4069 bison:ruleByRhs and mode="number-link" for rule template.
4070 (xsl:template match="terminal/rule"): Remove.
4071 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4072 bison:ruleByRhs and mode="number-link" for rule template.
4073 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4074 Rewrite as...
4075 (xsl:template match="rule" mode="number-link"): ... this.
4076 * src/print-xml.c (print_grammar): Don't print the list of rules.
4077
4078 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4079
4080 Don't let --report affect XML output; always print all information.
4081 Discussed at
4082 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4083 * src/conflicts.c (log_resolution): Implement.
4084 * src/print-xml.c (print_core): Implement.
4085 (print_state): Implement.
4086 (print_xml): Implement.
4087
4088 * NEWS (2.3a+): Fix quotes.
4089 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4090 don't let %verbose clear the list specified by --report.
4091
4092 2007-11-26 Akim Demaille <akim@epita.fr>
4093
4094 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4095
4096 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 In the XML output, list useless and unused symbols and rules with the
4099 useful ones and add a "usefulness" attribute. Discussed starting at
4100 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4101 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4102 (grammar_rules_print_xml): Print all rules instead of just those
4103 useful in the grammar, and add a "usefulness" attribute.
4104 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4105 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4106 (print_grammar): Print all nonterminals instead of just useful ones,
4107 and add a "usefulness" attribute to nonterminals and terminals.
4108 (print_xml): Don't print a separate "reductions" or
4109 "rules-useless-in-parser" element.
4110 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4111 (reduce_xml): Remove.
4112 (reduce_token_unused_in_grammar): New.
4113 (reduce_nonterminal_useless_in_grammar): New.
4114 * src/reduce.h (reduce_xml): Remove prototype.
4115 (reduce_token_unused_in_grammar): Add prototype.
4116 (reduce_nonterminal_useless_in_grammar): Add prototype.
4117 * data/xslt/xml2text.xsl: Update for XML changes.
4118 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4119 * tests/reduce.at (Useless Terminals): Update output.
4120 (Useless Rules): Update output.
4121 (Reduced Automaton): Update output.
4122
4123 Say "Terminals unused in grammar" instead of "Unused terminals".
4124 * NEWS (2.3a+): Update.
4125 * doc/bison.texinfo (Understanding): Update example output.
4126 * src/reduce.c (reduce_output): Implement.
4127 * data/xslt/xml2text.xsl: Implement.
4128 * data/xslt/xml2xhtml.xsl: Implement.
4129
4130 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4131
4132 Accept --report-file=FILE to override the default `.output' filename.
4133 * NEWS (2.3a+): Mention.
4134 * doc/bison.texinfo (Bison Options): Add an entry.
4135 * src/files.c (compute_output_file_names): Don't override
4136 spec_verbose_file if already set.
4137 * src/getargs.c (usage): Document --report-file.
4138 (REPORT_FILE_OPTION): New anonymous enum member.
4139 (long_options): Add entry for it.
4140 (getargs): Add case for it setting spec_verbose_file.
4141
4142 * build-aux/cross-options.pl: Don't record a short option just because
4143 there's an arg.
4144 * doc/.cvsignore: Add yacc.1.
4145
4146 2007-11-14 Akim Demaille <akim@epita.fr>
4147
4148 * doc/yacc.1.in: New.
4149 * configure.ac, doc/Makefile.am: Adjust.
4150 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4151 config.h symbol.
4152 Use AC_SUBST for assignments too.
4153 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4154
4155 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4156
4157 * src/gram.c: Remove comments that duplicate comments in gram.h.
4158
4159 When reporting useless rules and nonterminals, say "useless in grammar"
4160 instead of "useless", and say "useless in parser" instead of "never
4161 reduced". Discussed starting at
4162 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4163 * NEWS (2.3a+): Mention this change.
4164 * data/xslt/xml2text.xsl: Update output text and expected input XML
4165 element names to match changes below.
4166 * data/xslt/xml2xhtml.xsl: Likewise.
4167 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4168 Contents: "Rules useless in parser due to conflicts".
4169 * doc/bison.texinfo (Decl Summary): Reword a little.
4170 (Understanding): Update example output for changes below.
4171 * src/gram.c: (rule_useful_p): Rename to...
4172 (rule_useful_in_grammar_p): ... this.
4173 (rule_useless_p): Rename to...
4174 (rule_useless_in_grammar_p): ... this.
4175 (rule_never_reduced_p): Rename to...
4176 (rule_useless_in_parser_p): ... this.
4177 (grammar_rules_print): Update for renames.
4178 (grammar_rules_print_xml): Update for renames.
4179 (grammar_rules_never_reduced_report): Rename to...
4180 (grammar_rules_useless_report): ... this since it is used for either
4181 kind of useless rule.
4182 * src/gram.h: Reword comments and update function names in prototypes.
4183 * src/main.c (main): Say "rule useless in parser due to conflicts".
4184 * src/print-xml.c (print_rules_never_reduced): Rename to...
4185 (print_rules_useless_in_parser): ... this, and rename output XML
4186 element "rules-never-reduced" to "rules-useless-in-parser".
4187 (print_xml): Update for rename.
4188 * src/print.c (print_results): Say "Rules useless in parser due to
4189 conflicts".
4190 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4191 (nonterminals_reduce): Say "nonterminal useless in grammar".
4192 (reduce_output): Say "Nonterminals useless in grammar".
4193 Say "Rules useless in grammar".
4194 (reduce_xml): Rename output XML element "useless" to
4195 "useless-in-grammar".
4196 (reduce_print): Don't report the count of grammatically useless rules
4197 as "rules never reduced" just because %yacc is specified.
4198 In the correct report of this count, say nonterminal(s) and rule(s)
4199 "useless in grammar".
4200 * tests/conflicts.at (S/R in initial): Update expected output.
4201 (Defaulted Conflicted Reduction): Likewise.
4202 (Unreachable States After Conflict Resolution): Likewise.
4203 * tests/existing.at (GNU pic Grammar): Likewise.
4204 * tests/reduce.at (Useless Nonterminals): Likewise.
4205 (Useless Rules): Likewise.
4206 (Reduced Automaton): Likewise.
4207 (Underivable Rules): Likewise.
4208 (Empty Language): Likewise.
4209
4210 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4211
4212 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4213 here document and before the EOF so that BSD's implementation of Bourne
4214 shell doesn't parse the delimiter as part of the here document.
4215 * doc/.cvsignore: Add cross-options.texi.
4216 * src/getargs.c (usage): Add a blank line after the warning categories.
4217
4218 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4219
4220 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4221
4222 2007-11-05 Akim Demaille <akim@epita.fr>
4223
4224 Remove Id: from bison.1.
4225 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4226 (perl -0777 -pi -e 's/\.PP\nId): New.
4227 (.x.1): Use it to ignore the version control revision.
4228
4229 2007-11-05 Akim Demaille <demaille@gostai.com>
4230
4231 * build-aux/Makefile.am: Ship cross-options.pl.
4232 * doc/Makefile.am: Always refer to cross-options.texi with
4233 $(srcdir).
4234 (MAINTAINERCLEANFILES): Add it.
4235
4236 2007-11-04 Akim Demaille <demaille@gostai.com>
4237
4238 Generate the long/short option cross-table.
4239 * build-aux/cross-options.pl: New.
4240 * doc/Makefile.am (cross-options.texi): New.
4241 * doc/bison.texinfo: Use it.
4242
4243 2007-11-04 Akim Demaille <demaille@gostai.com>
4244
4245 Generate bison.1 using help2man.
4246 * doc/common.x, doc/bison.x: New.
4247 * doc/Makefile.am (bison.1, .x.1): New.
4248 The code is taken from autoconf-2.61/man/Makefile.am.
4249 * configure.ac: Look for help2man.
4250
4251 2007-11-04 Akim Demaille <demaille@gostai.com>
4252
4253 Complete --help.
4254 * src/getargs.c (usage): Document -W, make it clear that -d,
4255 -g and -x have optional arguments.
4256
4257 2007-11-04 Akim Demaille <demaille@gostai.com>
4258
4259 Find sha1sum when named gsha1sum.
4260 * bootstrap (find_tool): New.
4261 ($SHA1SUM): New.
4262
4263 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4264
4265 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4266 at
4267 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4268 * NEWS (2.3a+): Mention.
4269 * data/bison.m4 (b4_pure_if): Don't define it here.
4270 * data/c.m4 (b4_identification): Depend on individual skeletons to
4271 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4272 values of the %define variables api.pure or api.push_pull. Define
4273 YYPURE, YYPUSH, and YYPULL accordingly.
4274 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4275 glr.cc has already defined b4_pure_flag.
4276 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4277 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4278 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4279 * doc/bison.texinfo (Pure Decl): Update.
4280 (Push Decl): Update.
4281 (Decl Summary): Add api.pure to %define entry.
4282 In %pure-parser entry, say it's deprecated and reference %define.
4283 (Pure Calling): Update.
4284 (Error Reporting): Update.
4285 (C++ Scanner Interface): Update.
4286 (How Can I Reset the Parser): Update.
4287 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4288 reference %define.
4289 * src/getargs.c (pure_parser): Remove global variable.
4290 * src/getargs.h (pure_parser): Remove extern.
4291 * src/output.c (prepare): Don't define pure_flag muscle.
4292 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4293 wrapper around `%define api.pure'.
4294 * tests/calc.at (Simple LALR Calculator): Update.
4295 (Simple GLR Calculator): Update.
4296 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4297 Update.
4298 (GLR: Resolve ambiguity, pure, locations): Update.
4299 (GLR: Merge conflicting parses, pure, no locations): Update.
4300 (GLR: Merge conflicting parses, pure, locations): Update.
4301 * tests/glr-regression.at (Uninitialized location when reporting
4302 ambiguity): Update
4303 * tests/input.at (Unused %define api.pure): New test case.
4304 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4305 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4306 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4307
4308 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4309
4310 %define push_pull -> %define api.push_pull. Discussed starting at
4311 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4312 * data/push.c: Expect the new name.
4313 * data/yacc.c: Likewise.
4314 * doc/bison.texinfo (Push Decl): Update.
4315 (Decl Summary): Update %define entry.
4316 (Push Parser Function): Update.
4317 (Pull Parser Function): Update.
4318 (Parser Create Function): Update.
4319 (Parser Delete Function): Update.
4320 * tests/calc.at (Simple LALR Calculator): Update.
4321 * tests/input.at (%define enum variables): Update.
4322 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4323 (Push Parsing: Multiple impure instances): Update.
4324 (Push Parsing: Unsupported Skeletons): Update.
4325 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4326 (Exploding the Stack Size with Malloc): Update.
4327
4328 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4329 other entries some.
4330
4331 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4332
4333 For the XML output's terminal element, rename @number to @token-number,
4334 and add @symbol-number. In the nonterminal element, rename @number to
4335 @symbol-number. Discussed starting at
4336 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4337 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4338 renames.
4339 (xsl:template match="nonterminal"): Likewise.
4340 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4341 (xsl:template match="nonterminal"): Likewise.
4342 * src/print-xml.c (print_grammar): Implement.
4343
4344 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4345
4346 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4347 2007-10-11 change, the child elements here are items not rules.
4348 (xsl:template match="item"): New.
4349 (xsl:template match="rule"): Update for new reduced itemset.
4350 (xsl:template match="point"): Remove.
4351 (xsl:template match="empty"): For consistency with --graph, don't
4352 output "/* empty */".
4353 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4354 line-wrap, don't pass a negative value as first-line-length since this
4355 won't work with the following changes.
4356 (xsl:template name="line-wrap"): Simplify slightly.
4357 (xsl:template name="ws-search"): Eliminate recursion.
4358 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4359 set next to an item whose dot is not at the end of the RHS even if it
4360 happens to be associated with the same rule.
4361
4362 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4363
4364 Add %define lr.keep_unreachable_states.
4365 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4366 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4367 * src/main.c (main): Implement it.
4368 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4369 Extend to test it, and fix a typo.
4370
4371 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4372
4373 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4374 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4375 the example .output text.
4376 * tests/regression.at (Extra lookahead sets in report): Improve wording
4377 of comments.
4378
4379 2007-10-17 Wojciech Polak <polak@gnu.org>
4380
4381 * src/print-xml.c (print_grammar): Renamed
4382 <terminal> and <nonterminal> attributes:
4383 "type" to "number" and "symbol" to "name".
4384 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4385 Use new attribute names.
4386 (xsl:template match="nonterminal"): Likewise.
4387 * data/xslt/xml2xhtml.xsl: Likewise.
4388
4389 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4390
4391 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4392 (Option Cross Key): Likewise.
4393
4394 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4395 next to an item whose dot is not at the end of the RHS even if it
4396 happens to be associated with the same rule.
4397 * src/print.c (print_core): Likewise.
4398 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4399 (Resolved SR Conflicts): Update output.
4400 * tests/regression.at (Extra lookahead sets in report): New test case.
4401
4402 2007-10-11 Wojciech Polak <polak@gnu.org>
4403
4404 * src/print-xml.c (print_core): Remove item set
4405 redundancy.
4406 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4407 Improve processing time. Suggested by Joel E. Denny.
4408 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4409 Write xsl:param "required" attribute as comment.
4410 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4411 (xsl:template match="rule"): Support new reduced itemset.
4412 (xsl:template match="point"): Remove.
4413 * data/xslt/xml2xhtml.xsl: Likewise.
4414
4415 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4416
4417 * src/getargs.c (version): Update copyright year.
4418
4419 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4420
4421 Make xml2dot.xsl and --graph produce the same output.
4422 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4423 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4424 escaped later.
4425 (xsl:template name="output-node"): Use the new escape template instead
4426 of the string-replace template directly.
4427 (xsl:template name="output-edge"): Likewise.
4428 (xsl:template name="escape"): New, escapes backslashes and newlines in
4429 addition to quotation marks.
4430 * src/graphviz.c (start_graph, output_node, output_edge): Add
4431 whitespace to output for legibility.
4432
4433 Make xml2text.xsl and --report produce the same output, and remove the
4434 XML "conflicts" element since a conflict summary is easily extracted
4435 from the automaton.
4436 * data/xslt/bison.xsl: New.
4437 (xsl:template match="state" mode="bison:count-conflicts): New.
4438 * data/xslt/xml2text.xsl: Import bison.xsl.
4439 (xsl:template match="bison-xml-report"): Instead of styling the
4440 "conflicts" element, style the "automaton" element with mode
4441 "conflicts". Unlike the former, the latter lists S/R and R/R
4442 conflicts for a state on the same line.
4443 (xsl:template match="conflicts"): Remove.
4444 (xsl:template match="conflict"): Remove.
4445 (xsl:template match="terminal"): Line-wrap the list of rules in which
4446 the terminal is used.
4447 (xsl:template match="nonterminal"): Likewise for nonterminals.
4448 (xsl:template match="automaton" mode="conflicts"): New.
4449 (xsl:template match="state" mode="conflicts"): New.
4450 (xsl:template name="line-wrap"): New.
4451 (xsl:template name="ws-search"): New.
4452 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4453 (xsl:template match="bison-xml-report"): Instead of styling the
4454 "conflicts" element, style the "automaton" element with mode
4455 "conflicts."
4456 (xsl:template match="conflicts"): Remove.
4457 (xsl:template match="conflict"): Remove.
4458 (xsl:template match="automaton" mode="conflicts"): New.
4459 (xsl:template match="state" mode="conflicts): New.
4460 * src/conflicts.c (conflicts_output_xml): Remove.
4461 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4462 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4463 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4464 the corresponding XSLT is easier. Also, never wrap between a word and
4465 the comma that follows it.
4466
4467 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 Improve C++ namespace support. Discussed starting at
4470 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4471 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4472 b4_namespace_close): New macros that interpret the %define variable
4473 "namespace" so its value can contain "::" to indicate nested
4474 namespaces.
4475 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4476 the above macros.
4477 * data/lalr1.cc (b4_namespace): Likewise.
4478 * data/location.cc (b4_namespace): Likewise.
4479 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4480 inside a new table in the general %define entry. Document `%define
4481 namespace' there as well. Point the %name-prefix entry to it since it
4482 explains it more completely in the case of C++.
4483 (C++ Bison Interface): Mention `%define namespace' instead of
4484 %name-prefix.
4485 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4486 entry suffices.
4487 * tests/c++.at (Relative namespace references): New test case.
4488 (Absolute namespace references): New test case.
4489 (Syntactically invalid namespace references): New test case.
4490 * tests/input.at (C++ namespace reference errors): New test case.
4491
4492 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4493
4494 Add syncline support and location accessor to internal %define
4495 interfaces.
4496 * data/bison.m4 (b4_percent_define_get_loc): New.
4497 (b4_percent_define_get_syncline): New.
4498 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4499 (b4_percent_define_default): Record defining location as line 1 rather
4500 than 0 for the sake of synchronizing #line's, and define
4501 b4_percent_define_syncline(VARIABLE).
4502 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4503 * src/muscle_tab.c (muscle_syncline_grow): New.
4504 (muscle_code_grow): Use muscle_syncline_grow.
4505 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4506 define b4_percent_define_syncline(VARIABLE).
4507 (muscle_percent_define_get_loc): New.
4508 (muscle_percent_define_get_syncline): New.
4509 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4510 remove some unused variables.
4511 (muscle_percent_define_default): Record defining location as line 1
4512 rather than 0 for the sake of synchronizing #line's, and define
4513 b4_percent_define_syncline(VARIABLE).
4514 (muscle_percent_define_check_values): Use
4515 muscle_percent_define_get_loc.
4516 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4517 (muscle_percent_define_get_syncline): Prototype.
4518 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4519 defaults): Update output for location change.
4520 (Complaining during macro argument expansion): Extend to test
4521 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4522
4523 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 Fix some error-reporting macro bugs.
4526 * data/bison.m4 (b4_cat): New.
4527 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4528 to stdout so they don't become arguments to other macros. Update
4529 comments and add examples.
4530 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4531 add examples.
4532 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4533 after printing the error directive so that M4 doesn't report subsequent
4534 problems that are induced by this problem.
4535 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4536 instead of just in them. Recognize @\n in both places. Both expand to
4537 the empty string. Needed by b4_cat.
4538 * tests/skeletons.at (Complaining during macro argument expansion):
4539 New test case.
4540 (Fatal errors make M4 exit immediately): New test case.
4541
4542 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4543
4544 Implement --print-datadir.
4545 * src/getargs.c (usage): Mention.
4546 (PRINT_DATADIR_OPTION): New anonymous enum member.
4547 (long_options): Add entry for it.
4548 (getargs): Add case for it calling compute_pkgdatadir.
4549 * src/output.c (output_skeleton): Encapsulate data directory
4550 computation from here...
4551 (prepare): ... and from here...
4552 (compute_pkgdatadir): ... into this new function.
4553 * src/output.h (compute_pkgdatadir): Prototype.
4554
4555 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4556
4557 * src/print-xml.c (escape_bufs): New static global variable
4558 replacing...
4559 (xml_escape_n): ... the static local variable buf here.
4560 (print_xml): Free memory for escape_bufs.
4561 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4562
4563 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4564
4565 Replace `%push-parser' and `%push-pull-parser' with
4566 `%define push_pull "push"' and `%define push_pull "both"'.
4567 `%define push_pull "pull"' is the default.
4568 * doc/bison.texinfo (Push Decl, Push Parser Function,
4569 Pull Parser Function, Parser Create Function, Parser Delete Function):
4570 Update declarations.
4571 (Decl Summary, Table of Symbols): Replace %push-parser and
4572 %push-pull-parser entries with a %define push_pull entry.
4573 * data/bison.m4 (b4_percent_define_check_values): New macro.
4574 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4575 definitions...
4576 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4577 definitions...
4578 * data/push.c: ... to here and compute them from the value of the
4579 %define variable push_pull.
4580 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4581 parsing requests here...
4582 * data/yacc.c: ... hack this to switch to push.c any time
4583 b4_use_push_pull_flag or the %define variable push_pull is set. This
4584 will go away when we mv push.c yacc.c.
4585 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4586 push parsing is not supported since unused %define variables are
4587 reported anyway.
4588 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4589 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4590 comments for consistency with b4_percent_define_check_values.
4591 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4592 muscles.
4593 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4594 Remove.
4595 (prologue_declaration): Remove %push-parser and %push-pull-parser
4596 rules.
4597 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4598 * tests/calc.at: Update declarations.
4599 * tests/input.at (%define enum variables): New test case.
4600 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4601 declaration.
4602 (Push Parsing: Multiple impure instances): Update declaration.
4603 (Push Parsing: Unsupported Skeletons): New test case.
4604 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4605 declaration.
4606 (Exploding the Stack Size with Malloc): Update declaration.
4607
4608 2007-09-24 Wojciech Polak <polak@gnu.org>
4609
4610 Add XSLT transformations.
4611
4612 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4613 * data/xslt/xml2text.xsl: Transform XML into plain text.
4614 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4615 * data/Makefile.am (xsltdir): New variable.
4616 (dist_xslt_DATA): Add xslt/*.xsl files.
4617
4618 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4619
4620 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4621 Problem reported by Wojciech Polak.
4622 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4623 (xml_printf): Undo change I made on 21 September; that is,
4624 indent 2 spaces, not 1.
4625
4626 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4627
4628 Pacify ./configure --enable-gcc-warnings.
4629 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4630 `char const *' instead of `char *'.
4631 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4632 local variable `sep'.
4633
4634 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4635
4636 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4637 elsewhere.
4638 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4639 (xml_printf): Indent just 1 space for level.
4640 (e_char, xlate_char): Remove.
4641 (xml_escape_string): Rewrite to avoid undefined behavior (used
4642 storage that was freed from the stack).
4643 (xml_escape_n): Don't bother checking for subscript error.
4644
4645 2007-09-21 Wojciech Polak <polak@gnu.org>
4646
4647 Add Bison XML Automaton Report.
4648
4649 Add support for an -x option to generate an XML report.
4650 It is not documented yet.
4651 * src/print-xml.c: New file.
4652 * src/print-xml.h: Likewise.
4653 * lib/timevar.def (TV_XML): New var.
4654 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4655 * src/conflicts.c: Include print-xml.h.
4656 (solved_conflicts_xml_obstack): New var.
4657 (log_resolution, conflicts_solve, conflicts_free):
4658 Add support for XML report.
4659 (conflicts_output_val): New function.
4660 * src/conflicts.h (conflicts_output_val): New decl.
4661 * src/files.c (spec_xml_file): New var.
4662 (compute_output_file_names, output_file_names_free): Add XML support.
4663 * src/files.h (spec_xml_file): New decl.
4664 * src/getargs.c (xml_flag): New var.
4665 (usage, short_options, long_options, getargs): Add XML support.
4666 * src/getargs.h (xml_flag): New decl.
4667 * src/gram.c: Include print-xml.h.
4668 (rule_lhs_print_xml, rule_rhs_print_xml):
4669 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4670 New functions.
4671 * src/gram.h: Declare external ones.
4672 * src/main.c: Include print-xml.h.
4673 (main): Add XML support.
4674 * src/reduce.c: Include print-xml.h.
4675 (reduce_xml): New function.
4676 * src/reduce.h: Declare it.
4677 * src/state.c: Include print-xml.h.
4678 (state_new): Add XML support.
4679 (state_rule_lookahead_tokens_print_xml): New function.
4680 * src/state.h: Declare it.
4681 (struct state): New member solved_conflicts_xml.
4682 * src/symtab.c (symbol_class_get_string): New function.
4683 * src/symtab.h: Declare it.
4684
4685 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4686
4687 * GNUmakefile: Switch to coreutils's version.
4688 * bootstrap: Likewise.
4689 * Makefile.cfg: Adjust to new GNUmakefile.
4690 * README-hacking: Likewise.
4691
4692 Import from gnulib:
4693
4694 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4695 Bruno Haible <bruno@clisp.org>
4696
4697 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4698 and is a script that invokes bison. Tighten the code. Add comments.
4699
4700 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4701
4702 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4703 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4704 * doc/bison.texinfo (Decl Summary): Fix.
4705 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4706 * tests/input.at (Boolean %define variables): Update output.
4707 * tests/skeletons.at (%define boolean variables: invalid skeleton
4708 defaults): Rename to...
4709 (%define Boolean variables: invalid skeleton defaults): ... this and
4710 update output.
4711
4712 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4713
4714 In impure push mode, don't allow more than one yypstate to be allocated
4715 since multiple impure parsers would corrupt yynerrs.
4716 * data/push.c (yypstate_allocated): New static global variable
4717 initialized to 0.
4718 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4719 exhaustion if yypstate_allocated is 1, but still return 2.
4720 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4721 already 1. Otherwise, set it to 1.
4722 (yypstate_delete): Set it to 0.
4723 * tests/push.at (Push Parsing: Multiple impure instances): New test
4724 case.
4725
4726 2007-08-17 Bob Rossi <bob@brasko.net>
4727
4728 * doc/bison.texinfo (Push Decl): Document the push parser.
4729 (Table of Symbols): Ditto.
4730 (Pure Decl): Ditto.
4731 (Decl Summary): Ditto.
4732 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4733 Parser Create Function, Parser Delete Function):
4734 Add new push parser symbols.
4735 (Table of Symbols): Document push-parser, push-pull-parser,
4736 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4737
4738 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4739
4740 Update to GPLv3.
4741 * doc/gpl-3.0.texi: New file.
4742 * doc/gpl.texi: Remove.
4743 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4744 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4745 * README-hacking, TODO, bootstrap, bootstrap.conf:
4746 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4747 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4748 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4749 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4750 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4751 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4752 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4753 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4754 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4755 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4756 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4757 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4758 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4759 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4760 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4761 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4762 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4763 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4764 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4765 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4766 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4767 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4768 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4769 * src/complain.c, src/complain.h, src/conflicts.c:
4770 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4771 * src/files.h, src/flex-scanner.h, src/getargs.c:
4772 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4773 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4774 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4775 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4776 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4777 * src/print.c, src/print.h, src/print_graph.c:
4778 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4779 * src/reduce.h, src/relation.c, src/relation.h:
4780 * src/revision.h, src/scan-code.h, src/scan-code.l:
4781 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4782 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4783 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4784 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4785 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4786 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4787 * tests/existing.at, tests/glr-regression.at:
4788 * tests/headers.at, tests/input.at, tests/java.at:
4789 * tests/local.at, tests/output.at, tests/push.at:
4790 * tests/reduce.at, tests/regression.at, tests/sets.at:
4791 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4792 * tests/torture.at:
4793 Update to GPLv3.
4794
4795 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4796
4797 Get rid of broken %no-parser, -n, and --no-parser implementation and
4798 documentation.
4799 * TODO: Don't mention them.
4800 * doc/bison.1: Likewise.
4801 * doc/bison.texinfo (Decl Summary): Likewise.
4802 (Bison Options): Likewise.
4803 (Option Cross Key): Likewise.
4804 * src/getargs.c (no_parser_flag): Remove global variable.
4805 (usage): Don't print description of -n and --no-parser.
4806 (long_options): Remove --no-parser entry here.
4807 (getargs): Remove -n case in the switch here.
4808 * src/getargs.h (no_parser_flag): Remove extern.
4809 * tests/regression.at (Web2c Actions): Remove comment that mentions
4810 --no-parser.
4811
4812 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4813
4814 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4815 name user variables starting with `yy'. Just pass NULL instead of a
4816 dummy local &yylval to yypush_parse.
4817 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4818 starting with `yy'.
4819
4820 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4821
4822 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4823 true since it's then always used regardless of whether yyoverflow is
4824 defined. Reported by Christian Burger at
4825 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4826 * THANKS: Add Christian Burger.
4827
4828 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4829 node names: say "Decl Summary" not "Bison Declaration Summary".
4830
4831 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4834 determine whether this function has already complained about an invalid
4835 value for a %define boolean variable, don't check whether Bison has
4836 ever examined the value. As written, the check was a tautology.
4837 Instead, record and check for this complaint using a separate muscle.
4838
4839 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4840
4841 Fix push parsing memory leak reported by Brandon Lucia at
4842 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4843 * THANKS: Add Brandon Lucia.
4844 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4845 but the parse never completed and thus freed it.
4846 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4847 * tests/testsuite.at: Include push.at.
4848 * test/push.at: New.
4849 (Push Parsing: Memory Leak for Early Deletion): New test case.
4850
4851 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4852
4853 Improve handling of multiple S/R conflicts in the same state and of S/R
4854 conflicts involving multiple reductions.
4855 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4856 set for a state here or Bison will abort if it is reassigned on a
4857 later conflicted reduction in the same state.
4858 Similarly, don't finalize and assign the solved conflicts report here
4859 or it will be lost if it is reassigned on a later conflicted reduction
4860 in the same state.
4861 (set_conflicts): Instead, assign them both here after all S/R conflicts
4862 in the state have been fully examined.
4863 * src/print.c (shift_set): Rename to...
4864 (no_reduce_set): ... this.
4865 (print_reductions): Update for rename, and add %nonassoc error action
4866 tokens to no_reduce_set so that, when printing the first remaining
4867 reduction on an error action token, the reduction is enclosed in
4868 brackets.
4869 (print_results): Update for rename.
4870 * tests/conflicts.at (Solved conflicts report for multiple reductions
4871 in a state): New test case.
4872 (%nonassoc error actions for multiple reductions in a state): New test
4873 case.
4874
4875 * src/main.c (main): Don't depend on C99 features.
4876
4877 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4878
4879 * build-aux/.cvsignore: Add compile.
4880 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4881 uniwidth.
4882
4883 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4884
4885 * bootstrap (slurp): Create target directories that don't exist.
4886 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4887
4888 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4889
4890 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4891 than item number.
4892 * closure.c (closure): Likewise.
4893 * state.h (reductions): Comment sorting of rules.
4894 (state): Comment sorting of items.
4895
4896 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4897
4898 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4899 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4900 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4901 definition in order to avoid Gnulib headers since we don't use config.h
4902 here.
4903 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4904 rather than AT_DATA so that config.h is included.
4905
4906 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4907
4908 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4909 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4910 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4911 and so that YYFPRINTF is guaranteed to be defined here.
4912
4913 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4914
4915 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4916 with...
4917 (muscle_percent_define_check_values): ... this more helpful function.
4918 Again, it's not used yet, but it will be.
4919 * src/muscle_tab.h: Likewise.
4920
4921 Improve some comments in parser table construction.
4922 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4923 (generate_states): Don't mention ruleset, which is internal to closure.
4924 * src/closure.c (closure): Explain sorting of core and itemset, which
4925 is required for this function to behave correctly.
4926 * src/closure.h (closure): Mention sorting.
4927
4928 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4929
4930 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4931 move the check for disabled transitions to an aver since conflict
4932 resolution hasn't happened yet.
4933
4934 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4935 labels a state as inconsistent just because it has error transitions.
4936 The original form of this check appeared in revision 1.1 of lalr.c,
4937 which was committed on 1991-12-21. Now (at least), changing the
4938 consistency label on such a state appears to have no useful effect in
4939 any of the places it is examined, which I enumerate below. The key
4940 point to understanding each item in this enumeration is that a state
4941 with an error transition is labelled consistent in the first place only
4942 if it has no rules, so the check cannot matter for states that have
4943 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4944 to try to identify its conflicts, and a state must have *rules* to have
4945 conflicts. (2) Labelling a state as inconsistent will affect how
4946 action_row sets the default *rule* for the state. (3) Labelling a
4947 state as inconsistent will cause build_relations to add lookback edges
4948 to *rules* in that state.
4949 * src/state.h (struct state): Word the comment for member consistent
4950 more carefully.
4951
4952 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4953
4954 Don't depend on C99 features.
4955 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4956 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4957 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4958 * src/state.c (state_mark_reachable_states): Fix for-loop.
4959 (state_remove_unreachable_states): Fix for-loop.
4960
4961 Don't widen struct state with member reachable just to temporarily
4962 record reachability. Instead, use a local bitset.
4963 * src/state.h (struct state): Remove member.
4964 * src/state.c (state_new): Don't initialize it.
4965 (state_mark_reachable_states): Rename to...
4966 (state_record_reachable_states): ... this, and use bitset.
4967 (state_remove_unreachable_states): Use bitset.
4968
4969 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4970
4971 * src/Makefile.am (yacc): Quote target action commands properly so
4972 that the yacc script isn't corrupt. Reported by Hans Aberg at
4973 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4974
4975 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4976 the case of pure parsers. Reported by Frans Englich at
4977 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4978 * THANKS: Add Frans Englich.
4979
4980 * NEWS (2.3a+): In the %code entry, reference section `Bison
4981 Declaration Summary' from the manual now since the %code summary has
4982 moved there.
4983 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4984 in the rules section must be terminated by semicolons.
4985
4986 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4987
4988 Extend the front-end API for %define variables to more completely
4989 mirror the back-end. This will be useful in the future.
4990 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4991 Update comments to mention the new front-end counterparts of these
4992 macros.
4993 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4994 for muscle_string_decode and muscle_location_decode.
4995 (muscle_string_decode): New static function.
4996 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4997 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4998 functions.
4999 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5000 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5001 implementation more closely.
5002 (muscle_percent_define_invalid_value): New function.
5003 * src/muscle_tab.h (muscle_percent_define_get,
5004 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5005 Prototype.
5006
5007 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5008
5009 * NEWS (2.3a+): Mention yesterday's state-removal change.
5010 (2.3a): Remove the %language entry, which was added after 2.3a.
5011 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5012 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5013 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5014 tests/existing.at: Update copyright date.
5015
5016 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5017
5018 If conflict resolution makes states unreachable, remove those states,
5019 report rules that are then unused, and don't report conflicts in those
5020 states.
5021 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5022 New global function.
5023 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5024 function.
5025 * src/main.c (main): After conflict resolution, remove the unreachable
5026 states and update all data structures that reference states by number.
5027 * src/state.c (state_new): Initialize each state's reachable member to
5028 false.
5029 (state_mark_reachable_states): New static function.
5030 (state_remove_unreachable_states): New global function.
5031 * src/state.h (struct state): Add member bool reachable.
5032 (state_remove_unreachable_states): Prototype.
5033 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5034 New test case.
5035 * tests/existing.at (GNU pic Grammar): Update test case output now that
5036 an unused rule is discovered.
5037
5038 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5039
5040 Minor code cleanup in parser table construction.
5041 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5042 (new_itemsets, save_reductions): Update for rename to nitemset.
5043 * src/closure.c (nritemset): Rename to...
5044 (nitemset): ... this since the "r" appears to meaningless and isn't
5045 used in the comments.
5046 (closure): Update for rename.
5047 * src/closure.h (nritemset): Update extern to...
5048 (nitemset): ... this.
5049 * src/lalr.c (LA): Fix a typo in comments.
5050 * src/print.c (print_core): Update for rename to nitemset.
5051 * src/print_graph.c (print_graph): Likewise.
5052 * src/state.h: Fix some typos in header comments.
5053
5054 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5055
5056 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5057 still sticks to ASCII. Sorry!
5058
5059 * README-hacking: New file, taken mostly from coreutils, with changes
5060 for Bison. Contains much of the contents of:
5061 * README-cvs: Remove.
5062 * bootstrap: Sync from gnulib.
5063 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5064 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5065
5066 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5067
5068 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5069 Setzer.
5070 (Java Differences): Fix some typos.
5071 * THANKS: Add Sebastian Setzer.
5072
5073 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5074
5075 * data/java.m4 (b4_single_class_if): Remove.
5076 (b4_abstract_if): Look at "%define abstract".
5077 (b4_lexer_if): New.
5078 (b4_union_name): Rename...
5079 (b4_yystype): ... to this. Map to "%define stype".
5080 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5081 b4_maybe_throws): Fix quoting.
5082 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5083 * data/lalr1.java (Lexer interface): Always define.
5084 (Lexer interface within parser class): Remove.
5085 (YYLexer class): New, used when "%code lexer" is present.
5086 (constructor): When "%code lexer" is used, pass %lex-param
5087 to the lexer constructor.
5088 (yylex, yyparse): Remove %lex-param from method invocations
5089 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5090
5091 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5092 abstract". Rename "%define union_name" to "%define stype".
5093 Rename method names according to previous patch.
5094 (Java Scanner Interface): Describe "%code lexer" instead of
5095 "%pure-parser" and "%define single_class".
5096 (Java Differences): Mention "%code lexer".
5097
5098 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5099 Include scanner here, using macros from tests/local.at.
5100 (AT_DATA_CALC_Y): Remove final argument.
5101 (_AT_CHECK_JAVA_CALC): Likewise.
5102 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5103 of %locations and %error-verbose.
5104 (main): Test with and without %lex-param.
5105 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5106 (AT_BISON_OPTION_POPDEFS): Pop it.
5107
5108 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5109
5110 DJGPP spefic issue. Inhibit the use of disallowed characters for
5111 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5112 and concern testsuite case 46.
5113 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5114 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5115 * djgpp/config.bat: Inhibit the use of disallowed characters.
5116
5117 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5118
5119 Miscellaneous %define and %code cleanup.
5120 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5121 values are interpreted.
5122 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5123 documentation a little more.
5124 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5125 muscle_percent_define_insert, muscle_percent_code_grow): New
5126 functions/macros.
5127 * src/muscle_tab.h (muscle_percent_define_insert,
5128 muscle_percent_code_grow): Prototype.
5129 * src/parse-gram.y (prologue_declaration): Use
5130 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5131 %define and %code directives.
5132
5133 Make it easy to share %define boolean variables between the front-end
5134 and back-end. Though not used yet, this will be useful in the future.
5135 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5136 Bison uses of names rather than just skeleton uses of names.
5137 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5138 b4_percent_define_skeleton_variables(VARIABLE) to
5139 b4_percent_define_bison_variables(VARIABLE).
5140 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5141 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5142 b4_percent_code_bison_qualifiers(QUALIFIER).
5143 (b4_check_user_names_wrap): Update for renames.
5144 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5145 muscle_percent_define_default): New functions mimicking
5146 b4_percent_define_flag_if and b4_percent_define_default.
5147
5148 For %define variables, report locations for invalid values and
5149 redefinitions.
5150 * data/bison.m4 (b4_percent_define_flag_if): Read
5151 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5152 value for VARIABLE.
5153 (b4_percent_define_default): Save a special location in
5154 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5155 must later be reported as invalid.
5156 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5157 functions.
5158 (muscle_percent_define_insert): Record the location of VARIABLE in
5159 muscle percent_define_loc(VARIABLE), and use it to report the previous
5160 location for a redefinition.
5161 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5162 (muscle_percent_define_default): Update like b4_percent_define_default.
5163 (muscle_grow_user_name_list): Rename to...
5164 (muscle_user_name_list_grow): ... this for consistency and use
5165 muscle_location_grow.
5166 * src/muscle_tab.h (muscle_location_grow): Prototype.
5167 * tests/input.at (%define errors): Update expected output.
5168 * tests/skeletons.at (%define boolean variables: invalid skeleton
5169 defaults): New test case.
5170
5171 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5172
5173 * src/print.c (lookahead_set, state_default_rule): Remove.
5174 (print_reductions): Replace state_default_rule invocation with
5175 equivalent use of yydefact, which was computed in token_actions in
5176 tables.c.
5177 (print_results): Don't allocate lookahead_set.
5178
5179 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5180
5181 * data/lalr1.java: Prefix all private members with yy.
5182
5183 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5184
5185 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5186 Sebastien Fricker at
5187 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5188 * THANKS: Add Sebastien Fricker.
5189 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5190 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5191 accept a variable number of arguments.
5192
5193 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5194
5195 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5196
5197 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5198
5199 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5200 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5201 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5202
5203 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5204
5205 Undo my 2007-02-07 change, switching back to the c-strcase module
5206 introduced in the 2007-02-03 change. Bruno Haible reported that
5207 the 2007-02-07 change would be dangerous in Turkish if we add a
5208 language whose name contains "i", since "i" is not lowercase "I"
5209 in Turkish.
5210 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5211 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5212 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5213 * m4/.cvsignore: Remove strcase.m4.
5214 * src/getargs.c: Revert 2007-02-07 change, as follows.
5215 Include c-strcase.h.
5216 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5217
5218 2007-02-11 Bruno Haible <bruno@clisp.org>
5219
5220 Enable the Java related testsuite tests when the only Java compiler
5221 found is a gcj < 4.3. Discussed at
5222 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5223 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5224
5225 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5226
5227 * data/Makefile.am: Update copyright date.
5228 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5229 yypstate_new returns NULL.
5230 (yypstate_new): Return NULL if malloc does.
5231 * src/reader.c (packgram): Move translation of rule actions from the
5232 beginning of packgram to...
5233 (check_and_convert_grammar): ... here right before packgram is invoked
5234 so it's easier to write more complete comments, and remove redundant
5235 code.
5236
5237 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5238
5239 As in semantic actions, make @$ in %initial-action, %destructor, and
5240 %printer imply %locations.
5241 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5242 scanning @$.
5243 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5244 (@$ in %initial-action implies %locations,
5245 @$ in %destructor implies %locations,
5246 @$ in %printer implies %locations): ... these new test cases.
5247
5248 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5249
5250 Undo most of the 2007-02-03 change, switching to the strcase module
5251 now that gnulib strcase has been fixed.
5252 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5253 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5254 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5255 * m4/.cvsignore: Add strcase.m4.
5256 * src/getargs.c: Revert 2007-02-03 change, as follows.
5257 Don't include c-strcase.h.
5258 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5259 strcasecmp has "unspecified behavior" outside the POSIX locale,
5260 but it works fine in practice if at least one argument is ASCII,
5261 as is the case in Bison.
5262
5263 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5264
5265 * tests/java.at: Skip tests if only one of javac/java is present.
5266 Reported by Joel E. Denny.
5267 * tests/atlocal.in: Adjust copyright years.
5268
5269 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5270
5271 * data/lalr1.java (Stack): Work around old verifiers that disallow
5272 access to the private fields of an inner class, from the outer class.
5273 We can make Stack's fields public because user code doesn't have access
5274 to the instance of Stack used by parse(). Reported by Paul Eggert.
5275
5276 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5277
5278 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5279 the right spot for these files?
5280 * bootstrap.conf (gnulib_modules): Add c-strcase.
5281 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5282 c-strncasecmp.c.
5283 * src/getargs.c: Include c-strcase.h.
5284 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5285 to avoid unspecified behavior.
5286
5287 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5288
5289 * doc/bison.texinfo (Decl Summary): Correct typo.
5290
5291 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5292
5293 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5294 Complain if the value does not match empty, "true" or "false".
5295 * data/c++.m4: Adjust default definitions of %define variables.
5296 * data/java.m4: Adjust default definitions of %define variables.
5297 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5298 to above behavior.
5299 * tests/input.at (Boolean %define variables): Test new behavior.
5300
5301 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5302
5303 * NEWS: Mention java.
5304 * TODO: Remove things that are done.
5305 * bootstrap.conf: Add javacomp-script and javaexec-script.
5306 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5307
5308 * data/Makefile.am: Add new files.
5309 * data/java-skel.m4: New.
5310 * data/java.m4: New.
5311 * data/lalr1.java: New.
5312
5313 * doc/bison.texinfo: Put "A Complete C++ Example" under
5314 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5315 under Other Languages.
5316
5317 * src/getargs.c (valid_languages): Add Java.
5318 * src/getargs.h (struct bison_language): Update size of string fields.
5319
5320 * tests/Makefile.am: Add java.at.
5321 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5322 * tests/java.at: New.
5323 * tests/testsuite.at: Include it.
5324
5325 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5326
5327 Clean up.
5328 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5329 at_directive_argv arguments so these no longer have to be global
5330 variables. Also, update the implementation for the following changes.
5331 (fail_for_at_directive_too_many_args,
5332 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5333 (at_directive_name): Remove as at_directive_argv[0] will be used for
5334 this now.
5335 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5336 for the directive name.
5337 (at_directive_argc, at_directive_argv): Make these local within
5338 skel_lex instead of global.
5339 (INITIAL): Update directive start action for above changes.
5340 (SC_AT_DIRECTIVE_ARG): Rename to...
5341 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5342 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5343 (scan_skel): Move yylex_destroy to...
5344 (skel_scanner_free): ... here.
5345 * tests/skeletons.at (installed skeleton file name): Rename to...
5346 (installed skeleton file names): ... this.
5347
5348 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5349
5350 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5351 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5352 Summary" not "Directives".
5353 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5354 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5355 since the former is now the more complete one.
5356 (Prologue Alternatives): Likewise and do the same for %defines.
5357 (Table of Symbols): Add summary of %code, add summary of %define, and
5358 move full %code documentation to...
5359 (Decl Summary): ... here for consistency with other entries in these
5360 sections.
5361 Move %define entry in order to keep this list alphabetized.
5362 Reword %define entry a little to put less emphasis on the skeleton
5363 concept, which most users shouldn't have to think about.
5364
5365 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5366
5367 Adjust to recent gnulib changes.
5368 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5369 Add string.h, string_.h, unistd_.h, wchar_.h.
5370 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5371 * src/system.h: Don't include <stpcpy.h>; this is now done by
5372 <string.h>.
5373
5374 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5375
5376 Simplify implementation of unqualified %code, implement macros for
5377 uniform treatment of boolean %define flags. Document %define.
5378 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5379 b4_percent_code_ifdef): New.
5380 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5381 * data/c++.m4: Define default value for global_tokens_and_yystype.
5382 * data/glr.cc: Likewise.
5383 * data/location.cc: Use b4_percent_define_flag_if.
5384
5385 * doc/bison.texinfo (Decl Summary): Document %define.
5386
5387 * src/parse-gram.y (Unqualified %code): Change muscle name to
5388 b4_percent_code().
5389 (content.opt): Default to empty.
5390
5391 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5392
5393 Implement support for relative and absolute skeleton file names.
5394 Discussed starting at
5395 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5396 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5397 (Bison Options): Document in --skeleton entry.
5398 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5399 full_skeleton can't necessarily hold all of pkgdatadir.
5400 If the specified skeleton file name contains a `/', don't prepend
5401 pkgdatadir.
5402 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5403 file name contains a `/', prepend the grammar file directory.
5404 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5405 * skeletons.at: New file.
5406 (relative skeleton file names): New test case.
5407 (installed skeleton file names): New test case.
5408 * tests/testsuite.at: Include skeletons.at.
5409
5410 * bootstrap: Update copyright to 2007.
5411
5412 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5413
5414 * bootstrap: Remove occurrences of .#bootmp from the files.
5415
5416 2007-01-17 Akim Demaille <akim@epita.fr>
5417
5418 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5419 nonterminals.
5420 Use per-type %printer.
5421
5422 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5423
5424 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5425 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5426 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5427 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5428 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5429 tests/glr-regression.at, tests/input.at, tests/local.at,
5430 tests/output.at, tests/torture.at: Update copyright to 2007.
5431
5432 2007-01-16 Akim Demaille <akim@epita.fr>
5433
5434 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5435 error code.
5436 (Calc++ Scanner): Exit with failure if we can't open the input
5437 file.
5438 Accept "-" standing for stdin.
5439 (Calc++ Top Level): Print the result only if the parsing was
5440 successful.
5441
5442 2007-01-16 Akim Demaille <akim@epita.fr>
5443
5444 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5445
5446 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5447 and Joel E. Denny <jdenny@ces.clemson.edu>
5448
5449 Clean up %define and %code implementation in M4 some. Most
5450 importantly, rename all related macros to be in the b4_percent_define
5451 and b4_percent_code namespaces. Also, complete support for `.' in
5452 %define variable names and %code qualifiers.
5453 * data/bison.m4 (b4_check_user_names): Check for special
5454 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5455 m4_foreach loops.
5456 (b4_get_percent_define, b4_get_percent_code): Rename to...
5457 (b4_percent_define_get, b4_percent_code_get): ... these.
5458 Extend documentation with examples.
5459 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5460 b4_percent_define_skeleton_variables and
5461 b4_percent_code_skeleton_qualifiers.
5462 Expect any value for the %define variable `foo' to be stored in the
5463 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5464 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5465 expect any unqualified %code blocks to be stored in a macro named
5466 `b4_percent_code_unqualified'.
5467 Use m4_indir so that %define variable names and %code qualifiers can
5468 contain `.', which is allowed by the grammar parser.
5469 (b4_percent_define_default): New macro to set a default value for a
5470 %define variable.
5471 (m4_wrap): Update wrapped code, and fix some underquoting.
5472 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5473 Expect grammar uses of %define variables and %code qualifiers to be
5474 defined in b4_percent_define_user_variables and
5475 b4_percent_code_user_qualifiers.
5476 * data/c++.m4: Use b4_percent_define_default rather than
5477 m4_define_default. Fix some underquoting. Skeleton usage of %define
5478 variable define_location_comparison now implies skeleton usage of
5479 %define variable filename_type.
5480 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5481 data/push.c, data/yacc.c: Update macro names.
5482 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5483 muscle names.
5484
5485 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5486
5487 DJGPP specific issues.
5488
5489 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5490 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5491
5492 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5493
5494 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5495 run parsers in all tests so that Valgrind is invoked during
5496 maintainer-check-valgrind.
5497 (Duplicate representation of merged trees): Free all semantic values.
5498 (Duplicated user destructor for lookahead): Likewise.
5499
5500 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5501
5502 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5503 command-line prefix.
5504 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5505 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5506 miss Valgrind messages.
5507 (Exploding the Stack Size with Malloc): Likewise.
5508
5509 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5510
5511 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5512 locals. Reported by Juan Manuel Guerrero at
5513 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5514 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5515 Fix some indentation also.
5516 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5517 explaining this issue.
5518
5519 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5520 and Joel E. Denny <jdenny@ces.clemson.edu>
5521
5522 Simplify union and prologue handling, and escape union and lex/parse
5523 params with digraphs.
5524 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5525 values to the empty string since these are no longer guaranteed
5526 initialized by the front-end.
5527 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5528 braces around b4_user_stype since this is no longer done by the
5529 front-end.
5530 * src/files.c, src/files.h (pre_prologue_obstack,
5531 post_prologue_obstack): Remove.
5532 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5533 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5534 with digraphs. This fixes lex params and parse params.
5535 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5536 * src/output.c (prepare): Remove muscle insertion of the prologues.
5537 (output): Remove freeing of pre_prologue_obstack and
5538 post_prologue_obstack.
5539 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5540 than prologue_augment for prologue parsing so you don't need prologue
5541 obstacks.
5542 (grammar_declaration): For %union RHS, use `braceless' instead of
5543 "{...}" so that braces are already stripped and code is escaped with
5544 digraphs.
5545 * src/reader.c (prologue_augment): Remove.
5546 (reader): Remove initialization of pre_prologue_obstack and
5547 post_prologue_obstack.
5548 * src/reader.h (prologue_augment): Remove.
5549
5550 * data/c.m4: Remove stray parenthesis.
5551
5552 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5553
5554 Remove quotes from variables names in %define directives and from
5555 qualifiers in %code directives, and restrict the characters that are
5556 allowed in them to M4-friendly ones. For %define, continue to support
5557 the quoted form as a deprecated feature. Discussed starting at
5558 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5559 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5560 %code.
5561 * doc/bison.texinfo (Prologue Alternatives): Update.
5562 (Decl Summary): In %defines entry, update mention of `%code requires'
5563 and `%code provides'.
5564 (C++ Location Values): Update %define uses.
5565 (Calc++ Parser Interface): Likewise.
5566 (Calc++ Parser): Likewise, and update `%code requires' uses.
5567 (Table of Symbols): Update %code documentation.
5568 * src/parse-gram.y (prologue_declaration): For %define variables, use
5569 `variable' instead of `STRING'.
5570 (grammar_declaration): For %code qualifiers, use `ID' instead of
5571 `STRING'.
5572 (variable): New nonterminal that takes an `ID' or a `STRING'.
5573 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5574 and %define uses.
5575 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5576 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5577 (%define errors): Update %define uses.
5578
5579 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5580
5581 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5582 instead of muscle_insert for %define values so that M4-special
5583 characters are replaced with digraphs.
5584 * tests/input.at (%define errors): Extend to check weird values.
5585
5586 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5587
5588 Instead of having skeletons declare all valid %define variables and
5589 %code qualifiers, provide macros that retrieve the associated values
5590 and build these lists automatically. Thus Bison will now warn when a
5591 variable or qualifier is not used by the skeleton in the current
5592 invocation regardless of whether it might sometimes be used by that
5593 skeleton in other invocations. Also, move all %define value macros to
5594 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5595 form, which is replaced by %code.
5596 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5597 (b4_check_user_names): ... this, and change the series of valid name
5598 arguments to a single list argument for names used in the skeleton
5599 similar to the existing list argument for names used in the grammar.
5600 Warn instead of complaining.
5601 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5602 values and %code code, to format %code code properly, and to build
5603 lists of all %define variables and %code qualifiers used in the
5604 skeleton: b4_skeleton_percent_define_variables and
5605 b4_skeleton_percent_code_qualifiers.
5606 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5607 Remove, and...
5608 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5609 the skeleton names lists can finish building first. In place of
5610 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5611 expect the lists b4_user_percent_define_variables and
5612 b4_user_percent_code_qualifiers.
5613 * data/c++.m4: Where setting default values for b4_parser_class_name,
5614 b4_location_type, b4_filename_type, b4_namespace, and
5615 b4_define_location_comparison, update their names to the
5616 b4_percent_define_ namespace.
5617 * data/glr.c: Don't use b4_check_percent_define_variables and
5618 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5619 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5620 (b4_parser_class_name, b4_namespace): Define these using
5621 b4_get_percent_define for parser_class_name and namespace.
5622 * data/location.cc: Use b4_get_percent_define.
5623 * data/push.c: Don't use b4_check_percent_define_variables and
5624 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5625 * data/yacc.c: Likewise, and don't call m4_exit in
5626 b4_use_push_for_pull_if or m4_wrap code will never execute.
5627 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5628 Rename to...
5629 (muscle_grow_user_name_list): ... this for consistency with the
5630 terminology used in bison.m4.
5631 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5632 %define variable names, and rename muscle used_percent_define_variables
5633 to user_percent_define_variables.
5634 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5635 user_percent_code_qualifiers.
5636 (content): Remove.
5637 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5638 {CODE} form is no longer accepted.
5639 * tests/input.at (Reject bad %code qualifiers): Rename to...
5640 (Reject unused %code qualifiers): ... this, and update test output.
5641 (%define error): Update test output.
5642
5643 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5644
5645 Check for unrecognized %define variables similar to checking for
5646 unrecognized %code qualifiers. Check for redefined %define variables.
5647 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5648 generalizes...
5649 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5650 (b4_check_percent_define_variables): New, also wraps it.
5651 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5652 variables using b4_check_percent_define_variables.
5653 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5654 all those exercised in the test suite and all those listed in the
5655 `Default values' section of c++.m4. Are there others?
5656 * data/push.c, data/yacc.c: Declare no valid %define variables.
5657 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5658 similar to muscle_find, but it works even when the muscle stores a
5659 const value.
5660 (muscle_grow_used_name_list): New function for constructing the used
5661 name list muscles that b4_check_for_unrecognized_names requires.
5662 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5663 %define'd more than once. Define the b4_used_percent_define_variables
5664 muscle with muscle_grow_used_name_list.
5665 (grammar_declaration): Abbreviate %code code with
5666 muscle_grow_used_name_list.
5667 * tests/input.at (%define errors): New.
5668
5669 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5670
5671 Provide warn_at, complain_at, and fatal_at function callbacks to the
5672 skeletons, and use this for %code qualifier complaints.
5673 * data/bison.m4 (b4_error_at): New, invoked by...
5674 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5675 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5676 @fatal_at(...@) directives.
5677 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5678 qualifiers in b4_used_percent_code_qualifiers and to use
5679 b4_complain_at.
5680 * src/location.c, src/location.h (boundary_set_from_string): New global
5681 function.
5682 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5683 function.
5684 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5685 to b4_used_percent_code_qualifiers.
5686 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5687 function.
5688 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5689 (lineno): Rename to...
5690 (out_lineno): ... this so I don't misunderstand it again.
5691 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5692 here; these newlines are in the input but not the output file.
5693 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5694 (at_directive_perform): ... this new static function, and add handling
5695 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5696 directives.
5697 * tests/input.at (Reject bad %code qualifiers): Update test output with
5698 locations and extend.
5699
5700 * tests/output.at (Output file name: [, Output file name: ]): Remove
5701 bogus comment about these tests failing.
5702
5703 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5704
5705 Clean up b4_check_percent_code_qualifiers a little.
5706 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5707 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5708 documentation and add examples.
5709 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5710 qualifiers here.
5711
5712 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5713
5714 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5715 unreliable -- especially when they're hidden inside another macro.
5716 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5717 data/c.m4: Remove m4_divert(-1).
5718 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5719 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5720 m4_divert_push(0) and m4_divert_pop(0).
5721 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5722 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5723 pushed and popped by m4sugar, should be first on the stack.
5724
5725 Provide warn, complain, and fatal function callbacks to the skeletons.
5726 This provides more flexibility than m4_fatal, improves the error
5727 message format, and captures messages for translation. Discussed
5728 starting at
5729 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5730 * data/bison.m4 (b4_error): New, invoked by...
5731 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5732 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5733 directives. Because these M4 macros might be called when the current
5734 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5735 the previous removal of uses of m4_divert, which caused trouble.
5736 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5737 m4_fatal to report unrecognized %code qualifiers.
5738 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5739 push parser requests.
5740 * data/glr.c: Use b4_complain instead of m4_fatal to report
5741 non-deterministic push parser requests.
5742 Update @output usage to @output(...@) form.
5743 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5744 report missing %defines. Update @output usage to @output(...@) form.
5745 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5746 @output(...@) form.
5747 * src/main.c (main): Invoke skel_scanner_free.
5748 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5749 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5750 obstack_for_string from flex-scanner.h.
5751 (YY_DECL): Use to declare skel_lex static.
5752 (decode_at_digraphs): Remove; now handled in the new
5753 SC_AT_DIRECTIVE_ARG start condition.
5754 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5755 functions.
5756 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5757 at_directive_argv): New static globals.
5758 (INITIAL): Use fail_for_invalid_at.
5759 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5760 recognize the start of a generalized `@directive(...@)' form and
5761 start...
5762 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5763 directive args (using the new obstack_for_string), to decode the
5764 contained @ diagraphs, and to perform the directive. It recognizes
5765 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5766 @output(...@).
5767 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5768 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5769 `@,'.
5770 (scan_skel): Initialize obstack_for_string on the first call.
5771 (skel_scanner_free): New function to free obstack_for_string.
5772 * tests/input.at (Reject bad %code qualifiers): Update test output.
5773
5774 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5775
5776 Consolidate the 4 prologue alternative directives (%code, %requires,
5777 %provides, and %code-top) into a single %code directive with an
5778 optional qualifier field. Discussed at
5779 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5780 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5781 alternatives.
5782 * doc/bison.texinfo (Prologue Alternatives): Update.
5783 (Decl Summary): Update to %code "requires" and %code "provides".
5784 (Calc++ Parser): Update to %code "requires".
5785 (Table of Symbols): Remove entries for %requires, %provides, and
5786 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5787 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5788 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5789 which are skeleton-specific.
5790 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5791 declare what %code qualifiers it supports and to complain if any other
5792 qualifiers were used in the grammar.
5793 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5794 and b4_user_code([b4_percent_code_provides]) in place of
5795 b4_user_requires and b4_user_provides.
5796 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5797 Add b4_user_code([b4_percent_code_top]) and
5798 b4_user_code([b4_percent_code]).
5799 Invoke b4_check_percent_code_qualifiers.
5800 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5801 PERCENT_REQUIRES): Remove.
5802 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5803 %requires. Rewrite the %code RHS as the unqualified form defining the
5804 muscle b4_percent_code. Add another RHS for the qualified %code form,
5805 which defines muscles of the form b4_percent_code_QUALIFIER and the
5806 b4_used_percent_code_qualifiers muscle.
5807 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5808 PERCENT_REQUIRES): Remove.
5809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5810 %code "requires" and %code "provides".
5811 * tests/input.at (Reject bad %code qualifiers): New.
5812
5813 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5814
5815 Use the new code_props interface for destructors and printers.
5816 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5817 printer_location members, and change the type of the destructor and
5818 printer members to code_props.
5819 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5820 symbol_printer_get, semantic_type_destructor_set,
5821 semantic_type_printer_set, default_tagged_destructor_set,
5822 default_tagless_destructor_set, default_tagged_printer_set,
5823 default_tagless_printer_set): Use code_props in arguments and return
5824 types in place of char const * and location.
5825 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5826 since the locations are now contained in the return of
5827 symbol_destructor_get and symbol_printer_get.
5828 * src/output.c (symbol_destructors_output, symbol_printers_output):
5829 Replace with...
5830 (symbol_code_props_output): ... this to eliminate duplicate code.
5831 (output_skeleton): Update to use symbol_code_props_output.
5832 * src/reader.c (symbol_should_be_used): Update use of
5833 symbol_destructor_get.
5834 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5835 Update uses of the various _destructor_set and _printer_set functions.
5836 * src/symtab.c: (default_tagged_destructor_location,
5837 default_tagless_destructor_location, default_tagged_printer_location,
5838 default_tagless_printer_location): Remove since we...
5839 (default_tagged_destructor, default_tagless_destructor,
5840 default_tagged_printer, default_tagless_printer): ... change the type
5841 of these to code_props.
5842 (symbol_new, semantic_type_new, symbol_destructor_set,
5843 semantic_type_destructor_set, symbol_destructor_get,
5844 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5845 symbol_check_alias_consistency, default_tagged_destructor_set,
5846 default_tagless_destructor_set, default_tagged_printer_set,
5847 default_tagless_printer_set): Update.
5848 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5849 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5850 code_props members.
5851 (symbol_print): Use SYMBOL_CODE_PRINT.
5852
5853 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5854
5855 Use the new code_props interface for rule actions.
5856 * src/symlist.h (symbol_list): Replace action, action_location, and
5857 used members with a code_props action_props member.
5858 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5859 grammar_midrule_action, grammar_current_rule_merge_set,
5860 grammar_current_rule_symbol_append, packgram): Update.
5861 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5862 * src/scan-code.l (handle_action_dollar): Update.
5863 (translate_rule_action): Remove, no longer used.
5864 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5865
5866 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5867
5868 Use the new code_props interface in parse-gram.y.
5869 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5870 Update all uses of translate_* functions to use the new code_props
5871 interface and to use gram_scanner_last_string_free and
5872 code_scanner_last_string_free where possible.
5873 (grammar_declaration): symbol_list_destructor_set and
5874 symbol_list_printer_set now perform the translation, so don't do it
5875 here. Use gram_scanner_last_string_free where possible.
5876 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5877 translate_code): Remove, no longer used.
5878 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5879 symbol_list_printer_set): Perform code translation here rather than
5880 depending on the caller to do so.
5881
5882 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5883 * src/scan-gram.h (gram_last_string): Remove declaration.
5884 * src/scan-gram.l (last_string): Declare it static.
5885
5886 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5887
5888 Encapsulate code properties and related functionality for the various
5889 destructors, printers, and actions into a code_props structure and
5890 interface. This patch merely implements code_props in scan-code.h and
5891 scan-code.l. Future patches will rewrite other modules to use it.
5892 Discussed starting at
5893 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5894 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5895 consistently initialize const structs that have an empty location
5896 field.
5897 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5898 to ensure consistency.
5899 * src/scan-code.h (code_props): New structure.
5900 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5901 function, macro, and const global variable for initializing a
5902 code_props with no code.
5903 (code_props_plain_init, code_props_symbol_action_init,
5904 code_props_rule_action_init, code_props_translate_code): The rest of
5905 the new code_props functional interface. Among other things, the init
5906 functions set the code_props kind field so that
5907 code_props_translate_code will know whether to behave like
5908 translate_symbol_action, translate_rule_action, or translate_code.
5909 These old translate functions must remain until all other modules are
5910 updated to use the new code_props interface.
5911 (code_scanner_last_string_free): New function similar to
5912 gram_scanner_last_string_free.
5913 (code_scanner_free): Add documentation.
5914 * src/scan-code.l: Implement the new interface.
5915 (code_lex): Make it static, add a code_props* argument, and remove the
5916 rule argument.
5917 (last_string): New static global similar to the one in scan-gram.l.
5918 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5919 instead of rule.
5920 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5921 code_props since Bison may one day use this information for destructors
5922 and printers.
5923 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5924 (handle_action_dollar): Use symbol_list_n_get and set used flag
5925 directly since symbol_list_n_used_set is removed.
5926 (translate_action): Add a code_props* argument and remove the rule,
5927 action, and location arguments. Pass the code_props* on to code_lex.
5928 (translate_rule_action, translate_symbol_action, translate_code):
5929 Rewrite as wrappers around the new code_props interface.
5930 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5931 it would eventually need to break the encapsulation of code_props.
5932
5933 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5934
5935 * etc/.cvsignore: New.
5936
5937 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5938
5939 Add maintainer-push-check to run maintainer-check using push parsing in
5940 place of pull parsing where available.
5941 * Makefile.am (maintainer-push-check): New.
5942 * data/bison.m4 (b4_use_push_for_pull_if): New.
5943 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5944 appropriately based on their existing values.
5945 (yypush_parse): Don't print push-parser-specific diagnostics if push
5946 parsing is being used in place of pull parsing.
5947 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5948 push.c.
5949 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5950 variable, and insert b4_use_push_for_pull_flag into muscles.
5951 * tests/Makefile.am (maintainer-push-check): New.
5952
5953 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5954
5955 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5956 (whether successful or failed) so that yypush_parse can be invoked
5957 again to start a new parse using the same yypstate.
5958 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5959 check multiple yypull_parse invocations on the same yypstate. For pull
5960 mode, extend to check multiple yyparse invocations.
5961 (Exploding the Stack Size with Alloca): Extend to try with
5962 %push-pull-parser.
5963 (Exploding the Stack Size with Malloc): Likewise.
5964
5965 * tests/calc.at (Simple LALR Calculator): Don't specify
5966 %skeleton "push.c" since %push-pull-parser implies that now.
5967 * tests/headers.at (export YYLTYPE): Don't check for the push
5968 declarations. Otherwise, this test case can't be used to see if push
5969 mode can truly emulate pull mode.
5970 * tests/input.at (Torturing the Scanner): Likewise.
5971 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5972 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5973 AT_YACC_IF, which now includes the case of push mode since %skeleton
5974 need not be used for push mode. This will be more intuitive once
5975 push.c is renamed to yacc.c.
5976
5977 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5978
5979 For push mode, convert yyparse from a macro to a function, invoke yylex
5980 instead of passing a yylexp argument to yypull_parse, and don't
5981 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5982 Discussed starting at
5983 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5984 * data/bison.m4 (b4_pull_if): New.
5985 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5986 * data/push.c: Improve M4 quoting a little.
5987 (b4_generate_macro_args, b4_parenthesize): Remove.
5988 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5989 any time a pull parser is requested.
5990 Don't #define this as a wrapper around yypull_parse. Instead, when
5991 both push and pull are requested, make it a function that does that
5992 same thing.
5993 (yypull_parse): If there's a b4_prefix, #define this to
5994 b4_prefix[pull_parse] when both push and pull are requested.
5995 Don't define this as a function unless both push and pull are
5996 requested.
5997 Remove the yylexp argument and hard-code yylex invocation instead.
5998 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5999 %push-parser.
6000 * src/getargs.c (pull_parser): New global initialized to true.
6001 * getargs.h (pull_parser): extern it.
6002 * src/output.c (prepare): Insert pull_flag muscle.
6003 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6004 (prologue_declaration): Set both push_parser and pull_parser = true for
6005 %push-pull-parser. Set push_parser = true and pull_parser = false for
6006 %push-parser.
6007 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6008 %push-parser since there's no backward-compatibility concern here.
6009 Scan %push-pull-parser.
6010 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6011 instead of %push-parser.
6012 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6013 prototype it in the module that calls yyparse.
6014 * tests/input.at (Torturing the Scanner): Likewise.
6015 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6016
6017 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6018
6019 Update etc/bench.pl. Optimize push mode a little (the yyn change
6020 deserves most of the credit).
6021 * Makefile.am (SUBDIRS): Add etc subdirectory.
6022 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6023 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6024 yytoken, yyval, and yyloc declarations to...
6025 (yyparse or yypush_parse): ... here to improve performance. For
6026 yypush_parse invocations after the first, be sure to assign yyn its old
6027 value again.
6028 (yypstate_new): Don't bother initializing the yyresult field since the
6029 initial value isn't used.
6030 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6031 remove the #define that, in push mode, set it to yyps->NAME.
6032 * etc/Makefile.am: New.
6033 * etc/bench.pl: Remove and build it instead from...
6034 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6035 "tests/bison" from the build directory by default rather than just
6036 invoking "bison" from $PATH.
6037 (calc_grammar): Update push parser code: don't declare yylval globally,
6038 don't define yyparse_wrapper, and don't #define yyparse.
6039 (bench_grammar): Update to check all working combinations of yacc.c,
6040 push.c, impure, pure, pull, and push.
6041
6042 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6043
6044 For push mode, add pull wrappers around yypush_parse.
6045 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6046 (yypull_parse): New function wrapping yypush_parse.
6047 (yyparse): New #define wrapping yypull_parse.
6048 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6049 is declared.
6050 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6051 prototype yylex in the module that calls yyparse, and don't prototype
6052 yyparse there. Otherwise, the yyparse expansion won't compile.
6053 * tests/input.at (Torturing the Scanner): Likewise.
6054
6055 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6056
6057 Enable push parsers to operate in impure mode. Thus, %push-parser no
6058 longer implies %pure-parser. The point of this change is to move
6059 towards being able to test the push parser code by running the entire
6060 test suite as if %push-parser had been declared.
6061 * data/push.c (yypush_parse): For impure mode, remove the
6062 yypushed_char, yypushed_val, and yypushed_loc arguments.
6063 Instead, declare these as local variables initialized to the global
6064 yychar, yylval, and yylloc.
6065 For the first yypush_parse invocation only, restore the initial values
6066 of these global variables when it's time to read a token since they
6067 have been overwritten.
6068 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6069 %push-parser.
6070 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6071 %pure-parser along with %push-parser since this test case was designed
6072 for pure push parsers.
6073 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6074 (AT_YACC_OR_PUSH_IF): New.
6075 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6076 add a note that it's still wrong for some cases (as it has been for a
6077 while).
6078 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6079 %push-parser no longer implies %pure-parser.
6080
6081 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6082
6083 Remove some unnecessary differences between the pull parser code and
6084 the push parser code. This patch enables yynerrs in push mode.
6085 * data/push.c: Reformat M4 a little.
6086 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6087 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6088 because push mode is on. Instead, if pure mode is on, move yynerrs
6089 to...
6090 (b4_declare_parser_state_variables): ... here.
6091 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6092 to yyps->NAME so it can be used in yypush_parse.
6093 (yypush_parse): Don't omit uses of yynerrs in push mode.
6094
6095 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6096
6097 Fix bug such that the first pushed token's value and location are
6098 sometimes overwritten (sometimes by %initial-action) before being used.
6099 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6100 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6101 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6102 more closely mimic the pull parser logic.
6103 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6104 time to read a token, which is after any initialization of yylval and
6105 yylloc.
6106 (gottoken): Rename label to...
6107 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6108 user namespace.
6109
6110 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6111
6112 Rearrange initialization of the parser state variables so that the
6113 skeleton doesn't have to have a copy for pull mode and another for push
6114 mode. This patch also fixes at least a bug such that yylloc was not
6115 initialized (with b4_location_initial_line and
6116 b4_location_initial_column) upon calling yypush_parse. However, that
6117 initialization now overwrites the first token's location;
6118 %initial-action assigning @$ already did the same thing, and both bugs
6119 will be fixed in a later patch.
6120 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6121 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6122 yyss, yyvs, yyls, and yystacksize.
6123 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6124 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6125 yylsp.
6126 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6127 yyps->NAME so it can be used in yypush_parse.
6128 (yyparse or yypush_parse): For yypush_parse, don't print the
6129 "Starting parse" diagnostic for invocations after the first.
6130 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6131 yypush_parse, only do it for the first invocation.
6132 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6133 initialization to occur in yypush_parse but only on the first
6134 invocation.
6135
6136 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6137
6138 * data/push.c: Add CPP guards around push parser declarations in both
6139 the header and the code file.
6140 In the code file, move the push parser declarations to the same place
6141 they appear in the header file.
6142 Clean up the M4 some, especially the inconsistent underquoting in
6143 some b4_c_function_def and b4_c_function_decl uses.
6144
6145 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6146
6147 Encapsulate the push parser state variables into an M4 macro so the
6148 push skeleton doesn't have to list them again for pull mode's yyparse.
6149 For push mode, remove yypush_parse's local equivalents of these
6150 variables to eliminate unnecessary copying between the two sets at
6151 run-time. This patch also fixes at least a bug related to multiple
6152 %initial-action invocations in push mode.
6153 * data/push.c (b4_declare_parser_variables): Rename to...
6154 (b4_declare_scanner_communication_variables): ... this for clarity and
6155 update both uses.
6156 (b4_declare_yyparse_variables): Remove and move its contents to the one
6157 spot where it was invoked.
6158 (b4_declare_parser_state_variables): New macro containing the parser
6159 state variables required by push mode.
6160 (struct yypstate): Replace all fields but yynew with
6161 b4_declare_parser_state_variables.
6162 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6163 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6164 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6165 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6166 parser state variable declarations with
6167 b4_declare_parser_state_variables.
6168 Don't initialize parser state variables when calling yypush_parse since
6169 yypstate_new already does that.
6170 Invoke the user's initial action only upon the first yypush_parse
6171 invocation.
6172 Remove all code that copies between the local parser state variables
6173 and the yypstate.
6174
6175 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6176
6177 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6178 prevent a name collision in a future patch where these names will
6179 sometimes be #define'd.
6180 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6181 since it no longer has the same name as the existing argument.
6182 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6183
6184 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6185 and Joel E. Denny <jdenny@ces.clemson.edu>
6186
6187 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6188 that the argument is case-insensitive, and there's no `=' here.
6189 For the %skeleton entry, mention that %language is better.
6190 (Bison Options): Likewise for --language and --skeleton. Move the
6191 --skeleton entry so that the `Tuning the parser' section is sorted
6192 alphabetically on long options.
6193 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6194 %language directive in detail here; cross-reference the %language
6195 documentation instead.
6196 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6197 `%require "2.3b"' so that the example is always up-to-date.
6198 (Table of Symbols): Add entries for %language and %skeleton.
6199 * examples/extexi (normalize): Instead of replacing every %require
6200 argument with the current Bison version, just substitute for
6201 `@value{VERSION}'. This guarantees that we're testing what actually
6202 appears in the documentation.
6203 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6204 rather than `@VERSION@'.
6205
6206 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6207
6208 * NEWS: Reword the %language news a bit, and put it earlier.
6209
6210 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6211 Rewrite to simplify the logic.
6212 (language_argmatch): Likewise.
6213 (program_name): We now own this var.
6214 * src/getargs.h (struct bison_language): Use char[] rather than
6215 const char *.
6216
6217 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6218 Java is supported.
6219 * src/complain.c (program_name): Remove decl; no longer needed.
6220 * src/main.c (program_name): Remove; now belongs to getargs.
6221
6222 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6223
6224 * NEWS: Document %language.
6225
6226 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6227
6228 * data/c-skel.m4, data/c++-skel.m4: New files.
6229 * data/glr.c: Complain on push parsers.
6230
6231 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6232 over %skeleton.
6233 (Decl Summary): Document %language and %skeleton.
6234 (Command line): Document -L.
6235
6236 * examples/extexi: Rewrite %require directive.
6237 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6238
6239 * src/files.c (compute_exts_from_gc): Look in language structure
6240 for .y extension.
6241 (compute_file_name_parts): Check whether .tab should be added.
6242 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6243 (language, skeleton_arg, language_argmatch): New.
6244 (long_options): Add --language.
6245 (getargs): Use skeleton_arg, add -L/--language.
6246 * src/getargs.h: Include location.h.
6247 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6248 * src/output.c (prepare): Pick default skeleton from struct language.
6249 Don't dispatch C skeletons here.
6250 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6251 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6252 * src/scan-gram.l ("%language"): New rule.
6253
6254 * tests/calc.at: Test %skeleton and %language.
6255 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6256 (AT_GLR_IF): Look for %skeleton "glr.cc".
6257 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6258 (AT_YACC_IF): Reject %language.
6259
6260 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6261
6262 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6263 since it wasn't used; only the typedef name 'semantic_type' is needed.
6264 Also, omit trailing white space.
6265
6266 * bootstrap: Sync from coreutils.
6267 (gnulib_extra_files): Add build-aux/announce.gen.
6268 (slurp): Adjust .gitignore files like .cvsignore files.
6269 * build-aux/announce-gen: Remove from CVS, since bootstrap
6270 now creates this.
6271
6272 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6273
6274 Make %push-parser imply %pure-parser. This fixes several bugs; see
6275 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6276 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6277 pure_parser = true.
6278 * data/push.c: Don't bother testing b4_push_if when deciding whether
6279 to expand b4_declare_parser_variables globally.
6280 (yypush_parse): Likewise in here.
6281
6282 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6283 (yy_reduce_print): Reformat M4 for readability.
6284
6285 2006-12-15 Bob Rossi <bob@brasko.net>
6286 and Joel Denny <jdenny@ces.clemson.edu>
6287
6288 * data/push.c (yypstate): Add typedef, and update all uses of
6289 struct yypstate to just yypstate.
6290 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6291
6292 2006-12-14 Bob Rossi <bob@brasko.net>
6293
6294 * data/push.c (yypush_parse): Declare prototype regardless of
6295 %locations option.
6296
6297 2006-12-14 Bob Rossi <bob@brasko.net>
6298
6299 * data/push.c (yyparse): Remove the prototype and the #define when in
6300 push-parser mode.
6301
6302 2006-12-13 Bob Rossi <bob@brasko.net>
6303
6304 * data/push.c (yypstate_init): Rename to...
6305 (yypstate_new): ... this and use b4_c_function_def.
6306 (yypstate_delete): New.
6307 (yypush_parse): Change parameters yynval and yynlloc to be const.
6308 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6309 yypstate_delete functions.
6310
6311 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6312
6313 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6314 strange test case titles. Reported by Bob Rossi.
6315
6316 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6317
6318 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6319 of potential ambiguities in GLR grammers.
6320
6321 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6322
6323 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6324 `bison ', use m4_index instead of m4_substr since chopping up a string
6325 containing M4-special characters causes problems here.
6326
6327 Fix a couple of bugs related to special characters in user-specified
6328 file names, and make it easier for skeletons to compute output file
6329 names with the same file name prefix as Bison-computed output file
6330 names.
6331 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6332 b4_parser_file_name and b4_spec_defines_file instead of
6333 @output_parser_name@ and @output_header_name@, which are now redundant.
6334 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6335 b4_parser_file_name, b4_spec_defines_file, and the new
6336 @basename(FILENAME@) instead of @output_parser_name@ and
6337 @output_header_name@, which inappropriately escaped the file names as
6338 C string literals.
6339 * src/files.c (all_but_ext): Remove static qualifier.
6340 (compute_output_file_names): Move `free (all_but_ext)' to...
6341 (output_file_names_free): ... here since all_but_ext is needed later.
6342 * src/files.h (all_but_ext): Extern.
6343 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6344 exactly what MUSCLE_INSERT_STRING used to do.
6345 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6346 characters are escaped properly.
6347 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6348 all_but_ext.
6349 For pkgdatadir muscle, maintain previous functionality by using
6350 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6351 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6352 digraphs would never be expanded. Hopefully no one has M4-special
6353 characters in his Bison installation path.
6354 * src/scan-skel.l: Don't parse @output_header_name@ and
6355 @output_parser_name@ anymore since they're now redundant.
6356 In @output, use decode_at_digraphs.
6357 Parse a new @basename command that invokes last_component.
6358 (decode_at_digraphs): New.
6359 (BASE_QPUTS): Remove unused.
6360 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6361 (Output file name): New tests.
6362
6363 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6364
6365 Warn about output files that are generated by the skeletons and that
6366 conflict with other output files.
6367 * data/glr.c: Don't generate the header file here when glr.cc does.
6368 * src/files.c (file_names, file_names_count): New static globals.
6369 (compute_output_file_names): Invoke output_file_name_check for files
6370 not generated by the skeletons and remove existing checks.
6371 (output_file_name_check): New function that warns about conflicting
6372 output file names.
6373 (output_file_names_free): Free file_names.
6374 * src/files.h (output_file_name_check): Declare.
6375 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6376 the skeletons.
6377 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6378 (Conflicting output files): New tests.
6379
6380 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6381
6382 * doc/bison.texinfo: Fix a couple of typos.
6383
6384 2006-12-08 Bob Rossi <bob@brasko.net>
6385
6386 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6387 Rename to...
6388 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6389 update all uses.
6390 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6391 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6392 local pv.
6393 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6394 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6395
6396 2006-12-07 Bob Rossi <bob@brasko.net>
6397 and Joel Denny <jdenny@ces.clemson.edu>
6398
6399 * data/push.c (yypvarsinit): Change return type from void* to struct
6400 yypvars*. No longer cast to void* on return.
6401 (struct yypvars): Remove yylen since it need not be remembered between
6402 yypushparse invocations.
6403 (yypushparse): Don't copy between yylen and pv->yylen.
6404
6405 2006-12-05 Bob Rossi <bob@brasko.net>
6406
6407 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6408 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6409 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6410 (struct yypvars): Remove b4_declare_parser_variables.
6411 (yypvarsinit): Remove init code for removed variables.
6412 (global scope): Do not declare b4_declare_parser_variables if
6413 push or pure mode.
6414 (yypushparse): Add b4_declare_parser_variables.
6415 Init new local variables, and remove init code for removed
6416 yypvars variables.
6417 (yyparse): Delete.
6418 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6419 and yyparse for other modes.
6420 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6421 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6422 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6423 (AT_PURE_LEX_IF): True if pure or push parser.
6424
6425 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6426
6427 Document Yacc prologue alternatives and default %destructor's and
6428 %printer's as experimental. Don't mention Java yet. Discussed at
6429 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6430 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6431 (2.3a): Annotate this entry to say the old forms of these features were
6432 also experimental.
6433 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6434 Table of Symbols): Say they're experimental. Comment out any mention
6435 of Java (we'll want this back eventually).
6436
6437 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6438
6439 Support a file name argument to %defines. Deprecate `=' in
6440 %file-prefix, %name-prefix, and %output. Discussed at
6441 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6442 * NEWS (2.3a+): Mention.
6443 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6444 form of %defines, and remove `=' from entries for %file-prefix,
6445 %name-prefix, and %output.
6446 * src/parse-gram.y (prologue_declaration): Implement.
6447 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6448 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6449 all but one occurrence of %name-prefix.
6450 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6451 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6452 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6453 occurrence of each of %file-prefix and %output. Add check for %defines
6454 with argument.
6455 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6456 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6457 Remove the `=' from %output.
6458
6459 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6460
6461 Don't escape $ in test case titles since Autoconf 2.61 now does that
6462 correctly.
6463 * tests/actions.at (Default %printer and %destructor are not for error
6464 or $undefined): Here.
6465 (Default %printer and %destructor are not for $accept): Here.
6466 * tests/input.at (Invalid $n and @n): Here.
6467
6468 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6469
6470 Rename <!> to <>. Discussed starting at
6471 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6472 * NEWS (2.3a+): Update.
6473 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6474 Update.
6475 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6476 * src/scan-gram.l (INITIAL): Implement.
6477 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6478 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6479 comment.
6480 * tests/actions.at (Default tagless %printer and %destructor,
6481 Default tagged and per-type %printer and %destructor,
6482 Default %printer and %destructor are not for error or $undefined,
6483 Default %printer and %destructor are not for $accept,
6484 Default %printer and %destructor for mid-rule values): Update.
6485 * tests/input.at (Default %printer and %destructor redeclared,
6486 Unused values with default %destructor): Update.
6487
6488 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6489
6490 Don't let %prec take a nonterminal.
6491 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6492 token.
6493 * tests/input.at (%prec takes a token): New test checking that %prec
6494 won't take a nonterminal.
6495
6496 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6497
6498 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6499 it was double-quoted.
6500 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6501 grammar is maintained with Bison's highest standards.
6502 * src/getargs.c: Fix some typos in Doxygen comments.
6503
6504 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6505
6506 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6507 later. Reported by Paul Eggert in
6508 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6509 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6510 * src/scan-code.l (translate_action): Don't bother invoking
6511 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6512 (code_scanner_free): Instead of invoking
6513 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6514 which frees more.
6515 * src/scan-gram.l (gram_scanner_free): Likewise.
6516 * src/scan-skel.l (scan_skel): Likewise.
6517
6518 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6519
6520 * src/files.c (tr): Change return type to void.
6521 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6522 has been called previously for the same key.
6523 (muscle_find): Return storage instead of value so that
6524 --enable-gcc-warnings doesn't produce warnings that the return discards
6525 const. aver that the value and storage are the same since storage
6526 could potentially be NULL when value is not.
6527 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6528 same as 0.
6529
6530 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6531
6532 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6533 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6534 us a slightly cleaner distribution, and also works.
6535 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6536 gnulib changes.
6537
6538 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6539 and Paul Eggert <eggert@cs.ucla.edu>
6540
6541 Don't let Bison leak memory except when it complains.
6542 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6543 (spec_defines_file, dir_prefix): Now char *, not const char *,
6544 since they are freed.
6545 * src/files.c: Likewise.
6546 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6547 Likewise.
6548 (tr): Now operates in-place. All uses changed.
6549 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6550 values.
6551 (compute_file_name_parts, compute_output_file_names): Don't store
6552 read-only data in variables that will be freed.
6553 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6554 src_extension, and header_extension.
6555 (output_file_names_free): New public function to free
6556 spec_verbose_file, spec_graph_file, spec_defines_file,
6557 parser_file_name, and dir_prefix.
6558 * src/getargs.c (getargs): Don't store read-only data in variables that
6559 will be freed.
6560 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6561 (which previously existed but was unused), and quotearg_free.
6562 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6563 * src/muscle_tab.c: Likewise.
6564 (muscle_entry): Make the value char const *,
6565 and add a new storage member that is char * and can be freed.
6566 (muscle_entry_free): New private function.
6567 (muscle_init): Use it instead of free.
6568 (muscle_insert, muscle_grow): Update and use new storage member.
6569 (muscle_code_grow): Free the string passed to muscle_grow
6570 since it's not needed anymore.
6571 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6572 add a new `char *code' member.
6573 ("{...}"): Declare semantic type as code.
6574 * src/scan-code.h (translate_rule_action):
6575 (translate_symbol_action, translate_code, translate_action): Return
6576 `char const *' rather than `char *' since external code should not free
6577 these strings.
6578 * src/scan-code.l: Likewise.
6579 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6580 which is "{...}" in the parser.
6581 * tests/Makefile.am (maintainer-check-valgrind): Set
6582 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6583 Valgrind.
6584 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6585 complain.
6586 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6587 expecting a non-zero exit status sets --leak-check=summary and
6588 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6589 this case, and we don't want to hear about it.
6590
6591 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6592
6593 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6594 instead of from the template, to simplify configuration a bit.
6595 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6596 and m4/wint_t.m4, as they are needed with the latest gnulib.
6597
6598 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6599
6600 Disable unset/unused mid-rule value warnings by default, and recognize
6601 --warnings=midrule-values to enable them. Discussed starting at
6602 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6603 * NEWS (2.3a+): Mention.
6604 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6605 warnings): Add entry for midrule-values subargument.
6606 * src/reader.c (symbol_should_be_used): Don't return true just because
6607 the value is a set/used mid-rule value unless
6608 --warnings=midrule-values was specified.
6609 * tests/input.at (Unused values, Unused values before symbol
6610 declarations): Run tests with and without --warnings=midrule-values.
6611
6612 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6613 than LIST_FREE directly.
6614
6615 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6616
6617 Finish implementing --warnings=error, which should not be implied by
6618 --warnings=all (or by its synonyms -W and --warnings without
6619 subarguments).
6620 * src/complain.c (set_warning_issued): New function to report that
6621 warnings are being treated as errors and to record an error if so.
6622 Invoke...
6623 (warn_at, warn): ... here.
6624 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6625 "error - warnings are errors" does not appear above "all - all of the
6626 above".
6627 (getargs): For -W and --warnings without subarguments, don't let
6628 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6629 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6630
6631 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6632
6633 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6634 empty subargument list. For example: `bison --warnings= parser.y'.
6635
6636 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6637
6638 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6639 the parser header file so that gcc doesn't warn.
6640
6641 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6642
6643 Split the default %destructor/%printer into two kinds: <*> and <!>.
6644 Discussed starting at
6645 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6646 * NEWS (2.3a+): Mention.
6647 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6648 previous change today related to mid-rules.
6649 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6650 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6651 (TYPE_TAG_ANY): Add as <*>.
6652 (TYPE_TAG_NONE): Add as <!>.
6653 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6654 for <*> and <!>.
6655 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6656 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6657 * src/symlist.c (symbol_list_default_new): Split into tagged and
6658 tagless versions.
6659 (symbol_list_destructor_set, symbol_list_printer_set): Split
6660 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6661 SYMLIST_DEFAULT_TAGLESS.
6662 * src/symlist.h: Update symbol_list_default*_new prototypes.
6663 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6664 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6665 * src/symtab.c (default_destructor, default_destructor_location,
6666 default_printer, default_printer_location): Split each into tagged and
6667 tagless versions.
6668 (symbol_destructor_get, symbol_destructor_location_get,
6669 symbol_printer_get, symbol_printer_location_get): Implement tagged
6670 default and tagless default cases.
6671 (default_destructor_set, default_printer_set): Split each into tagged
6672 and tagless versions.
6673 * src/symtab.h: Update prototypes.
6674 * tests/actions.at (Default %printer and %destructor): Rename to...
6675 (Default tagless %printer and %destructor): ... this, and extend.
6676 (Per-type %printer and %destructor): Rename to...
6677 (Default tagged and per-type %printer and %destructor): ... this, and
6678 extend.
6679 (Default %printer and %destructor for user-defined end token): Extend.
6680 (Default %printer and %destructor are not for error or $undefined):
6681 Update.
6682 (Default %printer and %destructor are not for $accept): Update.
6683 (Default %printer and %destructor for mid-rule values): Extend.
6684 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6685 (Unused values with default %destructor): Extend.
6686
6687 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6688
6689 Don't apply the default %destructor/%printer to an unreferenced midrule
6690 value. Mentioned at
6691 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6692 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6693 like $@n instead of just @n so that the default %destructor/%printer
6694 logic doesn't see them as user-defined symbols.
6695 (symbol_is_dummy): Check for both forms of the name.
6696 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6697 name for which the midrule value is referenced in any action.
6698 * tests/actions.at (Default %printer and %destructor for mid-rule
6699 values): New test.
6700 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6701 for change to dummy symbol names.
6702
6703 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6704
6705 Warn about unset midrule $$ if the corresponding $n is used.
6706 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6707 $n usage.
6708 (packgram): Before invoking grammar_rule_check on any rule, make sure
6709 all actions have already been scanned in order to set `used' flags.
6710 Otherwise, checking that a midrule's $$ is set will not always work
6711 properly because the midrule check must forward-reference the midrule's
6712 parent rule.
6713 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6714 warning.
6715
6716 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6717
6718 More improvements to the documentation of the prologue alternatives:
6719 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6720 Bison manual.
6721 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6722 some text to clarify the relative importance of the new directives and
6723 to show how these directives may be viewed as code labels.
6724
6725 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6726
6727 Similar to the recently removed %before-header, add %code-top as the
6728 alternative to the pre-prologue. Mentioned at
6729 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6730 Also, let the prologue alternatives appear in the grammar section.
6731 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6732 (prologue_declaration): Move the existing prologue alternatives to...
6733 (grammar_declaration): ... here and add %code-top.
6734 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6735
6736 Clean up and extend documentation for the prologue alternatives.
6737 * NEWS (2.3a+): Describe prologue alternatives.
6738 * doc/bison.texinfo (Prologue): Move discussion of prologue
6739 alternatives to...
6740 (Prologue Alternatives): ... this new section, and extend it to discuss
6741 all 4 directives in detail.
6742 (Table of Symbols): Clean up discussion of prologue alternatives and
6743 add %code-top.
6744
6745 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6746
6747 DJGPP specific issues.
6748
6749 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6750 config.bat accordingly.
6751 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6752 * djgpp/config.site: Likewise.
6753
6754 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6755
6756 Replace %*-header with %provides, %requires, %code. See discussion at
6757 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6758
6759 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6760 (b4_user_start_header): Remove.
6761 * data/glr.c: Use new macros instead of b4_*start_header
6762 and b4_*end_header.
6763 * data/glr.cc: Likewise.
6764 * data/lalr1.cc: Likewise.
6765 * data/push.c: Likewise.
6766 * data/yacc.c: Likewise.
6767
6768 * doc/bison.texinfo: Remove %before-header, rename
6769 %{start,end,after}-header to %requires, %provides, %code.
6770
6771 * src/parse-gram.y: Likewise (also rename token names accordingly).
6772 * src/scan-gram.l: Likewise.
6773 * tests/actions.at: Likewise.
6774
6775 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6776
6777 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6778 Problem reported by Joel E. Denny.
6779
6780 2006-10-14 Jim Meyering <jim@meyering.net>
6781
6782 (Sync from coreutils.)
6783 Work also when the working directory (with e.g. coreutils sources)
6784 is version controlled with git, rather than CVS.
6785 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6786 rather than CVS.
6787 In messages and comments, say e.g., "checked-out sources",
6788 rather than "CVS sources".
6789 (version_controlled_file): New function. Work for git as well as
6790 for CVS. Don't use grep's -q option.
6791 (slurp): Call it here, in place of CVS-specific code.
6792
6793 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6794
6795 Fix testsuite for ./configure --enable-gcc-warnings:
6796 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6797 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6798 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6799 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6800 * test/regression.at (Diagnostic that expects two alternatives):
6801 Likewise.
6802
6803 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6804
6805 * bootstrap.conf (gnulib_modules): Add config-h.
6806 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6807 worry about HAVE_CONFIG_H.
6808 * lib/abitset.c: Likewise.
6809 * lib/bitset.c: Likewise.
6810 * lib/bitset_stats.c: Likewise.
6811 * lib/bitsetv-print.c: Likewise.
6812 * lib/bitsetv.c: Likewise.
6813 * lib/ebitset.c: Likewise.
6814 * lib/get-errno.c: Likewise.
6815 * lib/lbitset.c: Likewise.
6816 * lib/subpipe.c: Likewise.
6817 * lib/timevar.c: Likewise.
6818 * lib/vbitset.c: Likewise.
6819 * lib/bitset.c: Include "bitset.h" first, to test interface.
6820 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6821 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6822 * lib/bitsetv.c: Include "bitsetv.h" first.
6823 * lib/get-errno.c: Include "get-errno.h" first.
6824 * m4/.cvsignore: Add config-h.m4.
6825 * tests/actions.at (Default %printer and %destructor for ...):
6826 Adjust expected line numbers in output to reflect removal of #if
6827 HAVE_CONFIG_H lines.
6828 * tests/glr-regression.at (Missed %merge type warnings when ...):
6829 Likewise.
6830 * tests/regression.at (Braced code in declaration in rules section):
6831 Likewise.
6832 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6833 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6834 Include <config.h> unconditionally.
6835
6836 * bootstrap: Sync from coreutils, as follows:
6837
6838 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6839
6840 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6841 variable was sometimes used without being initialized. This
6842 messed up the installation of the INSTALL file in some cases.
6843
6844 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6845
6846 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6847 --copy. Inspired by a suggestion from Bruno Haible.
6848
6849 2006-10-03 Jim Meyering <jim@meyering.net>
6850
6851 * bootstrap: Undo last change to this file, since now gnulib-tool
6852 sticks with the automake default in generating dependencies.
6853
6854 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6855
6856 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6857 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6858
6859 * doc/bison.1: Add copyright notice.
6860
6861 * data/glr.c: Don't include <stdarg.h>; not used.
6862
6863 * NEWS: The -g and --graph options now output graphs in Graphviz
6864 DOT format, not VCG format.
6865 * doc/bison.1: Likewise.
6866 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6867 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6868 of this change in
6869 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6870 * TODO: Remove Graphviz entry.
6871 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6872 remove vcg.c, vcg.h, vcg_defaults.h.
6873 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6874 * src/graphviz.c, src/graphviz.h: New files.
6875 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6876 * src/files.h: Make comment more generic.
6877 * src/main.c (main): Likewise.
6878 * src/print_graph.h: Likewise.
6879 * src/getargs.c (usage): Make usage description more generic.
6880 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6881 (static_graph, fgraph): Remove. All uses changed to pass
6882 arguments instead of sharing a static var.
6883 (print_core, print_actions, print_state, print_graph):
6884 Output graphviz format rather than VCG format.
6885 * tests/.cvsignore: Remove *.vcg; add *.dot.
6886 * tests/output.at: Expect *.dot files, not *.vcg files.
6887
6888 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6889 accommodates the 2006-10-08 change.
6890
6891 2006-10-11 Bob Rossi <bob@brasko.net>
6892
6893 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6894 (b4_yyssa, b4_yyerror_range): New macros.
6895 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6896 (yypvarsinit): Remove init of removed fields.
6897 (yypushparse): Remove use of removed fields; use new macros instead.
6898
6899 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6900
6901 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6902 in a push parser. Reindent slightly to match yacc.c better.
6903
6904 2006-10-11 Bob Rossi <bob@brasko.net>
6905
6906 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6907 yymsg_alloc fields.
6908 (yypvarsinit, yypushparse): Remove init of removed fields.
6909 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6910
6911 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6912
6913 * THANKS: Add Paolo Bonzini and Bob Rossi.
6914
6915 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6916
6917 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6918 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6919 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6920 b4_define_user_cde and uses): Remove.
6921 (b4_comment, b4_prefix, b4_sync_start): New.
6922 * data/bison.m4: New file, with most of the content removed from c.m4.
6923 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6924 * src/output.c (output_skeleton): Pass bison.m4.
6925 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6926 only if specified.
6927
6928 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 Fix test failure reported by Tom Lane in
6931 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6932 and try to make such failures easier to catch in the future.
6933 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6934 that's now the caller's responsibility.
6935 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6936 Set yychar = YYEOF if it's negative.
6937 * tests/actions.at (yylex): Abort if asked to read past EOF.
6938 * tests/conflicts.at (yylex): Likewise.
6939 * tests/cxx-type.at (yylex): Likewise.
6940 * tests/glr-regression.at (yylex): Likewise.
6941 * tests/input.at (yylex): Likewise.
6942 * tests/regression.at (yylex): Likewise.
6943 * tests/torture.at (yylex): Likewise.
6944
6945 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6946
6947 Fix problems with translating English-language diagnostics.
6948 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6949 respect to bison-runtime pot generation. The YY_ stuff
6950 wasn't being captured.
6951 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6952 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6953 * runtime-po/POTFILES.in: Add data/push.c.
6954
6955 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6956
6957 Merge bootstrap changes from coreutils.
6958
6959 2006-09-28 Jim Meyering <jim@meyering.net>
6960
6961 Automatically generated dependencies are important even
6962 when all of the sources in a directory come from gnulib.
6963 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6964 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6965
6966 2006-09-23 Jim Meyering <jim@meyering.net>
6967
6968 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6969
6970 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6971
6972 * bootstrap: Add support for --force.
6973 (usage): New function. Describe usage less tersely.
6974 (CVS_only_file): New var.
6975
6976 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6977
6978 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6979 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6980 Adjust white space and comments to match GNU style better.
6981
6982 2006-09-20 Bob Rossi <bob@brasko.net>
6983
6984 * data/push.c (yyresult_get): Remove function.
6985 (YYPUSH_MORE): Add #define.
6986 (yypushparse): Modify return value.
6987
6988 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6989
6990 * stamp-h.in: Remove; no longer needed.
6991 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6992 Remove config.h, config.hin, intl (no longer created).
6993 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6994 stamp-h1.
6995
6996 Sync bootstrap from coreutils, as follows:
6997
6998 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6999
7000 * bootstrap (symlink_to_gnulib): New function.
7001 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7002 to copies-of-gnulib.
7003 (cp_mark_as_generated, slurp, gnulib_files):
7004 Avoid making a copy if it's the same as the old version.
7005 (gnulib_files): Add support for this variable (used by Bison).
7006
7007 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7008
7009 * src/getargs.c (usage): Rework to use conventions similar to
7010 coreutils, to make translation a bit easier and the code a bit
7011 smaller. Problem reported by Tim Van Holder.
7012
7013 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7014
7015 Use some of gnulib's new modules, taken from coreutils.
7016
7017 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7018 * bootstrap.conf: New file.
7019 (gnulib_modules): Add configmake, inttypes, unistd.
7020 (XGETTEXT_OPTIONS): Add complain, complain_at,
7021 fatal, fatal_at, warn, warn_at, unexpected_end.
7022 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7023 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7024 (gl_EARLY): Add.
7025 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7026 (gl_INIT): Add
7027 (GNULIB_AUTOCONF_SNIPPET): Remove.
7028 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7029 the pickiest.
7030 * lib/.cvsignore: Add inttypes_.h.
7031 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7032 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7033 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7034 no-longer-necessary initializations.
7035 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7036 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7037 use the unistd module.
7038 * src/system.h: Likewise.
7039 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7040 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7041 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7042 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7043 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7044 * src/system.h: Include inttypes.h unconditionally, now that we
7045 use the inttypes module. Don't bother to include stdint.h, since
7046 inttypes.h now does that for us.
7047 (LOCALEDIR): Remove, now that we use the configmake module.
7048 * src/getargs.c: Include configmake.h.
7049 * src/main.c: Likewise.
7050 * src/output.c: Likewise.
7051 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7052 not from $abs_top_builddir, since config.h moved.
7053
7054
7055 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7056 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7057
7058 * src/parse-gram.y (symbol_declaration): Don't put statements
7059 before declarations; it's not portable to C89.
7060 * src/scan-code.l (handle_action_at): Likewise.
7061
7062 * src/scan-code.l: Always initialize braces_level; the old code
7063 left it uninitialized and therefore had undefined behavior.
7064
7065 Don't attempt to redefine 'assert', since it runs afoul of
7066 systems where standard headers (mistakenly) include <assert.h>.
7067 Instead, define and use our own alternative, called 'aver'.
7068 * src/reader.c: Don't include assert.h, since we no longer
7069 use assert.
7070 * src/scan-code.l: Likewise.
7071 * src/system.h (assert): Remove, replacing with....
7072 (aver): New function, taking a bool arg. All uses changed.
7073 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7074 not merely an integer.
7075
7076 2006-09-15 Bob Rossi <bob@brasko.net>
7077
7078 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7079 * data/c.m4 (YYPUSH): New.
7080 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7081 * src/getargs.c (push_parser): New var.
7082 * src/getargs.h (push_parser): New declaration.
7083 * src/output.c (prepare): Add macro insertion of `push_flag'.
7084 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7085 (prologue_declaration): Parse %push-parser.
7086 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7087 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7088 list of removed lines from the traces observed.
7089 (AT_CHECK_CALC_LALR): Added push parser tests.
7090
7091 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7092
7093 * NEWS: Version 2.3a.
7094 * configure.ac (AC_INIT): Likewise.
7095
7096 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7097 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7098 due to header ordering dependencies. I don't know why the #define
7099 was there.
7100
7101 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7102 runtime cost when YYDEBUG is not defined, and so that some tests
7103 that used to fail now work. Problem and initial suggestion by
7104 Paolo Bonzini.
7105 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7106 * data/glr.cc (b4_parser_class_name):
7107 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7108 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7109 (yydebug_) [YYDEBUG]: New member.
7110 (yycdebug_): Now defined only if YYDEBUG.
7111 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7112 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7113 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7114 if YYYDEBUG.
7115 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7116 Define only if YYDEBUG.
7117 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7118 set_debug_level.
7119 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7120 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7121 AT_CHECK_CALC_GLR_CC that are working now.
7122
7123 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7124
7125 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7126 We don't need them in glr.cc, and glr.c defines them.
7127 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7128 assumes that defining it to anything is the same as defining
7129 it to 1. Problem reported by Paolo Bonzini.
7130
7131 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7132
7133 * data/c.m4 (b4_null, b4_case): Define.
7134 * src/output.c (prepare_symbols): Use b4_null.
7135 (user_actions_output): Use b4_case.
7136
7137 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7138
7139 * data/glr.c (b4_shared_declarations): Put start-header first,
7140 before any #includes that we generate, so that feature-test
7141 macros work. Problem reported by Michael Deutschmann in
7142 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7143 * data/lalr1.cc: Likewise.
7144 * doc/bison.texinfo (Prologue): Document that feature-test macros
7145 should be defined before any Bison declarations.
7146 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7147 that depend on location.hh after, not before, Bison decls, since
7148 we now include location.hh after the first user prologue.
7149
7150 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7151 Sander Brandenburg in
7152 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7153 Also, fix minor white space and comment issues.
7154 (Prologue): Mention that it's better to define feature-test macros
7155 before Bison declarations. Problem reported by Michael Deutschmann.
7156
7157 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7158 by Jim Meyering.
7159 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7160 This adjusts to recent gnulib changes.
7161
7162 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7163
7164 Finish implementation of per-type %destructor/%printer. Discussed
7165 starting at
7166 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7167 and
7168 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7169 * NEWS (2.3+): Add a description of this feature to the default
7170 %destructor/%printer description.
7171 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7172 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7173 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7174 list node contains a semantic type.
7175 * src/symtab.c, src/symtab.h: Extend with a table that associates
7176 semantic types with their %destructor's and %printer's.
7177 (semantic_type_from_uniqstr, semantic_type_get,
7178 semantic_type_destructor_set, semantic_type_printer_set): New functions
7179 composing the public interface of that table.
7180 (symbol_destructor_get, symbol_destructor_location_get,
7181 symbol_printer_get, symbol_printer_location_get): If there's no
7182 per-symbol %destructor/%printer, look up the per-type before trying
7183 the default.
7184 * tests/actions.at (Per-type %printer and %destructor): New test case.
7185 * tests/input.at (Default %printer and %destructor redeclared):
7186 Extend to check that multiple occurrences of %symbol-default in a
7187 single %destructor/%printer declaration is an error.
7188 (Per-type %printer and %destructor redeclared, Unused values with
7189 per-type %destructor): New test cases.
7190
7191 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7192
7193 Require default %destructor/%printer to be declared using
7194 %symbol-default instead of an empty symbol list, and start working on
7195 new per-type %destructor/%printer. Discussed at
7196 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7197 * NEWS (2.3+): Add %symbol-default to example.
7198 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7199 (Table of Symbols): Add entry for %symbol-default.
7200 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7201 (generic_symlist, generic_symlist_item): New nonterminals for creating
7202 a list in which each item is a symbol, semantic type, or
7203 %symbol-default.
7204 (grammar_declaration): Use generic_symlist in %destructor and %printer
7205 declarations instead of symbols.1 or an empty list.
7206 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7207 for changes to symbol_list.
7208 * src/reader.c: Update for changes to symbol_list.
7209 * src/scan-code.l: Likewise.
7210 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7211 * src/symlist.c, src/symlist.h: Extend such that a list node may
7212 represent a semantic type or a %symbol-default in addition to just an
7213 ordinary symbol. Add switched functions for setting %destructor's and
7214 %printer's.
7215 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7216 %destructor/%printer declarations.
7217
7218 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7219
7220 Whether the default %destructor/%printer applies to a particular symbol
7221 isn't a question of whether the user *declares* that symbol (in %token,
7222 for example). It's a question of whether the user by any means
7223 *defines* the symbol at all (by simply using a char token, for
7224 example). $end is defined by Bison whereas any other token with token
7225 number 0 is defined by the user. The error token is always defined by
7226 Bison regardless of whether the user declares it with %token, but we
7227 may one day let the user define error as a nonterminal instead.
7228 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7229 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7230 the meaning of "user-defined".
7231 * tests/actions.at (Default %printer and %destructor for user-declared
7232 end token): Rename to...
7233 (Default %printer and %destructor for user-defined end token): ...
7234 this.
7235
7236 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7237 computation of whether to apply the default, don't maintain a list of
7238 every Bison-defined symbol. Instead, just check for a first character
7239 of '$', which a user symbol cannot have, and check for the error token.
7240
7241 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7242
7243 Don't apply the default %destructor or %printer to the error token,
7244 $undefined, or $accept. This change fits the general rule that the
7245 default %destructor and %printer are only for user-declared symbols,
7246 and it solves several difficulties that are described in the new test
7247 cases listed below.
7248 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7249 * tests/actions.at (Default %printer and %destructor are not for error
7250 or $undefined, Default %printer and %destructor are not for $accept):
7251 New test cases.
7252
7253 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7254
7255 Allow %start after the first rule.
7256 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7257 when parsing the first rule.
7258 (check_and_convert_grammar): Search for it here after all grammar
7259 declarations have been parsed. Skip midrules, which have dummy LHS
7260 nonterminals.
7261 * src/symtab.c (symbol_is_dummy): New function.
7262 * src/symtab.h (symbol_is_dummy): Declare it.
7263 * tests/input.at (%start after first rule): New test.
7264
7265 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7266
7267 Redo some of the previous commit: add back the ability to use
7268 non-aliased/undeclared string literals since it might be useful to
7269 those declaring %token-table.
7270 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7271 commit: don't worry about complaints from symbols_pack.
7272 * src/symtab.c (symbol_new, symbol_class_set,
7273 symbol_check_alias_consistency): Undo changes in previous commit: count
7274 each string literal as a new symbol and token, assign it a symbol
7275 number, and don't complain about non-aliased string literals.
7276 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7277 and token counts but does still set aliased tokens to the same number,
7278 symbol_pack_processor now leaves empty slots in the symbols array.
7279 Remove those slots.
7280 * tests/regression.at (Undeclared string literal): Remove test case
7281 added in previous commit since non-aliased string literals are allowed
7282 again.
7283 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7284 remove unnecessary string literal declarations.
7285 * tests/sets.at (Firsts): Likewise.
7286
7287 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7288
7289 Don't allow an undeclared string literal, but allow a string literal to
7290 be used before its declaration.
7291 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7292 symbols_pack complained.
7293 * src/symtab.c (symbol_new): Don't count a string literal as a new
7294 symbol.
7295 (symbol_class_set): Don't count a string literal as a new token, and
7296 don't assign it a symbol number since symbol_make_alias does that.
7297 (symbol_make_alias): It's not necessary to decrement the symbol and
7298 token counts anymore. Don't assume that an alias declaration occurs
7299 before any uses of the identifier or string, and thus don't assert that
7300 one of them has the highest symbol number so far.
7301 (symbol_check_alias_consistency): Complain if there's a string literal
7302 that wasn't declared as an alias.
7303 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7304 symbol_pack asserts that every token has been assigned a symbol number
7305 although undeclared string literals have not.
7306 * tests/regression.at (String alias declared after use, Undeclared
7307 string literal): New test cases.
7308 (Characters Escapes, Web2c Actions): Declare string literals as
7309 aliases.
7310 * tests/sets.at (Firsts): Likewise.
7311
7312 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7313
7314 In the grammar scanner, STRING_FINISH unclosed constructs and return
7315 them to the parser in order to improve error messages.
7316 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7317 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7318 * tests/input.at (Unclosed constructs): New test case.
7319 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7320 seen.
7321
7322 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7323 unused global.
7324
7325 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7326
7327 Handle string aliases for character tokens correctly.
7328 * src/symtab.c (symbol_user_token_number_set): If the token has an
7329 alias, check and set its alias's user token number instead of its own,
7330 which is set to indicate the alias. Previously, every occurrence of
7331 the character token in the grammar overwrote that alias indicator with
7332 the character code.
7333 * tests/input.at (String aliases for character tokens): New test.
7334
7335 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7336
7337 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7338
7339 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7340
7341 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7342 to prevent failures when building on older platforms.
7343 Check for autopoint failure.
7344 Set XGETTEXT_OPTIONS to values that check for C format strings,
7345 so that translators are warned about them (this also helps
7346 prevent core dumps).
7347
7348 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7349 function, since it simplifies our code a bit.
7350
7351 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7352 rather than -W, so we don't get bogus warnings about sign comparisons.
7353 Add -Wpointer-arith, since that warning is useful (it reports code
7354 that does not conform to C89 and that some compilers reject).
7355 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7356 since it's no longer needed.
7357
7358 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7359
7360 Clean up scanners a bit.
7361 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7362 definitions so gcc won't warn when obstack_for_string is unused.
7363 * src/scan-code.l: config.h and system.h are already #include'd by
7364 scan-code-c.c, so get rid of them here.
7365 * src/scan-gram.l: Likewise.
7366 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7367 definitions rather than duplicating the rest of it.
7368 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7369
7370 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7371
7372 Suppress signed/unsigned comparison warnings for yycheck.
7373 * data/c.m4 (b4_safest_int_type): New macro.
7374 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7375 a signed int type, cast it to b4_safest_int_type first.
7376 * data/yacc.c: Likewise.
7377 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7378 also overwritten.
7379
7380 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7381
7382 * doc/bison.texinfo: Fix some typos.
7383
7384 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7385
7386 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7387 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7388
7389 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7390 the latest gnulib does this a different way.
7391 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7392 translation was patched, so stop omitting it.
7393
7394 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7395
7396 Enable declaration of default %printer/%destructor. Make the parser
7397 use these for all user-declared grammar symbols for which the user does
7398 not declare a specific %printer/%destructor. Thus, the parser uses it
7399 for token 0 if the user declares it but not if Bison generates it as
7400 $end. Discussed starting at
7401 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7402 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7403 and
7404 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7405 * NEWS (2.3+): Mention.
7406 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7407 declare a %destructor for a mid-rule's semantic value. It's just
7408 impossible to declare one specific to it.
7409 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7410 code. Describe default %destructor form.
7411 * src/parse-gram.y (grammar_declaration): Parse default
7412 %printer/%destructor declarations.
7413 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7414 and symbol_destructor_location_get rather than accessing the destructor
7415 and destructor_location members of struct symbol.
7416 (symbol_printers_output): Likewise but for %printer's.
7417 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7418 again.
7419 * src/symtab.c (default_destructor, default_destructor_location,
7420 default_printer, default_printer_location): New static global
7421 variables to record the default %destructor and %printer.
7422 (symbol_destructor_get, symbol_destructor_location_get,
7423 symbol_printer_get, symbol_printer_location_get): New functions to
7424 compute the appropriate %destructor and %printer for a symbol.
7425 (default_destructor_set, default_printer_set): New functions to set the
7426 default %destructor and %printer.
7427 * src/symtab.h: Prototype all those new functions.
7428 * tests/actions.at (Default %printer and %destructor): New test to
7429 check that the right %printer and %destructor are called, that they're
7430 not called for $end, and that $$ and @$ work correctly.
7431 (Default %printer and %destructor for user-declared end token): New
7432 test to check that the default %printer and %destructor are called for
7433 a user-declared end token.
7434 * tests/input.at (Default %printer and %destructor redeclared, Unused
7435 values with default %destructor): New tests to check related grammar
7436 warnings and errors.
7437
7438 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7439
7440 Clean up handling of %destructor for the end token (token 0).
7441 Discussed starting at
7442 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7443 and
7444 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7445
7446 Make the skeletons consistent in how they pop the end token and invoke
7447 its %destructor.
7448 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7449 state, which has token number 0, since this would invoke the
7450 %destructor for the end token.
7451 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7452 until after shifting the end token, or else it won't be popped.
7453 * data/yacc.c (yyparse): Likewise.
7454
7455 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7456 it's the end token. Upon termination, destroy an unshifted lookahead
7457 even when it's the end token.
7458 * data/lalr1.cc (yy::parser::parse): Likewise.
7459 * data/yacc.c (yyparse): Likewise.
7460
7461 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7462 value warnings for the end token when the user gives the end token a
7463 %destructor.
7464
7465 * tests/actions.at (Printers and Destructors): Test all the above.
7466
7467 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7468
7469 Update to latest gnulib and gettext versions.
7470 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7471 Add fopen-safer.
7472 (gnulib_files): Add m4/warning.m4. Don't worry about files
7473 overwritten by autopoint.
7474 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7475 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7476 rejects them.
7477 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7478 so that we can remove the intl files at a better time.
7479 (intl_files_to_remove): Remove aclocal.m4, since it gets
7480 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7481 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7482 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7483 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7484 Remove datarootdir hack; no longer needed.
7485 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7486 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7487 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7488 strdup.h.
7489 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7490 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7491
7492 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7493
7494 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7495 it with --assume-autoconf='latest-stable'.
7496
7497 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7498
7499 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7500 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7501 YYSTYPE' and `{'.
7502 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7503 those from muscle_tab.c since the old ones are misleading.
7504
7505 2006-07-13 Akim Demaille <akim@epita.fr>
7506
7507 Support %define "KEY" {VALUE}.
7508 * src/scan-code.h, src/scan-code.l (translate_action)
7509 (translate_rule_action, translate_symbol_action, translate_code):
7510 Return char *, not const char *.
7511 * src/parse-gram.y (declaration): Rename as...
7512 (prologue_declaration): this.
7513 (string_content): Remove this nonterminal, use STRING.
7514 (braceless, content, content.opt): New nonterminal.
7515 Use them.
7516 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7517 as value.
7518 * src/scan-gram.l (getargs.h): Don't include it.
7519
7520 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7521
7522 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7523 rather than a for-loop that declares a local bool variable. This
7524 should work around a compatibility problem with a Cray x1e C++
7525 compiler reported by Hung Nguyen in
7526 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7527 The for-loop was introduced in the 2004-11-17 change but I don't
7528 know why it was needed.
7529
7530 2006-07-12 Akim Demaille <akim@epita.fr>
7531
7532 * data/c.m4: Comment changes.
7533
7534 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7535
7536 * src/complain.c (error_message, ERROR_MESSAGE): New.
7537 To factor...
7538 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7539 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7540
7541 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7542
7543 * NEWS: Instead of %union, you can define and use your own union type
7544 YYSTYPE if your grammar contains at least one <type> tag.
7545 Your YYSTYPE need not be a macro; it can be a typedef.
7546 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7547 (Union Decl, Decl Summary): Document this.
7548 * data/glr.c (YYSTYPE): Implement this.
7549 * data/glr.cc (YYSTYPE): Likewise.
7550 * data/lalr1.cc (YYSTYPE): Likewise.
7551 * data/yacc.c (YYSTYPE): Likewise.
7552 * src/output.c (prepare): Output tag_seen_flag.
7553 * src/parse-gram.y (declaration, grammar_declaration):
7554 Use 'union_seen' rather than 'typed' to determine whether
7555 %union has been seen, since grammars can now be typed without
7556 %union.
7557 (symbol_declaration, type.opt, symbol_def):
7558 Keep track of whether a tag has been seen.
7559 * src/reader.c (union_seen, tag_seen): New vars.
7560 (typed): remove.
7561 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7562 * src/scan-code.l (untyped_var_seen): New variable.
7563 (handle_action_dollar): Adjust to above changes.
7564 (handle_action_dollar, handle_action_at):
7565 Improve overflow checking for outlandish numbers.
7566 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7567 avoid new diagnostics generated by above changes.
7568 * tests/regression.at (YYSTYPE typedef): Add test to check
7569 for type tags without %union.
7570
7571 * src/symlist.c (symbol_list_length): Return int, not unsigned
7572 int, since callers expect int. This may need to get revisited
7573 once we have proper integer overflow checking.
7574
7575 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7576 object is now static.
7577
7578 * src/getargs.c (flags_argmatch): Return void, not int,
7579 to pacify ./configure --enable-gcc-warnings.
7580
7581 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7582 since last_string is already defined to FLEX_PREFIX (last_string).
7583
7584 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7585
7586 Implement --warnings/-W.
7587 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7588 replaced by...
7589 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7590 Adjust callers.
7591 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7592 (warnings_args, warnings_types): New.
7593 (getargs, short_options, long_options): Accept -W/--warnings.
7594 Sort the options by alphabetical order, upper case letter right
7595 before its lower case.
7596
7597 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7598
7599 Change %merge result type clash warnings to errors. Discussed at
7600 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7601 * src/reader.c (record_merge_function_type): Use complain_at.
7602 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7603 declared later): Update test case results.
7604
7605 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7606
7607 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7608 to be in alphabetical order.
7609 (trace_args): Spelling fixes.
7610
7611 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7612
7613 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7614 so they don't collide with user-defined macros.
7615 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7616 this was never guaranteed, and now that we're using gnulib stdint,
7617 which defines int_fast16_t to long int, the problem is exposed.
7618
7619 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7620
7621 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7622 need the full POSIX semantics (and weren't implementing them
7623 anyway).
7624
7625 Adjust to Autoconf 2.60 and today's gnulib.
7626 * bootstrap (gnulib_modules): Add stdint.
7627 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7628 no longer copies it.
7629 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7630 since stdint needs the former and wcwidth (which is now required
7631 by mbswidth) needs the latter.
7632 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7633 work around a compatibility glitch between gettext 0.14.6 and
7634 Autoconf 2.60.
7635 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7636 Do not check for uintptr_t, since new stdint module does the right
7637 thing.
7638 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7639 Add stdint.h, stdint_.h, wcwidth.h.
7640 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7641 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7642 stdint.m4, wchar_t.m4, wcwidth.m4.
7643 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7644 usual order for ../lib/*.h files.
7645 (file_name_split): Use last_component, not base_name, to adjust
7646 to gnulib changes.
7647 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7648 for ../lib/*.h files.
7649 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7650 Define unconditionally, since we now assume the stdint module.
7651 * src/scan-skel.l: Include <dirname.h>.
7652 (BASE_QPUTS): Use last_component, not base_name.
7653 * src/system.h: Include <unlocked-io.h> in the usual order
7654 for ../lib/*.h files. Include <stdint.h> unconditionally,
7655 since we now use the stdint module.
7656 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7657 HAVE_UINTPTR_T, since we now use the stdint module.
7658 (base_name): Remove decl, since files now include <dirname.h>
7659 to get the decl.
7660
7661 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7662
7663 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7664 New, default to 1.
7665 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7666 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7667 default.
7668 * tests/calc.at: Adjust.
7669
7670 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7671
7672 * data/c.m4 (b4_basename): New.
7673 (b4_syncline): Also output the location of its invocation (from
7674 the skeleton).
7675 (b4_user_action, b4_define_user_action, b4_user_actions)
7676 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7677 (b4_user_stype): New.
7678 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7679
7680 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7681
7682 In the grammar file, the first column is 1 not 0 on the first line as
7683 on every other line.
7684 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7685 * tests/input.at (Torturing the Scanner): Update output.
7686
7687 * src/scan-gram.l (scanner_cursor): Declare it static.
7688
7689 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7690
7691 In warnings, say "previous declaration" rather than "first
7692 declaration".
7693 * src/symtab.c (redeclaration): Do that here.
7694 * src/reader.c (record_merge_function_type): In the case of a result
7695 type clash, report the previous declaration rather than the very first
7696 one in the grammar file.
7697 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7698 declared later): Add a third declaration to check this behavior.
7699 * tests/input.at (Incompatible Aliases): Update output.
7700
7701 2006-06-27 Akim Demaille <akim@epita.fr>
7702
7703 * doc/Doxyfile.in: New.
7704 * doc/Makefile.am: Use it.
7705 * src/lalr.h, src/symtab.h: Initial doxygenation.
7706
7707 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7708
7709 Don't miss %merge result type warnings just because the LHS types are
7710 declared after the %merge. This continues the effort of the previous
7711 patch.
7712 * src/reader.c (get_merge_function): Don't set the merger type yet.
7713 (record_merge_function_type): New function for setting the merger type
7714 and checking for clashes.
7715 (grammar_current_rule_merge_set): Set the location of the %merge for
7716 the current rule.
7717 (packgram): Invoke record_merge_function_type for each rule now that
7718 all symbol type declarations have been parsed.
7719 * src/reader.h (merger_list.type_declaration_location): New member
7720 storing the location of the first %merge from which the type for this
7721 merging function was derived.
7722 * src/symlist.h (symbol_list.merger_declaration_location): New member
7723 storing the location of a rule's %merge, if any.
7724 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7725 declared later): New test to catch the error fixed by the above patch.
7726
7727 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7728
7729 Get action warnings (grammar_rule_check) right even when symbol
7730 declarations appear after the rules. Discussed at
7731 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7732 and
7733 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7734 Don't mistake the type of $$ in a midrule to be that of its parent
7735 rule's $$.
7736 * src/reader.c (grammar_current_rule_end): Don't invoke
7737 grammar_rule_check yet since not all symbol declarations may have been
7738 parsed yet.
7739 (grammar_midrule_action): Likewise.
7740 Don't record whether the midrule's $$ has been used yet since actions
7741 haven't been translated yet.
7742 Record the midrule's parent rule and its RHS index within the parent
7743 rule.
7744 (grammar_current_rule_action_append): Don't translate the action yet
7745 since not all symbol declarations may have been parsed yet and, thus,
7746 warnings about types for $$, $n, @$, and @n can't be reported yet.
7747 (packgram): Translate the action and invoke grammar_rule_check now that
7748 all symbol declarations have been parsed.
7749 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7750 after parsing the entire grammar file, the symbol list here in the case
7751 of a midrule is actually the midrule's empty RHS, so reference its
7752 parent rule's RHS where necessary.
7753 On the other hand, now that you can already know it's a midrule, you
7754 aren't forced to think $$ has the same type as its parent rule's $$.
7755 (handle_action_at): In the case of a midrule, reference the parent rule
7756 where necessary.
7757 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7758 members.
7759 (symbol_list_length): Now that this is invoked after all rules have
7760 been parsed, a NULL symbol (rather than a NULL symbol list node)
7761 terminates a rule. symbol_list_print already does this correctly.
7762 * src/symlist.h (symbol_list.midrule_parent_rule,
7763 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7764 remember their relationships with their parents.
7765 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7766 fixed by the above patch.
7767 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7768 implementing...
7769 (Unused values): ... this old test case and...
7770 (Unused values before symbol declarations): ... this new test case.
7771 This one is the same as `Unused values' except that all symbol
7772 declarations appear after the rules in order to catch the rest of the
7773 errors fixed by the above patch.
7774
7775 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7776
7777 More cleanup.
7778 * src/reader.c (current_rule): Declare it static since it's no longer
7779 used outside this file.
7780 (grammar_current_rule_action_append): Remove redundant arguments from
7781 translate_rule_action invocation.
7782 * src/reader.h (current_rule): Remove this unused extern.
7783 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7784 * src/scan-code.l (translate_rule_action): Likewise.
7785
7786 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7787
7788 Clean up yesterday's patch.
7789 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7790 to...
7791 * src/reader.c (grammar_current_rule_action_append): ... here for
7792 consistency with grammar_current_rule_symbol_append.
7793 * tests/regression.at (Braced code in declaration in rules section):
7794 Make yyerror and yylex static as usual.
7795
7796 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7797
7798 Fix bug that mistakes braced code in a declaration in the rules section
7799 to be a rule action. Mentioned at
7800 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7801 * src/scan-gram.l: Move midrule action detection from the start of the
7802 scanning of any braced code to...
7803 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7804 action. For readability, use $2 and @2 rather than the equivalent
7805 global variables.
7806 * tests/regression.at (Braced code in declaration in rules section):
7807 New test to catch the error fixed by the above patch.
7808
7809 Work on code readability some.
7810 * src/scan-code.l (current_rule): Get rid of this misleading and
7811 redundant declaration: it's actually extern'ed in reader.h.
7812 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7813 translate_action): Add a rule argument and use it instead of the global
7814 current_rule.
7815 (translate_rule_action): This already receives current_rule through an
7816 argument, so pass it on to translate_action instead of assigning
7817 current_rule to current_rule.
7818 (translate_symbol_action, translate_code): Pass rule = NULL to
7819 translate_action.
7820
7821 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7822
7823 Rename %before-definitions to %start-header and %after-definitions to
7824 %end-header. Don't use these declarations to separate pre-prologue
7825 blocks from post-prologue blocks. Add new order-independent
7826 declarations %before-header and %after-header as alternatives to the
7827 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7828 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7829 * NEWS (2.3+): Update for these changes.
7830 * data/glr.c (b4_before_definitions): Update to...
7831 (b4_start_header): ... this.
7832 (b4_after_definitions): Update to...
7833 (b4_end_header): ... this.
7834 * data/glr.cc: Likewise.
7835 * data/lalr1.cc: Likewise.
7836 * data/yacc.c: Likewise.
7837 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7838 prologue blocks with %*-header declarations.
7839 (Calc++ Parser): Likewise.
7840 (Decl Summary): Update names.
7841 (Table of Symbols): Update description.
7842 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7843 (PERCENT_END_HEADER): ... this.
7844 (PERCENT_BEFORE_DEFINITIONS): Update to...
7845 (PERCENT_START_HEADER): ... this.
7846 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7847 (declaration): Update token names and m4 macro names.
7848 When parsing %end-header and %start-header, invoke translate_code
7849 before muscle_code_grow, and no longer set global booleans to remember
7850 whether these declarations have been seen.
7851 Parse new %after-header and %before-header.
7852 * src/reader.c (before_definitions, after_definitions): Remove.
7853 (prologue_augment): Accept a new bool argument to specify whether to
7854 augment the pre-prologue or post-prologue.
7855 * src/reader.h (before_definitions, after_definitions): Remove these
7856 extern's.
7857 (prologue_augment): Add new bool argument.
7858 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7859 (PERCENT_END_HEADER): ... this.
7860 (PERCENT_BEFORE_DEFINITIONS): Update to...
7861 (PERCENT_START_HEADER): ... this.
7862 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7863 * tests/actions.at (Printers and Destructors): Update names.
7864
7865 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7866
7867 Add comparison operators for C++ location classes. Discussed at
7868 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7869 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7870 declaration indicating whether filename_type has an operator==. If
7871 filename_type is `std::string', it defaults to `1', `0' otherwise.
7872 * data/location.cc: Iff b4_define_location_comparison is `1', add
7873 operator== and operator!= for class position and for class location.
7874
7875 Some minor fixes.
7876 * src/scan-action.l: Remove unused file.
7877 * src/symtab.c (symbol_printer_set): Use printer_location not
7878 destructor_location.
7879 * src/symtab.h (struct symbol): Replace incorrect source comment for
7880 printer members.
7881 * tests/input.at (Incompatible Aliases): Update output with correct
7882 printer location.
7883
7884 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7885
7886 Don't put the pre-prologue in the header file. For the yacc.c code
7887 file and the glr.c header and code files, move the pre-prologue before
7888 the token definitions. Add new %before-definitions and
7889 %after-definitions to declare code that will go in both the header file
7890 and code file. Discussed at
7891 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7892 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7893 and
7894 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7895 * NEWS (2.3+): Describe these changes.
7896 * data/glr.c (b4_pre_prologue): Move from within to before...
7897 (b4_shared_declarations): ... this.
7898 Add new b4_before_definitions before b4_token_enums.
7899 Add new b4_after_definitions at the end.
7900 * data/glr.cc (b4_pre_prologue): Replace with...
7901 (b4_before_definitions): ... this in the header file.
7902 (b4_after_definitions): New near the end of the header file.
7903 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7904 code file right before including the header file.
7905 (b4_before_definitions): New in the previous position of
7906 b4_pre_prologue in the header file.
7907 (b4_after_definitions): New near the end of the header file.
7908 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7909 (b4_token_enums_defines): In the code file, move to right before
7910 YYSTYPE for consistency with the header file.
7911 (b4_before_definitions): New right before b4_token_enums_defines in
7912 both the header and code file.
7913 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7914 header and code file.
7915 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7916 of prologues for %union dependencies.
7917 (Decl Summary): In %defines description, mention the effect of
7918 %before-definitions and %after-definitions on the header file.
7919 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7920 than in the pre-prologue so that make check succeeds.
7921 (Table of Symbols): Add entries for %before-definitions and
7922 %after-definitions.
7923 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7924 %before-definitions.
7925 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7926 (declaration): Parse those declarations and append to
7927 b4_before_definitions and b4_after_definitions, respectively.
7928 * src/reader.c (before_definitions, after_definitions): New bools to
7929 track whether those declarations have been seen.
7930 (prologue_augment): Add to the post-prologue if %union,
7931 %before-definitions, or %after-definitions has been seen.
7932 * src/reader.h (before_definitions, after_definitions): New extern's.
7933 * src/scan-gram.l: Scan the new declarations.
7934 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7935 prologue block in a %before-definitions or a %after-definitions based
7936 on whether the %union is declared.
7937 * tests/regression.at (Early token definitions with --yacc, Early token
7938 definitions without --yacc): Move tests for token definitions into the
7939 post-prologue since token names are no longer defined in the
7940 pre-prologue.
7941
7942 2006-06-20 Akim Demaille <akim@epita.fr>
7943
7944 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7945 (symbol_get): Use it.
7946 * src/parse-gram.y: Use it.
7947
7948 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7949
7950 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7951 build succeeds when configured with --enable-gcc-warnings.
7952
7953 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7954
7955 * src/parse-gram.y (char_name): New function.
7956 (CHAR, STRING, string_content): For %printer, properly escape.
7957 (ID): Prefer fputs to fprintf.
7958 (id): Reindent to be consistent with other rules.
7959 Properly quote char.
7960
7961 The Translation Project changed its way of publishing translations
7962 to maintainers. I haven't received any responses to my request
7963 for supporting the old way, or for documenting the new way. I
7964 have modified 'bootstrap' to use screen scraping
7965 (in this case, HTML scraping). This is unreliable and inelegant,
7966 but I don't see any better way. Yuck.
7967 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7968 (get_translations): New function, which uses HTML scraping to
7969 deduce locations of latest translations.
7970 Use this function to grab both bison and bison-runtime .po files.
7971 Don't bother priming the pump for the runtime-po domain any more,
7972 as it's now translated better than bison is.
7973
7974 2006-06-19 Akim Demaille <akim@epita.fr>
7975
7976 * src/scan-gram.l: No longer "parse" things after `%union' until
7977 `{'. Rather, return a single "%union" token.
7978 No longer make symbols: return strings, and leave the conversion
7979 to symbols to the parser.
7980 (SC_PRE_CODE, token_type): Remove.
7981 * src/parse-gram.y (%union): New field `character'.
7982 Sort tokens.
7983 (CHAR): New token.
7984 (ID, ID_COLON): Now that the scanner no longer makes them
7985 identifiers, adjust all uses to invoke symbol_get.
7986 (id_colon): New, wraps the conversion from string to symbol.
7987 (%union): Accept a possible union_name.
7988 (symbol): Now can be a char.
7989 * data/c.m4 (b4_union_name): Leave a default value.
7990 * data/glr.c, data/yacc.c: Use it.
7991
7992 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7993
7994 For associating token numbers with token names for "yacc.c", don't use
7995 #define statements unless `--yacc' is specified; always use enum
7996 yytokentype. Most important discussions start at:
7997 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7998 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7999 and
8000 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8001 * NEWS (2.3+): Mention.
8002 * data/c.m4 (b4_yacc_if): New.
8003 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8004 token #define's.
8005 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8006 on token name definitions.
8007 * src/getargs.c (usage): Capitalize `Yacc' in English.
8008 * src/output.c (prepare): Define b4_yacc_flag.
8009 * tests/regression.at (Early token definitions): Test that tokens names
8010 are defined before the pre-prologue not just before the post-prologue.
8011 Remove this test case and copy to...
8012 (Early token definitions with --yacc): ... this to test #define's.
8013 (Early token definitions without --yacc): ... and this to test enums.
8014
8015 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8016
8017 * NEWS: Reword the post-2.3 change to not be so optimistic about
8018 removing the old "look-ahead" spelling.
8019 Update previous look-ahead/lookahead change reports.
8020 * REFERENCES: look-ahead -> lookahead (since that's
8021 what he actually wrote).
8022 * doc/refcard.tex: look ahead -> lookahead,
8023 look-ahead -> lookahead
8024
8025 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8026
8027 For consistency, use `lookahead' instead of `look-ahead' or
8028 `look_ahead'. Discussed starting at
8029 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8030 and then at
8031 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8032 * NEWS: For the next release, note the change to `--report'.
8033 * TODO, doc/bison.1: Update English.
8034 * doc/bison.texinfo: Update English.
8035 (Understanding Your Parser, Bison Options): Document as
8036 `--report=lookahead' rather than `--report=look-ahead'.
8037 * src/conflicts.c: Update English in comments.
8038 (lookahead_set): Rename from look_ahead_set.
8039 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8040 (resolve_sr_conflict): Rename local look_ahead_tokens to
8041 lookahead_tokens, and update other uses.
8042 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8043 count_rr_conflicts, conflicts_free): Update uses.
8044 * src/getargs.c (report_args): Move "lookahead" before alternate
8045 spellings.
8046 (report_types): Update uses.
8047 (usage): For `--report' usage description, state `lookahead' spelling
8048 rather than `look-ahead'.
8049 * src/getargs.h (report.report_lookahead_tokens): Rename from
8050 report_look_ahead_tokens.
8051 * src/lalr.c: Update English in comments.
8052 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8053 (state_lookahead_tokens_count): Rename from
8054 state_look_ahead_tokens_count.
8055 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8056 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8057 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8058 Update other uses.
8059 Update English in output.
8060 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8061 * src/print.c: Update English in comments.
8062 (lookahead_set): Rename from look_ahead_set.
8063 (print_reduction): Rename argument lookahead_token from
8064 look_ahead_token.
8065 (print_core, state_default_rule, print_reductions, print_results):
8066 Update uses.
8067 * src/print_graph.c: Update English in comments.
8068 (print_core): Update uses.
8069 * src/state.c: Update English in comments.
8070 (reductions_new): Update uses.
8071 (state_rule_lookahead_tokens_print): Rename from
8072 state_rule_look_ahead_tokens_print, and update other uses.
8073 * src/state.h: Update English in comments.
8074 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8075 (state_rule_lookahead_tokens_print): Rename from
8076 state_rule_look_ahead_tokens_print.
8077 * src/tables.c: Update English in comments.
8078 (conflict_row, action_row): Update uses.
8079 * tests/glr-regression.at
8080 (Incorrect lookahead during deterministic GLR,
8081 Incorrect lookahead during nondeterministic GLR): Rename
8082 print_look_ahead to print_lookahead.
8083 * tests/torture.at: Update English in comments.
8084 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8085 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8086 (Many lookahead tokens): Update uses.
8087 * data/glr.c: Update English in comments.
8088 * lalr1.cc: Likewise.
8089 * yacc.c: Likewise.
8090 * src/conflicts.h: Likewise.
8091 * src/lalr.h: Likewise.
8092 * src/main.c: Likewise.
8093 * src/output.c: Likewise.
8094 * src/parse-gram.c: Likewise.
8095 * src/tables.h: Likewise.
8096 * tests/calc.at: Likewise.
8097
8098 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8099
8100 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8101
8102 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8103
8104 * TODO: Add request from Nelson H. F. Beebe to be able to install
8105 Bison without installing the yacc script.
8106
8107 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8108
8109 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8110 and yytext if they're already #define'd.
8111 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8112 * src/scan-code-c.c: ... here.
8113 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8114 <config.h>.
8115
8116 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8117
8118 Get Bison to build again when configured with --enable-gcc-warnings.
8119 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8120 missing #include's.
8121 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8122 loc argument as it shadows a global.
8123 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8124 invocation.
8125
8126 * src/.cvsignore: Add scan-code.c.
8127
8128 2006-06-07 Akim Demaille <akim@epita.fr>
8129
8130 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8131 to...
8132 * src/scan-code.l: here.
8133 * tests/input.at (Torturing the Scanner): Fix another location
8134 error.
8135
8136 2006-06-07 Akim Demaille <akim@epita.fr>
8137
8138 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8139
8140 2006-06-06 Akim Demaille <akim@epita.fr>
8141
8142 Extract the parsing of user actions from the grammar scanner.
8143 As a consequence, the relation between the grammar scanner and
8144 parser is much simpler. We can also split "composite tokens" back
8145 into simple tokens.
8146 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8147 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8148 rename as...
8149 * src/location.h, src/location.c (add_column_width)
8150 (location_compute): these.
8151 Fix the column count: the initial column is 0.
8152 (location_print): Be robust to ending column being 0.
8153 * src/location.h (boundary_set): New.
8154 * src/main.c: Adjust to scanner_free being renamed as
8155 gram_scanner_free.
8156 * src/output.c: Include scan-code.h.
8157 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8158 Use boundary_set.
8159 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8160 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8161 which is now, again, a separate token.
8162 Adjust all dependencies.
8163 Whereever actions with $ and @ are used, use translate_code.
8164 (action): Remove this nonterminal which is now useless.
8165 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8166 (grammar_current_rule_action_append): Use translate_code.
8167 (packgram): Bound check ruleno, itemno, and rule_length.
8168 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8169 (last_string, last_braced_code_loc, max_left_semantic_context)
8170 (scanner_initialize, scanner_free, scanner_last_string_free)
8171 (gram_out, gram_lineno, YY_DECL_): Move to...
8172 * src/scan-gram.h: this new file.
8173 (YY_DECL): Rename as...
8174 (GRAM_DECL): this.
8175 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8176 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8177 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8178 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8179 Move these declarations, and...
8180 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8181 these to...
8182 * src/flex-scanner.h: this new file.
8183 * src/scan-gram.l (rule_length, rule_length_overflow)
8184 (increment_rule_length): Remove.
8185 (last_braced_code_loc): Rename as...
8186 (gram_last_braced_code_loc): this.
8187 Adjust to the changes of the parser.
8188 Move all the handling of $ and @ into...
8189 * src/scan-code.l: here.
8190 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8191 (handle_action_dollar, handle_action_at): Move to...
8192 * src/scan-code.l: here.
8193 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8194 scan-code.h, scan-code-c.c, scan-gram.h.
8195 (EXTRA_bison_SOURCES): Add scan-code.l.
8196 (BUILT_SOURCES): Add scan-code.c.
8197 (yacc): Be robust to white spaces.
8198
8199 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8200 * tests/regression.at: Adjust the column numbers.
8201 * tests/regression.at: Adjust the error message.
8202
8203 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8204
8205 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8206 Use Akim's wording from
8207 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8208
8209 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8210
8211 Between Bison releases, manually append `+' to the previous Bison
8212 release number, and use that as a signal to automatically print the
8213 ChangeLog's CVS Id keyword from --version. Discussed starting at
8214 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8215 * ChangeLog: Add Id header.
8216 * configure.ac (AC_INIT): Append `+' to `2.3'.
8217 * src/.cvsignore: Add revision.c.
8218 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8219 (BUILT_SOURCES): Add revision.c.
8220 (revision.c): New target rule. This file defines a new global variable
8221 named revision. It initializes it with either the Id from ChangeLog
8222 or, if VERSION doesn't contain `+', with the empty string.
8223 * src/getargs.c (version): Print the value of revision.
8224 * src/revision.h: Extern revision.
8225
8226 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8227
8228 * NEWS: Version 2.3.
8229 * configure.ac (AC_INIT): Likewise.
8230
8231 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8232
8233 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8234 with no arguments, not as an object-like macro. This is for
8235 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8236 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8237 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8238 Document this.
8239
8240 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8241
8242 * src/getargs.c (usage): Back out yesterday's modification of the
8243 --help output so that we don't have to wait for translation before
8244 releasing 2.3.
8245
8246 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8247
8248 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8249 Problem reported by Akim Demaille.
8250
8251 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8252
8253 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8254
8255 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8256
8257 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8258 generated source code. Problem reported by Frans Englich in
8259 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8260
8261 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8262
8263 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8264 shell, not within 'make', so that 'make' by an ordinary builder
8265 (using GNU make) does not worry about configuring gzip. This also
8266 works around a bug reported independently by Keith Thompson and by
8267 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8268 stderr rather than stdout, messing up the build logs.
8269
8270 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8271
8272 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8273 to make sure that YYID will never be unused. This fixes a 'make
8274 maintainer-check' failure caused by the recent changes to the 'Trivial
8275 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8276 not used.
8277 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8278
8279 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8280
8281 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8282 state before an empty RHS is always resolved here. Only the location
8283 of that state is guaranteed to be resolved, and that's enough. This
8284 fixes the remaining bug reported by Derek M. Jones in
8285 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8286 * tests/glr-regression.at (Uninitialized location when reporting
8287 ambiguity): Test the above case.
8288 Also, the embedded comments in this test case claim it checks the case
8289 of an empty RHS that has inherited the initial location. However, the
8290 corresponding LHS was already resolved, so yyresolveLocations didn't
8291 actually have reason to modify it. Fix this by forcing
8292 nondeterministic operation at the beginning of the parse.
8293
8294 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8295
8296 * data/c.m4 (b4_yy_symbol_print_generate):
8297 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8298 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8299 of the bugs reported today by Derek M Jones in
8300 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8301 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8302 defined to be a type name without parens or brackets.
8303 (Location Type): Similarly for YYLTYPE.
8304 * tests/regression.at (Trivial grammars): Put in a test for this
8305 bug that will be caught by 'make maintainer-check' (though not,
8306 alas, by 'make check' unless your compiler is picky).
8307
8308 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8309
8310 * NEWS: Version 2.2.
8311 * configure.ac (AC_INIT): Likewise.
8312
8313 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8314
8315 * data/glr.c (yyreportTree): Make room in yystates for the state
8316 preceding the RHS. This fixes the segmentation fault reported by Derek
8317 M. Jones in
8318 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8319 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8320 to the user. Reported for yyreportTree by Derek M. Jones later in the
8321 same thread.
8322 * THANKS: Add Derek M. Jones.
8323 Update my email address.
8324 Fix typo in Steve Murphy's name.
8325
8326 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8329 checking against YYLAST that caused the parser to miss a potential
8330 alternative in its diagnostic.
8331 Problem reported by Maria Jose Moron Fernandez in
8332 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8333 * data/lalr1.cc (yysyntax_error_): Likewise.
8334 * data/yacc.c (yysyntax_error): Likewise.
8335 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8336 tokens, in case we run into an older C compiler.
8337 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8338 Use them to check for the off-by-one error fixed above.
8339
8340 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8341 YYSIZE_T, not size_t.
8342 * tests/regression.at (Trivial grammars): New test, to catch
8343 the error fixed by the above patch.
8344
8345 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8346
8347 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8348 scheme.
8349 Reported by Steve Murphy.
8350
8351 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8352
8353 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8354 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8355
8356 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8357
8358 Implement --trace=m4.
8359 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8360 * src/output.c (output_skeleton): When set, pass -dV to m4.
8361
8362 Factor the handling of flags in m4.
8363 * src/output.c (prepare): Rename the muscle names debug, defines,
8364 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8365 * data/c.m4: Adjust.
8366 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8367 Use b4_define_flag_if to define other b4_FLAG_if macros.
8368 (b4_location_if): As a consequence, rename as...
8369 (b4_locations_if): this, for consistency.
8370 Adjust all the skeletons.
8371
8372 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8373
8374 * etc/bench.pm: Shorten bench names.
8375
8376 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8377
8378 * src/output.h, src/output.c (error_verbose): Move to...
8379 * src/getargs.h, src/getargs.c: here.
8380 Sort the flags.
8381 Adjust dependencies.
8382
8383 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8384
8385 * data/c.m4 (b4_copyright): Put the special exception for Bison
8386 skeletons here, so we don't have to put it in each skeleton. All
8387 uses changed. Suggested by Akim Demaille. Also, wrap the
8388 copyright notice, in case it is longer than 80 columns. Replace
8389 comma by newline after title.
8390
8391 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8392
8393 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8394 incompatibility, not a bug. Mention that it wasn't fixed as of
8395 flex 2.5.33.
8396
8397 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8398
8399 * examples/extexi: Enforce the precedence of concatenation over
8400 >>.
8401 Reported by Tommy Nordgren.
8402
8403 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8404
8405 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8406 with the member "token".
8407 Reported by Martin Nylin.
8408
8409 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8410
8411 * data/glr.c: Switch to Bison 2.2 special-exception language in
8412 the copyright notice. Use more-regular format for titles and
8413 copyright notices.
8414 * data/glr.cc: Likewise.
8415 * data/location.cc: Likewise.
8416 * data/yacc.cc: Likewise.
8417 * doc/bison.texinfo (Conditions): Document this.
8418 * NEWS: likewise. Upgrade version to 2.2.
8419
8420 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8421
8422 * data/glr.cc: Remove dead code.
8423
8424 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8425
8426 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8427 that variable and the line breaks the bootstrap. Problem reported
8428 by Juan M. Guerrero.
8429
8430 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8431
8432 * doc/bison.texinfo (Multiple start-symbols): New.
8433
8434 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8435
8436 * etc/README, etc/bench.pl: New.
8437
8438 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8439
8440 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8441 rule.
8442 Reported by Mickael Labau.
8443 * tests/input.at (Torturing the Scanner): Test it.
8444
8445 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8446
8447 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8448 Problem reported by Bob Rossi.
8449
8450 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8451
8452 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8453 and didn't really work.
8454 For the index, use @ifnotinfo, not @iftex.
8455 Minor cleanups of spacing and terminology.
8456
8457 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8458
8459 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8460 of AT_NAME_PREFIX when %name-prefix is not used.
8461
8462 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8463
8464 Apply --prefix to C++ skeletons too: they change the namespace.
8465 The test suite already exercize these cases.
8466 * data/c++.m4 (b4_namespace): New.
8467 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8468 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8469 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8470 * doc/bison.texinfo: Document it.
8471 (Option Cross Key): Use @multitable in all formats. It looks
8472 nicer, even in TeX outputs.
8473 (Rules): Use the same code whatever the output type is.
8474 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8475 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8476 * tests/calc.at: Use it, instead of hard coding `yy'.
8477
8478 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8479
8480 * TODO: Remove dead items.
8481
8482 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8483
8484 * doc/FAQ: Remove, merged into...
8485 * doc/bison.texinfo (FAQ): this.
8486 * doc/Makefile.am (EXTRA_DIST): Adjust.
8487
8488 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8489
8490 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8491 even if empty.
8492 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8493 * doc/bison.texinfo (Calc++ Scanner): Use it.
8494
8495 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8496
8497 Fix two nits reported by twlevo, plus one more that I discovered.
8498
8499 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8500 this is the usual Bison style.
8501 * src/location.h (location_print): Likewise.
8502
8503 * src/reader.h (token_name): Likewise.
8504
8505 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8506
8507 Fix some nits reported by twlevo.
8508 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8509 and "POSIX". Use more-modern syntax for URLs. Mention C++
8510 and ask for Java. Don't hardwire OS version numbers. Add
8511 copyright notice.
8512 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8513 * src/conflicts.c (solved_conflicts_obstack): Now static.
8514
8515 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8516
8517 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8518 page. Say "you can use it" not "you may use it" as on the web page;
8519 we're describing capabilities not granting permission.
8520
8521 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8522
8523 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8524 shadowing warnings. Use usual patter for iterating through RHS.
8525 * tests/glr-regression.at
8526 (Uninitialized location when reporting ambiguity):
8527 Modify yylex so that it uses its argument, rather than trying
8528 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8529 const char -> char const.
8530
8531 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8532 Don't use tabs inside commands; it messes up 'ps'.
8533 Problem reported by twlevo.
8534
8535 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8536
8537 * tests/glr-regression.at (Uninitialized location when reporting
8538 ambiguity): New test case.
8539 * data/glr.c (yyresolveLocations): New function, which uses
8540 YYLLOC_DEFAULT.
8541 (yyresolveValue): Invoke yyresolveLocations before reporting an
8542 ambiguity.
8543 * doc/bison.texinfo (Default Action for Locations): Note
8544 YYLLOC_DEFAULT's usage for ambiguity locations.
8545 (GLR Semantic Actions): Cross-reference those notes.
8546
8547 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8548
8549 * tests/glr-regression.at (Leaked semantic values when reporting
8550 ambiguity): Remove unnecessary union and type declarations.
8551 (Leaked lookahead after nondeterministic parse syntax error): New test
8552 case.
8553 * data/glr.c (yyparse): Check for zero stacks remaining before
8554 attempting to shift the lookahead so that you don't lose it.
8555
8556 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8557
8558 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8559 * tests/glr-regression.at (Leaked semantic values when reporting
8560 ambiguity): New test case.
8561 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8562 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8563 now unnecessary yystackp parameter.
8564 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8565 destructors can be called.
8566
8567 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8568 in existing testcases.
8569
8570 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8571
8572 Don't leak semantic values for parent RHS when a user action cuts the
8573 parser, and clean up related code a bit.
8574 * tests/glr-regression.at (Leaked merged semantic value if user action
8575 cuts parse): Rename to...
8576 (Leaked semantic values if user action cuts parse): ... this. Add check
8577 for leaked parent RHS values.
8578 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8579 between an unresolved state (non-empty chain of semantic options) and
8580 an incomplete one (signaled by an empty chain).
8581 (yyresolveStates): Document the interface. Move all manipulation of a
8582 successfully or unsuccessfully resolved yyGLRState to...
8583 (yyresolveValue): ... here so that yyresolveValue always leaves a
8584 yyGLRState with consistent data and thus is easier to understand.
8585 Remove the yyvalp and yylocp parameters since they are always just
8586 taken from the yys parameter. When reporting a discarded merged value
8587 in debugging output, note that it is incompletely merged. Document the
8588 interface.
8589 (yyresolveAction): If resolving any of the RHS states fails, destroy
8590 them all rather than leaking them. Thus, as long as user actions are
8591 written to clean up the RHS correctly, yyresolveAction always cleans up
8592 the RHS of a semantic option. Document the interface.
8593
8594 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8595
8596 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8597 led to a segmentation fault in GNU Pascal. Problem reported
8598 by Waldek Hebisch.
8599
8600 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8601
8602 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8603 mid-rule action inside a nonterminal symbol in order to declare a
8604 destructor for its semantic value.
8605
8606 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8607
8608 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8609 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8610 __cplusplus && ! defined _STDLIB_H && !
8611 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8612 defined free))]: Include <stdlib.h> rather than rolling our own
8613 declarations of malloc and free, to avoid problems with
8614 incompatible declarations (using 'throw') C++'s stdlib.h. This
8615 should fix Debian bug 340012
8616 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8617 reported by Guillaume Melquiond.
8618
8619 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8620
8621 * NEWS: Clarify symbols versus types in unused-value warnings.
8622
8623 * configure.ac (AC_INIT): Bump version number.
8624
8625 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8626
8627 * NEWS: Version 2.1a.
8628 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8629 since C99 requires this.
8630
8631 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8632
8633 * m4/c-working.m4: New file.
8634 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8635
8636 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8637
8638 * Makefile.maint: Merge from coreutils.
8639
8640 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8641
8642 More portability fixes for problems summarized by Nelson H. F. Beebe.
8643
8644 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8645 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8646 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8647 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8648 messes up because C++ code is compiled in 32-bit mode but linked
8649 in 64-bit mode.
8650
8651 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8652
8653 More portability fixes for problems summarized by Nelson H. F. Beebe.
8654
8655 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8656 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8657
8658 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8659 nodist_PROGRAMS, since we don't need to actually compile the
8660 example if we're just doing a plain 'make'. This avoids bothering
8661 the installer unnecessarily about problems due to weird C++
8662 compilers.
8663
8664 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8665
8666 More portability fixes for problems summarized by Nelson H. F. Beebe.
8667
8668 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8669 than #include "...", and compile with -I'.'. The old method was
8670 not portable, according to Posix and the C standard, and it does
8671 not work with Sun C 5.7, where previous #line directives affect
8672 the working directory used in later #include "..." directives.
8673
8674 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8675
8676 Various DJGGP specific issues in /djgpp
8677
8678 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8679
8680 More portability fixes for problems summarized by Nelson H. F. Beebe.
8681
8682 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8683 '#include <map>' works and that you can apply ++ to iterators.
8684
8685 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8686
8687 Work around portability problems summarized by Nelson H. F. Beebe in
8688 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8689
8690 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8691 that '#include <string>' works.
8692
8693 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8694 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8695 "warning: sorry: semantics of inline function static data `const
8696 unsigned char translate_table[262]' are wrong (you'll wind up with
8697 multiple copies)".
8698
8699 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8700 or, xor to not_, and_, or_, and xor_, respectively. This works
8701 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8702 random system header somewhere that includes the equivalent of
8703 <iso646.h>.
8704
8705 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8706 -E" works; it apparently doesn't work with PathScale EKO Compiler
8707 Suite Version 2.0.
8708
8709 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8710
8711 During deterministic GLR operation, user actions should be able to
8712 influence the parse by changing yychar. To make this easier to fix and
8713 to make glr.c easier to evolve in general, don't maintain yytoken in
8714 parallel with yychar; just compute yytoken when needed.
8715 * tests/glr-regression.at (Incorrect lookahead during deterministic
8716 GLR): Check that setting yychar in a user action has the intended
8717 effect.
8718 * data/glr.c (yyGLRStack): Remove yytokenp member.
8719 (yyclearin): Don't set *yytokenp.
8720 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8721 yychar rather than *yytokenp to determine the current lookahead.
8722 Compute yytoken locally when needed.
8723 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8724 point to.
8725
8726 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8727 after `--report' documentation.
8728
8729 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8730
8731 * src/parse-gram.y (grammar_declaration): Location of printer
8732 symbol is @1, not list->location. Bug reported by twlevo.
8733 * tests/input.at (Incompatible Aliases): Adjust to above change.
8734
8735 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8736
8737 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8738 all the test at once. This makes the output easier to read in the
8739 normal case.
8740
8741 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8742 got from <http://bro-ids.org/download.html>. The bug is that
8743 when two actions appeared in succession, the second one was
8744 scanned before the first one was added to the grammar rule
8745 as a midrule action. Bison then output the incorrect warning
8746 "parse.y:905.17-906.36: warning: unused value: $3".
8747 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8748 associated with a value.
8749 (rhs): Don't invoke grammar_current_rule_action_append.
8750 (action): Invoke it here instead.
8751 * src/reader.c (grammar_midrule_action): Now extern.
8752 (grammar_current_rule_action_append): Don't invoke
8753 grammar_midrule_action; that is now the scanner's job.
8754 * src/reader.h (last_string, last_braced_code_loc):
8755 (grammar_midrule_action): New decls.
8756 * src/scan-gram.l (last_string): Now extern, sigh.
8757 (last_braced_code_loc): New extern variable.
8758 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8759 rule already has an action.
8760 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8761 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8762 Add some tests to check that the above changes fixed the bug.
8763
8764 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8765
8766 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8767 All used changed. Check whether the symbol has a destructor,
8768 not whether it is typed.
8769 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8770 that the values are still reported as unused. All line numbers
8771 adjusted.
8772
8773 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8774
8775 Work around a bug in bro 0.8, which underparenthesizes its
8776 definition of YYLLOC_DEFAULT.
8777 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8778 their arguments.
8779 * data/lalr1.cc: Likewise.
8780 * data/yacc.cc: Likewise.
8781
8782 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8783
8784 Work around a bug in Pike 7.0, and give the Pike folks a
8785 better way to override the usual int widths.
8786 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8787 user can override the types.
8788 (short): #undef, to work around a bug in Pike 7.0.
8789 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8790 (union yyalloc.yyss): Use yytype_int16 rather than short.
8791 All uses changed.
8792 (yysigned_char): Remove.
8793 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8794 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8795 * tests/regression.at (Web2c Actions): Adjust to above changes.
8796
8797 * src/reader.c (check_and_convert_grammar): New function.
8798 (reader): Close the input file even if something went wrong during
8799 parsing. Minor file descriptor leak reported by twlevo.
8800
8801 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8802 to pacify gcc -Wswitch-default.
8803 * src/scan-gram.l (adjust_location): Use a default: break; case
8804 to pacify gcc -Wswitch-default.
8805 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8806 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8807 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8808 Move these decls to scan-skel.l, since they don't need to be
8809 visible elsewhere.
8810 * src/scan-skel.l: Accept the above decls.
8811 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8812 is used.
8813
8814 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8815
8816 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8817 since we don't want to insist on a version number at the start
8818 of the changelog every time.
8819 * Makefile.maint: Sync from coreutils a bit better.
8820 (sc_trailing_blank): Renamed from sc_trailing_space.
8821 All uses changed.
8822 (sc_no_if_have_config_h, sc_require_config_h):
8823 (sc_prohibit_assert_without_use): New rules.
8824 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8825 (sc_dd_max_sym_length): Fix leading spaces in rule.
8826 (sc_system_h_headers): Prefix with @.
8827 (sc_useless_cpp_parens, m4-check): Output line numbers.
8828 (changelog-check): Allow version only in head.
8829 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8830 satisfy new Makefile.maint rule.
8831 * data/glr.c: Likewise.
8832 * data/glr.cc: Likewise.
8833 * data/lalr1.cc: Likewise.
8834 * data/yacc.c: Likewise.
8835 * lib/ebitsetv.c: Likewise.
8836 * lib/lbitset.c: Likewise.
8837 * lib/subpipe.c: Likewise.
8838 * lib/timevar.c: Likewise.
8839 * src/system.h: Likewise.
8840 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8841 * djgpp/Makefile.maint: Add copyright notice.
8842 * djgpp/README.in: Likewise.
8843 * djgpp/config.bat: Likewise.
8844 * djgpp/config.site: Likewise.
8845 * djgpp/config_h.sed: Likewise.
8846 * djgpp/djunpack.bat: Likewise.
8847 * djgpp/config.sed: Fix copyright notice to match standard format.
8848 * djgpp/subpipe.h: Likewise.
8849 * lib/bitsetv-print.c: Likewise.
8850 * lib/bitsetv.c: Likewise.
8851 * lib/subpipe.h: Likewise.
8852 * lib/timevar.c: Likewise.
8853 * lib/timevar.h: Likewise.
8854 * djgpp/subpipe.c: Use standard recipe for config.h.
8855 * lib/abitset.c: Likewise.
8856 * lib/bitset.c: Likewise.
8857 * lib/bitset_stats.c: Likewise.
8858 * lib/bitsetv-print.c: Likewise.
8859 * lib/bitsetv.c: Likewise.
8860 * lib/ebitsetv.c: Likewise.
8861 * lib/get-errno.c: Likewise.
8862 * lib/lbitset.c: Likewise.
8863 * lib/subpipe.c: Likewise.
8864 * lib/timevar.c: Likewise.
8865 * lib/vbitset.c: Likewise.
8866 * tests/local.at: Likewise.
8867 * src/scan-gram.l: Don't include verify.h, since system.h does
8868 that for us.
8869 * .x-sc_require_config_h: New file.
8870 * .x-sc_unmarked_diagnostics: New file.
8871
8872 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8873
8874 Be a bit more systematic about using 'abort'.
8875 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8876 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8877 Put 'default: abort ();' before some other case, to satisfy older
8878 pedantic compilers.
8879 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8880 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8881 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8882 * src/conflicts.c (resolve_sr_conflict): Likewise.
8883 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8884 (get_decision_str, get_orientation_str, get_node_alignment_str):
8885 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8886 (get_linestyle_str, get_arrowstyle_str): Likewise.
8887 * src/conflicts.c (resolve_sr_conflict):
8888 Use a default case rather than one for the one remaining enum
8889 value, to catch invalid enum values as well.
8890 * src/lalr.c (set_goto_map, map_goto):
8891 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8892 * src/nullable.c (nullable_compute, token_definitions_output):
8893 Likewise.
8894 * src/reader.c (packgram, reader): Likewise.
8895 * src/state.c (transitions_to, state_new, state_reduction_find):
8896 Likewise.
8897 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8898 (symbol_pack): Likewise.
8899 * src/tables.c (conflict_row, pack_vector): Likewise.
8900 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8901 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8902 * src/system.h: Don't include <assert.h>.
8903 (assert): New macro.
8904
8905 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8906 (Destructor Decl, Parser Function, Pure Calling):
8907 Describe rules for braces inside C code more carefully.
8908
8909 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8910
8911 Fix some porting glitches found by Nelson H. F. Beebe.
8912 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8913 compilers that don't understand that abort () does not return.
8914 * src/state.c (transitions_to): Likewise.
8915 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8916 that '#include <cstdlib>' works.
8917 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8918 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8919 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8920 for the benefit of some pre-C99 compilers.
8921
8922 * bootstrap: Undo changes to gnulib files that autoreconf made.
8923
8924 Minor fixups to get 'make maintainer-check' to work.
8925 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8926 with the new verify.h implementation.
8927 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8928 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8929 * data/yacc.c (YYUSE): Likewise.
8930 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8931 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8932 * src/parse-gram.y (declaration): Don't pass a string constant
8933 to a function that expects char *, since GCC might complain
8934 about the constant value.
8935 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8936 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8937 before #defining them.
8938 * tests/glr-regression.at
8939 (Incorrectly initialized location for empty right-hand side in GLR):
8940 In yyerror, use the msg arg.
8941 (Corrupted semantic options if user action cuts parse):
8942 (Incorrect lookahead during deterministic GLR):
8943 (Incorrect lookahead during nondeterministic GLR):
8944 Don't name a local var 'index'; it shadows string.h's 'index'.
8945
8946 2006-01-19 Akim Demaille <akim@epita.fr>
8947
8948 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8949 location, not just parts of it.
8950
8951 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8952
8953 * NEWS: Document the fact that multiple %unions are now allowed.
8954 * doc/bison.texinfo (Union Decl): Likewise.
8955 * TODO: This feature is now implemented, so remove it from
8956 the wishlist.
8957
8958 * Makefile.maint: Merge with coreutils Makefile.maint.
8959 (CVS_LIST): Use build-aux version if available.
8960 (VERSION_REGEXP): New macro.
8961 (syntax-check-rules): Add sc_no_if_have_config_h,
8962 sc_prohibit_assert_without_use, sc_require_config_h,
8963 sc_useless_cpp_parens.
8964 (sc_obsolete_symbols): Check for O_NDELAY.
8965 (sc_dd_max_sym_length): Track coreutils.
8966 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8967 (sc_useless_cpp_parens): New rule.
8968 (news-date-check): Look for version or today's date.
8969 (changelog-check): Don't require version number near head.
8970 (copyright-check): Use current year instead of hardwiring 2005.
8971 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8972 (announcement): Add --gpg-key-ID.
8973
8974 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8975 with "file system".
8976
8977 Avoid undefined behavior that addressed just before the start of an
8978 array. Problem reported by twlevo.
8979 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8980 * src/lalr.c (build_relations): Rely on new sentinel.
8981 * src/gram.c (gram_free): Adjust to new sentinel.
8982
8983 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8984
8985 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8986 yylookaheadNeeds. All uses updated.
8987 (yysplitStack): Rename local yynewLookaheadStatuses to
8988 yynewLookaheadNeeds.
8989 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8990 GLR): In comments, change `lookahead status' to `lookahead need'.
8991
8992 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8993
8994 * data/glr.c (yysplitStack): A little stylistic rewrite.
8995
8996 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8997
8998 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8999
9000 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9001
9002 * doc/bison.texinfo: Fix some typos.
9003 (GLR Semantic Actions): New subsection discussing special
9004 considerations because GLR semantic actions might be deferred.
9005 (Actions): Mention look-ahead usage of yylval.
9006 (Actions and Locations): Mention look-ahead usage of yylloc.
9007 (Special Features for Use in Actions): Add YYEOF entry and mention it
9008 in the yychar entry.
9009 In the yychar entry, remove mention of the local yychar case (pure
9010 parser) since this is irrelevant information when writing semantic
9011 actions and since it's already discussed in `Table of Symbols' where
9012 yychar is otherwise described as an external variable.
9013 In the yychar entry, don't call it the `current' look-ahead since it
9014 isn't when semantic actions are deferred.
9015 In the yychar and yyclearin entries, add note about deferred semantic
9016 actions.
9017 Add yylloc and yylval entries discussing look-ahead usage.
9018 (Look-Ahead Tokens): When discussing yychar, don't call it the
9019 `current' look-ahead, and do mention yylval and yylloc.
9020 (Error Recovery): Cross-reference `Action Features' when mentioning
9021 yyclearin.
9022 (Table of Symbols): In the yychar entry, don't call it the `current'
9023 look-ahead.
9024 In the yylloc and yylval entries, mention look-ahead usage.
9025
9026 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9027
9028 * tests/glr-regression.at: Update copyright year to 2006.
9029
9030 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9031
9032 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9033 use during nondeterministic operation to track which stacks have
9034 actually needed the current lookahead.
9035 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9036 Allocate, deallocate, resize, and otherwise shuffle space for
9037 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9038 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9039 appropriately during nondeterministic operation.
9040 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9041 members to store the current lookahead to be used by the deferred
9042 user action.
9043 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9044 from which the RHS is taken. Set the lookahead members of the new
9045 yySemanticOption according to the lookahead status for stack yyk.
9046 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9047 yyaddDeferredAction.
9048 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9049 members of yySemanticOption before invoking yyuserAction, and then set
9050 them back to their current values afterward.
9051 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9052 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9053 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9054 titles for consistency.
9055 (Leaked merged semantic value if user action cuts parse): In order to
9056 suppress lint warnings, use arguments in merge function, and assign
9057 char value < 128 in main.
9058 (Incorrect lookahead during deterministic GLR): New test case.
9059 (Incorrect lookahead during nondeterministic GLR): New test case.
9060
9061 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9062
9063 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9064 !yyvaluep as signal that no semantic value is available to print.
9065 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9066 to print a semantic value.
9067
9068 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9069
9070 * tests/glr-regression.at: For consistency with my newer test cases,
9071 don't thank myself.
9072
9073 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9074
9075 * data/glr.c (yyresolveValue): When merging semantic options, if at
9076 least one user action succeeds but a later one cuts the parse, then
9077 destroy the semantic value before returning rather than leaking it.
9078 (yyresolveStates): If a user action cuts the parse and thus
9079 yyresolveValue fails, ignore the (unset) semantic value rather than
9080 corrupting the yyGLRState, and empty the semantic options list since
9081 the user actions should have called all necessary destructors.
9082 Simplify code with YYCHK.
9083 * tests/glr-regression.at (Corrupted semantic options if user action
9084 cuts parse): New test case.
9085 (Undesirable destructors if user action cuts parse): New test case.
9086 Before applying any of this patch, this test case never actually failed
9087 for me... but only because the corrupted semantic options usually
9088 masked this bug.
9089 (Leaked merged semantic value if user action cuts parse): New test
9090 case.
9091
9092 2006-01-05 Akim Demaille <akim@epita.fr>
9093
9094 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9095
9096 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9099 _MSC_VER. Problem reported by Cenzato Marco.
9100 (b4_c_function_def): Use it.
9101 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9102 b4_c_modern.
9103 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9104 than rolling our own.
9105
9106 2006-01-04 Akim Demaille <akim@epita.fr>
9107
9108 Also warn about non-used mid-rule values.
9109 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9110 member.
9111 (symbol_list_new): Adjust.
9112 * src/reader.c (symbol_typed_p): New.
9113 (grammar_rule_check): Use it.
9114 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9115 Check its rule.
9116 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9117 Use it.
9118 * tests/actions.at (Exotic Dollars): Adjust.
9119
9120 2006-01-04 Akim Demaille <akim@epita.fr>
9121
9122 * src/reader.c (grammar_midrule_action): If $$ is set in a
9123 mid-rule, move the `used' bit to its lhs.
9124 * tests/input.at (Unused values): New.
9125 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9126
9127 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9128
9129 * doc/bison.texinfo (Bison Options): Say more accurately what
9130 --yacc does.
9131 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9132 about declarations in the grammar when in Yacc mode, as POSIX does
9133 not require a diagnostic when the grammar uses extensions.
9134
9135 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9136
9137 Warn about dubious constructions like "%token T T".
9138 Reported by twlevo.
9139 * src/symtab.h (struct symbol.declared): New member.
9140 * src/symtab.c (symbol_new): Initialize it to false.
9141 (symbol_class_set): New arg DECLARING, specifying whether
9142 this is a declaration that we want to warn about, if there
9143 is more than one of them. All uses changed.
9144
9145 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9146 Allow multiple %union directives, whose contents concatenate.
9147 * src/parse-gram.y (grammar_declaration): Likewise.
9148 Use muscle_code_grow, so that we don't need stype_line any more.
9149 All uses changed.
9150
9151 * src/muscle_tab.c (muscle_grow): Fix comment.
9152
9153 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9154 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9155 Update copyright year to 2006.
9156
9157 2006-01-03 Akim Demaille <akim@epita.fr>
9158
9159 Have glr.cc pass (some of) the calc.at tests.
9160 * data/glr.cc (b4_parse_param_orig): New.
9161 (b4_parse_param): Improve its definition, and bound it more
9162 clearly in the skeleton.
9163 (b4_epilogue): Append, instead of prepending, in order to keep
9164 #line consistency.
9165 Simplify the generation of auxiliary functions: locations and
9166 purity are mandated.
9167 (b4_global_tokens_and_yystype): Honor it.
9168 * data/location.cc (c++.m4): Don't include it.
9169 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9170 and AT_SKEL_CC_IF.
9171 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9172 AT_LALR1_CC_IF.
9173 Be sure to initialize the first position's filename.
9174 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9175 mandated anyway.
9176 (AT_CHECK_CALC_GLR_CC): New.
9177 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9178
9179 2006-01-02 Akim Demaille <akim@epita.fr>
9180
9181 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9182 c.m4.
9183 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9184 * data/glr.cc: Do not include stack.hh.
9185
9186 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9187
9188 * data/glr.c: Reformat whitespace with tabs.
9189 (b4_lpure_formals): Remove this unused m4 macro.
9190 * tests/cxx-type.at: Reformat whitespace with tabs.
9191 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9192 since it's a member. Rename type to isNterm for clarity.
9193
9194 2005-12-29 Akim <akim@sulaco.local>
9195
9196 Let glr.cc catch up with symbol_value_print.
9197 * data/glr.cc (b4_yysymprint_generate): Replace by...
9198 (b4_yy_symbol_print_generate): this.
9199 (yy_symbol_print, yy_symbol_value_print): Declare them.
9200
9201 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9202
9203 * src/location.h (boundary): Note that a line or column equal
9204 to INT_MAX indicates an overflow.
9205 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9206 (rule_length_overflow, increment_rule_length, add_column_width):
9207 New functions.
9208 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9209 (<SC_BRACED_CODE>"}"):
9210 Use increment_rule_length rather than incrementing it by hand.
9211 (adjust_location, handle_syncline): Diagnose overflow.
9212 (handle_action_dollar, handle_action_at):
9213 Fix bug with monstrosities like $-2147483648.
9214 Remove now-unnecessary checks.
9215 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9216 (convert_ucn_to_byte): Verify assumptions.
9217 (handle_syncline): New arg LOC. All callers changed.
9218 Don't store through a value derived from char const * pointer.
9219
9220 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9221 GCC warnings.
9222
9223 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9224
9225 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9226 Remove unnecessary forward static decls.
9227
9228 2005-12-27 Akim Demaille <akim@epita.fr>
9229
9230 * src/reader.c (grammar_current_rule_check): Also check that $$
9231 is used.
9232 Take the rule to check as argument, hence rename as...
9233 (grammar_rule_check): this.
9234 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9235 Rename as...
9236 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9237 (grammar_midrule_action, grammar_symbol_append): Now static.
9238 * tests/torture.at (input): Don't rely on the default action
9239 being always performed.
9240 * tests/calc.at: "Set" $$ even when the action is "cut" with
9241 YYERROR or other.
9242 * tests/actions.at (Exotic Dollars): Instead of using unused
9243 values, check that the warning is issued.
9244
9245 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9246
9247 * NEWS: Improve wording for unused-value warnings.
9248
9249 2005-12-22 Akim Demaille <akim@epita.fr>
9250
9251 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9252 (b4_yysymprint_generate): Rename as...
9253 (b4_yy_symbol_print_generate): this.
9254 Generate yy_symbol_print instead of yysymprint.
9255 Generate also yy_symbol_value_print, and use it.
9256
9257 2005-12-22 Akim Demaille <akim@epita.fr>
9258
9259 * NEWS: Warn about unused values.
9260 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9261 a `used' member.
9262 (symbol_list_n_get, symbol_list_n_used_set): New.
9263 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9264 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9265 * src/reader.c (grammar_current_rule_check): Check that values are
9266 used.
9267 * src/symtab.c (symbol_print): Accept 0.
9268 * tests/existing.at: Remove the type information.
9269 Empty the actions.
9270 Remove useless actions (beware of mid-rule actions: perl -000
9271 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9272 * tests/actions.at (Exotic Dollars): Use unused values.
9273 * tests/calc.at: Likewise.
9274 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9275 Likewise.
9276
9277 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9278 rule_useful_p.
9279
9280 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9281
9282 Undo 2005-12-01 tentative license wording change. The wording is
9283 still being reviewed by the lawyers, and we don't want to wait for
9284 them before publishing a test release. For now, revert to the
9285 previous wording.
9286 * NEWS: Undo 2005-12-01 change.
9287 * data/glr.c: Revert to previous license wording.
9288 * data/glr.cc: Likewise.
9289 * data/lalr1.cc: Likewise.
9290 * data/location.cc: Likewise.
9291 * data/yacc.c: Likewise.
9292
9293 * NEWS: Reword %destructor vs YYABORT etc.
9294 * data/glr.c: Use American spacing, for consistency.
9295 * data/glr.cc: Likewise.
9296 * data/lalr1.cc: Likewise.
9297 * data/yacc.c: Likewise.
9298 * data/yacc.c: Reformat comments slightly.
9299 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9300 for consistency. Fix some spelling errors and reword recently-included
9301 text slightly.
9302 * tests/cxx-type.at: Cast results of malloc, for C++.
9303
9304 2005-12-21 Joel E. Denny <address@hidden>
9305
9306 * tests/cxx-type.at: Construct a tree, count the parents of shared
9307 nodes, and free each node once and only once. Previously, the memory
9308 for semantic values was leaked instead.
9309
9310 2005-12-21 Joel E. Denny <address@hidden>
9311
9312 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9313 (yylval, yylloc): If pure, #define to yystackp->yyval and
9314 yystackp->yyloc similar to yychar and yynerrs.
9315 (yyparse): If pure, remove local yylval and yylloc. Add local
9316 yystackp to accommodate pure definitions of yylval and yylloc.
9317 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9318 yylvalp and yyllocp to &yylval and &yylloc.
9319 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9320 namespace. Previously, nerrs and char were missing, but lval and lloc
9321 weren't necessary.
9322 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9323 yylvalp and yyllocp parameters since, if pure, these are now always
9324 accessible through yystackp. If not pure, they are still accessible
9325 globally.
9326 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9327 `if (YYID (N))' to pacify lint.
9328
9329 2005-12-21 Akim Demaille <akim@epita.fr>
9330
9331 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9332 destroy the RHS symbols of a rule.
9333 * data/yacc.c (yylen): Initialize to 0.
9334 Keep its value to the number of items to possibly shift.
9335 In particular, a regular successful parse that ends on YYFINAL by
9336 a (internal) YYACCEPT must not have yylen != 0.
9337 (yyerrorlab, yyreturn): Pop the RHS.
9338 Reorder a bit to emphasize the `shifting' bits of code.
9339 (YYPOPSTACK): Now accept a number of items to pop.
9340 * data/lalr1.cc: Likewise.
9341 * data/glr.c: Formatting changes.
9342 Use goto instead of fall through.
9343 * doc/bison.texinfo (Destructor Decl): Complete.
9344
9345 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9346
9347 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9348 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9349 * djgpp/config.bat: Replace every occurence of the file name
9350 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9351 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9352 * djgpp/config.sed: Replace every occurence of the file name
9353 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9354 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9355 * djgpp/djunpack.bat: DJGPP specific file.
9356 * djgpp/fnchange.lst: DJGPP specific file.
9357 * djgpp/README.in: Add new information about how to unpack the bison
9358 source on MSDOS and other systems which have 8.3 file name restrictions
9359 using djunpack.bat and fnchange.lst.
9360
9361 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9362
9363 * bootstrap (build_cvs_prefix): Remove; unused.
9364 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9365 when getting gnulib.
9366
9367 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9368
9369 * data/glr.c: Reorder typedef declarations for structs to match order
9370 of struct declarations.
9371 Rename yystack everywhere to yystackp except in yyparse where it's not
9372 a pointer.
9373 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9374 consistency.
9375 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9376 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9377 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9378 lint.
9379
9380 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9381
9382 * tests/sets.at (Accept): Fix typos in regular expression used to
9383 sed out the final state number.
9384
9385 Work around portability problem on Solaris 10: flex-generated
9386 files include <stdio.h> before <config.h>, which messes up
9387 because the latter defines __EXTENSIONS__. Address the problem
9388 by creating two new little files that include <config.h> first,
9389 then include the flex-generated files. Rewrite everyone else
9390 to include <config.h> first, as well.
9391 * lib/timevar.c: Always include "config.h".
9392 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9393 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9394 (EXTRA_bison_SOURCES): New macro.
9395 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9396 * src/system.h: Don't include config.h.
9397 * src/LR0.c: Include <config.h> first.
9398 * src/assoc.c: Likewise.
9399 * src/closure.c: Likewise.
9400 * src/complain.c: Likewise.
9401 * src/conflicts.c: Likewise.
9402 * src/derives.c: Likewise.
9403 * src/files.c: Likewise.
9404 * src/getargs.c: Likewise.
9405 * src/gram.c: Likewise.
9406 * src/lalr.c: Likewise.
9407 * src/location.c: Likewise.
9408 * src/main.c: Likewise.
9409 * src/muscle_tab.c: Likewise.
9410 * src/nullable.c: Likewise.
9411 * src/output.c: Likewise.
9412 * src/parse-gram.y: Likewise.
9413 * src/print.c: Likewise.
9414 * src/print_graph.c: Likewise.
9415 * src/reader.c: Likewise.
9416 * src/reduce.c: Likewise.
9417 * src/relation.c: Likewise.
9418 * src/state.c: Likewise.
9419 * src/symlist.c: Likewise.
9420 * src/symtab.c: Likewise.
9421 * src/tables.c: Likewise.
9422 * src/uniqstr.c: Likewise.
9423 * src/vcg.c: Likewise.
9424
9425 * src/parse-gram.y: Fix minor problems uncovered by lint.
9426 (current_lhs, current_lhs_location): Now static.
9427 (current_assoc): Remove unused variable.
9428
9429 Cleanups so that Bison-generated parsers have less lint.
9430 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9431 Prepend /*ARGSUSED*/, for lint's sake.
9432 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9433 definition if 'lint' is defined.
9434 (YYID): New macro (or function, if lint).
9435 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9436 * data/yacc.c: Likewise.
9437 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9438 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9439 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9440 is C++ only.
9441 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9442 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9443 Use YYID(0) rather than 0, for lint.
9444 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9445 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9446
9447 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9448
9449 * tests/glr-regression.at
9450 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9451 Close memory leak reported by twlevo.
9452
9453 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9454
9455 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9456 all stacks.
9457 (yyparse): Iterate another stack in order to call user destructors.
9458 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9459 New test case.
9460 (Duplicated user destructor for lookahead): This test now is expected
9461 to succeed.
9462
9463 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9464
9465 * NEWS: Document the following change.
9466 * data/yacc.c: Say "parser skeleton" rather than "file", since
9467 it's no longer just a file.
9468 * data/glr.c: Grant a special exception for C GLR parsers, that
9469 reads like the already-existing exception for C LALR(1) parsers.
9470 * data/glr.cc: Likewise.
9471 * data/lalr1.cc: Likewise.
9472 * data/location.cc: Likewise.
9473 * data/yacc.c: Reword the "written by" statement to clarify that
9474 it was the parser skeleton, not the entire output file.
9475 * data/glr.c: Written by Paul Hilfinger.
9476 * data/glr.cc: Written by Akim Demaille.
9477 * data/lalr1.cc: Likewise.
9478
9479 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9480
9481 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9482 Fix typos in previous change that broke 'make check'.
9483 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9484 supported in C.
9485 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9486 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9487 We can revert this once things settle down.
9488
9489 * src/conflicts.c (conflicts_print): Don't print file name twice
9490 when %expect fails because there were no conflicts.
9491 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9492 change.
9493 * tests/conflicts.at (%expect not enough, %expect too much):
9494 (%expect with reduce conflicts): Adjust to new behavior.
9495
9496 2005-11-18 Akim Demaille <akim@epita.fr>
9497
9498 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9499 errors.
9500 * NEWS: Document this.
9501 * doc/bison.texinfo (Expect Decl): Likewise.
9502
9503 2005-11-16 Akim Demaille <akim@epita.fr>
9504
9505 Generalize the display of semantic values and locations in traces.
9506 * data/glr.c (yy_reduce_print): Fix indices (again).
9507 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9508 literal integers.
9509 * data/lalr1.cc (yyreduce_print): Rename as...
9510 (yy_reduce_print): this.
9511 Display values and locations.
9512 * data/yacc.c (yy_reduce_print): Likewise.
9513 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9514 (yysymprint): Move higher to be visible from yy_reduce_print).
9515 (yyparse): Adjust.
9516 * tests/calc.at: Adjust the expected length of the traces.
9517
9518 2005-11-14 Akim Demaille <akim@epita.fr>
9519
9520 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9521 from 1 to N, while values and location start at 0.
9522 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9523
9524 2005-11-14 Akim Demaille <akim@epita.fr>
9525
9526 * data/glr.c (yy_reduce_print): Fix the $ number.
9527
9528 2005-11-14 Akim Demaille <akim@epita.fr>
9529
9530 "Use" parse parameters.
9531 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9532 * data/glr.c, data/glr.cc: Use them.
9533 * data/glr.c (YYUSE): Have a C++ definition that supports
9534 non-pointer types.
9535
9536 2005-11-14 Akim Demaille <akim@epita.fr>
9537
9538 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9539
9540 2005-11-14 Akim Demaille <akim@epita.fr>
9541
9542 * data/glr.cc: New.
9543 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9544
9545 2005-11-12 Akim Demaille <akim@epita.fr>
9546
9547 Let position and location be PODs.
9548 * data/location.cc (position::initialize, location::initialize): New.
9549 (position::position, location::location): Define only if
9550 b4_location_constructors is defined.
9551 * data/lalr1.cc (b4_location_constructors): Define it for backward
9552 compatibility.
9553 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9554
9555 2005-11-12 Akim Demaille <akim@epita.fr>
9556
9557 * data/lalr1.cc: Move the body of the ctor and dtor into the
9558 parser file (instead of the header).
9559 Wrap the implementations in a "namespace yy".
9560
9561 2005-11-12 Akim Demaille <akim@epita.fr>
9562
9563 Have glr.c include its header file when created.
9564 * data/glr.c (b4_shared_declarations): New.
9565 Output them verbatim in the parser if !%defines, otherwise
9566 output then in the header file, and include it instead.
9567
9568 2005-11-11 Akim Demaille <akim@epita.fr>
9569
9570 * data/glr.c: Comment changes.
9571
9572 2005-11-11 Akim Demaille <akim@epita.fr>
9573
9574 When yydebug, report semantic and location values for reductions.
9575 * data/glr.c (yy_reduce_print): Report the semantic values and the
9576 locations.
9577 (YY_REDUCE_PRINT): Adjust.
9578 (yyglrReduce): Use them.
9579 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9580 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9581 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9582 traces.
9583
9584 2005-11-10 Akim Demaille <akim@epita.fr>
9585
9586 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9587 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9588 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9589
9590 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9591
9592 * m4/cxx.m4, examples/Makefile.am: Don't build
9593 examples/calc++ if no C++ compiler is available. (trivial change)
9594
9595 2005-11-09 Akim Demaille <akim@epita.fr>
9596
9597 * src/scan-skel.l: Use a couple of asserts.
9598
9599 2005-11-03 Akim Demaille <akim@epita.fr>
9600
9601 In some (weird) cases, the final state number is incorrect.
9602 Reported by Alexandre Duret-Lutz.
9603 * src/LR0.c (state_list_append): Remove the computation of
9604 final_state.
9605 (save_reductions): Do it here.
9606 (get_state): Alpha conversion.
9607 (generate_states): Use a for loop.
9608 * src/gram.h (item_number_is_rule_number)
9609 (item_number_is_symbol_number): New.
9610 * src/state.c: Use assert.
9611 * src/system.h: Include assert.h.
9612 * tests/sets.at (Accept): New.
9613
9614 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9615
9616 * data/glr.c (yyfill): Adjust comment.
9617 (yyresolveAction): Initialize default location properly
9618 for empty right-hand sides.
9619 (yydoAction): Ditto.
9620 Add comment explaining apparently dead code.
9621 * tests/glr-regression.at
9622 (Incorrectly initialized location for empty right-hand side in GLR):
9623 New test.
9624
9625 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9626
9627 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9628 gnulib when interrupted. This fixes some race conditions and
9629 works around some portability problems (one noted by Paul
9630 Hilfinger).
9631
9632 2005-10-22 Akim <akim@epita.fr>
9633
9634 * Makefile.cfg: Adjust to config -> build-aux.
9635 Reported by twledo.
9636
9637 2005-10-21 Akim Demaille <akim@epita.fr>
9638
9639 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9640 the %parse-params.
9641 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9642 * data/yacc.c (b4_Pure_if): Rename as...
9643 (b4_yacc_pure_if): this.
9644 (YY_SYMBOL_PRINT, yyparse): Adjust.
9645 * doc/bison.texinfo: Formatting changes.
9646
9647 2005-10-21 Akim Demaille <akim@epita.fr>
9648
9649 Finish the transition config -> build-aux.
9650 * configure.ac, Makefile.am: Use build-aux.
9651 * config/prev-version, config/announce-gen, config/Makefile.am:
9652 Move to...
9653 * build-aux/prev-version, build-aux/announce-gen,
9654 * build-aux/Makefile.am: here.
9655
9656 2005-10-14 Akim Demaille <akim@epita.fr>
9657
9658 * examples/calc++/test: Use set -x only when VERBOSE.
9659
9660 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9661
9662 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9663 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9664
9665 2005-10-13 Akim Demaille <akim@epita.fr>
9666
9667 * src/scan-skel.l: Output the base name parts of the parser and
9668 header file names.
9669 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9670 additional checks.
9671 Use this to exercise C++ outputs in subdirs.
9672 Reported by Oleg Smolsky.
9673
9674 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9675
9676 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9677 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9678 Problem reported by John P. Hartmann.
9679 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9680 already defined it.
9681
9682 2005-10-12 Akim Demaille <akim@epita.fr>
9683
9684 * src/parse-gram.y (version_check): Exit 63 to please missing
9685 (stands for "version mismatch).
9686 * tests/input.at, doc/bison.texinfo: Adjust.
9687
9688 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9689
9690 Work around portability problems with Visual Age C compiler
9691 (xlc and xlC_r) reported by John P. Hartmann.
9692 * data/location.cc (initial_column, initial_line): Remove.
9693 All uses replaced by 0 and 1.
9694 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9695 that xlc complains about.
9696 * src/scan-skel.l (skel_wrap): Likewise.
9697 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9698 as __STDC__.
9699 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9700 __STDC_VERSION__. Use it everywhere instead of looking at
9701 __STDC__ and __cplusplus.
9702
9703 2005-10-10 Akim Demaille <akim@epita.fr>
9704
9705 * examples/calc++/test: Be quiet unless VERBOSE.
9706
9707 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9708
9709 * data/c.m4 (yydestruct, yysymprint):
9710 Use YYUSE instead of casting to void.
9711 * data/glr.c (YYUSE): New macro.
9712 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9713 Use it instead of rolling our own.
9714 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9715 (YYCHK1):
9716 Use /*CONSTCOND*/ to suppress lint warnings.
9717 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9718 (YY_STACK_PRINT): Use 'false' not '0'.
9719 (YYUSE): New macro.
9720 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9721 * data/yacc.c (YYUSE): New macro.
9722 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9723 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9724 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9725
9726
9727 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9728 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9729
9730 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9731
9732 Undo the parts of the unlocked-I/O change that substituted
9733 putc or puts for printf. This might hurt performance a bit,
9734 but some people prefer the printf style.
9735 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9736 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9737 All uses replaced by YYFPRINTF and YYDPRINTF.
9738 * data/yacc.c: Likewise.
9739 * lib/bitset.c (bitset_print): Likewise.
9740 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9741 putc and puts.
9742 * lib/lbitset.c (debug_lbitset): Likewise.
9743 * src/closure.c (print_firsts, print_fderives): Likewise.
9744 * src/gram.c (grammar_dump): Likewise.
9745 * src/lalr.c (look_ahead_tokens_print): Likewise.
9746 * src/output.c (escaped_output): Likewise.
9747 (user_actions_output): Break apart two printfs.
9748 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9749 * src/reduce.c (reduce_print): Likewise.
9750 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9751 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9752
9753 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9754 Use assignments rather than casts-to-void to suppress
9755 unused-variable warnings. This pacifies 'lint'.
9756 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9757 unused-variable warnings.
9758
9759 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9760
9761 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9762
9763 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9764
9765 Use unlocked I/O for a minor performance improvement on hosts like
9766 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9767 is to use the gnlib unlocked-io module, and to prefer putc and
9768 puts to printf when either will work (since the latter doesn't
9769 come in an unlocked flavor).
9770 * bootstrap (gnulib_modules): Add unlocked-io.
9771 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9772 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9773 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9774 and similarly for puts and putc and printf.
9775 * data/yacc.c: Likewise.
9776 * lib/bitset.c (bitset_print): Likewise.
9777 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9778 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9779 to printf.
9780 * lib/lbitset.c (debug_lbitset): Likewise.
9781 * src/closure.c (print_firsts, print_fderives): Likewise.
9782 * src/gram.c (grammar_dump): Likewise.
9783 * src/lalr.c (look_ahead_tokens_print): Likewise.
9784 * src/output.c (escaped_output): Likewise.
9785 (user_actions_output): Coalesce two printfs.
9786 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9787 * src/reduce.c (reduce_print): Likewise.
9788 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9789 * src/system.h: Include unlocked-io.h rather than stdio.h.
9790
9791 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9792 this confuses xgettext.
9793
9794 2005-10-02 Akim Demaille <akim@epita.fr>
9795
9796 * bootstrap (gnulib_modules): Add strverscmp.
9797 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9798 * m4/.cvsignore: Add strverscmp.m4.
9799 * src/parse-gram.y (%require): New token, new rule.
9800 (version_check): New.
9801 * src/scan-gram.l (%require): Adjust.
9802 * tests/input.at (AT_REQUIRE): New.
9803 Use it.
9804 * doc/bison.texinfo (Require Decl): New.
9805 (Calc++ Parser): Use %require.
9806
9807 2005-10-02 Akim Demaille <akim@epita.fr>
9808
9809 * data/location.cc: New.
9810
9811 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9812 Akim Demaille <akim@epita.fr>
9813
9814 Make sure -odir/foo.cc creates dir/location.hh etc.
9815 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9816 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9817 (spec_defines_file): Now const.
9818 (dir_prefix): New.
9819 (short_base_name): Remove.
9820 * src/files.c: Adjust.
9821 (dirname.h): Include.
9822 (base_name): Don't prototype it.
9823 (finput): Remove, duplicates gram_in.
9824 (full_base_name, short_base_name): Replace by...
9825 (all_but_ext, all_but_tab_ext): these.
9826 (compute_base_names): Rename as...
9827 (compute_file_name_parts): this.
9828 Update to compute the new variables, including dir_prefix.
9829 Adjust dependencies.
9830 * src/output.c (prepare): Output them.
9831 * src/reader.c: Adjust to use gram_in, not finput.
9832 * src/scan-skel.l (@dir_prefix@): New.
9833
9834 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9835
9836 * lib/subpipe.c: New function end_of_output_subpipe() added
9837 to allow support for non-posix systems. This is a no-op function
9838 for posix systems.
9839
9840 * lib/subpipe.h: New function end_of_output_subpipe() added
9841 to allow support for non-posix systems. This is a no-op function
9842 for posix systems.
9843
9844 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9845 handle the lack of pipe/fork functionality on non-posix systems.
9846
9847 * djgpp/Makefile.maint: DJGPP specific file.
9848
9849 * djgpp/README.in: DJGPP specific file.
9850
9851 * djgpp/config.bat: DJGPP specific configuration file.
9852
9853 * djgpp/config.sed: DJGPP specific configuration file.
9854
9855 * djgpp/config.site: DJGPP specific configuration file.
9856
9857 * djgpp/config_h.sed: DJGPP specific configuration file.
9858
9859 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9860
9861 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9862
9863 2005-10-02 Akim Demaille <akim@epita.fr>
9864
9865 * data/location.cc: New, extract from...
9866 * data/lalr1.cc: here.
9867 (location.hh): Include it after the user prologue, in case the
9868 filename type is defined by the user.
9869 Forward declation location and position before the pre-prologue.
9870 (yyresult_): Rename as...
9871 (yyresult): this, it's a local variable, not an attribute.
9872 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9873
9874 2005-10-01 Akim Demaille <akim@epita.fr>
9875
9876 * examples/extexi: Restore the #line generation.
9877
9878 2005-09-30 Akim Demaille <akim@epita.fr>,
9879 Alexandre Duret-Lutz <adl@gnu.org>
9880
9881 Move the token type and YYSTYPE in the parser class.
9882 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9883 (parser::token): New, from the moved free definition of tokens.
9884 (parser::semantic_value): Now a full definition instead of an
9885 indirection to YYSTYPE.
9886 (b4_post_prologue): No longer included in the header file, but
9887 in the implementation file.
9888 * doc/bison.texi (C+ Language Interface): Update.
9889 * src/parse-gram.y: Support unary %define.
9890 * tests/actions.at: Define global_tokens_and_yystype for backward
9891 compatibility until we update the tests.
9892 * tests/calc.at: Idem.
9893 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9894 to simplify the code.
9895
9896 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9897
9898 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9899 Ah, the good old days! Problem reported by Peter Klein.
9900 * bootstrap (gnulib_modules): Add strerror, strtoul.
9901 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9902 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9903
9904 2005-09-29 Akim Demaille <akim@epita.fr>
9905
9906 * data/c.m4 (b4_error_verbose_if): New.
9907 * data/lalr1.cc: Use it.
9908 (YYERROR_VERBOSE_IF): Remove.
9909 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9910 parser members, replaced by...
9911 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9912 local variables.
9913 (yysyntax_error_): Takes the state number as argument.
9914 (yyreduce_print_): Use the argument yyrule, not the former
9915 attribute yyn_.
9916
9917 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9918
9919 * bootstrap (gnulib_modules): Add verify.
9920 * lib/.cvsignore: Add verify.h.
9921 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9922 * src/system.h (verify): Remove.
9923 Include verify.h instead.
9924 * src/tables.c (tables_generate): Use new API for 'verify'.
9925
9926 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9929 local variables whose names begin with 'yy'.
9930 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9931 Trivial changes from Joel E. Denny.
9932
9933 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9934 it itself.
9935 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9936 don't use alloca any more.
9937
9938 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9939 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9940 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9941 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9942 to match yacc.c, to test more hosts.
9943
9944 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9945
9946 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9947 doesn't affect behavior.
9948 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9949 Solaris, AIX, MSC.
9950 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9951 This works a bit better with glibc, if user code has already included
9952 stdlib.h.
9953 * doc/bison.texinfo (Bison Parser): Document that users can't
9954 arbitrarily use malloc and free for other purposes. Document
9955 that <alloca.h> and <malloc.h> might be included.
9956 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9957 user must declare alloca.
9958
9959 * HACKING (release): Forwarn the Translation Project about
9960 stable releses.
9961
9962 2005-09-20 Akim Demaille <akim@epita.fr>
9963
9964 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9965
9966 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9967
9968 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9969 (YYSTACK_ALLOC_MAXIMUM): Use it.
9970 (yysyntax_error): New function.
9971 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9972 multiple syntax errors are reported, and alloca is being used.
9973 Instead, reallocate buffers twice as big each time, so that
9974 we waste at most half the allocated memory. Start with a small
9975 (128-byte) buffer that will suffice in most cases anyway.
9976 Use yysyntax_error to do most of the work.
9977
9978 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9979 yynerrs is the number of errors reported, not the number of
9980 errors encountered.
9981
9982 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9983 Mark it as expected to fail.
9984 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9985 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9986 Don't start user-code symbols with "yy", to avoid name space problems.
9987
9988 2005-09-19 Akim Demaille <akim@epita.fr>
9989
9990 Remove the traits, failed experiment.
9991 It never proved useful, and anyway because of the current
9992 definition, it was not possible to have several specialization of
9993 this traits, making it useless.
9994 * data/lalr1.cc (yy:traits): Remove.
9995 Inline its definitions in the parser class.
9996
9997 2005-09-19 Akim Demaille <akim@epita.fr>
9998
9999 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10000 least Mac OSX with a /usr/local install of gettext.
10001
10002 2005-09-19 Akim Demaille <akim@epita.fr>
10003
10004 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10005 and yytoken for similarity with the other skeletons.
10006
10007 2005-09-19 Akim Demaille <akim@epita.fr>
10008
10009 * NEWS, configure.ac: update version number to 2.1a.
10010
10011 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10012
10013 * NEWS: Version 2.1.
10014
10015 * NEWS: Remove notice of yytname change, since it was never in an
10016 official release.
10017 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10018 diagnostic.
10019 * src/output.c (prepare): Likewise.
10020 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10021 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10022 is not defined. This is an awful hack, but it's enough for now.
10023 All callers changed.
10024 * tests/glr-regression-at (make_value): Args are const pointers now,
10025 to avoid GCC warning.
10026 (Duplicated user destructor for lookahead): New test. Currently
10027 skipped. It fails on my host but I'm not sure it'll always fail.
10028
10029 2005-09-16 Akim Demaille <akim@epita.fr>
10030
10031 * src/symtab.h (struct symbol): Declare the printer and destructor
10032 as const, to avoid accidental calls to free.
10033 (symbol_destructor_set, symbol_printer_set): Adjust.
10034 * src/symtab.c: Adjust.
10035
10036 2005-09-16 Akim Demaille <akim@epita.fr>
10037
10038 * data/c.m4 (b4_token_enums): New.
10039 (b4_token_defines): Rename as...
10040 (b4_token_enums_defines): this.
10041 (b4_token_defines): New, output only the #defines.
10042 * data/yacc.c, data/glr.c: Adjust.
10043 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10044 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10045 as default values.
10046
10047 2005-09-16 Akim Demaille <akim@epita.fr>
10048
10049 * data/lalr1.cc (yylex_): Remove, inline its code.
10050 (yyreport_syntax_error_): Remove, replaced by...
10051 (yysyntax_error_): this which returns a string and leaves to the
10052 caller the call to the users' error function.
10053 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10054 Move from members of the parser object...
10055 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10056 to local variables of the parse function.
10057
10058 2005-09-16 Akim Demaille <akim@epita.fr>
10059
10060 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10061 since it's in Bison's name space.
10062
10063 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10064
10065 * data/glr.c (yyresolveValue): Add default case to pacify
10066 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10067
10068 * NEWS: Document when yyparse started to return 2.
10069 * doc/bison.texinfo (Parser Function): Document when yyparse
10070 returns 2.
10071
10072 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10073 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10074 changed.
10075 (class position): file_name -> filename (reverting). All uses changed.
10076
10077 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10078
10079 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10080 do anything if $@ exists. This reverts part of the 2005-07-07
10081 patch.
10082
10083 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10084
10085 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10086 contains obsolete information and isn't worth distributing as a
10087 separate file anyway.
10088 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10089 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10090 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10091 (yyparse): Abort if user code uses longjmp to throw an unexpected
10092 value.
10093
10094 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10095
10096 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10097 Suggested by twlevo@xs4all.nl.
10098
10099 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10100 This avoids a diagnostic from gcc -Wswitch-enum.
10101 Problem reported by twlevo@xs4all.nl.
10102
10103 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10104 standards. Use "file name" or "file" or "name", depending on
10105 the context.
10106 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10107 not to hack/foo.tab.c.
10108 (Calc++ Top Level): 2nd arg of main is not const.
10109 * data/glr.c: b4_filename -> b4_file_name.
10110 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10111 All uses changed.
10112 (class position): filename -> file_name. All uses changed.
10113 * data/yacc.c: b4_filename -> b4_file_name.
10114 * lib/bitset.h: filename -> file_name in local vars.
10115 * lib/bitset_stats.c: Likewise.
10116 * src/files.c: Likewise.
10117 * src/scan-skel.l ("@output ".*\n): Likewise.
10118 * src/files.c (file_name_split): Renamed from filename_split.
10119 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10120
10121 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10122
10123 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10124 to accommodate latest gnulib.
10125
10126 * tests/glr-regression.at (Duplicate representation of merged trees):
10127 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10128
10129 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10130 needed.
10131
10132 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10133
10134 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10135 All uses changed. Invoke user destructor after an error during a
10136 split parse (trivial change from Joel E. Denny).
10137
10138 * tests/glr-regression.at
10139 (User destructor after an error during a split parse): New test case.
10140 Problem reported by Joel E. Denny in:
10141 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10142
10143 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10144
10145 * README-cvs: Give URLs for recommended tools.
10146 Mention Gzip version problem, and bootstrapping issues.
10147 Remove troubleshooting section, as it's somewhat obsolete.
10148
10149 * bootstrap (no_cache): New var, to accommodate different wget
10150 variants. Use it instead of '-C off'. Problem reported by
10151 twlevo@xs4all.nl.
10152
10153 * data/glr.c (yydestroyStackItem): New function.
10154 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10155 debugging information. Problem reported by Joel E. Denny.
10156
10157 2005-08-25 Akim Demaille <akim@epita.fr>
10158
10159 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10160
10161 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10162
10163 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10164 Don't invoke destructor on unresolved entries.
10165 * tests/glr-regression.at
10166 (User destructor for unresolved GLR semantic value): New test case.
10167 Problem reported by Joel E. Denny in:
10168 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10169
10170 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10171
10172 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10173 Add strnlen.c.
10174 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10175 lib-prefix.m4, po.m4.
10176
10177 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10178 in yydestruct diagnostic, since it might not be an error.
10179 Problem reported by Joel Denny near end of
10180 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10181 * data/lalr1.cc (yyerturn): Likewise.
10182 * data/yacc.c (yyreturn): Likewise.
10183 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10184
10185 * src/files.c: Remove obsolete FIXME comment.
10186
10187 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10188 with the other templates, and to fix bogus run-on messages such
10189 as the one reported at the end of
10190 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10191 All callers changed to avoid the newline.
10192 (yyprocessOneStack): Output two lines rather than one, to accommodate
10193 the above change. This changes the debug output format slightly.
10194
10195 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10196 reported by Joel E. Denny in
10197 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10198 (trivial change).
10199 * tests/glr-regression.at (Duplicate representation of merged trees):
10200 New test, from Joel E. Denny in:
10201 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10202 * THANKS: Add Joel E. Denny.
10203
10204 * configure.ac (AC_INIT): Bump to 2.0c.
10205
10206 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10207
10208 * NEWS: Version 2.0b.
10209
10210 * Makefile.am (SUBDIRS): Put examples before tests, so that
10211 "make check" doesn't finish with "All 1 tests passed".
10212
10213 * tests/regression.at (Token definitions): Don't rely on
10214 AT_PARSER_CHECK for data that contains backslashes. It currently
10215 uses 'echo', and 'echo' isn't portable if its argument contains
10216 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10217 that the byte '\0xff' is not printable in the C locale; it is,
10218 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10219 not printable, so use '\0x81' to test.
10220
10221 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10222 version of GCC, since the macro is used with non-GCC compilers.
10223
10224 Fix core dump reported by Pablo De Napoli in
10225 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10226 * tests/regression.at (Invalid inputs with {}): New test.
10227 * src/parse-gram.y (token_name): Translate type before using
10228 it as an index.
10229
10230 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10231 the user's name space. All uses changed to __attribute__
10232 ((__unused__)).
10233 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10234 Add __attribute__ ((__noreturn__)).
10235
10236 * etc/clcommit: Remove. We weren't using it, and it failed
10237 "make maintainer-distcheck".
10238 * Makefile.maint: Merge from coreutils.
10239 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10240 (syntax-check-rules): Change list of rules as described below.
10241 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10242 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10243 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10244 (sc_trailing_space): New rules.
10245 (sc_xalloc_h_in_src): Remove.
10246 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10247 (sc_space_tab, sc_error_exit_success, sc_changelog):
10248 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10249 (makefile-check, po-check, author_mark_check):
10250 (makefile_path_separator_check, copyright-check):
10251 Use grep -n, to make it easier to find violations.
10252 Use CVS_LIST and CVS_LIST_EXCEPT.
10253 (header_regexp, h_re): Remove.
10254 (dd_c): New macro.
10255 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10256 (my-distcheck): Use more-modern GCC flags.
10257 (signatures, %.asc): Remove.
10258 (rel-files, announcement): Remove signatures.
10259 Restore old updating code, even though we don't use it, so
10260 that we're the same as coreutils.
10261 (alpha, beta, major): Depend on news-date-check.
10262 Make the upload commands.
10263
10264 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10265 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10266 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10267 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10268 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10269 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10270 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10271 * tests/sets.at: Likewise.
10272
10273 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10274 we comment out the Autoconf version number.
10275 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10276 it's error-prone and "make maintainer-distcheck" rejects it.
10277
10278 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10279 Indent calls to "error" to pacify "make maintainer-distcheck",
10280 when the calls are not intended to be translated.
10281 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10282
10283 * src/Makefile.am (DEFS): Use +=, to pacify
10284 "make maintainer-distcheck".
10285 (bison_SOURCES): Add scan-skel.h.
10286 (sc_tight_scope): New rule, from coreutils.
10287
10288 * src/files.c (src_extension, header_extension):
10289 Now static, not extern.
10290 * src/getargs.c (short_options): Likewise.
10291 * src/muscle_tab.c (muscle_table): Likewise.
10292 * src/parse-gram.y (current_class, current_type, current_prec):
10293 Likewise.
10294 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10295 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10296 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10297 void, to avoid warning when NLS is disabled.
10298 * src/output.c: Include scan-skel.h.
10299 (scan_skel): Remove decl, since scan-skel.h does this.
10300 (output_skeleton):
10301 Indent calls to "error" to pacify "make maintainer-distcheck".
10302 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10303 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10304 "make maintainer-distcheck".
10305 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10306 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10307 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10308 (skel_lex_destroy, scan_skel): Move these decls to...
10309 * src/scan-skel.h: New file.
10310 * src/uniqstr.c (uniqstr_assert):
10311 Indent calls to "error" to pacify "make maintainer-distcheck".
10312
10313 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10314 not @VAR@.
10315
10316 * tests/torture.at: Revamp to avoid misuse of atoi that
10317 "make maintainer-distcheck" complained about.
10318
10319 * examples/extexi (message): Don't print a message more than once,
10320 and omit line-number decoration that makes Emacs compile think
10321 that informative messages are worth worrying about.
10322
10323 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10324
10325 * configure.ac: Update version number.
10326
10327 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10328 accidentally.
10329 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10330 autogenerated by the maintainer.
10331 * examples/calc++/.cvsignore: Add *.yy.
10332
10333 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10334 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10335 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10336
10337 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10338
10339 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10340 from maintainer-distcheck about casting the argument of 'free'.
10341
10342 * NEWS: Mention recent yytname changes.
10343 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10344
10345 * bootstrap: For translations that have not yet been upgraded to
10346 the new runtime-po domain, prime the pump by extracting the
10347 relevant strings from the obsolete translations. This code can be
10348 removed once the bison-runtime domain has been translated by each
10349 team.
10350
10351 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10352 now that token names are already quoted.
10353
10354 Fix problem reported by Anthony Heading.
10355 * data/glr.c (YYTOKEN_TABLE): New macro.
10356 (yytname): Define if YYTOKEN_TABLE.
10357 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10358 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10359 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10360 * src/output.c (prepare_symbols): Output token_table_flag.
10361
10362 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10363
10364 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10365 again if the first call fails.
10366
10367 * data/glr.c (yytnamerr): New function.
10368 (yyreportSyntaxError): Use it to dequote most string literals.
10369 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10370 with other skeletons. All uses changed.
10371 (yytnameerr_): New function.
10372 (yyreport_syntax_error): Use it to dequote most string literals.
10373 * data/yacc.c (yytnamerr): New function.
10374 (yyerrlab): Use it to decode most string literals.
10375 * doc/bison.texinfo (Decl Summary, Calling Convention):
10376 Clarify quoting convention of yytname.
10377 * src/output.c (prepare_symbols): Quote all names. This undoes
10378 the 2005-04-17 change, which is now accomplished (mostly) via
10379 changes in the parsers as described above.
10380 * tests/regression.at (Token definitions, Web2c Actions):
10381 Undo most 2005-04-17 change here, too.
10382
10383 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10384
10385 Fix more problems reported by twlevo@xs4all.nl.
10386 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10387 remove trailing spaces. This loses the exit status of ./types,
10388 and isn't needed since ./types shouldn't be emitting trailing
10389 spaces.
10390 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10391 as the stack isn't valid in that case.
10392
10393 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10394 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10395 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10396 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10397 is used.
10398 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10399 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10400 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10401 Likewise.
10402
10403 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10404 overly-picky compilers that reject 'char *foo = "bar";'.
10405
10406 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10407 to FILE * parameter, not to stderr. This fixes a typo introduced
10408 in the 2005-07-12 change.
10409
10410 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10411 warnings from GCC 4.
10412
10413 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10414 (yyglrShiftDefer, yysplitStack):
10415 Remove unused parameters b4_pure_formals. All uses changed.
10416 (yyglrShift): Remove unused parameters b4_user_formals.
10417 All uses changed.
10418 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10419
10420 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10421
10422 Destructor cleanups and regularization among the three skeletons.
10423 * NEWS: Document the behavior changes.
10424 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10425 stack before failing, as the cleanup code will do it for us now.
10426 * data/lalr1.cc (yyerrlab): Likewise.
10427 * data/glr.c (yyparse): Pop everything off the stack before
10428 freeing it, so that destructors get called properly.
10429 * data/lalr1.cc (yyreturn): Likewise.
10430 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10431 This is more consistent.
10432 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10433 why destructors might be called. 1.875 -> 2.1.
10434 (Destructor Decl, Decl Summary, Table of Symbols):
10435 Some English-language cleanups for %destructor.
10436 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10437 Add output line for destructor of start symbol.
10438 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10439 because of that same extra output line.
10440
10441 * NEWS: Document minor wording changes in diagnostics of
10442 Bison-generated parsers.
10443 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10444 Remove unused formals. All uses changed.
10445 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10446 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10447 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10448 Rename yyoverflowab to yyexhaustedlab.
10449 When memory exhaustion occurs during syntax-error reporting,
10450 report it separately rather than in a single diagnostic; this
10451 eases translation.
10452 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10453 (Memory Exhausted): Renamed from Parser Stack Overflow.
10454 Revamp wording slightly to prefer "memory exhaustion".
10455 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10456
10457 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10458
10459 Add i18n support to the GLR skeleton. Partially fix the C++
10460 skeleton; a C++ expert needs to finish this. Remove debugging
10461 msgids; there's little point to having them translated, since they
10462 can be understood only by someone who can read the
10463 (English-language) source code.
10464
10465 Generate runtime-po/bison-runtime.pot automatically, so that we
10466 don't have to worry about garbage getting in that file. We'll
10467 make sure after the next official release that old msgids don't
10468 get lost. See
10469 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10470
10471 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10472 Now auto-generated.
10473 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10474 Fix typos in explanations of the runtime file.
10475 * bootstrap: Change gettext keyword from YYI18N to YY_.
10476 Use standard Makefile.in.in in runtime-po, since we'll arrange
10477 for backward-compatible bison-runtime.po files in a different way.
10478 * data/glr.c (YY_): New macro, from yacc.c.
10479 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10480 Translate messages intended for users.
10481 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10482 the wording in the other skeletons. We don't know that the memory
10483 is virtual.
10484 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10485 Use same method that yacc.c uses.
10486 Don't translate debugging messages.
10487 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10488 it doesn't work (yet), and requires C++ expertise to fix.
10489 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10490 Move defn to a more logical place, to be consistent with other
10491 skeletons.
10492 Don't translate debugging messages.
10493 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10494 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10495 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10496 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10497
10498 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10499 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10500 void, not int.
10501 * tests/glr-regression.at (Badly Collapsed GLR States):
10502 Likewise.
10503 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10504 yylex should return 0 at EOF rather than aborting.
10505
10506 Improve tests for stack overflow in GLR parser.
10507 Problem reported by twlevo@xs4all.nl.
10508 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10509 All uses removed.
10510 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10511 can handle the problem.
10512 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10513 (yyparse): New local variable yyresult to record the result.
10514 Use result of setjmp to set it, rather than storing itinto
10515 struct.
10516 (yyDone): Remove label.
10517 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10518 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10519 if YYABORT is used).
10520 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10521 yyparse status; put status > 1 into diagnostic.
10522 Check that status==2 works.
10523 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10524 Use exit status 3 for failure to open (which shouldn't happen).
10525
10526 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10527
10528 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10529 1 on syntax error; just let yyparse do its thing.
10530 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10531 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10532 (Exploding the Stack Size with Alloca):
10533 (Exploding the Stack Size with Malloc):
10534 Expect exit status 2, not 1, since the parser is supposed to blow
10535 its stack. Problem reported by twlevo@xs4all.nl.
10536
10537 * data/glr.c (yyparse): Don't assume that the initial calls
10538 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10539 Print a stack-overflow message and fail instead.
10540 Initialize the line-number information before creating the stack,
10541 so that the stack-overflow message can report line zero safely.
10542
10543 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10544
10545 Fix problems reported by twlevo@xs4all.nl.
10546 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10547 (yyuserMerge): Provide a default case if b4_mergers is empty.
10548 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10549 * tests/glr-regression.at
10550 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10551 Add casts to pacify C++ compilers.
10552 * tests/glr-regression.at (Improper merging of GLR delayed action
10553 sets): Declare yylex before using it.
10554 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10555 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10556 test for valgrind; valgrind is independent of g++.
10557 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10558 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10559 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10560 Use a destructor, so that we can expand the stack. Change
10561 YYSTYPE to char * so that we can free it. Cast result of malloc.
10562
10563 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10564
10565 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10566 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10567
10568 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10569
10570 * PACKAGING: New file, suggested by Bruno Haible and taken from
10571 similar wording in gettext's PACKAGING file.
10572 * NEWS: Mention PACKAGING.
10573 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10574
10575 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10576
10577 * NEWS: Document recent i18n improvements.
10578 * bootstrap: Get runtime translations into runtime-po.
10579 Create runtime-po files automatically, if possible.
10580 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10581 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10582 does not infringe on the user's name space.
10583 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10584 * doc/bison.texinfo (Internationalization): Revamp the English
10585 and Texinfo syntax a bit, to try to make it clearer.
10586 (Bison Options, Option Cross Key): Mention --print-localedir.
10587 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10588 YYENABLE_NLS. Quote a bit more.
10589 * runtime-po/.cvsignore: New file.
10590 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10591 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10592 * runtime-po/quot.sed: Likewise.
10593 * runtime-po/boldquot.sed: Likewise.
10594 * runtime-po/en@quot.header: Likewise.
10595 * runtime-po/en@boldquot.header: Likewise.
10596 * runtime-po/insert-header.sin: Likewise.
10597 * runtime-po/remove-potcdate.sin: Likewise.
10598 * runtime-po/Makevars: Likewise.
10599 * runtime-po/LINGUAS: Likewise.
10600 * runtime-po/de.po: Likewise; we will rely on the translation project
10601 to maintain this, so "bootstrap" should get it.
10602 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10603 its value.
10604 * src/main.c (main): Bind the bison-runtime domain, too.
10605
10606 2005-07-12 Bruno Haible <bruno@clisp.org>
10607
10608 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10609 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10610 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10611 * runtime-po: New directory.
10612 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10613 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10614 * runtime-po/Rules-quot: New file, copied from po/.
10615 * runtime-po/quot.sed: Likewise.
10616 * runtime-po/boldquot.sed: Likewise.
10617 * runtime-po/en@quot.header: Likewise.
10618 * runtime-po/en@boldquot.header: Likewise.
10619 * runtime-po/insert-header.sin: Likewise.
10620 * runtime-po/remove-potcdate.sin: Likewise.
10621 * runtime-po/Makevars: New file.
10622 * runtime-po/POTFILES.in: New file.
10623 * runtime-po/LINGUAS: New file.
10624 * runtime-po/bison-runtime.pot: New file.
10625 * runtime-po/de.po: New file.
10626 * m4/bison.m4: New file.
10627 * Makefile.am (SUBDIRS): Add runtime-po.
10628 (aclocaldir, aclocal_DATA): New variables.
10629 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10630 Define aclocaldir.
10631 * src/getargs.c (usage): Document --print-localedir option.
10632 (PRINT_LOCALEDIR_OPTION): New enum item.
10633 (long_options): Add --print-localedir option.
10634 (getargs): Handle --print-localedir option.
10635 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10636 (Internationalization): New section.
10637
10638 2005-07-12 Akim Demaille <akim@epita.fr>
10639
10640 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10641 for consistency with the rest of the code.
10642 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10643 Add separators.
10644
10645 2005-07-12 Akim Demaille <akim@epita.fr>
10646
10647 * src/parse-gram.y: Use %printer instead of YYPRINT.
10648
10649 2005-07-12 Akim Demaille <akim@epita.fr>
10650
10651 * src/symtab.h, src/symtab.c (symbol_print): New.
10652 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10653 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10654
10655 2005-07-12 Akim Demaille <akim@epita.fr>
10656
10657 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10658 b4_at_dollar and b4_dollar_dollar.
10659
10660 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10661
10662 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10663 and Pennello's paper.
10664
10665 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10666
10667 * data/yacc.c (yyparse): Undo previous patch. Instead,
10668 set yylsp[0] and yyvsp[0] only if the initial action
10669 sets yylloc and yylval, respectively.
10670
10671 * data/yacc.c (yyparse): In the initial action, set
10672 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10673 This avoids the use of undefined variables if the initial
10674 action does not set yylloc and/or yylval.
10675
10676 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10677
10678 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10679 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10680 Remove from CVS. These files are automatically generated.
10681 * examples/extexi: Clarify that this file is now part of Bison,
10682 not GNU M4, and that it works with any POSIX-compatible Awk.
10683 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10684 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10685 so that we also get calc++-parser.yy. Geneate it.
10686 Use $(AWK), not gawk, since any conforming Awk will do.
10687 Put comment before action, since older 'make' can't handle comment
10688 in action.
10689 $(BUILT_SOURCES): List all built sources, not just some of them.
10690 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10691 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10692 $($(calc_sources_generated)): Remove unnecessary test for existence
10693 of target. (This had a shell syntax error anyway; a stray "x".)
10694 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10695 calc++-parser.yy.
10696 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10697
10698 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10699 implied by the other modules.
10700
10701 2005-07-06 Akim Demaille <akim@epita.fr>
10702
10703 Bind examples/calc++ to the package.
10704 * examples/calc++/Makefile: Remove, replaced by...
10705 * examples/calc++/Makefile.am: ... this new file.
10706 * examples/calc++/test: Remove input.
10707 * examples/calc++/compile: Remove.
10708 * examples/Makefile.am: New.
10709 * configure.ac, Makefile.am: Adjust.
10710 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10711
10712 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10713
10714 * data/glr.c (yyFail): Drastically simplify; since the format argument
10715 never had any % directives, we can simply pass it to yyerror.
10716 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10717 be modified later, as that is the usual style in glr.c.
10718 Problems reported by Paul Hilfinger.
10719
10720 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10721 and size overflow errors.
10722 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10723 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10724 (YYSIZEMAX): New macro.
10725 (yystpcpy): New function, taken from yacc.c.
10726 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10727 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10728 so that we don't have to maintain their signatures.
10729 (yyFail): Check for buffer overflow, by using vsnprintf rather
10730 than vsprintf. Allocate a bigger buffer if possible.
10731 Report an error if buffer allocation fails.
10732 (yyStackOverflow): New function.
10733 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10734 the initialization was successful. It might fail if storage was
10735 exhausted.
10736 (yyexpandGLRStack): Add more checks for storage allocation failure.
10737 Use yyStackOverflow to report failures.
10738 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10739 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10740 Don't assume stack number fits in int.
10741 (yysplitStack): Check for storage allocation failure.
10742 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10743 can print diagnostics on storage allocation failure. All callers
10744 changed.
10745 (yyresolveValue): Use yybool for boolean.
10746 (yyreportSyntaxError): Check for size-calculation overflow.
10747 This code is taken from yacc.c.
10748 (yyparse): Check for storage allocation errors when allocating
10749 the initial stack.
10750
10751 2005-07-05 Akim Demaille <akim@epita.fr>
10752
10753 Extract calc++ from the documentation.
10754 * doc/bison.texinfo (Calc++): Add the extraction marks.
10755 * examples/extexi: New, from the aborted GNU Programming 2E.
10756 Separate the different paragraph of a file with empty lines.
10757 * examples/Makefile: Use it to extract the whole calc++ example.
10758
10759 2005-06-24 Akim Demaille <akim@epita.fr>
10760
10761 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10762 class typedefs.
10763
10764 2005-06-22 Akim Demaille <akim@epita.fr>
10765
10766 * doc/bison.texinfo (C++ Language Interface): First stab.
10767 (C++ Parsers): Remove.
10768
10769 2005-06-22 Akim Demaille <akim@epita.fr>
10770
10771 * data/lalr1.cc (yylex_): Honor %lex-param.
10772
10773 2005-06-22 Akim Demaille <akim@epita.fr>
10774
10775 Start a set of simple examples.
10776 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10777 * examples/calc++/calc++-driver.hh,
10778 * examples/calc++/calc++-parser.yy,
10779 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10780 * examples/calc++/compile, examples/calc++/test: New.
10781
10782 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10783
10784 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10785 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10786 which stems from the 2005-05-27 patch.
10787
10788 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10789
10790 * data/glr.c: Modify treatment of unused parameters to permit use
10791 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10792
10793 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10794
10795 Fix infringement on user name space reported by Janos Zoltan Szabo.
10796 * data/yacc.c (yyparse): strlen -> yystrlen.
10797
10798 2005-05-30 Akim Demaille <akim@epita.fr>
10799
10800 * data/lalr1.cc (_): New.
10801 Translate the various messages.
10802
10803 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10804
10805 Fix infringement on user name space reported by Bruno Haible.
10806 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10807 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10808 the user's name space.
10809 (alloca): Include <stdlib.h> to get it, if it's not built in.
10810 (YYMALLOC, YYFREE): Define only if needed.
10811 (malloc, free): Declare, but only if needed, as this infringes on
10812 the user name space.
10813
10814 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10815
10816 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10817 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10818 with %d format.
10819 * lib/ebitset.c (min, max): Undef before defining.
10820 * lib/vbitset.c (min, max): Likewise.
10821 * lib/subpipe.c (create_subpipe): Save local variables in case
10822 vfork clobbers them.
10823
10824 2005-05-24 Bruno Haible <bruno@clisp.org>
10825
10826 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10827 error message syntax used by gcc-4.0.
10828
10829 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10830
10831 * README: Mention m4 1.4.3. Remove obsolete advice about
10832 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10833
10834 * bootstrap: Remove workaround for problem I encountered with
10835 gettext 0.14.1; it seems to be fixed now.
10836
10837 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10838
10839 * NEWS: Version 2.0a.
10840
10841 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10842 the previous change.
10843
10844 Various maintainer cleanups.
10845 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10846 conftest*, for benefit of CVS commands run at the same time as
10847 "configure". Add build-aux, since "bootstrap" now creates it and
10848 its subfiles.
10849 * Makefile.cfg (move_if_change): Remove.
10850 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10851 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10852 (po_repo, do-po-update, po-update, wget_files, get-targets):
10853 (config.guess-url_prefix, config.sub-url_prefix):
10854 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10855 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10856 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10857 Remove.
10858 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10859 this is now the recommended name.
10860 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10861 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10862 ylwrap. These files now go into build-aux.
10863 * config/move-if-change: Remove.
10864 * config/prev-version.txt: Bump from 1.75 to 2.0.
10865
10866 * bootstrap: Add stdio-safer, unistd-safer modules.
10867 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10868 we don't need it).
10869 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10870 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10871 * lib/subpipe.c: Include "unistd-safer.h".
10872 (create_subpipe): Make sure all the newly-created
10873 file descriptors are > 2, so that diagnostics don't
10874 get sent down them (which might cause Bison to hang, in theory).
10875 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10876 * src/files.c (xfopen): Use fopen_safer, not fopen.
10877
10878 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10879 yesterday's yacc.c fix.
10880
10881 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10882
10883 * data/glr.c, data/lalr1.cc: Update copyright date.
10884
10885 Fix a destructor bug reported by Wolfgang Spraul in
10886 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10887 * data/yacc.c (yyabortlab): Don't call destructor, and
10888 don't set yychar to EMPTY.
10889 (yyoverflowlab): Don't call destructor.
10890 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10891 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10892 since we no longer output the message "discarding lookahead token
10893 end of input ()".
10894
10895 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10896
10897 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10898 fix a small glitch in debugging output.
10899 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10900 after YY_SYMBOL_PRINT where needed.
10901
10902 (struct yyGLRState): Add some comments.
10903 (struct yySemanticOption): Add some comments.
10904 (union yyGLRStackItem): Add comment.
10905
10906 (yymergeOptionSets): Correct this to properly perform the union,
10907 avoiding infinite reported by Michael Rosien.
10908 Update comment.
10909
10910 * tests/glr-regression.at: Add test for GLR merging error reported
10911 by M. Rosien.
10912
10913 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10914
10915 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10916 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10917 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10918 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10919 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10920 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10921 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10922 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10923 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10924 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10925 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10926 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10927 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10928 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10929 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10930 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10931 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10932 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10933 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10934 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10935 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10936 src/output.h, src/parse-gram.c, src/parse-gram.h,
10937 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10938 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10939 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10940 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10941 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10942 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10943 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10944 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10945 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10946 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10947 tests/reduce.at, tests/regression.at, tests/sets.at,
10948 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10949 Update FSF postal mail address.
10950
10951 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10952
10953 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10954 Problem reported by Ralf Menzel.
10955
10956 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10957
10958 * tests/actions.at: Test that stack overflow invokes destructors.
10959 From Marcus Holland-Moritz.
10960 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10961 from here....
10962 (yyreturn): to here. That way, destructors are called properly
10963 even if the stack overflows, or the user calls YYACCEPT or
10964 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10965 (yyoverflowlab): Destroy the lookahead.
10966
10967 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10968
10969 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10970
10971 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10972
10973 * NEWS: Bison-generated C parsers no longer quote literal strings
10974 associated with tokens.
10975 * src/output.c (prepare_symbols): Don't escape strings,
10976 since users don't want to see C escapes.
10977 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10978 in diagnostics.
10979 * tests/input.at (Torturing the Scanner): Likewise.
10980 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10981
10982 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10983
10984 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10985 the data size is known to be too small and we can't increase it.
10986 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10987
10988 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10989
10990 * src/parse-gram.y: Include quotearg.h.
10991 (string_as_id): Quote $1 before using it as a key, since the
10992 lexer no longer quotes it for us.
10993 (string_content): Don't strip quotes, since lexer no longer
10994 quotes it for us.
10995 * src/scan-gram.l: Include quotearg.h.
10996 ("\""): Omit quote.
10997 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10998 a key, since the rest of the lexer doesn't quote it.
10999 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11000 * tests/regression.at (Token definitions): Check for backslashes
11001 in token strings.
11002
11003 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11004 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11005 (yyparse): Revamp code to generate long syntax error message, to
11006 make it easier to translate, and to avoid problems with arithmetic
11007 overflow. Change "virtual memory" to "memory" in diagnostic, since
11008 we don't know whether the memory is virtual.
11009
11010 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11011
11012 * NEWS: Bison-generated C parsers now use the _ macro to
11013 translate strings.
11014 * data/yacc.c (_) [!defined _]: New macro.
11015 All English strings wrapped inside this macro.
11016 * doc/bison.texinfo (Bison Parser): Document _.
11017 * po/POTFILES.in: Include src/parse-gram.c, since it now
11018 includes translateable strings that parse-gram.y doesn't.
11019
11020 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11021
11022 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11023 reverting the 2004-10-11 change to this function.
11024 (symbol_check_alias_consistency): Don't call symbol_type_set
11025 if the type name is already correct.
11026 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11027
11028 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11029
11030 * tests/regression.at (Token definitions): Don't use a token named
11031 c, as that generates a "#define c ..." that runs afoul of buggy
11032 stdlib.h that uses the identifier c as a member of struct
11033 drand48_data. Problem reported by Horst Wente.
11034
11035 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11036
11037 * bootstrap: Change translation URL from
11038 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11039 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11040 redirection glitches. Problem reported by twlevo@xs4all.nl.
11041
11042 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11043
11044 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11045 after operands; POSIX says this isn't portable for the c99 command.
11046
11047 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11048
11049 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11050 immediately if a data overrun has occurred; this may help us track
11051 down what may be a spurious failure on MacOS.
11052
11053 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11054
11055 Respond to problems reported by twlevo@xs4all.nl.
11056
11057 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11058
11059 * src/vcg.h: Comment fix.
11060 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11061 (G_CMAX): Change to -1 instead of INT_MAX.
11062
11063 * data/yacc.c (yyparse): Omit spaces before #line.
11064
11065 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11066
11067 * src/tables.c (state_number_to_vector_number): Put it inside an
11068 "#if 0", since it's not currently used. Problem reported by
11069 Roland McGrath.
11070
11071 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11072
11073 * src/output.c (escaped_output): Renamed from
11074 escaped_file_name_output, since we now use it for symbol tags as
11075 well. All uses changed.
11076 (symbol_destructors_output, symbol_printers_output):
11077 Escape symbol tags too.
11078 Problem reported by Matyas Forstner in
11079 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11080
11081 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11082 not needed.
11083 * src/output.c (user_actions_output, token_definitions_output,
11084 symbol_destructors_output, symbol_printers_output): Likewise.
11085 * src/reader.c (prologue_augment): Likewise.
11086 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11087
11088 * src/vcg.c (output_edge): Don't quote linestyle arg.
11089 Problem reported by twlevo@xs4all.nl.
11090
11091 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11092
11093 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11094 example, reported by Derek M Jones. Also, make the example even
11095 more outrageous, to better illustrate how bad the problem is.
11096
11097 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11098
11099 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11100 putsym. Typo reported by Sebastian Piping.
11101
11102 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11103
11104 * doc/bison.texinfo (Language and Grammar): some -> same
11105 (Epilogue): int he -> in the
11106 Typos reported by Sebastian Piping via Justin Pence.
11107
11108 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11109
11110 * tests/glr-regression.at (Improper handling of embedded actions
11111 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11112 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11113 with dollar signs in test names.
11114 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11115 for a similar reason.
11116
11117 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11118
11119 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11120 wants to redefine G_VIEW.
11121
11122 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11123
11124 * src/vcg.c (get_view_str): Remove case for normal_view.
11125 Problem reported by twlevo@xs4all.nl.
11126
11127 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11128
11129 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11130 Problem reported by twlevo@xs4all.nl.
11131
11132 * doc/bison.texinfo: Change @dircategory from "GNU programming
11133 tools" to "Software development". Requested by Richard Stallman
11134 via Karl Berry.
11135
11136 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11137
11138 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11139 Problem reported by twlevo@xs4all.nl.
11140
11141 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11142
11143 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11144 keyword; it's not needed with modern compilers, and it doesn't
11145 affect correctness with older compilers. Suggested by
11146 twlevo@xs4all.nl.
11147
11148 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11149
11150 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11151 gcc -Wswitch-default.
11152 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11153 * data/yacc.c (yyparse): Likewise.
11154
11155 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11156
11157 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11158 already. Let config.h define any nonstandard values.
11159
11160 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11161
11162 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11163 for the benefit of slower hosts. Problem reported by
11164 Nelson H. F. Beebe.
11165
11166 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11167
11168 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11169 being defined and not used.
11170 * data/lalr1.cc (yyparse): Likewise.
11171 Use "if (false)" rather than "if (0)".
11172
11173 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11174
11175 * TODO: Mention that we should allow NUL bytes in tokens.
11176
11177 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11178
11179 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11180 Problem reported by Hans Aberg.
11181
11182 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11183
11184 * src/getargs.c (version): Happy new year; update overall
11185 program copyright date from 2004 to 2005.
11186
11187 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11188 Problem reported by Hans Aberg.
11189 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11190 (Output file names.): Add a test for the case when standard output
11191 is closed.
11192
11193 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11194
11195 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11196 to fix an oversight in the Bison 2.0 manual.
11197
11198 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11199
11200 * NEWS: Version 2.0. Reformat the existing news items since
11201 1.875, so that related items are grouped together.
11202 * configure.ac (AC_INIT): Bump version to 2.0.
11203 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11204
11205 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11206 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11207 otherwise, we're not testing alloca. Unfortunately there's no
11208 simple way to consult HAVE_ALLOCA here.
11209
11210 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11211 for yymsg, too.
11212
11213 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11214 hand. This avoids a warning about comparing int to size_t when
11215 GCC warnings are enabled.
11216
11217 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11218
11219 * NEWS: Bison-generated parsers no longer default to using the
11220 alloca function (when available) to extend the parser stack, due
11221 to widespread problems in unchecked stack-overflow detection.
11222 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11223 responsibility to set it to a positive value. This lets the user
11224 specify a value that is not a preprocessor constant.
11225 * data/yacc.c (YYMAXDEPTH): Likewise.
11226 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11227 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11228 to be a compile-time constant. However, explain the constraints on it.
11229 Also, explain the constraints on YYINITDEPTH.
11230 (Table of Symbols): Explain that alloca is no longer the default.
11231 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11232 to 1.
11233
11234 * doc/bison.texinfo (Location Default Action): Mention that n must
11235 be zero when k is zero. Suggested by Frank Heckenbach.
11236
11237 2004-12-22 Akim Demaille <akim@epita.fr>
11238
11239 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11240 (parser::state_type, parser::semantic_type, parser::location_type):
11241 Private, not public.
11242 (parser::parse): Return ints, not bool.
11243 Returning a bool introduces a problem: 0 corresponds to false, and
11244 it seems weird to return false on success. Returning true changes
11245 the conventions for yyparse.
11246 Alternatively we could return void and send an exception.
11247 There is no clear consensus (yet?).
11248 (state_stack, semantic_stack, location_stack): Rename as...
11249 (state_stack_type, semantic_stack_type, location_stack_type): these.
11250 Private, not public.
11251 * tests/c++.at: New.
11252 * tests/testsuite.at, tests/Makefile.am: Adjust.
11253
11254 2004-12-21 Akim Demaille <akim@epita.fr>
11255
11256 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11257
11258 2004-12-21 Akim Demaille <akim@epita.fr>
11259
11260 Don't impose std::string for filenames.
11261
11262 * data/lalr1.cc (b4_filename_type): New.
11263 (position::filename): Use it.
11264 (parser.hh): Move the inclusion of stack.hh and location.hh below
11265 the user code, so that needed headers for the filename type can be
11266 included first.
11267 Forward declare them before the user code.
11268 * tests/Makefile.am (check-local, installcheck-local): Pass
11269 TESTSUITEFLAGS to the TESTSUITE.
11270
11271 2004-12-20 Akim Demaille <akim@epita.fr>
11272
11273 Use more STL like names: my_class instead of MyClass.
11274
11275 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11276 (SemanticStack, SemanticType, StateStack, StateType)
11277 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11278 (Parser::value): Rename as...
11279 (location_stack, location_type, rhs_number_type, semantic_stack)
11280 (semantic_type, state_stack, state_type, token_number_type, stack)
11281 (slice, traits, parser::yylloc, parser::yylval): these.
11282
11283 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11284
11285 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11286
11287 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11288 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11289
11290 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11291
11292 Remove uses of 'short int' and 'unsigned short int'. This raises
11293 some arbitrary limits. It uses more memory but nowadays that's
11294 not much of an issue.
11295
11296 This change does not affect the generated parsers; that's a different
11297 task, as some users will want to conserve memory there.
11298
11299 Ideally we should use size_t to represent all object counts, and
11300 something like ptrdiff_t to represent signed differences of object
11301 counts; but that will require more code-cleanup than I have the
11302 time to do right now.
11303
11304 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11305 Use size_t, not int or short int, to count objects.
11306 * src/closure.c (nritemset, closure): Likewise.
11307 * src/closure.h (nritemset, closure): Likewise.
11308 * src/nullable.c (nullable_compute): Likewise.
11309 * src/print.c (print_core): Likewise.
11310 * src/print_graph.c (print_core): Likewise.
11311 * src/state.c (state_compare, state_hash): Likewise.
11312 * src/state.h (struct state): Likewise.
11313 * src/tables.c (default_goto, goto_actions): Likewise.
11314
11315 * src/gram.h (rule_number, rule): Use int, not short int.
11316 * src/output.c (prepare_rules): Likewise.
11317 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11318 errs, reductions): Likewise.
11319 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11320 Likewise.
11321 * src/tables.c (vector_number, tally, action_number,
11322 ACTION_NUMBER_MINIMUM): Likewise.
11323 * src/output.c (muscle_insert_short_int_table): Remove.
11324
11325 2004-12-17 Akim Demaille <akim@epita.fr>
11326
11327 * data/lalr1.cc: Extensive Doxygenation.
11328 (error_): Rename as...
11329 (error): this, since it is visible to the user.
11330 Adjust callers.
11331 (Parser::message): Now an automatic variable from...
11332 (Parser::yyreport_syntax_error_): here.
11333 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11334 Parser::error.
11335 * tests/input.at: Escape $.
11336
11337 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11338
11339 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11340 Parenthesize rhs to avoid obscure problems with mistakes like
11341 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11342 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11343 b4_rhs_location): Likewise.
11344 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11345 b4_rhs_location): Likewise.
11346
11347 2004-12-16 Akim Demaille <akim@epita.fr>
11348
11349 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11350 yacc.c: be sure to stay within yycheck_.
11351 * tests/actions.at: Re-enable C++ tests.
11352
11353 2004-12-16 Akim Demaille <akim@epita.fr>
11354
11355 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11356 real.
11357
11358 2004-12-16 Akim Demaille <akim@epita.fr>
11359
11360 Use #define to handle the %name-prefix.
11361
11362 * data/glr.c, data/yacc.c: Comment changes.
11363 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11364 so that one can refer to yylex in the parser file, and have it
11365 renamed, as is the case with other skeletons.
11366
11367 2004-12-16 Akim Demaille <akim@epita.fr>
11368
11369 Move lalr1.cc internals into yy*.
11370
11371 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11372 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11373 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11374 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11375 (empty_, final_, terror_, errcode_, ntokens_)
11376 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11377 (looka_, ilooka_, error_range_, nerrs_):
11378 Rename as...
11379 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11380 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11381 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11382 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11383 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11384 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11385 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11386 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11387 these.
11388
11389 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11390
11391 Fix some problems reported by twlevo at xs4all.
11392 * src/symtab.c (symbol_new): Report an error if the input grammar
11393 contains too many symbols. This is better than calling abort() later.
11394 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11395 (struct node, struct graph):
11396 Rename member expand to stretch. All uses changed.
11397 (struct graph): Remove member layoutalgorithm. All uses removed.
11398 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11399 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11400 All uses changed.
11401 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11402
11403 2004-12-15 Akim Demaille <akim@epita.fr>
11404
11405 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11406 Add more Doxygen comments.
11407 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11408 (report_syntax_error_, translate_): Rename as...
11409 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11410 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11411
11412 2004-12-15 Akim Demaille <akim@epita.fr>
11413
11414 * data/lalr1.cc (lex_): Rename as...
11415 (yylex_): this.
11416 Move the trace here.
11417 Take the %name-prefix into account.
11418 Reported by Alexandre Duret-Lutz.
11419
11420 2004-12-15 Akim Demaille <akim@epita.fr>
11421
11422 Simplify the C++ parser constructor.
11423
11424 * data/lalr1.cc (debug_): Rename as...
11425 (yydebug_): so that the parser's internals are always in the yy*
11426 pseudo namespace.
11427 Adjust uses.
11428 (b4_parse_param_decl): Remove the leading comma as it is now only
11429 called as unique argument list.
11430 (Parser::Parser): Remove the constructor accepting a location and
11431 an initial debugging level.
11432 Remove from the other ctor the argument for the debugging level.
11433 (debug_level_type, debug_level, set_debug_level): New.
11434
11435 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11436 constructor calls.
11437
11438 2004-12-15 Akim Demaille <akim@epita.fr>
11439
11440 Remove b4_root related material: failure experiment
11441 (which goal was to allow to derive from a class).
11442
11443 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11444 definitions and uses.
11445
11446 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11447
11448 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11449 not 2, since it's not portable to subtract 1 from the start of an
11450 array. The new item 0 is never set or used. All uses changed.
11451
11452 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11453 the default definition of YYLLOC_DEFAULT. Problem reported
11454 by Frank Heckenbach.
11455
11456 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11457
11458 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11459 the normal case and one for the error case. Just use the
11460 first one uniformly. Problem reported by Frank Heckenbach.
11461 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11462 use exactly the same macro in both places.
11463 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11464 so that the normal-case YYRHSLOC works for the error case too.
11465 All uses changed.
11466 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11467 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11468 * doc/bison.texinfo (Location Default Action): Don't claim that
11469 we have an array of locations. Use the same macro for both glr
11470 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11471 the index is 0.
11472
11473 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11474
11475 * HACKING: Update email addresses to send announcements to.
11476
11477 * configure.ac (AC_INIT): Bump version to 1.875f.
11478
11479 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11480
11481 * NEWS: Version 1.875e.
11482 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11483
11484 * src/scan-skel.l: Include "complain.h", for "fatal".
11485
11486 * src/relation.h (relation_print, relation_digraph):
11487 Relation sizes are of type relation_node, not size_t (this is
11488 merely a doc fix, since the two types are equivalent).
11489 (relation_transpose): Relation sizes are of type relation_node,
11490 not int.
11491 * src/relation.c: Likewise.
11492 (top, infinity): Now of type relation_node, not int.
11493 (traverse, relation_transpose): Use relation_node, not int.
11494
11495 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11496 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11497 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11498
11499 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11500 specifying whether the test should be skipped. Use it tp
11501 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11502 fail on some hosts, and should be skipped.
11503
11504 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11505
11506 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11507 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11508 unless otherwise specified below.
11509
11510 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11511 to allocate kernel_base, kernel_items, kernel_size, since
11512 they needn't be initialized to 0.
11513 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11514 * src/closure.c (new_closure): Likewise, for itemset.
11515 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11516 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11517 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11518 (build_relations): Likewise for edge, states1, includes.
11519 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11520 * src/reader.c (packgram): Likewise, for ritem, rules.
11521 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11522 * src/relation.c (relation_digraph): Likewise for VERTICES.
11523 (relation_transpose): Likewise for new_R, end_R.
11524 * src/symtab.c (symbols_token_translations_init): Likewise for
11525 token_translations.
11526 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11527 (token_actions): Likewise for yydefact, actrow, conflrow,
11528 conflict_list.
11529 (save_column): Likewise for froms[symno], tos[symno].
11530 (goto_actions): Likewise for state_count.
11531 (pack_table): Likewise for base, pos, check.
11532 (tables_generate): Likewise for width.
11533
11534 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11535 for initial core. Just have a separate core, so we needn't worry
11536 about whether kernel_size and kernel_base are initialized.
11537
11538 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11539 kernel_size, kernel_items): Remove unnecessary initialization.
11540 * src/conflicts.c (conflicts): Likewise.
11541 * src/derives.c (derives): Likewise.
11542 * src/muscle_tablc (muscle_insert): Likewise.
11543 * src/relation.c (relation_digraph): Likewise.
11544 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11545 conflrow, conflict_table, conflict_list, table, check):
11546 Likewise.
11547
11548 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11549 This is because all callers pass unsigned int.
11550 * src/closure.h (new_closure): Likewise.
11551
11552 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11553 (build_relations): Initialize includes[i] in all cases.
11554 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11555 and rules[ruleno].precsym. Initialize members in order.
11556 * src/relation.c (relation_transpose): Always initialize new_R[i]
11557 and end_R[i].
11558 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11559
11560 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11561 conflict_list[0] was always 0, but now it isn't initialized.
11562
11563 * src/table.c (table_grow): When conflict_table grew, the grown
11564 area wasn't cleared. Fix this.
11565
11566 * lib/.cvsignore: Add strdup.c, strdup.h.
11567 * m4/.cvsignore: Add strdup.m4.
11568
11569 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11570
11571 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11572 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11573 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11574 ngotos + 1 without checking for overflow.
11575 (build_relations): Use END_NODE, not -1, to denote end of edges.
11576 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11577 build_relations): Use goto_number, not int, for goto numbers.
11578 * src/tables.c (save_column, default_goto): Likewise.
11579
11580 2004-11-23 Akim Demaille <akim@epita.fr>
11581
11582 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11583 of #defining from yystype.
11584 Don't typedef yystype, C++ does not need it.
11585 This lets it possible to forward declare it as union.
11586
11587 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11588
11589 * bootstrap (gnulib_modules): Add extensions.
11590 Problem reported by Jim Meyering.
11591
11592 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11595 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11596 src/system.h, src/tables.c: XFREE -> free, to accommodate
11597 recent change to gnulib xalloc.h.
11598 Problem reported by Jim Meyering.
11599
11600 2004-11-17 Akim Demaille <akim@epita.fr>
11601
11602 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11603
11604 2004-11-17 Akim Demaille <akim@epita.fr>,
11605 Alexandre Duret-Lutz <adl@gnu.org>
11606
11607 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11608 changes.
11609 (YYCDEBUG): Adjust.
11610 Use it instead of cdebug_.
11611 (Parser::debug_stream, Parser::set_debug_stream): New.
11612 (Parser::symprint_): Define cdebug_ for temporary backward
11613 compatibility.
11614 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11615 debug_stream ().
11616
11617 2004-11-17 Akim Demaille <akim@epita.fr>
11618
11619 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11620 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11621 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11622 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11623
11624 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11625
11626 * data/glr.c (yyloc_default): Remove; not used.
11627 Problem reported by Frank Heckenbach.
11628
11629 2004-10-25 Akim Demaille <akim@epita.fr>
11630
11631 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11632 Introduce another definition to address simple location arrays.
11633 (yyGLRStack): New member: yyerror_range.
11634 (yyrecoverSyntaxError, yyparse): Update it.
11635 (yyrecoverSyntaxError): Use it when shifting the error token to
11636 have an accurate range, equivalent to the one computed by both
11637 yacc.c and lalr1.cc.
11638 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11639 that column numbers start at column 0, as per GNU Coding
11640 Standards, the others tests, and the doc.
11641 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11642 Adjust to the above change (first column is 0).
11643 And adjust the location of the "<error>", now covering the whole
11644 line.
11645
11646 2004-10-22 Akim Demaille <akim@epita.fr>
11647 and Paul Eggert <eggert@cs.ucla.edu>
11648
11649 Remove some arbitrary limits on goto numbers and relations.
11650 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11651 initial values, since they're never used.
11652 (set_goto_map): ngotos is now unsigned, so test for overflow
11653 by seeing whether it wraps around to zero.
11654 * src/lalr.h (goto_number): Now size_t, not short int.
11655 (GOTO_NUMBER_MAXIMUM): Remove.
11656 * src/relation.c (relation_print, traverse, relation_transpose):
11657 Check for END_NODE rather than looking at sign.
11658 * src/relation.h (END_NODE): New macro.
11659 (relation_node): Now size_t, not short int.
11660
11661 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11662
11663 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11664 keyword, not an identifier. Problem reported by Baron Schwartz in
11665 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11666
11667 2004-10-11 Akim Demaille <akim@epita.fr>
11668
11669 * src/symtab.c (symbol_check_alias_consistency): Also check
11670 type names, destructors, and printers.
11671 Reported by Alexandre Duret-Lutz.
11672 Recode the handling of associativity and precedence in terms
11673 of symbol_precedence_set.
11674 Accept no redeclaration at all, not even equal to the previous
11675 value.
11676 (redeclaration): New.
11677 Use it to factor redeclaration complaints.
11678 (symbol_make_alias): Don't set the type of the alias, let
11679 symbol_check_alias_consistency do it as for other features.
11680 * src/symtab.h (symbol): Add new member prec_location, and
11681 type_location.
11682 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11683 * tests/input.at (Incompatible Aliases): New.
11684
11685 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11686
11687 .cvsignore fixes to accommodate gnulib changes,
11688 and the practice of naming build directories "_build".
11689 * .cvsignore: Add "_*". Sort.
11690 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11691 * m4/.cvsignore: Add "*_gl.m4".
11692
11693 2004-10-06 Akim Demaille <akim@epita.fr>
11694
11695 * src/parse-gram.y (add_param): Fix the truncation of trailing
11696 spaces.
11697
11698 2004-10-05 Akim Demaille <akim@epita.fr>
11699
11700 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11701 whether the reducion was empty or not. This leaves room to
11702 improve the use of YYLLOC_DEFAULT in such a case.
11703 lalr1.cc is still experimental, so changing this is acceptable.
11704 And finally, there are probably not many users who changed the
11705 handling of locations in GLR, so changing is admissible too.
11706
11707 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11708 empty reduction, set @$ to an empty location ending the previously
11709 stacked symbol.
11710 Adjust uses to make sure the code is triggered on empty
11711 reductions.
11712 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11713 expected output: empty reductions have empty locations.
11714
11715 2004-09-29 Akim Demaille <akim@epita.fr>
11716
11717 * data/lalr1.cc: Move towards a more standard C++ coding style
11718 for templates: Class < T > -> Class<T>.
11719
11720 2004-09-29 Akim Demaille <akim@epita.fr>
11721
11722 * data/lalr1.cc: Reinstall the former ctor, for sake of
11723 compatibility, but warn it will be removed.
11724 Move towards a more standard C++ coding style (i.e., type *var ->
11725 type* var).
11726
11727 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11728
11729 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11730 since it's less likely to work if NULs are involved in the future.
11731
11732 2004-09-27 Akim Demaille <akim@epita.fr>
11733
11734 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11735
11736 2004-09-27 Akim Demaille <akim@epita.fr>
11737
11738 * data/lalr1.cc (b4_parse_param_decl_1): New.
11739 (b4_parse_param_decl): Use it to have different names between attribute
11740 and argument names.
11741 (b4_cc_constructor_call): Likewise.
11742
11743 2004-09-24 Akim Demaille <akim@epita.fr>
11744
11745 * src/parse-gram.y (add_param): Strip the leading and trailing
11746 blanks from a formal argument declaration.
11747 (YY_LOCATION_PRINT): New.
11748
11749 2004-09-24 Akim Demaille <akim@epita.fr>
11750
11751 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11752 after the location.
11753
11754 2004-09-24 Akim Demaille <akim@epita.fr>
11755
11756 * doc/bison.texinfo (Table of Symbols): Sort.
11757
11758 2004-09-21 Akim Demaille <akim@epita.fr>
11759
11760 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11761 the useless parentheses.
11762 Suggested by Paul Eggert.
11763
11764 2004-09-20 Akim Demaille <akim@epita.fr>
11765
11766 Let the initial-action act on the look-ahead, and use it for the
11767 "initial push" (corresponding to an hypothetical beginning-of-file).
11768 And let lalr1.cc honor %initial-action.
11769
11770 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11771 example.
11772 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11773 (Parser::Parser): Remove the ctor that used to initialize it.
11774 (Parser::parse): Like in the other skeletons, issue the "starting
11775 parse" message before any action.
11776 Honor %initial-action.
11777 Initialize the stacks with the lookahead.
11778 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11779 look-ahead.
11780 Push them in the stacks.
11781 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11782
11783 2004-09-20 Akim Demaille <akim@epita.fr>
11784
11785 * doc/bison.texinfo (Initial Action Decl): New.
11786
11787 2004-09-20 Akim Demaille <akim@epita.fr>
11788
11789 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11790 clearer criterion to define it.
11791 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11792 When reducing on an empty RHS, use the latest stacked location as
11793 location.
11794 yylloc is not always available.
11795 * data/glr.c: Likewise.
11796 Also, honor initial-actions.
11797
11798 2004-09-20 Akim Demaille <akim@epita.fr>
11799
11800 * data/yacc.c (YY_LOCATION_PRINT): New.
11801 Define when we know YYLTYPE's structure, i.e., when the default
11802 YYLLOC_DEFAULT is used.
11803 * data/c.m4 (b4_yysymprint_generate): Use it.
11804 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11805 value of the result.
11806 (error_start_): Replace with...
11807 (error_range_): this location array.
11808 This allows to replace code relying on the implementation of
11809 locations by portable code.
11810 * data/yacc.c (yylerrsp): Replace with...
11811 (yyerror_range): this.
11812 Every time a token is popped, update yyerror_range[0], to have an
11813 accurate location for the error token.
11814 * data/glr.c (YY_LOCATION_PRINT): New.
11815 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11816 deference a pointer.
11817 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11818 report the location in %printers.
11819
11820 * src/scan-skel.l: Instead of abort, report error messages to ease
11821 understanding skeleton scanning failures.
11822
11823 2004-09-16 Akim Demaille <akim@epita.fr>
11824
11825 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11826 (iterator, const_iterator): these, to be more in the C++ spirit.
11827 Also, return reverse iterators so that when displaying the stack
11828 we display its bottom first.
11829 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11830 from yacc.c.
11831 We should probably use vector here though.
11832
11833 2004-09-16 Akim Demaille <akim@epita.fr>
11834
11835 Have more complete shift traces.
11836
11837 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11838 to report Shifts instead of ad hoc YYDPRINTF invocations,
11839 including for the error token.
11840 * data/lalr1.cc (symprint_): Output the location.
11841 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11842 output the location within the %printer.
11843 Activate GLR tests, at least to make sure they compile properly.
11844 They still don't pass though.
11845 * tests/calc.at: Adjust expect verbose output, since now "Entering
11846 state..." is on a different line than the "Shifting" message.
11847
11848 2004-09-08 Akim Demaille <akim@epita.fr>
11849
11850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11851 Bison directive from the Bison file to the invocation of this
11852 macro, so that these directives are passed to
11853 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11854 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11855 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11856 the extra Bison directives instead of the whole series.
11857 Change the grammar so that there are recoverable errors, and
11858 unrecoverable errors. Now we can have the parser give up before
11859 consuming the whole input. As a result we now can observe that
11860 the lookahead is freed when needed.
11861 Change the parser source to parse argv[1] instead of a hard coded
11862 string.
11863 Simplify yylex, and give a value and location to EOF.
11864 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11865 passed directives already coded in the file.
11866 Add some tests to check the location of "error".
11867 For some tests, the C++ parser is correct, and not yacc.c.
11868 For other tests, they provide different, but unsatisfying, values,
11869 so keep the C++ value so that at least one parser is "correct"
11870 according to the test suite.
11871 (Actions after errors): Remove, this is subsumed by the
11872 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11873
11874 2004-09-06 Akim Demaille <akim@epita.fr>
11875
11876 * data/lalr1.cc: Adjust the indentation of the labels.
11877 (Parser::pop): New.
11878 Use it.
11879
11880 2004-09-06 Akim Demaille <akim@epita.fr>
11881
11882 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11883 argument, an informative message.
11884 Call YY_SYMBOL_PRINT.
11885 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11886 * data/lalr1.cc (destruct_): Likewise.
11887 In addition, no longer depend on b4_yysymprint_generate and
11888 b4_yydestruct_generate to generate these functions, do it "by
11889 hand".
11890
11891 2004-09-03 Akim Demaille <akim@epita.fr>
11892
11893 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11894 invoked, yydestruct the lookahead.
11895 * tests/calc.at (Calculator $1): Update the expected lengths of
11896 traces: there is an added line for the discarded lookahead.
11897 * doc/bison.texinfo (Destructor Decl): Some rewording.
11898 Define "discarded" symbols.
11899
11900 2004-09-02 Akim Demaille <akim@epita.fr>
11901
11902 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11903
11904 2004-09-02 Akim Demaille <akim@epita.fr>
11905
11906 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11907 (YYDSYMPRINTF): Rename as...
11908 (YY_SYMBOL_PRINT): this.
11909 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11910 two.
11911 Use it instead of direct symprint_ calls.
11912 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11913 one.
11914
11915 2004-09-02 Akim Demaille <akim@epita.fr>
11916
11917 * data/lalr1.cc (b4_yysymprint_generate): New.
11918 (symprint_): New member function, defined when YYDEBUG.
11919 Use it consistently instead of token/nterm debugging output by
11920 hand.
11921 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11922 %printer calls to use cdebug_ when using lalr1.cc.
11923
11924 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11925
11926 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11927 with #ifdef YYDEBUG.
11928
11929 2004-08-26 Akim Demaille <akim@epita.fr>
11930
11931 * doc/bison.texinfo (Implementing Loops): Rename as...
11932 (Implementing Gotos/Loops): this.
11933
11934 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11935
11936 Adjust to latest gnulib.
11937 * bootstrap (gnulib_modules): Add xalloc-die.
11938 Set LC_ALL=C so that file names sort consistently.
11939 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11940 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11941 uintmax_t.m4, ulonglong.m4.
11942 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11943 po.m4 since we are now using _gl.m4 instead.
11944
11945 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11946
11947 * src/scan-action.l: Remove. Scanning of semantic actions is
11948 handled in scan-gram.l.
11949
11950 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11951
11952 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11953
11954 * src/location.h (struct): The file member is a uniqstr.
11955 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11956
11957 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11958
11959 Fix bug with non-%union parsers that have printers or destructors,
11960 which led to a Bison core dump. Reported by Peter Fales in
11961 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11962
11963 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11964 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11965 not to our own type.
11966 * src/output.c (symbol_destructors_output, symbol_printers_output):
11967 Don't assume %union.
11968 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11969 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11970 UNION-FLAG. All callers changed.
11971 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11972 Use type char, not unsigned int, when declaring an array of char;
11973 this lets us remove a cast.
11974 (Printers and Destructors): Add non-%union test cases.
11975
11976 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11977
11978 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11979 GLR writeups. E.g., avoid frenchspacing and the future tense,
11980 change "lookahead" to "look-ahead", and change "wrt" to "with
11981 respect to".
11982
11983 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11984
11985 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11986 New sections, split off from the GLR Parsers section. Put the new
11987 Simple GLR Parser near the start of the GLR section, for clarity.
11988 Rewrite connective text.
11989
11990 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11991
11992 * doc/bison.texinfo (Simple GLR Parsers): New section.
11993
11994 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11995
11996 * NEWS, TODO, doc/bison.texinfo:
11997 Use "look-ahead" instead of "lookahead", to be consistent.
11998 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11999 while we're fixing "look-ahead".
12000 * src/conflicts.c (shift_set): Renamed from shiftset.
12001 (look_ahead_set): Renamed from lookaheadset.
12002 * src/print.c: Likewise.
12003 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12004 name for "lookahead".
12005 (report_types, usage): Likewise.
12006 * src/getargs.h (report_look_ahead_tokens): Renamed from
12007 report_lookaheads.
12008 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12009 compute_lookaheads.
12010 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12011 (look_ahead_tokens_print): Renamed from lookaheads_print.
12012 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12013 state_rule_lookaheads_print.
12014 * src/state.h: Likewise.
12015 (reductions.look_ahead_tokens): Renamed from lookaheads.
12016 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12017 AT_DATA_LOOKAHEADS_GRAMMAR.
12018
12019 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12020
12021 * README: Update location of patched M4 distribution.
12022
12023 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12024
12025 Don't assume the C++ compiler takes the same arguments as the C compiler
12026 (trivial change).
12027 * configure.ac (O0CXXFLAGS): New var.
12028 * tests/atlocal.in (CXXFLAGS): Use it.
12029
12030 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12031
12032 Fix some "make check" problems with C++ reported by
12033 Albert Chin-A-Young for Tru64 C++ in this thread:
12034 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12035
12036 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12037 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12038 Output to a .cc file for C++, not to a .c file.
12039 * tests/calc.at (AT_CHECK_CALC): Likewise.
12040 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12041 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12042
12043 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12044
12045 * tests/calc.at, tests/actions.at: Workaround for SGI
12046 C++ compiler. (trivial change)
12047
12048 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12049
12050 Spent a few hours checking out which prerequisite versions the
12051 current sources actually require. I went all the way back to
12052 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12053 a seemingly endless set of combinations of versions more recent
12054 than that. The bottom line is that the current sources require
12055 fairly recent versions of the build tools, and it'll be some work
12056 to change this.
12057 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12058 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12059 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12060 Add comments explaining why those particular versions are
12061 currently needed.
12062
12063 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12064 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12065 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12066
12067 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12068 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12069
12070 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12071
12072 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12073 0.11.5. Suggested by Bruno Haible.
12074 * bootstrap: Remove gettext version checking.
12075
12076 * doc/bison.texinfo (Decl Summary): Also mention that %union
12077 can depend on prerequisite types. Problem reported by Tim
12078 Van Holder.
12079
12080 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12081
12082 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12083 * README-alpha: Don't tell people not to package this.
12084
12085 * bootstrap: Don't assume $(...) works; use `...` instead.
12086 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12087 gettext better.
12088
12089 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12090 put into the -d output file, and mention what to do if YYSTYPE is
12091 defined as a macro.
12092
12093 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12094
12095 Undo change made earlier today: it caused autopoint to not bring
12096 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12097 autopoint's.
12098
12099 * bootstrap: Check that gettext version matches what's in
12100 configure.ac. Warn users to ignore robots.txt ERROR 404.
12101 * bootstrap: Undo today's earlier change (logged below).
12102 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12103
12104 The gettext version checking is causing more trouble than it's
12105 curing; remove it. Problem reported by Paul Hilfinger.
12106
12107 * bootstrap: Issue a warning that one can expect a message
12108 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12109 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12110
12111 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12112
12113 Ensure that the C++ compiler used for testing actually works on a
12114 simple test program; if not, skip the C++-related tests. Problem
12115 reported by Vin Shelton in:
12116 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12117
12118 * m4/cxx.m4: New file.
12119 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12120 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12121 * tests/local.at (AT_COMPILE_CXX): Use it.
12122
12123 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12124
12125 * data/glr.c (yylloc): Output this macro even if locations are not
12126 being generated, as the GLR parser needs it even in that case.
12127 Problem reported by Troy A. Johnson
12128 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12129
12130 * configure.ac (AC_INIT): Update to 1.875e.
12131
12132 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12133
12134 * NEWS: Version 1.875d.
12135 * configure.ac (AC_INIT): Likewise.
12136 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12137
12138 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12139 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12140 lalr1.cc runs afoul of the first, and the last two are no longer
12141 supported by GCC 3.4.0.
12142 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12143 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12144
12145 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12146
12147 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12148 unsigned int, for compatibility with latest gnulib hash module.
12149 * src/state.c (state_hash, state_hasher): Likewise.
12150 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12151 * src/uniqstr.c (hash_uniqstr): Likewise.
12152
12153 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12154
12155 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12156
12157 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12158 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12159 character and string literals.
12160 (unexpected_end): New function.
12161 (unexpected_eof): Use it.
12162 (unexpected_newline): New function.
12163 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12164 actions.
12165
12166 * NEWS: Document %expect-rr.
12167
12168 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12169 Fix typo by replacing $1 with $option.
12170 Remove more 'intl'-related files.
12171 Don't DEFUN AM_INTL_SUBDIR twice.
12172
12173 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12174 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12175 strtoul.c.
12176 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12177 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12178 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12179 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12180 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12181 * src/.cvsignore: Add *.output.
12182
12183 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12184 gets copied to the output file.
12185
12186 2004-04-28 Paul Eggert <eggert@twinsun.com>
12187
12188 Get files from the gnulib and po repositories, instead of relying
12189 on them being in our CVS. Upgrade to latest versions of gnulib
12190 and Automake.
12191
12192 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12193 * bootstrap: Bootstrap from gnulib and po repositories.
12194 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12195 * README-cvs: Document these changes. Remove version numbers from
12196 mentions of build tools, since they change so often. Mention Flex.
12197
12198 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12199 (gl_USE_SYSTEM_EXTENSIONS): Add.
12200 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12201 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12202 does this for us.
12203 (AC_ISC_POSIX): Remove; we no longer support this
12204 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12205 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12206 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12207 Do not check for C89 headers, except for locale.h which is used
12208 by the Yacc library and must port to K&R hosts.
12209 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12210 Do not check for C89 functions, except for setlocale which is
12211 used by the Yacc library.
12212 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12213 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12214 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12215 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12216 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12217 AM_GNU_GETTEXT): Remove; now done by:
12218 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12219 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12220 for us.
12221
12222 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12223 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12224 Define to empty, as gnulib.mk will do the rest for us.
12225 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12226 for us.
12227 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12228 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12229
12230 * src/files.c: Include gnulib's xstrndup.h.
12231
12232 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12233 (REALLOC): Use xnrealloc, for likewise.
12234 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12235 (strnlen, memrchr): Remove decls; functions no longer used.
12236 Include <stpcpy.h>.
12237
12238 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12239 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12240 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12241 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12242 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12243 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12244 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12245 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12246 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12247 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12248 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12249 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12250 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12251 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12252 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12253 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12254 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12255 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12256 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12257 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12258 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12259 Remove, as these files are now generated automatically
12260 by bootstrap or automake.
12261
12262 * po/ChangeLog: Remove: all but one entry was a duplicate
12263 of this file, and I moved that 2000-11-02 entry here.
12264
12265 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12266 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12267 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12268 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12269 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12270 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12271 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12272 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12273 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12274 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12275 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12276 xstrndup.h.
12277 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12278 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12279 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12280 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12281 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12282 * src/.cvsignore: Remove *_.c.
12283
12284
12285 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12286 support it. (The latest stable gzip doesn't.)
12287
12288 2004-04-27 Paul Eggert <eggert@twinsun.com>
12289
12290 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12291 case, as stos_ is now used by destructors due to the 2004-02-09
12292 change.
12293
12294 Remove more K&R C support.
12295 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12296 * lib/subpipe.c (errno): Remove decl.
12297 Include <stdlib.h> unconditionally.
12298 (EXIT_FAILURE): Remove macro.
12299 * src/complain.c (vfprintf, strerror): Remove.
12300 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12301 unconditionally.
12302 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12303 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12304 (strchr, strspn, memchr): Remove decls.
12305 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12306 unconditionally. Do not declare perror.
12307 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12308 unconditionally.
12309
12310 * src/complain.c (_): Remove useless defn, as system.h defines this.
12311
12312 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12313 with latest obstack.h.
12314 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12315 to procedure types, as obstack.h now does that for us.
12316 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12317
12318 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12319 so that this include file can stand alone.
12320 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12321 does this now. Include subpipe.h first after config.h, to
12322 test whether it can stand alone.
12323
12324 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12325 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12326 unused declaration.
12327
12328 * tests/synclines.at (%union synch line): Put a dummy member in
12329 the union, because empty unions aren't allowed in C. Caught
12330 by GCC 3.4.0.
12331
12332 2004-04-13 Jim Meyering <jim@meyering.net>
12333
12334 * src/conflicts.c (conflicts_print): Correct format string typo:
12335 use `%%' to produce literal `%'. (trivial change)
12336
12337 2004-03-30 Paul Eggert <eggert@twinsun.com>
12338
12339 * src/getargs.c (version): Update copyright year to 2004.
12340
12341 * data/c.m4 (b4_int_type): Use 'short int' rather than
12342 'short', and similarly for 'long', 'unsigned', etc.
12343 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12344 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12345 yy_yypstack, yydumpstack): Likewise.
12346 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12347 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12348 Likewise.
12349 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12350 yy_stack_print, yyparse): Likewise.
12351 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12352 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12353 * lib/bitset.c (bitset_print): Likewise.
12354 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12355 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12356 * lib/bitsetv.c (bitsetv_dump): Likewise.
12357 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12358 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12359 Likewise.
12360 * src/LR0.c (allocate_itemsets): Likewise.
12361 * src/gram.h (rule_number, rule): Likewise.
12362 * src/lalr.h (goto_number): Likewise.
12363 * src/nullable.c (nullable_compute): Likewise.
12364 * src/output.c (prepare_rules): Likewise.
12365 * src/relation.c (relation_print, relation_digraph): Likewise.
12366 * src/relation.h (relation_node): Likewise.
12367 * src/state.h (state_number, transitions, errs, reductions,
12368 struct state): Likewise.
12369 * src/symtab.h (symbol_number, struct symbol): Likewise.
12370 * src/tables.c (vector_number, tally, action_number,
12371 default_goto, goto_actions): Likewise.
12372 * tests/existing.at (GNU Cim Grammar): Likewise.
12373 * tests/regression.at (Web2c Actions): Likewise.
12374
12375 * src/output.c (muscle_insert_short_int_table): Renamed from
12376 muscle_insert_short_table. All uses changed.
12377
12378 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12379
12380 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12381 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12382 Add %expect-rr rule.
12383
12384 * src/scan-gram.l: Recognize %expect-rr.
12385
12386 * src/conflicts.h (expected_sr_conflicts): Rename from
12387 expected_conflicts.
12388 (expected_rr_conflicts): Declare.
12389
12390 * src/conflicts.c (expected_sr_conflicts): Rename from
12391 expected_conflicts.
12392 (expected_rr_conflicts): Define.
12393 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12394 for GLR parsers.
12395 Use expected_sr_conflicts in place of expected_conflicts.
12396 Warn if expected_rr_conflicts used in non-GLR parser.
12397
12398 * doc/bison.texinfo: Add documentation for %expect-rr.
12399
12400 2004-03-08 Paul Eggert <eggert@gnu.org>
12401
12402 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12403 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12404
12405 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12406 in lalr1.cc.
12407 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12408 * src/scan-gram.l (scan_integer): New function.
12409 ({int}): Use it.
12410 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12411 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12412 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12413 Say "long int", not "long", for uniformity with GNU style.
12414
12415 2004-02-25 Paul Eggert <eggert@twinsun.com>
12416
12417 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12418 compilers. This fixes a problem with Intel's C++ compiler being
12419 chatty, reported by Guido Trentalancia in
12420 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12421
12422 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12423
12424 Support %destructor and merge error locations in lalr1.cc.
12425
12426 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12427 (Parser::stos_): Define unconditionally.
12428 (Parser::destruct_): New method. Generate its body with
12429 b4_yydestruct_generate.
12430 (Parser::error_start_): New attribute.
12431 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12432 token which are discarded.
12433 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12434 error_start_ when erroneous token are discarded.
12435 (Parser::parse) <yyerrlab1>: Compute the location of the error
12436 token so that it covers all the discarded tokens.
12437 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12438 it can be called with `%skeleton "lalr1.cc"', and do that.
12439
12440 2004-02-02 Paul Eggert <eggert@twinsun.com>
12441
12442 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12443 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12444 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12445 There's no need to mention top_builddir since Automake does that
12446 for us.
12447 (INCLUDES): Remove, as Automake says it's obsolescent.
12448 Contents migrated into AM_CPPFLAGS as described above.
12449 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12450
12451 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12452
12453 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12454 (yyreportSyntaxError): Handle case where lookahead token is
12455 YYEMPTY.
12456
12457 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12458
12459 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12460 resulting parsers are compilable with C++.
12461
12462 2003-12-23 Paul Eggert <eggert@twinsun.com>
12463
12464 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12465 * src/output.c (output_skeleton): Rename local var.
12466 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12467 Bison tokens, as this runs afoul of the 2003-10-07 change that
12468 disallowed NUL bytes in character constants or string literals.
12469
12470 * tests/local.at: Require Autoconf 2.59's Autotest.
12471 * tests/testsuite.at: Don't include local.at, since we now assume
12472 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12473 including it.
12474 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12475 multiple inclusion warnings.
12476
12477 2003-12-02 Akim Demaille <akim@epita.fr>
12478
12479 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12480 conditions.
12481 From Bruno Haible.
12482
12483 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12484
12485 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12486
12487 2003-10-07 Paul Eggert <eggert@twinsun.com>
12488
12489 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12490 if testsuite doesn't exist.
12491
12492 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12493 literals, unfortunately.
12494 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12495 Complain about NUL bytes in character constants or string literals.
12496
12497 2003-10-05 Paul Eggert <eggert@twinsun.com>
12498
12499 * NEWS: Don't document %no-default-prec, as it's still
12500 too experimental.
12501 * doc/bison.texinfo: Document %no-default-prec only if
12502 the defaultprec flag is set. Normally it's not.
12503
12504 2003-10-04 Paul Eggert <eggert@twinsun.com>
12505
12506 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12507 non-modifiable lvalue, instead of a modifiable one.
12508 * doc/bison.texinfo (Actions): Document that $$ can
12509 be assigned to. Do not claim that $$ and $N are
12510 array element references: user code should not rely on this.
12511
12512 2003-10-01 Paul Eggert <eggert@twinsun.com>
12513
12514 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12515 (grammar_declaration): Use it.
12516 * src/scan-gram.l: New token %no-default-prec.
12517 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12518 * NEWS, doc/bison.texinfo: Document the above.
12519
12520 2003-10-01 Akim Demaille <akim@epita.fr>
12521
12522 VCG no longer supports long_straight_phase.
12523
12524 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12525 * src/print_graph.c (print_graph): Adjust.
12526
12527 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12528 and Paul Eggert <eggert@twinsun.com>
12529
12530 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12531 Table of Symbols): Document %default-prec.
12532 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12533 (grammar_declaration): Set default_prec on %default-prec.
12534 * src/scan-gram.l (%default-prec): New token.
12535 * src/reader.h (default_prec): New flag.
12536 * src/reader.c: Likewise.
12537 (packgram): Handle it.
12538 * tests/conflicts.at (%default-prec without %prec,
12539 %default-prec with %prec, %default-prec 1): New tests.
12540
12541 2003-09-30 Paul Eggert <eggert@twinsun.com>
12542
12543 * tests/testsuite.at: Include local.at, not input.at, fixing
12544 a typo in the 2003-08-25 patch.
12545
12546 2003-08-27 Akim Demaille <akim@epita.fr>
12547
12548 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12549 GCC warnings.
12550
12551 2003-08-26 Akim Demaille <akim@epita.fr>
12552
12553 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12554 "<\#" to avoid magic from Gnus when posting parts of this script.
12555
12556 2003-08-26 Akim Demaille <akim@epita.fr>
12557
12558 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12559 (Parser::parse): here.
12560 Adjust: nerrs and errstatus is now replaced by...
12561 (Parser::nerrs_, Parser::errstatus_): New.
12562
12563 2003-08-25 Akim Demaille <akim@epita.fr>
12564
12565 * config/announce-gen, Makefile.cfg: New.
12566 * Makefile.am: Adjust.
12567 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12568 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12569
12570 2003-08-25 Akim Demaille <akim@epita.fr>
12571
12572 When reducing initial empty rules, Bison parser read an initial
12573 location that is not defined. This results in garbage, and that
12574 affects Bison's own parser. Therefore we need (i) to extend Bison
12575 to support a means to initialize this location, and (ii) to use
12576 this CVS Bison to fix CVS Bison's parser.
12577
12578 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12579 with...
12580 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12581 * src/parse-gram.y: Adjust.
12582 (%initial-action): New.
12583 (%error-verbose): Since we require CVS Bison, there is no reason
12584 not to use it.
12585 * src/scan-gram.l: Adjust.
12586 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12587 * data/yacc.c (yyparse): Use b4_initial_action.
12588
12589 2003-08-25 Akim Demaille <akim@epita.fr>
12590
12591 * doc/bison.texinfo: Don't promote stdout for error messages.
12592
12593 2003-08-25 Akim Demaille <akim@epita.fr>
12594
12595 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12596 From Alexandre Duret-Lutz.
12597
12598 2003-08-25 Akim Demaille <akim@epita.fr>
12599
12600 Version 1.875c.
12601
12602 2003-08-25 Akim Demaille <akim@epita.fr>
12603
12604 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12605 Use them.
12606
12607 2003-08-25 Akim Demaille <akim@epita.fr>
12608
12609 * data/lalr1.cc (Parser::reduce_print_): New.
12610 Use it.
12611
12612 2003-08-25 Akim Demaille <akim@epita.fr>
12613
12614 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12615 error recovery loops. This patch is based on
12616 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12617 Also, augment the similarity between lalr1.cc and yacc.c.
12618 Note: the locations of error recovery rules are not correct yet.
12619
12620 * data/lalr1.cc: Comment changes to augment the similarity between
12621 lalr1.cc and yacc.c.
12622 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12623 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12624 yyerrlab), when hitting EOF, pop the whole stack here instead of
12625 merely falling thru the default error handling mechanism.
12626 (yyerrorlab): New label, with the old contents of YYERROR,
12627 plus the following change: pop the stack of rhs corresponding
12628 to the production that invoked YYERROR. That is how Yacc
12629 behaves (required by POSIX).
12630 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12631 fail.
12632
12633 2003-08-25 Akim Demaille <akim@epita.fr>
12634
12635 Tune local.at so that people can "autom4te -l autotest calc.at -o
12636 calc" for instance, to extract a sub test suite.
12637
12638 * tests/testsuite.at: Move the initialization, Autotest version
12639 requirement, and AT_TESTED invocation into...
12640 * tests/local.at: here.
12641 * tests/testsuite.at: Include it for compatibility with Autoconf
12642 2.57.
12643 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12644 be ignore.
12645
12646 2003-08-04 Paul Eggert <eggert@twinsun.com>
12647
12648 Rework code slightly to avoid gcc -Wtraditional warnings.
12649 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12650 The returned value is now stored in *YY0. All callers changed.
12651 * src/output.c (merge_output): Adjust to the above change.
12652
12653 2003-07-26 Paul Eggert <eggert@twinsun.com>
12654
12655 * data/glr.c (YYASSERT): New macro.
12656 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12657 yyresolveStates, yyprocessOneStack):
12658 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12659 Derived from a suggestion by Frank Heckenbach.
12660
12661 2003-07-25 Paul Eggert <eggert@twinsun.com>
12662
12663 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12664 for portability to K&R C (after ansi2knr, presumably). See
12665 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12666 by Frank Heckenbach, though I have omitted the structure-initialization
12667 part of his glr-knr.diff patch since I recall that the Portable
12668 C Compiler didn't require that change.
12669
12670 Let the user specify how to allocate and free memory.
12671 Derived from a suggestion by Frank Heckenbach in
12672 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12673 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12674 All uses of free, malloc, realloc changed to use these macros,
12675 and unnecessary casts removed.
12676 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12677
12678 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12679
12680 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12681 use s.empty() rather than s == "" to test for empty string; see
12682 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12683 (trivial change)
12684
12685 2003-06-25 Akim Demaille <akim@epita.fr>
12686
12687 * config/depcomp, config/install-sh: Update from masters.
12688
12689 2003-06-20 Paul Eggert <eggert@twinsun.com>
12690
12691 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12692 and return properly parenthesized result.
12693 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12694 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12695 Remove unnecessary parentheses from uses.
12696 * doc/bison.texinfo (Location Default Action): Describe the
12697 conventions for parentheses.
12698
12699 2003-06-19 Paul Eggert <eggert@twinsun.com>
12700
12701 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12702 yyreportTree): Do not assume that size_t is the same width as int,
12703 when printing sizes. Print sizes using an unsigned format.
12704 Problem reported by Frank Heckenbach in
12705 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12706
12707 Port to Forte Developer 7 C compiler.
12708 * data/glr.c (struct YYLTYPE): If locations are not being used,
12709 declare a single dummy member, as empty structs do not conform
12710 to the C standard.
12711 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12712 the Forte Developer 7 C compiler complains that end-of-loop
12713 code is not reached.
12714
12715 2003-06-17 Paul Eggert <eggert@twinsun.com>
12716
12717 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12718 avoid warnings from picky compilers about redefinition of PARAMS.
12719
12720 2003-06-17 Paul Eggert <eggert@twinsun.com>
12721
12722 Version 1.875b.
12723
12724 * NEWS: Document 1.875b.
12725
12726 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12727 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12728 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12729 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12730 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12731 per recent gettext manual's suggestion.
12732 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12733 Use prototypes, not old-style definitions.
12734 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12735 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12736 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12737 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12738 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12739 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12740 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12741 vbitset_or_and_cmp, vbitset_copy): Likewise.
12742
12743 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12744 Do not include <stdlib.h>.
12745 (PARAMS): Define unconditionally for C89.
12746 (ATTRIBUTE_NORETURN): Remove.
12747 (ATTRIBUTE_UNUSED): Define unconditionally.
12748
12749 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12750 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12751 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12752 * lib/vbitset.c, lib/vbitset.h: New files.
12753 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12754 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12755 from libbitset.
12756
12757 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12758 `How Can I Reset @code{yyparse}', since texinfo does not allow
12759 arbitrary @ in node names.
12760
12761 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12762 shouldn't be needed according to the gettext 0.12.1 documentation
12763 but which seem to be needed anyway: codeset.m4 glibc21.m4
12764 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12765 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12766 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12767
12768 * lib/.cvsignore: Add stdbool.h.
12769 * m4/.cvsignore: Add nls.m4, po.m4.
12770
12771 Upgrade to CVS gnulib.
12772 * stdbool_.h: File renamed from stdbool.h.in.
12773 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12774 AC_HEADER_STDBOOL.
12775 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12776 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12777 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12778 (MOSTLYCLEANFILES): New var.
12779 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12780 (stdbool.h): New rule.
12781 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12782 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12783 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12784 m4/quote.m4: Upgrade to today's gnulib.
12785
12786 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12787 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12788 the tests right now.
12789 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12790 yyerror are declared before use; C99 requires this.
12791
12792 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12793
12794 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12795 first.
12796 (yyrecoverSyntaxError): Correct the logic for setting and testing
12797 yyerrState.
12798 Correct comment on handling EOF.
12799 Allow states with only a default reduction, rather than failing
12800 (I can't quite reconstruct why these were not allowed before).
12801
12802 Fixes to avoid problem that $-N rules in GLR parsers can cause
12803 buffer overruns, corrupting state.
12804
12805 * src/output.c (prepare_rules): Output max_left_semantic_context
12806 definition.
12807 * src/reader.h (max_left_semantic_context): New variable declaration.
12808 * src/scan-gram.l (max_left_semantic_context): Define.
12809 (handle_action_dollar): Update max_left_semantic_context.
12810 * data/glr.c (YYMAXLEFT): New definition.
12811 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12812 (yyresolveAction): Ditto.
12813
12814 Fixes to problems with location handling in GLR parsers reported by
12815 Frank Heckenbach (2003/06/05).
12816
12817 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12818 (YYRHSLOC): Add parentheses, and define only if locations used.
12819 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12820 locations not used.
12821 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12822 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12823
12824 * tests/cxx-type.at: Exercise location information; update tests
12825 to differentiate output with and without locations.
12826 Remove forward declarations of yylex and yyerror---caused errors
12827 because default YYLTYPE not yet defined.
12828 Change semantic actions to compute strings, rather than printing
12829 them directly (to test proper passing of semantics values). Change
12830 output to prefix notation and update test data and expected results.
12831 (yylex): Track locations.
12832 (stmtMerge): Return value rather than printing, and include arguments
12833 in value.
12834
12835 2003-06-03 Paul Eggert <eggert@twinsun.com>
12836
12837 Avoid warnings generated by GCC 2.95.4 when Bison is
12838 configured with --enable-gcc-warnings.
12839 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12840 yy::]b4_parser_class_name[::translate_,
12841 yy::Stack::operator[] (unsigned),
12842 yy::Stack::operator[] (unsigned) const,
12843 yy::Slice::operator[] (unsigned),
12844 yy::Slice::operator[] (unsigned) const):
12845 Rename local vars to avoid warnings.
12846 * tests/glr-regression.at (Improper handling of embedded actions
12847 and $-N in GLR parsers): Remove unused local variable from yylex.
12848 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12849 (void) as arg when not pure, since we now assume C89 when building
12850 Bison. Pacify GCC by using parameter.
12851
12852 2003-06-02 Paul Eggert <eggert@twinsun.com>
12853
12854 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12855 yy::Location::lines, yy::Location::columns): Rename arguments
12856 to avoid shadowing; this removes a warning generated by GCC 3.3.
12857
12858 2003-06-01 Paul Eggert <eggert@twinsun.com>
12859
12860 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12861 to g++, as GCC 3.3 complains if you do it.
12862 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12863 everything that WARNING_CFLAGS has, except omit warnings
12864 not suitable for C++.
12865 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12866 * tests/atlocal.in (CXXFLAGS): New var.
12867 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12868
12869 Fix a GLR parser bug I reported in February; see
12870 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12871 The problem was that GLR parsers did not conform to the C standard,
12872 because actions like { $1 = $2 + $3; } expanded to expressions
12873 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12874 to a local variable. The C standard says that expressions
12875 like (var = f ()) + (var = f ()) have undefined behavior.
12876 Another problem was that GCC sometimes issues warnings that
12877 yyfill and its parameters are unused.
12878
12879 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12880 as possibly unused.
12881 (yyfill): New function.
12882 (YYFILL): Use it.
12883 (yyuserAction): Change type of yynormal to bool, so that it matches
12884 the new yyfill signature. Mark it as possibly unused.
12885
12886
12887 Follow up on a bug I reported in February, where a Bison-generated
12888 parser can loop. Provide a test case and a fix for yacc.c. I
12889 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12890 The original bug report is in:
12891 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12892
12893 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12894 macro's size was becoming unwieldy.
12895 (yyerrlab): Do not discard an empty lookahead symbol, as this
12896 might destroy garbage.
12897 (yyerrorlab): New label, with the old contents of YYERROR,
12898 plus the following change: pop the stack of rhs corresponding
12899 to the production that invoked YYERROR. That is how Yacc
12900 behaves, and POSIX requires this behavior.
12901 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12902 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12903 Define 'alarm' to do nothing if unistd.h is not available.
12904 Add a new rule "exp: '-' error;" to test the above change to
12905 data/yacc.c. Use 'alarm' to abort any test taking longer than
12906 10 seconds, as it's probably looping.
12907 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12908 Also, the new yacc.c generates two fewer diagnostics for an
12909 existing test.
12910
12911 2003-05-24 Paul Eggert <eggert@twinsun.com>
12912
12913 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12914 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12915 This fixes a problem reported by John Bowman when the Compaq/HP
12916 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12917 -ansi -Wall -gall).
12918 * data/yacc.c (union yyalloc): Likewise.
12919 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12920
12921 Switch from 'int' to 'bool' where that makes sense.
12922
12923 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12924 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12925 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12926 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12927 Return or accept bool, not int. All callers changed.
12928 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12929 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12930 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12931 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12932 bitset_or_and_cmp_): Likewise.
12933 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12934 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12935 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12936 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12937 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12938 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12939 bitset_stats_or_and_cmp): Likewise.
12940 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12941 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12942 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12943 ebitset_xor_cmp): Likewise.
12944 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12945 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12946 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12947 lbitset_xor_cmp): Likewise.
12948 * lib/bbitset.h: Include <stdbool.h>.
12949 (struct bitset_vtable): The following members now return bool, not
12950 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12951 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12952 or_and_cmp).
12953 * src/conflicts.c (count_rr_conflicts): Likewise.
12954 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12955 All uses changed.
12956 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12957 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12958 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12959 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12960 graph_flag): Likewise.
12961 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12962 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12963 graph_flag): Likewise.
12964 * src/output.c (error_verbose): Likewise.
12965 * src/output.h (error_verbose): Likewise.
12966 * src/reader.c (start_flag, typed): Likewise.
12967 * src/reader.h (typed): Likewise.
12968 * src/getargs.c (LOCATIONS_OPTION): New constant.
12969 (long_options, getargs): Use it.
12970 * src/lalr.c (build_relations): Use bool, not int.
12971 * src/nullable.c (nullable_compute): Likewise.
12972 * src/print.c (print_reductions): Likewise.
12973 * src/tables.c (action_row, pack_vector): Likewise.
12974 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12975 * src/output.c (prepare): Use it.
12976 * src/output.c (token_definitions_output,
12977 symbol_destructors_output, symbol_destructors_output): Use string,
12978 not boolean integer, to keep track of whether to output separator.
12979 * src/print_graph.c (print_core): Likewise.
12980 * src/state.c (state_rule_lookaheads_print): Likewise.
12981
12982 * config/install-sh: Sync from automake 1.7.5.
12983
12984 2003-05-14 Paul Eggert <eggert@twinsun.com>
12985
12986 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12987 semicolon after a grammar declaration, in the interest of possible
12988 future changes to the Bison input language.
12989 Do not allow a stray semicolon at the start of the grammar.
12990 (rhses.1): Allow one or more semicolons after any rule, including
12991 just before "|" as required by POSIX.
12992 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12993 grammar.
12994
12995 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12996
12997 %parse-param support for lalr1.cc.
12998
12999 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13000 b4_cc_constructor_calls, b4_cc_constructor_call,
13001 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13002 definitions.
13003 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13004 parse-param arguments.
13005 (yy::b4_parser_class_name): Declare instance variables to
13006 hold parse-param arguments.
13007 * tests/calc.at: s/value/semantic_value/ because value clashes
13008 with a member of yy::b4_parser_class_name. Adjust C++ code
13009 to handle %parse-param. Enable %parse-param test in C++.
13010
13011 2003-05-12 Paul Eggert <eggert@twinsun.com>
13012
13013 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13014 English a bit. Fix fclose typo. Change "const char" to "char
13015 const", and use ANSI C rather than K&R for "main". Suggest
13016 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13017 and suggest yy_switch_to_buffer.
13018
13019 2003-05-05 Paul Eggert <eggert@twinsun.com>
13020
13021 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13022 C89. This avoids a diagnostic on compilers that define __STDC__
13023 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13024 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13025
13026 2003-05-03 Paul Eggert <eggert@twinsun.com>
13027
13028 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13029 Do not overrun array bounds.
13030 This should fix a bug reported today by Olatunji Oluwabukunmi in
13031 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13032
13033 2003-04-29 Akim Demaille <akim@epita.fr>
13034
13035 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13036 * src/getargs.c, src/getargs.h: here, as bool, not int.
13037 (nondeterministic_parser): New.
13038 * src/parse-gram.y, src/scan-gram.l: Support
13039 %nondeterministic-parser.
13040 * src/output.c (prepare): Use nondeterministic_parser instead
13041 of glr_parser where appropriate.
13042 * src/tables.c (conflict_row, action_row, save_row)
13043 (token_actions, token_actions, pack_vector): Ditto.
13044
13045 2003-04-29 Akim Demaille <akim@epita.fr>
13046
13047 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13048
13049 2003-04-29 Akim Demaille <akim@epita.fr>
13050
13051 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13052 with %pure-parser and %locations to exercise the patch from Yakov
13053 Markovitch below.
13054
13055 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13056
13057 * data/yacc.c: (b4_lex_param): Corrected for the case where
13058 %lex-param is provided and %pure-parser isn't.
13059
13060 2003-04-27 Paul Eggert <eggert@twinsun.com>
13061
13062 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13063 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13064 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13065 if it is not defined.
13066 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13067
13068 2003-04-26 Paul Eggert <eggert@twinsun.com>
13069
13070 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13071 Declare to be of type suitable for the ninf value itself, not of
13072 type suitable for the corresponding table, since the latter might
13073 be unsigned but the ninf value might be negative. This fixes a
13074 bug reported by Alexandre Duret-Lutz in
13075 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13076
13077 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13078 invokes it. We shouldn't invoke it twice because it will attempt
13079 to put error.o in the archive twice. This fixes a glitch reported
13080 by Martin Mokrejs in
13081 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13082
13083 2003-04-21 Paul Eggert <eggert@twinsun.com>
13084
13085 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13086 to gnulib.
13087
13088 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13089
13090 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13091 Fix obvious typo that results in uncompilable GLR parsers
13092 when both %pure-parser and %locations are used. (trivial change)
13093
13094 2003-04-17 Paul Eggert <eggert@twinsun.com>
13095
13096 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13097 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13098 Do not insert the expected token via unput, as this runs afoul
13099 of a POSIX-compatibility bug in flex 2.5.31.
13100 All uses changed to BEGIN the parent state,
13101 since we no longer insert the expected token via unput.
13102 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13103 that is no longer emitted after the above change.
13104
13105 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13106 the first one. This change is from Paul Hilfinger, and it fixes
13107 regression reported by Werner Lemberg in
13108 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13109
13110 (resolve_sr_conflict): Don't invoke state_errs_set
13111 unless one or more tokens have been explicitly made errors.
13112 Otherwise, the above change causes Bison to abort.
13113
13114 * tests/existing.at (GNU pic Grammar): New test case, taken from
13115 Lemberg's email.
13116
13117 2003-03-31 Akim Demaille <akim@epita.fr>
13118
13119 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13120
13121 2003-03-31 Akim Demaille <akim@epita.fr>
13122
13123 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13124 output.
13125
13126 2003-03-31 Akim Demaille <akim@epita.fr>
13127
13128 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13129 From Paul Hilfinger.
13130
13131 2003-03-29 Akim Demaille <akim@epita.fr>
13132
13133 * m4/error.m4: Do not put under dynamic conditions some code which
13134 expansion is under static control.
13135
13136 2003-03-29 Akim Demaille <akim@epita.fr>
13137
13138 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13139
13140 2003-03-29 Akim Demaille <akim@epita.fr>
13141
13142 * doc/bison.texinfo (Strings are Destroyed): New.
13143
13144 2003-03-13 Paul Eggert <eggert@twinsun.com>
13145
13146 * .cvsignore: Add configure.lineno.
13147 * src/.cvsignore: Add yacc.
13148 * tests/.cvsignore: Add testsuite.log.
13149 * doc/fdl.texi: Sync with latest FSF version.
13150
13151 2003-03-12 Paul Eggert <eggert@twinsun.com>
13152
13153 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13154 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13155 cursor, instead of leaving it undefined. This fixes a bug
13156 reported by Tim Van Holder in
13157 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13158 * tests/input.at (Torturing the Scanner): Test the scanner on
13159 an empty input file, which was Tim Van Holder's test case.
13160
13161 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13162 <sys/resource.h> can be included, include sys/time.h and
13163 sys/times.h first, if available. This works around the SunOS
13164 4.1.4 porting bug reported by Bruce Becker in
13165 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13166
13167 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13168 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13169 AC_HEADER_SYS_WAIT.
13170
13171 Merge changes from gnulib. This was prompted because the CVS
13172 snapshot didn't build on Solaris 7 due to strnlen problems.
13173
13174 These changes need to be merged back into gnulib:
13175 * lib/hash.c: Include <stdbool.h> unconditionally.
13176 * m4/onceonly.m4 (m4_quote): New macro.
13177 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13178 Quote AC_FOREACH variable-expansions properly.
13179 The 2003-01-03 obstack.h change also needs merging.
13180 {end of changes requiring merging}
13181
13182 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13183 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13184 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13185 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13186 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13187 New files, imported from gnulib.
13188 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13189 above.
13190
13191 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13192 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13193 gnulib sources.
13194
13195 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13196 Add.
13197 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13198 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13199 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13200 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13201 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13202 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13203 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13204 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13205 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13206 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13207 (jm_PREREQ_ARGMATCH): Remove.
13208 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13209 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13210
13211 * src/system.h: Include <stdbool.h> unconditionally.
13212
13213 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13214 assuming at least C89 in the bitset code for some time now.
13215
13216 2003-03-03 Akim Demaille <akim@epita.fr>
13217
13218 * ro.po: New.
13219
13220 2003-03-02 Akim Demaille <akim@epita.fr>
13221
13222 * doc/bison.texinfo (Table of Symbols): Reactivate the
13223 documentation for %lex-param, and %parse-param.
13224
13225 2003-03-02 Akim Demaille <akim@epita.fr>
13226
13227 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13228 generate verbose error messages.
13229 Use the number of tokens as an upper bound in yytname, as it
13230 cannot be a non terminal.
13231
13232 2003-03-02 Akim Demaille <akim@epita.fr>
13233
13234 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13235 message.
13236
13237 2003-03-02 Akim Demaille <akim@epita.fr>
13238
13239 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13240 Use them to exercise yycheck overrun.
13241 Based on Andrew Suffield's grammar.
13242
13243 2003-03-02 Akim Demaille <akim@epita.fr>
13244
13245 Create tests/local.at for Bison generic testing macros.
13246
13247 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13248 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13249 This new file.
13250 * tests/calc.at (AT_CHECK_CALC): Adjust.
13251 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13252 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13253 * tests/local.at: here.
13254 (AT_COMPILE_CXX): Tags the tests using it as c++.
13255 Ignore the test if CXX is not functional.
13256
13257 2003-03-01 Paul Eggert <eggert@twinsun.com>
13258
13259 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13260 not loc->end, since loc->end might contain garbage and this leads
13261 to undefined behavior on some platforms.
13262 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13263 depend on *loc, so that the reader doesn't give the the false
13264 impression that *loc is initialized.
13265 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13266 does not survive the return.
13267
13268 2003-03-01 Akim Demaille <akim@epita.fr>
13269
13270 * src/scan-gram.l (code_start): Always initialize it when entering
13271 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13272 yylex invocation. An alternative would be making it static, but
13273 then it starts with the second %%'s beginning, instead of its end.
13274
13275 2003-02-28 Paul Eggert <eggert@twinsun.com>
13276
13277 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13278 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13279 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13280
13281 2003-02-26 Paul Eggert <eggert@twinsun.com>
13282
13283 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13284 Remove Sequent/Pyramid discussion (nobody uses them any more).
13285 Merge VMS and MS-DOS discussion; these ports may well be dead
13286 but let's keep mentioning them for now. Put <> around email
13287 addresses. Add copyright notice.
13288
13289 2003-02-24 Paul Eggert <eggert@twinsun.com>
13290
13291 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13292 to avoid collision with flex use of yylineno.
13293 Problem reported by Bruce Lilly in
13294 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13295 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13296 * data/yacc.c (yy_reduce_print): Likewise.
13297
13298 * config/depcomp: Sync with Automake 1.7.3.
13299
13300 2003-02-21 Akim Demaille <akim@epita.fr>
13301
13302 * data/lalr1.cc: Use temporary variables instead of casts to
13303 change integer types.
13304 Suggested by Paul Eggert.
13305
13306 2003-02-21 Akim Demaille <akim@epita.fr>
13307
13308 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13309 to avoid confusions with lalr1.cc's notion of Position.
13310 Suggested by Paul Eggert.
13311
13312 2003-02-20 Akim Demaille <akim@epita.fr>
13313
13314 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13315 before initial_columns.
13316 (location.hh): Use consistent variable names when defining the
13317 operator<<.
13318 Use "last" so that we subtract from Positions, not from unsigned.
13319
13320 2003-02-20 Akim Demaille <akim@epita.fr>
13321
13322 * data/lalr1.cc (position.hh): New subfile, including the extended
13323 and Doxygen'ed documentation of class Position.
13324 (location.hh): Use it.
13325 Document a` la Doxygen.
13326 With the help of Benoit Perrot.
13327
13328 2003-02-20 Akim Demaille <akim@epita.fr>
13329
13330 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13331 AT_YACC_IF.
13332 Redefine AT_YYERROR_SEES_LOC_IF using it.
13333 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13334 not defined.
13335 Don't use the location in yy::Parser::error_ and
13336 yy::Parser::print_ when not %locations.
13337 Activate more lalr1.cc tests.
13338
13339 2003-02-19 Akim Demaille <akim@epita.fr>
13340
13341 * data/lalr1.cc: When displaying a line number, be sure to make it
13342 an int.
13343
13344 2003-02-19 Akim Demaille <akim@epita.fr>
13345
13346 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13347 Remove, useless.
13348 (YYABORT, YYACCEPT, YYERROR): New.
13349 * tests/calc.at: Renable the lalr1.cc test.
13350
13351 2003-02-19 Akim Demaille <akim@epita.fr>
13352
13353 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13354 error recovery, mixing with/without pops and discarding of the
13355 lookahead.
13356 Exercise YYERROR.
13357 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13358
13359 2003-02-17 Paul Eggert <eggert@twinsun.com>
13360
13361 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13362 * tests/testsuite.at (AT_COMPILE): Use them.
13363 This fixes the testsuite problem reported by Robert Lentz in
13364 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13365
13366 2003-02-12 Paul Eggert <eggert@twinsun.com>
13367
13368 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13369 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13370 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13371 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13372 Check for malloc failure, for consistency with yacc.c.
13373 (yytname_size): Remove, for consistency with yacc.c.
13374
13375 The bug still remains in data/lalr1.cc, as I didn't have time
13376 to fix it there.
13377
13378 2003-02-06 Akim Demaille <akim@epita.fr>
13379
13380 * configure.ac (GXX): Rename as...
13381 (CXX): this, to keep the original Autoconf semantics.
13382 Require 2.57.
13383 * data/lalr1.cc: Fix b4_copyright invocations.
13384 If YYDEBUG is not defined, don't depend upon name_ being defined.
13385 (location.hh): Include string and iostream.
13386 (Position::filename): New member.
13387 (Position::Position ()): New.
13388 (operator<< (Position)): New.
13389 (operator- (Position, int)): New.
13390 (Location::first, Location::last): Rename as...
13391 (Location::begin, Location::end): these, to mock the conventional
13392 iterator names.
13393 (operator<< (Location)): New.
13394 * tests/atlocal.in (CXX): New.
13395 * tests/testsuite.at (AT_COMPILE_CXX): New.
13396 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13397 locations in a more synthetic way.
13398 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13399 lalr1.cc is used.
13400 Adjust the C locations to match those from Emacs: first column is
13401 column 0.
13402 Change all the expected results.
13403 Conform to the GCS: simplify the locations when applicable.
13404 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13405 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13406 these CPP macros with the m4 macros new defined by...
13407 (AT_CHECK_PUSHDEFS): this, i.e.:
13408 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13409 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13410 New macros.
13411 (AT_CHECK_POPDEFS): Undefine them.
13412 (AT_CHECK_CALC_LALR1_CC): New.
13413 Use it for the first lalr1.cc test.
13414
13415 2003-02-04 Akim Demaille <akim@epita.fr>
13416
13417 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13418 Location as is defined.
13419
13420 2003-02-04 Akim Demaille <akim@epita.fr>
13421
13422 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13423 name_ being defined.
13424
13425 2003-02-03 Paul Eggert <eggert@twinsun.com>
13426
13427 * src/gram.h (start_symbol): Remove unused decl.
13428
13429 Use more-consistent naming conventions for local vars.
13430
13431 * src/derives.c (derives_compute): Change type of local var from
13432 int to rule_number.
13433 * src/gram.c (grammar_rules_partial_print): Likewise.
13434 * src/print.c (print_core): Likewise.
13435 * src/reduce.c (reduce_grammar_tables): Likewise.
13436
13437 * src/gram.c (grammar_dump): Change name of item_number *
13438 local var from r to rp.
13439 * src/nullable.c (nullable_compute): Likewise.
13440
13441 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13442
13443 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13444 for symbol or symbol_number var.
13445 * src/reader.c (grammar_start_symbol_set): Likewise.
13446 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13447 Likewise.
13448 * src/state.c (transitions_to): Likewise.
13449 * src/state.h: Likewise.
13450 * src/tables.c (symbol_number_to_vector_number): Likewise.
13451
13452 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13453 char * var.
13454
13455 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13456 var.
13457
13458 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13459 var.
13460
13461 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13462 Use str, not s, for char * var. Use ch, not c, for character var.
13463 Use size for size var.
13464
13465 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13466 char * var.
13467 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13468 uniqstr var.
13469 * src/uniqstr.h: Likewise.
13470
13471 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13472 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13473 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13474 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13475 param to have same name as that of enum, so that we don't use
13476 "s" to stand for a non-state.
13477
13478 2003-02-02 Akim Demaille <akim@epita.fr>
13479
13480 * src/scan-skel.l: Scan more than one inert character per yylex
13481 invocation.
13482
13483 2003-02-01 Paul Eggert <eggert@twinsun.com>
13484
13485 Version 1.875a.
13486
13487 * po/LINGUAS: Add ms.
13488
13489 2003-01-30 Akim Demaille <akim@epita.fr>
13490
13491 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13492
13493 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13494
13495 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13496 of $1.
13497
13498 Changes in response to error report by S. Eken: GLR mode does not
13499 handle negative $ indices or $ indices in embedded rules correctly.
13500 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13501
13502 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13503 (b4_rhs_location): Ditto.
13504 (yyfill): New function to copy from stack tree into array
13505 incrementally.
13506 (yyuserAction): Modify to allow incremental move of semantic values
13507 to rhs array when in GLR mode.
13508 Define YYFILL to use in user-defined actions to fill semantic array
13509 as needed.
13510 Remove dummy use of yystack, as there is now a guaranteed use.
13511 (yydoAction): Modify to allow incremental move of semantic values
13512 to rhs array when in GLR mode.
13513 (yyresolveAction): Ditto.
13514 (yyglrShiftDefer): Update comment.
13515 (yyresolveStates): Use X == NULL for pointers, not !X.
13516 (yyglrReduce): Ditto.
13517 (yydoAction): Ditto
13518
13519 * tests/glr-regr1.at: Rename to ...
13520 * tests/glr-regression.at: Add new regression test for the problems
13521 described above (adapted from S. Eken).
13522 Update copyright notice.
13523 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13524 * tests/Makefile.am: Ditto.
13525
13526 2003-01-28 Paul Eggert <eggert@twinsun.com>
13527
13528 * data/lalr1.cc: Do not use @output_header_name@ unless
13529 b4_defines_flag is set. This fixes two bugs reported by
13530 Tim Van Holder in
13531 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13532 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13533
13534 2003-01-21 Paul Eggert <eggert@twinsun.com>
13535
13536 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13537 we don't need to worry about yyerrlab1 being reported as an
13538 "unused label" by non-GCC C compilers. The downside is that if
13539 locations are used then a couple of statements are duplicated each
13540 time YYERROR is invoked, but the upside is that the warnings
13541 should vanish.
13542 (yyerrlab1): Move code to YERROR.
13543 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13544 This reverts some of the 2002-12-27 change.
13545
13546 2003-01-17 Paul Eggert <eggert@twinsun.com>
13547
13548 * src/output.c (symbol_printers_output): Fix typo that led
13549 to core dump. Problem reported by Antonio Rus in
13550 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13551
13552 2003-01-13 Akim Demaille <akim@epita.fr>,
13553 Quoc Peyrot <chojin@lrde.epita.fr>,
13554 Robert Anisko <anisko_r@lrde.epita.fr>
13555
13556 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13557 when the stacks contain one element, as the loop would otherwise
13558 free the last state, and then use the top state (the one we just
13559 popped). This means that the initial elements will not be freed
13560 explicitly, as is the case in yacc.c; it is not a problem, as
13561 these elements have fake values.
13562
13563 2003-01-11 Paul Eggert <eggert@twinsun.com>
13564
13565 * NEWS: %expect-violations are now just warnings, reverting
13566 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13567 bootstrapping problem reported by Matthias Klose; see
13568 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13569 * src/conflicts.c (conflicts_print): Likewise.
13570 * tests/conflicts.at (%expect not enough, %expect too much,
13571 %expect with reduce conflicts): Likewise.
13572 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13573 that the warning is enabled if the number of conflicts changes
13574 (not necessarily increases).
13575
13576 * src/getargs.c (version): Update copyright year.
13577
13578 2003-01-09 Akim Demaille <akim@epita.fr>
13579
13580 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13581
13582 2003-01-08 Paul Eggert <eggert@twinsun.com>
13583
13584 * Makefile.maint (WGETFLAGS):
13585 New macro, containing "-C off" to disable proxy caches.
13586 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13587 (rel-check): Use $(WGET) instead of wget.
13588
13589 2003-01-06 Paul Eggert <eggert@twinsun.com>
13590
13591 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13592 the GLR paper of Scott, Johnstone and Hussain.
13593
13594 2003-01-04 Paul Eggert <eggert@twinsun.com>
13595
13596 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13597 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13598 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13599 (EXTRA_LIBRARIES): New var, for liby.a.
13600 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13601 (EXTRA_SCRIPTS): New var, for yacc.
13602
13603 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13604 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13605 Problem reported by Nelson H. F. Beebe.
13606
13607 2003-01-03 Paul Eggert <eggert@twinsun.com>
13608
13609 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13610 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13611 when compiling Bison 1.875's `bitset bset = obstack_alloc
13612 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13613
13614 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13615 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13616 grow to a huge size with typical invocation.
13617
13618 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13619 Use the pattern recommended by Autoconf 2.57, except also protect
13620 against double-definition.
13621 * src/system.h: Likewise.
13622 Portability issues reported by Nelson H. F. Beebe.
13623
13624 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13625 All uses changed. Provide a definition in both C and C++.
13626 (yytrue, yyfalse): Define even if defined (__cplusplus).
13627
13628 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13629 Reported by Nelson H. F. Beebe.
13630
13631 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13632
13633 2003-01-02 Paul Eggert <eggert@twinsun.com>
13634
13635 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13636 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13637 Bug reported by Nelson H. F. Beebe.
13638
13639 2003-01-01 Paul Eggert <eggert@twinsun.com>
13640
13641 * Version 1.875.
13642
13643 2002-12-30 Paul Eggert <eggert@twinsun.com>
13644
13645 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13646 Moved here from...
13647 (<INITIAL>","): Here. This causes stray "," to be treated
13648 more uniformly.
13649
13650 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13651 last brace in braced code when not in Yacc mode, for compatibility
13652 with Bison 1.35. This resurrects the 2001-12-15 patch to
13653 src/reader.c.
13654
13655 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13656 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13657
13658 2002-12-28 Paul Eggert <eggert@twinsun.com>
13659
13660 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13661 that of SYM's type. This fixes Debian bug 168069, reported by
13662 Thomas Olsson.
13663
13664 2002-12-28 Paul Eggert <eggert@twinsun.com>
13665
13666 Version 1.75f.
13667
13668 Switch back to the Yacc style of conflict reports, undoing some
13669 of the 2002-07-30 change.
13670 * doc/bison.texinfo (Understanding): Use Yacc style for
13671 conflict reports. Also, use new way of locating rules.
13672 * src/conflicts.c (conflict_report):
13673 Renamed from conflict_report_yacc, removing the old
13674 'conflict_report'. Translate the entire conflict report at once,
13675 so that we don't assume that "," has the same interpretation in
13676 all languages.
13677 (conflicts_output): Use Yacc-style conflict report for each state,
13678 instead of our more-complicated style.
13679 (conflicts_print): Use Yacc-style conflict report, except print
13680 the input file name when not emulating Yacc.
13681 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13682 Conflicted Reduction, %expect not enough, %expect too much,
13683 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13684 * tests/existing.at (GNU Cim Grammar): Likewise.
13685 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13686
13687 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13688 fatal): Don't invoke fflush; it's not needed and it might even be
13689 harmful for stdout, as stdout might not be open.
13690 * src/reduce.c (reduce_print): Likewise.
13691
13692 2002-12-27 Paul Eggert <eggert@twinsun.com>
13693
13694 Fix a bug where error locations were not being recorded correctly.
13695 This problem was originally reported by Paul Hilfinger in
13696 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13697
13698 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13699 top of the location stack's error locations.
13700 (yyerrlab): Set it. When discarding a token, push its location
13701 onto yylerrsp so that we don't lose track of the error's end.
13702 (yyerrlab1): Now is only the target of YYERROR, so that we can
13703 properly record the location of the action that failed. For GCC
13704 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13705 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13706 (yyerrlab2): New label, which yyerrlab now falls through to.
13707 Compute the error's location by applying YYLLOC_DEFAULT to
13708 the locations of all the symbols that went into the error.
13709 * doc/bison.texinfo (Location Default Action): Mention that
13710 YYLLOC_DEFAULT is also invoked for syntax errors.
13711 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13712 Error locations include the locations of all the tokens that were
13713 discarded, not just the last token.
13714
13715 2002-12-26 Paul Eggert <eggert@twinsun.com>
13716
13717 * src/files.c: Include quote.h.
13718 (compute_output_file_names): Warn if we detect conflicting
13719 outputs to the same file. This should catch the misunderstanding
13720 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13721
13722 * src/conflicts.c (conflicts_print): If the user specifies
13723 "%expect N", report an error if there are any reduce/reduce
13724 conflicts. This is what the manual says should happen.
13725 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13726 * tests/conflicts.at (%expect with reduce conflicts): New test.
13727
13728 Don't use m4_include on relative file names, as it doesn't work as
13729 desired if there happens to be a file with that name under ".".
13730
13731 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13732 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13733 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13734 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13735 * src/output.c (output_skeleton): Use full path names when
13736 specifying a file to include; don't rely on include path, as
13737 it's unreliable when the working file contains a file with
13738 that name.
13739
13740 2002-12-25 Paul Eggert <eggert@twinsun.com>
13741
13742 Remove obsolete references to bison.simple and bison.hairy.
13743 Problem mentioned by Aubin Mahe in
13744 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13745 * data/glr.c: Comment fix.
13746 * doc/bison.1: Remove references. Also, mention "yacc".
13747
13748 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13749 with -g option.
13750
13751 * src/parse-gram.y (declaration): Use enum "report_states" rather
13752 than its numeric value 1.
13753
13754 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13755 opening a new one. This fixes Debian bug 165349, reported by
13756 Bruce Stephens.
13757
13758 2002-12-24 Paul Eggert <eggert@twinsun.com>
13759
13760 Version 1.75e.
13761
13762 * Makefile.maint (cvs-update): Don't assume that the shell
13763 supports $(...), as Solaris sh doesn't.
13764
13765 * src/parse-gram.y (lloc_default): Remove test for empty
13766 nonterminals at the end, since it didn't change the result.
13767
13768 2002-12-24 Paul Eggert <eggert@twinsun.com>
13769
13770 If the user does not define YYSTYPE as a macro, Bison now declares it
13771 using typedef instead of defining it as a macro. POSIX requires this.
13772 For consistency, YYLTYPE is also declared instead of defined.
13773
13774 %union directives can now have a tag before the `{', e.g., the
13775 directive `%union foo {...}' now generates the C code
13776 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13777 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13778 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13779 instead of `yyltype'.
13780
13781 `yystype' and `yyltype' are now obsolescent macros instead of being
13782 typedefs or tags; they are no longer documented and will be
13783 withdrawn in a future release.
13784
13785 * data/glr.c (b4_location_type): Remove.
13786 (YYSTYPE): Renamed from yystype.
13787 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13788 (struct YYLTYPE): Renamed from struct yyltype.
13789 (YYLTYPE): Renamed from yyltype.
13790 (yyltype, yystype): New (and obsolescent) macros,
13791 for backward compatibility.
13792 * data/yacc.c: Likewise.
13793
13794 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13795 does not specify a union tag. This is for compatibility with
13796 Solaris 9 yacc.
13797
13798 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13799 const *, since it is now modified by stripping surrounding { }.
13800 (current_braced_code): Remove.
13801 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13802 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13803 trailing " {...}". Now of type <chars>.
13804 (grammar_declaration): Adjust to bundled tokens.
13805 (code_content): Remove; stripping is now done by add_param.
13806 (print_token_value): Print contents of bundled tokens.
13807 (token_name): New function.
13808
13809 * src/reader.h (braced_code, current_braced_code): Remove.
13810 (token_name): New decl.
13811
13812 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13813 token_type, not braced_code code_kind. All uses changed.
13814 (SC_PRE_CODE): New state, for scanning after a keyword that
13815 has (or usually has) an immediately-following braced code.
13816 (token_type): New local var, to keep track of which token type
13817 to return when scanning braced code.
13818 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13819 <INITIAL>"%parse-param", <INITIAL>"%printer",
13820 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13821 instead of returning a token type immediately.
13822 (<INITIAL>"{"): Set token type.
13823 (<SC_BRACED_CODE>"}"): Use it.
13824 (handle_action_dollar, handle_action_at): Now returns bool
13825 indicating success. Fail if ! current_rule; this prevents a core dump.
13826 (handle_symbol_code_dollar, handle_symbol_code_at):
13827 Remove; merge body into caller.
13828 (handle_dollar, handle_at): Complain in invalid contexts.
13829
13830 * NEWS, doc/bison.texinfo: Document the above.
13831 * NEWS: Fix years and program names in copyright notice.
13832
13833 2002-12-17 Paul Eggert <eggert@twinsun.com>
13834
13835 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13836 Reporting, Table of Symbols): Omit mentions of %lex-param and
13837 %parse-param from the documentation for now.
13838
13839 2002-12-15 Paul Eggert <eggert@twinsun.com>
13840
13841 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13842 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13843 lookahead symbol, and which sets yychar in parser actions) and it
13844 disagreed with the Bison documentation. Bug
13845 reported by Andrew Walrond.
13846
13847 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13848 as the caller now does that.
13849 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13850 (YYEMPTY): Parenthesize right hand side, since others use it.
13851 (yyparse): Don't assume that our generated code is the only code
13852 that sets yychar.
13853
13854 2002-12-13 Paul Eggert <eggert@twinsun.com>
13855
13856 Version 1.75d.
13857
13858 POSIX requires a "yacc" command.
13859 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13860 (MOSTLYCLEANFILES): Add yacc.
13861 (yacc): New rule.
13862 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13863 as an alias for bison y.
13864
13865 * po/LINGUAS: Add da.
13866
13867 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13868 problem with latest <getopt.h>.
13869 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13870
13871 * doc/fdl.texi: Upgrade to 1.2.
13872 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13873 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13874 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13875 gnulib.
13876 * config/install-sh: Sync with autotools.
13877
13878 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13879 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13880 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13881 locations are requested.
13882 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13883 locations are requested.
13884
13885 2002-12-12 Paul Eggert <eggert@twinsun.com>
13886
13887 Remove unportable casts and storage allocation tricks.
13888 While we're at it, remove almost all casts, since they
13889 usually aren't needed and are a sign of trouble.
13890
13891 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13892
13893 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13894 the pointer DSET returned by malloc; this isn't portable.
13895 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13896 Similarly for DERIVES.
13897 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13898 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13899 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13900
13901 * src/derives.c (derives_compute): Do not bother invoking
13902 int_of_rule_number, since rule numbers are integers.
13903
13904 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13905 rather than XMALLOC (char, N).
13906
13907 * src/files.c (filename_split): Rewrite to avoid cast.
13908
13909 * src/gram.h (symbol_number_as_item_number,
13910 item_number_as_symbol_number, rule_number_as_item_number,
13911 item_number_as_rule_number):
13912 Now inline functions rather than macros, to avoid casts.
13913 * src/state.h (state_number_as_int): Likewise.
13914 * src/tables.c (state_number_to_vector_number,
13915 symbol_number_to_vector_number): Likewise.
13916
13917 * src/gram.h (int_of_rule_number): Remove; no longer used.
13918
13919 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13920 since the resulting storage is always stored into.
13921
13922 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13923 where it's needed.
13924
13925 * src/muscle_tab.c (muscle_m4_output):
13926 Now inline. Return bool, not int.
13927 * src/state.c (state_compare): Likewise.
13928 * src/symtab.c (symbol_check_defined,
13929 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13930 hash_compare_symbol, hash_symbol):
13931 Likewise.
13932 * src/uniqstr.c (uniqstr_print): Likewise.
13933 * src/muscle_tab.c (muscle_m4_output_processor):
13934 New function, to avoid casts.
13935 * src/state.c (state_comparator, stage_hasher): Likewise.
13936 * src/symtab.c (symbol_check_defined_processor,
13937 symbol_check_alias_consistency_processor, symbol_pack_processor,
13938 symbol_translation_processor, hash_symbol_comparator,
13939 hash_symbol_hasher): Likewise.
13940 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13941 * src/muscle_tab.c (muscles_m4_output):
13942 Use new functions instead of casting old functions unportably.
13943 * src/state.c (state_hash_new): Likewise.
13944 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13945 symbols_token_translations_init):
13946 Likewise.
13947 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13948
13949 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13950 var instead of casting to long, to avoid casts.
13951 (prepare_states): Use MALLOC rather than alloca, so that we don't
13952 have to worry about alloca.
13953 * src/state.c (state_hash_lookup): Likewise.
13954
13955 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13956 local var instead of casting to unsigned char, to avoid casts.
13957
13958 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13959 STATE_ALLOC): Remove.
13960 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13961 rather than calloc, and use offsetof to avoid allocating slightly
13962 too much storage.
13963 (state_new): Initialize all members.
13964
13965 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13966
13967 * src/symtab.c (symbol_free): Remove; unused.
13968 (symbol_get): Remove cast in lhs of assignment.
13969 (symbols_do): Now static. Accept generic arguments, not
13970 hashing-related ones.
13971
13972 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13973 (symbol_processor): Remove.
13974 (symbols_do): Remove decl; now static.
13975
13976 * src/system.h (alloca): Remove; decl no longer needed.
13977 (<stddef.h>): Include, for offsetof.
13978 (<inttypes.>, <stdint.h>): Include if available.
13979 (uintptr_t): New type, if system lacks it.
13980 (CALLOC, MALLOC, REALLOC): New macros.
13981 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13982 new macros.
13983
13984 * src/tables.c (table_size): Now int, to pacify GCC.
13985 (table_grow, table_ninf_remap): Use signed table size.
13986 (save_row): Don't bother initializing locals when not needed.
13987 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13988 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13989
13990 * src/vcg.h: Correct misspellings.
13991
13992 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13993
13994
13995 * src/getargs.c (getargs): Don't assume EOF == -1.
13996
13997 2002-12-09 Paul Eggert <eggert@twinsun.com>
13998
13999 Change identifier spellings to avoid collisions with names
14000 that are reserved by POSIX.
14001
14002 Don't use names ending in _t, since POSIX reserves them.
14003 For consistency, remove _e and _s endings -- they're weren't
14004 needed to remove ambiguity. All uses changed.
14005 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14006 turn was just renamed from struniq_t.
14007 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14008 which in turn was just renamed from struniq_processor_t.
14009 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14010 in turn was renamed from hash_compare_struniq_t.
14011 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14012 (state_list): Renamed from state_list_t.
14013 * src/assoc.h (assoc): Renamed from assoc_t.
14014 * src/conflicts.c (enum conflict_resolution): Renamed from
14015 enum conflict_resolution_e.
14016 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14017 (rule_list): Renamed from rule_list_t.
14018 * src/getargs.h (enum trace): Renamed from enum trace_e.
14019 (enum report): Renamed from enum report_e.
14020 * src/gram.h (item_number): Renamed from item_number_t.
14021 (rule_number): Renamed from rule_number_t.
14022 (struct rule_s): Remove the "rule_s" part; not used.
14023 (rule): Renamed from rule_t.
14024 (rule_filter): Renamed from rule_filter_t.
14025 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14026 (goto_list): Renamed from goto_list_t.
14027 * src/lalr.h (goto_number): Renamed from goto_number_t.
14028 * src/location.h (location): Renamed from location_t.
14029 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14030 and moved here from:
14031 * src/muscle_tab.h (muscle_entry_t): here.
14032 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14033 (rule_list): Renamed from rule_list_t.
14034 * src/print_graph.c (static_graph): Renamed from graph.
14035 * src/reader.h (braced_code): Renamed from braced_code_t.
14036 Remove brace_code_e tag.
14037 * src/relation.h (relation_node): Renamed from relation_node_t.
14038 (relation_nodes): Renamed from relation_nodes_t.
14039 (relation): Renamed from relation_t.
14040 * src/state.h (state_number): Renamed from state_number_t.
14041 (struct state): Renamed from struct state_s.
14042 (state): Renamed from state_t.
14043 (transitions): Renamed from transitions_t. Unused (and
14044 misspelled) transtion_s tag removed.
14045 (errs): Renamed from errs_t. Unused errs_s tag removed.
14046 (reductions): Renamed from reductions_t. Unused tag
14047 reductions_s removed.
14048 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14049 (struct symbol_list): Renamed from struct symbol_list_s.
14050 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14051 (struct symbol): Renamed from struct symbol_s.
14052 (symbol): Renamed from symbol_t.
14053 * src/tables.c (vector_number): Renamed from vector_number_t.
14054 (action_number): Renamed from action_t.
14055 * src/tables.h (base_number): Renamed from base_t.
14056 * src/vcg.h (enum color): Renamed from enum color_e.
14057 (enum textmode): Renamed from enum textmode_e.
14058 (enum shape): Renamed from enum shape_e.
14059 (struct colorentry): Renamed from struct colorentry_s.
14060 (struct classname): Renamed from struct classname_s.
14061 (struct infoname): Renamed from struct infoname_s.
14062 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14063 (enum decision): Renamed from enum decision_e.
14064 (enum orientation): Renamed from enum orientation_e.
14065 (enum alignment): Renamed from enum alignment_e.
14066 (enum arrow_mode): Renamed from enum arrow_mode_e.
14067 (enum crossing_type): Renamed from enum crossing_type_e.
14068 (enum view): Renamed from enum view_e.
14069 (struct node): Renamed from struct node_s.
14070 (node): Renamed from node_t.
14071 (enum linestyle): Renamed from enum linestyle_e.
14072 (enum arrowstyle): Renamed from enum arrowstyle_e.
14073 (struct edge): Renamed from struct edge.
14074 (edge): Renamed from edge_t.
14075 (struct graph): Renamed from struct graph_s.
14076 (graph): Renamed from graph_t.
14077 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14078 Rename value_t -> value.
14079 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14080 value_t_as_yystype -> value_as_yystype.
14081
14082 Don't include <errno.h> in the mainstream code, since it
14083 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14084 * lib/get-errno.c, lib/get-errno.h: New files.
14085 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14086 get-errno.c.
14087 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14088 * src/output.c (output_skeleton): Likewise.
14089 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14090 instead of errno.
14091 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14092 Likewise.
14093 (handle_action_dollar, handle_action_at): Likewise.
14094 * src/system.h: Do not include <errno.h>.
14095 (TAB_EXT): Renamed from EXT_TAB.
14096 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14097
14098 Avoid str[a-z]*, since <string.h> reserves that name space.
14099 Change all instances of "struniq" in names to "uniqstr", and
14100 likewise for "STRUNIQ" and "UNIQSTR".
14101 * src/uniqstr.c: Renamed from src/struniq.c.
14102 * src/uniqstr.h: Renamed from src/struniq.h.
14103 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14104 * src/files.c (strsuffix): Remove; unused.
14105 (concat2): Renamed from stringappend. Now static.
14106 * src/files.h (strsuffix, stringappend): Remove; unused.
14107 * src/parse-gram.y (<chars>): Renamed from <string>.
14108 (<uniqstr>): Renamed from <struniq>.
14109 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14110 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14111 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14112 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14113 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14114 (N_EXPAND): Renamed from N_STRETCH.
14115
14116 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14117 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14118 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14119 Remove; unused.
14120 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14121 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14122 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14123 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14124 (BASE_MAXIMUM): Renamed from BASE_MAX.
14125 (BASE_MINIMUM): Renamed from BASE_MIN.
14126 (ACTION_MAX): Remove; unused.
14127 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14128 Unnecessary casts removed from above defines.
14129
14130
14131 Fix misspelling in names.
14132 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14133 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14134 G_NODE_ALIGNEMENT.
14135
14136
14137 * lib/timevar.c (timevar_report): Renamed from time_report,
14138 for consistency with other names.
14139 * lib/timevar.h (timevar_report): New decl.
14140 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14141
14142
14143 Sort include-file uses.
14144
14145 Reorder all include files under src to be in the order "system.h".
14146 then the ../lib include files in angle brackets (alphabetized),
14147 then the . include files in double-quotes (alphabetized). Fix
14148 dependency breakages encountered in this process, as follows:
14149 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14150 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14151 * src/state.h: Include "symtab.h".
14152
14153 2002-12-08 Paul Eggert <eggert@twinsun.com>
14154
14155 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14156 since this causes problems when __file__ contains character
14157 sequences like "@" that are treated specially by src/scan-skel.l.
14158 Instead, just use the file's basename. This fixes the bug
14159 reported by Martin Mokrejs in
14160 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14161
14162 2002-12-06 Paul Eggert <eggert@twinsun.com>
14163
14164 Add support for rules that do not have trailing semicolons, as
14165 POSIX requires. Improve the quality of locations in Bison
14166 diagnostics.
14167
14168 * src/location.c: Include <quotearg.h>.
14169 (empty_location): Now const.
14170 (location_print): New function. Follow the recommendation of the
14171 GNU Coding Standards for locations that span file boundaries.
14172 * src/location.h: Do not include <quotearg.h>; no longer needed.
14173 (boundary): New type.
14174 (location_t): Use it. This allows locations to span file boundaries.
14175 All member uses changed: file -> start.file or end.file (as needed),
14176 first_line -> start.line, first_column -> start.column,
14177 last_line -> end.line, last_column -> end.column.
14178 (equal_boundaries): New function.
14179 (LOCATION_RESET, LOCATION_STEP): Remove.
14180 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14181 (empty_location): Now const.
14182 (location_print): New decl.
14183 * src/parse-gram.y (lloc_default): New function, which handles
14184 empty locations more accurately.
14185 (YYLLOC_DEFAULT): Use it.
14186 (%token COLON): Remove.
14187 (%token ID_COLON): New token.
14188 (rules): Use it.
14189 (declarations, rules): Remove trailing semicolon.
14190 (declaration, rules_or_grammar_declaration):
14191 Allow empty (";") declaration.
14192 (symbol_def): Remove empty actions; no longer needed.
14193 (rules_or_grammar_declaration): Remove trailing semicolon.
14194 (semi_colon.opt): Remove.
14195 * src/reader.h: Include location.h.
14196 (scanner_cursor): New decl.
14197 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14198 rolling our own.
14199 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14200 of *loc.
14201 (STEP): Remove. No longer needed, now that adjust_location does
14202 the work. All uses removed.
14203 (scanner_cursor): New var.
14204 (adjust_location): Renamed from extend_location. It now sets
14205 *loc and adjusts the scanner cursor. All uses changed.
14206 Don't bother testing for CR.
14207 (handle_syncline): Remove location arg; now updates scanner cursor.
14208 All callers changed.
14209 (unexpected_end_of_file): Now accepts start boundary of token or
14210 comment, not location. All callers changed. Update scanner cursor,
14211 not the location.
14212 (SC_AFTER_IDENTIFIER): New state.
14213 (context_state): Renamed from c_context. All uses changed.
14214 (id_loc, code_start, token_start): New local vars.
14215 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14216 processing of Yacc white space and equivalents here.
14217 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14218 instead of returning ID immediately, since we need to search for
14219 a subsequent colon.
14220 (<INITIAL>"'", "\""): Save token_start.
14221 (<INITIAL>"%{", "{", "%%"): Save code_start.
14222 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14223 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14224 BEGIN context_state at end, not INITIAL.
14225 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14226 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14227 Return correct token start.
14228 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14229 the start of a character, string or multiline comment is found.
14230 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14231 Reduction): Adjust reported locations to match the more-precise
14232 results now expected.
14233 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14234 * tests/reduce.at (Useless Rules, Reduced Automaton,
14235 Underivable Rules): Likewise.
14236 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14237 or "|"' now that so many other tokens are allowed by the new grammar.
14238
14239 * src/complain.h (current_file): Remove duplicate decl;
14240 current_file is now owned by files.h.
14241 * src/complain.c, src/scan-gram.l: Include files.h.
14242
14243 2002-12-06 Paul Eggert <eggert@twinsun.com>
14244
14245 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14246 promotes to int; it might be unsigned int.
14247 * data/yacc.c (yy_reduce_print): Likewise.
14248
14249 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14250 be #defined in the prologue, not in the Bison declarations.
14251 This fixes Debian Bug 102878, reported by Shaul Karl.
14252
14253 2002-12-02 Paul Eggert <eggert@twinsun.com>
14254
14255 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14256 * lib/strtoul.c: New file, from gnulib.
14257 This fixes a porting bug reported by Peter Klein in
14258 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14259
14260 2002-11-30 Paul Eggert <eggert@twinsun.com>
14261
14262 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14263 and put only a forward declaration in the prologue. This is for
14264 consistency with the other scanner helper functions.
14265
14266 Type clashes now generate warnings, not errors, since it
14267 appears that POSIX may allow some grammars with type clashes.
14268 * src/reader.c (grammar_current_rule_check): Warn about
14269 type clashes instead of complaining.
14270 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14271
14272 Add Yacc library, since POSIX requires it.
14273 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14274 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14275 * lib/main.c, lib/yyerror.c: New files.
14276
14277 gram_error can be static; it need not be extern.
14278 * src/reader.h (gram_error): Remove decl.
14279 * src/parse-gram.y (gram_error): Now static. Add static decl.
14280 (print_token_value): Omit parameter names from forward decl,
14281 for consistency.
14282
14283 2002-11-29 Paul Eggert <eggert@twinsun.com>
14284
14285 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14286 be declared before being used. E.g., one should typically
14287 declare them in the prologue. Use GNU coding style in examples.
14288 Put "const" consistently after the type it modifies. Mention
14289 that C99 supports "inline". Mention that yyerror traditionally
14290 returns "int".
14291
14292 %parse-param and %lex-param now take just one argument, the
14293 declaration; the argument name is deduced from the declaration.
14294
14295 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14296 Reporting, Table of Symbols): Document this.
14297 * src/parse-gram.y (add_param): New function.
14298 (COMMA): Remove.
14299 (declaration): Implement new rule for %parse-param and %lex-param.
14300 * src/scan-gram.l: "," now elicits a warning, rather than being
14301 a token; this is more compatible with byacc.
14302 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14303
14304 2002-11-27 Paul Eggert <eggert@twinsun.com>
14305
14306 Rename identifiers to avoid real and potential collisions.
14307
14308 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14309 to avoid collision with lex macro described by Bruce Lilly in
14310 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14311 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14312 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14313 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14314 All uses changed.
14315 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14316 The name "yycontrol" violates the name space rules, and this stuff
14317 wasn't being used anyway.
14318 (input): Remove action; this stuff wasn't being used.
14319 (gram_error): Rename local variable yylloc -> loc.
14320 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14321 (YY_DECL): Don't use "yy" at start of local variables.
14322 All uses changed, e.g., yylloc -> loc.
14323 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14324 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14325 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14326 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14327
14328 * src/parse-gram.y (gram_error): loc is now const *.
14329 * src/reader.h (gram_error): Likewise.
14330
14331 2002-11-24 Paul Eggert <eggert@twinsun.com>
14332
14333 Version 1.75c.
14334
14335 * tests/actions.at (Actions after errors): Use an output format
14336 more similar to that of the Printers and Destructors test.
14337 Test the position of the ';' token too.
14338 (Printers and Destructors): Likewise.
14339 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14340 unnecessarily alarming people when the test fails.
14341
14342 * data/yacc.c (yyerrlab1): Move this label down, so that the
14343 parser does not discard the lookahead token if the user code
14344 invokes YYERROR. This change is required for POSIX conformance.
14345
14346 * lib/error.c: Sync with gnulib.
14347
14348 2002-11-22 Paul Eggert <eggert@twinsun.com>
14349
14350 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14351 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14352 * lib/xmalloc.c: Likewise.
14353
14354 2002-11-20 Paul Eggert <eggert@twinsun.com>
14355
14356 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14357
14358 2002-11-20 Paul Eggert <eggert@twinsun.com>
14359
14360 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14361 should use `if (! x) abort ();' rather than `assert (x);', and
14362 anyway it's one less thing to worry about configuring.
14363
14364 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14365 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14366 and replace all instances of assert with abort.
14367 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14368 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14369
14370 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14371 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14372 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14373 hash_find_entry, hash_rehash, hash_insert): Likewise.
14374 * src/conflicts.c (resolve_sr_conflict): Likewise.
14375 * src/lalr.c (set_goto_map, map_goto): Likewise.
14376 * src/nullable.c (nullable_compute): Likewise.
14377 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14378 * src/reader.c (packgram, reader): Likewise.
14379 * src/state.c (state_new, state_free, state_transitions_set,
14380 state_reduction_find): Likewise.
14381 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14382 symbol_pack): Likewise.
14383 * src/tables.c (conflict_row, pack_vector): Likewise.
14384 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14385 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14386 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14387 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14388
14389 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14390 (ARGMATCH_CONSTRAINT): New macro.
14391 (ARGMATCH_ASSERT): Use it.
14392
14393 * src/system.h (verify): New macro.
14394 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14395 rather than assert.
14396 * src/tables.c (tables_generate): Likewise.
14397
14398 * src/struniq.c (struniq_assert): Now returns void, and aborts
14399 if the assertion is false.
14400 (struniq_assert_p): Remove.
14401 * src/struniq.h: Likewise.
14402
14403 2002-11-18 Paul Eggert <eggert@twinsun.com>
14404
14405 * data/glr.c (yygetLRActions): Replace `yyindex' with
14406 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14407 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14408 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14409
14410 2002-11-18 Akim Demaille <akim@epita.fr>
14411
14412 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14413 space.
14414 From Tim Van Holder.
14415
14416 2002-11-17 Paul Eggert <eggert@twinsun.com>
14417
14418 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14419 to "SyntaxError" for consistency with my 2002-11-15 change.
14420
14421 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14422 not define to {}, since this breaks the common use of `YYDPRINTF
14423 ((...));' if a single statement is desired (e.g. before `else').
14424 Work around GCC warnings by surrounding corresponding calls with
14425 {} if needed.
14426 (yyhasResolvedValue): Remove unused function.
14427 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14428 loop body.
14429 (yyreportSyntaxError): Renamed from yyreportParseError.
14430 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14431 All uses changed.
14432 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14433 extern when possible. Remove unused initializations.
14434
14435 2002-11-16 Akim Demaille <akim@epita.fr>
14436
14437 Augment the similarity between GLR and LALR traces.
14438
14439 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14440 (YY_REDUCE_PRINT): New.
14441 (yyparse): Use them.
14442 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14443 YYDPRINT here.
14444 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14445 state reached after the reduction/recovery, since...
14446 (yyparse, yyprocessOneStack): Report the state we are entering in.
14447
14448 2002-11-16 Akim Demaille <akim@epita.fr>
14449
14450 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14451 Add support for --trace=skeleton.
14452 * src/scan-skel.l: %option debug.
14453 Scan strings of non-@ or \n instead of character by character.
14454 (scan_skel): Handle trace_skeleton.
14455 (QPUTS): New.
14456 (@output_parser_name@, @output_header_name@): ``Restore'' their
14457 support (used to be M4 macros).
14458 * data/yacc.c: Quote larger chunks, a la glr.c.
14459 * data/lalr1.cc: Likewise.
14460 The header guards are no longer available, so use some other
14461 string than `YYLSP_NEEDED'.
14462
14463 2002-11-16 Akim Demaille <akim@epita.fr>
14464
14465 Make the ``Printers and Destructors'' test more verbose, taking
14466 `yacc.c''s behavior as (possibly wrong) reference.
14467
14468 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14469 instead of fprint on stdout.
14470 Set and report the last_line of the symbols.
14471 Consistently display values and locations.
14472
14473 2002-11-16 Paul Eggert <eggert@twinsun.com>
14474
14475 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14476
14477 2002-11-15 Paul Eggert <eggert@twinsun.com>
14478
14479 * tests/actions.at (Actions after errors): New test case.
14480
14481 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14482 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14483 tests/action.at, tests/calc.at, tests/conflicts.at,
14484 tests/cxx-type.at, tests/regression.at:
14485 "parse error" -> "syntax error" for POSIX compatibility.
14486 "parsing stack overflow..." -> "parser stack overflow" so
14487 that code matches Bison documentation.
14488
14489 2002-11-15 Akim Demaille <akim@epita.fr>
14490
14491 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14492 take two BRACED_CODE, not two string_content.
14493 Free the scanner's obstack when we are done.
14494 (code_content): New.
14495 * tests/calc.at: Adjust.
14496 * doc/bison.texinfo: Adjust.
14497 Also, make sure to include the `,' for these declarations.
14498
14499 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14500
14501 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14502 definition; avoids potential autoreconf problems.
14503
14504 2002-11-15 Akim Demaille <akim@epita.fr>
14505
14506 Always check the value returned by yyparse.
14507
14508 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14509 returned by yyparse.
14510 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14511 Adjust calls.
14512 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14513 returned by yyparse.
14514
14515 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14516
14517 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14518 on input.at test.
14519
14520 2002-11-14 Paul Eggert <eggert@twinsun.com>
14521
14522 * src/output.c (output_skeleton): Call xfopen instead of
14523 duplicating xfopen's body.
14524
14525 Fix bugs reported by Nelson H. F. Beebe in
14526 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14527
14528 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14529 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14530 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14531 file twice in the grammar, as an extra check.
14532
14533 * tests/input.at (Torturing the Scanner): Surround the
14534 backslash-newline tests with "#if 0", to make it less likely that
14535 we'll run into compiler bugs. Bring back solitary \ inside
14536 comment, but add a closing comment to work around HP C bug. Don't
14537 test backslash-newline in C character constant.
14538
14539 2002-11-14 Akim Demaille <akim@epita.fr>
14540
14541 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14542 status of the compiler.
14543 Calling `exit 1' is no longer needed.
14544 Reported by Nelson H. F. Beebe.
14545
14546 2002-11-14 Akim Demaille <akim@epita.fr>
14547
14548 * tests/atlocal.in (CPPFLAGS): We have config.h.
14549 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14550 New.
14551 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14552 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14553 * tests/regression.at, tests/torture.at: Use them for all the
14554 grammars that are to be compiled.
14555 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14556 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14557 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14558
14559 2002-11-14 Akim Demaille <akim@epita.fr>
14560
14561 * doc/bison.texinfo: Various formatting changes (alignments in
14562 samples, additional @group/@end group, GCS in samples.
14563 Use @deffn instead of simple @table to define the directives,
14564 macros, variables etc.
14565
14566 2002-11-13 Paul Eggert <eggert@twinsun.com>
14567
14568 Fix some bugs reported by Albert Chin-A-Young in
14569 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14570
14571 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14572 -o c"; the HP C compiler chatters during compilation.
14573 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14574 * tests/headers.at (export YYLTYPE): Likewise.
14575
14576 * tests/input.at (Torturing the Scanner): Remove lines containing
14577 solitary backslashes, as they tickle a bug in the HP C compiler.
14578
14579 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14580 comments, since they're not portable. Use GNU coding style.
14581
14582 2002-11-13 Akim Demaille <akim@epita.fr>
14583
14584 * data/yacc.c: Leave bigger chunks of quoted text.
14585 (YYDSYMPRINTF): New.
14586 Use it to report symbol activities.
14587 * data/glr.c (YYDSYMPRINTF): New.
14588 Use it.
14589
14590 2002-11-12 Paul Eggert <eggert@twinsun.com>
14591
14592 Version 1.75b.
14593
14594 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14595 (yyglrReduce): Return yyok, not 0.
14596 This should avoid the enumerated-type warnings reported
14597 by Nelson H. F. Beebe in
14598 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14599
14600 * lib/bbitset.h (BITSET_INLINE): Remove.
14601 * lib/bitset.h [! BITSET_INLINE]: Remove.
14602 (bitset_set, bitset_reset, bitset_test): Rename local vars
14603 to avoid shadowing warnings by GCC.
14604
14605 * data/glr.c (inline): Remove #define. It's the user's
14606 responsibility to #define it away, just like 'const'.
14607 This fixes one of the bugs reported by Nelson H. F. Beebe in
14608 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14609
14610 * Makefile.maint (po-check): Scan .l and .y files instead of the
14611 .c and the .h files that they generate. This fixes the bug
14612 reported by Tim Van Holder in:
14613 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14614 Look for N_ as well as for _. Try to avoid matching #define for
14615 N_ and _.
14616 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14617 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14618 * src/scan-gram.l: Revamp regular expressions so that " and '
14619 do not confuse xgettext.
14620
14621 * src/struniq.h (struniq_new): Do not declare the return type
14622 to be 'const'; this violates the C standard.
14623 * src/struniq.c (struniq_new): Likewise.
14624
14625 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14626
14627 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14628 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14629 linker.
14630
14631 2002-11-12 Akim Demaille <akim@epita.fr>
14632
14633 * Makefile.maint: Sync with Autoconf:
14634 (local_updates): New.
14635
14636 2002-11-12 Akim Demaille <akim@epita.fr>
14637
14638 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14639
14640 2002-11-12 Akim Demaille <akim@epita.fr>
14641
14642 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14643 locations.
14644
14645 2002-11-12 Akim Demaille <akim@epita.fr>
14646
14647 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14648 not yyvalue.
14649
14650 2002-11-12 Akim Demaille <akim@epita.fr>
14651
14652 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14653 Use it to test the GLR parser.
14654
14655 2002-11-12 Akim Demaille <akim@epita.fr>
14656
14657 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14658 defines it.
14659 * data/glr.c (yystos): New.
14660 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14661 (YYDSYMPRINT): New.
14662 (yyval): Don't define it, it is handled via M4.
14663 (yyrecoverParseError): Free verbosely the discarded symbols.
14664 * data/yacc.c (yysymprint): Remove, rather...
14665 (b4_yysymprint_generate): invoke.
14666 * data/c.m4 (b4_yysymprint_generate): New.
14667 Accept pointers as arguments, as opposed to the version from
14668 yacc.c.
14669 (b4_yydestruct_generate): Likewise.
14670 * tests/cations.at (Printers and Destructors): Use Bison directives
14671 instead of CPP macros.
14672 Don't rely on internal details.
14673
14674 2002-11-12 Akim Demaille <akim@epita.fr>
14675
14676 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14677 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14678 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14679 it against YYEMPTY and so forth), work on yytoken (i.e., set
14680 it to YYEMPTY etc.).
14681 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14682 (b4_symbol_actions): Remove.
14683 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14684 for 0, end-of-input.
14685
14686 2002-11-12 Akim Demaille <akim@epita.fr>
14687
14688 * doc/bison.texinfo (Destructor Decl): New.
14689
14690 2002-11-12 Akim Demaille <akim@epita.fr>
14691
14692 * src/tables.c (tables_generate): Use free for pointers that
14693 cannot be NULL, not XFREE.
14694 (pack_vector): Use assert, not fatal, for bound violations.
14695 * src/state.c (state_new): Likewise.
14696 * src/reader.c (reader): Likewise.
14697 * src/lalr.c (set_goto_map): Likewise.
14698 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14699 the file name.
14700
14701 2002-11-12 Akim Demaille <akim@epita.fr>
14702
14703 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14704 Restore.
14705 * src/scan-gram.l (last_string): Is global to the file, not to
14706 yylex.
14707 * src/parse-gram.y (input): Don't append the epilogue here,
14708 (epilogue.opt): do it here, and free the scanner's obstack.
14709 * src/reader.c (epilogue_set): Rename as...
14710 (epilogue_augment): this.
14711 * data/c.m4 (b4_epilogue): Defaults to empty.
14712
14713 2002-11-12 Akim Demaille <akim@epita.fr>
14714
14715 * src/getargs.c (long_options): Remove duplicates.
14716 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14717 Remove.
14718 * doc/bison.rnh: Remove.
14719 * doc/bison.texinfo (VMS Invocation): Remove.
14720
14721 2002-11-12 Akim Demaille <akim@epita.fr>
14722
14723 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14724 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14725
14726 Use struniq for symbols.
14727
14728 * src/symtab.h (symbol_t): The tag member is a struniq.
14729 (symbol_type_set): Adjust.
14730 * src/symtab.c (symbol_new): Takes a struniq.
14731 (symbol_free): Don't free the tag member.
14732 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14733 (hash_compare_symbol, hash_symbol): these.
14734 Use the fact that tags as struniqs.
14735 (symbol_get): Use struniq_new.
14736 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14737 Returns a strniq.
14738 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14739 and type members are struniqs.
14740 * src/reader.c (get_merge_function)
14741 (grammar_current_rule_merge_set): Adjust.
14742 (TYPE, current_type): Are struniq.
14743
14744 Use struniq for file names.
14745
14746 * src/files.h, src/files.c (infile): Split into...
14747 (grammar_file, current_file): these.
14748 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14749 * src/reduce.c (reduce_print): Likewise.
14750 * src/getargs.c (getargs): Likewise.
14751 * src/complain.h, src/complain.c: Likewise.
14752 * src/main.c (main): Call struniqs_new early enough to use it for
14753 file names.
14754 Don't free the input file name.
14755
14756 2002-11-12 Akim Demaille <akim@epita.fr>
14757
14758 * src/symtab.c (symbol_free): Remove dead deactivated code:
14759 type_name are properly removed.
14760 Don't use XFREE to free items that cannot be NULL.
14761 * src/struniq.h, src/struniq.c: New.
14762 * src/main.c (main): Initialize/free struniqs.
14763 * src/parse-gram.y (%union): Add astruniq member.
14764 (yyprint): Adjust.
14765 * src/scan-gram.l (<{tag}>): Return a struniq.
14766 Free the obstack bit that used to store it.
14767 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14768
14769 2002-11-11 Paul Eggert <eggert@twinsun.com>
14770
14771 Revamp to fix many (but not all) of the C- and M4-related quoting
14772 problems. Among other things, this fixes the Bison bug reported
14773 by Jan Hubicka when processing the Bash grammar; see:
14774 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14775
14776 Use new @ escapes consistently. Represent brackets with @{ and @}
14777 rather than @<:@ and @:>@, since this works a bit better with dumb
14778 editors like vi. Represent @ with @@, since @ is now consistently
14779 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14780 __ofile__, to avoid unexpected expansions. Similarly, use @output
14781 rather than #output.
14782
14783 * data/c.m4 (b4_copyright): Omit file name from comment, since
14784 the file name could contain "*/".
14785 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14786 be quoted. All uses changed.
14787
14788 * data/glr.c: Use new @ escapes consistently.
14789 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14790 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14791 Remove, since they couldn't handle arbitrary characters in file
14792 names.
14793 * data/lalr1.cc: Likewise.
14794 * data/yacc.c: Likewise.
14795
14796 * src/files.c (output_infix): Remove; all uses removed.
14797 * src/files.h: Likewise.
14798
14799 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14800 mishandled funny characters in file names, and anyway it isn't
14801 needed any more.
14802 * data/yacc.c: Likewise.
14803 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14804
14805 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14806 * data/yacc.c: Likewise.
14807
14808 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14809 strings now.
14810 (muscle_init): Quote filename as a C string.
14811 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14812 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14813 * src/output.c (escaped_file_name_output): New function.
14814 (prepare_symbols): Quote tokens for M4.
14815 (prepare): Don't insert output_infix, output_prefix,
14816 output_parser_name, output_header_name; this is now down by scan-skel.
14817 Insert skeleton as a C string.
14818
14819 * src/output.c (user_actions_output, symbol_destructors_output,
14820 symbol_printers_output): Quote filenames for C and M4.
14821 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14822
14823 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14824 escapes other than \\ and \'; this simplifies the code.
14825 (<SC_STRING>): Likewise, for \\ and \".
14826 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14827 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14828 Use new escapes @{ and @} for [ and ].
14829
14830 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14831 them with auto vars.
14832 Switch to new escape scheme, where @ is the escape character uniformly.
14833 Abort if a stray escape character is found. Avoid unbounded input
14834 buffer when parsing non-escaped text.
14835
14836 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14837 __oline__, #output, $@, and @{ do not have unintended meanings.
14838
14839 2002-11-09 Paul Eggert <eggert@twinsun.com>
14840
14841 Fix the test failure due to GCC warnings described in
14842 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14843 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14844 evaluate to 0 if it's impossible for NINF to be in the respective
14845 table.
14846 (yygetLRActions, yyrecoverParseError): Use them.
14847
14848 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14849 counted in the token inserted at end of file. Now takes
14850 location_t *, not location_t, so that the location can be
14851 adjusted. All uses changed.
14852
14853 * tests/regression.at (Invalid inputs): Adjust wording in
14854 diagnostic to match the new behavior.
14855
14856 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14857 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14858 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14859 abort ();'. This reduces the runtime of the "Many lookaheads"
14860 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14861 GCC 3.2.
14862
14863 2002-11-07 Paul Eggert <eggert@twinsun.com>
14864
14865 * src/parse-gram.y (CHARACTER): Remove unused token.
14866 All uses removed.
14867
14868 * src/scan-gram.l: Remove stack option. We no longer use the
14869 stack, since the stack was never deeper than 1; instead, use the
14870 new auto var c_context to record the stacked value.
14871
14872 Remove nounput option. At an unexpected end of file, we now unput
14873 the minimal input necessary to end cleanly; this simplifies the
14874 code.
14875
14876 Avoid unbounded token sizes where this is easy.
14877
14878 (unexpected_end_of_file): New function.
14879 Use it to systematize the error message on unexpected EOF.
14880 (last-string): Now auto, not static.
14881 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14882 (scanner_last_string_free): Remove; not used.
14883 (percent_percent_count): Move decl to just before use.
14884 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14885 not the (never otherwised-used) CHARACTER.
14886
14887 2002-11-07 Akim Demaille <akim@epita.fr>
14888
14889 Let yyerror always receive the msg as last argument, so that
14890 yyerror can be variadic.
14891
14892 * data/yacc.c (b4_yyerror_args): New.
14893 Use it when calling yyerror.
14894 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14895 Use it when calling yyerror.
14896 * doc/bison.texinfo (Error Reporting): Adjust.
14897 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14898 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14899
14900 2002-11-06 Akim Demaille <akim@epita.fr>
14901
14902 #line should have quoted strings.
14903 Ideally, this should be done by m4_quotearg.
14904
14905 * src/scan-skel.l: Include quotearg.h.
14906 Quote __ofile__.
14907 * src/output.c (symbol_printers_output)
14908 (symbol_destructors_output): Quote the file name.
14909
14910 2002-11-06 Akim Demaille <akim@epita.fr>
14911
14912 * tests/regression.at (Invalid inputs): Adjust to the recent
14913 messages.
14914
14915 2002-11-06 Akim Demaille <akim@epita.fr>
14916
14917 Restore --no-lines.
14918 Reported by Jim Kent.
14919
14920 * data/c.m4 (b4_syncline): New.
14921 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14922 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14923 * src/output.c (user_actions_output): Likewise.
14924 (prepare): Define 'b4_synclines_flag'.
14925 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14926
14927 2002-11-06 Akim Demaille <akim@epita.fr>
14928
14929 * src/main.c (main): Free `infile'.
14930 * src/scan-gram.l (handle_syncline): New.
14931 Recognize `#line'.
14932 * src/output.c (user_actions_output, symbol_destructors_output)
14933 (symbol_printers_output): Use the location's file name, not
14934 infile.
14935 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14936
14937 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14938
14939 * src/tables.c (matching_state): Don't allow states to match if
14940 either has GLR conflict entries.
14941
14942 2002-11-05 Paul Eggert <eggert@twinsun.com>
14943
14944 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14945 "integer out of range" rather than "invalid value".
14946 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14947 accordingly.
14948
14949 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14950 Also, remove one static variable in the scanner.
14951
14952 * src/scan-gram.l (braces_level): Now auto, not static.
14953 Initialize to zero if the compiler is being picky.
14954 (INITIAL): Clear braces_level instead of incrementing it.
14955 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14956 as POSIX 1003.1-2001 requires.
14957 * src/system.h (IF_LINT): New macro, taken from coreutils.
14958 * configure.ac: Define "lint" if --enable-gcc-warnings.
14959
14960 2002-11-05 Akim Demaille <akim@epita.fr>
14961
14962 * src/scan-gram.l: When it starts with `%', complain about the
14963 whole directive, not just that `invalid character: %'.
14964
14965 2002-11-04 Akim Demaille <akim@epita.fr>
14966
14967 * Makefile.maint: Update from Autoconf.
14968 (update, cvs-update, po-update, do-po-update): New.
14969
14970 2002-11-04 Akim Demaille <akim@epita.fr>
14971
14972 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14973 and yyerror.
14974 Have yyerror `use' its arguments.
14975 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14976 returns true when location & yacc & pure & parse-param.
14977 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14978
14979 2002-11-04 Akim Demaille <akim@epita.fr>
14980
14981 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14982 clashes.
14983 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14984 font-lock-mode.
14985 Use complain_at.
14986 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14987 slot 0.
14988
14989 2002-11-03 Paul Eggert <eggert@twinsun.com>
14990
14991 * src/reader.c (get_merge_function, grammar_current_rule_check):
14992 Use consistent diagnostics for reporting type name clashes.
14993 Quote the types with <>, for consistency with Yacc.
14994 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14995
14996 2002-11-03 Akim Demaille <akim@epita.fr>
14997
14998 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14999 New.
15000 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15001 (b4_parse_param): Remove.
15002 Use b4_identification.
15003 Propagate b4_pure_args where needed to pass them to yyerror.
15004 * data/glr.m4 (b4_parse_param): Remove.
15005 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15006 (b4_lpure_formals): New.
15007 Use b4_identification.
15008 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15009 b4_user_formals and b4_user_args.
15010 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15011 (yyreportAmbiguity): When using a pure parser, also need
15012 the location, and the parse-params.
15013 Adjust callers.
15014 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15015 When using a pure parser, also need the parse-params.
15016 Adjust callers.
15017 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15018 (%pure-parser + %parse-param) LALR and GLR parsers.
15019 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15020 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15021 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15022 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15023 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15024 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15025 * doc/bison.texinfo: Untabify the whole file.
15026 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15027 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15028 (Error Reporting): Adjust to these new directives.
15029 Document %error-verbose, deprecate YYERROR_VERBOSE.
15030
15031 2002-11-03 Akim Demaille <akim@epita.fr>
15032
15033 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15034 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15035 command line options.
15036 * tests/cxx-type.at: Formatting changes.
15037
15038 2002-11-03 Paul Eggert <eggert@twinsun.com>
15039
15040 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15041 to count columns correctly, and to check for invalid inputs.
15042
15043 Use mbsnwidth to count columns correctly. Account for tabs, too.
15044 Include mbswidth.h.
15045 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15046 (extend_location): New function.
15047 (YY_LINES): Remove.
15048
15049 Handle CRLF in C code rather than in Lex code.
15050 (YY_INPUT): New macro.
15051 (no_cr_read): New function.
15052
15053 Scan UCNs, even though we don't fully handle them yet.
15054 (convert_ucn_to_byte): New function.
15055
15056 Handle backslash-newline correctly in C code.
15057 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15058 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15059 all uses changed.
15060 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15061 Use {splice} wherever C allows backslash-newline.
15062 YY_STEP after space, newline, vertical-tab.
15063 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15064
15065 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15066
15067 ({int}, handle_action_dollar, handle_action_at): Check for integer
15068 overflow.
15069
15070 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15071
15072 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15073 as well as \000. Check for UCHAR_MAX, not 255.
15074 Allow \x with an arbitrary positive number of digits, as in C.
15075 Check for overflow here.
15076 Allow \? and UCNs, for compatibility with C.
15077
15078 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15079 with quote slot used by complain_at.
15080
15081 * tests/input.at: Add tests for backslash-newline, m4 quotes
15082 in symbols, long literals, and funny escapes in strings.
15083
15084 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15085 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15086 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15087 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15088 * m4/mbswidth.m4: New file, from GNU coreutils.
15089
15090 * doc/bison.texinfo (Grammar Outline): Document // comments.
15091 (Symbols): Document that trigraphs have no special meaning in Bison,
15092 nor is backslash-newline allowed.
15093 (Actions): Document that trigraphs have no special meaning.
15094
15095 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15096 no longer used.
15097
15098 2002-11-02 Paul Eggert <eggert@twinsun.com>
15099
15100 * src/reader.c: Don't include quote.h; not needed.
15101 (get_merge_function): Reword warning to be consistent with
15102 type clash diagnostic in grammar_current_rule_check.
15103
15104 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15105 bug in trigraph handling.
15106
15107 * src/output.c (prepare_symbols): When printing token names,
15108 escape "[" as "@<:@" and likewise for "]".
15109
15110 * src/system.h (errno): Remove declaration, as we are now
15111 assuming C89 or better, and C89 guarantees errno.
15112
15113 2002-10-30 Paul Eggert <eggert@twinsun.com>
15114
15115 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15116 Check for close failures.
15117 * src/files.h (xfclose): Return void, not int, since it always
15118 returned zero.
15119 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15120 indicates one.
15121 * src/output.c (output_skeleton): Use xfclose rather than fclose
15122 and ferror. xfclose now checks ferror.
15123
15124 * data/glr.c (YYLEFTMOST_STATE): Remove.
15125 (yyreportTree): Use a stack-based leftmost state. This avoids
15126 our continuing battles with bogus warnings about initializers.
15127
15128 2002-10-30 Akim Demaille <akim@epita.fr>
15129
15130 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15131 #if.
15132
15133 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15134
15135 * tests/glr-regr1.at: New test for reported regressions.
15136 * tests/testsuite.at: Add glr-regr1.at test.
15137 * tests/Makefile.am: Add glr-regr1.at test.
15138
15139 2002-10-24 Paul Eggert <eggert@twinsun.com>
15140
15141 Version 1.75a.
15142
15143 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15144 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15145 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15146 Don't assume strdup exists; POSIX says its an XSI extension.
15147 Check for buffer overflow on input.
15148
15149 2002-10-24 Akim Demaille <akim@epita.fr>
15150
15151 * src/output.c (output_skeleton): Don't disable M4sugar comments
15152 too soon: it results in comments being expanded.
15153 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15154 first output.
15155
15156 2002-10-24 Akim Demaille <akim@epita.fr>
15157
15158 * data/yacc.c (m4_int_type): New.
15159 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15160 char' as only yacc.c wants K&R portability.
15161 * data/glr.c (yysigned_char): Remove.
15162 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15163 Reported by Quoc Peyrot.
15164
15165 2002-10-23 Paul Eggert <eggert@twinsun.com>
15166
15167 * src/main.c (main): With --trace=time, report times even if a
15168 non-fatal error occurs. Formerly, the times were reported in some
15169 such cases but not in others.
15170 * src/reader.c (reader): Just return if a complaint has been issued,
15171 instead of exiting, so that 'main' can report times.
15172
15173 2002-10-22 Akim Demaille <akim@epita.fr>
15174
15175 * src/system.h: Include sys/types.
15176 Reported by Bert Deknuydt.
15177
15178 2002-10-23 Paul Eggert <eggert@twinsun.com>
15179
15180 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15181 Suggested by Art Haas.
15182
15183 2002-10-22 Paul Eggert <eggert@twinsun.com>
15184
15185 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15186 decl; not needed any more.
15187 * src/main.c (main): Use return to exit, undoing yesterday's change.
15188 The last OS that we could find where this wouldn't work is
15189 SunOS 3.5, and that's too old to worry about now.
15190
15191 * data/glr.c (struct yyltype): Define members even when not
15192 doing locations. This is more consistent with yacc.c, and it
15193 works around the following bug reports:
15194 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15195 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15196
15197 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15198 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15199 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15200
15201 2002-10-22 Akim Demaille <akim@epita.fr>
15202
15203 * data/README: New.
15204
15205 2002-10-21 Paul Eggert <eggert@twinsun.com>
15206
15207 Be consistent about 'bool'; the old code used an enum in one
15208 module and an int in another, and this violates the C standard.
15209 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15210 * configure.ac (AC_HEADER_STDBOOL): Add.
15211 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15212 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15213 * src/symtab.c (hash_compare_symbol_t): Likewise.
15214 * src/system.h (bool, false, true): Use a definition consistent
15215 with ../lib/hash.c. All uses changed.
15216
15217 * src/complain.c (warning_issued): Renamed from warn_message_count,
15218 so that we needn't worry about integer overflow (!).
15219 Now of type bool. All uses changed.
15220 (complaint_issued): Renamed from complain_message_count; likewise.
15221
15222 * src/main.c (main): Use exit to exit with failure.
15223
15224 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15225 rather than 1 and 0.
15226 * src/main.c (main): Likewise.
15227 * src/getargs.c (getargs): Likewise.
15228 * src/reader.c (reader): Likewise.
15229
15230 * src/getarg.c (getargs): Remove duplicate code for
15231 "Try `bison --help'".
15232
15233 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15234 What was that "2" for?
15235
15236 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15237 * src/getargs.c (usage): Likewise.
15238
15239 * src/getargs.c (getargs): When there are too few operands, report
15240 the last one. When there are too many, report the first extra
15241 one. This is how diffutils does it.
15242
15243 2002-10-20 Paul Eggert <eggert@twinsun.com>
15244
15245 Remove K&R vestiges.
15246 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15247 * src/complain.c (VA_START): Remove. Assume prototypes.
15248 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15249 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15250 fatal): Assume prototypes.
15251 * src/complain.h: Assume prototypes.
15252 * src/system.h (PARAMS): Remove.
15253 Include <limits.h> unconditionally, since it's guaranteeed even
15254 for a freestanding C89 compiler.
15255 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15256 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15257
15258 2002-10-20 Akim Demaille <akim@epita.fr>
15259
15260 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15261 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15262 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15263 (yyresolveStates, yyresolveAction, yyresolveStack)
15264 (yyprocessOneStack): Use them.
15265 (yy_reduce_print): New.
15266 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15267
15268 2002-10-20 Akim Demaille <akim@epita.fr>
15269
15270 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15271 arguments and output `void'.
15272 (b4_c_function): Rename as...
15273 (b4_c_function_def): this.
15274 (b4_c_function_decl, b4_c_ansi_function_def)
15275 (b4_c_ansi_function_decl): New.
15276 Change the interpretation of the arguments: before `int, foo', now
15277 `int foo, foo'.
15278 * data/yacc.c (yyparse): Prototype and define thanks to these.
15279 Adjust b4_c_function_def uses.
15280 * data/glr.c (yyparse): Likewise, but ANSI only.
15281
15282 2002-10-20 Akim Demaille <akim@epita.fr>
15283
15284 * src/output.c (prepare): Move the definition of `tokens_number',
15285 `nterms_number', `undef_token_number', `user_token_number_max'
15286 to...
15287 (prepare_tokens): Here.
15288 (prepare_tokens): Rename as...
15289 (prepare_symbols): this.
15290 (prepare): Move the definition of `rules_number' to...
15291 (prepare_rules): here.
15292 (prepare): Move the definition of `last', `final_state_number',
15293 `states_number' to...
15294 (prepare_states): here.
15295 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15296
15297 2002-10-20 Akim Demaille <akim@epita.fr>
15298
15299 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15300
15301 2002-10-20 Akim Demaille <akim@epita.fr>
15302
15303 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15304 * data/c.m4: here.
15305
15306 2002-10-20 Akim Demaille <akim@epita.fr>
15307
15308 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15309 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15310 `pair'.
15311 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15312 `name' to...
15313 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15314 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15315 These.
15316
15317 2002-10-19 Paul Eggert <eggert@twinsun.com>
15318
15319 Do not create a temporary file, as that involves security and
15320 cleanup headaches. Instead, use a pair of pipes.
15321 Derived from a suggestion by Florian Krohm.
15322 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15323 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15324 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15325 (BISON_PREREQ_SUBPIPE): Add.
15326 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15327 Add subpipe.h, subpipe.c.
15328 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15329 * po/POTFILES.in: Add lib/subpipe.c.
15330 * src/output.c: Include "subpipe.h".
15331 (m4_invoke): Remove decl.
15332 (scan_skel): New decl.
15333 (output_skeleton): Use pipe rather than temporary file for m4 input.
15334 Check that m4sugar.m4 is readable, to avoid deadlock.
15335 Check for pipe I/O error.
15336 * src/scan-skel.l (readpipe): Remove decl.
15337 (scan_skel): New function, to be used in place of m4_invoke.
15338 Read from stream rather than file.
15339
15340 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15341 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15342 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15343 this generates a more-accurate value anyway.
15344
15345 * lib/timevar.c (timervar_accumulate): Rename locals to
15346 avoid confusion with similarly-named more-global.
15347 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15348
15349 * src/output.c (prepare): Use xstrdup to convert char const *
15350 to char *, to avoid GCC warning.
15351
15352 2002-10-19 Akim Demaille <akim@epita.fr>
15353
15354 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15355 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15356 Use them to have `calc.y' ready for %pure-parser.
15357 * data/yacc.c (YYLEX): Pass a yylex return type to
15358 b4_c_function_call.
15359
15360 2002-10-19 Akim Demaille <akim@epita.fr>
15361
15362 Prototype support of %lex-param and %parse-param.
15363
15364 * src/parse-gram.y: Add the definition of the %lex-param and
15365 %parse-param tokens, plus their rules.
15366 Drop the `_' version of %glr-parser.
15367 Add the "," token.
15368 * src/scan-gram.l (INITIAL): Scan them.
15369 * src/muscle_tab.c: Comment changes.
15370 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15371 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15372 (muscle_entry_s): The `value' member is no longer const.
15373 Adjust all dependencies.
15374 * src/muscle_tab.c (muscle_init): Adjust: use
15375 MUSCLE_INSERT_STRING.
15376 Initialize the obstack earlier.
15377 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15378 (muscle_pair_list_grow): New.
15379 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15380 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15381 * tests/calc.at: Use %locations, not --locations.
15382 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15383
15384 2002-10-19 Akim Demaille <akim@epita.fr>
15385
15386 * src/getargs.c (usage): Take status as argument and exit
15387 accordingly.
15388 Report the traditional `Try ... --help' message when status != 0.
15389 (usage, version): Don't take a FILE * as arg, it is pointless.
15390 (getargs): When there is an incorrect number of arguments, make it
15391 an error, and report it GNUlically thanks to `usage ()'.
15392
15393 2002-10-18 Paul Eggert <eggert@twinsun.com>
15394
15395 * data/glr.c (yyreportParseError): Don't assume that sprintf
15396 yields the length of the printed string, as this is not true
15397 on SunOS 4.1.4. Reported by Peter Klein.
15398
15399 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15400 * tests/conflicts.at (%nonassoc and eof): Likewise.
15401 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15402
15403 2002-10-17 Akim Demaille <akim@epita.fr>
15404
15405 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15406 * src/getargs.c (trace_types, trace_args): Adjust.
15407 * src/reader.c (grammar_current_rule_prec_set)
15408 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15409 Standardize error messages.
15410 And s/@prec/%prec/!
15411 (reader): Use trace_flag to enable scanner/parser debugging,
15412 instead of an adhoc scheme.
15413 * src/scan-gram.l: Remove trailing debugging code.
15414
15415 2002-10-16 Paul Eggert <eggert@twinsun.com>
15416
15417 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15418 MUSCLE_TAB_H.
15419
15420 * NEWS: Officially drop support for building Bison with K&R C,
15421 since it didn't work anyway and it's not worth worrying about.
15422 * Makefile.maint (wget_files): Remove ansi2knr.c.
15423 (ansi2knr.c-url_prefix): Remove.
15424 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15425 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15426 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15427
15428 2002-10-15 Paul Eggert <eggert@twinsun.com>
15429
15430 Stop using the "enum_" trick for K&R-style function definitions;
15431 it confused me, and I was the author! Instead, assume that people
15432 who want to use K&R C compilers (when using these modules in GCC,
15433 perhaps?) will run ansi2knr.
15434
15435 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15436 All uses of "enum_" changed to "enum ".
15437 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15438 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15439
15440 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15441 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15442 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15443 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15444 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15445 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15446 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15447 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15448 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15449 Use function prototypes; this removes the need for declaring
15450 static functions simply to provide their prototypes.
15451 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15452 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15453 bitset_count_, bitset_create, bitset_dump, bitset_first,
15454 bitset_free, bitset_init, bitset_last, bitset_next,
15455 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15456 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15457 bitset_print, bitset_release_memory, bitset_toggle_,
15458 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15459 debug_bitset): Likewise.
15460 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15461 * lib/bitset_stats.c (bitset_log_histogram_print,
15462 bitset_percent_histogram_print, bitset_stats_and,
15463 bitset_stats_and_cmp, bitset_stats_and_or,
15464 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15465 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15466 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15467 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15468 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15469 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15470 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15471 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15472 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15473 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15474 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15475 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15476 bitset_stats_zero): Likewise.
15477 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15478 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15479 bitsetv_dump, debug_bitsetv): Likewise.
15480 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15481 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15482 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15483 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15484 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15485 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15486 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15487 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15488 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15489 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15490 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15491 Likewise.
15492 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15493 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15494 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15495 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15496 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15497 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15498 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15499 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15500 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15501 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15502 lbitset_xor_cmp, lbitset_zero): Likewise.
15503
15504 2002-10-14 Akim Demaille <akim@epita.fr>
15505
15506 Version 1.75.
15507
15508 2002-10-14 Akim Demaille <akim@epita.fr>
15509
15510 * tests/Makefile.am (maintainer-check-posix): New.
15511
15512 2002-10-14 Akim Demaille <akim@epita.fr>
15513
15514 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15515 member.
15516
15517 2002-10-14 Akim Demaille <akim@epita.fr>
15518
15519 * src/tables.c (table_ninf_remap): base -> tab.
15520 Reported by Matt Rosing.
15521
15522 2002-10-14 Paul Eggert <eggert@twinsun.com>
15523
15524 * tests/action.at, tests/calc.at, tests/conflicts.at,
15525 tests/cxx-type.at, tests/headers.at, tests/input.at,
15526 tests/regression.at, tests/synclines.at, tests/torture.at:
15527 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15528 so that the tests still work even if POSIXLY_CORRECT is set.
15529 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15530
15531 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15532 for portability to K&R hosts. Fix typo: signed char is guaranteed
15533 only to 127, not to 128.
15534 * data/glr.c (yysigned_char): New type.
15535 * data/yacc.c (yysigned_char): Likewise.
15536 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15537
15538 2002-10-13 Paul Eggert <eggert@twinsun.com>
15539
15540 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15541 true due to limited range of data type" warning from GCC.
15542
15543 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15544 by wrapping enum yytokentype's definition inside #ifndef
15545 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15546
15547 2002-10-13 Akim Demaille <akim@epita.fr>
15548
15549 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15550 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15551
15552 2002-10-13 Akim Demaille <akim@epita.fr>
15553
15554 * Makefile.maint: Update from Autoconf 2.54.
15555 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15556
15557 2002-10-13 Akim Demaille <akim@epita.fr>
15558
15559 * src/print.c (print_state): Separate the list of solved conflicts
15560 from the other items.
15561 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15562
15563 2002-10-13 Akim Demaille <akim@epita.fr>
15564
15565 Let nondeterministic skeletons be usable with deterministic
15566 tables.
15567
15568 With the patch, GAWK compiled by GCC without -O2 passes its test
15569 suite using a GLR parser driven by LALR tables. It fails with -O2
15570 because `struct stat' gives two different answers on my machine:
15571 88 (definition of an auto var) and later 96 (memset on this var).
15572 Hence the stack is badly corrumpted. The headers inclusion is to
15573 blame: if I move the awk.h inclusion before GLR's system header
15574 inclusion, the two struct stat have the same size.
15575
15576 * src/tables.c (pack_table): Always create conflict_table.
15577 (token_actions): Always create conflict_list.
15578 * data/glr.c (YYFLAG): Remove, unused.
15579
15580 2002-10-13 Akim Demaille <akim@epita.fr>
15581
15582 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15583 (O0FLAGS): New.
15584 (VALGRIND, GXX): New.
15585 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15586 * tests/bison.in: Run $PREBISON a pre-command.
15587 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15588 (maintainer-check-g++): New.
15589 * Makefile.am (maintainer-check): New.
15590
15591 2002-10-13 Akim Demaille <akim@epita.fr>
15592
15593 * data/glr.c: Formatting changes.
15594 Tweak some trace messages to match yacc.c's.
15595
15596 2002-10-13 Akim Demaille <akim@epita.fr>
15597
15598 GLR parsers sometimes raise parse errors instead of performing the
15599 default reduction.
15600 Reported by Charles-Henry de Boysson.
15601
15602 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15603 check the length of the traces when %glr.
15604 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15605 GLR's traces.
15606 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15607 Test GLR parsers.
15608 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15609 (yyltype): Remove the yy prefix from the member names.
15610 (yytable): Complete its comment.
15611 (yygetLRActions): Map error action number from YYTABLE from
15612 YYTABLE_NINF to 0.
15613 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15614 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15615 not satisfying as we could compare an YYACTION computed from
15616 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15617 only value for error actions.
15618 (yyreportParseError): In verbose parse error messages, don't issue
15619 `error' in the list of expected tokens.
15620 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15621 next action to perform to match glr.c's decoding.
15622 (yytable): Complete its comment.
15623
15624 2002-10-13 Paul Eggert <eggert@twinsun.com>
15625
15626 Fix problem reported by Henrik Grubbstroem in
15627 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15628 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15629 because the Bison parser reads the second action before reducing
15630 the first one.
15631 * src/scan-gram.l (rule_length): New static var.
15632 Use it to keep track of the rule length in the scanner, since
15633 we can't expect the parser to be in lock-step sync with the scanner.
15634 (handle_action_dollar, handle_action_at): Use this var.
15635 * tests/actions.at (Exotic Dollars): Test for the problem.
15636
15637 2002-10-12 Paul Eggert <eggert@twinsun.com>
15638
15639 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15640 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15641 Include <sys/time.h> when checking for clock_t and struct tms.
15642 Use same include order as source.
15643 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15644 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15645
15646 * lib/timevar.c: Update copyright date and clarify comments.
15647 (get_time) [IN_GCC]: Keep the GCC version for reference.
15648
15649 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15650 GCC version as of today, then merge Bison's changes.
15651 Change "GCC" to "Bison" in copyright notice. timevar.def's
15652 author is Akim, so change that too.
15653
15654 * src/reader.c (grammar_current_rule_check):
15655 Don't worry about the default action if $$ is untyped.
15656 Prevents bogus warnings reported by Jim Gifford in
15657 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15658
15659 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15660 * data/glr.c, data/lalr1.cc, data/yacc.c:
15661 Output token definitions before the first part of user declarations.
15662 Fixes compatibility problem reported by Jim Gifford for kbd in
15663 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15664
15665 2002-10-11 Paul Eggert <eggert@twinsun.com>
15666
15667 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15668 (yyparse): here. This undoes some of the 2002-07-25 change.
15669 Compatibility problem reported by Ralf S. Engelschall with
15670 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15671
15672 2002-10-11 Akim Demaille <akim@epita.fr>
15673
15674 * tests/regression.at Characters Escapes): New.
15675 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15676 characters.
15677 Reported by Jan Nieuwenhuizen.
15678
15679 2002-10-11 Akim Demaille <akim@epita.fr>
15680
15681 * po/id.po: New.
15682
15683 2002-10-10 Paul Eggert <eggert@twinsun.com>
15684
15685 Portability fixes for bitsets; this also avoids several GCC
15686 warnings.
15687
15688 * lib/abitset.c: Include <stddef.h>, for offsetof.
15689 * lib/lbitset.c: Likewise.
15690
15691 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15692 properly for vectors of objects. Do not assume that adding a
15693 header size to a multiple of a word size yields a value that is
15694 properly aligned for the whole union.
15695 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15696
15697 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15698 unique names for structures.
15699 * lib/ebitset.c (ebitset_bytes): Likewise.
15700 * lib/lbitset.c (lbitset_bytes): Likewise.
15701
15702 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15703 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15704 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15705 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15706 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15707 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15708 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15709 to improve the type-checking that GCC can do.
15710 * lib/bitset.c (bitset_op4_cmp): Likewise.
15711 * lib/bitset_stats.c (bitset_stats_count,
15712 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15713 bitset_stats_copy, bitset_stats_disjoint_p,
15714 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15715 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15716 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15717 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15718 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15719 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15720 bitset_stats_or_and_cmp): Likewise.
15721 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15722 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15723 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15724 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15725
15726 * lib/abitset.h: Include bitset.h, not bbitset.h.
15727 * lib/ebitset.h: Likewise.
15728 * lib/lbitset.h: Likewise.
15729
15730 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15731 All instances of parameters of type enum bitset_opts are now of
15732 type enum_bitset_opts, to conform to the C Standard, and similarly
15733 for enum_bitset_type.
15734 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15735 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15736
15737 Do not use "struct bitset_struct" to mean different things in
15738 different modules. Not only is this confusing, it violates
15739 the C Standard, which requires that structure types in different
15740 modules must be compatible if one is to be passed to the other.
15741 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15742 All instances of "struct bitset_struct *" replaced with "bitset".
15743 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15744 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15745 struct lbitset_struct, struct bitset_stats_struct): New types.
15746 All uses of struct bitset_struct changed to union bitset_union,
15747 etc.
15748 * lib/abitset.c (struct abitset_struct, abitset,
15749 struct bitset_struct): Remove.
15750 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15751 struct bitset_struct): Remove.
15752 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15753 bitset_struct): Remove.
15754 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15755 Likewise.
15756
15757 Do not call a function of type T using a call that assumes the
15758 function is of a different type U. Standard C requires that a
15759 function must be called with a type that is compatible with its
15760 definition.
15761 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15762 New decls.
15763 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15764 New functions.
15765 * lib/ebitset.c (PFV): Remove.
15766 * lib/lbitset.c (PFV): Likewise.
15767 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15768 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15769 decls.
15770 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15771 (ebitset_vtable): Use them.
15772 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15773 lbitset_xor): New functions.
15774 (lbitset_vtable): Use them.
15775
15776 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15777 Declare.
15778
15779 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15780 GCC warning.
15781 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15782 Use offsetof, for simplicity.
15783
15784 2002-10-06 Paul Eggert <eggert@twinsun.com>
15785
15786 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15787 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15788 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15789 which was inadvertently undone by the 2002-09-30 patch.
15790 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15791 the same width as int.
15792
15793 2002-10-04 Paul Eggert <eggert@twinsun.com>
15794
15795 Version 1.50.
15796
15797 * configure.ac (AC_INIT), NEWS: Increment version number.
15798
15799 * doc/bison.texinfo: Minor spelling, grammar, and white space
15800 fixes.
15801 (Symbols): Mention that any negative value returned from yylex
15802 signifies end-of-input. Warn about negative chars. Mention
15803 the portable Standard C character set.
15804
15805 The GNU coding standard says CFLAGS and YFLAGS are reserved
15806 for the installer to set.
15807 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15808 * src/Makefile.am (AM_CFLAGS): Likewise.
15809 (AM_YFLAGS): Renamed from YFLAGS.
15810
15811 Fix some MAX and MIN problems.
15812 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15813 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15814 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15815 * src/reader.c (reader): Use it.
15816
15817 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15818 POSIX 1003.1-2001 has removed fgrep.
15819
15820 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15821
15822 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15823 interpreted as signed.
15824 * lib/ebitset.c (ebitset_list): Fix bug.
15825
15826 2002-10-01 Paul Eggert <eggert@twinsun.com>
15827
15828 More fixes for 64-bit hosts and large bitsets.
15829
15830 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15831 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15832 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15833 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15834 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15835 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15836 bitset_count_): Likewise.
15837 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15838 bitset_first, bitset_last): Likewise.
15839 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15840 bitset_stats_list_reverse, bitset_stats_size,
15841 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15842 Likewise.
15843 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15844 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15845 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15846 bitsetv_reflexive_transitive_closure): Likewise.
15847 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15848 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15849 Likewise.
15850 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15851 Likewise.
15852
15853 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15854 Use size_t, not unsigned int, to count bytes.
15855 * lib/abitset.h (abitset_bytes): Likewise.
15856 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15857 Likewise.
15858 * lib/bitset.h (bitset_bytes): Likewise.
15859 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15860 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15861 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15862 * lib/ebitset.c (ebitset_bytes): Likewise.
15863 * lib/ebitset.h (ebitset_bytes): Likewise.
15864 * lib/lbitset.c (lbitset_bytes): Likewise.
15865 * lib/lbitset.h (lbitset_bytes): Likewise.
15866
15867 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15868 abitset_subset_p, abitset_disjoint_p, abitset_and,
15869 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15870 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15871 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15872 abitset_or_and, abitset_or_and_cmp):
15873 Use bitset_windex instead of unsigned int.
15874 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15875 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15876 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15877 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15878 Likewise.
15879 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15880
15881 * lib/bitset.c (bitset_print):
15882 Use proper printf formats for widths of integer types.
15883 * lib/bitset_stats.c (bitset_percent_histogram_print,
15884 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15885 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15886 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15887 * lib/lbitset.c (lbitset_bytes): Likewise.
15888
15889 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15890 BITSET_SIZE_MAX): New macros.
15891 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15892 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15893 to BITSET_WINDEX_MAX.
15894
15895 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15896 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15897 since we now return the bitset_bindex type (not int).
15898
15899 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15900 when computing sizes.
15901 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15902
15903 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15904 and avoid cast to unsigned.
15905
15906 2002-09-30 Akim Demaille <akim@epita.fr>
15907
15908 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15909 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15910 Updates from Michael Hayes.
15911
15912 2002-09-30 Art Haas <ahaas@neosoft.com>
15913
15914 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15915 invocations.
15916 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15917 defined.
15918
15919 2002-09-27 Akim Demaille <akim@epita.fr>
15920
15921 Version 1.49c.
15922
15923 2002-09-27 Akim Demaille <akim@epita.fr>
15924
15925 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15926 (Because of AC_LIBSOURCE).
15927
15928 2002-09-27 Akim Demaille <akim@epita.fr>
15929
15930 Playing with Autoscan.
15931
15932 * configure.ac: Remove the old LIBOBJ tweaks.
15933 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15934 * lib/strrchr.c: New.
15935 * lib/strtol.c: New, from the Coreutils 4.5.1.
15936
15937 2002-09-27 Akim Demaille <akim@epita.fr>
15938
15939 Playing with Autoscan.
15940
15941 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15942 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15943 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15944 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15945 Coreutils 4.5.1.
15946
15947 2002-09-24 Akim Demaille <akim@epita.fr>
15948
15949 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15950 (Frequently Asked Questions, Parser Stack Overflow): New.
15951
15952 2002-09-13 Akim Demaille <akim@epita.fr>
15953
15954 Playing with autoscan.
15955
15956 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15957 * src/files.c (skeleton_find): Remove, unused.
15958 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15959 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15960
15961 2002-09-13 Akim Demaille <akim@epita.fr>
15962
15963 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15964 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15965
15966 2002-09-13 Akim Demaille <akim@epita.fr>
15967
15968 * configure.ac: Require 2.54.
15969 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15970 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15971 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15972 Remove, provided by Autoconf macros.
15973
15974 2002-09-12 Akim Demaille <akim@epita.fr>
15975
15976 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15977
15978 2002-09-12 Akim Demaille <akim@epita.fr>
15979
15980 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15981 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15982 Reported by Martin Mokrejs.
15983
15984 2002-09-10 Akim Demaille <akim@epita.fr>
15985
15986 * src/parse-gram.y: Associate a human readable string to each
15987 token type.
15988 * tests/regression.at (Invalid inputs): Adjust.
15989
15990 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15991
15992 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15993 with an Autoconf-2.5x style configure.ac.
15994
15995 2002-09-06 Paul Eggert <eggert@twinsun.com>
15996
15997 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15998 exception applies only to yacc.c. This is a modification of a
15999 patch originally suggested by Akim Demaille.
16000
16001 2002-09-06 Akim Demaille <akim@epita.fr>
16002
16003 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16004 here to...
16005 * data/yacc.c: here.
16006
16007 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16008 LocationType.
16009 (b4_ltype): Default to yy::Location from location.hh.
16010
16011 2002-09-04 Jim Meyering <jim@meyering.net>
16012
16013 * data/yacc.c: Guard the declaration of yytoknum also with
16014 `#ifdef YYPRINT', so it is declared only when used.
16015
16016 2002-09-04 Akim Demaille <akim@epita.fr>
16017
16018 * configure.in: Rename as...
16019 * configure.ac: this.
16020 Bump to 1.49c.
16021
16022 2002-09-04 Akim Demaille <akim@epita.fr>
16023
16024 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16025 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16026 translate maintainer only messages.
16027
16028 2002-08-12 Paul Eggert <eggert@twinsun.com>
16029
16030 Version 1.49b.
16031
16032 * Makefile.am (SUBDIRS): Remove intl.
16033 (DISTCLEANFILES): Remove.
16034 * NEWS: Mention that GNU M4 is now required. Clarify what is
16035 meant by "larger grammars". Mention the pt_BR translation.
16036 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16037 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16038 Bump version from 0.11.2 to 0.11.5.
16039 (BISON_PREREQ_STAGE): Remove.
16040 (AM_GNU_GETTEXT): Use external gettext.
16041 (AC_OUTPUT): Remove intl/Makefile.
16042
16043 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16044
16045 * data/glr.c: Include string.h, for strlen.
16046 (yyreportParseError): Use size_t for yysize.
16047 (yy_yypstack): No longer nested inside yypstates, as nested
16048 functions are not portable. Do not assume size_t is the
16049 same width as int.
16050 (yypstates): Do not assume that ptrdiff_t is the same width
16051 as int, and similarly for yyposn and YYINDEX.
16052
16053 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16054
16055 * lib/Makefile.am (INCLUDES): Do not include from the intl
16056 directory, which has been removed.
16057 * src/Makefile.am (INCLUDES): Likewise.
16058
16059 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16060 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16061 New vars.
16062
16063 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16064 * tests/Makefile.am (EXTRA_DIST): Likewise.
16065
16066 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16067 Do not assume that bitset_windex is the same width as unsigned.
16068
16069 * lib/abitset.c (abitset_unused_clear): Do not assume that
16070 bitset_word is the same width as int.
16071 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16072 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16073 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16074 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16075 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16076
16077 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16078 portability to one's complement hosts!).
16079 * lib/ebitset.c (ebitset_op1): Likewise.
16080 * lib/lbitset.c (lbitset_op1): Likewise.
16081
16082 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16083 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16084 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16085 Sync with fileutils.
16086 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16087 lib/gettext.h: Sync with diffutils.
16088
16089 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16090 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16091
16092 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16093 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16094 check for void *.
16095
16096 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16097 size_t; the old version tried to do this but casted improperly.
16098 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16099 (bitset_test): Now returns int, not unsigned long.
16100
16101 * lib/bitset_stats.c: Include "gettext.h".
16102 (_): New macro.
16103 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16104 name locals "index", as it generates unnecessary warnings on some
16105 hosts that have an "index" function.
16106
16107 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16108 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16109 they need translation.
16110 * src/LR0.c (state_list_append, new_itemsets, get_state,
16111 append_states, generate_states): Likewise.
16112 * src/assoc.c (assoc_to_string): Likewise.
16113 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16114 * src/gram.c (grammar_dump): Likewise.
16115 * src/injections.c (injections_compute): Likewise.
16116 * src/lalr.c (lookaheads_print): Likewise.
16117 * src/relation.c (relation_transpose): Likewise.
16118 * src/scan-gram.l: Likewise.
16119 * src/tables.c (table_grow, pack_vector): Likewise.
16120
16121 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16122 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16123 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16124 * m4/mbstate_t.m4: Sync with fileutils.
16125 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16126
16127 * po/LINGUAS: Add pt_BR.
16128 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16129 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16130 lib/timevar.c.
16131 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16132 manual recommends.
16133 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16134
16135 * src/complain.c (strerror_r): Remove decl; not needed.
16136 (strerror): Use same pattern as ../lib/error.c.
16137
16138 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16139
16140 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16141
16142 * src/main.c (main): Cast result of bindtextdomain and textdomain
16143 to void, to avoid a GCC warning when --disable-nls is in effect.
16144
16145 * src/scan-gram.l: Use strings rather than escapes when possible,
16146 to minimize the number of warnings from xgettext.
16147 (handle_action_dollar, handle_action_at): Don't use isdigit,
16148 as it mishandles negative chars and it may not work as expected
16149 outside the C locale.
16150
16151 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16152 this is a GCC extension and is not portable to other compilers.
16153
16154 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16155 Do not include <ctype.h>; no longer needed.
16156 Do not include <malloc.h>; no longer needed (and generates
16157 warnings on OpenBSD 3.0).
16158
16159 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16160 it's not portable.
16161
16162 * tests/regression.at: Do not use 'cc -c input.c -o input';
16163 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16164
16165 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16166 exit status as failure, not just exit status 1. Sun C exits
16167 with status 2 sometimes.
16168
16169 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16170 Use it for the two large tests.
16171
16172 2002-08-02 Akim Demaille <akim@epita.fr>
16173
16174 * src/conflicts.c (conflicts_output): Don't output rules never
16175 reduced here, since anyway that computation doesn't work.
16176 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16177 (rule_useless_p, rule_never_reduced_p): New.
16178 (grammar_rules_partial_print): Use a filter instead of a range.
16179 Display the title only if needed.
16180 (grammar_rules_print): Adjust.
16181 (grammar_rules_never_reduced_report): New.
16182 * src/tables.c (action_row): Move the computation of rules never
16183 reduced to...
16184 (token_actions): here.
16185 * src/main.c (main): Make the parser before making the report, so
16186 that rules never reduced are computed.
16187 Call grammar_rules_never_reduced_report.
16188 * src/print.c (print_results): Report rules never reduced.
16189 * tests/conflicts.at, tests/reduce.at: Adjust.
16190
16191 2002-08-01 Akim Demaille <akim@epita.fr>
16192
16193 Instead of attaching lookaheads and duplicating the rules being
16194 reduced by a state, attach the lookaheads to the reductions.
16195
16196 * src/state.h (state_t): Remove the `lookaheads',
16197 `lookaheads_rule' member.
16198 (reductions_t): Add a `lookaheads' member.
16199 Use a regular array for the `rules'.
16200 * src/state.c (reductions_new): Initialize the lookaheads member
16201 to 0.
16202 (state_rule_lookaheads_print): Adjust.
16203 * src/state.h, src/state.c (state_reductions_find): New.
16204 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16205 (count_rr_conflicts): Adjust.
16206 * src/lalr.c (LArule): Remove.
16207 (add_lookback_edge): Adjust.
16208 (state_lookaheads_count): New.
16209 (states_lookaheads_initialize): Merge into...
16210 (initialize_LA): this.
16211 (lalr_free): Adjust.
16212 * src/main.c (main): Don't free nullable and derives too early: it
16213 is used by --verbose.
16214 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16215
16216 2002-08-01 Akim Demaille <akim@epita.fr>
16217
16218 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16219 `rule_number_t**'.
16220 (set_derives, free_derives): Rename as...
16221 (derives_compute, derives_free): this.
16222 Adjust all dependencies.
16223 * src/nullable.c (set_nullable, free_nullable): Rename as...
16224 (nullable_compute, nullable_free): these.
16225 (rule_list_t): Store rule_t *, not rule_number_t.
16226 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16227 pointers, instead of their numbers.
16228 * src/main.c (main): Call nullable_free, and derives_free earlier,
16229 as they were lo longer used.
16230
16231 2002-08-01 Akim Demaille <akim@epita.fr>
16232
16233 * lib/timevar.c (get_time): Include children time.
16234 * src/lalr.h (LA, LArule): Don't export them: used with the
16235 state_t.
16236 * src/lalr.c (LA, LArule): Static.
16237 * src/lalr.h, src/lalr.c (lalr_free): New.
16238 * src/main.c (main): Call it.
16239 * src/tables.c (pack_vector): Check whether loc is >= to the
16240 table_size, not >.
16241 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16242 (tables_generate): do it, since that's also it which allocates
16243 them.
16244 Don't free LA and LArule, main does.
16245
16246 2002-07-31 Akim Demaille <akim@epita.fr>
16247
16248 Separate parser tables computation and output.
16249
16250 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16251 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16252 (yydefgoto, yydefact, high): Move to...
16253 * src/tables.h, src/tables.c: here.
16254 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16255 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16256 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16257 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16258 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16259 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16260 (action_row, save_row, token_actions, save_column, default_goto)
16261 (goto_actions, sort_actions, matching_state, pack_vector)
16262 (table_ninf_remap, pack_table, prepare_actions): Move to...
16263 * src/tables.c: here.
16264 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16265 * src/output.c (token_actions, output_base, output_conflicts)
16266 (output_check): Merge into...
16267 (prepare_actions): this.
16268 (actions_output): Rename as...
16269 (user_actions_output): this.
16270 * src/main.c (main): Call tables_generate and tables_free.
16271
16272 2002-07-31 Akim Demaille <akim@epita.fr>
16273
16274 Steal GCC's --time-report support.
16275
16276 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16277 stolen/adjusted from GCC.
16278 * m4/stage.m4: Remove time related checks.
16279 * m4/timevar.m4: New.
16280 * configure.in: Adjust.
16281 * src/system.h: Adjust to using timevar.h.
16282 * src/getargs.h, src/getargs.c: Support trace_time for
16283 --trace=time.
16284 * src/main.c (stage): Remove.
16285 (main): Replace `stage' invocations with timevar calls.
16286 * src/output.c: Insert pertinent timevar calls.
16287
16288 2002-07-31 Akim Demaille <akim@epita.fr>
16289
16290 Let --trace have arguments.
16291
16292 * src/getargs.h (enum trace_e): New.
16293 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16294 (long_options, short_options): --trace/-T takes an optional
16295 argument.
16296 Change all the uses of trace_flag to reflect the new flags.
16297 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16298
16299 Strengthen `stage' portability.
16300
16301 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16302 * configure.in: Use it.
16303 Don't check for malloc.h and sys/times.h.
16304 * src/system.h: Include them when appropriate.
16305 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16306 times and struct tms are available.
16307
16308 2002-07-30 Akim Demaille <akim@epita.fr>
16309
16310 In verbose parse error message, don't report `error' as an
16311 expected token.
16312 * tests/actions.at (Printers and Destructors): Adjust.
16313 * tests/calc.at (Calculator $1): Adjust.
16314 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16315 error message, do not report the parser accepts the error token in
16316 that state.
16317
16318 2002-07-30 Akim Demaille <akim@epita.fr>
16319
16320 Normalize conflict related messages.
16321
16322 * src/complain.h, src/complain.c (warn, complain): New.
16323 * src/conflicts.c (conflicts_print): Use them.
16324 (conflict_report_yacc): New, extracted from...
16325 (conflicts_print): here.
16326 * tests/conflicts.at, tests/existing.at: Adjust.
16327
16328 2002-07-30 Akim Demaille <akim@epita.fr>
16329
16330 Report rules which are never reduced by the parser: those hidden
16331 by conflicts.
16332
16333 * src/LR0.c (save_reductions): Don't make the final state too
16334 different: save its reduction (accept) instead of having a state
16335 without any action (no shift or goto, no reduce).
16336 Note: the final state is now a ``regular'' state, i.e., the
16337 parsers now contain `reduce 0' as default reduction.
16338 Nevertheless, since they decide to `accept' when yystate =
16339 final_state, they still will not reduce rule 0.
16340 * src/print.c (print_actions, print_reduction): Adjust.
16341 * src/output.c (action_row): Track reduced rules.
16342 (token_actions): Report rules never reduced.
16343 * tests/conflicts.at, tests/regression.at: Adjust.
16344
16345 2002-07-30 Akim Demaille <akim@epita.fr>
16346
16347 `stage' was accidently included in a previous patch.
16348 Initiate its autoconfiscation.
16349
16350 * configure.in: Look for malloc.h and sys/times.h.
16351 * src/main.c (stage): Adjust.
16352 Report only when trace_flag.
16353
16354 2002-07-29 Akim Demaille <akim@epita.fr>
16355
16356 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16357 state_number_t.
16358 (errs_t): symbol_t*, not symbol_number_t.
16359 (reductions_t): rule_t*, not rule_number_t.
16360 (FOR_EACH_SHIFT): New.
16361 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16362 * src/print.c, src/print_graph.c: Adjust.
16363
16364 2002-07-29 Akim Demaille <akim@epita.fr>
16365
16366 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16367
16368 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16369 (endtoken, accept): these.
16370 * src/reader.c (reader): Set endtoken's default tag to "$end".
16371 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16372 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16373 Adjust.
16374
16375 2002-07-29 Akim Demaille <akim@epita.fr>
16376
16377 * src/reduce.c (reduce_grammar): When the language is empty,
16378 complain about the start symbol, not the axiom.
16379 Use its location.
16380 * tests/reduce.at (Empty Language): New.
16381
16382 2002-07-26 Akim Demaille <akim@epita.fr>
16383
16384 * src/reader.h, src/reader.c (gram_error): ... can't get
16385 yycontrol without making too strong assumptions on the parser
16386 itself.
16387 * src/output.c (prepare_tokens): Use the real 0th value of
16388 token_translations instead of `0'.
16389 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16390 visible here.
16391 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16392 for the time being: %locations ought to provide it to yyerror.
16393
16394 2002-07-25 Akim Demaille <akim@epita.fr>
16395
16396 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16397 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16398 * tests/regression.at (Web2c Actions): Adjust.
16399
16400 2002-07-25 Akim Demaille <akim@epita.fr>
16401
16402 Stop storing rules from 1 to nrules + 1.
16403
16404 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16405 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16406 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16407 Iterate from 0 to nrules.
16408 Use rule_number_as_item_number and item_number_as_rule_number.
16409 Adjust to `derive' now containing possibly 0.
16410 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16411 Handle the `- 1' part in rule numbers from/to item numbers.
16412 * src/conflicts.c (log_resolution): Fix the message which reversed
16413 shift and reduce.
16414 * src/output.c (action_row): Initialize default_rule to -1.
16415 (token_actions): Adjust.
16416 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16417 expected output.
16418 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16419
16420 2002-07-25 Akim Demaille <akim@epita.fr>
16421
16422 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16423 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16424 (b4_c_knr_arg_decl): New.
16425 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16426 yyreport_parse_error.
16427
16428 2002-07-25 Akim Demaille <akim@epita.fr>
16429
16430 * data/yacc.c (yyreport_parse_error): New, extracted from...
16431 (yyparse): here.
16432 (yydestruct, yysymprint): Move above yyparse.
16433 Be K&R compliant.
16434
16435 2002-07-25 Akim Demaille <akim@epita.fr>
16436
16437 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16438 replace...
16439 (b4_sint_type, b4_uint_type): these.
16440 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16441 * tests/regression.at (Web2c Actions): Adjust.
16442
16443 2002-07-25 Akim Demaille <akim@epita.fr>
16444
16445 * src/gram.h (TIEM_NUMBER_MAX): New.
16446 (item_number_of_rule_number, rule_number_of_item_number): Rename
16447 as...
16448 (rule_number_as_item_number, item_number_as_rule_number): these.
16449 Adjust dependencies.
16450 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16451 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16452 (symbol_number_to_vector_number): New.
16453 (order): Of vector_number_t* type.
16454 (base_t, BASE_MAX, BASE_MIN): New.
16455 (froms, tos, width, pos, check): Of base_t type.
16456 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16457 (actrow): Of action_number_t type.
16458 (conflrow): Of unsigned int type.
16459 (table_ninf, base_ninf): New.
16460 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16461 (muscle_insert_int_table, muscle_insert_base_table)
16462 (muscle_insert_rule_number_table): New.
16463 (prepare_tokens): Output `toknum' as int_table.
16464 (action_row): Returns a rule_number_t.
16465 Use ACTION_MIN, not SHRT_MIN.
16466 (token_actions): yydefact is rule_number_t*.
16467 (table_ninf_remap): New.
16468 (pack_table): Use it for `base' and `table'.
16469 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16470 replaced with...
16471 (YYPACT_NINF, YYTABLE_NINF): these.
16472 (yypact, yytable): Compute their types instead of hard-coded
16473 `short'.
16474 * tests/regression.at (Web2c Actions): Adjust.
16475
16476 2002-07-19 Akim Demaille <akim@epita.fr>
16477
16478 * src/scan-gram.l (id): Can start with an underscore.
16479
16480 2002-07-16 Akim Demaille <akim@epita.fr>
16481
16482 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16483 Adjust all former `associativity' dependencies.
16484 * src/symtab.c (symbol_new): Default associativity is `undef', not
16485 `right'.
16486 (symbol_check_alias_consistence): Adjust.
16487
16488 2002-07-09 Akim Demaille <akim@epita.fr>
16489
16490 * doc/bison.texinfo: Properly set the ``header'' part.
16491 Use @dircategory ``GNU programming tools'' as per Texinfo's
16492 documentation.
16493 Use @copying.
16494
16495 2002-07-09 Akim Demaille <akim@epita.fr>
16496
16497 * lib/quotearg.h: Protect against multiple inclusions.
16498 * src/location.h (location_t): Add a `file' member.
16499 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16500 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16501 `error_one_per_line' support.
16502
16503 2002-07-09 Akim Demaille <akim@epita.fr>
16504
16505 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16506 * src/reader.c (lineno): Remove.
16507 Adjust all dependencies.
16508 (get_merge_function): Take a location and use complain_at.
16509 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16510 * tests/regression.at (Invalid inputs, Mixing %token styles):
16511 Adjust.
16512
16513 2002-07-09 Akim Demaille <akim@epita.fr>
16514
16515 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16516 recovery rule, and forbid extensions when --yacc.
16517 (gram_error): Use complain_at.
16518 * src/reader.c (reader): Exit if there were parse errors.
16519
16520 2002-07-09 Akim Demaille <akim@epita.fr>
16521
16522 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16523 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16524 Reported by R Blake <blakers@mac.com>.
16525
16526 2002-07-09 Akim Demaille <akim@epita.fr>
16527
16528 * data/yacc.c: Output the copyright notive in the header.
16529
16530 2002-07-03 Akim Demaille <akim@epita.fr>
16531
16532 * src/output.c (froms, tos): Are state_number_t.
16533 (save_column): sp, sp1, and sp2 are state_number_t.
16534 (prepare): Rename `final' as `final_state_number', `nnts' as
16535 `nterms_number', `nrules' as `rules_number', `nstates' as
16536 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16537 unused.
16538 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16539 * data/lalr1.cc (nsym_): Remove, unused.
16540
16541 2002-07-03 Akim Demaille <akim@epita.fr>
16542
16543 * src/lalr.h, src/lalr.c (goto_number_t): New.
16544 * src/lalr.c (goto_list_t): New.
16545 Propagate them.
16546 * src/nullable.c (rule_list_t): New.
16547 Propagate.
16548 * src/types.h: Remove.
16549
16550 2002-07-03 Akim Demaille <akim@epita.fr>
16551
16552 * src/closure.c (print_fderives): Use rule_rhs_print.
16553 * src/derives.c (print_derives): Use rule_rhs_print.
16554 (rule_list_t): New, replaces `shorts'.
16555 (set_derives): Add comments.
16556 * tests/sets.at (Nullable, Firsts): Adjust.
16557
16558 2002-07-03 Akim Demaille <akim@epita.fr>
16559
16560 * src/output.c (prepare_actions): Free `tally' and `width'.
16561 (prepare_actions): Allocate and free `order'.
16562 * src/symtab.c (symbols_free): Free `symbols'.
16563 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16564 * src/output.c (m4_invoke): Move to...
16565 * src/scan-skel.l: here.
16566 (<<EOF>>): Close yyout, and free its name.
16567
16568 2002-07-03 Akim Demaille <akim@epita.fr>
16569
16570 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16571
16572 * src/LR0.c (new_state): Merge into...
16573 (state_list_append): this.
16574 (new_states): Merge into...
16575 (generate_states): here.
16576 (set_states): Don't ensure a proper `errs' state member here, do it...
16577 * src/conflicts.c (conflicts_solve): here.
16578 * src/state.h, src/state.c: Comment changes.
16579 (state_t): Rename member `shifts' as `transitions'.
16580 Adjust all dependencies.
16581 (errs_new): For consistency, also take the values as argument.
16582 (errs_dup): Remove.
16583 (state_errs_set): New.
16584 (state_reductions_set, state_transitions_set): Assert that no
16585 previous value was assigned.
16586 (state_free): New.
16587 (states_free): Use it.
16588 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16589 temporary storage: use `errs' and `nerrs' as elsewhere.
16590 (set_conflicts): Allocate and free this `errs'.
16591
16592 2002-07-02 Akim Demaille <akim@epita.fr>
16593
16594 * lib/libiberty.h: New.
16595 * lib: Update the bitset implementation from upstream.
16596 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16597 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16598 * src/main.c: Adjust bitset stats calls.
16599
16600 2002-07-01 Paul Eggert <eggert@twinsun.com>
16601
16602 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16603 char, so that negative chars don't collide with $.
16604
16605 2002-06-30 Akim Demaille <akim@epita.fr>
16606
16607 Have the GLR tests be `warning' checked, and fix the warnings.
16608
16609 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16610 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16611 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16612 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16613 (yyaddDeferredAction): static.
16614 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16615 (yyreportParseError): yyprefix is const.
16616 yytokenp is used only when verbose.
16617 (yy__GNUC__): Replace with __GNUC__.
16618 (yypdumpstack): yyi is size_t.
16619 (yypreference): Un-yy local variables and arguments, to avoid
16620 clashes with `yyr1'. Anyway, we are not in the user name space.
16621 (yytname_size): be an int, as is compared with ints.
16622 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16623 Use them.
16624 * tests/cxx-gram.at: Use quotation to protect $1.
16625 Use AT_COMPILE to enable warnings hunts.
16626 Prototype yylex and yyerror.
16627 `Use' argc.
16628 Include `string.h', not `strings.h'.
16629 Produce and prototype stmtMerge only when used.
16630 yylex takes a location.
16631
16632 2002-06-30 Akim Demaille <akim@epita.fr>
16633
16634 We spend a lot of time in quotearg, in particular when --verbose.
16635
16636 * src/symtab.c (symbol_get): Store a quoted version of the key.
16637 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16638 Adjust all callers.
16639
16640 2002-06-30 Akim Demaille <akim@epita.fr>
16641
16642 * src/state.h (reductions_t): Rename member `nreds' as num.
16643 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16644 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16645
16646 2002-06-30 Akim Demaille <akim@epita.fr>
16647
16648 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16649 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16650 (shifts_to): Rename as...
16651 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16652 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16653 (TRANSITION_IS_DISABLED, transitions_to): these.
16654
16655 2002-06-30 Akim Demaille <akim@epita.fr>
16656
16657 * src/print.c (print_shifts, print_gotos): Merge into...
16658 (print_transitions): this.
16659 (print_transitions, print_errs, print_reductions): Align the
16660 lookaheads columns.
16661 (print_core, print_transitions, print_errs, print_state,
16662 print_grammar): Output empty lines separator before, not after.
16663 (state_default_rule_compute): Rename as...
16664 (state_default_rule): this.
16665 * tests/conflicts.at (Defaulted Conflicted Reduction),
16666 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16667 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16668
16669 2002-06-30 Akim Demaille <akim@epita.fr>
16670
16671 Display items as we display rules.
16672
16673 * src/gram.h, src/gram.c (rule_lhs_print): New.
16674 * src/gram.c (grammar_rules_partial_print): Use it.
16675 * src/print.c (print_core): Likewise.
16676 * tests/conflicts.at (Defaulted Conflicted Reduction),
16677 (Unresolved SR Conflicts): Adjust.
16678 (Unresolved SR Conflicts): Adjust and rename as...
16679 (Resolved SR Conflicts): this, as was meant.
16680 * tests/regression.at (Web2c Report): Adjust.
16681
16682 2002-06-30 Akim Demaille <akim@epita.fr>
16683
16684 * src/print.c (state_default_rule_compute): New, extracted from...
16685 (print_reductions): here.
16686 Pessimize, but clarify the code.
16687 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16688
16689 2002-06-30 Akim Demaille <akim@epita.fr>
16690
16691 * src/output.c (action_row): Let default_rule be always a rule
16692 number.
16693
16694 2002-06-30 Akim Demaille <akim@epita.fr>
16695
16696 * src/closure.c (print_firsts, print_fderives, closure):
16697 Use BITSET_EXECUTE.
16698 * src/lalr.c (lookaheads_print): Likewise.
16699 * src/state.c (state_rule_lookaheads_print): Likewise.
16700 * src/print_graph.c (print_core): Likewise.
16701 * src/print.c (print_reductions): Likewise.
16702 * src/output.c (action_row): Likewise.
16703 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16704
16705 2002-06-30 Akim Demaille <akim@epita.fr>
16706
16707 * src/print_graph.c: Use report_flag.
16708
16709 2002-06-30 Akim Demaille <akim@epita.fr>
16710
16711 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16712 to...
16713 * src/relation.h, src/relation.c (traverse, relation_digraph)
16714 (relation_print, relation_transpose): New.
16715
16716 2002-06-30 Akim Demaille <akim@epita.fr>
16717
16718 * src/state.h, src/state.c (shifts_to): New.
16719 * src/lalr.c (build_relations): Use it.
16720
16721 2002-06-30 Akim Demaille <akim@epita.fr>
16722
16723 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16724 (item_number_of_rule_number, rule_number_of_item_number): New.
16725 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16726 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16727 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16728 Propagate their use.
16729 Much remains to be done, in particular wrt `shorts' from types.h.
16730
16731 2002-06-30 Akim Demaille <akim@epita.fr>
16732
16733 * src/symtab.c (symbol_new): Initialize the `printer' member.
16734
16735 2002-06-30 Akim Demaille <akim@epita.fr>
16736
16737 * src/LR0.c (save_reductions): Remove, replaced by...
16738 * src/state.h, src/state.c (state_reductions_set): New.
16739 (reductions, errs): Rename as...
16740 (reductions_t, errs_t): these.
16741 Adjust all dependencies.
16742
16743 2002-06-30 Akim Demaille <akim@epita.fr>
16744
16745 * src/LR0.c (state_list_t, state_list_append): New.
16746 (first_state, last_state): Now symbol_list_t.
16747 (this_state): Remove.
16748 (new_itemsets, append_states, save_reductions): Take a state_t as
16749 argument.
16750 (set_states, generate_states): Adjust.
16751 (save_shifts): Remove, replaced by...
16752 * src/state.h, src/state.c (state_shifts_set): New.
16753 (shifts): Rename as...
16754 (shifts_t): this.
16755 Adjust all dependencies.
16756 * src/state.h (state_t): Remove the `next' member.
16757
16758 2002-06-30 Akim Demaille <akim@epita.fr>
16759
16760 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16761 escaped in slot 0.
16762
16763 2002-06-30 Akim Demaille <akim@epita.fr>
16764
16765 Use hash.h for the state hash table.
16766
16767 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16768 (allocate_storage): Use state_hash_new.
16769 (free_storage): Use state_hash_free.
16770 (new_state, get_state): Adjust.
16771 * src/lalr.h, src/lalr.c (states): Move to...
16772 * src/states.h (state_t): Remove the `link' member, no longer
16773 used.
16774 * src/states.h, src/states.c: here.
16775 (state_hash_new, state_hash_free, state_hash_lookup)
16776 (state_hash_insert, states_free): New.
16777 * src/states.c (state_table, state_compare, state_hash): New.
16778 * src/output.c (output_actions): Do not free states now, since we
16779 still need to know the final_state number in `prepare', called
16780 afterwards. Do it...
16781 * src/main.c (main): here: call states_free after `output'.
16782
16783 2002-06-30 Akim Demaille <akim@epita.fr>
16784
16785 * src/state.h, src/state.c (state_new): New, extracted from...
16786 * src/LR0.c (new_state): here.
16787 * src/state.h (STATE_ALLOC): Move to...
16788 * src/state.c: here.
16789 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16790 * src/state.h, src/state.c: here.
16791
16792 2002-06-30 Akim Demaille <akim@epita.fr>
16793
16794 * src/reader.c (gensym): Rename as...
16795 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16796 (getsym): Rename as...
16797 (symbol_get): this.
16798
16799 2002-06-30 Akim Demaille <akim@epita.fr>
16800
16801 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16802 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16803 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16804 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16805
16806 2002-06-30 Akim Demaille <akim@epita.fr>
16807
16808 Make the test suite pass with warnings checked.
16809
16810 * tests/actions.at (Printers and Destructors): Improve.
16811 Avoid unsigned vs. signed issues.
16812 * tests/calc.at: Don't exercise the scanner here, do it...
16813 * tests/input.at (Torturing the Scanner): here.
16814
16815 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16816
16817 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16818 reorganize first lines parallel to yacc.c.
16819
16820 2002-06-28 Akim Demaille <akim@epita.fr>
16821
16822 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16823 (b4_token_enum, b4_token_defines): New, factored from...
16824 * data/lalr1.cc, data/yacc.c, glr.c: here.
16825
16826 2002-06-28 Akim Demaille <akim@epita.fr>
16827
16828 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16829 unused variables.
16830 * src/output.c (merger_output): static.
16831
16832 2002-06-28 Akim Demaille <akim@epita.fr>
16833
16834 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16835 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16836 pacify GCC.
16837 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16838
16839 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16840
16841 Accumulated changelog for new GLR parsing features.
16842
16843 * src/conflicts.c (count_total_conflicts): Change name to
16844 conflicts_total_count.
16845 * src/conflicts.h: Ditto.
16846 * src/output.c (token_actions): Use the new name.
16847 (output_conflicts): Change conflp => conflict_list_heads, and
16848 confl => conflict_list for better readability.
16849 * data/glr.c: Use the new names.
16850 * NEWS: Add self to GLR announcement.
16851
16852 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16853
16854 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16855 Akim Demaille.
16856
16857 * data/bison.glr: Change name to glr.c
16858 * data/glr.c: Renamed from bison.glr.
16859 * data/Makefile.am: Add glr.c
16860
16861 * src/getargs.c:
16862
16863 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16864 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16865
16866 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16867
16868 * data/bison.glr: Be sure to restore the
16869 current #line when returning to the skeleton contents after having
16870 exposed the input file's #line.
16871
16872 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16873
16874 * data/bison.glr: Bring up to date with changes to bison.simple.
16875
16876 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16877
16878 * data/bison.glr: Correct definitions that use b4_prefix.
16879 Various reformatting.
16880 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16881 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16882 yytokenp argument; now part of stack.
16883 (yychar): Define to behave as documented.
16884 (yyclearin): Ditto.
16885
16886 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16887
16888 * src/reader.h: Add declaration for free_merger_functions.
16889
16890 * src/reader.c (merge_functions): New variable.
16891 (get_merge_function): New function.
16892 (free_merger_functions): New function.
16893 (readgram): Check for %prec that is not followed by a symbol.
16894 Handle %dprec and %merge declarations.
16895 (packgram): Initialize dprec and merger fields in rules array.
16896
16897 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16898 conflict_list_cnt, conflict_list_free): New variables.
16899 (table_grow): Also grow conflict_table.
16900 (prepare_rules): Output dprec and merger tables.
16901 (conflict_row): New function.
16902 (action_row): Output conflict lists for GLR parser. Don't use
16903 default reduction in conflicted states for GLR parser so that there
16904 are spaces for the conflict lists.
16905 (save_row): Also save conflict information.
16906 (token_actions): Allocate conflict list.
16907 (merger_output): New function.
16908 (pack_vector): Pack conflict table, too.
16909 (output_conflicts): New function to output yyconflp and yyconfl.
16910 (output_check): Allocate conflict_tos.
16911 (output_actions): Output conflict tables, also.
16912 (output_skeleton): Output b4_mergers definition.
16913 (prepare): Output b4_max_rhs_length definition.
16914 Use 'bison.glr' as default skeleton for GLR parsers.
16915
16916 * src/gram.c (glr_parser): New flag.
16917 (grammar_free): Call free_merger_functions.
16918
16919 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16920 all pairs of conflicting reductions, rather than just all tokens
16921 causing conflicts. Needed to size conflict tables.
16922 (conflicts_output): Modify call to count_rr_conflicts for new
16923 interface.
16924 (conflicts_print): Ditto.
16925 (count_total_conflicts): New function.
16926
16927 * src/reader.h (merger_list): New type.
16928 (merge_functions): New variable.
16929
16930 * src/lex.h (tok_dprec, tok_merge): New token types.
16931
16932 * src/gram.h (rule_s): Add dprec and merger fields.
16933 (glr_parser): New flag.
16934
16935 * src/conflicts.h (count_total_conflicts): New function.
16936
16937 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16938
16939 * doc/bison.texinfo (Generalized LR Parsing): New section.
16940 (GLR Parsers): New section.
16941 (Language and Grammar): Mention GLR parsing.
16942 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16943 Correct typo ("tge" -> "the").
16944
16945 * data/bison.glr: New skeleton for GLR parsing.
16946
16947 * tests/cxx-gram.at: New tests for GLR parsing.
16948
16949 * tests/testsuite.at: Include cxx-gram.at.
16950
16951 * tests/Makefile.am: Add cxx-gram.at.
16952
16953 * src/parse-gram.y:
16954
16955 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16956
16957 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16958
16959 2002-06-27 Akim Demaille <akim@epita.fr>
16960
16961 * src/options.h, src/options.c: Remove.
16962 * src/getargs.c (short_options, long_options): New.
16963
16964 2002-06-27 Akim Demaille <akim@epita.fr>
16965
16966 * data/bison.simple, data/bison.c++: Rename as...
16967 * data/yacc.c, data/lalr1.cc: these.
16968 * doc/bison.texinfo (Environment Variables): Remove.
16969
16970 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16971
16972 * src/getargs.c (report_argmatch): Initialize strtok().
16973
16974 2002-06-20 Akim Demaille <akim@epita.fr>
16975
16976 * data/bison.simple (b4_symbol_actions): New, replaces...
16977 (b4_symbol_destructor, b4_symbol_printer): these.
16978 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16979 user token numbers.
16980
16981 2002-06-20 Akim Demaille <akim@epita.fr>
16982
16983 * data/bison.simple (yydestructor): Rename as...
16984 (yydestruct): this.
16985
16986 2002-06-20 Akim Demaille <akim@epita.fr>
16987
16988 * src/symtab.h, src/symtab.c (symbol_type_set)
16989 (symbol_destructor_set, symbol_precedence_set): The location is
16990 the last argument.
16991 Adjust all callers.
16992
16993 2002-06-20 Akim Demaille <akim@epita.fr>
16994
16995 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16996 internals.
16997 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16998 Takes a location.
16999 * src/symtab.h, src/symtab.c (symbol_class_set)
17000 (symbol_user_token_number_set): Likewise.
17001 Adjust all callers.
17002 Promote complain_at.
17003 * tests/input.at (Type Clashes): Adjust.
17004
17005 2002-06-20 Akim Demaille <akim@epita.fr>
17006
17007 * data/bison.simple (YYLEX): Fix the declaration when
17008 %pure-parser.
17009
17010 2002-06-20 Akim Demaille <akim@epita.fr>
17011
17012 * data/bison.simple (yysymprint): Don't print the token number,
17013 just its name.
17014 * tests/actions.at (Destructors): Rename as...
17015 (Printers and Destructors): this.
17016 Also exercise %printer.
17017
17018 2002-06-20 Akim Demaille <akim@epita.fr>
17019
17020 * data/bison.simple (YYDSYMPRINT): New.
17021 Use it to remove many of the #if YYDEBUG/if (yydebug).
17022
17023 2002-06-20 Akim Demaille <akim@epita.fr>
17024
17025 * src/symtab.h, src/symtab.c (symbol_t): printer and
17026 printer_location are new members.
17027 (symbol_printer_set): New.
17028 * src/parse-gram.y (PERCENT_PRINTER): New token.
17029 Handle its associated rule.
17030 * src/scan-gram.l: Adjust.
17031 (handle_destructor_at, handle_destructor_dollar): Rename as...
17032 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17033 * src/output.c (symbol_printers_output): New.
17034 (output_skeleton): Call it.
17035 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17036 since there are already many grammar files with a user `yyprint'.
17037 Replace the calls to YYPRINT to calls to yysymprint.
17038 * tests/calc.at: Adjust.
17039 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17040 taking advantage of parser very internal details (stack size!).
17041
17042 2002-06-20 Akim Demaille <akim@epita.fr>
17043
17044 * src/scan-gram.l: Complete the scanner with the missing patterns
17045 to pacify Flex.
17046 Use `quote' and `symbol_tag_get' where appropriate.
17047
17048 2002-06-19 Akim Demaille <akim@epita.fr>
17049
17050 * tests/actions.at (Destructors): Augment to test locations.
17051 * data/bison.simple (yydestructor): Pass it the current location
17052 if locations are enabled.
17053 Prototype only when __STDC__ or C++.
17054 Change the argument names to move into the yy name space: there is
17055 user code here.
17056
17057 2002-06-19 Akim Demaille <akim@epita.fr>
17058
17059 * data/bison.simple (b4_pure_if): New.
17060 Use it instead of #ifdef YYPURE.
17061
17062 2002-06-19 Akim Demaille <akim@epita.fr>
17063
17064 * data/bison.simple (b4_location_if): New.
17065 Use it instead of #ifdef YYLSP_NEEDED.
17066
17067 2002-06-19 Akim Demaille <akim@epita.fr>
17068
17069 Prepare @$ in %destructor, but currently don't bind it in the
17070 skeleton, as %location use is not cleaned up yet.
17071
17072 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17073 (handle_action_at): New.
17074 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17075 a braced_code_t and a location as additional arguments.
17076 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17077 unquote one when outputting `b4_dollar_dollar'.
17078 Adjust callers.
17079 * data/bison.simple (b4_eval): Remove.
17080 (b4_symbol_destructor): Adjust.
17081 * tests/input.at (Invalid @n): Adjust.
17082
17083 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17084
17085 * doc/bison.texinfo: Document ability to have multiple
17086 prologue sections.
17087
17088 2002-06-18 Akim Demaille <akim@epita.fr>
17089
17090 * src/files.c (compute_base_names): When computing the output file
17091 names from the input file name, strip the directory part.
17092
17093 2002-06-18 Akim Demaille <akim@epita.fr>
17094
17095 * data/bison.simple.new: Comment changes.
17096 Reported by Andreas Schwab.
17097
17098 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17099
17100 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17101 there are no `label `yyoverflowlab' defined but not used' warnings
17102 when yyoverflow is defined.
17103
17104 2002-06-18 Akim Demaille <akim@epita.fr>
17105
17106 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17107 new member.
17108 (symbol_destructor_set): Adjust.
17109 * src/output.c (symbol_destructors_output): Output the destructor
17110 locations.
17111 Output the symbol name.
17112 * data/bison.simple (b4_symbol_destructor): Adjust.
17113
17114 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17115 and Akim Demaille <akim@epita.fr>
17116
17117 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17118 what's left on the stack when the error recovery hits EOF.
17119 * tests/actions.at (Destructors): Complete to exercise this case.
17120
17121 2002-06-17 Akim Demaille <akim@epita.fr>
17122
17123 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17124 arguments is really empty, not only equal to `[]'.
17125 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17126 member.
17127 (symbol_destructor_set): New.
17128 * src/output.c (symbol_destructors_output): New.
17129 * src/reader.h (brace_code_t, current_braced_code): New.
17130 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17131 (handle_dollar): Rename as...
17132 (handle_action_dollar): this.
17133 (handle_destructor_dollar): New.
17134 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17135 (grammar_declaration): Use it.
17136 * data/bison.simple (yystos): Is always defined.
17137 (yydestructor): New.
17138 * tests/actions.at (Destructors): New.
17139 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17140
17141 2002-06-17 Akim Demaille <akim@epita.fr>
17142
17143 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17144 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17145 rule_length only when needed.
17146 * src/output.c (actions_output, token_definitions_output): Output
17147 the full M4 block.
17148 * src/symtab.c: Don't access directly to the symbol tag, use
17149 symbol_tag_get.
17150 * src/parse-gram.y: Use symbol_list_free.
17151
17152 2002-06-17 Akim Demaille <akim@epita.fr>
17153
17154 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17155 (symbol_list_prepend, get_type_name): Move to...
17156 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17157 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17158 Adjust all callers.
17159 (symbol_list_free): New.
17160 * src/scan-gram.l (handle_dollar): Takes a location.
17161 * tests/input.at (Invalid $n): Adjust.
17162
17163 2002-06-17 Akim Demaille <akim@epita.fr>
17164
17165 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17166 (symbol_list_prepend): New.
17167 * src/parse-gram.y (%union): `list' is a new member.
17168 (symbols.1): New, replaces...
17169 (terms_to_prec.1, nterms_to_type.1): these.
17170 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17171 Take a location as additional argument.
17172 Adjust all callers.
17173
17174 2002-06-15 Akim Demaille <akim@epita.fr>
17175
17176 * src/parse-gram.y: Move %token in the declaration section so that
17177 we don't depend upon CVS Bison.
17178
17179 2002-06-15 Akim Demaille <akim@epita.fr>
17180
17181 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17182 * src/print.c (print_core): Use it.
17183
17184 2002-06-15 Akim Demaille <akim@epita.fr>
17185
17186 * src/conflicts.c (log_resolution): Accept the rule involved in
17187 the sr conflicts instead of the lookahead number that points to
17188 that rule.
17189 (flush_reduce): Accept the current lookahead vector as argument,
17190 instead of the index in LA.
17191 (resolve_sr_conflict): Accept the current number of lookahead
17192 bitset to consider for the STATE, instead of the index in LA.
17193 (set_conflicts): Adjust.
17194 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17195
17196 2002-06-15 Akim Demaille <akim@epita.fr>
17197
17198 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17199 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17200 Adjust all dependencies.
17201 * src/lalr.c (initialize_lookaheads): Split into...
17202 (states_lookaheads_count, states_lookaheads_initialize): these.
17203 (lalr): Adjust.
17204
17205 2002-06-15 Akim Demaille <akim@epita.fr>
17206
17207 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17208 out of...
17209 (grammar_rules_print): here.
17210 * src/reduce.c (reduce_output): Use it.
17211 * tests/reduce.at (Useless Rules, Reduced Automaton)
17212 (Underivable Rules): Adjust.
17213
17214 2002-06-15 Akim Demaille <akim@epita.fr>
17215
17216 Copy BYacc's nice way to report the grammar.
17217
17218 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17219 New.
17220 Don't print the rules' location, it is confusing and useless.
17221 (rule_print): Use grammar_rhs_print.
17222 * src/print.c (print_grammar): Use grammar_rules_print.
17223
17224 2002-06-15 Akim Demaille <akim@epita.fr>
17225
17226 Complete and rationalize `useless thing' warnings.
17227
17228 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17229 (symbol_tag_print): New.
17230 Use them everywhere in place of accessing directly the tag member.
17231 * src/gram.h, src/gram.c (rule_print): New.
17232 Use it where a rule used to be printed `by hand'.
17233 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17234 (reduce_grammar_tables): Report the useless rules.
17235 (reduce_print): Useless things are a warning, not an error.
17236 Report it as such.
17237 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17238 (Reduced Automaton, Underivable Rules): Adjust.
17239 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17240 * tests/conflicts.at (Unresolved SR Conflicts)
17241 (Solved SR Conflicts): Adjust.
17242
17243 2002-06-15 Akim Demaille <akim@epita.fr>
17244
17245 Let symbols have a location.
17246
17247 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17248 (getsym): Adjust.
17249 Adjust all callers.
17250 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17251 Use location_t, not int.
17252 * src/symtab.c (symbol_check_defined): Take advantage of the
17253 location.
17254 * tests/regression.at (Invalid inputs): Adjust.
17255
17256 2002-06-15 Akim Demaille <akim@epita.fr>
17257
17258 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17259 (input): Don't try to initialize yylloc here, do it in the
17260 scanner.
17261 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17262 * src/gram.h (rule_t): Change line and action_line into location
17263 and action_location, of location_t type.
17264 Adjust all dependencies.
17265 * src/location.h, src/location.c (empty_location): New.
17266 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17267 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17268 (grammar_current_rule_symbol_append)
17269 (grammar_current_rule_action_append): Expect a location as argument.
17270 * src/reader.c (grammar_midrule_action): Adjust to attach an
17271 action's location as dummy symbol location.
17272 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17273 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17274 the line numbers.
17275
17276 2002-06-14 Akim Demaille <akim@epita.fr>
17277
17278 Grammar declarations may be found in the grammar section.
17279
17280 * src/parse-gram.y (rules_or_grammar_declaration): New.
17281 (declarations): Each declaration may end with a semicolon, not
17282 just...
17283 (grammar_declaration): `"%union"'.
17284 (grammar): Branch to rules_or_grammar_declaration.
17285
17286 2002-06-14 Akim Demaille <akim@epita.fr>
17287
17288 * src/main.c (main): Invoke scanner_free.
17289
17290 2002-06-14 Akim Demaille <akim@epita.fr>
17291
17292 * src/output.c (m4_invoke): Extracted from...
17293 (output_skeleton): here.
17294 Free tempfile.
17295
17296 2002-06-14 Akim Demaille <akim@epita.fr>
17297
17298 * src/parse-gram.y (directives, directive, gram)
17299 (grammar_directives, precedence_directives, precedence_directive):
17300 Rename as...
17301 (declarations, declaration, grammar, grammar_declaration)
17302 (precedence_declaration, precedence_declarator): these.
17303 (symbol_declaration): New.
17304
17305 2002-06-14 Akim Demaille <akim@epita.fr>
17306
17307 * src/files.c (action_obstack): Remove, unused.
17308 (output_obstack): Remove it, and all its dependencies, as it is no
17309 longer needed.
17310 * src/reader.c (epilogue_set): Build the epilogue in the
17311 muscle_obstack.
17312 * src/output.h, src/output.c (muscle_obstack): Move to...
17313 * src/muscle_tab.h, src/muscle_tab.h: here.
17314 (muscle_init): Initialize muscle_obstack.
17315 (muscle_free): New.
17316 * src/main.c (main): Call it.
17317
17318 2002-06-14 Akim Demaille <akim@epita.fr>
17319
17320 * src/location.h: New, extracted from...
17321 * src/reader.h: here.
17322 * src/Makefile.am (noinst_HEADERS): Merge into
17323 (bison_SOURCES): this.
17324 Add location.h.
17325 * src/parse-gram.y: Use location_t instead of Bison's.
17326 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17327 Use location_t instead of ints.
17328
17329 2002-06-14 Akim Demaille <akim@epita.fr>
17330
17331 * data/bison.simple, data/bison.c++: Be sure to restore the
17332 current #line when returning to the skeleton contents after having
17333 exposed the input file's #line.
17334
17335 2002-06-12 Akim Demaille <akim@epita.fr>
17336
17337 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17338 eager.
17339 * tests/actions.at (Exotic Dollars): New.
17340
17341 2002-06-12 Akim Demaille <akim@epita.fr>
17342
17343 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17344 ['"/] too eagerly.
17345 * tests/input.at (Torturing the Scanner): New.
17346
17347 2002-06-11 Akim Demaille <akim@epita.fr>
17348
17349 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17350 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17351 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17352 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17353 * src/reader.c (reader): Use it.
17354
17355 2002-06-11 Akim Demaille <akim@epita.fr>
17356
17357 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17358 Adjust all callers.
17359 (scanner_last_string_free): New.
17360
17361 2002-06-11 Akim Demaille <akim@epita.fr>
17362
17363 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17364 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17365 (last_string, YY_OBS_FREE): New.
17366 Use them when returning an ID.
17367
17368 2002-06-11 Akim Demaille <akim@epita.fr>
17369
17370 Have Bison grammars parsed by a Bison grammar.
17371
17372 * src/reader.c, src/reader.h (prologue_augment): New.
17373 * src/reader.c (copy_definition): Remove.
17374
17375 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17376 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17377 (grammar_current_rule_prec_set, grammar_current_rule_check)
17378 (grammar_current_rule_symbol_append)
17379 (grammar_current_rule_action_append): Export.
17380 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17381 (symbol_list_action_append): Remove.
17382 Hook the routines from reader.
17383 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17384 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17385
17386 * src/reader.c (read_declarations): Remove, unused.
17387
17388 * src/parse-gram.y: Handle the epilogue.
17389 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17390 (grammar_start_symbol_set): this.
17391 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17392 * src/reader.c (readgram): Remove, unused.
17393 (reader): Adjust to insert eoftoken and axiom where appropriate.
17394
17395 * src/reader.c (copy_dollar): Replace with...
17396 * src/scan-gram.h (handle_dollar): this.
17397 * src/parse-gram.y: Remove `%thong'.
17398
17399 * src/reader.c (copy_at): Replace with...
17400 * src/scan-gram.h (handle_at): this.
17401
17402 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17403 New.
17404
17405 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17406 time being.
17407
17408 * src/reader.h, src/reader.c (grammar_rule_end): New.
17409
17410 * src/parse.y (current_type, current_class): New.
17411 Implement `%nterm', `%token' support.
17412 Merge `%term' into `%token'.
17413 (string_as_id): New.
17414 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17415 type name.
17416
17417 * src/parse-gram.y: Be sure to handle properly the beginning of
17418 rules.
17419
17420 * src/parse-gram.y: Handle %type.
17421 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17422
17423 * src/parse-gram.y: More directives support.
17424 * src/options.c: No longer handle source directives.
17425
17426 * src/parse-gram.y: Fix %output.
17427
17428 * src/parse-gram.y: Handle %union.
17429 Use the prologue locations.
17430 * src/reader.c (parse_union_decl): Remove.
17431
17432 * src/reader.h, src/reader.c (epilogue_set): New.
17433 * src/parse-gram.y: Use it.
17434
17435 * data/bison.simple, data/bison.c++: b4_stype is now either not
17436 defined, then default to int, or to the contents of %union,
17437 without `union' itself.
17438 Adjust.
17439 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17440
17441 * src/output.c (actions_output): Don't output braces, as they are
17442 already handled by the scanner.
17443
17444 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17445 characters to themselves.
17446
17447 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17448 that the epilogue has a proper #line.
17449
17450 * src/parse-gram.y: Handle precedence/associativity.
17451
17452 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17453 a terminal.
17454 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17455 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17456 at all to define terminals that cannot be emitted.
17457
17458 * src/scan-gram.l: Escape M4 characters.
17459
17460 * src/scan-gram.l: Working properly with escapes in user
17461 strings/characters.
17462
17463 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17464 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17465 grammar.
17466 Use more modest sizes, as for the time being the parser does not
17467 release memory, and therefore the process swallows a huge amount
17468 of memory.
17469
17470 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17471 stricter %token grammar.
17472
17473 * src/symtab.h (associativity): Add `undef_assoc'.
17474 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17475 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17476
17477 * tests/regression.at (Invalid %directive): Remove, as it is now
17478 meaningless.
17479 (Invalid inputs): Adjust to the new error messages.
17480 (Token definitions): The new grammar doesn't allow too many
17481 eccentricities.
17482
17483 * src/lex.h, src/lex.c: Remove.
17484 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17485 (copy_character, copy_string2, copy_string, copy_identifier)
17486 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17487 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17488 (parse_action): Remove.
17489 * po/POTFILES.in: Adjust.
17490
17491 2002-06-11 Akim Demaille <akim@epita.fr>
17492
17493 * src/reader.c (parse_action): Don't store directly into the
17494 rule's action member: return the action as a string.
17495 Don't require `rule_length' as an argument: compute it.
17496 (grammar_current_rule_symbol_append)
17497 (grammar_current_rule_action_append): New, eved out from
17498 (readgram): here.
17499 Remove `action_flag', `rulelength', unused now.
17500
17501 2002-06-11 Akim Demaille <akim@epita.fr>
17502
17503 * src/reader.c (grammar_current_rule_prec_set).
17504 (grammar_current_rule_check): New, eved out from...
17505 (readgram): here.
17506 Remove `xaction', `first_rhs': useless.
17507 * tests/input.at (Type clashes): New.
17508 * tests/existing.at (GNU Cim Grammar): Adjust.
17509
17510 2002-06-11 Akim Demaille <akim@epita.fr>
17511
17512 * src/reader.c (grammar_midrule_action): New, Eved out from
17513 (readgram): here.
17514
17515 2002-06-11 Akim Demaille <akim@epita.fr>
17516
17517 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17518 New.
17519 (readgram): Use them as replacement of inlined code, crule and
17520 crule1.
17521
17522 2002-06-11 Akim Demaille <akim@epita.fr>
17523
17524 * src/reader.c (grammar_end, grammar_symbol_append): New.
17525 (readgram): Use them.
17526 Make the use of `p' as local as possible.
17527
17528 2002-06-10 Akim Demaille <akim@epita.fr>
17529
17530 GCJ's parser requires the tokens to be defined before the prologue.
17531
17532 * data/bison.simple: Output the token definition before the user's
17533 prologue.
17534 * tests/regression.at (Braces parsing, Duplicate string)
17535 (Mixing %token styles): Check the output from bison.
17536 (Early token definitions): New.
17537
17538 2002-06-10 Akim Demaille <akim@epita.fr>
17539
17540 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17541 assigning twice the same user number to a token, so that we can
17542 use it in...
17543 * src/lex.c (lex): here.
17544 Also use `symbol_class_set' instead of hand written code.
17545 * src/reader.c (parse_assoc_decl): Likewise.
17546
17547 2002-06-10 Akim Demaille <akim@epita.fr>
17548
17549 * src/symtab.c, src/symtab.c (symbol_class_set)
17550 (symbol_user_token_number_set): New.
17551 * src/reader.c (parse_token_decl): Use them.
17552 Use a switch instead of ifs.
17553 Use a single argument.
17554
17555 2002-06-10 Akim Demaille <akim@epita.fr>
17556
17557 Remove `%thong' support as it is undocumented, unused, duplicates
17558 `%token's job, and creates useless e-mail traffic with people who
17559 want to know what it is, why it is undocumented, unused, and
17560 duplicates `%token's job.
17561
17562 * src/reader.c (parse_thong_decl): Remove.
17563 * src/options.c (option_table): Remove "thong".
17564 * src/lex.h (tok_thong): Remove.
17565
17566 2002-06-10 Akim Demaille <akim@epita.fr>
17567
17568 * src/symtab.c, src/symtab.c (symbol_type_set)
17569 (symbol_precedence_set): New.
17570 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17571 (value_components_used): Remove, unused.
17572
17573 2002-06-09 Akim Demaille <akim@epita.fr>
17574
17575 Move symbols handling code out of the reader.
17576
17577 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17578 (axiom): Move to...
17579 * src/symtab.h, src/symtab.c: here.
17580
17581 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17582 * src/reader.c (startval): Rename as...
17583 * src/symtab.h, src/symtab.c (startsymbol): this.
17584 * src/reader.c: Adjust.
17585
17586 * src/reader.c (symbol_check_defined, symbol_make_alias)
17587 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17588 (token_translations_init)
17589 Move to...
17590 * src/symtab.c: here.
17591 * src/reader.c (packsymbols): Move to...
17592 * src/symtab.h, src/symtab.c (symbols_pack): here.
17593 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17594 argument.
17595
17596 2002-06-03 Akim Demaille <akim@epita.fr>
17597
17598 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17599 then statements.
17600
17601 2002-06-03 Akim Demaille <akim@epita.fr>
17602
17603 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17604 structs with non literals.
17605 * src/scan-skel.l: never-interactive.
17606 * src/conflicts.c (enum conflict_resolution_e): No trailing
17607 comma.
17608 * src/getargs.c (usage): Split long literal strings.
17609 Reported by Hans Aberg.
17610
17611 2002-05-28 Akim Demaille <akim@epita.fr>
17612
17613 * data/bison.c++: Use C++ ostreams.
17614 (cdebug_): New member.
17615
17616 2002-05-28 Akim Demaille <akim@epita.fr>
17617
17618 * src/output.c (output_skeleton): Be sure to allocate enough room
17619 for `/' _and_ for `\0' in full_skeleton.
17620
17621 2002-05-28 Akim Demaille <akim@epita.fr>
17622
17623 * data/bison.c++: Catch up with bison.simple:
17624 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17625 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17626 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17627 and popping traces.
17628
17629 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17630
17631 * src/output.c (output_skeleton): Put an explicit path in front of
17632 the skeleton file name, rather than relying on the -I directory,
17633 to partially alleviate effects of having a skeleton file lying around
17634 in the current directory.
17635
17636 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17637
17638 * src/conflicts.c (log_resolution): Correct typo:
17639 obstack_printf should be obstack_fgrow1.
17640
17641 2002-05-26 Akim Demaille <akim@epita.fr>
17642
17643 * src/state.h (state_t): `solved_conflicts' is a new member.
17644 * src/LR0.c (new_state): Set it to 0.
17645 * src/conflicts.h, src/conflicts.c (print_conflicts)
17646 (free_conflicts, solve_conflicts): Rename as...
17647 (conflicts_print, conflicts_free, conflicts_solve): these.
17648 Adjust callers.
17649 * src/conflicts.c (enum conflict_resolution_e)
17650 (solved_conflicts_obstack): New, used by...
17651 (log_resolution): this.
17652 Adjust to attach the conflict resolution to each state.
17653 Complete the description with the precedence/associativity
17654 information.
17655 (resolve_sr_conflict): Adjust.
17656 * src/print.c (print_state): Output its solved_conflicts.
17657 * tests/conflicts.at (Unresolved SR Conflicts)
17658 (Solved SR Conflicts): Exercise --report=all.
17659
17660 2002-05-26 Akim Demaille <akim@epita.fr>
17661
17662 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17663 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17664 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17665 (token_number_t, item_number_as_token_number)
17666 (token_number_as_item_number, muscle_insert_token_number_table):
17667 Rename as...
17668 (symbol_number_t, item_number_as_symbol_number)
17669 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17670 these, since it is more appropriate.
17671
17672 2002-05-26 Akim Demaille <akim@epita.fr>
17673
17674 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17675 `Error:' lines.
17676 * data/bison.simple (yystos) [YYDEBUG]: New.
17677 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17678 error recovery.
17679 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17680
17681 2002-05-25 Akim Demaille <akim@epita.fr>
17682
17683 * doc/bison.texinfo (Debugging): Split into...
17684 (Tracing): this new section, its former contents, and...
17685 (Understanding): this new section.
17686 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17687 by...
17688 (report_flag): this.
17689 Adjust all dependencies.
17690 (report_args, report_types, report_argmatch): New.
17691 (usage, getargs): Report/support -r, --report.
17692 * src/options.h
17693 (struct option_table_struct): Rename as..,
17694 (struct option_table_s): this.
17695 Rename the `set_flag' member to `flag' to match with getopt_long's
17696 struct.
17697 * src/options.c (option_table): Split verbose into an entry for
17698 %verbose, and another for --verbose.
17699 Support --report/-r, so remove -r from the obsolete --raw.
17700 * src/print.c: Attach full item sets and lookaheads reports to
17701 report_flag instead of trace_flag.
17702 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17703
17704 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17705 and Paul Eggert <eggert@twinsun.com>
17706
17707 * data/bison.simple (yyparse): Correct error handling to conform to
17708 POSIX and yacc. Specifically, after syntax error is discovered,
17709 do not reduce further before shifting the error token.
17710 Clean up the code a bit by removing the labels yyerrdefault,
17711 yyerrhandle, yyerrpop.
17712 * NEWS: Document the above.
17713
17714 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17715
17716 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17717 type; it isn't always big enough, since it doesn't necessarily
17718 include non-terminals.
17719 (yytranslate): Expand definition of yy_token_number_type, so that
17720 the latter can be removed.
17721 (yy_token_number_type): Remove, only one use.
17722 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17723 don't use TokenNumberType as element type.
17724
17725 * tests/regression.at: Modify expected output to agree with change
17726 to yyr1 and yytranslate.
17727
17728 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17729
17730 * src/reader.c (parse_action): Use copy_character instead of
17731 obstack_1grow.
17732
17733 2002-05-13 Akim Demaille <akim@epita.fr>
17734
17735 * tests/regression.at (Token definitions): Prototype yylex and
17736 yyerror.
17737
17738 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17739
17740 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17741 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17742 32-bit arithmetic.
17743 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17744
17745 2002-05-07 Akim Demaille <akim@epita.fr>
17746
17747 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17748 avoid GCC warnings.
17749
17750 2002-05-07 Akim Demaille <akim@epita.fr>
17751
17752 Kill GCC warnings.
17753
17754 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17755 over the RHS of each rule.
17756 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17757 * src/state.h (state_t): Member `nitems' is unsigned short.
17758 * src/LR0.c (get_state): Adjust.
17759 * src/reader.c (packgram): Likewise.
17760 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17761 `Type'.
17762 (muscle_insert_int_table): Remove, unused.
17763 (prepare_rules): Remove `max'.
17764
17765 2002-05-06 Akim Demaille <akim@epita.fr>
17766
17767 * src/closure.c (print_firsts): Display of the symbol tags.
17768 (bitmatrix_print): Move to...
17769 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17770 here.
17771 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17772
17773 2002-05-06 Akim Demaille <akim@epita.fr>
17774
17775 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17776 hash_do_for_each.
17777
17778 2002-05-06 Akim Demaille <akim@epita.fr>
17779
17780 * src/LR0.c (new_state, get_state): Instead of using the global
17781 `kernel_size' and `kernel_base', have two new arguments:
17782 `core_size' and `core'.
17783 Adjust callers.
17784
17785 2002-05-06 Akim Demaille <akim@epita.fr>
17786
17787 * src/reader.c (packgram): No longer end `ritem' with a 0
17788 sentinel: it is not used.
17789
17790 2002-05-05 Akim Demaille <akim@epita.fr>
17791
17792 New experimental feature: display the lookaheads in the report and
17793 graph.
17794
17795 * src/print (print_core): When --trace-flag, display the rules
17796 lookaheads.
17797 * src/print_graph.c (print_core): Likewise.
17798 Swap the arguments.
17799 Adjust caller.
17800
17801 2002-05-05 Akim Demaille <akim@epita.fr>
17802
17803 * tests/torture.at (Many lookaheads): New test.
17804
17805 2002-05-05 Akim Demaille <akim@epita.fr>
17806
17807 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17808 (GENERATE_MUSCLE_INSERT_TABLE): this.
17809 (output_int_table, output_unsigned_int_table, output_short_table)
17810 (output_token_number_table, output_item_number_table): Replace with...
17811 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17812 (muscle_insert_short_table, muscle_insert_token_number_table)
17813 (muscle_insert_item_number_table): these.
17814 Adjust all callers.
17815 (prepare_tokens): Don't free `translations', since...
17816 * src/reader.h, src/reader.c (grammar_free): do it.
17817 Move to...
17818 * src/gram.h, src/gram.c (grammar_free): here.
17819 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17820 b4_translate_max.
17821
17822 2002-05-05 Akim Demaille <akim@epita.fr>
17823
17824 * src/output.c (output_unsigned_int_table): New.
17825 (prepare_rules): `i' is unsigned.
17826 `prhs', `rline', `r2' are unsigned int.
17827 Rename muscle `rhs_number_max' as `rhs_max'.
17828 Output muscles `prhs_max', `rline_max', and `r2_max'.
17829 Free rline and r1.
17830 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17831 to compute types instead of constant types.
17832 * tests/regression.at (Web2c Actions): Adjust.
17833
17834 2002-05-04 Akim Demaille <akim@epita.fr>
17835
17836 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17837 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17838 Adjust dependencies.
17839 * src/output.c (token_definitions_output): Be sure not to output a
17840 `#define 'a'' when fed with `%token 'a' "a"'.
17841 * tests/regression.at (Token definitions): New.
17842
17843 2002-05-03 Paul Eggert <eggert@twinsun.com>
17844
17845 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17846 for K&R C.
17847
17848 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17849
17850 * Makefile.am (SUBDIRS): Remove intl.
17851 (EXTRA_DIST): Add config/config.rpath.
17852
17853 2002-05-03 Akim Demaille <akim@epita.fr>
17854
17855 * data/bison.simple (m4_if): Don't output empty enums.
17856 And actually, output valid enum definitions :(.
17857
17858 2002-05-03 Akim Demaille <akim@epita.fr>
17859
17860 * configure.bat: Remove, completely obsolete.
17861 * Makefile.am (EXTRA_DIST): Adjust.
17862 Don't distribute config.rpath...
17863 * config/Makefile.am (EXTRA_DIST): Do it.
17864
17865 2002-05-03 Akim Demaille <akim@epita.fr>
17866
17867 * configure.in (GETTEXT_VERSION): New.
17868 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17869
17870 2002-05-03 Akim Demaille <akim@epita.fr>
17871
17872 * data/bison.simple (b4_token_enum): New.
17873 (b4_token_defines): Use it to output tokens both as #define and
17874 enums.
17875 Suggested by Paul Eggert.
17876 * src/output.c (token_definitions_output): Don't output spurious
17877 white spaces.
17878
17879 2002-05-03 Akim Demaille <akim@epita.fr>
17880
17881 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17882
17883 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17884
17885 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17886 Update the stack class, give a try to deque as the default container.
17887
17888 2002-05-02 Akim Demaille <akim@epita.fr>
17889
17890 * data/bison.simple (yyparse): Do not implement @$ = @1.
17891 (YYLLOC_DEFAULT): Adjust to do it.
17892 * doc/bison.texinfo (Location Default Action): Fix.
17893
17894 2002-05-02 Akim Demaille <akim@epita.fr>
17895
17896 * src/reader.c (parse_braces): Merge into...
17897 (parse_action): this.
17898
17899 2002-05-02 Akim Demaille <akim@epita.fr>
17900
17901 * configure.in (ALL_LINGUAS): Remove.
17902 * po/LINGUAS, hr.po: New.
17903
17904 2002-05-02 Akim Demaille <akim@epita.fr>
17905
17906 Remove the so called hairy (semantic) parsers.
17907
17908 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17909 * src/gram.h, src/gram.c (semantic_parser): Remove.
17910 (rule_t): Remove the guard and guard_line members.
17911 * src/lex.h (token_t): remove tok_guard.
17912 * src/options.c (option_table): Remove %guard and %semantic_parser
17913 support.
17914 * src/output.c, src/output.h (guards_output): Remove.
17915 (prepare): Adjust.
17916 (token_definitions_output): Don't output the `T'
17917 tokens (???).
17918 (output_skeleton): Don't output the guards.
17919 * src/files.c, src/files.c (attrsfile): Remove.
17920 * src/reader.c (symbol_list): Remove the guard and guard_line
17921 members.
17922 Adjust dependencies.
17923 (parse_guard): Remove.
17924 * data/bison.hairy: Remove.
17925 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17926 BISON_HAIRY.
17927
17928 2002-05-02 Akim Demaille <akim@epita.fr>
17929
17930 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17931 (parse_guard): Rename the formal argument `stack_offset' as
17932 `rule_length', which is more readable.
17933 Adjust callers.
17934 (copy_at, copy_dollar): Instead of outputting the hard coded
17935 values of $$, $n and so forth, output invocation to b4_lhs_value,
17936 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17937 Note: this patch partially drops `semantic-parser' support: it
17938 always does `rule_length - n', where semantic parsers ought to
17939 always use `-n'.
17940 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17941 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17942
17943 2002-05-02 Akim Demaille <akim@epita.fr>
17944
17945 * configure.in (AC_INIT): Bump to 1.49b.
17946 (AM_INIT_AUTOMAKE): Short invocation.
17947
17948 2002-05-02 Akim Demaille <akim@epita.fr>
17949
17950 Version 1.49a.
17951
17952 2002-05-01 Akim Demaille <akim@epita.fr>
17953
17954 * src/skeleton.h: Remove.
17955
17956 2002-05-01 Akim Demaille <akim@epita.fr>
17957
17958 * src/skeleton.h: Fix the #endif.
17959 Reported by Magnus Fromreide.
17960
17961 2002-04-26 Paul Eggert <eggert@twinsun.com>
17962
17963 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17964 Define if we define YYSTYPE and YYLTYPE, respectively.
17965 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17966
17967 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17968
17969 * src/scan-skel.l: Postprocess quadrigraphs.
17970
17971 * src/reader.c (copy_character): New function, used to output
17972 single characters while replacing `[' and `]' with quadrigraphs, to
17973 avoid troubles with M4 quotes.
17974 (copy_comment): Output characters with copy_character.
17975 (read_additionnal_code): Likewise.
17976 (copy_string2): Likewise.
17977 (copy_definition): Likewise.
17978
17979 * tests/calc.at: Exercise M4 quoting.
17980
17981 2002-04-25 Akim Demaille <akim@epita.fr>
17982
17983 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17984 between `!' and the command.
17985 Reported by Paul Eggert.
17986
17987 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17988
17989 * tests/calc.at: Exercise prologue splitting.
17990
17991 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17992 `b4_post_prologue' instead of `b4_prologue'.
17993
17994 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17995 muscles.
17996 (output): Free pre_prologue_obstack and post_prologue_obstack.
17997 * src/files.h, src/files.c (attrs_obstack): Remove.
17998 (pre_prologue_obstack, post_prologue_obstack): New.
17999 * src/reader.c (copy_definition): Add a parameter to specify the
18000 obstack to fill, instead of using attrs_obstack unconditionally.
18001 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18002 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18003
18004 2002-04-23 Paul Eggert <eggert@twinsun.com>
18005
18006 * data/bison.simple: Remove unnecessary commentary and white
18007 space differences from 1_29-branch.
18008 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18009
18010 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18011 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18012 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18013 constructors or destructors.
18014
18015 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18016
18017 2002-04-23 Akim Demaille <akim@epita.fr>
18018
18019 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18020 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18021 location with columns.
18022 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18023 All reported by Paul Eggert.
18024
18025 2002-04-22 Akim Demaille <akim@epita.fr>
18026
18027 * src/reduce.c (dump_grammar): Move to...
18028 * src/gram.h, src/gram.c (grammar_dump): here.
18029 Be sure to separate long item numbers.
18030 Don't read the members of a rule's prec if its nil.
18031
18032 2002-04-22 Akim Demaille <akim@epita.fr>
18033
18034 * src/output.c (table_size, table_grow): New.
18035 (MAXTABLE): Remove, replace uses with table_size.
18036 (pack_vector): Instead of dying when the table is too big, grow it.
18037
18038 2002-04-22 Akim Demaille <akim@epita.fr>
18039
18040 * data/bison.simple (yyr1): Its type is that of a token number.
18041 * data/bison.c++ (r1_): Likewise.
18042 * tests/regression.at (Web2c Actions): Adjust.
18043
18044 2002-04-22 Akim Demaille <akim@epita.fr>
18045
18046 * src/reader.c (token_translations_init): 256 is now the default
18047 value for the error token, i.e., it will be assigned another
18048 number if the user assigned 256 to one of her tokens.
18049 (reader): Don't force 256 to error.
18050 * doc/bison.texinfo (Symbols): Adjust.
18051 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18052 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18053 etc. instead of 10, 20, 30 (which was used to `jump' over error
18054 (256) and undefined (2)).
18055
18056 2002-04-22 Akim Demaille <akim@epita.fr>
18057
18058 Propagate more token_number_t.
18059
18060 * src/gram.h (token_number_as_item_number)
18061 (item_number_as_token_number): New.
18062 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18063 Use it to create output_item_number_table and
18064 output_token_number_table.
18065 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18066 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18067 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18068 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18069
18070 2002-04-22 Akim Demaille <akim@epita.fr>
18071
18072 * src/output.h, src/output.c (get_lines_number): Remove.
18073
18074 2002-04-19 Akim Demaille <akim@epita.fr>
18075
18076 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18077 as Lex/Flex'.
18078 (Debugging): More details about enabling the debugging features.
18079 (Table of Symbols): Describe $$, $n, @$, and @n.
18080 Suggested by Tim Josling.
18081
18082 2002-04-19 Akim Demaille <akim@epita.fr>
18083
18084 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18085
18086 2002-04-10 Akim Demaille <akim@epita.fr>
18087
18088 * src/system.h: Rely on HAVE_LIMITS_H.
18089 Suggested by Paul Eggert.
18090
18091 2002-04-09 Akim Demaille <akim@epita.fr>
18092
18093 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18094 full stderr, and strip it according to the bison options, instead
18095 of composing the error message from different bits.
18096 This makes it easier to check for several error messages.
18097 Adjust all the invocations.
18098 Add an invocation exercising the error token.
18099 Add an invocation demonstrating a stupid error message.
18100 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18101 Adjust the tests.
18102 Error message are for stderr, not stdout.
18103
18104 2002-04-09 Akim Demaille <akim@epita.fr>
18105
18106 * src/gram.h, src/gram.c (error_token_number): Remove, use
18107 errtoken->number.
18108 * src/reader.c (reader): Don't specify the user token number (2)
18109 for $undefined, as it uselessly prevents using it.
18110 * src/gram.h (token_number_t): Move to...
18111 * src/symtab.h: here.
18112 (state_t.number): Is a token_number_t.
18113 * src/print.c, src/reader.c: Use undeftoken->number instead of
18114 hard coded 2.
18115 (Even though this 2 is not the same as above: the number of the
18116 undeftoken remains being 2, it is its user token number which
18117 might not be 2).
18118 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18119 `user_token_number_max'.
18120 Output `undef_token_number'.
18121 * data/bison.simple, data/bison.c++: Use them.
18122 Be sure to map invalid yylex return values to
18123 `undef_token_number'. This saves us from gratuitous SEGV.
18124
18125 * tests/conflicts.at (Solved SR Conflicts)
18126 (Unresolved SR Conflicts): Adjust.
18127 * tests/regression.at (Web2c Actions): Adjust.
18128
18129 2002-04-08 Akim Demaille <akim@epita.fr>
18130
18131 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18132 Adding #line.
18133 Remove the duplicate `typedefs'.
18134 (RhsNumberType): Fix the declaration and various other typos.
18135 Use __ofile__.
18136 * data/bison.simple: Use __ofile__.
18137 * src/scan-skel.l: Handle __ofile__.
18138
18139 2002-04-08 Akim Demaille <akim@epita.fr>
18140
18141 * src/gram.h (item_number_t): New, the type of item numbers in
18142 RITEM. Note that it must be able to code symbol numbers as
18143 positive number, and the negation of rule numbers as negative
18144 numbers.
18145 Adjust all dependencies (pretty many).
18146 * src/reduce.c (rule): Remove this `short *' pointer: use
18147 item_number_t.
18148 * src/system.h (MINSHORT, MAXSHORT): Remove.
18149 Include `limits.h'.
18150 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18151 (shortcpy): Remove.
18152 (MAXTABLE): Move to...
18153 * src/output.c (MAXTABLE): here.
18154 (prepare_rules): Use output_int_table to output rhs.
18155 * data/bison.simple, data/bison.c++: Adjust.
18156 * tests/torture.at (Big triangle): Move the limit from 254 to
18157 500.
18158 * tests/regression.at (Web2c Actions): Ajust.
18159
18160 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18161 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18162 passes, but produces negative #line number, once fixed, GCC is
18163 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18164 C), it passes.
18165 * src/state.h (state_h): Code input lines on ints, not shorts.
18166
18167 2002-04-08 Akim Demaille <akim@epita.fr>
18168
18169 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18170 and then the grammar.
18171
18172 2002-04-08 Akim Demaille <akim@epita.fr>
18173
18174 * src/system.h: No longer using strndup.
18175
18176 2002-04-07 Akim Demaille <akim@epita.fr>
18177
18178 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18179 * src/output.c (output_table_data): Return the longest number.
18180 (prepare_tokens): Output `token_number_max').
18181 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18182 New.
18183 Use them to define yy_token_number_type/TokenNumberType.
18184 Use this type for yytranslate.
18185 * tests/torture.at (Big triangle): Push the limit from 124 to
18186 253.
18187 * tests/regression.at (Web2c Actions): Adjust.
18188
18189 2002-04-07 Akim Demaille <akim@epita.fr>
18190
18191 * tests/torture.at (Big triangle): New.
18192 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18193 * tests/existing.at: here.
18194
18195 2002-04-07 Akim Demaille <akim@epita.fr>
18196
18197 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18198 nritems.
18199 Adjust dependencies.
18200
18201 2002-04-07 Akim Demaille <akim@epita.fr>
18202
18203 * src/reader.c: Normalize increments to prefix form.
18204
18205 2002-04-07 Akim Demaille <akim@epita.fr>
18206
18207 * src/reader.c, symtab.c: Remove debugging code.
18208
18209 2002-04-07 Akim Demaille <akim@epita.fr>
18210
18211 Rename all the `bucket's as `symbol_t'.
18212
18213 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18214 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18215 * src/symtab.c, src/symtab.h (bucket): Rename as...
18216 (symbol_t): this.
18217 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18218 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18219 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18220 (buckets_new, buckets_free, buckets_do): Rename as...
18221 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18222 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18223 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18224 (symbols_new, symbols_free, symbols_do): these.
18225
18226 2002-04-07 Akim Demaille <akim@epita.fr>
18227
18228 Use lib/hash for the symbol table.
18229
18230 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18231 EOF.
18232 * src/lex.c (lex): Set the `number' member of new terminals.
18233 * src/reader.c (bucket_check_defined, bucket_make_alias)
18234 (bucket_check_alias_consistence, bucket_translation): New.
18235 (reader, grammar_free, readgram, token_translations_init)
18236 (packsymbols): Adjust.
18237 (reader): Number the predefined tokens.
18238 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18239 for predefined tokens.
18240 * src/symtab.h (bucket): Remove all the hash table related
18241 members.
18242 * src/symtab.c (symtab): Replace by...
18243 (bucket_table): this.
18244 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18245 (buckets_new, buckets_do): New.
18246
18247 2002-04-07 Akim Demaille <akim@epita.fr>
18248
18249 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18250 (start_symbol, max_user_token_number, semantic_parser)
18251 (error_token_number): Initialize.
18252 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18253 Initialize.
18254 (reader): Don't.
18255 (errtoken, eoftoken, undeftoken, axiom): Extern.
18256
18257 2002-04-07 Akim Demaille <akim@epita.fr>
18258
18259 * src/gram.h (rule_s): prec and precsym are now pointers
18260 to the bucket giving the priority/associativity.
18261 Member `associativity' removed: useless.
18262 * src/reduce.c, src/conflicts.c: Adjust.
18263
18264 2002-04-07 Akim Demaille <akim@epita.fr>
18265
18266 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18267 Properly escape the symbols' TAG when outputting them.
18268
18269 2002-04-07 Akim Demaille <akim@epita.fr>
18270
18271 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18272
18273 2002-04-07 Akim Demaille <akim@epita.fr>
18274
18275 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18276 (LArule): this, which is an array to rule_t*.
18277 * src/print.c, src/conflicts.c: Adjust.
18278
18279 2002-04-07 Akim Demaille <akim@epita.fr>
18280
18281 * src/gram.h (rule_t): Rename `number' as `user_number'.
18282 `number' is a new member.
18283 Adjust dependencies.
18284 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18285
18286 2002-04-07 Akim Demaille <akim@epita.fr>
18287
18288 As a result of the previous patch, it is no longer needed
18289 to reorder ritem itself.
18290
18291 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18292
18293 2002-04-07 Akim Demaille <akim@epita.fr>
18294
18295 Be sure never to walk through RITEMS, but use only data related to
18296 the rules themselves. RITEMS should be banished.
18297
18298 * src/output.c (output_token_translations): Rename as...
18299 (prepare_tokens): this.
18300 In addition to `translate', prepare the muscles `tname' and
18301 `toknum', which were handled by...
18302 (output_rule_data): this.
18303 Remove, and move the remainder of its outputs into...
18304 (prepare_rules): this new routines, which also merges content from
18305 (output_gram): this.
18306 (prepare_rules): Be sure never to walk through RITEMS.
18307 (output_stos): Rename as...
18308 (prepare_stos): this.
18309 (output): Always invoke prepare_states, after all, just don't use it
18310 in the output if you don't need it.
18311
18312 2002-04-07 Akim Demaille <akim@epita.fr>
18313
18314 * src/LR0.c (new_state): Display `nstates' as the name of the
18315 newly created state.
18316 Adjust to initialize first_state and last_state if needed.
18317 Be sure to distinguish the initial from the final state.
18318 (new_states): Create the itemset of the initial state, and use
18319 new_state.
18320 * src/closure.c (closure): Now that the initial state has its
18321 items properly set, there is no need for a special case when
18322 creating `ruleset'.
18323
18324 As a result, now the rule 0, reducing to $axiom, is visible in the
18325 outputs. Adjust the test suite.
18326
18327 * tests/conflicts.at (Solved SR Conflicts)
18328 (Unresolved SR Conflicts): Adjust.
18329 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18330 * tests/conflicts.at (S/R in initial): New.
18331
18332 2002-04-07 Akim Demaille <akim@epita.fr>
18333
18334 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18335 the RHS of the rules.
18336 * src/output.c (output_gram): Likewise.
18337
18338 2002-04-07 Akim Demaille <akim@epita.fr>
18339
18340 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18341 bucket.
18342 Adjust all dependencies.
18343 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18344 `number' of the buckets too.
18345 * src/gram.h: Include `symtab.h'.
18346 (associativity): Move to...
18347 * src/symtab.h: here.
18348 No longer include `gram.h'.
18349
18350 2002-04-07 Akim Demaille <akim@epita.fr>
18351
18352 * src/gram.h, src/gram.c (rules_rhs_length): New.
18353 (ritem_longest_rhs): Use it.
18354 * src/gram.h (rule_t): `number' is a new member.
18355 * src/reader.c (packgram): Set it.
18356 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18357 the end of `rules', and count them out of `nrules'.
18358 (reduce_output, dump_grammar): Adjust.
18359 * src/print.c (print_grammar): It is no longer needed to check for
18360 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18361 * tests/reduce.at (Reduced Automaton): New test.
18362
18363 2002-04-07 Akim Demaille <akim@epita.fr>
18364
18365 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18366 lacking `+ 1' to nrules, Bison reported as useless a token if it
18367 was used solely to set the precedence of the last rule...
18368
18369 2002-04-07 Akim Demaille <akim@epita.fr>
18370
18371 * data/bison.c++, data/bison.simple: Don't output the current file
18372 name in #line, to avoid useless diffs between two identical
18373 outputs under different names.
18374
18375 2002-04-07 Akim Demaille <akim@epita.fr>
18376
18377 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18378 Normalize loops to using `< nrules + 1', not `<= nrules'.
18379
18380 2002-04-07 Akim Demaille <akim@epita.fr>
18381
18382 * TODO: Update.
18383
18384 2002-04-07 Akim Demaille <akim@epita.fr>
18385
18386 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18387 bucket.value as bucket.number.
18388
18389 2002-04-07 Akim Demaille <akim@epita.fr>
18390
18391 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18392 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18393 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18394 RHS, instead of being an index in RITEMS.
18395
18396 2002-04-04 Paul Eggert <eggert@twinsun.com>
18397
18398 * doc/bison.texinfo: Update copyright date.
18399 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18400 (Symbols): Warn about running Bison in one character set,
18401 but compiling and/or running in an incompatible one.
18402 Warn about character code 256, too.
18403
18404 2002-04-03 Paul Eggert <eggert@twinsun.com>
18405
18406 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18407 YYERROR_VERBOSE is nonzero, not whether it is defined.
18408
18409 Merge changes from bison-1_29-branch.
18410
18411 2002-03-20 Paul Eggert <eggert@twinsun.com>
18412
18413 Merge fixes from Debian bison_1.34-1.diff.
18414
18415 * configure.in (AC_PREREQ): 2.53.
18416
18417 2002-03-20 Akim Demaille <akim@epita.fr>
18418
18419 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18420
18421 2002-03-19 Paul Eggert <eggert@twinsun.com>
18422
18423 * src/bison.simple (YYCOPY): New macro.
18424 (YYSTACK_RELOCATE): Use it.
18425 Remove Type arg; no longer needed. All callers changed.
18426 (yymemcpy): Remove; no longer needed.
18427
18428 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18429 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18430
18431 2002-03-19 Akim Demaille <akim@epita.fr>
18432
18433 Test and fix the #line outputs.
18434
18435 * tests/atlocal.at (GCC): New.
18436 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18437 (Prologue synch line, %union synch line, Postprologue synch line)
18438 (Action synch line, Epilogue synch line): New tests.
18439 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18440 * data/bison.simple, data/bison.c++: Use it.
18441
18442 2002-03-19 Akim Demaille <akim@epita.fr>
18443
18444 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18445 (Solved SR Conflicts, %expect not enough, %expect right)
18446 (%expect too much): Move to...
18447 * tests/conflicts.at: this new file.
18448
18449 2002-03-19 Akim Demaille <akim@epita.fr>
18450
18451 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18452 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18453 that we can move to enums for instance.
18454 * src/output.c (token_definitions_output): Output a list of
18455 `token-name, token-number' instead of the #define.
18456 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18457
18458 2002-03-14 Akim Demaille <akim@epita.fr>
18459
18460 Use Gettext 0.11.1.
18461
18462 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18463
18464 * data/bison.c++: Make the user able to add members to the generated
18465 parser by subclassing.
18466
18467 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18468
18469 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18470 a character.
18471 Reported by Nicolas Tisserand and Nicolas Burrus.
18472
18473 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18474
18475 * src/reader.c: Warn about lacking semi-colons, do not complain.
18476
18477 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18478
18479 * data/bison.c++: Remove a debug line.
18480
18481 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18482
18483 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18484 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18485 provide a default implementation.
18486
18487 2002-03-04 Akim Demaille <akim@epita.fr>
18488
18489 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18490 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18491 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18492 * tests/semantic.at (Parsing Guards): Similarly.
18493 * src/reader.at (readgram): Complain if the last rule is not ended
18494 with a semi-colon.
18495
18496 2002-03-04 Akim Demaille <akim@epita.fr>
18497
18498 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18499 * src/closure.c: here.
18500 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18501 RTC.
18502 * src/warshall.h, src/warshall.c: Remove.
18503 * tests/sets.at (Broken Closure): Adjust.
18504
18505 2002-03-04 Akim Demaille <akim@epita.fr>
18506
18507 * src/output.c (output_skeleton): tempdir is const.
18508 bytes_read is unused.
18509
18510 2002-03-04 Akim Demaille <akim@epita.fr>
18511
18512 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18513 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18514 Update.
18515 From Michael Hayes.
18516
18517 2002-03-04 Akim Demaille <akim@epita.fr>
18518
18519 * src/closure.c (closure): `r' is unused.
18520
18521 2002-03-04 Akim Demaille <akim@epita.fr>
18522
18523 * tests/sets.at (Broken Closure): Add the ending `;'.
18524 * src/reader.at (readgram): Complain if a rule is not ended with a
18525 semi-colon.
18526
18527 2002-03-04 Akim Demaille <akim@epita.fr>
18528
18529 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18530 (count_sr_conflicts): Use bitset_count.
18531 * src/reduce.c (inaccessable_symbols): Ditto.
18532 (bits_size): Remove.
18533 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18534
18535 2002-03-04 Akim Demaille <akim@epita.fr>
18536
18537 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18538 * src/reduce.c: Remove the `bitset_zero's following the
18539 `bitset_create's, as now it is performed by the latter.
18540
18541 2002-03-04 Akim Demaille <akim@epita.fr>
18542
18543 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18544 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18545 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18546 latest sources from Michael.
18547
18548 2002-03-04 Akim Demaille <akim@epita.fr>
18549
18550 * src/output.c (output): Don't free the grammar.
18551 * src/reader.c (grammar_free): New.
18552 * src/main.c (main): Call it and don't free symtab here.
18553
18554 2002-03-04 Akim Demaille <akim@epita.fr>
18555
18556 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18557 before returning.
18558 Reported by Benoit Perrot.
18559
18560 2002-03-04 Akim Demaille <akim@epita.fr>
18561
18562 Use bitset operations when possible, not loops over bits.
18563
18564 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18565 bitset_or.
18566 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18567 * src/reduce.c (useless_nonterminals): Formatting changes.
18568 * src/warshall.c (TC): Use bitset_or.
18569
18570 2002-03-04 Akim Demaille <akim@epita.fr>
18571
18572 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18573 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18574 Ditto.
18575
18576 2002-03-04 Akim Demaille <akim@epita.fr>
18577
18578 * src/lalr.c (F): Now a bitset*.
18579 Adjust all dependencies.
18580
18581 2002-03-04 Akim Demaille <akim@epita.fr>
18582
18583 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18584 Adjust all dependencies.
18585
18586 2002-03-04 Akim Demaille <akim@epita.fr>
18587
18588 * src/L0.c, src/LR0.h (nstates): Be size_t.
18589 Adjust comparisons (signed vs unsigned).
18590 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18591 bitset*.
18592 Adjust all dependencies.
18593
18594 2002-03-04 Akim Demaille <akim@epita.fr>
18595
18596 * src/closure.c (firsts): Now, also a bitset.
18597 Adjust all dependencies.
18598 (varsetsize): Remove, now unused.
18599 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18600
18601 2002-03-04 Akim Demaille <akim@epita.fr>
18602
18603 * src/print.c: Convert to use bitset.h, not hand coded iterations
18604 over ints.
18605
18606 2002-03-04 Akim Demaille <akim@epita.fr>
18607
18608 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18609
18610 2002-03-04 Akim Demaille <akim@epita.fr>
18611
18612 * src/closure.c (ruleset): Be a bitset.
18613 (rulesetsize): Remove.
18614
18615 2002-03-04 Akim Demaille <akim@epita.fr>
18616
18617 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18618 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18619 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18620 * src/closure.c (fderives): Be an array of bitsets.
18621
18622 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18623
18624 * data/bison.c++: Merge the two generated headers. Insert a copyright
18625 notice in each output file.
18626
18627 2002-02-28 Akim Demaille <akim@epita.fr>
18628
18629 * data/bison.c++: Copy the prologue of bison.simple to fetch
18630 useful M4 definitions, such as b4_header_guard.
18631
18632 2002-02-25 Akim Demaille <akim@epita.fr>
18633
18634 * src/getargs.c (version): Give the name of the authors, and use a
18635 translator friendly scheme for the bgr
18636 copyright notice.
18637
18638 2002-02-25 Akim Demaille <akim@epita.fr>
18639
18640 * src/output.c (header_output): Remove, now handled completely via
18641 M4.
18642
18643 2002-02-25 Akim Demaille <akim@epita.fr>
18644
18645 * m4/m4.m4: New, from CVS Autoconf.
18646 * configure.in: Invoke it.
18647 * src/output.c (output_skeleton): Use its result instead of the
18648 hard coded name.
18649
18650 2002-02-25 Akim Demaille <akim@epita.fr>
18651
18652 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18653 Fileutils 4.1.5.
18654 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18655 * src/output.c (output_skeleton): Use mkstemp to create a real
18656 temporary file.
18657 Move the filling of `skeleton' and its muscle to...
18658 (prepare): here.
18659 (output): Move the definition of the prologue muscle to...
18660 (prepare): here.
18661 * src/system.h (DEFAULT_TMPDIR): New.
18662
18663 2002-02-14 Paul Eggert <eggert@twinsun.com>
18664
18665 Remove the support for C++ namespace cleanliness; it was
18666 causing more problems than it was curing, since it didn't work
18667 properly on some nonstandard C++ compilers. This can wait
18668 for a proper C++ parser.
18669
18670 * NEWS: Document this.
18671 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18672 of C++, as it's treated like C now.
18673 * src/bison.simple (YYSTD): Remove.
18674 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18675 Treat C++ just like Standard C instead of trying to support
18676 namespace cleanliness.
18677
18678 2002-02-14 Akim Demaille <akim@epita.fr>
18679
18680 * tests/regression.at (else): Adjust to Andreas' change.
18681
18682 2002-02-14 Akim Demaille <akim@epita.fr>
18683
18684 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18685
18686 2002-02-13 Andreas Schwab <schwab@suse.de>
18687
18688 * src/output.c (output_rule_data): Don't output NULL, it might
18689 not be defined yet.
18690
18691 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18692
18693 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18694 (Copyright notice): Update.
18695
18696 2002-02-11 Akim Demaille <akim@epita.fr>
18697
18698 * tests/regression.at (%nonassoc and eof): Don't include
18699 nonportable headers.
18700
18701 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18702
18703 * data/bison.c++: Correct error recovery. Make the user able to
18704 initialize the starting location.
18705
18706 2002-02-07 Akim Demaille <akim@epita.fr>
18707
18708 * tests/input.at: New.
18709
18710 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18711
18712 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18713 more consistent when naming methods and variables. Put preprocessor
18714 directives around tables only needed for debugging.
18715
18716 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18717
18718 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18719 C++ parsers.
18720 (yy::b4_name::parse): Use print_.
18721
18722 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18723
18724 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18725
18726 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18727
18728 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18729 C++ parsers.
18730 (yy::b4_name::parse): Build verbose error messages, and use error_.
18731
18732 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18733
18734 * data/bison.c++: Fix m4 quoting in comments.
18735
18736 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18737
18738 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18739 not expanded by m4.
18740
18741 2002-02-05 Akim Demaille <akim@epita.fr>
18742
18743 * data/bison.c++: Adjust to the M4 back end.
18744 More is certainly needed.
18745
18746 2002-02-05 Akim Demaille <akim@epita.fr>
18747
18748 Give a try to M4 as a back end.
18749
18750 * lib/readpipe.c: New, from wdiff.
18751 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18752 BISON_HAIRY.
18753 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18754 specific values. Now it is m4 that performs the lookup.
18755 * src/parse-skel.y: Remove.
18756 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18757 * src/output.c (actions_output, guards_output)
18758 (token_definitions_output): No longer keeps track of the output
18759 line number, hence remove the second argument.
18760 (guards_output): Check against the guard member of a rule, not the
18761 action member.
18762 Adjust callers.
18763 (output_skeleton): Don't look for the skeleton location, let m4 do
18764 that.
18765 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18766 file will be used.
18767 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18768 (prepare): Given that for the time being changesyntax is not
18769 usable in M4, rename the muscles using `-' to `_'.
18770 Define `defines_flag', `output_parser_name' and `output_header_name'.
18771 * src/output.h (actions_output, guards_output)
18772 (token_definitions_output): Adjust prototypes.
18773 * src/scan-skel.l: Instead of scanning the skeletons, it now
18774 processes the output of m4: `__oline__' and `#output'.
18775 * data/bison.simple: Adjust to be used by M4(sugar).
18776 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18777 to date.
18778 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18779 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18780 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18781 shamelessly stolen from CVS Autoconf.
18782
18783 2002-02-05 Akim Demaille <akim@epita.fr>
18784
18785 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18786 * configure.in: Check for the declarations of free and malloc.
18787 * src/muscle_tab.c: Adjust.
18788
18789 2002-02-05 Akim Demaille <akim@epita.fr>
18790
18791 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18792 which have no values.
18793
18794 2002-02-05 Akim Demaille <akim@epita.fr>
18795
18796 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18797 * data/: here.
18798
18799 2002-01-29 Paul Eggert <eggert@twinsun.com>
18800
18801 * src/bison.simple (YYSIZE_T): Do not define merely because
18802 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18803 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18804
18805 2002-01-27 Akim Demaille <akim@epita.fr>
18806
18807 Fix `%nonassoc and eof'.
18808
18809 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18810 which were not properly copied! Replace
18811 memcpy (res->errs, src->errs, src->nerrs);
18812 with
18813 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18814 !!!
18815 * tests/regression.at (%nonassoc and eof): Adjust to newest
18816 Autotest: `.' is not in the PATH.
18817
18818 2002-01-27 Akim Demaille <akim@epita.fr>
18819
18820 * tests/sets.at (AT_EXTRACT_SETS): New.
18821 (Nullable): Use it.
18822 (Firsts): New.
18823
18824 2002-01-26 Akim Demaille <akim@epita.fr>
18825
18826 * tests/actions.at, tests/calc.at, tests/headers.at,
18827 * tests/torture.at: Adjust to the newest Autotest which no longer
18828 forces `.' in the PATH.
18829
18830 2002-01-25 Akim Demaille <akim@epita.fr>
18831
18832 * tests/regression.at (%nonassoc and eof): New.
18833 Suggested by Robert Anisko.
18834
18835 2002-01-24 Akim Demaille <akim@epita.fr>
18836
18837 Bison dumps core when trying to complain about broken input files.
18838 Reported by Cris van Pelt.
18839
18840 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18841 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18842 into...
18843 (Invalid inputs): Strengthen: exercise parse_percent_token.
18844
18845 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18846
18847 * src/Makefile.am: Add bison.c++.
18848 * src/bison.c++: New skeleton.
18849
18850 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18851
18852 * po/it.po: New.
18853
18854 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18855
18856 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18857
18858 2002-01-20 Marc Autret <marc@gnu.org>
18859
18860 * src/files.c (compute_output_file_names): Fix
18861
18862 2002-01-20 Marc Autret <marc@gnu.org>
18863
18864 * tests/output.at: New test.
18865 * src/files.c (compute_base_names): Don't map extensions when
18866 the YACC flag is set, use defaults.
18867 Reported by Evgeny Stambulchik.
18868
18869 2002-01-20 Marc Autret <marc@gnu.org>
18870
18871 * src/system.h: Need to define __attribute__ away for non-GCC
18872 compilers as well (i.e., the vendor C compiler).
18873 Suggested by Albert Chin-A-Young.
18874
18875 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18876
18877 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18878 canonical definition.
18879 * src/system.h: Use the canonical definition for PARAMS (avoids
18880 a conflict with the macro from lib/hash.h).
18881
18882 2002-01-11 Akim Demaille <akim@epita.fr>
18883
18884 * configure.in: Use AC_FUNC_STRNLEN.
18885 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18886
18887 2002-01-09 Akim Demaille <akim@epita.fr>
18888
18889 * src/files.c, src/files.h (output_infix): New.
18890 (tab_extension): Remove.
18891 (compute_base_names): Compute the former, drop the latter.
18892 * src/output.c (prepare): Insert the muscles `output-infix', and
18893 `output-suffix'.
18894 * src/parse-skel.y (string, string.1): New.
18895 (section.header): Use it.
18896 (section.yacc): Remove.
18897 (prefix): Remove too.
18898 * src/scan-skel.l: Adjust.
18899 * src/bison.simple, src/bison.hairy: Adjust.
18900
18901 2002-01-09 Akim Demaille <akim@epita.fr>
18902
18903 * configure.in (WERROR_CFLAGS): Compute it.
18904 * src/Makefile.am (CFLAGS): Pass it.
18905 * tests/atlocal.in (CFLAGS): Idem.
18906 * src/files.c: Fix a few warnings.
18907 (get_extension_index): Remove, unused.
18908
18909 2002-01-08 Akim Demaille <akim@epita.fr>
18910
18911 * src/getargs.c (AS_FILE_NAME): New.
18912 (getargs): Use it to convert DOSish file names.
18913 * src/files.c (base_name): Rename as full_base_name to avoid
18914 clashes with `base_name ()'.
18915 (filename_split): New.
18916 (compute_base_names): N-th rewrite, using filename_split.
18917
18918 2002-01-08 Akim Demaille <akim@epita.fr>
18919
18920 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18921 New, stolen from the Fileutils 4.1.
18922 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18923 * configure.in: Check for the presence of memrchr, and of its
18924 prototype.
18925
18926 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18927
18928 * lib/hash.h (__P): Added definition for this macro.
18929 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18930 BUILT_SOURCES, to ensure they are generated first.
18931 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18932 %error-verbose to allow bootstrapping with bison 1.30x.
18933
18934 2002-01-06 Akim Demaille <akim@epita.fr>
18935
18936 * src/reader.c (parse_braces): Don't fetch the next char, the
18937 convention is to fetch on entry.
18938 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18939 'switch' without a following semicolon.
18940 * tests/regression.at (braces parsing): New.
18941
18942 2002-01-06 Akim Demaille <akim@epita.fr>
18943
18944 Bison is dead wrong in its RR conflict reports.
18945
18946 * tests/torture.at (GNU Cim Grammar): New.
18947 * src/conflicts.c (count_rr_conflicts): Fix.
18948
18949 2002-01-06 Akim Demaille <akim@epita.fr>
18950
18951 Creating package.m4 from configure.ac causes too many problems.
18952
18953 * tests/Makefile.am (package.m4): Create it by hand,
18954 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18955
18956 2002-01-06 Akim Demaille <akim@epita.fr>
18957
18958 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18959 skeleton.h.
18960
18961 2002-01-04 Paul Eggert <eggert@twinsun.com>
18962
18963 * doc/bison.texinfo (Debugging):
18964 Remove YYSTDERR; it's no longer defined or used.
18965 Also, s/cstdio.h/cstdio/.
18966
18967 2002-01-03 Akim Demaille <akim@epita.fr>
18968
18969 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18970
18971 2002-01-03 Akim Demaille <akim@epita.fr>
18972
18973 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18974 tracing code to --trace, wait for a better --trace option, with
18975 args.
18976
18977 2002-01-03 Akim Demaille <akim@epita.fr>
18978
18979 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18980 The ISO C++ standard is extremely clear about it: stderr is
18981 considered a macro, not a regular symbol (see table 94 `Header
18982 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18983 Therefore std:: does not apply to it. It still does with fprintf.
18984 Also, s/cstdio.h/cstdio/.
18985
18986 2002-01-03 Akim Demaille <akim@epita.fr>
18987
18988 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18989 for non system headers.
18990
18991 2002-01-02 Akim Demaille <akim@epita.fr>
18992
18993 Equip the skeleton chain with location tracking, runtime trace,
18994 pure parser and scanner.
18995
18996 * src/parse-skel.y: Request a pure parser, locations, and prefix
18997 renaming.
18998 (%union): Having several members with the same type does not help
18999 type mismatches, simplify.
19000 (YYPRINT, yyprint): New.
19001 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19002 (skel_error): this.
19003 Handle locations.
19004 * src/scan-skel.l: Adjust to these changes.
19005 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19006 (LOCATION_PRINT, skel_control_t): New.
19007
19008 2001-12-30 Akim Demaille <akim@epita.fr>
19009
19010 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19011 replace `gb' with BLANKS.
19012 * src/scan-skel.l: Adjust.
19013
19014 2001-12-30 Akim Demaille <akim@epita.fr>
19015
19016 * src/system.h: We don't need nor want bcopy.
19017 Throw away MS-DOS crap: we don't need getpid.
19018 * configure.in: We don't need strndup. It was even causing
19019 problems: because Flex includes the headers *before* us,
19020 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19021 not visible.
19022 * lib/xstrndup.c: New.
19023 * src/scan-skel.l: Use it.
19024 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19025 * src/parse-skel.y: Use %directives instead of #defines.
19026
19027 2001-12-30 Akim Demaille <akim@epita.fr>
19028
19029 * src/skeleton.h: New.
19030 * src/output.c (output_parser, output_master_parser): Remove, dead
19031 code.
19032 * src/output.h (get_lines_number, actions_output, guards_output)
19033 (token_definitions_output): Prototype them.
19034 * src/parse-skel.y: Add the license notice.
19035 Include output.h and skeleton.h.
19036 (process_skeleton): Returns void, and takes a single parameter.
19037 * src/scan-skel.l: Add the license notice.
19038 Include skeleton.h.
19039 Don't use %option yylineno: it seems that then Flex imagines
19040 REJECT has been used, and therefore it won't reallocate its
19041 buffers (which makes no other sense to me than a bug). It results
19042 in warnings for `unused: yy_flex_realloc'.
19043
19044 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19045
19046 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19047 (MUSCLE_INSERT_PREFIX): ...to there.
19048 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19049 (MUSCLE_INSERT_PREFIX): Move from here...
19050
19051 * src/bison.hairy: Add a section directive. Put braces around muscle
19052 names. This parser skeleton is still broken, but Bison should not
19053 choke on a bad muscle 'syntax'.
19054 * src/bison.simple: Add a section directive. Put braces around muscle
19055 names.
19056
19057 * src/files.h (strsuffix, stringappend): Add declarations.
19058 (tab_extension): Add declaration.
19059 (short_base_name): Add declaration.
19060
19061 * src/files.c (strsuffix, stringappend): No longer static. These
19062 functions are used in the skeleton parser.
19063 (tab_extension): New.
19064 (compute_base_names): Use the computations done in this function
19065 to guess if the generated parsers should have '.tab' in their
19066 names.
19067 (short_base_name): No longer static.
19068
19069 * src/output.c (output_skeleton): New.
19070 (output): Disable call to output_master_parser, and give a try to
19071 a new skeleton handling system.
19072 (guards_output, actions_output): No longer static.
19073 (token_definitions_output, get_lines_number): No longer static.
19074
19075 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19076
19077 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19078 parse-skel.y.
19079
19080 * src/parse-skel.y: New file.
19081 * src/scan-skel.l: New file.
19082
19083 2001-12-29 Akim Demaille <akim@epita.fr>
19084
19085 %name-prefix is broken.
19086
19087 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19088 Adjust all dependencies.
19089 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19090 %name-prefix.
19091
19092 Renaming yylval but not yylloc is not consistent. Now we do.
19093
19094 * src/bison.simple: Prefix yylloc if used.
19095 * doc/bison.texinfo (Decl Summary): Document that.
19096
19097 2001-12-29 Akim Demaille <akim@epita.fr>
19098
19099 * doc/bison.texinfo: Promote `%long-directive' over
19100 `%long_directive'.
19101 Remove all references to fixed-output-files, yacc is enough.
19102
19103 2001-12-29 Akim Demaille <akim@epita.fr>
19104
19105 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19106 user prologue. These are defaults.
19107 * tests/actions.at (Mid-rule actions): Make sure the user can
19108 define YYDEBUG and YYERROR_VERBOSE.
19109
19110 2001-12-29 Akim Demaille <akim@epita.fr>
19111
19112 * src/output.c (header_output): Don't forget to export YYLTYPE and
19113 yylloc.
19114 * tests/headers.at (export YYLTYPE): New, make sure it does.
19115 * tests/regression.at (%union and --defines, Invalid CPP headers):
19116 Move to...
19117 * tests/headers.at: here.
19118
19119 2001-12-29 Akim Demaille <akim@epita.fr>
19120
19121 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19122
19123 2001-12-29 Akim Demaille <akim@epita.fr>
19124
19125 * tests/actions.at (Mid-rule actions): Output on a single line
19126 instead of several.
19127
19128 2001-12-29 Akim Demaille <akim@epita.fr>
19129
19130 * doc/bison.texinfo: Formatting changes.
19131
19132 2001-12-29 Akim Demaille <akim@epita.fr>
19133
19134 Don't store the token defs in a muscle, just be ready to output it
19135 on command. Now possible via `symbols'. Fixes a memory leak.
19136
19137 * src/output.c (token_definitions_output): New.
19138 (output_parser, header_output): Use it.
19139 * src/reader.c (symbols_save): Remove.
19140
19141 2001-12-29 Akim Demaille <akim@epita.fr>
19142
19143 * src/bison.simple: Do not provide a default for YYSTYPE and
19144 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19145 default.
19146
19147 2001-12-29 Akim Demaille <akim@epita.fr>
19148
19149 Mid-rule actions are simply... ignored!
19150
19151 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19152 the empty-rule associated to the dummy symbol, not to the host
19153 rule.
19154 * tests/actions.at (Mid-rule actions): New.
19155
19156 2001-12-29 Akim Demaille <akim@epita.fr>
19157
19158 Memory leak.
19159
19160 * src/reader.c (reader): Free grammar.
19161
19162 2001-12-29 Akim Demaille <akim@epita.fr>
19163
19164 Memory leak.
19165
19166 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19167 since it allocates it for each state, although only one is needed.
19168 (allocate_storage): Do it here.
19169
19170 2001-12-29 Akim Demaille <akim@epita.fr>
19171
19172 * src/options.h, src/options.c (create_long_option_table): Rename
19173 as...
19174 (long_option_table_new): this, with a clearer prototype.
19175 (percent_table): Remove, unused,
19176 * src/getargs.c (getargs): Adjust.
19177
19178 2001-12-29 Akim Demaille <akim@epita.fr>
19179
19180 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19181 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19182 as states.
19183
19184 2001-12-29 Akim Demaille <akim@epita.fr>
19185
19186 * src/lalr.c (build_relations): Rename `states' as `states1'.
19187 Sorry, I don't understand exactly what it is, no better name...
19188
19189 2001-12-29 Akim Demaille <akim@epita.fr>
19190
19191 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19192 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19193 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19194 as rules.
19195
19196 2001-12-29 Akim Demaille <akim@epita.fr>
19197
19198 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19199 ago.
19200
19201 2001-12-29 Akim Demaille <akim@epita.fr>
19202
19203 * src/reader.c, src/reader.h (user_toknums): Remove.
19204 Adjust all users to use symbols[i]->user_token_number.
19205
19206 2001-12-29 Akim Demaille <akim@epita.fr>
19207
19208 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19209 Adjust all users to use symbols[i]->prec or ->assoc.
19210
19211 2001-12-29 Akim Demaille <akim@epita.fr>
19212
19213 * src/reader.c, src/reader.h (tags): Remove.
19214 Adjust all users to use symbols[i]->tag.
19215
19216 2001-12-29 Akim Demaille <akim@epita.fr>
19217
19218 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19219 and rule_table.
19220 * src/reader.c (packsymbols): Fill this table.
19221 Drop sprec.
19222 * src/conflicts.c (resolve_sr_conflict): Adjust.
19223 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19224 single table.
19225 Use symbols[i]->tag instead of tags[i].
19226
19227 2001-12-29 Akim Demaille <akim@epita.fr>
19228
19229 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19230 In addition, put a comment in there, to replace...
19231 * tests/regression.at (%union and C comments): Remove.
19232
19233 2001-12-29 Akim Demaille <akim@epita.fr>
19234
19235 * tests/regression.at (Web2c Actions): Blindly move the actual
19236 output as expected output. The contents *seem* right to me, but I
19237 can't pretend reading perfectly parser tables... Nonetheless, all
19238 the other tests pass correctly, the table look OK, even though the
19239 presence of `$axiom' is to be noted: AFAICS it is useless (but
19240 harmless).
19241
19242 2001-12-29 Akim Demaille <akim@epita.fr>
19243
19244 * src/reader.c (readgram): Don't add the rule 0 if there were no
19245 rules read. In other words, add it _after_ having performed
19246 grammar sanity checks.
19247 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19248
19249 2001-12-29 Akim Demaille <akim@epita.fr>
19250
19251 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19252 visible, and some states have now a different number.
19253
19254 2001-12-29 Akim Demaille <akim@epita.fr>
19255
19256 * src/reader.c (readgram): Bind the initial rule's lineno to that
19257 of the first rule.
19258 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19259 (Solved SR Conflicts): Adjust rule 0's line number.
19260
19261 2001-12-29 Akim Demaille <akim@epita.fr>
19262
19263 Fix the `GAWK Grammar' failure.
19264
19265 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19266 the reductions of the first state which was mistakenly confused
19267 with the final state because precisely final_state was initialized
19268 to 0.
19269 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19270 now noticed by Bison.
19271 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19272 have a reduction on $default.
19273
19274 2001-12-29 Akim Demaille <akim@epita.fr>
19275
19276 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19277 rule line numbers.
19278 * src/closure.c (print_closure): Likewise.
19279 * src/derives.c (print_derives): Likewise.
19280 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19281 now.
19282
19283 2001-12-29 Akim Demaille <akim@epita.fr>
19284
19285 * src/lalr.c (lookaheads_print): New.
19286 (lalr): Call it when --trace-flag.
19287 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19288 are dumped.
19289
19290 2001-12-29 Akim Demaille <akim@epita.fr>
19291
19292 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19293 when walking through ritem, even via rule->rhs.
19294 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19295 (useful_production, useless_nonterminals): Likewise.
19296 (reduce_grammar_tables): Likewise, plus update nritems.
19297 * src/nullable.c (set_nullable): Likewise.
19298 * src/lalr.c (build_relations): Likewise.
19299 * tests/sets.at (Nullable): Adjust.
19300 Fortunately, now, the $axiom is no longer nullable.
19301
19302 2001-12-29 Akim Demaille <akim@epita.fr>
19303
19304 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19305 the 0-sentinel.
19306 * src/gram.c (ritem_longest_rhs): Likewise.
19307 * src/reduce.c (nonterminals_reduce): Likewise.
19308 * src/print_graph.c (print_graph): Likewise.
19309 * src/output.c (output_rule_data): Likewise.
19310 * src/nullable.c (set_nullable): Likewise.
19311
19312 2001-12-29 Akim Demaille <akim@epita.fr>
19313
19314 * src/output.c: Comment changes.
19315
19316 2001-12-27 Paul Eggert <eggert@twinsun.com>
19317
19318 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19319 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19320 Sparc, as they were causing more porting problems than the
19321 (minor) performance improvement was worth.
19322
19323 Also, catch up with 1.31's YYSTD.
19324
19325 2001-12-27 Akim Demaille <akim@epita.fr>
19326
19327 * src/output.c (output_gram): Rely on nritems, not the
19328 0-sentinel. See below.
19329 Use -1 as separator, not 0.
19330 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19331 Rely on -1 as separator in yyrhs, instead of 0.
19332 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19333 twice `Now at end of input', therefore there are two lines less to
19334 expect.
19335
19336 2001-12-27 Akim Demaille <akim@epita.fr>
19337
19338 * tests/regression.at (Unresolved SR Conflicts):
19339 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19340 below.
19341
19342 2001-12-27 Akim Demaille <akim@epita.fr>
19343
19344 * src/LR0.c (new_state): Recognize the final state by the fact it
19345 is reached by eoftoken.
19346 (insert_start_shifting_state, insert_eof_shifting_state)
19347 (insert_accepting_state, augment_automaton): Remove, since now
19348 these states are automatically computed from the initial state.
19349 (generate_states): Adjust.
19350 * src/print.c: When reporting a rule number to the user, substract
19351 1, so that the axiom rule is rule 0, and the first user rule is 1.
19352 * src/reduce.c: Likewise.
19353 * src/print_graph.c (print_core): For the time being, just as for
19354 the report, depend upon --trace-flags to dump the full set of
19355 items.
19356 * src/reader.c (readgram): Once the grammar read, insert the rule
19357 0: `$axiom: START-SYMBOL $'.
19358 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19359 number of the states has changed (the final state is no longer
19360 necessarily the last), catch up.
19361
19362 2001-12-27 Akim Demaille <akim@epita.fr>
19363
19364 Try to make the use of the eoftoken valid. Given that its value
19365 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19366 is used instead of > 0 where appropriate, (ii), depend upon nritems
19367 instead of the 0-sentinel.
19368
19369 * src/gram.h, src/gram.c (nritems): New.
19370 Expected to be duplication of nitems, but for the time being...
19371 * src/reader.c (packgram): Assert nritems and nitems are equal.
19372 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19373 * src/closure.c (print_closure, print_fderives): Likewise.
19374 * src/gram.c (ritem_print): Likewise.
19375 * src/print.c (print_core, print_grammar): Likewise.
19376 * src/print_graph.c: Likewise.
19377
19378 2001-12-27 Akim Demaille <akim@epita.fr>
19379
19380 * src/main.c (main): If there are complains after grammar
19381 reductions, then output the report anyway if requested, then die.
19382 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19383 * src/reader.c (eoftoken): New.
19384 (parse_token_decl): If the token being defined has value `0', it
19385 is the eoftoken.
19386 (packsymbols): No longer hack `tags' to insert `$' by hand.
19387 Be sure to preserve the value of the eoftoken.
19388 (reader): Make sure eoftoken is defined.
19389 Initialize nsyms to 0: now eoftoken is created just like the others.
19390 * src/print.c (print_grammar): Don't special case the eof token.
19391 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19392 lie anyway, albeit pleasant.
19393 * tests/calc.at: Exercise error messages with eoftoken.
19394 Change the grammar so that empty input is invalid.
19395 Adjust expectations.
19396 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19397
19398 2001-12-27 Akim Demaille <akim@epita.fr>
19399
19400 * configure.in: Check the protos of strchr ans strspn.
19401 Replace strchr if needed.
19402 * src/system.h: Provide the protos of strchr, strspn and memchr if
19403 missing.
19404 * lib/strchr.c: New.
19405 * src/reader.c (symbols_save): Use strchr.
19406
19407 2001-12-27 Akim Demaille <akim@epita.fr>
19408
19409 * src/print.c, src/print_graph.c (escape): New.
19410 Use it to quote the TAGS outputs.
19411 * src/print_graph.c (print_state): Now errors are in red, and
19412 reductions in green.
19413 Prefer high to wide: output the state number on a line of its own.
19414
19415 2001-12-27 Akim Demaille <akim@epita.fr>
19416
19417 * src/state.h, src/state.c (reductions_new): New.
19418 * src/LR0.c (set_state_table): Let all the states have a
19419 `reductions', even if reduced to 0.
19420 (save_reductions): Adjust.
19421 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19422 * src/print.c (print_reductions, print_actions): Adjust.
19423 * src/output.c (action_row): Adjust.
19424
19425 2001-12-27 Akim Demaille <akim@epita.fr>
19426
19427 * src/state.h, src/state.c (errs_new, errs_dup): New.
19428 * src/LR0.c (set_state_table): Let all the states have an errs,
19429 even if reduced to 0.
19430 * src/print.c (print_errs, print_reductions): Adjust.
19431 * src/output.c (output_actions, action_row): Adjust.
19432 * src/conflicts.c (resolve_sr_conflict): Adjust.
19433
19434 2001-12-27 Akim Demaille <akim@epita.fr>
19435
19436 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19437
19438 2001-12-27 Akim Demaille <akim@epita.fr>
19439
19440 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19441 * src/print.c: here.
19442 (lookaheadset, shiftset): New, used as additional storage by
19443 print_reductions.
19444 (print_results): Adjust.
19445 (print_shifts, print_gotos, print_errs): New, extracted from...
19446 (print_actions): here.
19447 * src/print_graph.c (print_actions): Remove dead code.
19448
19449 2001-12-27 Akim Demaille <akim@epita.fr>
19450
19451 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19452 `$n' and `@n'.
19453
19454 2001-12-27 Akim Demaille <akim@epita.fr>
19455
19456 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19457 (build_relations): Adjust.
19458
19459 2001-12-27 Akim Demaille <akim@epita.fr>
19460
19461 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19462 duplication.
19463
19464 2001-12-27 Akim Demaille <akim@epita.fr>
19465
19466 * src/reader.c (packgram): Catch nitems overflows.
19467
19468 2001-12-27 Akim Demaille <akim@epita.fr>
19469
19470 * src/files.c, src/files.h (guard_obstack): Remove.
19471 * src/output.c (output): Adjust.
19472 * src/reader.c (parse_braces): New, factoring...
19473 (copy_action, copy_guard): these two which are renamed as...
19474 (parse_action, parse_guard): these.
19475 As a voluntary consequence, using braces around guards is now
19476 mandatory.
19477
19478 2001-12-27 Akim Demaille <akim@epita.fr>
19479
19480 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19481 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19482 members.
19483 (symbol_list_new): Adjust.
19484 (copy_action): action_line is the first line, not the last.
19485 (copy_guard): Just as for actions, store the `action' only, not
19486 the switch/case/break flesh.
19487 Don't parse the user action that might follow the guard, let...
19488 (readgram): do it, i.e., now, there can be an action after a
19489 guard.
19490 In other words the guard is just explicitly optional.
19491 (packgram): Adjust.
19492 * src/output.c (guards_output): New.
19493 (output_parser): Call it when needed.
19494 (output): Also free the guard and attrs obstacks.
19495 * src/files.c, src/files.h (obstack_save): Remove.
19496 (output_files): Remove.
19497 As a result, if one needs the former `.act' file, using an
19498 appropriate skeleton which requires actions and guards is now
19499 required.
19500 * src/main.c (main): Adjust.
19501 * tests/semantic.at: New.
19502 * tests/regression.at: Use `input.y' as input file name.
19503 Avoid 8+3 problems by requiring input.c when the test needs the
19504 parser.
19505
19506 2001-12-27 Akim Demaille <akim@epita.fr>
19507
19508 * src/reader.c (symbol_list_new): Be sure to initialize all the
19509 fields.
19510
19511 2001-12-27 Akim Demaille <akim@epita.fr>
19512
19513 All the hacks using a final pseudo state are now useless.
19514
19515 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19516 * src/lalr.c (nLA): New.
19517 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19518 instead of lookaheadsp from the pseudo state (nstate + 1).
19519
19520 2001-12-27 Akim Demaille <akim@epita.fr>
19521
19522 * src/output.c (action_row, token_actions): Use a state_t instead
19523 of a integer, and nlookaheads instead of the following state's
19524 lookaheadsp.
19525
19526 2001-12-27 Akim Demaille <akim@epita.fr>
19527
19528 * src/conflicts.c (log_resolution, flush_shift)
19529 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19530 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19531 (conflicts_print, print_reductions): Use a state_t instead of an
19532 integer when referring to a state.
19533 As much as possible, depend upon nlookaheads, instead of the
19534 `lookaheadsp' member of the following state (since lookaheads of
19535 successive states are successive, the difference between state n + 1
19536 and n served as the number of lookaheads for state n).
19537 * src/lalr.c (add_lookback_edge): Likewise.
19538 * src/print.c (print_core, print_actions, print_state)
19539 (print_results): Likewise.
19540 * src/print_graph.c (print_core, print_actions, print_state)
19541 (print_graph): Likewise.
19542 * src/conflicts.h: Adjust.
19543
19544 2001-12-27 Akim Demaille <akim@epita.fr>
19545
19546 * src/bison.hairy: Formatting/comment changes.
19547 ANSIfy.
19548 Remove `register' indications.
19549 Add plenty of `static'.
19550
19551 2001-12-27 Akim Demaille <akim@epita.fr>
19552
19553 * src/output.c (prepare): Drop the muscle `ntbase' which
19554 duplicates ntokens.
19555 * src/bison.simple: Formatting/comment changes.
19556 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19557 is an undocumented synonym.
19558
19559 2001-12-22 Akim Demaille <akim@epita.fr>
19560
19561 * src/output.c (output_table_data): Change the prototype to use
19562 `int' for array ranges: some invocations do pass an int, not a
19563 short.
19564 Reported by Wayne Green.
19565
19566 2001-12-22 Akim Demaille <akim@epita.fr>
19567
19568 Some actions of web2c.y are improperly triggered.
19569 Reported by Mike Castle.
19570
19571 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19572 * tests/regression.at (Web2c): Rename as...
19573 (Web2c Report): this.
19574 (Web2c Actions): New.
19575
19576 2001-12-22 Akim Demaille <akim@epita.fr>
19577
19578 Reductions in web2c.y are improperly reported.
19579 Reported by Mike Castle.
19580
19581 * src/conflicts.c (print_reductions): Fix.
19582 * tests/regression.at (Web2c): New.
19583
19584 2001-12-18 Akim Demaille <akim@epita.fr>
19585
19586 Some host fail on `assert (!"foo")', which expands to
19587 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19588 Reported by Nelson Beebee.
19589
19590 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19591 `#define it_succeeded 0' and `assert (it_succeeded)'.
19592
19593 2001-12-17 Marc Autret <autret_m@epita.fr>
19594
19595 * src/bison.simple: Don't hard code the skeleton line and filename.
19596 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19597 New line counter 'skeleton_line' (skeleton-line muscle).
19598
19599 2001-12-17 Paul Eggert <eggert@twinsun.com>
19600
19601 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19602 YYDEBUG must be defined to a nonzero value.
19603
19604 * src/bison.simple (yytname): Do not assume that the user defines
19605 YYDEBUG to a properly parenthesized expression.
19606
19607 2001-12-17 Akim Demaille <akim@epita.fr>
19608
19609 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19610 nlookaheads is a new member.
19611 Adjust all users.
19612 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19613 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19614 state.
19615
19616 2001-12-17 Akim Demaille <akim@epita.fr>
19617
19618 * src/files.h, src/files.c (open_files, close_files): Remove.
19619 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19620 let...
19621 * src/reader.c (reader): Do it.
19622
19623 2001-12-17 Akim Demaille <akim@epita.fr>
19624
19625 * src/conflicts.c (print_reductions): Formatting changes.
19626
19627 2001-12-17 Akim Demaille <akim@epita.fr>
19628
19629 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19630 (flush_reduce): New.
19631 (resolve_sr_conflict): Adjust.
19632
19633 2001-12-17 Akim Demaille <akim@epita.fr>
19634
19635 * src/output.c (output_obstack): Be static and rename as...
19636 (format_obstack): this, to avoid any confusion with files.c's
19637 output_obstack.
19638 * src/reader.h (muscle_obstack): Move to...
19639 * src/output.h: here, since it's defined in output.c.
19640
19641 2001-12-17 Akim Demaille <akim@epita.fr>
19642
19643 * src/output.c (action_row, save_column, default_goto)
19644 (sort_actions, matching_state, pack_vector): Better variable
19645 locality.
19646
19647 2001-12-17 Akim Demaille <akim@epita.fr>
19648
19649 * src/output.c: Various formatting changes.
19650
19651 2001-12-17 Akim Demaille <akim@epita.fr>
19652
19653 * src/files.c (output_files): Free the output_obstack.
19654 * src/main.c (main): Call print and print_graph conditionally.
19655 * src/print.c (print): Work unconditionally.
19656 * src/print_graph.c (print_graph): Work unconditionally.
19657 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19658
19659 2001-12-16 Marc Autret <autret_m@epita.fr>
19660
19661 * src/output.c (actions_output): Fix. When we use %no-lines,
19662 there is one less line per action.
19663
19664 2001-12-16 Marc Autret <autret_m@epita.fr>
19665
19666 * src/bison.simple: Remove a useless #line directive.
19667 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19668 * src/output.c (get_lines_number): New.
19669 (output_parser): Adjust, now takes care about the lines of a
19670 output muscles.
19671 Fix line numbering.
19672 (actions_output): Computes the number of lines taken by actions.
19673 (output_master_parser): Insert new skeleton which is the name of
19674 the output parser file name.
19675
19676 2001-12-15 Marc Autret <autret_m@epita.fr>
19677
19678 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19679
19680 2001-12-15 Marc Autret <autret_m@epita.fr>
19681
19682 * src/output.c (output_gram): Keep track of the hairy one.
19683
19684 2001-12-15 Akim Demaille <akim@epita.fr>
19685
19686 Make `make distcheck' work.
19687
19688 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19689 system.h which uses libgettext.h.
19690
19691 2001-12-15 Akim Demaille <akim@epita.fr>
19692
19693 * src/nullable.c (set_nullable): Useless rules must be skipped,
19694 otherwise, since we range over their symbols, we might look at a
19695 nonterminal which no longer ``exists'', i.e., it is not counted in
19696 `nvars', hence we overflow our arrays.
19697
19698 2001-12-15 Akim Demaille <akim@epita.fr>
19699
19700 The header can also be produced directly, without any obstack!
19701 Yahoo!
19702
19703 * src/files.c, src/files.h (defines_obstack): Remove.
19704 (compute_header_macro): Global.
19705 (defines_obstack_save): Remove.
19706 * src/reader.c (parse_union_decl): No longer output to
19707 defines_obstack: its content can be found in the `stype' muscle
19708 anyway.
19709 (output_token_translations): Merge into...
19710 (symbols_output): this.
19711 Rename as...
19712 (symbols_save): this.
19713 (reader): Adjust.
19714 * src/output.c (header_output): New.
19715 (output): Call it.
19716
19717 2001-12-15 Akim Demaille <akim@epita.fr>
19718
19719 * src/reader.c (parse_union_decl): Instead of handling two obstack
19720 simultaneously, use one to define the `stype' muscle, and use the
19721 value of the latter to fill defines_obstack.
19722 (copy_comment): Remove.
19723 (copy_comment2): Work for a single obstack.
19724 Rename as...
19725 (copy_comment): this.
19726
19727 2001-12-15 Akim Demaille <akim@epita.fr>
19728
19729 * src/lex.c, src/lex.h (xgetc): No longer static.
19730 * src/reader.c (parse_union_decl): Revamp.
19731
19732 2001-12-15 Akim Demaille <akim@epita.fr>
19733
19734 Still making progress in separating Bison into (i) input, (ii)
19735 process, (iii) output: now we can directly output the parser file
19736 without using table_obstack at all.
19737
19738 * src/files.c, src/files.h (table_obstack): Bye bye.
19739 (parser_file_name): New.
19740 * src/files.c (compute_output_file_names): Compute it.
19741 * src/output.c (actions_output, output_parser)
19742 (output_master_parser): To a file instead of an obstack.
19743
19744 2001-12-15 Akim Demaille <akim@epita.fr>
19745
19746 Attach actions to rules, instead of pre-outputting them to
19747 actions_obstack.
19748
19749 * src/gram.h (rule_t): action and action_line are new members.
19750 * src/reader.c (symbol_list): Likewise.
19751 (copy_action): Save the actions within the rule.
19752 (packgram): Save them in rule_table.
19753 * src/output.c (actions_output): New.
19754 (output_parser): Use it on `%%actions'.
19755 (output_rule_data): Don't free rule_table.
19756 (output): Do it.
19757 (prepare): Don't save the `action' muscle.
19758 * src/bison.simple: s/%%action/%%actions/.
19759
19760 2001-12-15 Akim Demaille <akim@epita.fr>
19761
19762 * src/reader.c (copy_action): When --yacc, don't append a `;'
19763 to the user action: let it fail if lacking.
19764 Suggested by Arnold Robbins and Tom Tromey.
19765
19766 2001-12-14 Akim Demaille <akim@epita.fr>
19767
19768 * src/lex.c (literalchar): Simply return the char you decoded, non
19769 longer mess around with obstacks and int pointers.
19770 Adjust all callers.
19771
19772 2001-12-14 Akim Demaille <akim@epita.fr>
19773
19774 * src/lex.c (literalchar): Don't escape the special characters,
19775 just decode them, and keep them as char (before, eol was output as
19776 the 2 char string `\n' etc.).
19777 * src/output.c (output_rule_data): Use quotearg to output the
19778 token strings.
19779
19780 2001-12-13 Paul Eggert <eggert@twinsun.com>
19781
19782 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19783 Do not infringe on the global user namespace when using C++.
19784 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19785 All uses of `fprintf' and `stderr' changed.
19786
19787 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19788
19789 2001-12-13 Akim Demaille <akim@epita.fr>
19790
19791 The computation of nullable is broken: it doesn't handle empty
19792 RHS's properly.
19793
19794 * tests/torture.at (GNU AWK Grammar): New.
19795 * tests/sets.at (Nullable): New.
19796 * src/nullable.c (set_nullable): Instead of blindly looping over
19797 `ritems', loop over the rules, and then over their rhs's.
19798
19799 Work around Autotest bugs.
19800
19801 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19802 frame, because Autotest understand lines starting with a `+' as
19803 traces from the shell. Then, they are not processed properly.
19804 Admittedly an Autotest bug, but we don't have time to wait for
19805 Autotest to catch up.
19806 * tests/regression.at (Broken Closure): Adjust to the new table
19807 frames.
19808 Move to...
19809 * tests/sets.at: here.
19810
19811 2001-12-13 Akim Demaille <akim@epita.fr>
19812
19813 * src/closure.c (closure): Use nrules instead of playing tricks
19814 with BITS_PER_WORD.
19815
19816 2001-12-13 Akim Demaille <akim@epita.fr>
19817
19818 * src/print.c (print_actions): Output the handling of `$' as the
19819 traces do: shifting the token EOF. Before EOF was treated as a
19820 nonterminal.
19821 * tests/regression.at: Adjust some tests.
19822 * src/print_graph.c (print_core): Complete the set of items via
19823 closure. The next-to-final and final states are still unsatisfying,
19824 but that's to be addressed elsewhere.
19825 No longer output the rule numbers, but do output the state number.
19826 A single loop for the shifts + gotos is enough, but picked a
19827 distinct color for each.
19828 (print_graph): Initialize and finalize closure.
19829
19830 2001-12-13 Akim Demaille <akim@epita.fr>
19831
19832 * src/reader.c (readgram): Remove dead code, an strip useless
19833 braces.
19834 (get_type): Remove, unused.
19835
19836 2001-12-12 Akim Demaille <akim@epita.fr>
19837
19838 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19839 on that of lib/error.c.
19840
19841 2001-12-12 Akim Demaille <akim@epita.fr>
19842
19843 Some hosts don't like `/' in includes.
19844
19845 * src/system.h: Include libgettext.h without qualifying the path.
19846 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19847 $(top_srcdir).
19848
19849 2001-12-11 Marc Autret <autret_m@epita.fr>
19850
19851 * src/output.c (output_parser): Remove useless muscle.
19852
19853 2001-12-11 Marc Autret <autret_m@epita.fr>
19854
19855 * src/bison.simple: Remove #line just before %%epilogue. It
19856 is now handled in ...
19857 * src/reader.c (read_additionnal_code): Add the output of a
19858 #line for the epilogue.
19859
19860 2001-12-10 Marc Autret <autret_m@epita.fr>
19861
19862 * src/reader.c (copy_definition): Re-use CPP-outed code which
19863 replace precedent remove.
19864 * src/bison.simple: Remove #line before %%prologue because
19865 %%input-line is wrong at this time.
19866
19867 2001-12-10 Marc Autret <autret_m@epita.fr>
19868
19869 * src/reader.c (symbols_output): Clean up.
19870 * src/output.c (output_gram, output): Clean up.
19871
19872 2001-12-10 Akim Demaille <akim@epita.fr>
19873
19874 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19875 * src/LR0.c (set_state_table): here.
19876 * src/lalr.c (lalr): Call it.
19877
19878 2001-12-10 Akim Demaille <akim@epita.fr>
19879
19880 * src/state.h (shifts): Remove the `number' member: shifts are
19881 attached to state, hence no longer need to be labelled with a
19882 state number.
19883
19884 2001-12-10 Akim Demaille <akim@epita.fr>
19885
19886 Now that states have a complete set of members, the linked list of
19887 shifts is useless: just fill directly the state's shifts member.
19888
19889 * src/state.h (shifts): Remove the `next' member.
19890 * src/LR0.c (first_state, last_state): Remove.
19891 Adjust the callers.
19892 (augment_automaton): Don't look for the shifts that must be added
19893 a shift on EOF: it is those of the state we looked for! But now,
19894 since shifts are attached, it is no longer needed to looking
19895 merely by its id: its number.
19896
19897 2001-12-10 Akim Demaille <akim@epita.fr>
19898
19899 * src/LR0.c (augment_automaton): Better variable locality.
19900 Remove an impossible branch: if there is a state corresponding to
19901 the start symbol being shifted, then there is shift for the start
19902 symbol from the initial state.
19903
19904 2001-12-10 Akim Demaille <akim@epita.fr>
19905
19906 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19907 only when appropriate: when insert_start_shifting_state' is not
19908 invoked.
19909 * tests/regression.at (Rule Line Numbers): Adjust.
19910
19911 2001-12-10 Akim Demaille <akim@epita.fr>
19912
19913 * src/LR0.c (augment_automaton): Now that all states have shifts,
19914 merge the two cases addition shifts to the initial state.
19915
19916 2001-12-10 Akim Demaille <akim@epita.fr>
19917
19918 * src/lalr.c (set_state_table): Move to...
19919 * src/LR0.c: here.
19920 * src/lalr.c (lalr): Don't call it...
19921 * src/LR0.c (generate_states): do it.
19922 * src/LR0.h (first_state): Remove, only the table is used.
19923
19924 2001-12-10 Akim Demaille <akim@epita.fr>
19925
19926 * src/LR0.h (first_shift, first_reduction): Remove.
19927 * src/lalr.c: Don't use first_shift: find shifts through the
19928 states.
19929
19930 2001-12-10 Akim Demaille <akim@epita.fr>
19931
19932 * src/LR0.c: Attach shifts to states as soon as they are
19933 computed.
19934 * src/lalr.c (set_state_table): Instead of assigning shifts to
19935 state, just assert that the mapping was properly done.
19936
19937 2001-12-10 Akim Demaille <akim@epita.fr>
19938
19939 * src/LR0.c (insert_start_shift): Rename as...
19940 (insert_start_shifting_state): this.
19941 (insert_eof_shifting_state, insert_accepting_state): New.
19942 (augment_automaton): Adjust.
19943 Better locality of the variables.
19944 When looking if the start_symbol is shifted from the initial
19945 state, using `while (... symbol != start_symbol ...)' sounds
19946 better than `while (... symbol < start_symbol ...)': If fail
19947 to see how the order between symbols could be relevant!
19948
19949 2001-12-10 Akim Demaille <akim@epita.fr>
19950
19951 * src/getargs.h: Don't declare `spec_name_prefix' and
19952 `spec_file_prefix', declared by src/files.h.
19953 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19954 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19955 * src/output.c (prepare): Adjust.
19956 * src/reader.c (symbols_output): Likewise.
19957 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19958
19959 2001-12-10 Akim Demaille <akim@epita.fr>
19960
19961 * src/muscle_tab.c (muscle_init): NULL is a better default than
19962 `"0"'.
19963
19964 2001-12-10 Akim Demaille <akim@epita.fr>
19965
19966 * src/reader.c (reader): Calling symbols_output once is enough.
19967
19968 2001-12-10 Akim Demaille <akim@epita.fr>
19969
19970 Now that states have a complete set of members, the linked list of
19971 reductions is useless: just fill directly the state's reductions
19972 member.
19973
19974 * src/state.h (struct reductions): Remove member `number' and
19975 `next'.
19976 * src/LR0.c (first_reduction, last_reduction): Remove.
19977 (save_reductions): Don't link the new reductions, store them in
19978 this_state.
19979 * src/lalr.c (set_state_table): No need to attach reductions to
19980 states, it's already done.
19981 * src/output.c (output_actions): No longer free the shifts, then
19982 the reductions, then the states: free all the states and their
19983 members.
19984
19985 2001-12-10 Akim Demaille <akim@epita.fr>
19986
19987 * src/options.c (OPTN, DRTV, BOTH): New.
19988 (option_table): Use them.
19989
19990 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19991 the job of system.h.
19992 * src/options.c: Don't include stdio.h and xalloc.h for the same
19993 reasons.
19994
19995 2001-12-10 Akim Demaille <akim@epita.fr>
19996
19997 * src/output.c (output, prepare): Make sure the values of the
19998 muscles `action' and `prologue' are 0-terminated.
19999
20000 2001-12-10 Akim Demaille <akim@epita.fr>
20001
20002 Clean up GCC warnings.
20003
20004 * src/reader.c (copy_action): `buf' is not used.
20005 (parse_skel_decl): Be static.
20006 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20007 * src/options.h (create_long_option_table): Have a real prototype.
20008 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20009 (hash_delete_at): Return const void *.
20010 Adjust casts to preserve the const.
20011
20012 2001-12-10 Akim Demaille <akim@epita.fr>
20013
20014 * configure.in: Require 2.52g.
20015 M4 is not needed, but AUTOM4TE is.
20016 * m4/m4.m4: Remove.
20017 * tests/Makefile.am: Adjust.
20018
20019 2001-12-10 Akim Demaille <akim@epita.fr>
20020
20021 One structure for states is enough, even though theoretically
20022 there are LR(0) states and LALR(1) states.
20023
20024 * src/lalr.h (state_t): Remove.
20025 (state_table): Be state_t **, not state_t *.
20026 * src/state.h (core, CORE_ALLOC): Rename as...
20027 (state_t, STATE_ALLOC): this.
20028 Add the LALR(1) members: shifts, reductions, errs.
20029 * src/LR0.c (state_table): Rename as...
20030 (state_hash): this, to avoid name clashes with the global
20031 `state_table'.
20032 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20033 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20034
20035 2001-12-10 Akim Demaille <akim@epita.fr>
20036
20037 Bison dumps core on bash.y.
20038 Reported by Pascal Bart.
20039
20040 * src/warshall.c (bitmatrix_print): New.
20041 (TC): Use it.
20042 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20043 j must be the outer loop.
20044 * tests/regression.at (Broken Closure): New.
20045
20046 2001-12-05 Akim Demaille <akim@epita.fr>
20047
20048 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20049 its argument.
20050 Reported by Peter Hamorsky.
20051
20052 2001-12-05 Akim Demaille <akim@epita.fr>
20053
20054 * src/conflicts.c (err_table): Remove.
20055 (resolve_sr_conflict): Adjust.
20056 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20057 Rename as...
20058 (state_t.reductions, state_t.shifts): this.
20059
20060 2001-12-05 Akim Demaille <akim@epita.fr>
20061
20062 * src/reduce.c (reduce_grammar_tables): No longer disable the
20063 removal of useless rules via CPP but via `if (0)', so that the
20064 compiler still check the code is valid.
20065 For instance, it should have noticed `rline' no longer exists: use
20066 the `line' member of rule_t.
20067 * src/gram.c (dummy, rline): Remove, unused.
20068
20069 2001-12-05 Akim Demaille <akim@epita.fr>
20070
20071 * src/output.c (pack_vector): Use assert, not berror.
20072 * src/main.c (berror): Remove, unused.
20073
20074 2001-12-05 Akim Demaille <akim@epita.fr>
20075
20076 New experimental feature: if --verbose --trace output all the
20077 items of a state, not only its kernel.
20078
20079 * src/print.c (print_core): If `trace_flag', then invoke closure
20080 before outputting the items of the state (print_core is no longer
20081 a correct name them).
20082 (print_results): Invoke new_closure/free_closure if needed.
20083
20084 2001-12-05 Akim Demaille <akim@epita.fr>
20085
20086 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20087 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20088 (nitemset): for consistency with the rest of the project.
20089
20090 2001-12-05 Akim Demaille <akim@epita.fr>
20091
20092 * src/closure.c (print_closure): Improve.
20093 (closure): Use it for printing input and output.
20094
20095 2001-12-05 Akim Demaille <akim@epita.fr>
20096
20097 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20098 indexed by nonterminals.
20099
20100 2001-12-05 Akim Demaille <akim@epita.fr>
20101
20102 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20103 what it was!).
20104 * src/warshall.h: Remove accidental duplication of the content.
20105
20106 2001-12-05 Akim Demaille <akim@epita.fr>
20107
20108 * src/closure.c (set_fderives): De-obfuscate.
20109
20110 2001-12-05 Akim Demaille <akim@epita.fr>
20111
20112 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20113
20114 2001-12-05 Akim Demaille <akim@epita.fr>
20115
20116 * src/closure.c (set_firsts): De-obfuscate.
20117
20118 2001-12-05 Akim Demaille <akim@epita.fr>
20119
20120 * src/output.c (action_row): De-obfuscate
20121 using the good o' techniques: arrays not pointers, variable
20122 locality, BITISSET, RESETBIT etc.
20123
20124 2001-12-05 Akim Demaille <akim@epita.fr>
20125
20126 Pessimize the code to simplify it: from now on, all the states
20127 have a valid SHIFTS, which NSHIFTS is possibly 0.
20128
20129 * src/LR0.c (shifts_new): Be global and move to..
20130 * src/state.c, src/state.h: here.
20131 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20132 * src/print_graph: Adjust.
20133
20134 2001-12-05 Akim Demaille <akim@epita.fr>
20135
20136 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20137 * src/conflicts.c: Use it.
20138 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20139 incorrectly ``simplified''.
20140
20141 2001-12-05 Akim Demaille <akim@epita.fr>
20142
20143 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20144 using the good o' techniques: arrays not pointers, variable
20145 locality, BITISSET, RESETBIT etc.
20146
20147 2001-12-05 Akim Demaille <akim@epita.fr>
20148
20149 * src/state.h (SHIFT_SYMBOL): New.
20150 * src/conflicts.c: Use it to deobfuscate.
20151
20152 2001-12-05 Akim Demaille <akim@epita.fr>
20153
20154 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20155 (print_reductions): De-obfuscate using the good o' techniques:
20156 arrays not pointers, variable locality, BITISSET.
20157
20158 2001-12-05 Akim Demaille <akim@epita.fr>
20159
20160 * src/conflicts.c (print_reductions): Arrays, not pointers.
20161 Use BITISSET.
20162
20163 2001-12-05 Akim Demaille <akim@epita.fr>
20164
20165 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20166
20167 2001-12-05 Akim Demaille <akim@epita.fr>
20168
20169 * src/conflicts.c (print_reductions): Improve variable locality.
20170
20171 2001-12-05 Akim Demaille <akim@epita.fr>
20172
20173 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20174
20175 2001-12-05 Akim Demaille <akim@epita.fr>
20176
20177 * src/conflicts.c (print_reductions): Improve variable locality.
20178
20179 2001-12-05 Akim Demaille <akim@epita.fr>
20180
20181 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20182 * src/lalr.c: Use them.
20183
20184 2001-12-05 Akim Demaille <akim@epita.fr>
20185
20186 * src/LR0.c (augment_automaton): Formatting changes.
20187 Better variable locality.
20188
20189 2001-12-05 Akim Demaille <akim@epita.fr>
20190
20191 * src/lalr.c (matrix_print): New.
20192 (transpose): Use it.
20193 Use arrays instead of pointers.
20194
20195 2001-12-05 Akim Demaille <akim@epita.fr>
20196
20197 * src/lalr.c (maxrhs): Move to...
20198 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20199 * src/lalr.c (build_relations): Adjust.
20200
20201 2001-12-05 Akim Demaille <akim@epita.fr>
20202
20203 * src/lalr.c (transpose): Free the memory allocated to the
20204 argument, as it is replaced by the results by the unique caller.
20205 (build_relations): Merely invoke transpose: it handles the memory
20206 deallocation.
20207 Improve variable locality.
20208 Avoid variables used as mere abbreviations.
20209 (compute_lookaheads): Use arrays instead of pointers.
20210
20211 2001-12-05 Akim Demaille <akim@epita.fr>
20212
20213 * src/lalr.c (initialize_F): Improve variable locality.
20214 Avoid variables used as mere abbreviations.
20215
20216 2001-12-05 Akim Demaille <akim@epita.fr>
20217
20218 * src/derives.c (print_derives): Display the ruleno.
20219 * src/lalr.c (initialize_F, transpose): Better variable locality
20220 to improve readability.
20221 Avoid variables used as mere abbreviations.
20222
20223 2001-12-05 Akim Demaille <akim@epita.fr>
20224
20225 * src/lalr.c (traverse): Use arrays instead of pointers.
20226
20227 2001-12-05 Akim Demaille <akim@epita.fr>
20228
20229 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20230 the handling of squeue.
20231 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20232
20233 2001-12-05 Akim Demaille <akim@epita.fr>
20234
20235 Because useless nonterminals are now kept alive (instead of being
20236 `destroyed'), we now sometimes examine them, and store information
20237 related to them. Hence we need to know their number, and adjust
20238 memory allocations.
20239
20240 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20241 static.
20242 * src/LR0.c (allocate_itemsets): The memory allocated to
20243 `symbol_count' was used for two different purpose: once to count
20244 the number of occurrences of each symbol, and later reassigned to
20245 `shift_symbol', containing the symbol that can be shifted from a
20246 given state.
20247 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20248 only, and...
20249 (new_itemsets): Allocate `shift_symbol' here.
20250 (allocate_itemsets): symbol_count includes useless nonterminals.
20251 Make room for them.
20252 (free_storage): Use `free', not `XFREE', for pointers that cannot
20253 be null.
20254
20255 2001-12-05 Akim Demaille <akim@epita.fr>
20256
20257 * src/nullable.c (set_nullable): Deobfuscate the handling of
20258 ritem.
20259 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20260
20261 2001-12-05 Akim Demaille <akim@epita.fr>
20262
20263 * src/gram.c, src/gram.h (ritem_print): New.
20264 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20265 (This useless function was defined only to work around VMS linkers
20266 that can't handle compilation units with variables only).
20267 * src/reduce.c (dump_grammar): Use it to trace the construction of
20268 ritem.
20269
20270 2001-12-04 Paul Eggert <eggert@twinsun.com>
20271
20272 * src/bison.simple (union yyalloc): Change member names
20273 to be the same as the stack names.
20274 (yyparse): yyptr is now union yyalloc *, not char *.
20275 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20276 and may generate better code on some machines.
20277 (yystpcpy): Use prototype if __STDC__ is defined, not just
20278 if __cplusplus is defined.
20279
20280 2001-11-30 Akim Demaille <akim@epita.fr>
20281
20282 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20283 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20284 Gettext doesn't compile cleanly, and dies with -Werror.
20285 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20286 Include WARNING_CFLAGS here.
20287 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20288 before being defined.
20289
20290 2001-11-27 Paul Eggert <eggert@twinsun.com>
20291
20292 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20293 First arg is int, not unsigned.
20294 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20295 (SIZE_MAX, UINT_MAX): New macros.
20296 (quotearg_n_options): Abort if N is negative.
20297 Avoid overflow check on hosts where size_t is 64 bits and int
20298 is 32 bits, as overflow is impossible there.
20299 Fix off-by-one typo that caused unnecessary reallocation.
20300
20301 2001-11-29 Paul Eggert <eggert@twinsun.com>
20302
20303 Name space cleanup in generated parser.
20304
20305 * doc/bison.texinfo (Bison Parser): Discuss system headers
20306 and their effect on the user name space.
20307
20308 * src/bison.simple:
20309 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20310 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20311 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20312
20313 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20314 on user names when possible.
20315
20316 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20317 Simplify test for whather <alloca.h> exists.
20318
20319 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20320
20321 (<stdio.h>): Include if YYDEBUG.
20322
20323 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20324 ! defined (yyoverflow) && ! defined (yymemcpy).
20325
20326 (yymemcpy, yyparse): Rename local variables as needed so that
20327 they all begin with 'yy'.
20328
20329 (yystrlen, yystpcpy): New functions.
20330
20331 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20332 All uses changed.
20333
20334 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20335 instead of relying on string.h functions. Use YYSTACK_ALLOC
20336 and YYSTACK_FREE instead of malloc and free.
20337
20338 2001-11-30 Akim Demaille <akim@epita.fr>
20339
20340 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20341 before their first uses.
20342 (YYBISON, YYPURE): Move to the top of the output.
20343
20344 2001-11-30 Akim Demaille <akim@epita.fr>
20345
20346 * tests/reduce.at (Useless Nonterminals): Fix.
20347
20348 2001-11-30 Akim Demaille <akim@epita.fr>
20349
20350 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20351 if body instead of `;' to pacify GCC's warnings.
20352
20353 2001-11-30 Akim Demaille <akim@epita.fr>
20354
20355 Instead of mapping the LHS of unused rules to -1, keep the LHS
20356 valid, but flag the rules as invalid.
20357
20358 * src/gram.h (rule_t): `useful' is a new member.
20359 * src/print.c (print_grammar): Adjust.
20360 * src/derives.c (set_derives): Likewise.
20361 * src/reader.c (packgram, reduce_output): Likewise.
20362 * src/reduce.c (reduce_grammar_tables): Likewise.
20363 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20364
20365 2001-11-30 Akim Demaille <akim@epita.fr>
20366
20367 * src/reduce.c (reduce_output): Formatting changes.
20368 * src/print.c (print_results, print_grammar): Likewise.
20369 * tests/regression.at (Rule Line Numbers)
20370 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20371
20372 2001-11-30 Akim Demaille <akim@epita.fr>
20373
20374 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20375 useless nonterminals, move them at the end of the symbol arrays.
20376 (reduce_output): Adjust.
20377 * tests/reduce.at (Useless Nonterminals): Adjust.
20378
20379 2001-11-30 Akim Demaille <akim@epita.fr>
20380
20381 * src/reduce.c: Various comment/formatting changes.
20382 (nonterminals_reduce): New, extracted from...
20383 (reduce_grammar_tables): here.
20384 (reduce_grammar): Call nonterminals_reduce.
20385
20386 2001-11-29 Paul Eggert <eggert@twinsun.com>
20387
20388 * src/bison.simple (YYSTACK_REALLOC): Remove.
20389 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20390 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20391 New macros.
20392 (union yyalloc): New type.
20393 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20394 an arbitrary restriction on hosts where size_t is wider than int.
20395
20396 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20397 a parser stack overflow. Allocate just one block of memory for all
20398 three stacks, instead of allocating three blocks; this typically is
20399 faster and reduces fragmentation.
20400
20401 Do not limit the number of items in the stack to a value that fits
20402 in 'int', as this is an arbitrary limit on hosts with 64-bit
20403 size_t and 32-bit int.
20404
20405 2001-11-29 Marc Autret <autret_m@epita.fr>
20406
20407 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20408 of defining YYERROR_VERBOSE.
20409 [AT_DATA]: $4 is now out of C declarations in the prologue.
20410
20411 2001-11-28 Marc Autret <autret_m@epita.fr>
20412
20413 * src/reader.c (parse_dquoted_param): New.
20414 (parse_skel_decl): Use it.
20415 * src/lex.h: Add its prototype.
20416 * src/lex.c (literalchar): Become not static.
20417
20418 2001-11-28 Marc Autret <autret_m@epita.fr>
20419
20420 * src/output.h: And put its extern declaration here.
20421 * src/output.c (error_verbose): Define here.
20422 (prepare): Echo name modification.
20423 * src/getargs.h: Clean its extern declaration.
20424 * src/getargs.c (error_verbose_flag): Remove.
20425 (getargs): Remove case 'e'.
20426 * src/options.c (option_table): 'error-verbose' is now seen as simple
20427 percent option.
20428 Include output.h.
20429
20430 * src/reader.c (read_declarations): Remove case tok_include.
20431 (parse_include_decl): Remove.
20432 * src/lex.h (token_t): Remove tok_include.
20433 * src/options.c (option_table): 'include' is now a simple command line
20434 option.
20435
20436 2001-11-28 Marc Autret <autret_m@epita.fr>
20437
20438 * src/bison.simple: Adjust muscle names.
20439 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20440 * src/output.c (prepare): s/_/-/ for the muscles names.
20441 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20442
20443 2001-11-28 Marc Autret <autret_m@epita.fr>
20444
20445 * src/bison.simple: Fix debug.
20446 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20447
20448 2001-11-28 Akim Demaille <akim@epita.fr>
20449
20450 * src/LR0.c (shifts_new): New.
20451 (save_shifts, insert_start_shift, augment_automaton): Use it.
20452
20453 2001-11-28 Akim Demaille <akim@epita.fr>
20454
20455 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20456 keep ruleno only.
20457
20458 2001-11-28 Akim Demaille <akim@epita.fr>
20459
20460 * src/closure.c (closure): Instead of looping over word in array
20461 then bits in words, loop over bits in array.
20462
20463 2001-11-28 Akim Demaille <akim@epita.fr>
20464
20465 * src/closure.c (closure): No longer optimize the special case
20466 where all the bits of `ruleset[r]' are set to 0, to make the code
20467 clearer.
20468
20469 2001-11-28 Akim Demaille <akim@epita.fr>
20470
20471 * src/closure.c (closure): `r' and `c' are new variables, used to
20472 de-obfuscate accesses to RULESET and CORE.
20473
20474 2001-11-28 Akim Demaille <akim@epita.fr>
20475
20476 * src/reduce.c (reduce_print): Use ngettext.
20477 (dump_grammar): Improve the trace accuracy.
20478
20479 2001-11-28 Akim Demaille <akim@epita.fr>
20480
20481 * src/reduce.c (dump_grammar): Don't translate trace messages.
20482
20483 2001-11-28 Akim Demaille <akim@epita.fr>
20484
20485 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20486 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20487 as all tags are free'ed afterwards.
20488 From Enrico Scholz.
20489
20490 2001-11-27 Paul Eggert <eggert@twinsun.com>
20491
20492 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20493 use alloca when we didn't want to, and vice versa.
20494
20495 2001-11-27 Marc Autret <autret_m@epita.fr>
20496
20497 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20498 initialization.
20499 * src/output.c (prepare): Remove its update.
20500
20501 2001-11-27 Marc Autret <autret_m@epita.fr>
20502
20503 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20504 Use %error-verbose.
20505
20506 2001-11-27 Marc Autret <autret_m@epita.fr>
20507
20508 * src/bison.simple: Remove YYERROR_VERBOSE using.
20509 Use %%error_verbose.
20510 (yyparse): Likewise.
20511 * src/output.c (prepare): Give its final value.
20512 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20513 * src/getargs.h: Add its extern declaration.
20514 * src/getargs.c (error_verbose_flag): New int.
20515 (getargs): Update to catch new case.
20516 * src/options.c (option_table): 'error-verbose' is a new option.
20517 (shortopts): Update.
20518
20519 2001-11-27 Akim Demaille <akim@epita.fr>
20520
20521 * src/system.h: Use intl/libgettext.h.
20522 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20523
20524 2001-11-27 Akim Demaille <akim@epita.fr>
20525
20526 * tests/torture.at (Exploding the Stack Size with Malloc):
20527 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20528
20529 2001-11-27 Akim Demaille <akim@epita.fr>
20530
20531 * src/files.c: Include error.h.
20532 Reported by Hans Aberg.
20533
20534 2001-11-26 Marc Autret <autret_m@epita.fr>
20535
20536 * src/reader.c (parse_include_decl): New, not yet implemented.
20537 (read_declarations): Add case tok_include.
20538 * src/getargs.h (include): Add its extern definition.
20539 * src/getargs.c (include): New const char *.
20540 (getargs): Add case '-I'.
20541 * src/options.c (option_table): Add include as command line and
20542 percent option.
20543 * src/lex.h (token_t): Add tok_include.
20544
20545 2001-11-26 Akim Demaille <akim@epita.fr>
20546
20547 * src/reader.c (readgram): Make sure rules for mid-rule actions
20548 have a lineno equal to that of their host rule.
20549 Reported by Hans Aberg.
20550 * tests/regression.at (Rule Line Numbers): New.
20551
20552 2001-11-26 Akim Demaille <akim@epita.fr>
20553
20554 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20555 size_ts.
20556
20557 2001-11-26 Akim Demaille <akim@epita.fr>
20558
20559 * src/complain.c, src/complain.h (error): Remove, provided by
20560 lib/error.[ch].
20561
20562 2001-11-26 Akim Demaille <akim@epita.fr>
20563
20564 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20565 issue an error message.
20566 * tests/regression.at (Invalid %directive): New.
20567 Reported by Hans Aberg.
20568
20569 2001-11-26 Akim Demaille <akim@epita.fr>
20570
20571 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20572 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20573
20574 2001-11-26 Akim Demaille <akim@epita.fr>
20575
20576 * src/conflicts.c (conflicts_print): Don't complain at all when
20577 there are no reduce/reduce conflicts, and as many shift/reduce
20578 conflicts as expected.
20579 * tests/regression.at (%expect right): Adjust.
20580
20581 2001-11-23 Akim Demaille <akim@epita.fr>
20582
20583 * lib/alloca.c: Update, from fileutils.
20584
20585 2001-11-23 Akim Demaille <akim@epita.fr>
20586
20587 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20588
20589 2001-11-23 Akim Demaille <akim@epita.fr>
20590
20591 * src/system.h: Include alloca.h.
20592 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20593
20594 2001-11-23 Akim Demaille <akim@epita.fr>
20595
20596 * src/print_graph.c (print_actions): Remove `rule', unused.
20597 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20598 pacify GCC's signed < unsigned warnings.
20599 * src/closure.c (itemsetsize): Likewise.
20600 * src/reader.c (symbol_list_new): Static.
20601
20602 2001-11-23 Akim Demaille <akim@epita.fr>
20603
20604 Attaching lineno to buckets is stupid, since only one copy of each
20605 symbol is kept, only the line of the first occurrence is kept too.
20606
20607 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20608 * src/reader.c (rline_allocated): Remove, unused.
20609 (symbol_list): Have a `line' member.
20610 (symbol_list_new): New.
20611 (readgram): Use it.
20612 * src/print.c (print_grammar): Output the rule line numbers.
20613 * tests/regression.at (Solved SR Conflicts)
20614 (Unresolved SR Conflicts): Adjust.
20615 Reported by Hans Aberg.
20616
20617 2001-11-22 Marc Autret <autret_m@epita.fr>
20618
20619 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20620
20621 2001-11-22 Marc Autret <autret_m@epita.fr>
20622
20623 * src/muscle_tab.c (muscle_init): Remove initialization of
20624 skeleton muscle.
20625 * src/output.c (output_master_parser): Do it here.
20626
20627 2001-11-20 Akim Demaille <akim@epita.fr>
20628
20629 * po/sv.po: New.
20630 * configure.in (ALL_LINGUAS): Adjust.
20631 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20632 longer contains strings to translate.
20633
20634 2001-11-19 Akim Demaille <akim@epita.fr>
20635
20636 * src/conflicts.c (conflicts_print): Add a missing \n.
20637
20638 2001-11-19 Akim Demaille <akim@epita.fr>
20639
20640 * src/nullable.c (nullable_print): New.
20641 (set_nullable): Call it when tracing.
20642 Better locality of variables.
20643
20644 2001-11-19 Akim Demaille <akim@epita.fr>
20645
20646 * src/print.c (print_actions): Better locality of variables.
20647
20648 2001-11-19 Akim Demaille <akim@epita.fr>
20649
20650 * src/derives.c (print_derives): Fix and enrich.
20651 * src/closure.c (print_fderives): Likewise.
20652
20653 2001-11-19 Akim Demaille <akim@epita.fr>
20654
20655 * src/closure.c (itemsetend): Remove, replaced with...
20656 (itemsetsize): new.
20657
20658 2001-11-19 Akim Demaille <akim@epita.fr>
20659
20660 * src/LR0.c (kernel_end): Remove, replaced with...
20661 (kernel_size): new.
20662
20663 2001-11-19 Akim Demaille <akim@epita.fr>
20664
20665 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20666 to clarify.
20667
20668 2001-11-19 Akim Demaille <akim@epita.fr>
20669
20670 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20671
20672 2001-11-19 Akim Demaille <akim@epita.fr>
20673
20674 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20675 trace messages.
20676 * src/LR0.c: Likewise.
20677 (allocate_itemsets): Use arrays instead of pointers to clarify.
20678
20679 2001-11-19 Akim Demaille <akim@epita.fr>
20680
20681 * src/getargs.c (statistics_flag): Replace with...
20682 (trace_flag): New.
20683 (longopts): Accept --trace instead of --statistics.
20684 * src/getargs.h, src/options.c: Adjust.
20685 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20686 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20687
20688 2001-11-19 Akim Demaille <akim@epita.fr>
20689
20690 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20691 pointers to clarify the code.
20692 (save_reductions, save_shifts): Factor common parts of alternatives.
20693
20694 2001-11-19 Akim Demaille <akim@epita.fr>
20695
20696 * src/LR0.c (new_state, get_state): Complete TRACE code.
20697 * src/closure.c: Include `reader.h' to get `tags', needed by the
20698 trace code.
20699 Rename the conditional DEBUG as TRACE.
20700 Output consistently TRACEs to stderr, not stdout.
20701 * src/derives.c: Likewise.
20702 * src/reduce.c: (inaccessable_symbols): Using if is better style
20703 than goto.
20704 Use `#if TRACE' instead of `#if 0' for tracing code.
20705
20706 2001-11-19 Akim Demaille <akim@epita.fr>
20707
20708 * src/system.h (LIST_FREE, shortcpy): New.
20709 * src/LR0.c: Use them.
20710 * src/output.c (free_itemsets, free_reductions, free_shifts):
20711 Remove, replaced by LIST_FREE.
20712
20713 2001-11-19 Akim Demaille <akim@epita.fr>
20714
20715 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20716 (REDUCTIONS_ALLOC): New.
20717 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20718 allocation.
20719
20720 2001-11-19 Akim Demaille <akim@epita.fr>
20721
20722 * src/LR0.c (new_state): Complete trace code.
20723 * src/nullable.c (set_nullable): Don't translate traces.
20724
20725 2001-11-19 Akim Demaille <akim@epita.fr>
20726
20727 * src/print_graph.c (print_core): Better locality of variables.
20728 * src/print.c (print_core): Likewise.
20729
20730 2001-11-19 Akim Demaille <akim@epita.fr>
20731
20732 * src/vcg.c: You do the output, so you are responsible of the
20733 handling of VCG syntax, in particular: use quotearg.
20734 * src/print_graph.c: Don't.
20735 (print_actions): Don't output the actions as part of the nodes,
20736 since that's the job of the edges.
20737 (print_state): Don't output by hand: fill the node description,
20738 and ask for its output.
20739
20740 2001-11-19 Akim Demaille <akim@epita.fr>
20741
20742 * src/bison.simple (yyparse): When verbosely reporting an error,
20743 no longer put additional quotes around token names.
20744 * tests/calc.at: Adjust.
20745
20746 2001-11-19 Akim Demaille <akim@epita.fr>
20747
20748 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20749 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20750 * src/output.c: Adjust.
20751
20752 2001-11-19 Akim Demaille <akim@epita.fr>
20753
20754 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20755 (rule_t): this.
20756 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20757
20758 2001-11-19 Akim Demaille <akim@epita.fr>
20759
20760 * src/gram.h (rule_t): New.
20761 (rule_table): New.
20762 (rrhs, rlhs): Remove, part of state_t.
20763 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20764 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20765 * src/reader.c, src/reduce.c: Adjust.
20766
20767 2001-11-19 Akim Demaille <akim@epita.fr>
20768
20769 * src/reader.c (symbols_output): New, extracted from...
20770 (packsymbols): Here.
20771 (reader): Call it.
20772
20773 2001-11-19 Akim Demaille <akim@epita.fr>
20774
20775 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20776 (maxrhs): this new function.
20777
20778 2001-11-19 Akim Demaille <akim@epita.fr>
20779
20780 * src/lalr.c (F): New macro to access the variable F.
20781 Adjust.
20782
20783 2001-11-19 Akim Demaille <akim@epita.fr>
20784
20785 * src/lalr.h (LA): New macro to access the variable LA.
20786 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20787 * src/lalr.c: Adjust.
20788
20789 2001-11-19 Akim Demaille <akim@epita.fr>
20790
20791 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20792 (set_state_table): handle the `lookaheads' members.
20793
20794 2001-11-19 Akim Demaille <akim@epita.fr>
20795
20796 * src/lalr.h (lookaheads): Removed array, whose contents is now
20797 a member of...
20798 (state_t): this structure.
20799 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20800 Adjust.
20801
20802 2001-11-19 Akim Demaille <akim@epita.fr>
20803
20804 * src/lalr.h (consistent): Removed array, whose contents is now
20805 a member of...
20806 (state_t): this structure.
20807 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20808 Adjust.
20809
20810 2001-11-19 Akim Demaille <akim@epita.fr>
20811
20812 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20813 contents are now members of...
20814 (state_t): this structure.
20815 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20816 Adjust.
20817
20818 2001-11-19 Akim Demaille <akim@epita.fr>
20819
20820 * src/lalr.h (state_t): New.
20821 (state_table): Be a state_t * instead of a core **.
20822 (accessing_symbol): Remove, part of state_t.
20823 * src/lalr.c: Adjust.
20824 (set_accessing_symbol): Merge into...
20825 (set_state_table): this.
20826 * src/print_graph.c, src/conflicts.c: Adjust.
20827
20828 2001-11-14 Akim Demaille <akim@epita.fr>
20829
20830 * tests/calc.at, tests/output.at, tests/regression.at,
20831 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20832 now the tests are run in private dirs, therefore AC_CLEANUP and
20833 family can be simplified to 0-ary.
20834 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20835 use abs. path to find config.h.
20836 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20837 stderr, there can be way too much random noise.
20838 Instead pass -Werror to GCC and rely on the exit status.
20839 Reported by Wolfram Wagner.
20840
20841 2001-11-14 Akim Demaille <akim@epita.fr>
20842
20843 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20844 defined only if yyoverflow is defined, to avoid `warning: unused
20845 variable `yyvs1''.
20846 Reported by The Test Suite.
20847
20848 2001-11-14 Akim Demaille <akim@epita.fr>
20849
20850 * src/print.c: Include reduce.h.
20851 Reported by Hans Aberg.
20852
20853 2001-11-14 Akim Demaille <akim@epita.fr>
20854
20855 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20856 Revert a previous patch: these are really const.
20857 * src/conflicts.c (conflict_report): Additional useless pair of
20858 braces to pacify GCC's warnings for `if () if () {} else {}'.
20859 * src/lex.c (parse_percent_token): Replace equal_offset with
20860 arg_offset.
20861 arg is const.
20862 Be sure to strdup `arg' when used, since there is no reason for
20863 token_buffer not to change.
20864
20865 2001-11-14 Akim Demaille <akim@epita.fr>
20866
20867 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20868 definition.
20869 * src/main.c (main): Use them.
20870 Suggested by Hans Aberg.
20871
20872 2001-11-12 Akim Demaille <akim@epita.fr>
20873
20874 * src/system.h (ngettext): Now that we use ngettext, be sure to
20875 provide a default definition when NLS are not used.
20876
20877 2001-11-12 Akim Demaille <akim@epita.fr>
20878
20879 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20880 Use @kbd to denote user input.
20881 (Language and Grammar): ANSIfy the example.
20882 Adjust its layout for info/notinfo.
20883 (Location Tracking Calc): Output error messages to stderr.
20884 Output locations in a more GNUtically correct way.
20885 Fix a couple of Englishos.
20886 Adjust @group/@end group pairs.
20887
20888 2001-11-12 Akim Demaille <akim@epita.fr>
20889
20890 %expect was not functioning at all.
20891
20892 * src/conflicts.c (expected_conflicts): Set to -1.
20893 (conflict_report): Use ngettext.
20894 (conflicts_print): Check %expect and make its violation an error.
20895 * doc/bison.texinfo (Expect Decl): Adjust.
20896 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20897 * tests/regression.at (%expect not enough, %expect right)
20898 (%expect too much): New.
20899
20900 2001-11-12 Akim Demaille <akim@epita.fr>
20901
20902 * tests/regression.at (Conflicts): Rename as...
20903 (Unresolved SR Conflicts): this.
20904 (Solved SR Conflicts): New.
20905
20906 2001-11-12 Akim Demaille <akim@epita.fr>
20907
20908 * src/reduce.c (print_results): Rename as...
20909 (reduce_output): This.
20910 Output to OUT, passed as argument, instead of output_obstack.
20911 (dump_grammar): Likewise.
20912 (reduce_free): New.
20913 Also free V1.
20914 (reduce_grammar): No longer call reduce_output, since...
20915 * src/print.c (print_results): do it.
20916 * src/main.c (main): Call reduce_free;
20917
20918 2001-11-12 Akim Demaille <akim@epita.fr>
20919
20920 * src/conflicts.c (print_reductions): Accept OUT as argument.
20921 Output to it, not to output_obstack.
20922 * src/print.c (print_actions): Adjust.
20923
20924 2001-11-12 Akim Demaille <akim@epita.fr>
20925
20926 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20927 the result instead of using...
20928 (src_total, rrc_total, src_count, rrc_count): Remove.
20929 (any_conflicts): Remove.
20930 (print_conflicts): Split into...
20931 (conflicts_print, conflicts_output): New.
20932 * src/conflicts.h: Adjust.
20933 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20934 * src/print.c (print_grammar): Issue `\n' between two rules.
20935 * tests/regression.at (Conflicts): New.
20936 Reported by Tom Lane.
20937
20938 2001-11-12 Akim Demaille <akim@epita.fr>
20939
20940 * tests/regression.at (Invalid input): Remove, duplicate with
20941 ``Invalid input: 1''.
20942
20943 2001-11-12 Akim Demaille <akim@epita.fr>
20944
20945 * tests/torture.at (AT_DATA_STACK_TORTURE)
20946 (Exploding the Stack Size with Alloca)
20947 (Exploding the Stack Size with Malloc): New.
20948
20949 2001-11-12 Akim Demaille <akim@epita.fr>
20950
20951 * src/bison.simple (YYSTACK_REALLOC): New.
20952 (yyparse) [!yyoverflow]: Use it and free the old stack.
20953 Reported by Per Allansson.
20954
20955 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20956
20957 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20958 define CPP macro, which substitute YYSTYPE by yystype.
20959 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20960 with yyltype/YYLTYPE. This allows inclusion of the generated
20961 header within the parser if the compiler, such as GGC, accepts
20962 multiple equivalent #defines.
20963 From Akim.
20964
20965 2001-11-05 Akim Demaille <akim@epita.fr>
20966
20967 * src/reader.c (symbols_output): New, extracted from...
20968 (packsymbols): here.
20969 (reader): Adjust.
20970
20971 2001-11-05 Akim Demaille <akim@epita.fr>
20972
20973 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20974
20975 2001-11-05 Akim Demaille <akim@epita.fr>
20976
20977 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20978 pattern.
20979
20980 2001-11-05 Akim Demaille <akim@epita.fr>
20981
20982 * src/options.h (struct option_table_struct): set_flags is void*.
20983 * src/options.c (longopts): Support `--output' and `%output'.
20984 (usage): Adjust.
20985 * src/lex.h (tok_setopt): Remove, replaced with...
20986 (tok_intopt, tok_stropt): these new guys.
20987 * src/lex.c (getopt.h): Not needed.
20988 (token_buffer, unlexed_token_buffer): Not const.
20989 (percent_table): Promote `-' over `_' in directive names.
20990 Active `%name-prefix', `file-prefix', and `output'.
20991 (parse_percent_token): Accept possible arguments to directives.
20992 Promote `-' over `_' in directive names.
20993
20994 2001-11-04 Akim Demaille <akim@epita.fr>
20995
20996 * doc/bison.texinfo (Decl Summary): Split the list into
20997 `directives for grammars' and `directives for bison'.
20998 Sort'em.
20999 Add description of `%name-prefix', `file-prefix', and `output'.
21000 Promote `-' over `_' in directive names.
21001 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21002 Simplify the description of `--name-prefix'.
21003 Promote `-' over `_' in directive names.
21004 Promote `--output' over `--output-file'.
21005 Fix the description of `--defines'.
21006 * tests/output.at: Exercise %file-prefix and %output.
21007
21008 2001-11-02 Akim Demaille <akim@epita.fr>
21009
21010 * doc/refcard.tex: Update.
21011
21012 2001-11-02 Akim Demaille <akim@epita.fr>
21013
21014 * src/symtab.h (SUNDEF): New.
21015 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21016 stand for `uninitialized', instead of 0.
21017 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21018 * src/lex.c (lex): Adjust.
21019
21020 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21021 Number it 0.
21022 Let yylex return it instead of a plain 0.
21023 Reported by Dick Streefland.
21024
21025 2001-11-02 Akim Demaille <akim@epita.fr>
21026
21027 * tests/regression.at (Mixing %token styles): New test.
21028
21029 2001-11-02 Akim Demaille <akim@epita.fr>
21030
21031 * src/reader.c (parse_thong_decl): Formatting changes.
21032 (token_translations_init): New, extracted from...
21033 (packsymbols): Here.
21034 Adjust.
21035
21036 2001-11-01 Akim Demaille <akim@epita.fr>
21037
21038 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21039 Check that `9foo.y' produces correct cpp guards.
21040 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21041 guards.
21042 Reported by Wwp.
21043
21044 2001-11-01 Akim Demaille <akim@epita.fr>
21045
21046 * tests/regression.at (Invalid input: 2): New.
21047 * src/lex.c (unlexed_token_buffer): New.
21048 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21049 too.
21050 Reported by Wwp.
21051
21052 2001-11-01 Akim Demaille <akim@epita.fr>
21053
21054 * tests/calc.at: Catch up with 1.30.
21055 * configure.in: Bump to 1.49a.
21056 Adjust to newer Autotest.
21057
21058 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21059
21060 * src/conflicts.c: Move global variables rrc_total and src_total ...
21061 (print_conflicts): here.
21062 * src/output.c (output): Free global variable user_toknums.
21063 * src/lex.c (token_obstack): Become static.
21064
21065 2001-10-18 Akim Demaille <akim@epita.fr>
21066
21067 * tests/atlocal.in (GCC): Add.
21068 * tests/calc.at: s/m4_match/m4_bmatch/.
21069 s/m4_patsubst/m4_bpatsubst/.
21070 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21071 * configure.in: AC_SUBST(GCC).
21072
21073 2001-10-14 Marc Autret <autret_m@epita.fr>
21074
21075 * src/options.c (create_long_option_table): Fix.
21076
21077 2001-10-10 Akim Demaille <akim@epita.fr>
21078
21079 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21080
21081 2001-10-04 Akim Demaille <akim@epita.fr>
21082
21083 * src/reader.c (parse_union_decl): Push the caracters in
21084 union_obstack, not attrs_obstack.
21085
21086 2001-10-04 Akim Demaille <akim@epita.fr>
21087
21088 Merge in the branch 1.29.
21089
21090 * src/reader.c (packsymbols): Use a temporary obstack for
21091 `%%tokendef', since output_stack is already used elsewhere.
21092
21093 2001-10-02 Akim Demaille <akim@epita.fr>
21094
21095 Bump 1.29d.
21096
21097 2001-10-02 Akim Demaille <akim@epita.fr>
21098
21099 Version 1.29c.
21100
21101 2001-10-02 Akim Demaille <akim@epita.fr>
21102
21103 * tests/regression.at (Invalid CPP headers): New.
21104 From Alexander Belopolsky.
21105 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21106
21107 2001-10-02 Akim Demaille <akim@epita.fr>
21108
21109 * tests/regression.at (Invalid input): New.
21110 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21111 Reported by Shura.
21112
21113 2001-10-02 Akim Demaille <akim@epita.fr>
21114
21115 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21116
21117 2001-10-02 Akim Demaille <akim@epita.fr>
21118
21119 * src/output.c (output_parser): Assert `skeleton'.
21120 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21121 systems.
21122 From Shura.
21123
21124 2001-10-01 Marc Autret <autret_m@epita.fr>
21125
21126 * src/lex.h: Echo modifications.
21127 * src/lex.c (unlex): Parameter is now token_t.
21128 From Hans Aberg.
21129
21130 2001-10-01 Marc Autret <autret_m@epita.fr>
21131
21132 * src/main.c: Include lex.h.
21133 From Hans Aberg.
21134
21135 2001-09-29 Akim Demaille <akim@epita.fr>
21136
21137 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21138
21139 2001-09-28 Akim Demaille <akim@epita.fr>
21140
21141 * tests/testsuite.at: Update to newer Autotest.
21142 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21143
21144 2001-09-27 Akim Demaille <akim@epita.fr>
21145
21146 Position independent wrapper.
21147
21148 * tests/bison: Remove.
21149 * tests/bison.in: New.
21150 * configure.in: Adjust.
21151
21152 2001-09-27 Paul Eggert <eggert@twinsun.com>
21153
21154 Port quotearg fixes from tar 1.13.24.
21155
21156 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21157 tm to be declared.
21158 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21159 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21160
21161 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21162 * m4/mbrtowc.m4: New file.
21163 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21164 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21165
21166 2001-09-27 Akim Demaille <akim@epita.fr>
21167
21168 Bump to 1.29c.
21169
21170 2001-09-27 Akim Demaille <akim@epita.fr>
21171
21172 Version 1.29b.
21173
21174 2001-09-25 Akim Demaille <akim@epita.fr>
21175
21176 * src/system.h: Include `xalloc.h'.
21177 Remove it from the C files.
21178 * src/files.c (output_files): Free the obstacks.
21179 * src/lex.c (init_lex): Rename as...
21180 (lex_init): this.
21181 (lex_free): New.
21182 * src/main.c (main): Use it.
21183
21184 2001-09-24 Marc Autret <autret_m@epita.fr>
21185
21186 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21187 to output informations in fout (FILE*).
21188 (open_graph, close_graph): Likewise.
21189 (output_graph, output_edge, output_node): Likewise.
21190 * src/vcg.h: Update function prototypes.
21191 * src/print_graph.c (print_graph): Open output graph file.
21192 (print_actions): Adjust.
21193 * src/files.h: Remove extern declaration.
21194 * src/files.c: Remove graph_obstack declaration.
21195 (open_files): Remove graph_obstack initialization.
21196 (output_files): Remove graph_obstack saving.
21197
21198 2001-09-24 Marc Autret <autret_m@epita.fr>
21199
21200 * src/files.c (compute_output_file_names): Fix.
21201
21202 2001-09-24 Marc Autret <autret_m@epita.fr>,
21203 Akim Demaille <akim@epita.fr>
21204
21205 * src/reader.c (reader): Remove call to free_symtab ().
21206 * src/main.c (main): Call it here.
21207 Include symtab.h.
21208 * src/conflicts.c (initialize_conflicts): Rename as...
21209 (solve_conflicts): this.
21210 * src/print.c (print_core, print_actions, print_state)
21211 (print_grammar): Dump to a file instead a `output_obstack'.
21212 (print_results): Dump `output_obstack', and then proceed with the
21213 FILE *.
21214 * src/files.c (compute_output_file_names, close_files): New.
21215 (output_files): Adjust.
21216 * src/main.c (main): Adjust.
21217
21218 2001-09-23 Marc Autret <autret_m@epita.fr>
21219
21220 * src/files.c (compute_header_macro): Computes header macro name
21221 from spec_defines_file when given.
21222
21223 2001-09-23 Marc Autret <autret_m@epita.fr>
21224
21225 * src/files.c (output_files): Add default extensions.
21226
21227 2001-09-22 Akim Demaille <akim@epita.fr>
21228
21229 * src/conflicts.c (finalize_conflicts): Rename as...
21230 (free_conflicts): this.
21231
21232 2001-09-22 Akim Demaille <akim@epita.fr>
21233
21234 * src/gram.c (gram_free): Rename back as...
21235 (dummy): this.
21236 (output_token_translations): Free `token_translations'.
21237 * src/symtab.c (free_symtab): Free the tag field.
21238
21239 2001-09-22 Akim Demaille <akim@epita.fr>
21240
21241 Remove `translations' as it is always set to true.
21242
21243 * src/gram.h: Adjust.
21244 * src/reader.c (packsymbols, parse_token_decl): Adjust
21245 * src/print.c (print_grammar): Adjust.
21246 * src/output.c (output_token_translations): Adjust.
21247 * src/lex.c (lex): Adjust.
21248 * src/gram.c: Be sure the set pointers to NULL.
21249 (dummy): Rename as...
21250 (gram_free): this.
21251
21252 2001-09-22 Akim Demaille <akim@epita.fr>
21253
21254 * configure.in: Invoke AM_LIB_DMALLOC.
21255 * src/system.h: Use dmalloc.
21256 * src/LR0.c: Be sure to have pointers initialized to NULL.
21257 (allocate_itemsets): Allocate kernel_items only if needed.
21258
21259 2001-09-22 Akim Demaille <akim@epita.fr>
21260
21261 * configure.in: Bump to 1.29b.
21262 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21263 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21264 need xmalloc.c in calc.y.
21265 From Pascal Bart.
21266
21267 2001-09-21 Akim Demaille <akim@epita.fr>
21268
21269 Version 1.29a.
21270 * Makefile.maint, config/config.guess, config/config.sub,
21271 * config/missing: Update from masters.
21272 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21273 upon package.m4.
21274 * configure.in (ALL_LINGUAS): Add `tr'.
21275
21276 2001-09-21 Akim Demaille <akim@epita.fr>
21277
21278 * tests/Makefile.am (package.m4): Move to...
21279 ($(srcdir)/$(TESTSUITE)): here.
21280
21281 2001-09-20 Akim Demaille <akim@epita.fr>
21282
21283 * src/complain.c: No longer try to be standalone: use system.h.
21284 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21285 * src/complain.h: Likewise.
21286 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21287 Remove the unused variable `n'.
21288 From Albert Chin-A-Young.
21289
21290 2001-09-18 Marc Autret <autret_m@epita.fr>
21291
21292 * doc/bison.1: Update.
21293 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21294 descriptions.
21295 (Option Cross Key): Update.
21296 Add --graph.
21297
21298 2001-09-18 Marc Autret <autret_m@epita.fr>
21299
21300 * tests/regression.at: New test (comment in %union).
21301
21302 2001-09-18 Marc Autret <autret_m@epita.fr>
21303
21304 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21305 do that.
21306 Reported by Keith Browne.
21307
21308 2001-09-18 Marc Autret <autret_m@epita.fr>
21309
21310 * tests/output.at: Add tests for --defines and --graph.
21311
21312 2001-09-18 Marc Autret <autret_m@epita.fr>
21313
21314 * tests/output.at: Removes tests of %{header,src}_extension features.
21315
21316 2001-09-18 Akim Demaille <akim@epita.fr>
21317
21318 * tests/Makefile.am (package.m4): New.
21319 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21320 (_AT_CHECK_CALC_ERROR): Likewise.
21321 Factor the `, ' part of verbose error messages.
21322
21323 2001-09-18 Marc Autret <autret_m@epita.fr>
21324
21325 * src/getargs.c (longopts): Declare --defines and --graph as options
21326 with optional arguments.
21327 * src/files.h: Add extern declarations.
21328 * src/files.c (spec_graph_file, spec_defines_file): New.
21329 (output_files): Update.
21330 Remove CPP-outed code.
21331
21332 2001-09-18 Marc Autret <autret_m@epita.fr>
21333
21334 Turn off %{source,header}_extension feature.
21335
21336 * src/files.c (compute_exts_from_gf): Update.
21337 (compute_exts_from_src): Update.
21338 (output_files): CPP-out useless code.
21339 * src/files.h: Remove {header,source}_extension extern declarations.
21340 * src/reader.c (parse_dquoted_param): CPP-out.
21341 (parse_header_extension_decl): Remove.
21342 (parse_source_extension_decl): Remove.
21343 (read_declarations): Remove cases tok_{hdrext,srcext}.
21344 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21345 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21346
21347 2001-09-10 Akim Demaille <akim@epita.fr>
21348
21349 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21350 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21351 (AT_CHECK_OUTPUT): this.
21352 Merely check ls' exit status, its output is useless.
21353
21354 2001-09-10 Akim Demaille <akim@epita.fr>
21355
21356 * tests/calc.at: Use m4_match.
21357 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21358
21359 2001-09-10 Marc Autret <autret_m@epita.fr>,
21360 Akim Demaille <akim@epita.fr>
21361
21362 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21363 enum color_e.
21364 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21365 to `normal'.
21366 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21367 * src/lex.h: Adjust prototype.
21368 (token_t): Add `tok_undef'.
21369 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21370 (parse_percent_token): Now returns token_t.
21371 Add default statement in switch.
21372 (lex): Separate `c' as an input variable, from the token_t result
21373 part.
21374 (unlexed): Is a token_t.
21375
21376 2001-09-10 Akim Demaille <akim@epita.fr>
21377
21378 * configure.in: Bump to 1.29a.
21379
21380 2001-09-07 Akim Demaille <akim@epita.fr>
21381
21382 Version 1.29.
21383
21384 2001-08-30 Akim Demaille <akim@epita.fr>
21385
21386 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21387 * m4/atconfig.m4: Remove.
21388 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21389 * tests/bison: New.
21390 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21391 m4_if, m4_patsubst, and m4_regexp.
21392 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21393 `input' file instead of echo.
21394
21395 2001-08-29 Akim Demaille <akim@epita.fr>
21396
21397 Bump to 1.28e.
21398
21399 2001-08-29 Akim Demaille <akim@epita.fr>
21400
21401 Version 1.28d.
21402
21403 2001-08-29 Paul Eggert <eggert@twinsun.com>
21404
21405 * src/bison.simple (yyparse): Don't take the address of an
21406 item before the start of an array, as that doesn't conform to
21407 the C Standard.
21408
21409 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21410
21411 * doc/bison.texinfo (Location Tracking Calc): New node.
21412
21413 2001-08-29 Paul Eggert <eggert@twinsun.com>
21414
21415 * src/output.c (output): Do not define const, as this now
21416 causes more problems than it cures.
21417
21418 2001-08-29 Akim Demaille <akim@epita.fr>
21419
21420 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21421 the nodes.
21422 Be sure to tag the `detailmenu'.
21423
21424 2001-08-29 Akim Demaille <akim@epita.fr>
21425
21426 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21427 download in a tmp dir.
21428
21429 2001-08-28 Marc Autret <autret_m@epita.fr>
21430
21431 * config/depcomp: New file.
21432
21433 2001-08-28 Marc Autret <autret_m@epita.fr>
21434
21435 * doc/bison.1 (mandoc): Adjust.
21436 From Juan Manuel Guerrero.
21437
21438 2001-08-28 Marc Autret <autret_m@epita.fr>
21439
21440 * src/print_graph.c (print_state): Fix.
21441
21442 2001-08-27 Marc Autret <autret_m@epita.fr>
21443
21444 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21445 char * members.
21446 Echo modifications to the functions prototypes.
21447 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21448
21449 2001-08-27 Marc Autret <autret_m@epita.fr>
21450
21451 * src/vcg.c: Include `xalloc.h'.
21452 (add_colorentry): New.
21453 (add_classname): New.
21454 (add_infoname): New.
21455 * src/vcg.h: Add new prototypes.
21456
21457 2001-08-27 Akim Demaille <akim@epita.fr>
21458
21459 * Makefile.maint: Sync. again with CVS Autoconf.
21460
21461 2001-08-27 Akim Demaille <akim@epita.fr>
21462
21463 * Makefile.maint: Formatting changes.
21464 (po-update, cvs-update, update): New targets.
21465 (AMTAR): Remove.
21466
21467 2001-08-27 Akim Demaille <akim@epita.fr>
21468
21469 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21470 * Makefile.maint: Sync. with CVS Autoconf.
21471
21472 2001-08-27 Marc Autret <autret_m@epita.fr>
21473
21474 * src/vcg.h (struct infoname_s): New.
21475 (struct colorentry_s): New.
21476 (graph_s): New fields {vertical,horizontal}_order in structure.
21477 Add `infoname' field.
21478 Add `colorentry' field;
21479 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21480 (G_HORIZONTAL_ORDER): New.
21481 (G_INFONAME): New.
21482 (G_COLORENTRY): New.
21483 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21484 Add output of `infoname'.
21485 Add output of `colorentry'.
21486
21487 2001-08-27 Marc Autret <autret_m@epita.fr>
21488
21489 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21490 This one shadowed a global parameter.
21491
21492 2001-08-24 Marc Autret <autret_m@epita.fr>
21493
21494 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21495 instead of `unsigned'.
21496 (print_state): Do not call obstack_object_size () in obstack_grow ()
21497 to avoid macro variables shadowing.
21498
21499 2001-08-23 Marc Autret <autret_m@epita.fr>
21500
21501 * src/lex.c (percent_table): Typo: s/naem/name/.
21502 Add graph option.
21503 Normalize new options declarations.
21504
21505 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21506
21507 * tests/suite.at: Exercise %header_extension and %source_extension.
21508
21509 2001-08-16 Marc Autret <autret_m@epita.fr>
21510
21511 * src/reader.c (parse_dquoted_param): New.
21512 (parse_header_extension_decl): Use it.
21513 (parse_source_extension_decl): Likewise.
21514
21515 2001-08-16 Marc Autret <autret_m@epita.fr>
21516
21517 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21518 (get_xxxx_str): Use assert () instead of complain ().
21519 Remove return invokations in default cases.
21520 (get_decision_str): Modify default behaviour. Remove second argument.
21521 Echo modifications on calls.
21522 (output_graph): Fix.
21523
21524 2001-08-16 Marc Autret <autret_m@epita.fr>
21525
21526 * src/getargs.c (usage): Update with ``-g, --graph''.
21527
21528 2001-08-16 Marc Autret <autret_m@epita.fr>
21529
21530 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21531 (Option Cross Key): Likewise.
21532 * doc/bison.1: Update.
21533
21534 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21535
21536 * src/output.c (output_master_parser): Don't finish action_obstack.
21537 (output_parser): Don't care about the muscle action, here.
21538 (prepare): Copy the action_obstack in the action muscle.
21539 (output): Free action_obstack.
21540
21541 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21542
21543 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21544 will contain `%union' declaration.
21545 (parse_union_decl): Delete #line directive output.
21546 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21547 informations about %union.
21548 (parse_union_decl): Copy the union_obstack in the muscle stype.
21549 * src/bison.simple: Add new #line directive.
21550 Add typdef %%stype YYSTYPE.
21551
21552 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21553
21554 * src/bison.simple: Add new `#line' directive.
21555
21556 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21557
21558 * src/bison.simple: New `#line' directive.
21559 * src/output.c (output_parser): Support new dynamic muscle input_line.
21560
21561 2001-09-22 Marc Autret <autret_m@epita.fr>
21562
21563 * src/output.c (output_master_parser): New.
21564 (output_parser): Be more re-entrant.
21565
21566 2001-09-21 Marc Autret <autret_m@epita.fr>
21567
21568 * src/reader.c (copy_definition, parse_union_decl): Update and use
21569 `linef' muscle.
21570 (copy_action): Likewise.
21571 Use obstack_1grow ().
21572 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21573
21574 2001-09-21 Marc Autret <autret_m@epita.fr>
21575
21576 * src/options.c (option_table): Adjust.
21577 * src/lex.c (parse_percent_token): Fix.
21578
21579 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21580
21581 * src/options.c (symtab.h): Include it, need by lex.h.
21582
21583 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21584
21585 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21586 is now an option_table_struct*.
21587 (option_strcmp): New function option_strcmp.
21588 (parse_percent_token): Call option_strcmp.
21589 * src/getargs.c (xalloc.h, options.h): Include it.
21590 (getargs): Call create_long_option_table.
21591 (getargs): Free longopts at the end of the function.
21592 (shortopts): Move in options.c.
21593 * src/options.c (create_long_option_table): New function. Convert
21594 information from option_table to option structure.
21595 * src/reader.c (options.h): Include it.
21596
21597 * src/Makefile.am: Adjust.
21598 * src/options.c (option_table): Create from longopts and percent_table.
21599 * src/getargs.c (longopts): Delete.
21600 * src/lex.c (struct percent_table_struct): Delete.
21601 (percent_table): Delete.
21602 (options.h): Include it.
21603 * src/options.c: Create.
21604 * src/options.h: Create.
21605 Declare enum opt_access_e.
21606 Define struct option_table_struct.
21607
21608 2001-09-20 Marc Autret <autret_m@epita.fr>
21609
21610 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21611 sections of Bison.
21612
21613 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21614
21615 * src/bison.simple: s/%%filename/%%skeleton.
21616 * src/muscle_tab.c (getargs.h): Include it.
21617 (muscle_init): Insert new muscle skeleton.
21618
21619 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21620
21621 * src/output.c (output_parser): Delete unused variable actions_dumped.
21622
21623 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21624
21625 * src/output.c (output): Delete call to reader_output_yylsp.
21626 * src/reader.c (reader): Likewise.
21627 * src/reader.h: Delete declaration of reader_output_yylsp.
21628
21629 2001-09-02 Marc Autret <autret_m@epita.fr>
21630
21631 * src/reader.c: Include muscle_tab.h.
21632 (parse_union_decl): Update.
21633 (parse_macro_decl): Rename parse_muscle_decl.
21634 Update to use renamed functions and variable.
21635 (read_declarations, copy_action, read_additionnal_code, : Updated
21636 with correct variables and functions names.
21637 (packsymbols, reader): Likewise.
21638
21639 * src/reader.h (muscle_obstack): Extern declaration update.
21640
21641 * src/output.c: Include muscle_tab.h
21642 In all functions using macro_insert, change by using muscle_insert ().
21643 (macro_obstack): Rename muscle_obstack.
21644 Echo modifications in the whole file.
21645 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21646 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21647 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21648
21649 * src/muscle_tab.h: Update double inclusion macros.
21650 (macro_entry_s): Rename muscle_entry_s.
21651 Update prototypes.
21652
21653 * src/muscle_tab.c: Include muscle_tab.h.
21654 Rename macro_tabble to muscle_table.
21655 (mhash1, mhash2, mcmp): Use muscle_entry.
21656 (macro_init): Rename muscle_init. Update.
21657 (macro_insert): Rename muscle_insert. Update.
21658 (macro_find): Rename muscle_find. Update.
21659
21660 * src/main.c: Include muscle_tab.h.
21661 (main): Call muscle_init ().
21662 * src/Makefile.am (bison_SOURCES): Echo modifications.
21663
21664 2001-09-02 Marc Autret <autret_m@epita.fr>
21665
21666 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21667
21668 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21669
21670 2001-09-02 Marc Autret <autret_m@epita.fr>
21671
21672 * src/macrotab.c, src/macrotab.h: Remove.
21673
21674 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21675
21676 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21677 filename.
21678
21679 2001-09-01 Marc Autret <autret_m@epita.fr>
21680
21681 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21682 to an explicit value to activate the feature. We do it here.
21683
21684 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21685
21686 * src/output.c (prepare): Delete the `filename' muscule insertion.
21687 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21688 (parse_union_decl): Likewise.
21689 * src/macrotab.c (macro_init): Initialize filename by infile.
21690
21691 2001-08-31 Marc Autret <autret_m@epita.fr>
21692
21693 * src/bison.simple (YYLSP_NEEDED): New definition.
21694 * src/output.c (prepare): Add macro insertion of `locations_flag'
21695
21696 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21697
21698 * src/output.c (prepare): Delete insertion of previous muscles,
21699 and insert the `prefix' muscles.
21700 * src/macrotab.c (macro_init): Likewise.
21701 (macro_init): Initialization prefix directive by `yy'.
21702 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21703 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21704 yylval, yydebug, yyerror, yynerrs and yyparse.
21705 New directive `#define' to substitute yydebug, ... with option
21706 name_prefix.
21707
21708 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21709
21710 * src/main.c (main): Standardize.
21711 * src/output.c (output_table_data, output_parser): Likewise.
21712 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21713
21714 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21715
21716 * src/reader.c (read_additionnal_code): Rename %%user_code to
21717 %%epilogue.
21718 * src/output.c (output): Rename %%declarations to %%prologue.
21719 * src/bison.simple: Echo modifications.
21720
21721 2001-08-31 Marc Autret <autret_m@epita.fr>
21722
21723 * src/reader.c (readgram): CleanUp.
21724 (output_token_defines): Likewise.
21725 (packsymbols): Likewise.
21726 (reader): Likewise.
21727 * src/output.c (output): CPP-out useless code.
21728
21729 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21730
21731 * src/reader.c (reader): Delete obsolete call to function
21732 output_trailers and output_headers.
21733 * src/output.h: Remove obsolete functions prototypes of output_headers
21734 and output_trailers.
21735
21736 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21737
21738 * src/main.c: Include macrotab.h.
21739 * src/macrotab.h (macro_entry_s): Constify fields.
21740 Adjust functions prototypes.
21741 * src/macrotab.c (macro_insert): Constify key and value.
21742 (macro_find): Constify key.
21743 (macro_insert): Include 'xalloc.h'
21744 (macro_insert): Use XMALLOC.
21745 (macro_find): Constify return value.
21746 * src/output.c (output_table_data): Rename table to table_data.
21747 (output_parser): Constify macro_key, macro_value.
21748
21749 2001-08-30 Marc Autret <autret_m@epita.fr>
21750
21751 * src/reader.c (parse_skel_decl): New.
21752 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21753 * src/lex.h (token_t): New token `tok_skel'.
21754 * src/lex.c (percent_table): Add skeleton option entry.
21755 Standardize.
21756
21757 2001-08-29 Marc Autret <autret_m@epita.fr>
21758
21759 * src/bison.simple: Add %%user_code directive at the end.
21760 * src/reader.c (read_additionnal_code): New.
21761 (reader): Use it.
21762 * src/output.c (output_program): Remove.
21763 (output): Update.
21764
21765 2001-08-28 Marc Autret <autret_m@epita.fr>
21766
21767 * src/output.c (output_actions): Clean up.
21768 (output_gram): CPP-out useless code.
21769 * src/reader.c (reader): Clean up, CPP-out useless code.
21770
21771 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21772
21773 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21774 directive.
21775 * src/bison.simple: Add `%%definitions'.
21776
21777 2001-08-28 Marc Autret <autret_m@epita.fr>
21778
21779 * config/depcomp: New file.
21780
21781 2001-08-27 Paul Eggert <eggert@twinsun.com>
21782
21783 * src/bison.simple (yyparse): Don't take the address of an
21784 item before the start of an array, as that doesn't conform to
21785 the C Standard.
21786
21787 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21788
21789 * src/output.c (output): Remove the initialization of the macro
21790 obstack. It was done too late here.
21791
21792 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21793 completely wrong.
21794 (reader): Initialize the macro obstack here, since we need it to grow
21795 '%define' directives.
21796
21797 * src/reader.h: Declare the macro obstack as extern.
21798
21799 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21800
21801 * src/output.c (output_parser): Fix. Store single '%' characters in
21802 the output obstack instead of throwing them away.
21803
21804 2001-08-27 Akim Demaille <akim@epita.fr>
21805
21806 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21807
21808 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21809
21810 * lib/Makefile.am: Adjust.
21811
21812 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21813
21814 * src/bison.simple: Update and add '%%' directives.
21815
21816 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21817
21818 * src/reader.c (reader): Remove calls to 'output_headers' and
21819 'output_trailers'. Remove some C output.
21820 (readgram): Disable a piece of code that was writing a default
21821 definition for 'YYSTYPE'.
21822 (reader_output_yylsp): Remove.
21823 (packsymbols): Output token defintions to a macro.
21824 (copy_definition): Disable C output.
21825
21826 * src/reader.c (parse_macro_decl): New function used to parse macro
21827 declarations.
21828 (copy_string2): Put the body of copy_string into this new function.
21829 Add a parameter to let the caller choose whether he wants to copy the
21830 string delimiters or not.
21831 (copy_string): Be a simple call to copy_string2 with the last argument
21832 bound to true.
21833 (read_declarations): Add case for macro definition.
21834 (copy_identifier): New.
21835 (parse_macro_decl): Read macro identifiers using copy_identifier
21836 rather than lex.
21837
21838 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21839
21840 * src/output.c (prepare): Add prefixed names.
21841 (output_parser): Output semantic actions.
21842 (output_parser): Fix bug on '%%line' directives.
21843
21844 * src/output.c (output_headers): Remove. The C code printed by this
21845 function should now be in the skeletons.
21846 (output_trailers): Remove.
21847 (output): Disable call to 'reader_output_yylsp'.
21848 (output_rule_data): Do not output tables to the table obstack.
21849
21850 * src/output.c: Remove some C dedicated output.
21851 Improve the use of macro and output obstacks.
21852 (output_defines): Remove.
21853
21854 * src/output.c (output_token_translations): Associate 'translate'
21855 table with a macro. No output to the table obstack.
21856 (output_gram): Same for 'rhs' and 'prhs'.
21857 (output_stos): Same for 'stos'.
21858 (output_rule_data): Same for 'r1' and 'r2'.
21859 (token_actions): Same for 'defact'.
21860 (goto_actions): Same for 'defgoto'.
21861 (output_base): Same for 'pact' and 'pgoto'.
21862 (output_table): Same for 'table'.
21863 (output_check): Same for 'check'.
21864
21865 * src/output.c (output_table_data): New function.
21866 (output_short_table): Remove.
21867 (output_short_or_char_table): Remove.
21868
21869 * src/output.c (output_parser): Replace most of the skeleton copy code
21870 with something new. Skeletons are now processed character by character
21871 rather than line by line, and Bison looks for '%%' macros. This is the
21872 first step in making Bison's output process (a lot) more flexible.
21873 (output_parser): Use the macro table.
21874
21875 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21876
21877 * src/main.c (main): Initialize the macro table.
21878
21879 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21880
21881 * src/lex.c (percent_table): Add tok_define.
21882 * src/lex.h: Add tok_define.
21883
21884 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21885
21886 * src/macrotab.c: New file.
21887 * src/macrotab.h: New file.
21888 * src/Makefile.am: Update.
21889
21890 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21891
21892 * lib/hash.c: New file.
21893 * lib/hash.h: New file.
21894 * lib/Makefile.am: Update.
21895
21896 2001-08-15 Akim Demaille <akim@epita.fr>
21897
21898 Version 1.28c.
21899
21900 2001-08-15 Marc Autret <autret_m@epita.fr>
21901
21902 * src/reader.c (readgram): Indent output macro YYSTYPE.
21903 (packsymbols): Likewise.
21904 (output_token_defines): Likewise.
21905 * src/files.c: Standardize.
21906 (compute_header_macro): New.
21907 (defines_obstack_save): New. Use compute_header_macro.
21908 (output_files): Update. Use defines_obstack_save.
21909
21910 2001-08-15 Akim Demaille <akim@epita.fr>
21911
21912 * doc/bison.texinfo (Table of Symbols): Document
21913 YYSTACK_USE_ALLOCA.
21914
21915 2001-08-15 Akim Demaille <akim@epita.fr>
21916
21917 * missing: Update from CVS Automake.
21918 * config/config.guess, config/config.sub, config/texinfo.tex:
21919 Update from gnu.org.
21920
21921 2001-08-15 Akim Demaille <akim@epita.fr>
21922
21923 * Makefile.maint: Sync with CVS Autoconf.
21924
21925 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21926
21927 * doc/bison.texinfo: Include GNU Free Documentation License from
21928 `fdl.texi'.
21929 * doc/fdl.texi: Add to package.
21930
21931 2001-08-14 Marc Autret <autret_m@epita.fr>
21932
21933 Turn on %{source,header}_extension features.
21934
21935 * src/lex.c (percent_table): Un-CPP out header_extension and
21936 source_extension.
21937 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21938 (compute_exts_from_src): Remove conditions. It restores priorities
21939 between options.
21940
21941 2001-08-14 Marc Autret <autret_m@epita.fr>
21942
21943 * src/files.c (compute_base_names): Add extensions computing when
21944 `--file-prefix' used.
21945 Standardize function calls.
21946
21947 2001-08-13 Marc Autret <autret_m@epita.fr>
21948
21949 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21950 defining it (defined but null disables alloca).
21951
21952 2001-08-13 Marc Autret <autret_m@epita.fr>
21953
21954 * src/bison.simple (_yy_memcpy): CPP reformat.
21955
21956 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21957
21958 * tests/atconfig.in (CPPFLAGS): Fix.
21959
21960 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21961
21962 * doc/bison.texinfo: Include GNU General Public License from
21963 `gpl.texi'.
21964 * doc/gpl.texi: Add to package.
21965
21966 2001-08-10 Marc Autret <autret_m@epita.fr>
21967
21968 * src/print_graph.h: Fix.
21969 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21970
21971 2001-08-10 Akim Demaille <akim@epita.fr>
21972
21973 * src/system.h: Provide default declarations for stpcpy, strndup,
21974 and strnlen.
21975
21976 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21977
21978 * doc/bison.texinfo (Locations): Update @$ stuff.
21979
21980 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21981
21982 * src/bison.simple (YYLLOC_DEFAULT): Update.
21983 (yyparse): Adjust.
21984
21985 2001-08-08 Marc Autret <autret_m@epita.fr>
21986
21987 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21988 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21989 Reported by Fabrice Bauzac.
21990
21991 2001-08-08 Marc Autret <autret_m@epita.fr>
21992
21993 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21994 * src/vcg.c (output_node): Fix.
21995 * src/vcg.h: Cleanup.
21996 * src/print_graph.c: Add comments.
21997 (node_output_size): New global variable. Simplify the formatting of
21998 the VCG graph output.
21999 (print_actions): Unused code is now used. It notifies the final state
22000 and no action states in the VCG graph. It also give the reduce actions.
22001 The `shift and goto' edges are red and the `go to state' edges are
22002 blue.
22003 Get the current node name and node_obstack by argument.
22004 (node_obstack): New variable.
22005 (print_state): Manage node_obstack.
22006 (print_core): Use node_obstack given by argument.
22007 A node is not only computed here but in print_actions also.
22008 (print_graph): CPP out useless code instead of commenting it.
22009
22010 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22011
22012 * tests/atconfig.in (CPPFLAGS): Fix.
22013
22014 2001-08-07 Akim Demaille <akim@epita.fr>
22015
22016 * src/print_graph.c (quote): New.
22017 (print_core): Use it.
22018
22019 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22020
22021 * src/vcg.c (complain.h): Include it.
22022 Unepitaize `return' invocations.
22023 [NDEBUG] (main): Remove.
22024 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22025 * src/files.c (open_files): Initialize graph_obstack.
22026 * src/print_graph.c (print_actions): CPP out useless code.
22027 (print_core): Don't output the last `\n' in labels.
22028 Use `quote'.
22029 * src/files.c (output_files): Output the VCG file.
22030 * src/main.c (main): Invoke print_graph ();
22031
22032 2001-08-06 Marc Autret <autret_m@epita.fr>
22033
22034 Automaton VCG graph output.
22035 Using option ``-g'' or long option ``--graph'', you can generate
22036 a gram_filename.vcg file containing a VCG description of the LALR (1)
22037 automaton of your grammar.
22038
22039 * src/main.c: Call to print_graph() function.
22040 * src/getargs.h: Update.
22041 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22042 (graph_flag): New flag.
22043 (longopts): Update.
22044 (getargs): Add case `g'.
22045 * src/files.c (graph_obstack): New obstack struct.
22046 (open_files): Initialize new obstack.
22047 (output_files): Saves graph_obstack if required.
22048 * src/files.h (graph_obstack): New extern declaration.
22049 * src/Makefile.am: Add new source files.
22050
22051 2001-08-06 Marc Autret <autret_m@epita.fr>
22052
22053 * src/print_graph.c, src/print_graph.h (graph): New.
22054 * src/vcg.h: New file.
22055 * src/vcg.c: New file, VCG graph handling.
22056
22057 2001-08-06 Marc Autret <autret_m@epita.fr>
22058
22059 Add of %source_extension and %header_extension which specify
22060 the source or/and the header output file extension.
22061
22062 * src/files.c (compute_base_names): Remove initialisation of
22063 src_extension and header_extension.
22064 (compute_exts_from_gf): Update.
22065 (compute_exts_from_src): Update.
22066 (output_files): Update.
22067 * src/reader.c (parse_header_extension_decl): New.
22068 (parse_source_extension_decl): New.
22069 (read_declarations): New case statements for the new tokens.
22070 * src/lex.c (percent_table): Add entries for %source_extension
22071 and %header_extension.
22072 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22073
22074 2001-08-06 Marc Autret <autret_m@epita.fr>
22075
22076 * configure.in: Bump to 1.28c.
22077 * doc/bison.texinfo: Texinfo thingies.
22078
22079 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22080
22081 * tests/atconfig.in (CPPFLAGS): Add.
22082 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22083
22084 2001-08-03 Akim Demaille <akim@epita.fr>
22085
22086 Version 1.28b.
22087
22088 2001-08-03 Akim Demaille <akim@epita.fr>
22089
22090 * tests/Makefile.am (check-local): Ship testsuite.
22091 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22092 Include `string.h'.
22093
22094 2001-08-03 Akim Demaille <akim@epita.fr>
22095
22096 * configure.in: Try using -Wformat when compiling.
22097
22098 2001-08-03 Akim Demaille <akim@epita.fr>
22099
22100 * configure.in: Bump to 1.28b.
22101
22102 2001-08-03 Akim Demaille <akim@epita.fr>
22103
22104 * src/complain.c: Adjust strerror_r portability issues.
22105
22106 2001-08-03 Akim Demaille <akim@epita.fr>
22107
22108 Version 1.28a.
22109
22110 2001-08-03 Akim Demaille <akim@epita.fr>
22111
22112 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22113 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22114 * src/getargs.c: Include complain.h.
22115 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22116 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22117
22118 2001-08-03 Akim Demaille <akim@epita.fr>
22119
22120 * src/reader.c (readgram): Display hidden chars in error messages.
22121
22122 2001-08-03 Akim Demaille <akim@epita.fr>
22123
22124 Update to gettext 0.10.39.
22125
22126 2001-08-03 Akim Demaille <akim@epita.fr>
22127
22128 * lib/strspn.c: New.
22129
22130 2001-08-01 Marc Autret <autret_m@epita.fr>
22131
22132 * doc/bison.texinfo: Update.
22133 * doc/bison.1 (mandoc): Update.
22134 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22135 * src/files.c: Support output files extensions computing.
22136 (src_extension): New static variable.
22137 (header_extension): New static variable.
22138 (tr): New function.
22139 (get_extension_index): New function, gets the index of an extension
22140 filename in a string.
22141 (compute_exts_from_gf): New function, computes extensions from the
22142 grammar file extension.
22143 (compute_exts_from_src): New functions, computes extensions from the
22144 C source file extension, file given by ``-o'' option.
22145 (compute_base_names): Update.
22146 (output_files): Update.
22147
22148 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22149
22150 * doc/bison.texi: Document @$.
22151 (Locations): New section.
22152
22153 2001-07-18 Akim Demaille <akim@epita.fr>
22154
22155 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22156 * config/prev-version.txt, config/move-if-change: New.
22157 * Makefile.am: Adjust.
22158
22159 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22160
22161 * src/bison.simple (yyparse): Suppress warning `comparaison
22162 between signed and unsigned'.
22163
22164 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22165
22166 * src/getargs.h (raw_flag): Remove.
22167 * src/getargs.c: Die on `-r'/`--raw'.
22168 * src/lex.c (parse_percent_token): Die on `%raw'.
22169 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22170 * tests/calc.at: Suppress test with option `--raw'.
22171
22172 2001-07-14 Akim Demaille <akim@epita.fr>
22173
22174 * config/: New.
22175 * configure.in: Require Autoconf 2.50.
22176 Update to gettext 0.10.38.
22177
22178 2001-03-16 Akim Demaille <akim@epita.fr>
22179
22180 * doc/bison.texinfo: ANSIfy the examples.
22181
22182 2001-03-16 Akim Demaille <akim@epita.fr>
22183
22184 * getargs.c (skeleton): New variable.
22185 (longopts): --skeleton is a new option.
22186 (shortopts, getargs): -S is a new option.
22187 * getargs.h: Declare skeleton.
22188 * output.c (output_parser): Use it.
22189
22190 2001-03-16 Akim Demaille <akim@epita.fr>
22191
22192 * m4/strerror_r.m4: New.
22193 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22194 * lib/error.h, lib/error.c: Update.
22195
22196 2001-03-16 Akim Demaille <akim@epita.fr>
22197
22198 * src/getargs.c (longopts): Clean up.
22199
22200 2001-02-21 Akim Demaille <akim@epita.fr>
22201
22202 * src/reader.c (gensym): `gensym_count' is your own.
22203 Use a static buf to create the symbol name, as token_buffer is no
22204 longer a buffer.
22205
22206 2001-02-08 Akim Demaille <akim@epita.fr>
22207
22208 * src/conflicts.c (conflict_report): Be sure not to append to res
22209 between two calls, which could happen if both first sprintf were
22210 skipped, but not the first cp += strlen.
22211
22212 2001-02-08 Akim Demaille <akim@epita.fr>
22213
22214 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22215 New, from fileutils 4.0.37.
22216 * configure.in: Require Autoconf 2.49c. I took some time before
22217 making this decision. This is the only way out for portability
22218 issues in Bison, it would mean way too much duplicate effort to
22219 import in Bison features implemented in 2.49c since 2.13.
22220 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22221
22222 2001-02-02 Akim Demaille <akim@epita.fr>
22223
22224 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22225 * lib/xalloc.h, lib/xmalloc.c: Update.
22226
22227 2001-01-19 Akim Demaille <akim@epita.fr>
22228
22229 Get rid of the ad hoc handling of token_buffer in the scanner: use
22230 the obstacks.
22231
22232 * src/lex.c (token_obstack): New.
22233 (init_lex): Initialize it. No longer call...
22234 (grow_token_buffer): this. Remove it.
22235 Adjust all the places which used it to use the obstack.
22236
22237 2001-01-19 Akim Demaille <akim@epita.fr>
22238
22239 * src/lex.h: Rename all the tokens:
22240 s/\bENDFILE\b/tok_eof/g;
22241 s/\bIDENTIFIER\b/tok_identifier/g;
22242 etc.
22243 Let them be enums, not #define, to ease debugging.
22244 Adjust all the code.
22245
22246 2001-01-18 Akim Demaille <akim@epita.fr>
22247
22248 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22249 * src/lex.c (maxtoken, grow_token_buffer): Static.
22250
22251 2001-01-18 Akim Demaille <akim@epita.fr>
22252
22253 Since we now use obstacks, more % directives can be enabled.
22254
22255 * src/lex.c (percent_table): Also accept `%yacc',
22256 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22257 `%debug'.
22258 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22259 instead of returning a token.
22260 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22261 * src/reader.c (read_declarations): Adjust.
22262 * src/files.c (open_files): Don't call `compute_base_names', don't
22263 compute `attrsfile' since they depend upon data which might be
22264 *in* the input file now.
22265 (output_files): Do it here.
22266 * src/output.c (output_headers): Document the fact that this patch
22267 introduces a guaranteed SEGV for semantic parsers.
22268 * doc/bison.texinfo: Document them.
22269 * tests/suite.at: Exercise these %options.
22270
22271 2000-12-20 Akim Demaille <akim@epita.fr>
22272
22273 Also handle the output file (--verbose) with obstacks.
22274
22275 * files.c (foutput): Remove.
22276 (output_obstack): New.
22277 Adjust all dependencies.
22278 * src/conflicts.c: Return a string.
22279 * src/system.h (obstack_grow_string): Rename as...
22280 (obstack_sgrow): this. Be ready to work with non literals.
22281 (obstack_fgrow4): New.
22282
22283 2000-12-20 Akim Demaille <akim@epita.fr>
22284
22285 * src/files.c (open_files): Fix the computation of short_base_name
22286 in the case of `-o foo.tab.c'.
22287
22288 2000-12-20 Akim Demaille <akim@epita.fr>
22289
22290 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22291 (copy_dollar): Now that everything uses obstacks, get rid of the
22292 FILE * parameters.
22293
22294 2000-12-20 Akim Demaille <akim@epita.fr>
22295
22296 * src/files.c (open_files): Actually the `.output' file is based
22297 on the short_base_name, not base_name.
22298 * tests/suite.at (Checking output file names): Adjust.
22299
22300 2000-12-20 Akim Demaille <akim@epita.fr>
22301
22302 * src/bison.s1: Remove, we now use directly...
22303 * src/bison.simple: this.
22304 * src/Makefile.am: Use pkgdata instead of data.
22305
22306 2000-12-20 Akim Demaille <akim@epita.fr>
22307
22308 * src/files.c (guard_obstack): New.
22309 (open_files): Initialize it.
22310 (output_files): Dump it...
22311 * src/files.h: Export it.
22312 * src/reader.c (copy_guard): Use it.
22313
22314 2000-12-19 Akim Demaille <akim@epita.fr>
22315
22316 * src/files.c (outfile, defsfile, actfile): Removed as global
22317 vars.
22318 (open_files): Don't compute them.
22319 (output_files): Adjust.
22320 (base_name, short_base_name): Be global.
22321 Adjust dependencies.
22322
22323 2000-12-19 Akim Demaille <akim@epita.fr>
22324
22325 * src/files.c (strsuffix): New.
22326 (stringappend): Be just like strcat but allocate.
22327 (base_names): Eve out from open_files.
22328 Try to simplify the rather hairy computation of base_name and
22329 short_base_name.
22330 (open_files): Use it.
22331 * tests/suite.at (Checking output file names): New test.
22332
22333 2000-12-19 Akim Demaille <akim@epita.fr>
22334
22335 * src/system.h (obstack_grow_literal_string): Rename as...
22336 (obstack_grow_string): this.
22337 * src/output.c (output_parser): Recognize `%% actions' instead of
22338 `$'.
22339 * src/bison.s1: s/$/%% actions/.
22340 * src/bison.hairy: Likewise.
22341
22342 2000-12-19 Akim Demaille <akim@epita.fr>
22343
22344 * src/output.c (output_parser): Compute the `#line' lines when
22345 there are.
22346 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22347 Suggested by Hans Aberg.
22348
22349 2000-12-19 Akim Demaille <akim@epita.fr>
22350
22351 Let the handling of the skeleton files be local to the procedures
22352 that use it.
22353
22354 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22355 longer static.
22356 (fparser, open_extra_files): Remove.
22357 (open_files, output_files): Don't take care of fparser.
22358 * src/files.h: Adjust.
22359 * src/output.c (output_parser): Open and close the file to the
22360 skeleton.
22361 * src/reader.c (read_declarations): When %semantic_parser, open
22362 fguard.
22363
22364 2000-12-19 Akim Demaille <akim@epita.fr>
22365
22366 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22367 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22368
22369 2000-12-19 Akim Demaille <akim@epita.fr>
22370
22371 * src/files.c (open_files): Yipee! We no longer need all the code
22372 looking for `/tmp' since we have no tmp file.
22373
22374 2000-12-19 Akim Demaille <akim@epita.fr>
22375
22376 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22377 New macros.
22378 * src/files.c (open_files): Less dependency on MSDOS etc.
22379
22380 2000-12-14 Akim Demaille <akim@epita.fr>
22381
22382 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22383 Provide a default definition.
22384 Use it when executing the default @ action.
22385 * src/reader.c (reader_output_yylsp): No longer include
22386 `timestamp' and `text' in the default YYLTYPE.
22387
22388 2000-12-12 Akim Demaille <akim@epita.fr>
22389
22390 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22391 (copy_guard): Quote the file names.
22392 Reported by Laurent Mascherpa.
22393
22394 2000-12-12 Akim Demaille <akim@epita.fr>
22395
22396 * src/output.c (output_headers, output_program, output): Be sure
22397 to escape special characters when outputting filenames.
22398 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22399 (output_headers): Don't depend on them, Use ACTSTR.
22400
22401 2000-11-17 Akim Demaille <akim@epita.fr>
22402
22403 * lib/obstack.h: Formatting changes.
22404 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22405 prevents type checking.
22406 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22407 cast the value to (void *): assigning a `foo *' to a `void *'
22408 variable is valid.
22409 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22410 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22411 append characters.
22412
22413 2000-11-17 Akim Demaille <akim@epita.fr>
22414
22415 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22416 as...
22417 (suite.m4, regression.m4, calc.m4): these.
22418 * tests/atgeneral.m4: Update from CVS Autoconf.
22419
22420 2000-11-17 Akim Demaille <akim@epita.fr>
22421
22422 * tests/regression.m4 (%union and --defines): New test,
22423 demonstrating a current bug in the obstack implementation.
22424
22425 2000-11-17 Akim Demaille <akim@epita.fr>
22426
22427 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22428 macros.
22429 Use them to declare the variables which are global or local to
22430 `yyparse'.
22431
22432 2000-11-17 Akim Demaille <akim@epita.fr>
22433
22434 * acconfig.h: Remove, no longer used.
22435
22436 2000-11-07 Akim Demaille <akim@epita.fr>
22437
22438 * src: s/Copyright (C)/Copyright/g.
22439
22440 2000-11-07 Akim Demaille <akim@epita.fr>
22441
22442 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22443 defining.
22444 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22445
22446 2000-11-07 Akim Demaille <akim@epita.fr>
22447
22448 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22449 Merge in a single CPP if/else.
22450
22451 2000-11-07 Akim Demaille <akim@epita.fr>
22452
22453 * src/output.c (output): Remove useless variables.
22454 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22455 argument `data' for consistency with the prototypes.
22456 Qualify it `const'.
22457 (obstack_copy, obstack_copy0): Rename the second argument as
22458 `address' for consistency. Qualify it `const'.
22459 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22460 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22461 `const' their input argument (`data' or `address').
22462 Adjust the corresponding macros to include `const' in casts.
22463
22464 2000-11-03 Akim Demaille <akim@epita.fr>
22465
22466 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22467 s/PFILE1/BISON_HAIRY/.
22468 Adjust dependencies.
22469
22470 2000-11-03 Akim Demaille <akim@epita.fr>
22471
22472 For some reason, this was not applied.
22473
22474 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22475 `unlink': it's no longer used.
22476
22477 2000-11-03 Akim Demaille <akim@epita.fr>
22478
22479 * src/files.c (skeleton_find): New function, eved out of...
22480 (open_files, open_extra_files): here.
22481
22482 2000-11-03 Akim Demaille <akim@epita.fr>
22483
22484 Don't use `atexit'.
22485
22486 * src/files.c (obstack_save): New function.
22487 (done): Rename as...
22488 (output_files): this.
22489 Use `obstack_save'.
22490 * src/main.c (main): Don't use `atexit' to register `done', since
22491 it no longer has to remove tmp files, just call `output_files'
22492 when there are no errors.
22493
22494 2000-11-02 Akim Demaille <akim@epita.fr>
22495
22496 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22497 `unlink': it's no longer used.
22498 * src/files.h: Formatting changes.
22499
22500 2000-11-02 Akim Demaille <akim@epita.fr>
22501
22502 Remove the last uses of mktemp and unlink/delete.
22503
22504 * src/files.c (fdefines, ftable): Removed.
22505 (defines_ostack, table_obstack): New.
22506 Adjust dependencies of the former into uses of the latter.
22507 * src/output.c (output_short_or_char_table, output_short_table):
22508 Convert to using obstacks.
22509 * src/reader.c (copy_comment2): Accept one FILE * and two
22510 obstacks.
22511 (output_token_defines, reader_output_yylsp): Use obstacks.
22512 * src/system.h (obstack_fgrow3): New.
22513 * po/POTFILES.in: Adjust.
22514
22515 2000-11-01 Akim Demaille <akim@epita.fr>
22516
22517 Change each use of `fattrs' into a use of `attrs_obstack'.
22518
22519 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22520 * src/files.c (fattrs): Remove.
22521 (attrs_obstack): New.
22522 Adjust all dependencies.
22523 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22524
22525 2000-11-01 Akim Demaille <akim@epita.fr>
22526
22527 Introduce obstacks.
22528 Change each use of `faction' into a use of `action_obstack'.
22529
22530 * lib/obstack.h, lib/obstack.c: New files.
22531 * src/files.c (faction): Remove.
22532 (action_obstack): New.
22533 Adjust all dependencies.
22534
22535 2000-10-20 Akim Demaille <akim@epita.fr>
22536
22537 * lib/quote.h (PARAMS): New macro. Use it.
22538
22539 2000-10-16 Akim Demaille <akim@epita.fr>
22540
22541 * src/output.c (output_short_or_char_table): New function.
22542 (output_short_table, output_token_translations): Use it.
22543 (goto_actions): Use output_short_table.
22544
22545 2000-10-16 Akim Demaille <akim@epita.fr>
22546
22547 * src/symtab.c (bucket_new): New function.
22548 (getsym): Use it.
22549
22550 * src/output.c (output_short_table): New argument to display the
22551 comment associated with the table.
22552 Adjust dependencies.
22553 (output_gram): Use it.
22554 (output_rule_data): Nicer output layout for YYTNAME.
22555
22556 2000-10-16 Akim Demaille <akim@epita.fr>
22557
22558 * src/lex.c (read_typename): New function.
22559 (lex): Use it.
22560 * src/reader.c (copy_dollar): Likewise.
22561
22562 2000-10-16 Akim Demaille <akim@epita.fr>
22563
22564 * src/reader.c (copy_comment2): Expect the input stream to be on
22565 the `/' which is suspected to open a comment, instead of being
22566 called after `//' or `/*' was read.
22567 (copy_comment, copy_definition, parse_union_decl, copy_action)
22568 (copy_guard): Adjust.
22569
22570 2000-10-16 Akim Demaille <akim@epita.fr>
22571
22572 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22573 `read_signed_integer'.
22574
22575 2000-10-16 Akim Demaille <akim@epita.fr>
22576
22577 * src/reader.c (copy_dollar): New function.
22578 (copy_guard, copy_action): Use it.
22579
22580 2000-10-16 Akim Demaille <akim@epita.fr>
22581
22582 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22583 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22584 New files, from Fileutils 4.0.27.
22585 * src/main.c (printable_version): Remove.
22586 * src/lex.c, src/reader.c: Use `quote'.
22587
22588 2000-10-04 Akim Demaille <akim@epita.fr>
22589
22590 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22591
22592 2000-10-04 Akim Demaille <akim@epita.fr>
22593
22594 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22595
22596 2000-10-04 Akim Demaille <akim@epita.fr>
22597
22598 When a literal string is used to define two different tokens,
22599 `bison -v' segfaults.
22600 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22601
22602 * tests/regression.m4: New file.
22603 Include the core of the sample provided by Piotr Gackiewicz.
22604 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22605 properly.
22606
22607 2000-10-04 Akim Demaille <akim@epita.fr>
22608
22609 * src/reader.c (parse_expect_decl): Keep `count' within the size
22610 of `buffer'.
22611 From Neil Booth.
22612
22613 2000-10-02 Paul Eggert <eggert@twinsun.com>
22614
22615 * bison.s1 (yyparse): Assign the default value
22616 unconditionally, to avoid a GCC warning and make the parser a
22617 tad smaller.
22618
22619 2000-10-02 Akim Demaille <akim@epita.fr>
22620
22621 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22622 options.
22623
22624 2000-10-02 Akim Demaille <akim@epita.fr>
22625
22626 * src/derives.c, src/print.c, src/reduce.c: To ease the
22627 translation, move some `\n' out of the translated strings.
22628
22629 2000-10-02 Akim Demaille <akim@epita.fr>
22630
22631 The location tracking mechanism is precious for parse error
22632 messages. Nevertheless, it is enabled only when `@n' is used in
22633 the grammar, which is a different issue (you can use it in error
22634 message, but not in the grammar per se). Therefore, there should
22635 be another means to enable it.
22636
22637 * src/getargs.c (getargs): Support `--locations'.
22638 (usage): Report it.
22639 * src/getargs.h (locationsflag): Export it.
22640 * src/lex.c (percent_table): Support `%locations'.
22641 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22642 with `locationsflag'.
22643 * doc/bison.texinfo: Document `--locations' and `%locations'.
22644 Sort the options.
22645 * tests/calc.m4: Test it.
22646
22647 For regularity of the names, replace each
22648 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22649 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22650 In addition replace each `flag' with `_flag'.
22651
22652 2000-10-02 Akim Demaille <akim@epita.fr>
22653
22654 Also test parse error messages, including with YYERROR_VERBOSE.
22655
22656 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22657 associative).
22658 Use it to check the computations.
22659 Use it to check `nonassoc' is honored.
22660 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22661 `--yyerror-verbose'.
22662 (_AT_CHECK_CALC): Adjust to this option.
22663 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22664
22665 2000-10-02 Akim Demaille <akim@epita.fr>
22666
22667 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22668 the latter demonstrates a flaw in the handling of non debugging
22669 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22670 was used in order to simplify:
22671
22672 #if YYDEBUG
22673 if (yydebug)
22674 {
22675 ...
22676 }
22677 #endif
22678
22679 into
22680
22681 if (yydebug)
22682 {
22683 ...
22684 }
22685
22686 unfortunately this leads to a CPP conflict when
22687 `--name-prefix=foo' is used since it produces `#define yydebug
22688 foodebug'.
22689
22690 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22691 (YYDPRINTF): New macro.
22692 Spread its use.
22693 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22694 the bison options.
22695 Also test `--verbose', `--defines' and `--name-prefix'.
22696
22697 2000-10-02 Akim Demaille <akim@epita.fr>
22698
22699 Improve the readability of the produced parsers.
22700
22701 * src/bison.s1: Formatting changes.
22702 Improve the comment related to the `$' mark.
22703 (yydefault): Don't fall through to `yyresume': `goto' there.
22704 * src/output.c (output_parser): When the `$' is met, skip the end
22705 of its line.
22706 New variable, `number_of_dollar_signs', to check there's exactly
22707 one `$' in the parser skeleton.
22708
22709 2000-10-02 Akim Demaille <akim@epita.fr>
22710
22711 * lib/xstrdup.c: New file, from the fileutils.
22712 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22713 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22714 instead of strlen + xmalloc + strcpy.
22715 * src/symtab.c (copys): Remove, use xstrdup instead.
22716
22717 2000-10-02 Akim Demaille <akim@epita.fr>
22718
22719 * src/gram.h (associativity): New enum type which replaces the
22720 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22721 `right_assoc', `left_assoc' and `non_assoc'.
22722 Adjust all dependencies.
22723 * src/reader.c: Formatting changes.
22724 (LTYPESTR): Don't define it, use it as a literal in
22725 `reader_output_yylsp'.
22726 * src/symtab.h (symbol_class): New enum type which replaces the
22727 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22728 `sunknown', `stoken and `snterm'.
22729
22730 2000-10-02 Akim Demaille <akim@epita.fr>
22731
22732 * src/getargs.c (fixed_outfiles): Rename as...
22733 (yaccflag): for consistency and accuracy.
22734 Adjust dependencies.
22735
22736 2000-10-02 Akim Demaille <akim@epita.fr>
22737
22738 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22739 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22740 difficult and introduced a lot of core dump. It turns out that
22741 Bison used an implementation of `xmalloc' based on `calloc', and
22742 at various places it does depend upon the initialization to 0. I
22743 have not tried to isolate the pertinent places, and all the former
22744 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22745 someone should address this issue.
22746
22747 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22748 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22749 files.
22750 Adjust dependencies.
22751 * src/warshall.h: New file.
22752 Propagate.
22753
22754 2000-10-02 Akim Demaille <akim@epita.fr>
22755
22756 Various anti-`extern in *.c' changes.
22757
22758 * src/system.h: Include `assert.h'.
22759
22760 2000-10-02 Akim Demaille <akim@epita.fr>
22761
22762 * src/state.h (nstates, final_state, first_state, first_shift)
22763 (first_reduction): Move their exportation from here...
22764 * src/LR0.h: to here.
22765 Adjust dependencies.
22766 * src/getargs.c (statisticsflag): New variable.
22767 Add support for `--statistics'.
22768 Adjust dependencies.
22769
22770 Remove a lot of now useless `extern' statements in most files.
22771
22772 2000-10-02 Akim Demaille <akim@epita.fr>
22773
22774 * src/LR0.h: New file.
22775 Propagate its use.
22776
22777 2000-10-02 Akim Demaille <akim@epita.fr>
22778
22779 * src/print.h: New file.
22780 Propagate its use.
22781 * src/print.c: Formatting and ordering changes.
22782 (verbose, terse): Replace with...
22783 (print_results): this new function.
22784 Adjust dependencies.
22785
22786 2000-10-02 Akim Demaille <akim@epita.fr>
22787
22788 * src/conflicts.c (conflict_report): New function.
22789 (conflict_log, verbose_conflict_log): Replace with...
22790 (print_conflicts): this function.
22791 Adjust dependencies.
22792 * src/conflicts.h: New file.
22793 Propagate its inclusion.
22794
22795 2000-10-02 Akim Demaille <akim@epita.fr>
22796
22797 * src/nullable.h: New file.
22798 Propagate its inclusion.
22799 * src/nullable.c: Formatting changes.
22800
22801 2000-10-02 Akim Demaille <akim@epita.fr>
22802
22803 * src/reduce.h: New file.
22804 Propagate its inclusion.
22805 * src/reduce.c: Topological sort and other formatting changes.
22806 (bool, TRUE, FALSE): Move their definition to...
22807 * src/system.h: here.
22808
22809 2000-10-02 Akim Demaille <akim@epita.fr>
22810
22811 * src/files.c: Formatting changes.
22812 (tryopen, tryclose, openfiles): Rename as...
22813 (xfopen, xfclose, open_files): this.
22814 (stringappend): static.
22815 * src/files.h: Complete the list of exported symbols.
22816 Propagate its use.
22817
22818 2000-10-02 Akim Demaille <akim@epita.fr>
22819
22820 * src/reader.h: New file.
22821 Propagate its use instead of tedious list of `extern' and
22822 prototypes.
22823 * src/reader.c: Formatting changes, topological sort,
22824 s/register//.
22825
22826 2000-10-02 Akim Demaille <akim@epita.fr>
22827
22828 * src/lex.h: Prototype `lex.c' exported functions.
22829 * src/reader.c: Adjust.
22830 * src/lex.c: Formatting changes.
22831 (safegetc): Rename as...
22832 (xgetc): this.
22833
22834 2000-10-02 Akim Demaille <akim@epita.fr>
22835
22836 * src/lalr.h: New file.
22837 Propagate its inclusion instead of prototypes and `extern'.
22838 * src/lalr.c: Formatting changes, topological sorting etc.
22839
22840 2000-10-02 Akim Demaille <akim@epita.fr>
22841
22842 * src/output.c (token_actions): Introduce a temporary array,
22843 YYDEFACT, that makes it possible for this function to use
22844 output_short_table.
22845
22846 2000-10-02 Akim Demaille <akim@epita.fr>
22847
22848 `user_toknums' is output as a `short[]' in `output.c', while it is
22849 defined as a `int[]' in `reader.c'. For consistency with the
22850 other output tables, `user_toknums' is now defined as a table of
22851 shorts.
22852
22853 * src/reader.c (user_toknums): Be a short table instead of an int
22854 table.
22855 Adjust dependencies.
22856
22857 Factor the short table outputs.
22858
22859 * src/output.c (output_short_table): New function.
22860 * src/output.c (output_gram, output_stos, output_rule_data)
22861 (output_base, output_table, output_check): Use it.
22862
22863 2000-10-02 Akim Demaille <akim@epita.fr>
22864
22865 * src/output.c (output): Topological sort of the functions, in
22866 order to get rid of the `static' prototypes.
22867 No longer use `register'.
22868 * src/output.h: New file.
22869 Propagate its inclusion in files explicitly prototyping functions
22870 from output.c.
22871
22872 2000-09-21 Akim Demaille <akim@epita.fr>
22873
22874 * src/atgeneral.m4: Update from Autoconf.
22875
22876 2000-09-21 Akim Demaille <akim@epita.fr>
22877
22878 * src/closure.h: New file.
22879 * src/closure.c: Formatting changes, topological sort over the
22880 functions, use of closure.h.
22881 (initialize_closure, finalize_closure): Rename as...
22882 (new_closure, free_closure): these. Adjust dependencies.
22883 * src/LR0.c: Formatting changes, topological sort, use of
22884 cloture.h.
22885 (initialize_states): Rename as...
22886 (new_states): this.
22887 * src/Makefile.am (noinst_HEADERS): Adjust.
22888
22889 2000-09-20 Akim Demaille <akim@epita.fr>
22890
22891 * src/acconfig.h: Don't protect config.h against multiple
22892 inclusion.
22893 Don't define PARAMS.
22894 * src/system.h: Define PARAMS.
22895 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22896 purpose of config.h. system.h must not try to fix wrong
22897 definitions in config.h.
22898
22899 2000-09-20 Akim Demaille <akim@epita.fr>
22900
22901 * src/derives.h: New file.
22902 * src/main.c, src/derives.h: Use it.
22903 Formatting changes.
22904 * src/Makefile.am (noinst_HEADERS): Adjust.
22905
22906 2000-09-20 Akim Demaille <akim@epita.fr>
22907
22908 * tests/atgeneral.m4: Update from Autoconf.
22909 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22910 (AT_CHECK_CALC): New macros.
22911 Use these macros to test bison with options `', `--raw',
22912 `--debug', `--yacc', `--yacc --debug'.
22913
22914 2000-09-19 Akim Demaille <akim@epita.fr>
22915
22916 * src/output.c: Formatting changes.
22917 * src/machine.h: Remove, leaving its contents in...
22918 * src/system.h: here.
22919 Include stdio.h.
22920 Adjust all dependencies on stdio.h and machine.h.
22921 * src/getargs.h: New file.
22922 Let all `extern' declarations about getargs.c be replaced with
22923 inclusion of `getargs.h'.
22924 * src/Makefile.am (noinst_HEADERS): Adjust.
22925
22926 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22927 scope.
22928 (yyerror): Returns void, not int.
22929 * doc/bison.texinfo: Formatting changes.
22930
22931 2000-09-19 Akim Demaille <akim@epita.fr>
22932
22933 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22934 portable.
22935
22936 2000-09-18 Akim Demaille <akim@epita.fr>
22937
22938 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22939 * src/Makefile.am (INCLUDES): Don't.
22940 Be ready to fetch headers in lib/.
22941
22942 2000-09-18 Akim Demaille <akim@epita.fr>
22943
22944 * doc/bison.texinfo: Update the copyright.
22945 ANSIfy and GNUify the examples.
22946 Remove the old menu.
22947
22948 2000-09-18 Akim Demaille <akim@epita.fr>
22949
22950 First set of tests: use the `calc' example from the documentation.
22951
22952 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22953 is defined only when YYDEBUG is.
22954 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22955 * src/files.c (tryopen, tryclose): Formatting changes.
22956 Move to the top and be static.
22957 * src/reader.c (read_signed_integer): Likewise.
22958 * tests/calc.m4: New file.
22959 * Makefile.am, suite.m4: Adjust.
22960 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22961
22962 2000-09-18 Akim Demaille <akim@epita.fr>
22963
22964 Add support for an Autotest test suite for Bison.
22965
22966 * m4/m4.m4, m4/atconfig.m4: New files.
22967 * m4/Makefile.am (EXTRA_DIST): Adjust.
22968 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22969 files.
22970 * src/getargs.c: Display a more standard --version message.
22971 * src/reader.c (reader): Formatting changes.
22972 No longer depend upon VERSION_STRING.
22973 * configure.in: No longer use `dnl'.
22974 Set up the test suite and the new directory `tests/.
22975 (VERSION_STRING): Remove.
22976
22977 2000-04-14 Akim Demaille <akim@epita.fr>
22978
22979 * src/reader.c (copy_comment2): New function, same as former
22980 `copy_comment', but outputs into two FILE *.
22981 (copy_comment): Use it.
22982 (parse_union_decl): Use it.
22983 (get_type, parse_start_decl): Use the same `invalid' message.
22984 (parse_start_decl, parse_union_decl): Use the same `multiple'
22985 message.
22986 (parse_union_decl, copy_guard, copy_action): Use the same
22987 `unmatched' message.
22988 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22989
22990 2000-03-31 Akim Demaille <akim@epita.fr>
22991
22992 * src/files.c (tryopen, tryclose): Move to the top.
22993 Be static.
22994
22995 2000-03-31 Akim Demaille <akim@epita.fr>
22996
22997 * src/main.c (main): Don't call `done', exit does it.
22998
22999 2000-03-31 Akim Demaille <akim@epita.fr>
23000
23001 * allocate.c: s/return (foo)/return foo/.
23002 * lalr.c: Likewise.
23003 * LR0.c: Likewise.
23004 * output.c: Likewise.
23005 * reader.c: Likewise.
23006 * symtab.c: Likewise.
23007 * vmsgetargs.c: Likewise.
23008
23009 2000-03-31 Akim Demaille <akim@epita.fr>
23010
23011 Clean up the error reporting functions.
23012
23013 * src/report.c: New file.
23014 * src/report.h: Likewise.
23015 * src/Makefile.am: Adjust.
23016 * m4/error.m4: New file.
23017 * m4/Makefile.am: Adjust.
23018 * configure.in (jm_PREREQ_ERROR): Call it.
23019 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23020 Remove.
23021 (fatal, fatals): Remove. All callers use complain.c::fatal.
23022 (warn, warni, warns, warnss, warnss): Remove. All callers use
23023 complain.c::complain.
23024 (toomany): Remove, use fatal instead.
23025 * src/files.c (done): No argument, use complain_message_count.
23026 * src/main.c (main): Register `done' to `atexit'.
23027
23028 * src/getargs.c (usage): More `fputs', less `fprintf'.
23029
23030 2000-03-28 Akim Demaille <akim@epita.fr>
23031
23032 * lib/: New directory.
23033 * Makefile.am (SUBDIRS): Adjust.
23034 * configure.in: Adjust.
23035 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23036 useless.
23037 * src/alloca.c: Moved to lib/.
23038 * src/getopt.c: Likewise.
23039 * src/getopt1.c: Likewise.
23040 * src/getopt.h: Likewise.
23041 * src/ansi2knr.c: Likewise.
23042 * src/ansi2knr.1: Likewise.
23043 * src/Makefile.am: Adjust.
23044 * lib/Makefile.am: New file.
23045
23046 2000-03-28 Akim Demaille <akim@epita.fr>
23047
23048 * src/getargs.c (usage): Refresh the help message.
23049
23050 2000-03-17 Akim Demaille <akim@epita.fr>
23051
23052 * src/getopt1.c: Updated from textutils 2.0e
23053 * src/getopt.c: Likewise.
23054 * src/getopt.h: Likewise.
23055
23056 2000-03-17 Akim Demaille <akim@epita.fr>
23057
23058 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23059 the file name, not the whole `#line LINE FILE'.
23060
23061 2000-03-17 Akim Demaille <akim@epita.fr>
23062
23063 On syntax errors, report the token on which we choked.
23064
23065 * src/bison.s1 (yyparse): In the label yyerrlab, when
23066 YYERROR_VERBOSE, add yychar in msg.
23067
23068 2000-03-17 Akim Demaille <akim@epita.fr>
23069
23070 * src/reader.c (copy_at): New function.
23071 (copy_guard): Use it.
23072 (copy_action): Use it.
23073
23074 2000-03-17 Akim Demaille <akim@epita.fr>
23075
23076 Be kind to translators, save some useless translations.
23077
23078 * src/main.c (banner): New function.
23079 (fatal_banner): Use it.
23080 (warn_banner): Use it.
23081
23082 2000-03-17 Akim Demaille <akim@epita.fr>
23083
23084 * src/reader.c (copy_definition): Use copy_string and
23085 copy_comment. Removed now unused `match', `ended',
23086 `cplus_comment'.
23087 (copy_comment, copy_string): Moved, to be visible from
23088 copy_definition.
23089
23090 2000-03-17 Akim Demaille <akim@epita.fr>
23091
23092 * src/reader.c (copy_string): Declare `static inline'. No
23093 problems with inline, since it is checked by configure.
23094 (copy_comment): Likewise.
23095
23096 2000-03-17 Akim Demaille <akim@epita.fr>
23097
23098 * src/reader.c (packsymbols): Formatting changes.
23099
23100 2000-03-17 Akim Demaille <akim@epita.fr>
23101
23102 * src/reader.c (copy_comment): New function, factored out from:
23103 (copy_action): Use it. Removed now unused `match', `ended',
23104 `cplus_comment'.
23105 (copy_guard): Likewise.
23106
23107 2000-03-17 Akim Demaille <akim@epita.fr>
23108
23109 * src/reader.c (copy_string): New function, factored out from:
23110 (copy_action): Use it.
23111 (copy_guard): Likewise.
23112
23113 2000-03-17 Akim Demaille <akim@epita.fr>
23114
23115 Change the handling of @s so that they behave exactly like $s.
23116 There is now a pseudo variable @$ (readble and writable), location
23117 of the lhs of the rule (by default ranging from the location of
23118 the first symbol of the rhs, to the location of the last symbol,
23119 or, if the rhs is empty, YYLLOC).
23120
23121 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23122 yyval.
23123 (yyparse): When providing a default semantic action, provide a
23124 default location action.
23125 (after the $): No longer change `*YYLSP', just stack YYLOC the
23126 same way you stack YYVAL.
23127 * src/reader.c (read_declarations): Use warns.
23128 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23129 (copy_action, case '@'): Likewise.
23130 Use a standard error message, to save useless work from
23131 translators.
23132
23133 2000-03-17 Akim Demaille <akim@epita.fr>
23134
23135 * src/bison.s1: Formatting and cosmetics changes.
23136 * src/reader.c: Likewise.
23137 Update the Copyright notice.
23138
23139 2000-03-17 Akim Demaille <akim@epita.fr>
23140
23141 * src/bison.s1 (#line): All set to `#line' only, since the
23142 Makefile now handles them.
23143
23144 2000-03-16 Akim Demaille <akim@epita.fr>
23145
23146 * src/output.c (output_rule_data): Output the documentation of
23147 some of the tables.
23148 (Copyright notice): Update.
23149 Formatting changes.
23150
23151 2000-03-16 Akim Demaille <akim@epita.fr>
23152
23153 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23154 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23155 One `#if YYDEBUG' remains, since it uses variables which are
23156 defined only if `YYDEBUG != 0'.
23157
23158 2000-03-16 Akim Demaille <akim@epita.fr>
23159
23160 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23161 and related variables so that the similarities are highlighted.
23162
23163 2000-03-16 Akim Demaille <akim@epita.fr>
23164
23165 * src/bison.s1: Properly indent CPP directives.
23166
23167 2000-03-16 Akim Demaille <akim@epita.fr>
23168
23169 * src/bison.s1: Properly indent the `alloca' CPP section.
23170
23171 2000-03-16 Akim Demaille <akim@epita.fr>
23172
23173 Do not hard code values of directories in `configure.in'.
23174 Update the `configure' tool chain.
23175
23176 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23177 src/makefile.am.
23178 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23179 (AC_OUTPUT): Add m4/Makefile.
23180 Bump to bison 1.28a, 1.29 has never been released.
23181 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23182 handled via src/Makefile.am.
23183 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23184 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23185 autoheader.
23186 * Makefile.am (SUBDIRS): Add m4.
23187 (ACLOCAL_AM_FLAGS): New variable.
23188 (AUTOMAKE_OPTIONS): Add check-news.
23189 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23190 the proper line number and file name.
23191 (DEFS): Propagate the location of bison library files and of the
23192 locale files.
23193 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23194 builddir.
23195 * acinclude.m4: Remove, replaced by the directory m4.
23196 * m4/Makefile.am (EXTRA_DIST): New variable.
23197 * m4/gettext.m4: New file, from the fileutils.
23198 * m4/lcmessage.m4: Likewise
23199 * m4/progtest.m4: Likewise.
23200 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23201
23202 2000-03-10 Akim Demaille <akim@epita.fr>
23203
23204 * src/closure.c:
23205 Formatting changes of various comments.
23206 Respect the GNU coding standards at various places.
23207 Don't use `_()' when no translation is needed.
23208
23209 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23210
23211 * src/files.c:
23212 OS/2 honors TMPDIR environment variable.
23213
23214 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23215
23216 * doc/bison.texinfo: Tweaked spelling and grammar.
23217 Updated ISBN.
23218 Removed reference to price of printed copy.
23219 Mention BISON_SIMPLE and BISON_HAIRY.
23220
23221 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23222
23223 * configure.in, NEWS:
23224 Bison 1.29 released.
23225
23226 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23227
23228 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23229 Added reference card.
23230
23231 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23232
23233 * po/ru.po: Added Russian translation.
23234
23235 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23236
23237 * configure.in: Added Russian translation.
23238
23239 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23240
23241 * configure.in, NEWS, README:
23242 Released version 1.28.
23243
23244 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23245
23246 * src/system.h:
23247 Squashed redefinition warning on some systems.
23248
23249 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23250 Have configure build version string instead of relying on ANSI string
23251 concatentation.
23252
23253 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23254
23255 * po/POTFILES.in: Got rid of version.c.
23256
23257 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23258
23259 * acconfig.h, configure.in:
23260 Have configure build version string instead of relying on ANSI string
23261 concatentation.
23262
23263 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23264
23265 * doc/bison.1:
23266 Dropped mention of `+' for long-named options.
23267
23268 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23269
23270 * src/files.c: Added <unistd.h> for unlink().
23271
23272 * src/Makefile.am, src/system.h:
23273 I18n fixes.
23274
23275 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23276
23277 * README: Added a FAQ list.
23278
23279 * configure.in, acconfig.h:
23280 I18n fixes.
23281
23282 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23283
23284 * doc/FAQ, doc/Makefile.am:
23285 Added a FAQ list.
23286
23287 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23288
23289 * src/alloc.h, src/symtab.h, src/version.c:
23290 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23291
23292 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23293
23294 * src/.cvsignore, src/Makefile.am:
23295 Reorganized: sources in `src', documentation in `doc'.
23296
23297 * src/lex.c (literalchar):
23298 fixed the code for escaping double quotes (thanks
23299 Jonathan Czisny.)
23300
23301 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23302
23303 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23304 Adjusted paths to reflect directory reorganization.
23305
23306 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23307
23308 * doc/.cvsignore, doc/Makefile.am:
23309 Reorganized: sources in `src', documentation in `doc'.
23310
23311 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23312
23313 * configure.in:
23314 Updated AC_INIT file to reflect directory reorganization.
23315
23316 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23317 Reorganized: sources in `src', documentation in `doc'.
23318
23319 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23320
23321 * src/allocate.c:
23322 Don't declare calloc() and realloc() if not necessary.
23323
23324 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23325
23326 * configure.in, acconfig.h, acinclude.m4:
23327 Don't declare calloc() and realloc() if not necessary.
23328
23329 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23330
23331 * po/.cvsignore: Added i18n support.
23332
23333 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23334
23335 * acconfig.h, configure.in, Makefile.am:
23336 Added i18n support.
23337
23338 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23339
23340 * src/bison.s1: Fixed #line numbers.
23341
23342 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23343
23344 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23345 Added PO files from Translation Project.
23346
23347 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23348
23349 * Makefile.am:
23350 Added support for non-ANSI compilers (ansi2knr).
23351
23352 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23353
23354 * configure.in: Bumped version number to 1.27.
23355
23356 * Makefile.am:
23357 Added `bison.simple' to list of files removed by `make distclean'.
23358
23359 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23360
23361 * src/files.c, src/files.h:
23362 Defined locations of parser files in config.h instead of Makefile.
23363
23364 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23365
23366 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23367 Defined locations of parser files in config.h instead of Makefile.
23368
23369 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23370
23371 * Makefile.am:
23372 Removed inappropriate use of $< macro.
23373
23374 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23375
23376 * po/Makefile.in.in, po/POTFILES.in:
23377 Add `po' directory skeleton.
23378
23379 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23380
23381 * README: Document help-bison list.
23382
23383 * configure.in: Add check for mkstemp().
23384
23385 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23386
23387 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23388 Hush a few compiler warnings.
23389
23390 * src/files.c:
23391 Add tryclose(), which verifies that fclose was successful.
23392 Hush a couple of compiler warnings.
23393
23394 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23395
23396 * Makefile.am, OChangeLog:
23397 ChangeLog is now automatically generated. Include the old version as
23398 OChangeLog.
23399
23400 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23401
23402 * 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:
23403 Update FSF address.
23404
23405 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23406
23407 * doc/bison.texinfo: Fix formatting glitch.
23408
23409 * doc/bison.texinfo: Update FSF address.
23410
23411 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23412
23413 * acconfig.h: Update FSF address.
23414
23415 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23416
23417 * src/system.h:
23418 Don't define PACKAGE here, since config.h defines it.
23419
23420 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23421
23422 * src/reader.c: Update copyright date.
23423
23424 * src/main.c:
23425 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23426 favor of output directly to stderr (avoids buffer overruns).
23427
23428 * src/reader.c: Some checks for premature EOF.
23429
23430 * 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:
23431 Use prototypes if the compiler understands them.
23432
23433 * src/files.c: Honor TMPDIR on Unix hosts.
23434 Use prototypes if the compiler understands them.
23435
23436 * src/reader.c:
23437 Fix a couple of buffer overrun bugs.
23438 Use prototypes if the compiler understands them.
23439
23440 * src/system.h: Include unistd.h and ctype.h.
23441 Use #ifdef instead of #if for NLS symbols.
23442
23443 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23444
23445 * doc/bison.texinfo:
23446 Delete comment "consider using @set for edition number, etc..." since
23447 we now are doing so.
23448
23449 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23450
23451 * configure.in:
23452 Use prototypes if the compiler understands them.
23453
23454 * NEWS: Document 1.26 highlights.
23455
23456 * Makefile.am: Require Automake 1.3 or later.
23457
23458 * acconfig.h:
23459 Use prototypes if the compiler understands them.
23460
23461 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23462
23463 * src/version.c:
23464 Use VERSION symbol from automake for version number.
23465
23466 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23467
23468 * acconfig.h, configure.in, version.cin:
23469 Use VERSION symbol from automake for version number.
23470
23471 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23472
23473 * Makefile.am:
23474 Distribute original version of simple parser (bison.s1), not built
23475 version (bison.simple).
23476
23477 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23478
23479 * doc/bison.texinfo: Add info dir entry.
23480
23481 * doc/bison.texinfo:
23482 Let automake put version number into documentation.
23483
23484 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23485
23486 * src/bison.cld, src/build.com, src/vmshlp.mar:
23487 Add non-RCS files from /gd/gnu/bison.
23488
23489 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23490
23491 * doc/bison.1:
23492 Document the BISON_HAIRY and BISON_SIMPLE variables.
23493
23494 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23495
23496 * src/version.c: Build version.c automatically.
23497
23498 * src/reader.c:
23499 Fix token numbering (used to start at 258, not 257).
23500
23501 * src/system.h: Include config.h.
23502
23503 * src/getargs.c: Update bug report address.
23504
23505 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23506 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23507
23508 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23509
23510 * Makefile.am:
23511 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23512
23513 * configure.in, version.cin:
23514 Build version.c automatically.
23515
23516 * AUTHORS: Add AUTHORS file.
23517
23518 * README: Update bug report address.
23519
23520 * bison.simple:
23521 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23522
23523 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23524 Add automake stuff.
23525
23526 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23527
23528 * doc/bison.texinfo: Clean up some formatting.
23529
23530 1998-05-05 Richard Stallman <rms@gnu.org>
23531
23532 * doc/bison.texinfo:
23533 Explain better why to make a pure parser.
23534
23535 1998-01-05 Richard Stallman <rms@gnu.org>
23536
23537 * src/files.c (openfiles):
23538 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23539 find a temporary directory, if possible. Do not unlink files while
23540 they are open.
23541
23542 1997-08-25 Richard Stallman <rms@gnu.org>
23543
23544 * src/reader.c (stack_offset;):
23545 Change some warni to warns.
23546
23547 * src/lex.c (literalchar): Use warns, not warni.
23548
23549 1997-06-28 Richard Stallman <rms@gnu.org>
23550
23551 * src/bison.s1: Add a Bison version comment.
23552
23553 * src/main.c (fatal, warn, berror):
23554 Use program_name.
23555
23556 1997-06-28 Richard Stallman <rms@gnu.org>
23557
23558 * Makefile.in (bison_version): New variable.
23559 (dist): Use that variable.
23560 (bison.s1): Substitute the Bison version into bison.simple.
23561
23562 * bison.simple: Add a Bison version comment.
23563
23564 1997-06-18 Richard Stallman <rms@gnu.org>
23565
23566 * src/main.c (fatal, warn, berror):
23567 Make error messages standard.
23568 (toomany): Improve error message text.
23569
23570 * 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:
23571 new.h renamed to alloc.h.
23572
23573 1997-06-18 Richard Stallman <rms@gnu.org>
23574
23575 * Makefile.in: new.h renamed to alloc.h.
23576
23577 1997-05-24 Richard Stallman <rms@gnu.org>
23578
23579 * src/lex.c (literalchar):
23580 Fix the code for escaping \, " and '.
23581
23582 (lex): Avoid trouble when there are many chars
23583 to discard in a char literal with just several chars in it.
23584
23585 1997-05-17 Richard Stallman <rms@gnu.org>
23586
23587 * src/bison.s1:
23588 Use malloc, if using alloca is troublesome.
23589 (YYSTACK_USE_ALLOCA): New flag macro.
23590 Define it for some systems and compilers.
23591 (YYSTACK_ALLOC): New macro.
23592 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23593 If it was malloc'd, free it.
23594
23595 1997-05-17 Richard Stallman <rms@gnu.org>
23596
23597 * bison.simple:
23598 Use malloc, if using alloca is troublesome.
23599 (YYSTACK_USE_ALLOCA): New flag macro.
23600 Define it for some systems and compilers.
23601 (YYSTACK_ALLOC): New macro.
23602 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23603 If it was malloc'd, free it.
23604
23605 1997-04-23 Richard Stallman <rms@gnu.org>
23606
23607 * src/bison.s1:
23608 (alloca) [__hpux]: Always define as __builtin_alloca.
23609
23610 1997-04-23 Richard Stallman <rms@gnu.org>
23611
23612 * bison.simple:
23613 (alloca) [__hpux]: Always define as __builtin_alloca.
23614
23615 1997-04-22 Richard Stallman <rms@gnu.org>
23616
23617 * src/bison.s1:
23618 [__hpux]: Include alloca.h (right for HPUX 10)
23619 instead of declaring alloca (right for HPUX 9).
23620
23621 * src/bison.s1 (__yy_memcpy):
23622 Declare arg `count' as unsigned int.
23623 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23624
23625 1997-04-22 Richard Stallman <rms@gnu.org>
23626
23627 * bison.simple:
23628 [__hpux]: Include alloca.h (right for HPUX 10)
23629 instead of declaring alloca (right for HPUX 9).
23630
23631 * bison.simple (__yy_memcpy):
23632 Declare arg `count' as unsigned int.
23633 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23634
23635 1997-01-03 Richard Stallman <rms@gnu.org>
23636
23637 * src/allocate.c: [__STDC__ or _MSC_VER]:
23638 Declare calloc and realloc to return void *.
23639
23640 1997-01-02 Richard Stallman <rms@gnu.org>
23641
23642 * src/system.h:
23643 [_MSC_VER]: Include stdlib.h and process.h.
23644 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23645
23646 * src/main.c (main): Return FAILURE as a value.
23647 (printable_version): Declare arg as int, not char.
23648
23649 1997-01-02 Richard Stallman <rms@gnu.org>
23650
23651 * Makefile.in (dist):
23652 Explicitly check for symlinks, and copy them.
23653
23654 1996-12-19 Richard Stallman <rms@gnu.org>
23655
23656 * src/files.c:
23657 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23658
23659 1996-12-18 Paul Eggert <eggert@gnu.org>
23660
23661 * src/bison.s1 (yyparse):
23662 If __GNUC__ and YYPARSE_PARAM are both defined,
23663 declare yyparse to have a void * argument.
23664
23665 1996-12-18 Paul Eggert <eggert@gnu.org>
23666
23667 * bison.simple (yyparse):
23668 If __GNUC__ and YYPARSE_PARAM are both defined,
23669 declare yyparse to have a void * argument.
23670
23671 1996-12-17 Richard Stallman <rms@gnu.org>
23672
23673 * src/reduce.c (nbits): Add some casts.
23674
23675 1996-08-12 Richard Stallman <rms@gnu.org>
23676
23677 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23678
23679 1996-08-12 Richard Stallman <rms@gnu.org>
23680
23681 * bison.simple: Test _MSDOS as well as _MSDOS_.
23682
23683 1996-07-31 Richard Stallman <rms@gnu.org>
23684
23685 * src/bison.s1:
23686 [__sun && __i386]: Include alloca.h.
23687
23688 1996-07-31 Richard Stallman <rms@gnu.org>
23689
23690 * bison.simple:
23691 [__sun && __i386]: Include alloca.h.
23692
23693 1996-07-30 Richard Stallman <rms@gnu.org>
23694
23695 * src/bison.s1: Comment change.
23696
23697 * src/bison.s1: Test _MSDOS_, not MSDOS.
23698
23699 1996-07-30 Richard Stallman <rms@gnu.org>
23700
23701 * bison.simple: Comment change.
23702
23703 * bison.simple: Test _MSDOS_, not MSDOS.
23704
23705 1996-06-01 Richard Stallman <rms@gnu.org>
23706
23707 * 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:
23708 Insert `_' macro around many string constants.
23709
23710 * src/main.c:
23711 Insert `_' macro around many string constants.
23712
23713 (main): Call setlocale, bindtextdomain and textdomain.
23714
23715 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23716 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23717 [ENABLE_NLS]: Include libintl.h.
23718 [ENABLE_NLS] (gettext): Define.
23719 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23720 (N_, PACKAGE, LOCALEDIR): New macros.
23721
23722 1996-06-01 Richard Stallman <rms@gnu.org>
23723
23724 * POTFILES.in: New file.
23725
23726 * Makefile.in (allocate.o):
23727 Define target explicitly.
23728
23729 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23730 (LDFLAGS): Set to @LDFLAGS@.
23731 (configure): Run autoconf only if preceding `cd' succeeds.
23732 (bison.s1): Redirect output to temporary file then move the
23733 temporary to the target, rather than redirecting directly to bison.s1.
23734 (clean): Remove config.status and config.log.
23735 (distclean): Don't remove config.status here.
23736
23737 1996-05-12 Richard Stallman <rms@gnu.org>
23738
23739 * src/bison.s1:
23740 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23741
23742 1996-05-12 Richard Stallman <rms@gnu.org>
23743
23744 * bison.simple:
23745 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23746
23747 1996-05-11 Richard Stallman <rms@gnu.org>
23748
23749 * src/bison.s1 (__yy_memcpy):
23750 Really reorder the args, as was supposedly done on Feb 14 1995.
23751 (yyparse): Calls changed accordingly.
23752
23753 1996-05-11 Richard Stallman <rms@gnu.org>
23754
23755 * Makefile.in (dist): Don't use $(srcdir).
23756
23757 * bison.simple (__yy_memcpy):
23758 Really reorder the args, as was supposedly done on Feb 14 1995.
23759 (yyparse): Calls changed accordingly.
23760
23761 1996-01-27 Richard Stallman <rms@gnu.org>
23762
23763 * src/output.c (output_rule_data):
23764 Test YYERROR_VERBOSE in the conditional
23765 around the definition of ttyname.
23766
23767 1995-12-29 Richard Stallman <rms@gnu.org>
23768
23769 * src/bison.s1:
23770 Fix line numbers in #line commands.
23771
23772 1995-12-29 Richard Stallman <rms@gnu.org>
23773
23774 * bison.simple:
23775 Fix line numbers in #line commands.
23776
23777 1995-12-27 Richard Stallman <rms@gnu.org>
23778
23779 * src/bison.s1 (YYPARSE_PARAM_DECL):
23780 In C++, make it always null.
23781 (YYPARSE_PARAM_ARG): New macro.
23782 (yyparse): Use YYPARSE_PARAM_ARG.
23783
23784 1995-12-27 Richard Stallman <rms@gnu.org>
23785
23786 * bison.simple (YYPARSE_PARAM_DECL):
23787 In C++, make it always null.
23788 (YYPARSE_PARAM_ARG): New macro.
23789 (yyparse): Use YYPARSE_PARAM_ARG.
23790
23791 1995-11-29 Richard Stallman <rms@gnu.org>
23792
23793 * doc/bison.texinfo:
23794 Describe literal string tokens, %raw, %no_lines, %token_table.
23795
23796 1995-11-29 Daniel Hagerty <hag@gnu.org>
23797
23798 * doc/bison.texinfo: Fixed update date
23799
23800 1995-10-16 Richard Stallman <rms@gnu.org>
23801
23802 * src/version.c: Version 1.25.
23803
23804 1995-10-16 Richard Stallman <rms@gnu.org>
23805
23806 * NEWS: *** empty log message ***
23807
23808 1995-10-16 Richard Stallman <rms@gnu.org>
23809
23810 * doc/bison.1, doc/bison.rnh:
23811 Add new options.
23812
23813 1995-10-15 Richard Stallman <rms@gnu.org>
23814
23815 * src/vmsgetargs.c, src/getargs.c:
23816 Added -n, -k, and -raw switches.
23817 (noparserflag, toknumflag, rawtoknumflag): New variables.
23818
23819 * src/symtab.h (SALIAS):
23820 New #define for adding aliases to %token.
23821 (struct bucket): Added `alias' field.
23822
23823 * src/reduce.c (reduce_grammar):
23824 Revise error message.
23825 (print_notices): Remove final `.' from error message.
23826
23827 * src/reader.c (reader_output_yylsp):
23828 New function.
23829 (readgram): Use `#if 0' around code that accepted %command
23830 inside grammar rules: The documentation doesn't allow it,
23831 and it will fail since the %command processors scan for the next %.
23832 (parse_token_decl): Extended the %token
23833 declaration to allow a multi-character symbol as an alias.
23834 (parse_thong_decl): New function.
23835 (read_declarations): Added %thong declarations.
23836 (read_declarations): Handle NOOP to deal with allowing
23837 % declarations as another means to specify the flags.
23838 (readgram): Allow %prec prior to semantics embedded in a rule.
23839 (skip_to_char, read_declarations, copy_definition)
23840 (parse_token_decl, parse_start_decl, parse_type_decl)
23841 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23842 (get_type_name, copy_guard, copy_action, readgram)
23843 (get_type, packsymbols): Revised most error messages.
23844 Changed `fatal' to `warnxxx' to avoid aborting for error.
23845 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23846 (read_declarations): Improve the error message for
23847 an invalid character. Do not abort.
23848 (read_declarations, copy_guard, copy_action): Use
23849 printable_version to avoid unprintable characters in printed output.
23850 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23851 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23852 Allow the type of a non-terminal can be given
23853 more than once, as long as all specifications give the same type.
23854
23855 * src/output.c:
23856 (output_headers, output_trailers, output, output_gram)
23857 (output_rule_data): Implement noparserflag variable.
23858 Implement toknumflag variable.
23859 (output): Call reader_output_yylsp to output LTYPESTR.
23860
23861 * src/main.c (main):
23862 If reader sees an error, don't process the grammar.
23863 (fatals): Updated to not use VARARGS1.
23864 (printable_version, int_to_string, warn, warni, warns, warnss)
23865 (warnsss): New error reporting functions. Avoid abort for error.
23866
23867 * src/lex.h:
23868 Added THONG and NOOP for alias processing.
23869 Added SETOPT for the new code that allows setting options with %flags.
23870
23871 * src/lex.c:
23872 Include getopt.h. Add some extern decls.
23873 (safegetc): New function to deal with EOF gracefully.
23874 (literalchar); new function to deal with reading \ escapes.
23875 (lex): Use literalchar.
23876 (lex): Implemented "..." tokens.
23877 (literalchar, lex, parse_percent_token): Made tokenbuffer
23878 always contain the token. This includes growing the token
23879 buffer while reading an integer.
23880 (parse_percent_token): Replaced if-else statement with percent_table.
23881 (parse_percent_token): Added % declarations as another
23882 way to specify the flags -n, -l, and -r. Also added hooks for
23883 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23884 major changes to files.c.
23885 (lex) Retain in the incoming stream a character following
23886 an incorrect '/'.
23887 (skip_white_space, lex): Revised most error messages
23888 and changed fatal to warn to avoid aborting.
23889 (percent_table): Added %thong declarations.
23890
23891 * src/gram.h: Comment changes.
23892
23893 * src/files.c (openfiles, open_extra_files, done):
23894 Add faction flag
23895 and actfile file. Handle noparserflag. Both for -n switch.
23896
23897 * src/conflicts.c (resolve_sr_conflict):
23898 Remove use of alloca.
23899
23900 1995-06-01 Jim Meyering <meyering@gnu.org>
23901
23902 * doc/bison.texinfo: *** empty log message ***
23903
23904 1995-05-06 Richard Stallman <rms@gnu.org>
23905
23906 * src/bison.s1: Comment change.
23907
23908 1995-05-06 Richard Stallman <rms@gnu.org>
23909
23910 * bison.simple: Comment change.
23911
23912 1995-05-03 Richard Stallman <rms@gnu.org>
23913
23914 * src/version.c: Version now 1.24.
23915
23916 * src/bison.s1: Change distribution terms.
23917
23918 * src/version.c: Version now 1.23.
23919
23920 1995-05-03 Richard Stallman <rms@gnu.org>
23921
23922 * doc/bison.texinfo:
23923 Rewrite "Conditions for Using Bison".
23924 Update version to 1.24.
23925
23926 1995-05-03 Richard Stallman <rms@gnu.org>
23927
23928 * bison.simple: Change distribution terms.
23929
23930 1995-02-23 Richard Stallman <rms@gnu.org>
23931
23932 * src/files.c: Test __VMS_POSIX as well as VMS.
23933
23934 1995-02-14 Jim Meyering <meyering@gnu.org>
23935
23936 * src/bison.s1 (__yy_memcpy):
23937 Renamed from __yy_bcopy to avoid
23938 confusion. Reverse FROM and TO arguments to be consistent with
23939 those of memcpy.
23940
23941 1995-02-14 Jim Meyering <meyering@gnu.org>
23942
23943 * bison.simple (__yy_memcpy):
23944 Renamed from __yy_bcopy to avoid
23945 confusion. Reverse FROM and TO arguments to be consistent with
23946 those of memcpy.
23947
23948 1994-11-10 David J. MacKenzie <djm@gnu.org>
23949
23950 * NEWS: reformat
23951
23952 * NEWS: New file.
23953
23954 * Makefile.in (DISTFILES): Include NEWS.
23955
23956 * Makefile.in (DISTFILES):
23957 Include install-sh, not install.sh.
23958
23959 * configure.in: Update to Autoconf v2 macro names.
23960
23961 1994-10-05 David J. MacKenzie <djm@gnu.org>
23962
23963 * Makefile.in: fix typo
23964
23965 * Makefile.in (prefix, exec_prefix):
23966 Let configure set them.
23967
23968 1994-09-28 David J. MacKenzie <djm@gnu.org>
23969
23970 * Makefile.in: Set datadir to $(prefix)/share.
23971
23972 1994-09-15 Richard Stallman <rms@gnu.org>
23973
23974 * src/bison.s1:
23975 Update copyright notice and GPL version.
23976
23977 1994-09-15 Richard Stallman <rms@gnu.org>
23978
23979 * bison.simple:
23980 Update copyright notice and GPL version.
23981
23982 1994-07-12 Richard Stallman <rms@gnu.org>
23983
23984 * src/reduce.c, src/reader.c:
23985 entered into RCS
23986
23987 1994-05-05 David J. MacKenzie <djm@gnu.org>
23988
23989 * Makefile.in: entered into RCS
23990
23991 1994-03-26 Richard Stallman <rms@gnu.org>
23992
23993 * src/bison.s1: entered into RCS
23994
23995 1994-03-26 Richard Stallman <rms@gnu.org>
23996
23997 * bison.simple: entered into RCS
23998
23999 1994-03-25 Richard Stallman <rms@gnu.org>
24000
24001 * src/main.c: entered into RCS
24002
24003 1994-03-24 Richard Stallman <rms@gnu.org>
24004
24005 * src/conflicts.c: entered into RCS
24006
24007 1994-01-02 Richard Stallman <rms@gnu.org>
24008
24009 * Makefile.in: *** empty log message ***
24010
24011 1993-11-21 Richard Stallman <rms@gnu.org>
24012
24013 * src/bison.s1: *** empty log message ***
24014
24015 1993-11-21 Richard Stallman <rms@gnu.org>
24016
24017 * doc/bison.texinfo: entered into RCS
24018
24019 * doc/bison.texinfo: *** empty log message ***
24020
24021 1993-11-21 Richard Stallman <rms@gnu.org>
24022
24023 * bison.simple: *** empty log message ***
24024
24025 1993-10-25 David J. MacKenzie <djm@gnu.org>
24026
24027 * doc/bison.texinfo: *** empty log message ***
24028
24029 1993-10-19 Richard Stallman <rms@gnu.org>
24030
24031 * src/bison.s1: *** empty log message ***
24032
24033 1993-10-19 Richard Stallman <rms@gnu.org>
24034
24035 * bison.simple: *** empty log message ***
24036
24037 1993-10-14 Richard Stallman <rms@gnu.org>
24038
24039 * src/bison.s1: *** empty log message ***
24040
24041 1993-10-14 Richard Stallman <rms@gnu.org>
24042
24043 * bison.simple: *** empty log message ***
24044
24045 1993-09-14 David J. MacKenzie <djm@gnu.org>
24046
24047 * doc/bison.texinfo: *** empty log message ***
24048
24049 1993-09-13 Noah Friedman <friedman@gnu.org>
24050
24051 * Makefile.in: *** empty log message ***
24052
24053 1993-09-10 Richard Stallman <rms@gnu.org>
24054
24055 * src/conflicts.c: *** empty log message ***
24056
24057 * src/system.h: entered into RCS
24058
24059 1993-09-10 Richard Stallman <rms@gnu.org>
24060
24061 * doc/bison.1: entered into RCS
24062
24063 1993-09-06 Noah Friedman <friedman@gnu.org>
24064
24065 * src/version.c: entered into RCS
24066
24067 1993-09-06 Noah Friedman <friedman@gnu.org>
24068
24069 * Makefile.in: *** empty log message ***
24070
24071 1993-07-30 David J. MacKenzie <djm@gnu.org>
24072
24073 * Makefile.in: *** empty log message ***
24074
24075 1993-07-24 Richard Stallman <rms@gnu.org>
24076
24077 * src/bison.s1: *** empty log message ***
24078
24079 1993-07-24 Richard Stallman <rms@gnu.org>
24080
24081 * bison.simple: *** empty log message ***
24082
24083 1993-07-08 David J. MacKenzie <djm@gnu.org>
24084
24085 * Makefile.in: *** empty log message ***
24086
24087 1993-07-04 Richard Stallman <rms@gnu.org>
24088
24089 * src/bison.s1: *** empty log message ***
24090
24091 1993-07-04 Richard Stallman <rms@gnu.org>
24092
24093 * bison.simple: *** empty log message ***
24094
24095 1993-06-26 David J. MacKenzie <djm@gnu.org>
24096
24097 * src/getargs.c: entered into RCS
24098
24099 1993-06-26 David J. MacKenzie <djm@gnu.org>
24100
24101 * doc/bison.texinfo: *** empty log message ***
24102
24103 * doc/bison.1: New file.
24104
24105 1993-06-25 Richard Stallman <rms@gnu.org>
24106
24107 * src/getargs.c: New file.
24108
24109 1993-06-16 Richard Stallman <rms@gnu.org>
24110
24111 * src/bison.s1: *** empty log message ***
24112
24113 1993-06-16 Richard Stallman <rms@gnu.org>
24114
24115 * bison.simple: *** empty log message ***
24116
24117 1993-06-03 Richard Stallman <rms@gnu.org>
24118
24119 * src/bison.s1: New file.
24120
24121 1993-06-03 Richard Stallman <rms@gnu.org>
24122
24123 * doc/bison.texinfo: *** empty log message ***
24124
24125 1993-06-03 Richard Stallman <rms@gnu.org>
24126
24127 * bison.simple: New file.
24128
24129 1993-05-19 Richard Stallman <rms@gnu.org>
24130
24131 * doc/bison.texinfo: New file.
24132
24133 1993-05-07 Noah Friedman <friedman@gnu.org>
24134
24135 * Makefile.in: *** empty log message ***
24136
24137 1993-04-28 Noah Friedman <friedman@gnu.org>
24138
24139 * src/reader.c: *** empty log message ***
24140
24141 1993-04-23 Noah Friedman <friedman@gnu.org>
24142
24143 * src/alloc.h: entered into RCS
24144
24145 1993-04-20 David J. MacKenzie <djm@gnu.org>
24146
24147 * src/version.c: *** empty log message ***
24148
24149 * src/files.c, src/allocate.c:
24150 entered into RCS
24151
24152 * src/reader.c: *** empty log message ***
24153
24154 * src/lex.c: entered into RCS
24155
24156 * src/conflicts.c: New file.
24157
24158 * src/symtab.c: entered into RCS
24159
24160 * src/alloc.h: New file.
24161
24162 * src/LR0.c: entered into RCS
24163
24164 1993-04-18 Noah Friedman <friedman@gnu.org>
24165
24166 * src/reader.c: New file.
24167
24168 * src/version.c: *** empty log message ***
24169
24170 1993-04-18 Noah Friedman <friedman@gnu.org>
24171
24172 * Makefile.in: *** empty log message ***
24173
24174 1993-04-17 Noah Friedman <friedman@gnu.org>
24175
24176 * Makefile.in: *** empty log message ***
24177
24178 1993-04-15 Richard Stallman <rms@gnu.org>
24179
24180 * src/main.c, src/files.c:
24181 New file.
24182
24183 1993-04-15 Noah Friedman <friedman@gnu.org>
24184
24185 * configure.in: entered into RCS
24186
24187 * configure.in: *** empty log message ***
24188
24189 * configure.in: New file.
24190
24191 1993-04-14 Richard Stallman <rms@gnu.org>
24192
24193 * Makefile.in: New file.
24194
24195 1993-04-13 Richard Stallman <rms@gnu.org>
24196
24197 * src/version.c: New file.
24198
24199 1993-03-25 Richard Stallman <rms@gnu.org>
24200
24201 * src/output.c: entered into RCS
24202
24203 1992-09-25 Richard Stallman <rms@gnu.org>
24204
24205 * configure.bat: entered into RCS
24206
24207 1992-06-22 Richard Stallman <rms@gnu.org>
24208
24209 * src/vmsgetargs.c: entered into RCS
24210
24211 1992-06-22 Richard Stallman <rms@gnu.org>
24212
24213 * doc/bison.rnh: entered into RCS
24214
24215 1992-04-20 David J. MacKenzie <djm@gnu.org>
24216
24217 * README: entered into RCS
24218
24219 1992-01-22 Richard Stallman <rms@gnu.org>
24220
24221 * src/machine.h: entered into RCS
24222
24223 1991-12-21 Richard Stallman <rms@gnu.org>
24224
24225 * src/lalr.c, src/closure.c:
24226 entered into RCS
24227
24228 1991-12-20 Richard Stallman <rms@gnu.org>
24229
24230 * src/state.h: entered into RCS
24231
24232 1991-12-18 Richard Stallman <rms@gnu.org>
24233
24234 * src/print.c, src/nullable.c, src/derives.c:
24235 entered into RCS
24236
24237 1991-11-03 David J. MacKenzie <djm@gnu.org>
24238
24239 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24240 entered into RCS
24241
24242 1988-09-09 Richard Stallman <rms@gnu.org>
24243
24244 * src/bison.hairy: entered into RCS
24245
24246 1987-12-16 Richard Stallman <rms@gnu.org>
24247
24248 * REFERENCES: entered into RCS
24249
24250
24251 -----
24252
24253 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24254 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24255 2008, 2009 Free Software Foundation, Inc.
24256
24257 Copying and distribution of this file, with or without
24258 modification, are permitted provided the copyright notice and this
24259 notice are preserved.