]> git.saurik.com Git - bison.git/blob - ChangeLog
Make it easier to write deterministic tests.
[bison.git] / ChangeLog
1 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2
3 Make it easier to write deterministic tests.
4 Continues Akim's work from his 2009-06-10 commits.
5 * src/reader.c (check_and_convert_grammar): Don't add any
6 symbols after the first symbols_do invocation.
7 * src/symtab.c (symbols_sorted): New static global.
8 (user_token_number_redeclaration): Update comments.
9 (symbol_from_uniqstr): If a new symbol is being created, assert
10 that symbols_sorted hasn't been allocated yet.
11 (symbols_free): Free symbols_sorted.
12 (symbols_cmp, symbols_cmp_qsort): New functions.
13 (symbols_do): Sort symbol_table into symbols_sorted on first
14 invocation.
15 * tests/input.at (Numbered tokens): Recombine tests now that the
16 output should be deterministic across multiple numbers.
17
18 2009-08-12 Akim Demaille <demaille@gostai.com>
19
20 tests: GCC 4.5 compliance.
21 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
22 messages about #error.
23
24 2009-08-12 Akim Demaille <demaille@gostai.com>
25
26 build: fix the generation of the documentation.
27 Some of our targets use "bison --help", but they can't depend on
28 "bison" itself (to avoid additional requirements on the user), so
29 they used to call "make src/bison" in the commands. Then
30 concurrent builds may fail: one make might be aiming one of its
31 jobs at compiling src/bison, and another job at generating the man
32 page. If the latter is faster than the former, then we have two
33 makes that concurrently try to compile src/bison.
34
35 This might also be a more convincing explanation for the failure
36 described in the patch "build: fix paths".
37
38 * Makefile.am (SUFFIXES): Initialize.
39 * build-aux/move-if-change: New, symlink to gnulib's.
40 * build-aux/local.mk: Ship it.
41 * doc/common.x: Remove, merged into...
42 * doc/bison.x: here.
43 * doc/local.mk (doc/bison.help): New.
44 ($(CROSS_OPTIONS_TEXI)): Depend on it.
45 Use src/bison.
46 (.x.1): Replace with...
47 (doc/bison.1): this explicit, simpler, target.
48 (common_dep): Remove, inlined where appropriate.
49 (SUFFIXES, PREPATH): Remove, unused.
50
51 2009-08-12 Akim Demaille <demaille@gostai.com>
52
53 gnulib: improve prefixing.
54 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
55 change the value of...
56 (gl_LIBOBJS): this.
57 Adjust more variables.
58 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
59 gl_LIBOBJS.
60 (prefix): Also transform rules whose targets have slashes.
61 Use $prefix liberally.
62 Map @MKDIR_P@ to $(MKDIR_P).
63 Prefix directories that are mkdir'd.
64
65 2009-08-12 Akim Demaille <demaille@gostai.com>
66
67 build: fix paths.
68 When using $(top_builddir) inconsistently, Make (including GNU
69 Make) is sometimes confused. As a result it may want to build
70 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
71 file, different names) concurrently, which, amusingly enough,
72 might end with:
73
74 ranlib lib/libbison.a
75 ranlib lib/libbison.a
76 make[2]: *** [lib/libbison.a] Segmentation fault
77
78 on OS X.
79
80 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
81 needed.
82
83 2009-08-12 Akim Demaille <demaille@gostai.com>
84
85 distcheck: fix.
86
87 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
88
89 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
90
91 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
92
93 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
94
95 Miscellaneous code readability improvements.
96
97 * src/reader.c (reader): Move %define front-end variable
98 defaults and checking into...
99 (prepare_percent_define_front_end_variables): ... this new
100 function.
101
102 * src/scan-gram.l (INITIAL): For consistency with string
103 literals, don't store open quote on character literal. It's
104 discarded before returning anyway.
105 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
106 Make length test more readable, and make the character stored
107 for an empty literal more obvious while consistent with the
108 previous behavior.
109
110 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
111 USER_NUMBER_HAS_STRING_ALIAS throughout.
112 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
113 that is repeated in symtab.h. Improve argument names to make it
114 clear which side of the symbol-string alias pair is which.
115 (symbol_check_alias_consistency): Improve local variable names
116 for the same purpose.
117 * src/symtab.h (struct symbol): Make comments about aliases
118 clearer.
119 (symbol_make_alias): Improve comments and argument name.
120 * src/output.c (token_definitions_output): Update for rename to
121 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
122
123 2009-08-08 Alex Rozenman <rozenman@gmail.com>
124
125 Convert "misleading reference" messages to warnings.
126 * src/scan-code.l: New function 'show_sub_messages', more
127 factoring.
128 * tests/named-ref.at: Adjust tests.
129
130 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
131
132 maint: run "make update-copyright"
133
134 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
135
136 maint: make update-b4-copyright easier to use
137 * build-aux/update-b4-copyright: In warnings, report line
138 numbers rather than character positions.
139 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
140 that update-copyright runs it.
141 * gnulib: Update.
142
143 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
144
145 maint: clean up update-b4-copyright code
146 * build-aux/update-b4-copyright: Do not accept 2-digit
147 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
148 Don't accept a `[' in a b4_copyright argument.
149 Format code more consistently.
150 Don't assume b4*copyright never occurs.
151
152 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
153
154 maint: automate b4_copyright updates.
155 * Makefile.am (update-b4-copyright): New target rule.
156 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
157 * build-aux/update-b4-copyright: New.
158 * data/yacc.c: Remove stray characters around b4_copyright
159 invocations.
160
161 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
162
163 maint: automate annual package-wide copyright-year update.
164 * .x-update-copyright: New.
165 * Makefile.am (EXTRA_DIST): Remove maint.mk.
166 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
167 update-copyright. Remove gnumakefile, which is implied by
168 maintainer-makefile.
169 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
170 * gnulib: Update.
171 * maint.mk: Remove, now copied from gnulib.
172 * examples/extexi: Add missing "(C)" in copyright statement so
173 update-copyright can recognize it.
174 * src/LR0.h: Likewise.
175 * src/print.h: Likewise.
176 * src/print_graph.h: Likewise.
177 * src/gram.c: Add missing comma in copyright statement.
178 * src/gram.h: Likewise.
179
180 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
181
182 Fix "make distcheck".
183 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
184 of just calc.stamp.
185
186 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
187
188 Pacify "gcc -Wunused" for the input function from Flex.
189 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
190 and later.
191 * src/scan-code.l: Add "%option noinput", which I cannot find in
192 the Flex manual, but which Flex has supported since at least as
193 far back as 2.5.4. However, if any of our developers still use
194 Flex 2.5.4, they'll need to stop configuring with
195 --enable-gcc-warnings because "%option noinput" didn't work
196 correctly until Flex 2.5.6.
197 * src/scan-gram.l: Likewise.
198 * src/scan-skel.l: Likewise.
199
200 2009-07-31 Alex Rozenman <rozenman@gmail.com>
201
202 Fix --enable-gcc-warnings problems.
203 * src/reader.c: Adjust variable names.
204 * src/scan-code.l: Fix prototypes and adjust names.
205 * src/named-ref.c: Remove redundant "if".
206
207 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
208
209 Fix a --enable-gcc-warnings problem.
210 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
211 variable.
212
213 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
214
215 Warn about character literals not of length one.
216 * NEWS (2.5): Document.
217 * src/scan-gram.l (INITIAL): Remove comment that we don't check
218 the length.
219 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
220 * tests/input.at (Bad character literals): New test group.
221
222 2009-07-24 Alex Rozenman <rozenman@gmail.com>
223
224 Fix some memory leaks.
225 * src/named-ref.c: Add a pointer check (named_ref_free).
226 * src/scan-code.l: New function (variant_table_free). Called in
227 code_scanner_free.
228 * src/symlist.c: Call to named_ref_free (symbol_list_free).
229
230 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
231
232 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
233
234 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
235
236 Some M4 cleanup in the testsuite.
237 Suggested by Eric Blake at
238 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
239 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
240 complicate the code by distinguishing between a missing value
241 and an empty string value for an optional argument. This fix is
242 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
243 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
244 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
245 arguments are not needed because of the following changes.
246 Fix stale comments.
247 Bison developers should use GNU M4 and should not use
248 POSIXLY_CORRECT when building the test suite, so do not
249 complicate the code by avoiding $10 and above.
250 Do not quote an empty string value for an optional argument, and
251 do not distinguish between a missing value and an empty string
252 value.
253
254 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
255
256 Revert unnecessary column realignment in --help output.
257 Reported by Akim Demaille at
258 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
259 * src/getargs.c (usage): Here.
260
261 2009-07-04 Alex Rozenman <rozenman@gmail.com>
262
263 Alphabetical order in src/local.mk.
264 * src/local.mk: Adjust.
265
266 2009-07-04 Alex Rozenman <rozenman@gmail.com>
267
268 Style changes and factoring.
269 * src/named-ref.h: Add comments.
270 * src/parse-gram.y: Readability and style changes.
271 * src/reader.c: Factoring: assign_named_ref function.
272 * src/scan-code.l: Factoring and style changes. Rename
273 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
274 Use "unsigned" type for variant index. Improve readablity.
275 * src/scan-gram.l: Change error messages and add comments.
276 * src/symlist.h: symbol_list_null: New function decl.
277 * src/symlist.c: symbol_list_null: Implement here.
278 * tests/named-refs.at: Adjust for new error messages.
279
280 2009-06-29 Eric Blake <ebb9@byu.net>
281
282 scan-code: avoid compiler warnings
283 * src/scan-code.l (parse_named_ref): Use correct specifiers.
284
285 2009-06-29 Akim Demaille <demaille@gostai.com>
286
287 build: avoid concurrent extraction of calc++.
288 * examples/calc++/Makefile.am (calc.stamp): New.
289 Depend on it to create the sources of calc++ so that concurrent
290 builds don't launch several "extexi" in parallel.
291 Not only this is inefficient, this also builds incorrect sources
292 with several extractions mixed together.
293
294 2009-06-29 Akim Demaille <demaille@gostai.com>
295
296 parse.error: fix.
297 * data/bison.m4: Move code related to specific variables after the
298 definition of the variable-maintaining macros so that we don't
299 "invoke" b4_percent_define_check_values before it is defined.
300
301 2009-06-29 Akim Demaille <demaille@gostai.com>
302
303 variables: parse.error
304
305 Implement, document, and test the replacement of %error-verbose
306 by %define parse.error "verbose".
307 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
308 values of the parse.error variable.
309 Make "simple" its default value.
310 Check the valid values.
311 * src/parse-gram.y: Use %define parse.error.
312 (PERCENT_ERROR_VERBOSE): New token.
313 Support it.
314 * src/scan-gram.l: Support %error-verbose.
315
316 * doc/bison.texinfo (Decl Summary): Replace the documentation of
317 %define error-verbose by that of %define parse.error.
318 * NEWS: Document it.
319
320 * tests/actions.at, tests/calc.at: Use parse.error instead of
321 %error-verbose.
322
323 2009-06-27 Alex Rozenman <rozenman@gmail.com>
324
325 Implement support for named symbol references.
326 * src/parse-gram.y: Add new syntax (named_ref.opt).
327 * src/reader.c: Store named refs in symbol lists.
328 * src/reader.h: New argument for symbol_append and
329 action_append functions.
330 * src/scan-code.h: Add new field (named_ref) into
331 code_props data structure. Keeps named ref of midrule
332 actions.
333 * src/scan-code.l: Support for named refs in semantic
334 action code. New function 'parse_named_ref'.
335 * src/scan-gram.l: Support bracketed id.
336 * src/symlist.c: Store named refs in symbol lists.
337 * src/symlist.h: New field in symbol list: named_ref.
338 * src/named-ref.h: New file, a struct for named_ref.
339 * src/named-ref.cp: New file, named_ref_new function.
340 * src/local.mk: Add two new files.
341 * tests/testsuite.at: Include new test group:
342 * tests/named-refs.at: this new file.
343
344 2009-06-25 Akim Demaille <demaille@gostai.com>
345
346 hash: check insertion for memory exhaustion.
347 * src/uniqstr.c (uniqstr_new): New.
348
349 2009-06-24 Akim Demaille <demaille@gostai.com>
350
351 variables: rename namespace as api.namespace.
352 Discussed in
353 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
354
355 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
356 New.
357 (b4_percent_define_use): New.
358 Use it where applicable.
359 * data/c++.m4: Replace uses of the variable "namespace" by
360 "api.namespace".
361 Default the latter to the former.
362 * doc/bison.texinfo (Decl Summary): Document "namespace" as
363 obsolete.
364 Document api.namespace.
365 Use @samp to document %define uses, keep @code for identifiers.
366 * NEWS: Likewise.
367 * tests/c++.at, tests/input.at: Test api.namespace instead of
368 namespace. (The tests passed with namespace.)
369
370 2009-06-11 Akim Demaille <demaille@gostai.com>
371
372 style changes.
373 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
374 * src/print-xml.c: Style changes.
375 * tests/conflicts.at: Comment changes.
376
377 2009-06-11 Akim Demaille <demaille@gostai.com>
378
379 xml: beware of user strings used to give a %prec to rules.
380 * tests/conflicts.at (%prec with user strings): New.
381 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
382 XML output.
383
384 2009-06-11 Akim Demaille <demaille@gostai.com>
385
386 hash: check insertion for memory exhaustion.
387 * src/muscle-tab.c (muscle_insert, muscle_grow)
388 * src/state.c (state_hash_insert): Check the return value of
389 hash_insert.
390
391 2009-06-11 Akim Demaille <demaille@gostai.com>
392
393 tests: honor TESTSUITEFLAGS in every check target.
394 * tests/local.mk (RUN_TESTSUITE): New.
395 (check-local, installcheck-local, maintainer-check-g++)
396 (maintainer-check-posix, maintainer-check-valgrind): Use it.
397
398 2009-06-10 Akim Demaille <demaille@gostai.com>
399
400 deterministic test suite.
401 Some consistency checks on symbols are performed after all the
402 symbols were read, by an iteration over the symbol table. This
403 traversal is nondeterministic, which can be a problem for test
404 cases.
405 Avoid this.
406 Addresses another form of nondeterminism reported by Joel E. Denny.
407 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
408
409 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
410 test in two.
411 Use different file names for the three tests to make the
412 maintenance easier.
413
414 2009-06-10 Akim Demaille <demaille@gostai.com>
415
416 gnulib: update.
417 * gnulib: Update to latest.
418 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
419 * m4/.gitignore: Regen.
420 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
421 Call xalloc_die on hash_insert failures.
422 Requested by the new __warn_unused_result__ attribute of
423 hash_insert.
424
425 2009-06-10 Akim Demaille <demaille@gostai.com>
426
427 deterministic user-token-number redeclaration errors.
428 Address nondeterminism reported by Joel E. Denny.
429 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
430
431 * src/uniqstr.h: Comment changes.
432 * src/location.h (boundary_cmp, location_cmp): New.
433 * src/symtab.c (user_token_number_redeclaration): New.
434 (symbol_translation): Use it.
435 * tests/input.at (Numbered tokens): Adjust the expected output.
436
437 2009-05-25 Akim Demaille <demaille@gostai.com>
438
439 build: avoid ignored errors.
440 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
441 errors, they pollute the output.
442
443 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
444
445 Convert multiple variable definition warnings to complaints.
446 * NEWS (2.5): Add a new entry for that change.
447 * doc/bison.texinfo (Decl Summary): Update %define entry.
448 (Bison Options): Update -D/--define/-F/--force-define entry.
449 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
450 * src/muscle-tab.h (muscle_percent_define_insert): Update
451 comments.
452 * tests/input.at (`%define errors'): Update.
453 (`%define, --define, --force-define'): Update.
454
455 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
456
457 -F/--force-define and relative %define/-D/--define priorities.
458 * NEWS (2.5): Add documentation to -D/--define entry.
459 * build-aux/cross-options.pl: Hard-code association of
460 --force-define with %define.
461 * doc/bison.texinfo (Decl Summary): In %define entry,
462 cross-reference command-line options.
463 (Bison Options): Add documentation to -D/--define entry.
464 (Option Cross Key): Widen column for --force-define row.
465 * src/getargs.c (usage): Document -F/--force-define. Realign
466 options in output.
467 (short_options, long_options, getargs): Parse -F/--force-define,
468 and update muscle_percent_define_insert invocations.
469 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
470 (muscle_percent_define_insert): Add argument with that type.
471 * src/muscle-tab.c (muscle_percent_define_insert): Implement
472 -F/--force-define behavior and priorities.
473 (muscle_percent_define_ensure): Update
474 muscle_percent_define_insert invocation.
475 * src/parse-gram.y (prologue_declaration): Update
476 muscle_percent_define_insert invocations.
477 * tests/input.at (`%define, --define'): Rename to...
478 (`%define, --define, --force-define'): ... this and extend.
479
480 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
481
482 Update some comments to make sense for -D.
483 * data/bison.m4 (b4_check_user_names): In header comments, say
484 "user occurrence" instead of "grammar occurrence".
485 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
486 (muscle_percent_code_grow): Likewise just for consistency.
487
488 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
489
490 * data/c++.m4 (b4_namespace_close): Simplify slightly.
491
492 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
493
494 Handle a trailing `:' in a user-supplied C++ namespace better.
495 * data/c++.m4 (b4_namespace_close): Don't let it be printed
496 among the closing braces here. This fix might make the
497 generated code easier to debug, but otherwise it should be
498 insignificant because a trailing `:' is a C++ error already.
499
500 2009-05-19 Akim Demaille <demaille@gostai.com>
501
502 remove useless variable.
503 * src/getargs.c (skeleton_arg): Remove now useless variable.
504 Should help the compiler see that this printf-like call is sane.
505
506 2009-05-15 Akim Demaille <demaille@gostai.com>
507
508 Rename token.prefix as api.tokens.prefix.
509 Discussed here.
510 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
511
512 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
513 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
514 (token.prefix): Rename as...
515 (api.tokens.prefix): this.
516
517 2009-05-11 Akim Demaille <demaille@gostai.com>
518
519 doc: use C++ headers.
520 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
521 headers.
522
523 2009-05-11 Akim Demaille <demaille@gostai.com>
524
525 doc: token.prefix
526 * doc/bison.simple (Decl Summary): Document token.prefix.
527 (Calc++ Parser): Various fixes.
528 Formatting changes.
529 Use token.prefix.
530 Introduce a macro TOKEN to shorten the code and make it more
531 readable.
532 (Calc++ Scanner): Adjust.
533 * NEWS (Variable token.prefix): New.
534
535 2009-05-04 Akim Demaille <demaille@gostai.com>
536
537 bison: catch bad symbol names.
538 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
539 * tests/input.at: Adjust.
540
541 2009-05-04 Akim Demaille <demaille@gostai.com>
542
543 identifiers: dashes are letters.
544 Dashes can now start identifiers (symbols and directives).
545
546 * src/scan-gram.l ({letter}): Add dash.
547 ({id}): Remove it.
548 * tests/input.at (Symbols): Adjust.
549 Remove stray comment.
550 * tests/regression.at (Invalid inputs): Adjust error message.
551 * doc/bison.texinfo (Symbols): Update.
552
553 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
554
555 Declare %code to be a permanent feature.
556 * NEWS (2.4.2): Here.
557 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
558 experimental.
559 (Decl Summary): Likewise.
560
561 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 Convert underscores to dashes in some %define variable names.
564 For now, just api.push-pull and lr.keep-unreachable-states.
565 Maintain old names for backward compatibility.
566 * NEWS (2.5): Document.
567 * data/c.m4 (b4_identification): Update comment.
568 * data/yacc.c: Update access.
569 * doc/bison.texinfo: Update.
570 * etc/bench.pl.in (bench_push_parser): Update use.
571 * src/files.c (tr): Move to...
572 * src/getargs.c, src/getargs.h (tr): ... here because I can't
573 think of a better place to expose it. My logic is that, for all
574 uses of tr so far, command-line arguments can be involved, and
575 getargs.h is already included.
576 * src/main.c (main): Update access.
577 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
578 variable names to new variable names before assigning value.
579 * src/reader.c (reader): Update setting default.
580 * tests/calc.at: Update uses.
581 * tests/conflicts.at (Unreachable States After Conflict
582 Resolution): Update use.
583 * tests/input.at (%define enum variables): Update use.
584 (%define backward compatibility): New test group.
585 * tests/push.at: Update uses.
586 * tests/reduce.at: Update uses.
587 * tests/torture.at: Update uses.
588
589 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
590
591 Set all front-end %define defaults in one place.
592 * src/main.c (main): Move lr.keep_unreachable_states default...
593 * src/reader.c (reader): ... to here.
594
595 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
596
597 Rename lr.default_reductions to lr.default-reductions.
598 * NEWS (2.5): Here.
599 * doc/bison.texinfo: Here.
600 * src/lalr.c (initialize_LA): Here.
601 * src/print.c (print_reductions): Here.
602 * src/reader.c (reader): Here.
603 * src/tables.c (action_row): Here.
604 * tests/input.at (%define enum variables): Here.
605 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
606
607 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
608
609 Pacify ./configure --enable-gcc-warnings.
610 * tests/input.at (Symbols): Prototype yyerror and yylex.
611
612 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
613
614 Document how `%define "var" "value"' is not M4-friendly.
615 * src/parse-gram.y (variable): In comments here.
616
617 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
618
619 Clean up recent patches a little.
620 Reported by Akim Demaille.
621 * doc/bison.texinfo (Understanding): Fix typos.
622 * src/print.c (print_reductions): Don't use negated variable.
623
624 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
625
626 List accepted values for a %define enum variable with an invalid value.
627 Suggested by Akim Demaille at
628 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
629 * data/bison.m4 (_b4_percent_define_check_values): Implement.
630 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
631 * tests/input.at (%define lr.default_reductions invalid values): Merge
632 into...
633 (%define enum variables): ... here, and update output.
634
635 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
636
637 Rename "default rule" to "default reduction".
638 This includes changing variable names in code, changing
639 comments, and renaming %define lr.default_rules to %define
640 lr.default_reductions.
641 * NEWS (2.5): Update IELR documentation.
642 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
643 documentation.
644 * data/glr.c, data/lalr1.java: Sync copyright dates.
645 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
646 and lr.type documentation. Make some other wording
647 improvements.
648 (Glossary): Adjust cross-references and Default Reduction
649 definition.
650 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
651 Remove a confusing comment pointed out by Akim Demaille.
652 (initialize_LA): Adjust code.
653 * src/print-xml.c (print_reductions): Adjust code.
654 * src/print.c (print_reductions): Adjust code.
655 * src/reader.c (reader): Adjust code.
656 * src/tables.c (action_row): Adjust code.
657 (token_actions): Adjust code.
658 * src/tables.h: Adjust YYDEFACT documentation.
659 * tests/input.at (%define lr.default_rules invalid values):
660 Rename test group to...
661 (%define lr.default_reductions invalid values): ... this, and
662 update grammar file and expected output.
663 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
664 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
665
666 2009-04-21 Akim Demaille <demaille@gostai.com>
667
668 tests: check the use of dashes and periods in symbols.
669 * tests/input.at (Symbol): New test group.
670
671 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
672
673 Document %define lr.type and lr.default_rules.
674 * NEWS (2.5): Add an entry.
675 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
676 besides just LALR(1) and GLR(1).
677 * doc/bison.texinfo (Introduction): Likewise.
678 (Language and Grammar): Bison is no longer limited to LALR(1)
679 restrictions.
680 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
681 when trying to distinguish from GLR. Talk about LR(1) grammars
682 rather than LALR(1) grammars.
683 (Decl Summary): In %define api.push_pull entry, say it applies
684 to deterministic parsers in C rather than LALR(1) parsers in C.
685 Add lr.default_rules entry.
686 Add lr.type entry.
687 (Mystery Conflicts): Bison is no longer limited to LALR(1)
688 restrictions.
689 (Generalized LR Parsing): Same changes as for the previous GLR
690 section.
691 (Memory Management): Say deterministic rather than LALR(1).
692 (Understanding): Correct some bison output.
693 Index discussion of "accepting state".
694 Say deterministic rather than LALR(1).
695 (Bison Options): In --yacc entry, say deterministic rather than
696 LALR(1).
697 In --report, --graph, and --xml entries, just don't mention
698 LALR(1).
699 (C++ Parsers): Say deterministic rather than LALR(1).
700 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
701 (Glossary): Add Accepting State, Consistent State, Default Rule,
702 and IELR(1) definitions.
703 In Generalized LR (GLR) definition, make same changes as in
704 previous GLR sections.
705 In LALR(1) definition, say Bison uses LALR(1) by default rather
706 than implying Bison is limited to LALR(1).
707 (LocalWords): Add IELR.
708
709 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
710
711 Finish implementing %define lr.type.
712 Its value can be "LALR", "IELR", or "canonical LR".
713 * lib/timevar.def (TV_IELR_PHASE1): New var.
714 (TV_IELR_PHASE2): New var.
715 (TV_IELR_PHASE3): New var.
716 (TV_IELR_PHASE4): New var.
717 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
718 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
719 Sbitset.h, ielr.h, and ielr.c.
720 * src/getargs.h, src/getargs.c (enum trace, trace_args,
721 trace_types): Add trace_ielr.
722 * src/lalr.h, src/lalr.c (ngotos): Export it.
723 (F): Rename to...
724 (goto_follows): ... this, update all uses, and export it.
725 (set_goto_map): Export it.
726 (map_goto): Export it.
727 (compute_lookahead_tokens): Don't free goto_follows yet. Now
728 handled in ielr.
729 (initialize_LA): Export it. Move lookback allocation to...
730 (lalr): ... here because, for canonical LR, initialize_LA must
731 be invoked but lookback and much of the rest of LALR isn't
732 needed.
733 * main.c (main): Instead of lalr, invoke ielr, which invokes
734 lalr.
735 * src/reader.c (reader): Default lr.type to "LALR".
736 Default lr.default_rules to "accepting" if lr.type is "canonical
737 LR". Leave the default as "all" otherwise.
738 Check for a valid lr.type value.
739 * src/state.h, src/state.c (struct state_list): Add state_list
740 member.
741 (state_new): Initialize state_list member to NULL.
742 (state_new_isocore): New function, exported.
743 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
744 exercises all values of lr.type.
745 (GNU AWK Grammar): Rename test group to...
746 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
747 AT_TEST_EXISTING_GRAMMAR.
748 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
749 (GNU pic Grammar): Rename test group to...
750 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
751 AT_TEST_EXISTING_GRAMMAR.
752 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
753 all values of lr.type.
754 (Single State Split): New test groups using AT_TEST_LR_TYPE.
755 (Lane Split): Likewise.
756 (Complex Lane Split): Likewise.
757 (Split During Added Lookahead Propagation): Likewise.
758
759 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
760
761 Add new files for IELR and canonical LR implementation.
762 * src/AnnotationList.c: New.
763 * src/AnnotationList.h: New.
764 * src/InadequacyList.c: New.
765 * src/InadequacyList.h: New.
766 * src/Sbitset.c: New.
767 * src/Sbitset.h: New.
768 * src/ielr.c: New.
769 * src/ielr.h: New.
770
771 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
772
773 Implement %define lr.default_rules.
774 Its value describes the states that are permitted to contain
775 default rules: "all", "consistent", or "accepting".
776 * src/reader.c (reader): Default lr.default_rules to "all".
777 Check for a valid lr.default_rules value.
778 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
779 is "accepting", then only mark the accepting state as
780 consistent.
781 (initialize_LA): Tell state_lookahead_tokens_count whether
782 lr.default_rules is "accepting".
783 * src/tables.c (action_row): If lr.default_rules is not "all",
784 then disable default rules in inconsistent states.
785 * src/print.c (print_reductions): Use this opportunity to
786 perform some assertions about whether lr.default_rules was
787 obeyed correctly.
788 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
789 helps with checking the parser tables for a grammar.
790 * tests/input.at (%define lr.default_rules invalid values): New
791 test group.
792 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
793 AT_TEST_TABLES_AND_PARSE.
794 (`no %define lr.default_rules'): New test group generated by
795 AT_TEST_LR_DEFAULT_RULES.
796 (`%define lr.default_rules "all"'): Likewise.
797 (`%define lr.default_rules "consistent"'): Likewise.
798 (`%define lr.default_rules "accepting"'): Likewise.
799
800 2009-04-20 Akim Demaille <demaille@gostai.com>
801
802 Formatting change.
803
804 2009-04-20 Akim Demaille <demaille@gostai.com>
805
806 bison: factoring.
807 * src/output.c (token_definitions_output): Use symbol_id_get
808 instead of duplicating its logic.
809 * TODO (YYERRCODE): Extend.
810
811 2009-04-20 Akim Demaille <demaille@gostai.com>
812
813 variables: prefer error-verbose to error_verbose.
814 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
815 instead of error_verbose.
816 * src/scan-gram.l (%error-verbose): Map to the error-verbose
817 variable.
818 * doc/bison.texinfo: Promote %define error-verbose instead of
819 %error-verbose.
820 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
821
822 2009-04-15 Akim Demaille <demaille@gostai.com>
823
824 variables: accept dashes.
825 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
826 underscores.
827 * src/scan-gram.l ({id}): Also accept dashes after the initial
828 letter.
829 ({directive}): Use {id}.
830 * src/parse-gram.y: Comment and formatting changes.
831 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
832 symbols.
833 * src/complain.h, src/complain.c (yacc_at): New.
834 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
835 symbol names.
836 * src/output.c (token_definitions_output): Do not #define token
837 names with dashes.
838
839 2009-04-20 Akim Demaille <demaille@gostai.com>
840
841 Consistently refer to Yacc, not YACC.
842 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
843
844 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
845
846 Pacify make maintainer-check-posix.
847 * tests/input.at (%define, --define): Move bison command-line
848 options before grammar file name.
849
850 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
851
852 Document semicolon warnings.
853 * NEWS (2.5): Here.
854
855 2009-04-14 Akim Demaille <demaille@gostai.com>
856
857 variables: use `parse.assert' instead of `assert'.
858 * TODO (assert): Remove.
859 * data/bison.m4 (b4_assert_if): Replace with...
860 (b4_parse_assert_if): this.
861 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
862 * doc/bison.texinfo (Decl Summary): Document parse.assert.
863
864 2009-04-14 Akim Demaille <demaille@gostai.com>
865
866 variables: use `parse.trace' instead of `debug'.
867 * src/getargs.c (getargs): Map -t to %define trace.parse.
868 * src/scan-gram.l (%debug): Map to %define trace.parse.
869 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
870 names to `_' in macro names.
871 (b4_debug_if): Replace with...
872 (b4_parse_trace_if): this.
873 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
874 * data/yacc.c: Adjust.
875 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
876 Use @code to label the variable list.
877 Document the variable parse.trace.
878 (Tracing): Promote the parse.trace variable.
879 * TODO: %printer is not documented.
880
881 2009-04-14 Akim Demaille <demaille@gostai.com>
882
883 doc: minor fixes.
884 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
885 (Table of Symbols): Remove duplicate entry for %debug.
886
887 2009-04-10 Eric Blake <ebb9@byu.net>
888
889 submodules: update to latest
890 * submodules/autoconf: Use latest upstream Autoconf.
891
892 2009-04-06 Eric Blake <ebb9@byu.net>
893
894 Work around autoconf 2.63b bug in testsuite.
895 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
896 autoconf bug related to # in test.
897
898 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
899
900 * NEWS (2.5): New section. Describe new -D/--define feature.
901
902 2009-04-06 Akim Demaille <demaille@gostai.com>
903
904 Regen.
905 * src/parse-gram.h, src/parse-gram.c: Regen.
906
907 2009-04-06 Akim Demaille <demaille@gostai.com>
908
909 rename muscle_tab.* as muscle-tab.* for consistency.
910 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
911 * src/muscle-tab.h, src/muscle-tab.c: these.
912 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
913 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
914
915 2009-04-06 Akim Demaille <demaille@gostai.com>
916
917 Makefile: introduce $(BISON).
918 * src/local.mk (BISON): New.
919 (YACC): Use it.
920
921 2009-04-06 Akim Demaille <demaille@gostai.com>
922
923 parser: handle %locations as %define locations.
924 * src/getargs.h, src/getargs.c (locations_flag): Remove.
925 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
926 to set "locations" to true.
927 * src/output.c (prepare): Don't output "locations".
928 * src/scan-gram.l (%locations): Handle it as a %<flag>.
929 * src/parse-gram.y: It's no longer a token.
930 Don't handle it.
931 * data/bison.m4 (b4_locations_if): Define it with
932 b4_percent_define_if_define.
933 * data/c.m4, data/glr.cc: Adjust.
934
935 2009-04-06 Akim Demaille <demaille@gostai.com>
936
937 Regen.
938 * src/parse-gram.c: Regen.
939
940 2009-04-06 Akim Demaille <demaille@gostai.com>
941
942 muscle: factor the handling of obsolete of obsolete directives.
943 Suggested by Joel E. Denny.
944
945 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
946 New, extracted from...
947 * src/parse-gram.y (prologue_declaration: pure-parser): here.
948 Remove it.
949 (prologue_declaration: "%<flag>"): Use
950 muscle_percent_define_ensure.
951 (%error-verbose, %pure-parser): No longer tokens.
952 * src/scan-gram.l (pure-parser): Return as a %<flag>.
953
954 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
955
956 Fix options documentation.
957 * build-aux/cross-options.pl: As in --help output, write optional
958 arguments as [=ARG] not =[ARG].
959 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
960
961 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
962
963 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
964 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
965 requirements for a correct m4 are stricter.
966 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
967 * configure.ac: Update to use AC_PROG_GNU_M4.
968 Reported by Eric Blake.
969
970 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
971
972 Help with updating web manual.
973 * HACKING: Incorporate instructions from gnulib/doc/README.
974 * bootstrap.conf (gnulib_modules): Add gendocs.
975
976 2009-04-03 Akim Demaille <demaille@gostai.com>
977
978 Regen.
979 * src/parse-gram.h, src/parse-gram.c: Regen.
980
981 2009-04-03 Akim Demaille <demaille@gostai.com>
982
983 Factor %FLAG at scan level.
984 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
985 definitions and associated rules, replaced by....
986 (PERCENT_FLAG): this new token type, and rule.
987 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
988 Use it for %debug and %error-verbose.
989
990 2009-04-03 Akim Demaille <demaille@gostai.com>
991
992 Regen.
993 * src/parse-gram.h, src/parse-gram.c: Regen.
994
995 2009-04-03 Akim Demaille <demaille@gostai.com>
996
997 Treat %debug as %define debug.
998 * data/bison.m4 (b4_debug_if): New.
999 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1000 * data/lalr1.java: Use it instead of b4_debug_flag.
1001 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1002 * src/output.c (prepare): Don't output it.
1003 * src/parse-gram.y: Treat %debug as %define debug.
1004
1005 2009-04-03 Akim Demaille <demaille@gostai.com>
1006
1007 Treat %error-verbose as %define error_verbose.
1008 This allows to pass -Derror_verbose on the command line. Better
1009 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1010 ERROR_VERBOSE being defined as false or true.
1011 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1012 on b4_percent_define_ifdef, for does not check the defined value,
1013 but only whether the symbol is defined, rely on
1014 b4_percent_define_flag_if, so that a value of "false" is processed
1015 as a false.
1016 If not defined, define the flag to "false".
1017 (b4_error_verbose_if): New.
1018 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1019 b4_error_verbose_flag.
1020 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1021 * src/output.c (prepare): Don't output it.
1022 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1023
1024 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1025
1026 Fix strange %define locations for default values.
1027 Reported by Akim Demaille at
1028 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1029 and discussed again starting at
1030 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1031 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1032 because location information is bogus.
1033 Use angle brackets to delimit fake file name because square brackets
1034 look like underexpanded m4. Choose a better fake file name.
1035 Use negative line numbers.
1036 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1037 * src/location.c (location_print): If line for a boundary is negative,
1038 only print that boundary's file name.
1039 * src/location.h: Document that.
1040 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1041 defaults): Update output.
1042
1043 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1044
1045 Pacify ./configure --enable-gcc-warnings.
1046 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1047 in lib won't compile with it.
1048 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1049
1050 2009-03-31 Akim Demaille <demaille@gostai.com>
1051
1052 bootstrap: --help to stdout.
1053 * bootstrap (usage): Don't send --help to stderr.
1054 Use a here doc instead of a long string.
1055
1056 2009-03-31 Akim Demaille <demaille@gostai.com>
1057
1058 bootstrap: README-hacking no longer exists
1059 * bootstrap (checkout_only_file): Set to HACKING.
1060
1061 2009-03-26 Akim Demaille <demaille@gostai.com>
1062
1063 doc: merge HACKING and README-hacking.
1064 Two files is confusing.
1065 Reported by Alexandre Duret-Lutz.
1066
1067 * README-hacking: Merge into...
1068 * HACKING (Working from the repository): here.
1069
1070 2009-03-26 Akim Demaille <demaille@gostai.com>
1071
1072 doc: update README-hacking.
1073 * README-hacking: We now use git and git submodules.
1074 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1075
1076 2009-03-26 Akim Demaille <demaille@gostai.com>
1077
1078 lalr1.cc: avoid GCC 4.3 warnings.
1079 GCC 4.3 now warns about "a || b && c" and asks for explicit
1080 parentheses.
1081 Reported by Alexandre Duret-Lutz.
1082 * data/location.cc: Update copyright years.
1083 (Position::operator==): Use parens to make precedence explicit.
1084 Compare lines and columns first, as they are more likely to be
1085 different, and they are faster to compare.
1086
1087 2009-03-26 Akim Demaille <demaille@gostai.com>
1088
1089 gnulib: update.
1090 * gnulib: Update to latest.
1091 * src/local.mk (AM_CFLAGS): Move to...
1092 * Makefile.am: here.
1093 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1094 AM_CFLAGS.
1095
1096 2009-03-02 Akim Demaille <demaille@gostai.com>
1097
1098 Comment changes.
1099
1100 2009-03-02 Akim Demaille <demaille@gostai.com>
1101
1102 Share b4_yytranslate_define.
1103 * data/lalr1.cc (b4_yytranslate_define): Move to...
1104 * data/c++.m4: here.
1105
1106 2009-03-02 Akim Demaille <demaille@gostai.com>
1107
1108 Use locations in the variant example.
1109 Yes, this obfuscates the point of this example, variants only.
1110 But glr.cc cannot work (yet?) without locations. This change
1111 makes it easier to use this example with glr.cc.
1112
1113 * examples/variant.yy (assert): %define it.
1114 (locations): Request them.
1115 (yylex): Bind the location to the stage.
1116
1117 2009-03-02 Akim Demaille <demaille@gostai.com>
1118
1119 Dub make_TOKEN as a public type interface.
1120 * data/c++.m4 (b4_symbol_constructor_declare)
1121 (b4_symbol_constructor_define): New empty stubs.
1122 (b4_public_types_declare, b4_public_types_define): Use them.
1123 * data/lalr1.cc (b4_symbol_constructor_declare)
1124 (b4_symbol_constructor_declare_)
1125 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1126 Move to...
1127 * data/variant.hh: here.
1128 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1129 needed.
1130 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1131 b4_symbol_constructor_declare, as it is now done by
1132 b4_public_types_define and b4_public_types_declare.
1133
1134 2009-03-02 Akim Demaille <demaille@gostai.com>
1135
1136 Coding style changes.
1137 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1138 (b4_symbol_constructor_declarations)
1139 (b4_symbol_constructor_definition_)
1140 (b4_symbol_constructor_definitions)
1141 (b4_yytranslate_definition): Rename as...
1142 (b4_symbol_constructor_declare_)
1143 (b4_symbol_constructor_declare)
1144 (b4_symbol_constructor_define_)
1145 (b4_symbol_constructor_define)
1146 (b4_yytranslate_define): these.
1147 * data/variant.hh (b4_variant_definition): Rename as...
1148 (b4_variant_define): this.
1149
1150 2009-03-02 Akim Demaille <demaille@gostai.com>
1151
1152 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1153 * data/bison.m4 (b4_percent_define_if_define): New.
1154 * data/c++.m4 (b4_variant_if): Move to...
1155 * data/bison.m4: Here, using b4_percent_define_if_define.
1156 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1157 * data/bison.m4: Here, using b4_percent_define_if_define.
1158
1159 2009-03-02 Akim Demaille <demaille@gostai.com>
1160
1161 Dub symbol_type_base as a public type.
1162 * data/c++.m4 (b4_public_types_declare): Now define
1163 symbol_type_base and symbol_type.
1164 (b4_public_types_define): New.
1165 In both cases, the definitions are taken verbatim from lalr1.cc.
1166 * data/lalr1.cc: Adjust.
1167
1168 2009-03-02 Akim Demaille <demaille@gostai.com>
1169
1170 b4_public_types_declare.
1171 * data/c++.m4 (b4_public_types_declare): New.
1172 * data/glr.cc, data/lalr1.cc: Use it.
1173
1174 2009-03-02 Akim Demaille <demaille@gostai.com>
1175
1176 b4_semantic_type_declare.
1177 * data/c++.m4 (b4_semantic_type_declare): New.
1178 Factors and generalizes what was in glr.cc and lalr1.cc.
1179 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1180 variants.
1181 * data/lalr1.cc, data/glr.cc: Use it.
1182
1183 2009-02-26 Akim Demaille <demaille@gostai.com>
1184
1185 Upgrade gnulib.
1186 * gnulib: Upgrade from master.
1187 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1188 Regen.
1189
1190 2009-02-25 Akim Demaille <demaille@gostai.com>
1191
1192 Remove useless arguments.
1193 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1194 relevant.
1195
1196 2009-02-25 Akim Demaille <demaille@gostai.com>
1197
1198 Comment changes.
1199 * data/lalr1.cc: here.
1200
1201 2009-02-25 Akim Demaille <demaille@gostai.com>
1202
1203 Fix glr.cc's debug level handling.
1204 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1205 glr.c which is used.
1206 (debug_level, set_debug_level): Adjust.
1207
1208 2009-02-25 Akim Demaille <demaille@gostai.com>
1209
1210 Copyright years.
1211 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1212
1213 2009-02-25 Akim Demaille <demaille@gostai.com>
1214
1215 Style changes.
1216 * etc/bench.pl.in (generate_grammar_list): Consitently use
1217 location_type, not yy::location.
1218
1219 2009-02-25 Akim Demaille <demaille@gostai.com>
1220
1221 Comment change.
1222 * data/lalr1.cc: here.
1223
1224 2009-02-19 Akim Demaille <demaille@gostai.com>
1225
1226 Make yyparser::error public.
1227 * data/lalr1.cc: here.
1228 There is no good reason to keep it private (and it is convenient
1229 to use it from the scanner for instance). It is already public in
1230 glr.cc.
1231
1232 2009-02-19 Akim Demaille <demaille@gostai.com>
1233
1234 Comment changes.
1235 * data/glr.cc: here.
1236
1237 2009-02-19 Akim Demaille <demaille@gostai.com>
1238
1239 Remove trailing blanks.
1240 The epilogue has its own ending \n, no need to add another.
1241
1242 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1243 epilogue.
1244 * data/glr.cc: dnl when extending the epilogue.
1245 Remove stray "private:".
1246
1247 2009-02-19 Akim Demaille <demaille@gostai.com>
1248
1249 Use b4_c_modern.
1250 * data/c.m4 (b4_c_function_decl): Here.
1251
1252 2009-02-19 Akim Demaille <demaille@gostai.com>
1253
1254 Comment changes.
1255 * data/lalr1.cc: here.
1256
1257 2009-02-19 Akim Demaille <demaille@gostai.com>
1258
1259 Extract variant.hh
1260 * data/variant.hh: New, extracted from...
1261 * data/lalr1.cc: here.
1262 Adjust.
1263 * data/local.mk: Adjust.
1264
1265 2009-02-19 Akim Demaille <demaille@gostai.com>
1266
1267 Extract stack.hh from lalr1.cc.
1268 * data/stack.hh: New.
1269 * data/lalr1.cc: Extract from here.
1270 * data/local.mk: Adjust.
1271
1272 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1273
1274 Add reminder about uploading public key to keys.gnupg.net.
1275 * HACKING (Release Procedure): Here.
1276
1277 2009-01-28 Akim Demaille <demaille@gostai.com>
1278
1279 * NEWS: Update information about 2.4.1 and 2.4.2.
1280
1281 2008-11-04 Akim Demaille <demaille@gostai.com>
1282
1283 Reformat NEWS.
1284 * NEWS: Use more outline-mode markup.
1285 Suggested by Jim Meyering.
1286
1287 2009-01-08 Akim Demaille <demaille@gostai.com>
1288
1289 Fix grep portability issues.
1290 Grep on Solaris does not support -q.
1291 Reported by Summum Bonum.
1292
1293 * NEWS: Add a stub for 2.4.2.
1294 * THANKS: Add Summum Bonum.
1295 * tests/atlocal.in (EGREP): New.
1296 (CC, CXX, XSLTPROC): Make it possible to override them via
1297 envvars.
1298 * tests/java.at: Use $EGREP instead of egrep.
1299 Use AT_CHECK's ignore instead of grep's -q.
1300
1301 2008-12-11 Akim Demaille <demaille@gostai.com>
1302
1303 Pass the token type to yysyntax_error.
1304 * data/yacc.c (yysyntax_error): Take the transated token instead
1305 of the raw number.
1306 Adjust callers.
1307 * TODO: Update.
1308
1309 2008-12-11 Akim Demaille <demaille@gostai.com>
1310
1311 Formatting changes.
1312 * data/glr.c: Formatting changes.
1313
1314 2008-12-11 Akim Demaille <demaille@gostai.com>
1315
1316 Propagate i18n changes into glr.c.
1317 * TODO: Update.
1318 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1319 building the error message format dynamically.
1320 * data/lalr1.java: Formatting changes.
1321
1322 2008-12-11 Akim Demaille <demaille@gostai.com>
1323
1324 Use testsuite -C.
1325 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1326 Solves problems when top_srcdir is an absolute path.
1327 Suggested by Eric Blake.
1328 * configure.ac: Require Autoconf 2.62.
1329
1330 2008-12-11 Akim Demaille <demaille@gostai.com>
1331
1332 Simplify the i18n of the error messages.
1333 * data/lalr1.cc: Comment changes.
1334 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1335 lalr1.cc instead of building dynamically the format string.
1336
1337 2008-12-08 Akim Demaille <demaille@gostai.com>
1338
1339 Fix portability issue in the test suite.
1340 * tests/local.at (AT_MATCHES_CHECK): New.
1341 Based on Perl instead of Sed. Sed has too many portability
1342 pitfalls, not ever Sed is GNU Sed.
1343 * tests/actions.at (Fix user actions without a trailing semicolon):
1344 Use it.
1345
1346 2008-12-08 Akim Demaille <demaille@gostai.com>
1347
1348 Update data/README.
1349 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1350
1351 2008-12-08 Akim Demaille <demaille@gostai.com>
1352
1353 Install autoconf as a submodule to get m4sugar.
1354 * .gitmodules: Add submodules/autoconf.
1355 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1356 submodules/autoconf.
1357
1358 2008-12-08 Akim Demaille <demaille@gostai.com>
1359
1360 Test token.prefix in all the skeletons.
1361 * data/java.m4 (b4_token_enum): Use the token.prefix.
1362 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1363 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1364 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1365 * tests/java.at: Comment changes.
1366 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1367 (Java parser class and package names): Add token.prefix check.
1368
1369 2008-12-08 Akim Demaille <demaille@gostai.com>
1370
1371 Fix regeneration of atconfig.
1372 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1373 remove it: now that there is no tests/Makefile.am, the top-level
1374 Makefile properly updates atconfig when needed.
1375
1376 2008-12-07 Di-an Jan <dianj@freeshell.org>
1377
1378 Implement the FIXME that ends an user action with a semicolon
1379 if it seems necessary.
1380 * src/scan-code.l (flex rules section): Flag cpp directive from
1381 any `#' to the first unescaped end-of-line. Semicolon is not
1382 needed after `;', `{', '}', or cpp directives and is needed after
1383 any other token (whitespaces and comments have no effect).
1384 * tests/actions.at (Fix user actions without a trailing semicolon):
1385 New test.
1386 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1387 to make user actions complete statements.
1388 Adjust column numbers in error messages.
1389 * tests/regression.at (Fix user actions without a trailing semicolon):
1390 Remove. Covered by new test.
1391
1392 2008-12-07 Akim Demaille <demaille@gostai.com>
1393
1394 Update gnulib.
1395 * gnulib: Update from master.
1396
1397 2008-12-05 Eric Blake <ebb9@byu.net>
1398
1399 Avoid compiler warning.
1400 * src/output.c (muscle_insert_item_number_table): Delete unused
1401 function.
1402
1403 2008-12-02 Eric Blake <ebb9@byu.net>
1404
1405 Build testsuite with newer autoconf.
1406 * tests/output.at (m4_expand): Don't override in newer autoconf,
1407 where the underlying implementation changed.
1408 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1409 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1410 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1411 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1412 since some of them contain unbalanced ')'.
1413
1414 2008-12-01 Akim Demaille <demaille@gostai.com>
1415
1416 Use b4_symbol for printers and destructors everywhere.
1417 * data/bison.m4 (b4_symbol_action_location): New.
1418 * data/c.m4 (b4_symbol_actions): Remove.
1419 Adjust all callers to use by b4_symbol_foreach and the corresponding
1420 b4_symbol_printer/destructor macro.
1421 * data/glr.cc: Adjust.
1422 * data/lalr1.java: Adjust the %destructor sanity check.
1423 * src/output.c (symbol_code_props_output): Remove, we no longer
1424 need the b4_symbol_printers/destructors tables.
1425
1426 2008-12-01 Akim Demaille <demaille@gostai.com>
1427
1428 Use b4_symbol_case_.
1429 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1430 b4_symbol_case_.
1431
1432 2008-12-01 Akim Demaille <demaille@gostai.com>
1433
1434 Move b4_symbol based macro to bison.m4.
1435 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1436 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1437 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1438 (b4_type_foreach): Move to...
1439 * data/bison.m4: Here.
1440 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1441 b4_symbol_value_template instead of b4_symbol_value.
1442
1443 2008-12-01 Akim Demaille <demaille@gostai.com>
1444
1445 b4_symbol/type_foreach.
1446 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1447 Use them.
1448
1449 2008-12-01 Akim Demaille <demaille@gostai.com>
1450
1451 Use the symbol properties to output the printer/destructor for lalr1.cc.
1452 Instead of defining complex list of tuples to define various
1453 properties of the symbols, we now prefer to define symbols as
1454 "structs" in m4: using the symbol key (its number), and the
1455 property name, b4_symbol gives it value. Use this to handle
1456 destructors and printers.
1457
1458 * src/output.c (CODE_PROP): New.
1459 (prepare_symbol_definitions): Use it to define the printer and
1460 destructor related attributes of the symbols.
1461 * data/lalr1.cc (b4_symbol_actions): Rename as...
1462 (b4_symbol_action): this.
1463 Use b4_symbol instead of 6 arguments.
1464 (b4_symbol_printer, b4_symbol_destructor): New.
1465 Use them instead of b4_symbol_actions.
1466
1467 2008-12-01 Akim Demaille <demaille@gostai.com>
1468
1469 Avoid capturing variables too easily.
1470 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1471 v__ and p__ instead of v and p.
1472
1473 2008-12-01 Akim Demaille <demaille@gostai.com>
1474
1475 Remove spurious empty line before syncline.
1476 * data/bison.m4 (b4_syncline): Don't output an empty line before
1477 the output.
1478
1479 2008-11-26 Akim Demaille <demaille@gostai.com>
1480
1481 Convert lib/Makefile.am into lib/local.mk.
1482 The real problem is rather gnulib.mk, which itself is extracted
1483 from a Makefile.am that gnulib expects to the "recursive". The
1484 tool prefix-gnulib-mk converts such a gnulib.mk to be
1485 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1486
1487 * etc/prefix-gnulib-mk: New.
1488 * bootstrap (slurp): Use it to convert further gnulib.mk.
1489 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1490 are deeper.
1491 * lib/Makefile.am: Rename as...
1492 * lib/local.mk: this.
1493 Adjust to be prefixed.
1494 * Makefile.am, configure.ac: Adjust.
1495 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1496
1497 2008-11-26 Akim Demaille <demaille@gostai.com>
1498
1499 s/_FLAGS/FLAGS/.
1500 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1501 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1502 Reported by Eric Blake.
1503
1504 2008-11-26 Akim Demaille <demaille@gostai.com>
1505
1506 Use b4_parser_tables_define in glr.cc.
1507 * data/glr.c: Use b4_parser_tables_define instead of defining the
1508 (deterministic integral) tables by hand.
1509
1510 2008-11-26 Akim Demaille <demaille@gostai.com>
1511
1512 Use b4_parser_tables_define in Java.
1513 * data/java.m4 (b4_typed_parser_table): Rename as...
1514 (b4_typed_parser_table_define): this, for consistency.
1515 Accept a comment as $4.
1516 Move $2 into yy*_.
1517 (b4_integral_parser_table): Rename as...
1518 (b4_integral_parser_table_define): this.
1519 * data/lalr1.java: Adjust all uses.
1520 Use b4_parser_tables_define instead of generation by hand.
1521
1522 2008-11-26 Akim Demaille <demaille@gostai.com>
1523
1524 Prepare the convergence bw C style and Java table generation.
1525 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1526 (b4_tables_define): Rename as...
1527 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1528 (b4_parser_tables_define): these.
1529 * data/c.m4 (b4_table_define): Rename as...
1530 (b4_integral_parser_table_define): this.
1531 * data/lalr1.cc: Adjust.
1532 (b4_table_define, b4_table_declare): Rename as...
1533 (b4_integral_parser_table_define)
1534 (b4_integral_parser_table_declare): these.
1535 (yyrline_): Move the comment where it is actually used.
1536 * data/yacc.c: Adjust.
1537 (yyrline): Use b4_integral_parser_table_define.
1538
1539 2008-11-26 Akim Demaille <demaille@gostai.com>
1540
1541 Regen.
1542 * src/parse-gram.h, src/parse-gram.c: Regen.
1543
1544 2008-11-26 Akim Demaille <demaille@gostai.com>
1545
1546 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1547 * data/lalr1.cc (b4_tables_map): Move to...
1548 * data/bison.m4: here.
1549 Update the comment for yytable during the flight.
1550 (b4_tables_declare, b4_tables_define): New.
1551 * data/lalr1.cc: Use them.
1552 * data/c.m4 (b4_table_define): New.
1553 * data/yacc.c: Use b4_tables_define instead of output the tables
1554 by hand.
1555 * tests/regression.at (Web2c Actions): Adjust the expected output,
1556 the order of the tables changed.
1557
1558 2008-11-26 Akim Demaille <demaille@gostai.com>
1559
1560 Get rid of (yy)rhs and (yy)prhs.
1561 These tables are no longer needed in the parsers, and they don't seem to
1562 be useful. They are not documented either.
1563
1564 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1565 Adjust the computation of (yy)r2.
1566
1567 2008-11-26 Akim Demaille <demaille@gostai.com>
1568
1569 Rule length is unsigned.
1570 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1571
1572 2008-11-26 Akim Demaille <demaille@gostai.com>
1573
1574 Get rid of lalr1-split.cc.
1575 It was no longer maintainer.
1576
1577 * data/lalr1-split.cc: Remove.
1578 * etc/bench.pl.in (bench_fusion_parser): Remove.
1579 Adjust.
1580
1581 2008-11-26 Akim Demaille <demaille@gostai.com>
1582
1583 Use yy* consistently.
1584 * data/glr.c: Now that yyrhs no longer exists as a global
1585 variable, rename local "rhs" variables into "yyrhs" for
1586 consistency.
1587
1588 2008-11-25 Akim Demaille <demaille@gostai.com>
1589
1590 Get rid of yyrhs and yyprhs in glr.c.
1591 * data/glr.c (yyrhs, yyprhs): Remove.
1592 Instead, use the state stack and yystos.
1593
1594 2008-11-25 Akim Demaille <demaille@gostai.com>
1595
1596 Flag glr tests.
1597 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1598 as an Autotest keyword.
1599
1600 2008-11-25 Akim Demaille <demaille@gostai.com>
1601
1602 Prefer TESTSUITE_FLAGS.
1603 TESTSUITEFLAGS is barely readable.
1604
1605 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1606 for backward compatibility.
1607 Use the former instead of the latter.
1608
1609 2008-11-25 Akim Demaille <demaille@gostai.com>
1610
1611 Get rid of yyrhs and yyprhs in larl1.java.
1612 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1613 (yy_reduce_print): Rather, use yystos_ and the state stack.
1614
1615 2008-11-25 Akim Demaille <demaille@gostai.com>
1616
1617 Formatting changes.
1618
1619 2008-11-25 Akim Demaille <demaille@gostai.com>
1620
1621 Get rid of yyrhs and yyprhs in yacc.c.
1622 They were used to get the symbol types, given a rule number, when
1623 displaying the top of the stack before a reduction. But the
1624 symbol type is available from the state stack. This has two be
1625 benefits: two tables less in the parser (making it smaller), and a
1626 more consistent use of the three stacks which will help to fuse
1627 them.
1628
1629 * data/yacc.c (yyprhs, yyrhs): Remove.
1630 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1631 (yy_reduce_print): Take yyssp as argument.
1632 Use it, together with yystos, to get the symbol type.
1633 * tests/regression.at (Web2c Report): Remove these tables from the
1634 expected output.
1635
1636 2008-11-25 Akim Demaille <demaille@gostai.com>
1637
1638 b4_tables_map.
1639 The point is to factor the generation of the tables across skeletons.
1640 This is language dependant.
1641
1642 * data/c.m4 (b4_comment_): New.
1643 Should be usable to define how to generate tables independently of
1644 the language.
1645 (b4_c_comment): New.
1646 (b4_comment): Bounce to b4_c_comment.
1647 Now support $2 = [PREFIX] for indentation.
1648 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1649 there is no comment.
1650 Indent it properly when there is one.
1651 Output the ending semicolon.
1652 (b4_table_define): Space changes.
1653 Output the ending semicolon.
1654 (b4_tables_map): New.
1655 Use it twice instead of declaring and defining the (integral)
1656 tables by hand.
1657
1658 2008-11-25 Akim Demaille <demaille@gostai.com>
1659
1660 b4_table_declare.
1661 * data/lalr1.cc (b4_table_declare): New.
1662 Use it to declare the tables defined with b4_table_define.
1663 (b4_table_define): Declare a third arg to match b4_table_declare
1664 signature.
1665 Move all the comments around invocations of b4_table_define into
1666 the invocations itselves.
1667 Move things around to have the order for declarations and
1668 definitions.
1669
1670 2008-11-25 Akim Demaille <demaille@gostai.com>
1671
1672 Formatting changes.
1673 * data/lalr1.java: here.
1674
1675 2008-11-25 Akim Demaille <demaille@gostai.com>
1676
1677 b4_args is more general than only C++.
1678 * data/lalr1.cc (b4_args, _b4_args): Move to...
1679 * data/bison.m4: here.
1680
1681 2008-11-21 Di-an Jan <dianj@freeshell.org>
1682
1683 Implement no-XXX arguments for --warnings, --report, --trace.
1684 * src/getargs.c (flags_argmatch): Handles no-XXX.
1685 Fix typo in doxygen comment.
1686
1687 2008-11-21 Akim Demaille <demaille@gostai.com>
1688
1689 Display the changes in cross-options.texi.
1690 * build-aux/cross-options.pl ($sep): New, to separate items.
1691 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1692 changes.
1693
1694 2008-11-20 Di-an Jan <dianj@freeshell.org>
1695
1696 Improves options in the manual.
1697 * doc/bison.texinfo (-g, -x): Add space before argument.
1698 (Option Cross Key): Implement FIXME: listing directives also.
1699 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1700 (Short Option): Special case -d. Put arguments inside @option.
1701 (Bison Directive): Add column, automatically extracted from
1702 src/scan-gram.l (actual name passed as the first argument)
1703 with special case for %define.
1704 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1705 to build-aux/cross-options.pl.
1706 * src/getargs.c (usage): Document limitations of cross-options.pl.
1707 * src/scan-gram.l: Likewise.
1708
1709 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1710
1711 Fix unexpanded macros in GLR defines file.
1712 Reported by Csaba Raduly at
1713 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1714 * THANKS (Csaba Raduly): Add.
1715 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1716 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1717 lexer in a separate module that includes the defines file.
1718 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1719 source.
1720 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1721 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1722 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1723 (AT_DATA_SOURCE_PROLOGUE): New.
1724 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1725 (AT_DATA_SOURCE): New.
1726 (AT_FULL_COMPILE): Extend to support an additional source file.
1727
1728 2008-11-18 Akim Demaille <demaille@gostai.com>
1729
1730 More TODO.
1731 * TODO: More short term issues.
1732
1733 2008-11-18 Akim Demaille <demaille@gostai.com>
1734
1735 Regen.
1736 * src/parse-gram.h, src/parse-gram.c: Regen.
1737
1738 2008-11-18 Akim Demaille <demaille@gostai.com>
1739
1740 Use b4_subtract where possible.
1741 * data/lalr1.cc (b4_subtract): Move to...
1742 * data/bison.m4: here.
1743 * data/glr.c (b4_rhs_data): Use it.
1744 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1745
1746 2008-11-18 Akim Demaille <demaille@gostai.com>
1747
1748 Remove incorrect mode specification.
1749 * data/glr.cc: Don't pretend it's C code.
1750
1751 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1752
1753 Simplify last patch slightly.
1754 * src/getargs.c (getargs): Here.
1755
1756 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1757
1758 Fix last warning from --enable-gcc-warnings.
1759 * src/getargs.c (getargs): Don't assign const address to non-const
1760 pointer.
1761
1762 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1763
1764 Don't let maintainer-*-check targets force a version update.
1765 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1766 handled.
1767
1768 2008-11-17 Di-an Jan <dianj@freeshell.org>
1769
1770 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1771 Align menus. Adjust word wrapping. Use node names for menu names.
1772 (Examples): Don't abbreviate node names.
1773 (LocalWords): Remove abbreviations.
1774 (Copying): Make description a sentence.
1775 (Java Action Features): Remove period to match the rest of menu.
1776
1777 2008-11-17 Di-an Jan <dianj@freeshell.org>
1778
1779 Handles several --enable-gcc-warnings.
1780 * src/getargs.c (command_line_location): Set parameters to void.
1781 * src/output.c (symbol_type_name_cmp): Make static.
1782 (symbols_by_type_name): Set parameters to void.
1783 (symbol_definitions_output): Remove unused parameter. Rename as...
1784 (prepare_symbol_definitions): this.
1785 (muscles_output): Move symbol_definitions_output to...
1786 (output): here as prepare_symbol_definitions.
1787 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1788 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1789
1790 2008-11-17 Di-an Jan <dianj@freeshell.org>
1791
1792 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1793 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1794
1795 2008-11-16 Akim Demaille <demaille@gostai.com>
1796
1797 Add missing $(EXEEXT).
1798 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1799 "src/bison$(EXEEXT)".
1800 Reported by Di-an Jan.
1801
1802 2008-11-15 Akim Demaille <demaille@gostai.com>
1803
1804 * TODO: Update.
1805
1806 2008-11-15 Akim Demaille <demaille@gostai.com>
1807
1808 Formatting changes.
1809 * tests/input.at: here.
1810
1811 2008-11-15 Akim Demaille <demaille@gostai.com>
1812
1813 Remove duplicate header inclusion.
1814 * src/LR0.c: here.
1815
1816 2008-11-15 Akim Demaille <demaille@gostai.com>
1817
1818 * src/parse-gram.h, src/parse-gram.c: Regen.
1819
1820 2008-11-15 Akim Demaille <demaille@gostai.com>
1821
1822 Support parametric types.
1823
1824 There are two issues to handle: first scanning nested angle
1825 bracket pairs to support types such as std::pair< std::string,
1826 std::list<std::string> > >.
1827
1828 Another issue is to address idiosyncracies of C++: do not glue two
1829 closing angle brackets together (otherwise it's operator>>), and
1830 avoid sticking blindly a TYPE to the opening <, as it can result
1831 in '<:' which is a digraph for '['.
1832
1833 * src/scan-gram.l (brace_level): Rename as...
1834 (nesting): this.
1835 (SC_TAG): New.
1836 Implement support for complex tags.
1837 (tag): Accept
1838 , but not <.
1839 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1840 (b4_symbol_variant): Leave space around types as parameters.
1841 * examples/variant.yy: Use nested template types and leading ::.
1842 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1843 Rename as...
1844 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1845 * tests/c++.at: Test parametric types.
1846
1847 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1848
1849 Test token.prefix.
1850 This is not sufficient, but we test at least that the make_SYMBOL
1851 interface is not affected by token.prefix. A more general test
1852 will be implemented when the support of token.prefix is generalized
1853 to more skeletons.
1854
1855 * tests/c++.at: One more variant test, using token.prefix.
1856
1857 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1858
1859 Test the make_TOKEN interface.
1860 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1861 Factor the common code in yylex.
1862 Use it to test "%define lex_symbol".
1863
1864 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1865
1866 Formatting change.
1867
1868 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1869
1870 Simplify code for variants bench marks.
1871 * etc/bench.pl.in (&generate_grammar_list): Define and use
1872 location_type.
1873 Factor the common code in yylex.
1874
1875 2008-11-15 Akim Demaille <demaille@gostai.com>
1876
1877 Better error message.
1878 * bootstrap (find_tool): Fix the error message.
1879
1880 2008-11-15 Akim Demaille <demaille@gostai.com>
1881
1882 Update variant.yy to newest interface.
1883 * examples/variant.yy: Define lex_symbol.
1884 Adjust.
1885
1886 2008-11-15 Akim Demaille <demaille@gostai.com>
1887
1888 Don't use locations in variant.yy.
1889 * examples/variant.yy: Adjust to not using locations.
1890
1891 2008-11-15 Akim Demaille <demaille@gostai.com>
1892
1893 Comment changes.
1894 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1895 comments for the license.
1896
1897 2008-11-15 Akim Demaille <demaille@gostai.com>
1898
1899 Remove tests/Makefile.am.
1900 * tests/Makefile.am: Rename as...
1901 * tests/local.mk: this.
1902 * Makefile.am, configure.ac: Adjust.
1903 * Makefile.am (DISTCLEANFILES): Define.
1904 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1905 Remove, we no longer need to bounce to the real targets.
1906
1907 2008-11-15 Akim Demaille <demaille@gostai.com>
1908
1909 Comment changes.
1910
1911 2008-11-15 Akim Demaille <demaille@gostai.com>
1912
1913 djgpp/local.mk.
1914 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1915 * djgpp/local.mk: this new file.
1916
1917 2008-11-15 Akim Demaille <demaille@gostai.com>
1918
1919 Remove doc/Makefile.am.
1920 * doc/Makefile.am: Rename as...
1921 * doc/local.mk: this.
1922 Adjust paths
1923 * Makefile.am, configure.ac: Adjust.
1924 * Makefile.am (MOSTLYCLEANFILES): New.
1925 * src/local.mk: Adjust.
1926
1927 2008-11-15 Akim Demaille <demaille@gostai.com>
1928
1929 Move sc_tight_scope into maint.mk.
1930 It does not work, and I don't know how it was supposed to work: it
1931 seems to be looking for sources in the build tree. I just moved
1932 it at a better place, fixing it is still required.
1933
1934 * src/local.mk (echo): Remove.
1935 (sc_tight_scope): Move to...
1936 * maint.mk: here.
1937
1938 2008-11-15 Akim Demaille <demaille@gostai.com>
1939
1940 Regen.
1941 * src/parse-gram.h, src/parse-gram.h: Regen.
1942
1943 2008-11-15 Akim Demaille <demaille@gostai.com>
1944
1945 Remove src/Makefile.am.
1946 * src/Makefile.am: Rename as...
1947 * src/local.mk: this.
1948 Prefix all the paths with src/.
1949 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1950 (AM_CPPFLAGS): Find find in builddir/src.
1951 (YACC): Move the flags into...
1952 (AM_YFLAGS): here.
1953 * maint.mk (sc_tight_scope): Disable.
1954 It used to bounce to the version in src/Makefile.am which is now
1955 part of this very Makefile.
1956 * Makefile.am, configure.ac: Adjust.
1957 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1958 include "..." to find files "here": we are no longer in src/, so
1959 qualify the includes with src/.
1960 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1961 prefix.
1962 (.x.1): Adjust to be able to create src/foo from the top level
1963 Makefile, instead of going bounce to src/Makefile the creation of
1964 foo.
1965
1966 2008-11-15 Akim Demaille <demaille@gostai.com>
1967
1968 Remove useless variable.
1969 * doc/Makefile.am (srcsrcdir): Remove.
1970
1971 2008-11-15 Akim Demaille <demaille@gostai.com>
1972
1973 Remove data/Makefile.am.
1974 * data/Makefile.am: Rename as...
1975 * data/local.mk: this.
1976 Adjust paths.
1977 * Makefile.am, configure.ac: Adjust.
1978
1979 2008-11-15 Akim Demaille <demaille@gostai.com>
1980
1981 Remove etc/Makefile.am.
1982 * etc/Makefile.am: Rename as...
1983 * etc/local.mk: this.
1984 Adjust.
1985 * Makefile.am, configure.ac: Adjust.
1986
1987 2008-11-15 Akim Demaille <demaille@gostai.com>
1988
1989 Remove examples/local.mk.
1990 examples/calc++/Makefile.am might be interesting to keep as is, since
1991 it is an example in itself.
1992
1993 * examples/Makefile.am: Rename as...
1994 * examples/local.mk: this.
1995 Adjust.
1996 * Makefile.am, configure.ac: Adjust.
1997
1998 2008-11-15 Akim Demaille <demaille@gostai.com>
1999
2000 Remove build-aux/Makefile.am.
2001 Recursive Makefiles are really way too slow, let's get rid of some of
2002 them.
2003
2004 * build-aux/Makefile.am: Rename as...
2005 * build-aux/local.mk: this.
2006 Adjust paths.
2007 * Makefile.am, configure.ac: Adjust.
2008
2009 2008-11-15 Akim Demaille <demaille@gostai.com>
2010
2011 Provide convenience constructors for locations and positions.
2012 * data/location.cc (position::position): Accept file, line and
2013 column as arguments with default values.
2014 Always qualify initial line and column literals as unsigned.
2015 (location::location): Provide convenience constructors.
2016
2017 2008-11-15 Akim Demaille <demaille@gostai.com>
2018
2019 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2020 token type.
2021 Using template buys us nothing, and makes it uselessly complex to
2022 construct a symbol. Besides, it could not be generalized to other
2023 languages, while make_FOO would work in C/Java etc.
2024
2025 * data/lalr1.cc (b4_symbol_): New.
2026 (b4_symbol): Use it.
2027 (b4_symbol_constructor_declaration_)
2028 (b4_symbol_constructor_definition_): Instead of generating
2029 specializations of an overloaded template function, just generate
2030 several functions whose names are forged from the token names
2031 without the token.prefix.
2032 (b4_symbol_constructor_declarations): Generate them for all the
2033 symbols, not just by class of symbol type, now that instead of
2034 specializing a function template by the token, we generate a
2035 function named after the token.
2036 (b4_symbol_constructor_specialization_)
2037 (b4_symbol_constructor_specializations): Remove.
2038 * etc/bench.pl.in: Adjust to this new API.
2039
2040 2008-11-13 Akim Demaille <demaille@gostai.com>
2041
2042 %define token.prefix.
2043 Provide a means to add a prefix to the name of the tokens as
2044 output in the generated files. Because of name clashes, it is
2045 good to have such a prefix such as TOK_ that protects from names
2046 such as EOF, FILE etc. But it clutters the grammar itself.
2047
2048 * data/bison.m4 (token.prefix): Empty by default.
2049 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2050 * data/lalr1.cc (b4_symbol): Ditto.
2051
2052 2008-11-13 Akim Demaille <demaille@gostai.com>
2053
2054 Compute at M4 time some of the subtractions.
2055 * data/lalr1.cc (b4_subtract): New.
2056 (b4_rhs_data): Use it.
2057
2058 2008-11-13 Akim Demaille <demaille@gostai.com>
2059
2060 symbol::token.
2061 This allows the user to get the type of a token returned by yylex.
2062
2063 * data/lalr1.cc (symbol::token): New.
2064 (yytoknum_): Define when %define lex_symbol, independently of
2065 %debug.
2066 (yytoken_number_): Move into...
2067 (symbol::token): here, since that's the only use.
2068 The other one is YYPRINT which was not officially supported
2069 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2070 array under a different name (yytoknum).
2071
2072 2008-11-13 Akim Demaille <demaille@gostai.com>
2073
2074 YYERRCODE.
2075 * TODO (YYERRCODE): Mention the case of $undef.
2076
2077 2008-11-13 Akim Demaille <demaille@gostai.com>
2078
2079 TODO: YYPRINT.
2080 * TODO (YYPRINT): New.
2081
2082 2008-11-13 Akim Demaille <demaille@gostai.com>
2083
2084 Comment changes.
2085 * data/lalr1.cc, data/yacc.c: Fix the description of the
2086 yytranslate and yytoknum tables.
2087
2088 2008-11-13 Akim Demaille <demaille@gostai.com>
2089
2090 Define make_symbol in the header.
2091 To reach good performances these functions should be inlined (yet
2092 this is to measure precisely). To this end they must be available
2093 to the caller.
2094
2095 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2096 location_type with the class name.
2097 Since will now be output in the header, declare "inline".
2098 No longer use b4_symbol_constructor_specializations, but
2099 b4_symbol_constructor_definitions in the header.
2100 Don't call it in the *.cc file.
2101
2102 2008-11-13 Akim Demaille <demaille@gostai.com>
2103
2104 Define yytranslate in the header for lex_symbol.
2105 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2106 into the header file when using %define lex_symbol.
2107 (yytranslate_): Declare inline.
2108
2109 2008-11-13 Akim Demaille <demaille@gostai.com>
2110
2111 Define the constructors of symbol_type in
2112 b4_symbol_constructor_definitions.
2113 The constructors are called by the make_symbol functions, which a
2114 forthcoming patch will move elsewhere. Hence the interest of
2115 putting them together.
2116
2117 The stack_symbol_type does not need to be moved, it is used only
2118 by the parser.
2119
2120 * data/lalr1.cc: Move symbol_type and symbol_base_type
2121 constructors into...
2122 (b4_symbol_constructor_definitions): here.
2123 Adjust.
2124
2125 2008-11-13 Akim Demaille <demaille@gostai.com>
2126
2127 Make it easier to move the definition of yytranslate_.
2128 Forthcoming changes will make it possible to use yytranslate_
2129 from outside the parser implementation file.
2130
2131 * data/lalr1.cc (b4_yytranslate_definition): New.
2132 Use it.
2133
2134 2008-11-13 Akim Demaille <demaille@gostai.com>
2135
2136 Remove useless class specification.
2137 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2138 to refer to the class name to use a type defined by the class for
2139 arguments of member functions.
2140
2141 2008-11-13 Akim Demaille <demaille@gostai.com>
2142
2143 Finer input type for yytranslate.
2144 This patch is debatable: the tradition expects yylex to return an int
2145 which happens to correspond to token_number (which is an enum). This
2146 allows for instance to return characters (such as '*' etc.). But this
2147 goes against the stronger typing I am trying to have with the new
2148 lex interface which return a symbol_type. So in this case, feed
2149 yytranslate_ with a token_type.
2150
2151 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2152 expect a token_type.
2153
2154 2008-11-13 Akim Demaille <demaille@gostai.com>
2155
2156 Honor lex-params in %define lex_symbol mode.
2157 * data/lalr1.cc: Use b4_lex_param.
2158
2159 2008-11-13 Akim Demaille <demaille@gostai.com>
2160
2161 Simplify names.
2162 * src/output.c (symbol_definitions_output): Rename symbol
2163 attributes type_name and has_type_name as type and has_type.
2164 * data/lalr1.cc: Adjust uses.
2165
2166 2008-11-13 Akim Demaille <demaille@gostai.com>
2167
2168 Use b4_type_names for the union type.
2169 The union used to compute the size of the variant used to iterate
2170 over the type of all the symbols, with a lot of redundancy. Now
2171 iterate over the lists of symbols having the same type-name.
2172
2173 * data/lalr1.cc (b4_char_sizeof_): New.
2174 (b4_char_sizeof): Use it.
2175 Adjust to be called with a list of numbers instead of a single
2176 number.
2177 Adjust its caller for new-line issues.
2178
2179 2008-11-13 Akim Demaille <demaille@gostai.com>
2180
2181 Define the "identifier" of a symbol.
2182 Symbols may have several string representations, for instance if
2183 they have an alias. What I call its "id" is a string that can be
2184 used as an identifier. May not exist.
2185
2186 Currently the symbols which have the "tag_is_id" flag set are
2187 those that don't have an alias. Look harder for the id.
2188
2189 * src/output.c (is_identifier): Move to...
2190 * src/symtab.c (is_identifier): here.
2191 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2192 * src/output.c (symbol_definitions_output): Use it to define "id"
2193 and "has_id".
2194 Remove the definition of "tag_is_id".
2195 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2196 "tag_is_id" were used to produce code.
2197 We still use "tag" for documentation.
2198
2199 2008-11-11 Akim Demaille <demaille@gostai.com>
2200
2201 Locations are no longer required by lalr1.cc.
2202 * data/lalr1.cc (_b4_args, b4_args): New.
2203 Adjust all uses of locations to make them optional.
2204 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2205 (AT_CHECK_NAMESPACE): Check the use of locations.
2206 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2207 without locations with lalr1.cc.
2208 Test these cases.
2209 * tests/output.at: Check lalr1.cc with and without location
2210 support.
2211 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2212 Don't use locations.
2213
2214 2008-11-11 Akim Demaille <demaille@gostai.com>
2215
2216 AT_FULL_COMPILE.
2217 * tests/local.at (AT_FULL_COMPILE): New.
2218 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2219
2220 2008-11-11 Akim Demaille <demaille@gostai.com>
2221
2222 Support parens in calc++.
2223 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2224 * examples/calc++/test (run): Check the expected output.
2225 Adjust callers.
2226 Check parens too.
2227
2228 2008-11-11 Akim Demaille <demaille@gostai.com>
2229
2230 Simplify lalr1.cc since %defines is mandatory.
2231 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2232
2233 2008-11-11 Akim Demaille <demaille@gostai.com>
2234
2235 TODO: yyfmt.
2236 * TODO (yysyntax_error): New item.
2237
2238 2008-11-11 Akim Demaille <demaille@gostai.com>
2239
2240 Prefer M4 to CPP.
2241 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2242 YYERROR_VERBOSE.
2243
2244 2008-11-11 Akim Demaille <demaille@gostai.com>
2245
2246 Support i18n of the parse error messages.
2247 * TODO (lalr1.cc/I18n): Remove.
2248 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2249 error messages, as done in yacc.c.
2250 Stay within the yy* pseudo namespace.
2251
2252 2008-11-11 Akim Demaille <demaille@gostai.com>
2253
2254 More TODO.
2255 * TODO (single stack, yysyntax_error): New.
2256
2257 2008-11-11 Akim Demaille <demaille@gostai.com>
2258
2259 Make it possible to return a symbol_type from yylex.
2260 * data/lalr1.cc (b4_lex_symbol_if): New.
2261 (parse): When lex_symbol is defined, expected yylex to return the
2262 complete lookahead.
2263 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2264 yylex interface.
2265 (bench_variant_parser): Exercise it.
2266
2267 2008-11-11 Akim Demaille <demaille@gostai.com>
2268
2269 Remove useless bench case.
2270 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2271 no longer used.
2272
2273 2008-11-11 Akim Demaille <demaille@gostai.com>
2274
2275 Improve display of directives.
2276 * etc/bench.pl.in (parse_term): Don't add useless eol.
2277
2278 2008-11-11 Akim Demaille <demaille@gostai.com>
2279
2280 Use string_cast in the bench.
2281 * etc/bench.pl.in (generate_grammar_list): Define and use
2282 string_cast.
2283
2284 2008-11-11 Akim Demaille <demaille@gostai.com>
2285
2286 Replace yychar with a Boolean.
2287 * data/lalr1.cc (parse::yychar): Replace by...
2288 (parse::yyempty): this.
2289
2290 2008-11-11 Akim Demaille <demaille@gostai.com>
2291
2292 Factor the tables.
2293 * TODO: New item.
2294
2295 2008-11-11 Akim Demaille <demaille@gostai.com>
2296
2297 Let yytranslate handle the eof case.
2298 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2299 Adjust callers.
2300 No longer expect yychar to be equal to yyeof_, rather, test the
2301 lookahead's (translated) kind.
2302
2303 2008-11-11 Akim Demaille <demaille@gostai.com>
2304
2305 yychar cannot be empty in yyerrlab.
2306 * TODO (yychar == yyempty_): New.
2307 * data/lalr1.cc: Remove the handling of this case.
2308 This eases forthcoming changes related to yychar and yytranslate.
2309
2310 2008-11-11 Akim Demaille <demaille@gostai.com>
2311
2312 Bench: syntactic sugar for %define/#define.
2313 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2314 (&bench_push_parser, bench_variant_parser): Use this feature.
2315 (&eat): New.
2316 Use it.
2317
2318 2008-11-11 Akim Demaille <demaille@gostai.com>
2319
2320 Less memory pressure on the "list" bench.
2321 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2322 the values, to limit memory pressure.
2323
2324 2008-11-11 Akim Demaille <demaille@gostai.com>
2325
2326 Introduce make_symbol.
2327 make_symbol provides a means to construct a full symbol (kind,
2328 value, location) in a single shot. It is meant to be a Symbol
2329 constructor, parameterized by the symbol kind so that overloading
2330 would prevent incorrect kind/value pairs. Unfortunately
2331 parameterized constructors do not work well in C++ (unless the
2332 parameter also appears as an argument, which is not acceptable),
2333 hence the use of a function instead of a constructor.
2334
2335 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2336 (b4_symbol_constructor_declarations)
2337 (b4_symbol_constructor_specialization_)
2338 (b4_symbol_constructor_specializations)
2339 (b4_symbol_constructor_definition_)
2340 (b4_symbol_constructor_definitions): New.
2341 Use them where appropriate to generate declaration, declaration of
2342 the specializations, and implementations of the templated
2343 overloaded function "make_symbol".
2344 (variant::variant): Always define a default ctor.
2345 Also provide a copy ctor.
2346 (symbol_base_type, symbol_type): New ctor overloads for value-less
2347 symbols.
2348 (symbol_type): Now public, so that functions such as yylex can use
2349 it.
2350
2351 2008-11-11 Akim Demaille <demaille@gostai.com>
2352
2353 Inform m4 whether a tag is a valid id.
2354 * src/output.c (is_identifier): New.
2355 (symbol_definitions_output): Use it to define tag_is_id.
2356 But maybe this should be done at m4 level?
2357
2358 2008-11-11 Akim Demaille <demaille@gostai.com>
2359
2360 Test 214 was failing: it greps with a pattern containing [ ]*
2361 which obviously meant to catch spaces and tabs, but contained only
2362 spaces. Tabulations in sources are a nuisance, so to simplify the
2363 matter, get rid of all the tabulations in the Java sources. The
2364 other skeletons will be treated equally later.
2365
2366 * data/java.m4, data/lalr1.java: Untabify.
2367 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2368 tabulations are no longer generated.
2369
2370 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2371
2372 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2373 * configure.ac: Adjust usage.
2374 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2375 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2376 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2377
2378 2008-11-10 Di-an Jan <dianj@freeshell.org>
2379
2380 Workaround Java's ``code too large'' problem for parser tables
2381 in most cases, by using one function per initialization.
2382 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2383 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2384 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2385 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2386 (yytname_): Use b4_typed_parser_table.
2387 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2388 ``code too large'' error.
2389
2390 2008-11-10 Di-an Jan <dianj@freeshell.org>
2391
2392 * NEWS: Document them.
2393
2394 General Java skeleton improvements.
2395 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2396 using gcj < 4.3 in the testsuite, according to comments in
2397 gnulib/m4/javacomp.m4.
2398 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2399 location_type, position_type): Remove extraneous brackets from
2400 b4_percent_define_default.
2401 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2402 m4_define and m4_define_default.
2403 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2404 which marks the end of user code with appropriate syncline, like all
2405 the other skeletons.
2406 (b4_user_post_prologue): Add. Don't silently drop.
2407 (yylex): Remove.
2408 (parse): Inline yylex.
2409 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2410 (%{...%}): Fix typo of %code imports.
2411 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2412
2413 Support annotations on parser class with %define annotations.
2414 * data/lalr1.java (annotations): Add to parser class modifier.
2415 * doc/bison.texinfo (Java Parser Interface): Document
2416 %define annotations.
2417 (Java Declarations Summary): Document %define annotations.
2418 * tests/java.at (Java parser class modifiers): Test annotations.
2419
2420 Do not generate code for %error-verbose unless requested.
2421 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2422 Make private. Make conditional on %error-verbose.
2423 (getErrorVerbose, setErrorVerbose): New.
2424 (yytnamerr_): Make conditional on %error-verbose.
2425 (yysyntax_error): Make some code conditional on %error-verbose.
2426 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2427 about %error-verbose having no effect.
2428 (getErrorVerbose, setErrorVerbose): Document.
2429
2430 Move constants for token names to Lexer interface.
2431 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2432 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2433 (parse): Qualify EOF to Lexer.EOF.
2434 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2435 EOF and token names to Java Lexer Interface.
2436 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2437
2438 Make yyerror public.
2439 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2440 (yyerror): Change to public. Add Javadoc comments. Use longer
2441 parameter names. Make the body rather than the declarator
2442 conditional on %locations.
2443 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2444
2445 Allow user to add code to the constructor with %code init.
2446 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2447 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2448 Add %code init to the front of the constructor body.
2449 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2450 and %define init_throws.
2451 (Java Declarations Summary): Document %code init and
2452 %define init_throws.
2453 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2454 (Java constructor init and init_throws): Add tests.
2455
2456 2008-11-10 Akim Demaille <demaille@gostai.com>
2457
2458 Update TODO.
2459 * TODO (-D): is implemented.
2460 (associativity): Same precedence must have the same associativity.
2461 For instance, how can a * b / c be parsed if * is %left and / is
2462 %right?
2463 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2464
2465 2008-11-10 Akim Demaille <demaille@gostai.com>
2466
2467 Formatting changes.
2468
2469 2008-11-10 Akim Demaille <demaille@gostai.com>
2470
2471 More information about the symbols.
2472 * src/output.c (type_names_output): Document all the symbols,
2473 including those that don't have a type-name.
2474 (symbol_definitions_output): Define "is_token" and
2475 "has_type_name".
2476 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2477 type-name, now that they are defined too in b4_type_names.
2478
2479 2008-11-10 Akim Demaille <demaille@gostai.com>
2480
2481 Regen.
2482
2483 2008-11-10 Akim Demaille <demaille@gostai.com>
2484
2485 Make parser::yytranslate static.
2486 Small speedup (1%) on the list grammar. And makes yytranslate_
2487 available in non member functions.
2488
2489 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2490 function.
2491
2492 2008-11-10 Akim Demaille <demaille@gostai.com>
2493
2494 Avoid trailing spaces.
2495 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2496 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2497 they can be empty, and anyway this incorrectly indents the first
2498 action.
2499
2500 2008-11-10 Akim Demaille <demaille@gostai.com>
2501
2502 Comment changes.
2503
2504 2008-11-10 Akim Demaille <demaille@gostai.com>
2505
2506 Use "enum" for integral constants.
2507 This is just nicer to read, I observed no speedup.
2508
2509 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2510 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2511 (yyuser_token_number_max_, yyundef_token_): Move into...
2512 (yytranslate_): here.
2513
2514 2008-11-10 Akim Demaille <demaille@gostai.com>
2515
2516 Shortcuts in bench directives.
2517 * etc/bench.pl.in (parse_dirs): New.
2518 Use it.
2519 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2520 Create the benches in "benches/".
2521
2522 2008-11-10 Akim Demaille <demaille@gostai.com>
2523
2524 Formatting changes.
2525 * data/lalr1.cc: here.
2526
2527 2008-11-10 Akim Demaille <demaille@gostai.com>
2528
2529 Adjust verbose message to using emacs.
2530 * etc/bench.pl.in: Inform compilation-mode when we change the
2531 directory.
2532 (generate_grammar_list): Recognize %define "variant" in addition
2533 to %define variant.
2534
2535 2008-11-10 Akim Demaille <demaille@gostai.com>
2536
2537 Classify symbols by type-name.
2538 * src/uniqstr.h (UNIQSTR_CMP): New.
2539 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2540 (type_names_output): New.
2541 (muscles_output): Use it.
2542 * data/lalr1.cc (b4_symbol_action_): Remove.
2543 (b4_symbol_case_, b4_type_action_): New.
2544 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2545
2546 2008-11-10 Akim Demaille <demaille@gostai.com>
2547
2548 Change the handling of the symbols in the skeletons.
2549 Before we were using tables which lines were the symbols and which
2550 columns were things like number, tag, type-name etc. It is was
2551 difficult to extend: each time a column was added, all the numbers had
2552 to be updated (you asked for colon $2, not for "tag"). Also, it was
2553 hard to filter these tables when only a subset of the symbols (say the
2554 tokens, or the nterms, or the tokens that have and external number
2555 *and* a type-name) was of interest.
2556
2557 Now instead of monolithic tables, we define one macro per cell. For
2558 instance "b4_symbol(0, tag)" is a macro name which contents is
2559 self-decriptive. The macro "b4_symbol" provides easier access to
2560 these cells.
2561
2562 * src/output.c (type_names_output): Remove.
2563 (symbol_numbers_output, symbol_definitions_output): New.
2564 (muscles_output): Call them.
2565 (prepare_symbols): Define b4_symbols_number.
2566
2567 2008-11-10 Akim Demaille <demaille@gostai.com>
2568
2569 --trace=muscles
2570 * src/getargs.h, src/getargs.c (trace_muscle): New.
2571 (trace_types, trace_args): Support it.
2572 * src/output.c (output_skeleton): Use it.
2573
2574 2008-11-10 Akim Demaille <demaille@gostai.com>
2575
2576 muscles_output.
2577 * src/output.c (muscles_output): New, extracted from...
2578 (output_skeleton): here.
2579 Adjust.
2580
2581 2008-11-10 Akim Demaille <demaille@gostai.com>
2582
2583 Formatting changes.
2584
2585 2008-11-10 Akim Demaille <demaille@gostai.com>
2586
2587 Update the variant example.
2588 * examples/variant.yy: Formatting changes.
2589 One stage build.
2590
2591 2008-11-10 Akim Demaille <demaille@gostai.com>
2592
2593 Support constructor with an argument.
2594 This improves the "list" bench by 2%.
2595
2596 * data/lalr1.cc (variant::build): Add an overloaded version with
2597 an argument.
2598 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2599
2600 2008-11-10 Akim Demaille <demaille@gostai.com>
2601
2602 Test variants.
2603 * tests/c++.at (AT_CHECK_VARIANTS): New.
2604 Use it with and without %define assert.
2605
2606 2008-11-10 Akim Demaille <demaille@gostai.com>
2607
2608 Add %precedence support.
2609 Unfortunately it is not possible to reuse the %prec directive. This
2610 is because to please POSIX, we do not require to end the rules with a
2611 semicolon. As a result,
2612
2613 foo: bar %prec baz
2614
2615 is ambiguous: either a rule which precedence is that of baz, or a rule,
2616 and then a declaration of the precedence of the token baz.
2617
2618 * doc/bison.texinfo: Document %precedence.
2619 (Precedence Only): New.
2620 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2621 * src/conflicts.c (resolve_sr_conflict): Support it.
2622 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2623 Parse it.
2624 * tests/calc.at: Use %precedence for NEG.
2625 * tests/conflicts.at (%precedence does not suffice)
2626 (%precedence suffices): New tests.
2627
2628 2008-11-09 Akim Demaille <demaille@gostai.com>
2629
2630 Make benches in a sub dirs.
2631 * etc/bench.pl.in ($dir): New.
2632 Use it.
2633 Check the use of constructors with an argument.
2634 (bench_variant_parser): Fix.
2635
2636 2008-11-09 Akim Demaille <demaille@gostai.com>
2637
2638 fix eof condition
2639
2640 2008-11-09 Akim Demaille <demaille@gostai.com>
2641
2642 Fix --help.
2643
2644 2008-11-09 Akim Demaille <demaille@gostai.com>
2645
2646 Require the generation of parse-gram.output.
2647 * src/Makefile.am (YACC): Pass --report=all.
2648
2649 2008-11-09 Akim Demaille <demaille@gostai.com>
2650
2651 Formatting changes.
2652
2653 2008-11-09 Akim Demaille <demaille@gostai.com>
2654
2655 Update TODO.
2656 * TODO: Remove obsolete items.
2657 Update others.
2658
2659 2008-11-09 Akim Demaille <demaille@gostai.com>
2660
2661 Enhance bench.pl.
2662 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2663 (@token, $grammar, $bench): New.
2664 (generate_grammar_variant): Rename as...
2665 (generate_grammar_list): this.
2666 (generate_grammar): Adjust.
2667 (bench_grammar): Rename as...
2668 (bench): this.
2669 Use it in the various bench-marking routines.
2670 (-b, -g): New options.
2671
2672 2008-11-09 Akim Demaille <demaille@gostai.com>
2673
2674 Use a static hierarchy for symbols in the C++ parser.
2675 * data/lalr1.cc (symbol_base_type, symbol_type)
2676 (stack_symbol_type): Make it a static hierarchy.
2677 Adjust dependencies.
2678
2679 2008-11-09 Akim Demaille <demaille@gostai.com>
2680
2681 bench.pl -d, --directive.
2682 * etc/bench.pl.in (@directive): New.
2683 (&bench_grammar): Use it.
2684 (&bench_list_grammar): New, to provide access to the "variant"
2685 grammar.
2686 Use it.
2687 (getopts): Support -d, --directive.
2688
2689 2008-11-09 Akim Demaille <demaille@gostai.com>
2690
2691 Use inline for small operations.
2692 * data/lalr1.cc (symbol_base_type, symbol_type)
2693 (stack_symbol_type): Declare constructor and other operations as
2694 inline.
2695 (yy_destroy_): Inline.
2696
2697 2008-11-09 Akim Demaille <demaille@gostai.com>
2698
2699 Introduce a hierarchy for symbols.
2700 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2701 (data_type): Rename as...
2702 (stack_symbol_type): this.
2703 Derive from symbol_base_type.
2704 (yy_symbol_value_print_): Merge into...
2705 (yy_symbol_print_): this.
2706 Rename as...
2707 (yy_print_): this.
2708 (yydestruct_): Rename as...
2709 (yy_destroy_): this.
2710 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2711 (parser::parse): yyla is now of symbol_type.
2712 Use its type member instead of yytoken.
2713
2714 2008-11-09 Akim Demaille <demaille@gostai.com>
2715
2716 Rename data_type and stack_symbol_type.
2717 * data/lalr1.cc (data_type): Rename as...
2718 (stack_symbol_type): this.
2719
2720 2008-11-09 Akim Demaille <demaille@gostai.com>
2721
2722 Handle semantic value and location together.
2723 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2724 yydata.value and yydata.location.
2725 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2726 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2727 single arg.
2728 Adjust all callers.
2729 (yydestruct_): New overload for a stack symbol.
2730
2731 2008-11-09 Akim Demaille <demaille@gostai.com>
2732
2733 Push a complete symbol, not connected parts.
2734 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2735 state, value and location.
2736 Adjust callers.
2737
2738 2008-11-09 Akim Demaille <demaille@gostai.com>
2739
2740 Agregate yylval and yylloc.
2741 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2742 (parser::yyla): this.
2743
2744 2008-11-09 Akim Demaille <demaille@gostai.com>
2745
2746 Rely on the state stack to display reduction traces.
2747 To display rhs symbols before a reduction, we used information
2748 about the rule reduced, which required the tables yyrhs and
2749 yyprhs. Now use rely only on the state stack to get the same
2750 information.
2751
2752 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2753 Use them.
2754 (parser::yyrhs_, parser::yyprhs_): Remove.
2755 (parser::yy_reduce_print_): Use the state stack.
2756
2757 2008-11-09 Akim Demaille <demaille@gostai.com>
2758
2759 Fuse yyval and yyloc into yylhs.
2760 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2761 yylhs.
2762 (parse): Replace yyval and yyloc with yylhs.value and
2763 yylhs.location.
2764 After a user action, compute yylhs.state earlier.
2765 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2766 fresh error_token.
2767
2768 2008-11-09 Di-an Jan <dianj@freeshell.org>
2769
2770 Remove unused variable.
2771 * src/output.c (type_names_output): Remove unused variable sep.
2772
2773 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2774
2775 Change tests/output.at quoting.
2776 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2777 expanding arguments.
2778
2779 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2780
2781 Don't add a semicolon to actions for %skeleton or %language.
2782 It breaks Java test cases as reported by Akim Demaille.
2783 * src/scan-code.l: Implement.
2784
2785 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2786
2787 Clean up %skeleton and %language priority implementation.
2788 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2789 remove static qualifier because others will soon need to see it.
2790 (language_prio): Likewise.
2791 (getargs): Use command_line_prio rather than 0.
2792 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2793 enum fields.
2794 (skeleton_prio): Extern it.
2795 (language_prio): Extern it.
2796 * src/parse-gram.y: Use grammar_prio rather than 1.
2797
2798 2008-11-07 Akim Demaille <demaille@gostai.com>
2799
2800 Moving push traces into yypush_.
2801 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2802 Adjust all uses.
2803
2804 2008-11-07 Akim Demaille <demaille@gostai.com>
2805
2806 The single-stack C++ parser is now the standard one.
2807 * data/lalr1.cc: Rename as...
2808 * data/lalr1-split.cc: this.
2809 * data/lalr1-fusion.cc: Rename as...
2810 * data/lalr1.cc: this.
2811 * etc/bench.pl.in: Adjust.
2812
2813 2008-11-07 Akim Demaille <demaille@gostai.com>
2814
2815 Avoid empty-if warnings.
2816 Reported by Quentin Hocquet.
2817
2818 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2819 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2820
2821 2008-11-07 Akim Demaille <demaille@gostai.com>
2822
2823 Pass command line location to skeleton_arg and language_argmatch.
2824 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2825 The location argument is now mandatory.
2826 Adjust all dependencies.
2827 (getargs): Use command_line_location.
2828
2829 2008-11-07 Akim Demaille <demaille@gostai.com>
2830
2831 -D, --define.
2832 * src/getargs.c (usage): Document -D.
2833 Fix help string for --locations.
2834 (command_line_location): New.
2835 (short_options, long_options, getargs): Support -D, --define.
2836 (getargs): Move -d support at the right place.
2837 * doc/bison.texinfo (Bison Options): Update.
2838 * tests/input.at (%define, --define): New.
2839
2840 2008-11-07 Akim Demaille <demaille@gostai.com>
2841
2842 Initialize the muscle table before parsing the command line.
2843 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2844 (getargs): Define file_name.
2845 * src/main.c (main): Initialize muscle_tab before calling
2846 getargs.
2847 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2848 its value is not available yet.
2849
2850 2008-11-07 Akim Demaille <demaille@gostai.com>
2851
2852 Locations without columns for command line arguments.
2853 * src/location.c (location_print): Don't display negative columns.
2854 * src/location.h: Document this.
2855
2856 2008-11-07 Akim Demaille <demaille@gostai.com>
2857
2858 Fix --help.
2859 * src/getargs.c (usage): Fix help string for -W.
2860
2861 2008-11-07 Akim Demaille <demaille@gostai.com>
2862
2863 Handle more general types of option arguments.
2864 * build-aux/cross-options.pl: The argument ends at the first
2865 space, not the first non-symbol character.
2866 Use @var for each word appearing the argument description.
2867
2868 2008-11-07 Akim Demaille <demaille@gostai.com>
2869
2870 Destroy the variants that remain on the stack in case of error.
2871 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2872 destructor.
2873 Display the value only if yymsg is nonnull.
2874 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2875
2876 2008-11-07 Akim Demaille <demaille@gostai.com>
2877
2878 Add "%define assert" to variants.
2879 This is used to help the user catch cases where some value gets
2880 ovewritten by a new one. This should not happen, as this will
2881 probably leak.
2882
2883 Unfortunately this uncovered a bug in the C++ parser itself: the
2884 lookahead value was not destroyed between two calls to yylex. For
2885 instance if the previous lookahead was a std::string, and then an int,
2886 then the value of the std::string was correctly taken (i.e., the
2887 lookahead was now an empty string), but std::string structure itself
2888 was not reclaimed.
2889
2890 This is now done in variant::build(other&) (which is used to take the
2891 value of the lookahead): other is not only stolen from its value, it
2892 is also destroyed. This incurs a new performance penalty of a few
2893 percent, and union becomes faster again.
2894
2895 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2896 (b4_variant_if): New.
2897 (variant::built): New.
2898 Use it whereever the status of the variant changes.
2899 * etc/bench.pl.in: Check the penalty of %define assert.
2900
2901 2008-11-07 Akim Demaille <demaille@gostai.com>
2902
2903 Use "%define variant" in bench.pl.
2904 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2905 just use %define variants.
2906
2907 2008-11-07 Akim Demaille <demaille@gostai.com>
2908
2909 Regen.
2910 * src/parse-gram.h, src/parse-gram.c: Regen.
2911
2912 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2913
2914 Fix user actions without a trailing semicolon.
2915 Reported by Sergei Steshenko at
2916 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2917 * THANKS (Sergei Steshenko): Add.
2918 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2919 * tests/regression.at (Fix user actions without a trailing semicolon):
2920 New test case.
2921
2922 2008-11-04 Akim Demaille <demaille@gostai.com>
2923
2924 Use b4_copyright_years.
2925 * data/yacc.c (b4_copyright_years): New.
2926 Fix its value according to the comments in the file.
2927 Use it and undefine it.
2928
2929 2008-11-04 Akim Demaille <demaille@gostai.com>
2930
2931 Formatting changes.
2932 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2933
2934 2008-11-04 Akim Demaille <demaille@gostai.com>
2935
2936 Formatting changes.
2937 * data/lalr1-fusion.cc: here.
2938
2939 2008-11-04 Akim Demaille <demaille@gostai.com>
2940
2941 Use strict on bench.pl.
2942 * etc/bench.pl.in (&run, &generate_grammar): New.
2943 Rename the grammar generating functions for consistency.
2944 Change the interface so that the list of benches to run is passed
2945 as (optionless) arguments.
2946 (&compile): Use &run.
2947
2948 2008-11-04 Akim Demaille <demaille@gostai.com>
2949
2950 Remove spurious initial empty lines.
2951 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2952 * data/yacc.c: End the @output lines with an @.
2953
2954 2008-11-04 Akim Demaille <demaille@gostai.com>
2955
2956 Improve the display of sizes.
2957 * etc/bench.p.in: Higher precision.
2958 Sort by decreasing size.
2959
2960 2008-11-04 Akim Demaille <demaille@gostai.com>
2961
2962 Don't memcpy C++ structures.
2963 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2964 arguments.
2965 (variant::build): New overload for
2966 copy-construction-that-destroys.
2967 (variant::swap): New.
2968 (parser::yypush_): Use it in variant mode.
2969
2970 2008-11-04 Akim Demaille <demaille@gostai.com>
2971
2972 Better defaults for bench.pl.
2973 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2974 default values.
2975 Adjust &verbose uses.
2976 (-q, --quiet): New.
2977
2978 2008-11-04 Akim Demaille <demaille@gostai.com>
2979
2980 Make variant.yy more complex.
2981 std::list cannot be copied via memcpy, they are more demanding than
2982 std::string. Use one std::list to strengthen the test.
2983
2984 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2985 Adjust.
2986 Create a list of strings, instead of a single large string.
2987
2988 2008-11-04 Akim Demaille <demaille@gostai.com>
2989
2990 bench.pl --bench.
2991 * etc/bench.pl.in (--bench, $bench): New.
2992
2993 2008-11-04 Akim Demaille <demaille@gostai.com>
2994
2995 Sort methods.
2996 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2997 Define it after as().
2998
2999 2008-11-04 Akim Demaille <demaille@gostai.com>
3000
3001 Useless parens.
3002 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3003
3004 2008-11-04 Akim Demaille <demaille@gostai.com>
3005
3006 Issue missing synclines after user actions.
3007 * data/c.m4 (b4_case): Issue synclines on the output file.
3008
3009 2008-11-04 Akim Demaille <demaille@gostai.com>
3010
3011 Remove trailing empty line.
3012 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3013 epilogue.
3014
3015 2008-11-04 Akim Demaille <demaille@gostai.com>
3016
3017 Fix output of copyright years.
3018 * data/bison.m4 (b4_copyright): Fix the indentation of the
3019 copyright year paragraph.
3020 Use b4_copyright_years when no years are given.
3021 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3022 (b4_copyright_years): New.
3023 Use it.
3024
3025 2008-11-04 Akim Demaille <demaille@gostai.com>
3026
3027 Avoid the spurious initial empty line.
3028 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3029 the end of @output request to suppress the empty line that
3030 results.
3031
3032 2008-11-04 Akim Demaille <demaille@gostai.com>
3033
3034 Remove parser::rhs_number_type.
3035 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3036 (yyrhs_): Use b4_table_define.
3037
3038 2008-11-04 Akim Demaille <demaille@gostai.com>
3039
3040 Fix iteration type.
3041 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3042
3043 2008-11-04 Akim Demaille <demaille@gostai.com>
3044
3045 Factor the declaration of the integer tables.
3046 * data/lalr1-fusion.cc (b4_table_define): New.
3047 Use it.
3048
3049 2008-11-03 Akim Demaille <demaille@gostai.com>
3050
3051 Fix indentation of tables in lalr1.cc
3052 * data/lalr1-fusion.cc: Fix the indentation.
3053
3054 2008-11-03 Akim Demaille <demaille@gostai.com>
3055
3056 Destroy the lhs symbols after reduction.
3057 * data/lalr1-fusion.cc (parse): After the user action, when in
3058 variant mode, destroy the lhs symbols.
3059
3060 2008-11-03 Akim Demaille <demaille@gostai.com>
3061
3062 Simplify yysyntax_error_ use.
3063 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3064 type, but make it unnamed in the declaration when it is not used.
3065
3066 2008-11-03 Akim Demaille <demaille@gostai.com>
3067
3068 Let yy::variant::build return an lvalue.
3069 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3070 object.
3071
3072 2008-11-03 Akim Demaille <demaille@gostai.com>
3073
3074 Define yy::variant only when needed.
3075 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3076 used.
3077
3078 2008-11-03 Akim Demaille <demaille@gostai.com>
3079
3080 Bench the three-stack lalr1.cc.
3081 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3082 one-stack one.
3083
3084 2008-11-03 Akim Demaille <demaille@gostai.com>
3085
3086 Fail on parse error in calc++.
3087 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3088 status.
3089 * examples/calc++/test ($me, $number, $exit, run): New.
3090 Use them to propagate errors to the exit status.
3091
3092 2008-11-03 Akim Demaille <demaille@gostai.com>
3093
3094 Don't specify the skeleton twice in the example.
3095 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3096 file does what is needed.
3097
3098 2008-11-03 Akim Demaille <demaille@gostai.com>
3099
3100 bench: Improve output.
3101 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3102
3103 2008-11-03 Akim Demaille <demaille@gostai.com>
3104
3105 bench: check impact of %debug on variants.
3106 * etc/bench.pl.in (variant_grammar): Fix the computation of
3107 $variant.
3108 Generate a grammar file that can work with or without %debug.
3109 Do use the @directive.
3110 (bench_variant_parser): Check impact of %debug.
3111 (@directives): Rename all the occurrences to...
3112 (@directive): this, for consistency.
3113
3114 2008-11-03 Akim Demaille <demaille@gostai.com>
3115
3116 bench: report the size too.
3117 * etc/bench.pl.in ($iterations): Defaults to -3.
3118 (&bench_grammar): Require hireswallclock.
3119 Compute and display the size of the result.
3120 More comments.
3121
3122 2008-11-03 Akim Demaille <demaille@gostai.com>
3123
3124 bench: More use of the verbosity level.
3125 * etc/bench.pl.in ($verbose, &verbose): New.
3126 Use them.
3127 More POD documentation.
3128
3129 2008-11-03 Akim Demaille <demaille@gostai.com>
3130
3131 bench.pl: a command line interface
3132 * etc/bench.pl.in: More doc.
3133 Some fixes in the documentation.
3134 ($cflags, $iterations, &help, &getopt): New.
3135 Use them.
3136 (&variant_grammar): Let the number of stages be 10 times what is
3137 specified.
3138
3139 2008-11-03 Akim Demaille <demaille@gostai.com>
3140
3141 Bench the use of Boost.Variants.
3142 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3143 New.
3144 (&compile): Be ready to compile C++ parsers.
3145 (&bench_push_parser): Move debug information to the outermost
3146 level.
3147 * THANKS: Add Michiel De Wilde.
3148
3149 2008-11-03 Akim Demaille <demaille@gostai.com>
3150
3151 bench.pl: Pass directives as a list instead of as a string.
3152 * etc/bench.pl.in (&directives): New.
3153 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3154 directives.
3155 (&triangular_grammar): Do use the directives (were ignored).
3156 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3157 directives.
3158
3159 2008-11-03 Akim Demaille <demaille@gostai.com>
3160
3161 Improve genericity of bench.pl.
3162 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3163 argument.
3164 (&bench_push_parser): New.
3165 Call it.
3166
3167 2008-11-03 Akim Demaille <demaille@gostai.com>
3168
3169 Add documentation to bench.pl.
3170 * etc/bench.pl.in: Comment changes.
3171
3172 2008-11-03 Akim Demaille <demaille@gostai.com>
3173
3174 Fuse the three stacks into a single one.
3175
3176 In order to make it easy to perform benchmarks to ensure that
3177 there are no performance loss, lalr1.cc is forked into
3178 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3179 lalr1.cc.
3180
3181 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3182 exercized by the test suite, the user must install a symbolic link
3183 from lalr1.cc to it.
3184
3185 Instead of having three stacks (state, value, location), use a
3186 stack of triples. This considerably simplifies the code (and it
3187 will be easier not to require locations as currently does the C++
3188 parser), and also gives a 10% speedup according to
3189 etc/bench (probably mainly since memory allocation is done once
3190 instead of three times).
3191
3192 Another motivation is to make it easier to destruct properly
3193 semantic values: now that they are bound to their state (hence
3194 symbol type) it will be easier to call the appropriate destructor.
3195
3196 These changes should probably benefit the C parser too.
3197
3198 * data/lalr1.cc: Copy as...
3199 * data/lalr1-fusion.cc: this new file.
3200 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3201 from c++.m4.
3202 (state_stack_type, semantic_stack_type, location_stack_type)
3203 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3204 (data_type, stack_type, yystack_): New.
3205 (YYLLOC_DEFAULT, yypush_): Adjust.
3206 (yyerror_range): Now based on data_type, not location_type.
3207
3208 2008-11-03 Akim Demaille <demaille@gostai.com>
3209
3210 Push the state, value, and location at the same time.
3211 This is needed to prepare a forthcoming patch that fuses the three
3212 stacks into one.
3213
3214 * data/lalr1.cc (parser::yypush_): New.
3215 (parser::yynewstate): Change the semantics: instead of arriving to
3216 this label when value and location have been pushed, but yystate
3217 is to be pushed on the state stack, now the three of them must
3218 have been pushed before. yystate still must be the new state.
3219 This allows to use yypush_ everywhere instead of individual
3220 handling of the stacks.
3221
3222 2008-11-03 Akim Demaille <demaille@gostai.com>
3223
3224 Prefer references to pointers.
3225 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3226 definition to use references instead of pointers.
3227 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3228 Take the value and location as references.
3229 Adjust callers.
3230
3231 2008-11-03 Akim Demaille <demaille@gostai.com>
3232
3233 stack::size instead of stack::height.
3234 * data/lalr1.cc (stack::height): Rename as...
3235 (stack::size): this.
3236 Fix the output type.
3237 Comment changes.
3238
3239 2008-11-03 Akim Demaille <demaille@gostai.com>
3240
3241 Use variants to support objects as semantic values.
3242 This patch was inspired by work by Michiel De Wilde. But he used
3243 Boost variants which (i) requires Boost on the user side, (ii) is
3244 slow, and (iii) has useless overhead (the parser knows the type of
3245 the semantic value there is no reason to duplicate this
3246 information as Boost.Variants do).
3247
3248 This implementation reserves a buffer large enough to store the
3249 largest objects. yy::variant implements this buffer. It was
3250 implemented with Quentin Hocquet.
3251
3252 * src/output.c (type_names_output): New.
3253 (output_skeleton): Invoke it.
3254 * data/c++.m4 (b4_variant_if): New.
3255 (b4_symbol_value): If needed, provide a definition for variants.
3256 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3257 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3258 (b4_char_sizeof, yy::variant): New.
3259 (parser::parse): If variants are requested, define
3260 parser::union_type, parser::variant, change the definition of
3261 semantic_type, construct $$ before running the user action instead
3262 of performing a default $$ = $1.
3263 * examples/variant.yy: New.
3264 Based on an example by Michiel De Wilde.
3265
3266 2008-11-03 Akim Demaille <demaille@gostai.com>
3267
3268 Parameterize the extraction of semantic values.
3269 To make future changes easier, no longer rely on ".TYPE" being the
3270 way to get a semantic value.
3271
3272 * data/c.m4 (b4_symbol_value): New.
3273 Use it.
3274 * data/c++.m4, data/yacc.c: Use it.
3275 * data/glr.c: Use b4_symbol_value.
3276 (b4_rhs_data): New.
3277 Use it.
3278
3279 2008-11-03 Akim Demaille <demaille@gostai.com>
3280
3281 Prepare easier M4 changes.
3282 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3283 future changes.
3284
3285 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3286
3287 Initiate further development.
3288 * NEWS: Create an empty section for new entries.
3289 * gnulib: Update submodule to HEAD.
3290
3291 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3292
3293 * NEWS: Version 2.4.
3294
3295 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3296
3297 Prepare for next release.
3298 * NEWS: Briefly mention changes since 2.3b.
3299 * README: Say GNU m4 1.4.6, which we've been requiring in release
3300 announcements already, not 1.4.3, which breaks the build.
3301
3302 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3303
3304 Say %language is experimental.
3305 We're thinking of extending it's effect on output file naming. See the
3306 thread at
3307 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3308 * NEWS: Say it's experimental.
3309 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3310 recommend it over %skeleton for now.
3311 (Bison Options): Likewise.
3312 (C++ Bison Interface): Use %skeleton not %language.
3313 (Calc++ Parser): Use %skeleton not %language.
3314 * src/getargs.c (usage): Say it's experimental.
3315
3316 2008-11-01 Di-an Jan <dianj@freeshell.org>
3317 Paolo Bonzini <bonzini@gnu.org>
3318
3319 Support all Java parser class modifiers.
3320 * data/java.m4 (b4_percent_define_get3): New.
3321 (b4_final_if, b4_strictfp_if): New.
3322 * data/lalr1.java (final, strictfp, extends, implements): Support.
3323 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3324 documentation.
3325 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3326 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3327 (AT_CHECK_JAVA_GREP): New.
3328 (Java parser class modifiers): New test.
3329 (Java parser class extends and implements): New test.
3330
3331 Model exception propagation better with throws and lex_throws.
3332 * data/java.m4 (b4_list2): New.
3333 (throws): Change default.
3334 * data/lalr1.java (yyaction): Add throws.
3335 (parse): Add lex_throws in addition to throws.
3336 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3337 * tests/java.at (Java throws specifications): New test.
3338
3339 Improve documentation for Java parsers.
3340 * doc/bison.texinfo (Java Parsers): Add subsections.
3341 Don't quote first argument of %define.
3342 (Java Bison Interface): Document output files. Move documentation
3343 of parser class and merge into Java Parser Interface. Document
3344 features that error out. Document directives with no effect.
3345 Move note about Javadoc higher.
3346 (Java Semantic Values): Explicitly mention stype.
3347 Document that generic types cannot be used.
3348 (Java Location Values): Use @deftypeivar. Document constructors.
3349 Correct return value for toString.
3350 (Java Parser Interface): List undocumented constants/fields.
3351 Move documentation of fields added by %parse-param closer to list
3352 of members. Document that token names are added as fields.
3353 Document constructors accurately. Remove error method.
3354 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3355 Interface. Describe %code lexer and yylex accutately.
3356 Remove documentation that does not match the code.
3357 (Java Action Features): New.
3358 (Java Differences): Add reference. Add item on semantic values.
3359 Add note about @{ ... @}. Clarify %% epilogue placement.
3360 (Java Declarations Summary): New.
3361
3362 Fix Java skeleton.
3363 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3364 (b4_remove_comma): Quote test argument.
3365 (b4_identification): Remove "bison" field.
3366 * tests/java.at (Java parser class and package names): New test.
3367 (Java %parse-param and %lex-param): New test.
3368 (Java stype, position_class and location_class): New test.
3369
3370 2008-10-31 Di-an Jan <dianj@freeshell.org>
3371
3372 * data/lalr1.jave: Update copyright years.
3373 (YYParser): Correct name of "generated from" file in Javadoc:
3374 use b4_file_name instead of @ofile@.
3375 (Location constructor): Correct Javadoc parameter name.
3376 (yylloc): Add missing opening m4 quote after b4_location_if.
3377 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3378 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3379 (YYParser constructor): Correct Javadoc parameter name.
3380
3381 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3382
3383 Always put auxiliary code files in the same dir as other output files.
3384 * src/files.c (compute_file_name_parts): When the user specifies
3385 --output but not --file-prefix, extract the directory prefix from the
3386 file prefix not from the grammar file name. This affects the location
3387 of files like location.hh generated by the C++ skeleton. The includes
3388 in the other output files require this fix.
3389 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3390 for expected output files.
3391 (Output files): Add a test for the above.
3392
3393 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3394
3395 * gnulib: Update submodule to HEAD.
3396
3397 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3398
3399 Update copyright year.
3400 * src/files.c: Here.
3401
3402 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3403
3404 Don't overwrite the input file.
3405 * src/files.c (output_file_name_check): Fatal error if using input file
3406 for output.
3407 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3408 argument.
3409 (Conflicting output files): Add test.
3410
3411 2008-10-28 Akim Demaille <demaille@gostai.com>
3412
3413 Space changes.
3414 * data/lalr1.cc: Formatting changes.
3415
3416 2008-10-28 Akim Demaille <demaille@gostai.com>
3417
3418 Don't define debugging functions when !YYDEBUG.
3419 * data/lalr1.cc (debug_stream, set_debug_stream)
3420 (debug_level_type, debug_level, set_debug_level): Don't
3421 declare them when YYDEBUG is not defined.
3422 The implementation are already YYDEBUG-aware.
3423
3424 2008-10-28 Akim Demaille <demaille@gostai.com>
3425
3426 Prefer "continue" for empty loop bodies.
3427 * etc/bench.pl.in: Use "continue" instead of {}.
3428
3429 2008-10-28 Akim Demaille <demaille@gostai.com>
3430
3431 Space and comments changes.
3432 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3433 * data/c.m4, data/lalr1.cc: Space changes.
3434
3435 2008-10-28 Akim Demaille <demaille@gostai.com>
3436
3437 Make gnulib a submodule.
3438 * gnulib: New.
3439 * .gitmodules (gnulib): New.
3440
3441 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3442
3443 Fix yyerror_range for user-defined location type in C++. Reported by
3444 Georg Sauthoff at
3445 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3446 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3447 * THANKS (Georg Sauthoff): Add.
3448
3449 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3450
3451 Update several administrative files mainly to facilitate releasing.
3452 * HACKING (Administrivia): Make the git-merge-changelog notes more
3453 helpful.
3454 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3455 (Release Procedure): Update for git and add numerous details that were
3456 previously missing.
3457 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3458 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3459 that announcements don't claim we bootstrapped with whatever bison
3460 happened to be in PATH. Add flex as a bootstrap tool.
3461 * Makefile.maint: Remove, previously replaced by maint.mk.
3462 * Makefile.cfg: Remove, and migrate settings to...
3463 * cfg.mk: ... here for the sake of `make announcement'.
3464 * bootstrap.conf (gnulib_modules): Add announce-gen.
3465 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3466 Berry.
3467
3468 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3469
3470 Small but important bugfixes for the Java skeleton.
3471 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3472 (yy_symbol_print): Call toString on yyvaluep.
3473
3474 2008-08-29 Akim Demaille <demaille@gostai.com>
3475
3476 Clarify UPDATED use.
3477 * doc/bison.texinfo: It refers to the last edition of this file,
3478 not to the release date of Bison.
3479 Reported by Joel E. Denny.
3480
3481 2008-08-29 Akim Demaille <demaille@gostai.com>
3482
3483 * README: Update FAQ pointer.
3484 Reported by Joel E. Denny.
3485
3486 2008-08-27 Eric Blake <ebb9@byu.net>
3487
3488 Resync m4sugar from autoconf.
3489 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3490 (m4_init): Adjust to latest m4.git changes.
3491 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3492 effects.
3493 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3494 (_m4_list_cmp): Reduce side effects.
3495
3496 2008-08-27 Akim Demaille <demaille@gostai.com>
3497
3498 Check yyerrok in calc.at.
3499 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3500 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3501 expected.
3502
3503 2008-08-27 Akim Demaille <demaille@gostai.com>
3504
3505 Support yyerrok in lalr1.cc.
3506 YYBACKUP is still to import back into lalr1.cc.
3507 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3508
3509 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 For maintainer-check*, don't recompile for a $(VERSION) update.
3512 * cfg.mk: New file.
3513 (_is-dist-target): Override the one in GNUmakefile.
3514 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3515
3516 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3517
3518 Update for recent change to gnulib.
3519 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3520 string.h now.
3521
3522 2008-08-15 Eric Blake <ebb9@byu.net>
3523
3524 Remaining m4sugar merge from autoconf.
3525 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3526 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3527 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3528 * src/output.c (output_skeleton): Tell m4 how to find it.
3529
3530 Partial m4sugar merge from autoconf: m4_map.
3531 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3532 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3533 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3534 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3535 for empty list.
3536 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3537 Likewise.
3538 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3539 declares it.
3540
3541 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3542
3543 Keep .version and PACKAGE_VERSION in sync.
3544 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3545 dependency, and add comments justifying this in more detail. Discussed
3546 starting at
3547 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3548
3549 2008-08-06 Eric Blake <ebb9@byu.net>
3550
3551 Partial m4sugar merge from autoconf: m4_shiftn.
3552 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3553 (m4_shift2, m4_shift3): New macros.
3554 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3555 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3556 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3557 * data/java.m4 (b4_remove_comma): Likewise.
3558
3559 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3560 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3561 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3562 (m4_init): Consolidate wrapped text into single m4_wrap.
3563 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3564 in wrapped text.
3565
3566 2008-08-05 Eric Blake <ebb9@byu.net>
3567
3568 Partial m4sugar merge from autoconf: builtins, version.m4.
3569 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3570 (m4_prepend): Remove, as it is unused and inherently quadratic,
3571 whereas m4_append is linear in newer m4.
3572 (m4_mkstemp): New builtin.
3573 (m4_symbols): Make rename conditional.
3574 (m4_version_prereq): Ensure fatal error if used in bison, which
3575 intentionally lacks version.m4.
3576
3577 Fix comments in m4sugar.
3578 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3579
3580 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3581
3582 Update for recent .gitignore fix in Gnulib.
3583 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3584 anchored .gitignore entries.
3585
3586 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3587
3588 Set gnu or gnits strictness.
3589 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3590 development and gnits strictness for releases. Based on Eric Blake's
3591 suggestion at
3592 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3593
3594 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3595
3596 * NEWS: Clarify documentation of %language.
3597
3598 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3599
3600 Support usage of git-merge-changelog.
3601 * .gitattributes: New.
3602 * HACKING: Document usage of git-merge-changelog.
3603 * bootstrap: Install git-merge-changelog entries in .git/config
3604 if appropriate.
3605
3606 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3607
3608 Remove remaining dependence on CVS Id keyword.
3609 * ChangeLog: For the sake of people still using CVS, don't use dollars
3610 when mentioning Id.
3611 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3612 unusual anyway.
3613 * data/xslt/xml2dot.xsl: Likewise.
3614 * data/xslt/xml2text.xsl: Likewise.
3615 * data/xslt/xml2xhtml.xsl: Likewise.
3616 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3617 * doc/Makefile.am (neutralize): Remove, no longer needed.
3618 (.x.1): Don't use neutralize.
3619 (edit): Don't substitute for ID.
3620 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3621
3622 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3623
3624 Fix dependence on computed configure variables.
3625 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3626 $(top_srcdir)/configure.ac so that changes to computed variables, such
3627 as PACKAGE_VERSION, are seen.
3628 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3629
3630 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3631
3632 Update copyright dates for recent changes.
3633 * Makefile.am: Here.
3634 * src/Makefile.am: Here.
3635 * src/reduce.c: Here.
3636 * tests/reduce.at: Here.
3637
3638 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3639
3640 Use git-version-gen for version names between releases.
3641 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3642 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3643 * .prev-version: New.
3644 * .version.in: Remove.
3645 * ChangeLog: Remove the Id previously used for capturing the CVS
3646 revision.
3647 * GNUmakefile: Remove, now copied from Gnulib.
3648 * Makefile.am: Add code suggested by comments in
3649 build-aux/git-version-gen.
3650 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3651 .prev-version, and .version.
3652 * NEWS (2.3b+): Rename to...
3653 (?.?): ... this because we're dropping the "+" version naming scheme,
3654 but, in general, we still can't be sure of our next release name.
3655 * bootstrap: Add a quick hack to remove from .gitignore the
3656 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3657 entry. This should really be fixed in gnulib instead.
3658 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3659 * configure.ac (AC_INIT): Set version name by invoking
3660 build-aux/git-version-gen.
3661 (AC_CONFIG_FILES): Remove .version, now generated by
3662 build-aux/git-version-gen.
3663 * maint.mk: New, copied from coreutils.
3664 * doc/.cvsignore (bison.1): Add.
3665 * doc/.gitignore (/bison.1): Add.
3666 * doc/bison.1: Remove, generated.
3667 * src/.cvsignore (revision.c): Remove.
3668 * src/.gitignore (/revision.c): Remove.
3669 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3670 (BUILT_SOURCES): Remove revision.c.
3671 (revision.c): Remove.
3672 * src/getargs.c (version): Don't print revision after the VERSION.
3673 * src/revision.h: Remove.
3674
3675 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3676
3677 Fix untranslatable composition of sentences. Reported by Goran
3678 Uddeborg at
3679 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3680 * THANKS (Goran Uddeborg): Add.
3681 * src/reduce.c (reduce_print): Report the number of nonterminals and
3682 rules useless in the grammar in separate sentences.
3683 * tests/reduce.at (Useless Rules): Update output.
3684 (Reduced Automaton): Likewise.
3685 (Underivable Rules): Likewise.
3686 (Empty Language): Likewise.
3687
3688 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3689
3690 Fix some .gitignore and .cvsignore problems.
3691 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3692 (insert_vc_ignore): ... this new function, which prepends `/' to all
3693 .gitignore entries before passing them to insert_sorted_if_absent.
3694 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3695 .cvsignore files are maintained even though Bison developers run
3696 bootstrap while using Git.
3697 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3698 unneeded by Bison.
3699 (gnulib): Add.
3700 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3701 unneeded. Reported by Eric Blake.
3702 * lib/.gitignore (/*~): Add.
3703 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3704 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3705 Blake.
3706 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3707
3708 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3709
3710 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3711 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3712 * bootstrap.conf (gnulib_modules): Add unsetenv.
3713 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3714 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3715 (/setenv.m4): Add.
3716 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3717 the first argument because it may become position-dependent, and unset
3718 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3719 Add comments explaining these issues in more detail.
3720
3721 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3722
3723 Add .gitignore everywhere based on .cvsignore.
3724 * .gitignore: New.
3725 * build-aux/.gitignore: New.
3726 * data/.gitignore: New.
3727 * doc/.gitignore: New.
3728 * etc/.gitignore: New.
3729 * examples/.gitignore: New.
3730 * examples/calc++/.gitignore: New.
3731 * lib/.gitignore: New.
3732 * m4/.gitignore: New.
3733 * po/.gitignore: New.
3734 * runtime-po/.gitignore: New.
3735 * src/.gitignore: New.
3736 * tests/.gitignore: New.
3737
3738 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3739
3740 * NEWS (2.3b+): New section, empty for now.
3741 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3742
3743 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3744
3745 * NEWS (2.3b): Update release date since there has been a delay in
3746 getting the announcements and tarballs out.
3747
3748 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3749
3750 * NEWS: Version 2.3b.
3751 * configure.ac (AC_INIT): Likewise.
3752 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3753
3754 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3755
3756 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3757 been doing it for years.
3758 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3759 (Release Procedure): Add FIXME about make alpha being unmaintained.
3760
3761 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3762
3763 * data/yacc.c: Reformat m4 a little for readability.
3764 * src/lalr.c (build_relations): Correct comment.
3765
3766 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3767
3768 DJGPP specific issue.
3769 * djgpp/config.sed: Fixes required to run configure scripts generated
3770 by autoconf 2.62.
3771
3772 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3773
3774 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3775 coordinator@translationproject.org.
3776
3777 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3778
3779 * THANKS: Add Eric Blake.
3780
3781 2008-04-23 Eric Blake <ebb9@byu.net>
3782
3783 Revert prior patch, by working around autoconf regression.
3784 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3785 ("Output file name: ("): Uncomment test.
3786 ("Output file name: )"): Likewise.
3787 Based on an idea from Noah Misch.
3788
3789 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3790
3791 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3792 2.61. Reported by Juan Manuel Guerrero at
3793 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3794 * tests/output.at ("Output file name: ("): Comment out test case for
3795 now.
3796 ("Output file name: )"): Likewise.
3797
3798 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3799
3800 * GNUmakefile: Update git-version-gen invocation so make dist
3801 succeeds.
3802
3803 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3804
3805 Update to the current gnulib CVS repository, and fix trigraph handling
3806 in Bison.
3807 * bootstrap: Update gnulib CVS repository URL.
3808 (symlink_to_dir): Encapsulate the code that guarantees the destination
3809 directory exists into...
3810 (check_dst_dir): ... this new function, and...
3811 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3812 fail when copying files into lib/uniwidth/.
3813 * src/output.c (prepare_symbols): When writing yytname muscles, where
3814 symbol names will be encoded in C-string literals, tell quotearg to
3815 escape trigraphs. This used to be the default in gnulib.
3816 * tests/regression.at (Token definitions): Because of the change in
3817 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3818 escapes trigraphs in symbol names. Thus, yytname no longer has
3819 trigraphs unnecessarily doubly escaped. Update test case output.
3820 Extend test case to be sure Bison's own error messages will no longer
3821 have trigraphs in symbol names unnecessarily escaped once.
3822
3823 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3824
3825 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3826 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3827 * .cvsignore: Add .version.
3828 * .version.in: New.
3829 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3830 * configure.ac (AC_CONFIG_FILES): Add .version.
3831 * build-aux/.cvsignore: Add git-version-gen.
3832
3833 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3834
3835 * NEWS (2.3a+): Mention that -g now takes an argument.
3836 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3837 consistency. Update the -g and -x entries now that they take
3838 arguments. Use brackets to indicate optional arguments.
3839 * src/getargs.c (usage): Explain the relationship between arguments of
3840 long and short options more completely. Document --defines and -d
3841 separately since the former takes an argument but, for POSIX Yacc, the
3842 latter does not.
3843 (short_options): Let -W take an optional argument like --warnings.
3844 (getargs): Sort cases.
3845
3846 2008-02-28 Akim Demaille <demaille@gostai.com>
3847
3848 * doc/bison.texinfo: Fix a few typos.
3849
3850 2008-02-28 Akim Demaille <akim@epita.fr>
3851
3852 * doc/bison.texinfo (Bison Options): Document -W.
3853 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3854
3855 2008-02-28 Akim Demaille <akim@epita.fr>
3856
3857 * src/getargs.c (short_options): Split and sort for readability.
3858 -g and -x take optional arguments, just like their long options.
3859 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3860 understand.
3861 Fix the handling of $opt which resulted in all the argument to be
3862 considered as optional.
3863
3864 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3865
3866 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3867 say its interface is experimental.
3868 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3869 Java.
3870 (Bison Options): In the -L and --language entry, mention Java.
3871 (Java Bison Interface): Say the interface is experimental.
3872 * src/getargs.c (usage): Mention -L and --language.
3873
3874 * NEWS (2.3a+): Say the push parsing interface is experimental.
3875 * doc/bison.texinfo (Push Decl): Likewise.
3876 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3877 (Push Parser Function): Likewise.
3878 (Pull Parser Function): Likewise.
3879 (Parser Create Function): Likewise.
3880 (Parser Delete Function): Likewise.
3881 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3882 yypull_parse, and yypush_parse entries.
3883
3884 * NEWS (2.3a+): Mention XML support, and say the schema is
3885 experimental.
3886 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3887 * src/getargs.c (usage): Say the XML schema is experimental.
3888
3889 * NEWS (2.3a+): Say option instead of flag.
3890
3891 2008-02-21 Wojciech Polak <polak@gnu.org>
3892
3893 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3894 text.
3895
3896 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3897
3898 Fix impure push parser compile error reported by Bob Rossi at
3899 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3900 * data/yacc.c: Clean up whitespace in the output a little.
3901 (yypstate_allocated): Define for impure push parsers regardless of
3902 whether the pull interface is also requested.
3903 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3904 check impure push parsers without the pull interface.
3905
3906 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3907 yyerror takes arguments specified by %parse-param while yypstate_new
3908 does not.
3909 * doc/bison.texinfo (Parser Create Function): Document that
3910 yypstate_new returns 0 for multiple impure parser instances.
3911 * tests/push.at (Push Parsing: Multiple impure instances): Update
3912 expected stderr output.
3913
3914 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3915
3916 * runtime-po/POTFILES.in (push.c): Remove.
3917
3918 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3919
3920 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3921 * data/push.c: Rename to...
3922 * data/yacc.c: ... this, overwriting it.
3923 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3924 `%push-pull-parser' -> `%define api.push_pull "both"'.
3925 Remove old yacc.c tests, and update push.c tests to yacc.c.
3926
3927 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3928
3929 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3930 `"%code top" blocks' instead of `%code "top" blocks'.
3931 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3932 Clean up whitespace in the output a little.
3933
3934 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3935
3936 Fix documentation problems reported by Tim Josling at
3937 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3938 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3939 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3940 integers. Explain the effect of literal string aliases on error
3941 messages. Copy token 0 documentation from the C++ skeleton
3942 documentation.
3943
3944 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3945
3946 Accept a token number in a %left, %right, or %nonassoc for POSIX
3947 conformance. Reported by Tim Josling at
3948 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3949 * NEWS (2.3a+): Mention.
3950 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3951 and code numbers are treated by precedence declarations.
3952 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3953 of symbols.1.
3954 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3955 of symbol.
3956 (symbol.prec): New, just like symbol but allows INT.
3957 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3958 longer holds.
3959 * tests/regression.at (Token number in precedence declaration): New
3960 test case.
3961
3962 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3963
3964 DJGPP specific issues.
3965 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3966 be changed. Copyright timestamp adjusted.
3967 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3968 be changed. Copyright timestamp adjusted.
3969 * djgpp/config.site: Copyright timestamp adjusted.
3970 * djgpp/config_h.sed: Copyright timestamp adjusted.
3971 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3972 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3973 filename translation list.
3974 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3975 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3976 files shall be created. Before trying to use the temp dir where the
3977 environment variable points to check that the dir really exists. If
3978 not default to the cwd as temp dir. Copyright timestamp adjusted.
3979 * djgpp/subpipe.h: Copyright timestamp adjusted.
3980 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3981
3982 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3983
3984 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3985
3986 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3987
3988 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3989 Problem reported by Claudio Saavedra in
3990 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3991
3992 2008-01-05 Wojciech Polak <polak@gnu.org>
3993
3994 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3995 document's title with the input grammar file name.
3996
3997 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3998
3999 Automate regression testing of the XML/XSLT implementation. Discussed
4000 starting at
4001 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4002 * configure.ac (XSLTPROC): New substitution.
4003 * Makefile.am (maintainer-xml-check): New phony target invoking...
4004 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4005 invoking make maintainer-check with BISON_TEST_XML=1.
4006 * tests/atlocal.in (XSLTPROC): New.
4007 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4008 not to report reachable memory when Bison is expected to have a
4009 non-zero exit status and (2) to compare XML/XSLT output with --graph
4010 and --report=all output for every working grammar when
4011 BISON_TEST_XML=1.
4012 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4013 (AT_BISON_CHECK_XML): New.
4014 (AT_QUELL_VALGRIND): New.
4015 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4016 (AT_CHECK): ... don't redefine this since this was the old way to
4017 quell Valgrind.
4018 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4019 AT_BISON_CHECK invocations.
4020 * tests/c++.at: Likewise.
4021 * tests/calc.at: Likewise.
4022 * tests/conflicts.at: Likewise.
4023 * tests/cxx-type.at: Likewise.
4024 * tests/existing.at: Likewise.
4025 * tests/glr-regression.at: Likewise.
4026 * tests/headers.at: Likewise.
4027 * tests/input.at: Likewise.
4028 * tests/java.at: Likewise.
4029 * tests/output.at: Likewise.
4030 * tests/push.at: Likewise.
4031 * tests/reduce.at: Likewise.
4032 * tests/regression.at: Likewise.
4033 * tests/sets.at: Likewise.
4034 * tests/skeletons.at: Likewise.
4035 * tests/synclines.at: Likewise.
4036 * tests/torture.at: Likewise.
4037 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4038 tends to hang xsltproc.
4039 (Big horizontal): Likewise.
4040
4041 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4042
4043 In XML output, remove redundant class attribute on symbol element.
4044 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4045 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4046 look up a symbol to determine whether it's a nonterminal or terminal.
4047 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4048 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4049
4050 Add prec/assoc information to XML output.
4051 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4052 %prec, add a percent_prec attribute.
4053 * src/print-xml.c (print_grammar): For each terminal that has a
4054 precedence or associativity, add a prec or assoc attribute.
4055 (xml_indent): New.
4056 (xml_puts): Use xml_indent.
4057 (xml_printf): Use xml_indent.
4058 * src/print-xml.h (xml_indent): Prototype.
4059
4060 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4061 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4062
4063 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4064
4065 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4066 (bison:ruleByNumber): ... this for clarity.
4067 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4068 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4069 (xsl:template match="reduction"): Update.
4070 (xsl:template match="item"): Update.
4071 (xsl:template match="reduction"): Update.
4072
4073 In the XML output, don't print the list of rules where symbols appear.
4074 Compute it in XSLT instead. Discussed at
4075 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4076 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4077 (bison:ruleByRhs): New.
4078 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4079 bison:ruleByRhs.
4080 (xsl:template match="terminal/rule"): Remove.
4081 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4082 bison:ruleByRhs.
4083 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4084 Remove.
4085 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4086 bison:ruleByRhs and mode="number-link" for rule template.
4087 (xsl:template match="terminal/rule"): Remove.
4088 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4089 bison:ruleByRhs and mode="number-link" for rule template.
4090 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4091 Rewrite as...
4092 (xsl:template match="rule" mode="number-link"): ... this.
4093 * src/print-xml.c (print_grammar): Don't print the list of rules.
4094
4095 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4096
4097 Don't let --report affect XML output; always print all information.
4098 Discussed at
4099 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4100 * src/conflicts.c (log_resolution): Implement.
4101 * src/print-xml.c (print_core): Implement.
4102 (print_state): Implement.
4103 (print_xml): Implement.
4104
4105 * NEWS (2.3a+): Fix quotes.
4106 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4107 don't let %verbose clear the list specified by --report.
4108
4109 2007-11-26 Akim Demaille <akim@epita.fr>
4110
4111 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4112
4113 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4114
4115 In the XML output, list useless and unused symbols and rules with the
4116 useful ones and add a "usefulness" attribute. Discussed starting at
4117 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4118 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4119 (grammar_rules_print_xml): Print all rules instead of just those
4120 useful in the grammar, and add a "usefulness" attribute.
4121 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4122 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4123 (print_grammar): Print all nonterminals instead of just useful ones,
4124 and add a "usefulness" attribute to nonterminals and terminals.
4125 (print_xml): Don't print a separate "reductions" or
4126 "rules-useless-in-parser" element.
4127 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4128 (reduce_xml): Remove.
4129 (reduce_token_unused_in_grammar): New.
4130 (reduce_nonterminal_useless_in_grammar): New.
4131 * src/reduce.h (reduce_xml): Remove prototype.
4132 (reduce_token_unused_in_grammar): Add prototype.
4133 (reduce_nonterminal_useless_in_grammar): Add prototype.
4134 * data/xslt/xml2text.xsl: Update for XML changes.
4135 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4136 * tests/reduce.at (Useless Terminals): Update output.
4137 (Useless Rules): Update output.
4138 (Reduced Automaton): Update output.
4139
4140 Say "Terminals unused in grammar" instead of "Unused terminals".
4141 * NEWS (2.3a+): Update.
4142 * doc/bison.texinfo (Understanding): Update example output.
4143 * src/reduce.c (reduce_output): Implement.
4144 * data/xslt/xml2text.xsl: Implement.
4145 * data/xslt/xml2xhtml.xsl: Implement.
4146
4147 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4148
4149 Accept --report-file=FILE to override the default `.output' filename.
4150 * NEWS (2.3a+): Mention.
4151 * doc/bison.texinfo (Bison Options): Add an entry.
4152 * src/files.c (compute_output_file_names): Don't override
4153 spec_verbose_file if already set.
4154 * src/getargs.c (usage): Document --report-file.
4155 (REPORT_FILE_OPTION): New anonymous enum member.
4156 (long_options): Add entry for it.
4157 (getargs): Add case for it setting spec_verbose_file.
4158
4159 * build-aux/cross-options.pl: Don't record a short option just because
4160 there's an arg.
4161 * doc/.cvsignore: Add yacc.1.
4162
4163 2007-11-14 Akim Demaille <akim@epita.fr>
4164
4165 * doc/yacc.1.in: New.
4166 * configure.ac, doc/Makefile.am: Adjust.
4167 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4168 config.h symbol.
4169 Use AC_SUBST for assignments too.
4170 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4171
4172 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4173
4174 * src/gram.c: Remove comments that duplicate comments in gram.h.
4175
4176 When reporting useless rules and nonterminals, say "useless in grammar"
4177 instead of "useless", and say "useless in parser" instead of "never
4178 reduced". Discussed starting at
4179 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4180 * NEWS (2.3a+): Mention this change.
4181 * data/xslt/xml2text.xsl: Update output text and expected input XML
4182 element names to match changes below.
4183 * data/xslt/xml2xhtml.xsl: Likewise.
4184 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4185 Contents: "Rules useless in parser due to conflicts".
4186 * doc/bison.texinfo (Decl Summary): Reword a little.
4187 (Understanding): Update example output for changes below.
4188 * src/gram.c: (rule_useful_p): Rename to...
4189 (rule_useful_in_grammar_p): ... this.
4190 (rule_useless_p): Rename to...
4191 (rule_useless_in_grammar_p): ... this.
4192 (rule_never_reduced_p): Rename to...
4193 (rule_useless_in_parser_p): ... this.
4194 (grammar_rules_print): Update for renames.
4195 (grammar_rules_print_xml): Update for renames.
4196 (grammar_rules_never_reduced_report): Rename to...
4197 (grammar_rules_useless_report): ... this since it is used for either
4198 kind of useless rule.
4199 * src/gram.h: Reword comments and update function names in prototypes.
4200 * src/main.c (main): Say "rule useless in parser due to conflicts".
4201 * src/print-xml.c (print_rules_never_reduced): Rename to...
4202 (print_rules_useless_in_parser): ... this, and rename output XML
4203 element "rules-never-reduced" to "rules-useless-in-parser".
4204 (print_xml): Update for rename.
4205 * src/print.c (print_results): Say "Rules useless in parser due to
4206 conflicts".
4207 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4208 (nonterminals_reduce): Say "nonterminal useless in grammar".
4209 (reduce_output): Say "Nonterminals useless in grammar".
4210 Say "Rules useless in grammar".
4211 (reduce_xml): Rename output XML element "useless" to
4212 "useless-in-grammar".
4213 (reduce_print): Don't report the count of grammatically useless rules
4214 as "rules never reduced" just because %yacc is specified.
4215 In the correct report of this count, say nonterminal(s) and rule(s)
4216 "useless in grammar".
4217 * tests/conflicts.at (S/R in initial): Update expected output.
4218 (Defaulted Conflicted Reduction): Likewise.
4219 (Unreachable States After Conflict Resolution): Likewise.
4220 * tests/existing.at (GNU pic Grammar): Likewise.
4221 * tests/reduce.at (Useless Nonterminals): Likewise.
4222 (Useless Rules): Likewise.
4223 (Reduced Automaton): Likewise.
4224 (Underivable Rules): Likewise.
4225 (Empty Language): Likewise.
4226
4227 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4228
4229 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4230 here document and before the EOF so that BSD's implementation of Bourne
4231 shell doesn't parse the delimiter as part of the here document.
4232 * doc/.cvsignore: Add cross-options.texi.
4233 * src/getargs.c (usage): Add a blank line after the warning categories.
4234
4235 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4236
4237 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4238
4239 2007-11-05 Akim Demaille <akim@epita.fr>
4240
4241 Remove Id: from bison.1.
4242 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4243 (perl -0777 -pi -e 's/\.PP\nId): New.
4244 (.x.1): Use it to ignore the version control revision.
4245
4246 2007-11-05 Akim Demaille <demaille@gostai.com>
4247
4248 * build-aux/Makefile.am: Ship cross-options.pl.
4249 * doc/Makefile.am: Always refer to cross-options.texi with
4250 $(srcdir).
4251 (MAINTAINERCLEANFILES): Add it.
4252
4253 2007-11-04 Akim Demaille <demaille@gostai.com>
4254
4255 Generate the long/short option cross-table.
4256 * build-aux/cross-options.pl: New.
4257 * doc/Makefile.am (cross-options.texi): New.
4258 * doc/bison.texinfo: Use it.
4259
4260 2007-11-04 Akim Demaille <demaille@gostai.com>
4261
4262 Generate bison.1 using help2man.
4263 * doc/common.x, doc/bison.x: New.
4264 * doc/Makefile.am (bison.1, .x.1): New.
4265 The code is taken from autoconf-2.61/man/Makefile.am.
4266 * configure.ac: Look for help2man.
4267
4268 2007-11-04 Akim Demaille <demaille@gostai.com>
4269
4270 Complete --help.
4271 * src/getargs.c (usage): Document -W, make it clear that -d,
4272 -g and -x have optional arguments.
4273
4274 2007-11-04 Akim Demaille <demaille@gostai.com>
4275
4276 Find sha1sum when named gsha1sum.
4277 * bootstrap (find_tool): New.
4278 ($SHA1SUM): New.
4279
4280 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4281
4282 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4283 at
4284 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4285 * NEWS (2.3a+): Mention.
4286 * data/bison.m4 (b4_pure_if): Don't define it here.
4287 * data/c.m4 (b4_identification): Depend on individual skeletons to
4288 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4289 values of the %define variables api.pure or api.push_pull. Define
4290 YYPURE, YYPUSH, and YYPULL accordingly.
4291 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4292 glr.cc has already defined b4_pure_flag.
4293 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4294 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4295 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4296 * doc/bison.texinfo (Pure Decl): Update.
4297 (Push Decl): Update.
4298 (Decl Summary): Add api.pure to %define entry.
4299 In %pure-parser entry, say it's deprecated and reference %define.
4300 (Pure Calling): Update.
4301 (Error Reporting): Update.
4302 (C++ Scanner Interface): Update.
4303 (How Can I Reset the Parser): Update.
4304 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4305 reference %define.
4306 * src/getargs.c (pure_parser): Remove global variable.
4307 * src/getargs.h (pure_parser): Remove extern.
4308 * src/output.c (prepare): Don't define pure_flag muscle.
4309 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4310 wrapper around `%define api.pure'.
4311 * tests/calc.at (Simple LALR Calculator): Update.
4312 (Simple GLR Calculator): Update.
4313 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4314 Update.
4315 (GLR: Resolve ambiguity, pure, locations): Update.
4316 (GLR: Merge conflicting parses, pure, no locations): Update.
4317 (GLR: Merge conflicting parses, pure, locations): Update.
4318 * tests/glr-regression.at (Uninitialized location when reporting
4319 ambiguity): Update
4320 * tests/input.at (Unused %define api.pure): New test case.
4321 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4322 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4323 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4324
4325 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4326
4327 %define push_pull -> %define api.push_pull. Discussed starting at
4328 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4329 * data/push.c: Expect the new name.
4330 * data/yacc.c: Likewise.
4331 * doc/bison.texinfo (Push Decl): Update.
4332 (Decl Summary): Update %define entry.
4333 (Push Parser Function): Update.
4334 (Pull Parser Function): Update.
4335 (Parser Create Function): Update.
4336 (Parser Delete Function): Update.
4337 * tests/calc.at (Simple LALR Calculator): Update.
4338 * tests/input.at (%define enum variables): Update.
4339 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4340 (Push Parsing: Multiple impure instances): Update.
4341 (Push Parsing: Unsupported Skeletons): Update.
4342 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4343 (Exploding the Stack Size with Malloc): Update.
4344
4345 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4346 other entries some.
4347
4348 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4349
4350 For the XML output's terminal element, rename @number to @token-number,
4351 and add @symbol-number. In the nonterminal element, rename @number to
4352 @symbol-number. Discussed starting at
4353 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4354 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4355 renames.
4356 (xsl:template match="nonterminal"): Likewise.
4357 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4358 (xsl:template match="nonterminal"): Likewise.
4359 * src/print-xml.c (print_grammar): Implement.
4360
4361 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4362
4363 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4364 2007-10-11 change, the child elements here are items not rules.
4365 (xsl:template match="item"): New.
4366 (xsl:template match="rule"): Update for new reduced itemset.
4367 (xsl:template match="point"): Remove.
4368 (xsl:template match="empty"): For consistency with --graph, don't
4369 output "/* empty */".
4370 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4371 line-wrap, don't pass a negative value as first-line-length since this
4372 won't work with the following changes.
4373 (xsl:template name="line-wrap"): Simplify slightly.
4374 (xsl:template name="ws-search"): Eliminate recursion.
4375 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4376 set next to an item whose dot is not at the end of the RHS even if it
4377 happens to be associated with the same rule.
4378
4379 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4380
4381 Add %define lr.keep_unreachable_states.
4382 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4383 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4384 * src/main.c (main): Implement it.
4385 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4386 Extend to test it, and fix a typo.
4387
4388 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4389
4390 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4391 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4392 the example .output text.
4393 * tests/regression.at (Extra lookahead sets in report): Improve wording
4394 of comments.
4395
4396 2007-10-17 Wojciech Polak <polak@gnu.org>
4397
4398 * src/print-xml.c (print_grammar): Renamed
4399 <terminal> and <nonterminal> attributes:
4400 "type" to "number" and "symbol" to "name".
4401 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4402 Use new attribute names.
4403 (xsl:template match="nonterminal"): Likewise.
4404 * data/xslt/xml2xhtml.xsl: Likewise.
4405
4406 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4407
4408 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4409 (Option Cross Key): Likewise.
4410
4411 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4412 next to an item whose dot is not at the end of the RHS even if it
4413 happens to be associated with the same rule.
4414 * src/print.c (print_core): Likewise.
4415 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4416 (Resolved SR Conflicts): Update output.
4417 * tests/regression.at (Extra lookahead sets in report): New test case.
4418
4419 2007-10-11 Wojciech Polak <polak@gnu.org>
4420
4421 * src/print-xml.c (print_core): Remove item set
4422 redundancy.
4423 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4424 Improve processing time. Suggested by Joel E. Denny.
4425 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4426 Write xsl:param "required" attribute as comment.
4427 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4428 (xsl:template match="rule"): Support new reduced itemset.
4429 (xsl:template match="point"): Remove.
4430 * data/xslt/xml2xhtml.xsl: Likewise.
4431
4432 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4433
4434 * src/getargs.c (version): Update copyright year.
4435
4436 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4437
4438 Make xml2dot.xsl and --graph produce the same output.
4439 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4440 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4441 escaped later.
4442 (xsl:template name="output-node"): Use the new escape template instead
4443 of the string-replace template directly.
4444 (xsl:template name="output-edge"): Likewise.
4445 (xsl:template name="escape"): New, escapes backslashes and newlines in
4446 addition to quotation marks.
4447 * src/graphviz.c (start_graph, output_node, output_edge): Add
4448 whitespace to output for legibility.
4449
4450 Make xml2text.xsl and --report produce the same output, and remove the
4451 XML "conflicts" element since a conflict summary is easily extracted
4452 from the automaton.
4453 * data/xslt/bison.xsl: New.
4454 (xsl:template match="state" mode="bison:count-conflicts): New.
4455 * data/xslt/xml2text.xsl: Import bison.xsl.
4456 (xsl:template match="bison-xml-report"): Instead of styling the
4457 "conflicts" element, style the "automaton" element with mode
4458 "conflicts". Unlike the former, the latter lists S/R and R/R
4459 conflicts for a state on the same line.
4460 (xsl:template match="conflicts"): Remove.
4461 (xsl:template match="conflict"): Remove.
4462 (xsl:template match="terminal"): Line-wrap the list of rules in which
4463 the terminal is used.
4464 (xsl:template match="nonterminal"): Likewise for nonterminals.
4465 (xsl:template match="automaton" mode="conflicts"): New.
4466 (xsl:template match="state" mode="conflicts"): New.
4467 (xsl:template name="line-wrap"): New.
4468 (xsl:template name="ws-search"): New.
4469 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4470 (xsl:template match="bison-xml-report"): Instead of styling the
4471 "conflicts" element, style the "automaton" element with mode
4472 "conflicts."
4473 (xsl:template match="conflicts"): Remove.
4474 (xsl:template match="conflict"): Remove.
4475 (xsl:template match="automaton" mode="conflicts"): New.
4476 (xsl:template match="state" mode="conflicts): New.
4477 * src/conflicts.c (conflicts_output_xml): Remove.
4478 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4479 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4480 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4481 the corresponding XSLT is easier. Also, never wrap between a word and
4482 the comma that follows it.
4483
4484 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4485
4486 Improve C++ namespace support. Discussed starting at
4487 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4488 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4489 b4_namespace_close): New macros that interpret the %define variable
4490 "namespace" so its value can contain "::" to indicate nested
4491 namespaces.
4492 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4493 the above macros.
4494 * data/lalr1.cc (b4_namespace): Likewise.
4495 * data/location.cc (b4_namespace): Likewise.
4496 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4497 inside a new table in the general %define entry. Document `%define
4498 namespace' there as well. Point the %name-prefix entry to it since it
4499 explains it more completely in the case of C++.
4500 (C++ Bison Interface): Mention `%define namespace' instead of
4501 %name-prefix.
4502 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4503 entry suffices.
4504 * tests/c++.at (Relative namespace references): New test case.
4505 (Absolute namespace references): New test case.
4506 (Syntactically invalid namespace references): New test case.
4507 * tests/input.at (C++ namespace reference errors): New test case.
4508
4509 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4510
4511 Add syncline support and location accessor to internal %define
4512 interfaces.
4513 * data/bison.m4 (b4_percent_define_get_loc): New.
4514 (b4_percent_define_get_syncline): New.
4515 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4516 (b4_percent_define_default): Record defining location as line 1 rather
4517 than 0 for the sake of synchronizing #line's, and define
4518 b4_percent_define_syncline(VARIABLE).
4519 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4520 * src/muscle_tab.c (muscle_syncline_grow): New.
4521 (muscle_code_grow): Use muscle_syncline_grow.
4522 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4523 define b4_percent_define_syncline(VARIABLE).
4524 (muscle_percent_define_get_loc): New.
4525 (muscle_percent_define_get_syncline): New.
4526 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4527 remove some unused variables.
4528 (muscle_percent_define_default): Record defining location as line 1
4529 rather than 0 for the sake of synchronizing #line's, and define
4530 b4_percent_define_syncline(VARIABLE).
4531 (muscle_percent_define_check_values): Use
4532 muscle_percent_define_get_loc.
4533 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4534 (muscle_percent_define_get_syncline): Prototype.
4535 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4536 defaults): Update output for location change.
4537 (Complaining during macro argument expansion): Extend to test
4538 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4539
4540 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4541
4542 Fix some error-reporting macro bugs.
4543 * data/bison.m4 (b4_cat): New.
4544 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4545 to stdout so they don't become arguments to other macros. Update
4546 comments and add examples.
4547 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4548 add examples.
4549 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4550 after printing the error directive so that M4 doesn't report subsequent
4551 problems that are induced by this problem.
4552 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4553 instead of just in them. Recognize @\n in both places. Both expand to
4554 the empty string. Needed by b4_cat.
4555 * tests/skeletons.at (Complaining during macro argument expansion):
4556 New test case.
4557 (Fatal errors make M4 exit immediately): New test case.
4558
4559 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4560
4561 Implement --print-datadir.
4562 * src/getargs.c (usage): Mention.
4563 (PRINT_DATADIR_OPTION): New anonymous enum member.
4564 (long_options): Add entry for it.
4565 (getargs): Add case for it calling compute_pkgdatadir.
4566 * src/output.c (output_skeleton): Encapsulate data directory
4567 computation from here...
4568 (prepare): ... and from here...
4569 (compute_pkgdatadir): ... into this new function.
4570 * src/output.h (compute_pkgdatadir): Prototype.
4571
4572 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4573
4574 * src/print-xml.c (escape_bufs): New static global variable
4575 replacing...
4576 (xml_escape_n): ... the static local variable buf here.
4577 (print_xml): Free memory for escape_bufs.
4578 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4579
4580 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4581
4582 Replace `%push-parser' and `%push-pull-parser' with
4583 `%define push_pull "push"' and `%define push_pull "both"'.
4584 `%define push_pull "pull"' is the default.
4585 * doc/bison.texinfo (Push Decl, Push Parser Function,
4586 Pull Parser Function, Parser Create Function, Parser Delete Function):
4587 Update declarations.
4588 (Decl Summary, Table of Symbols): Replace %push-parser and
4589 %push-pull-parser entries with a %define push_pull entry.
4590 * data/bison.m4 (b4_percent_define_check_values): New macro.
4591 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4592 definitions...
4593 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4594 definitions...
4595 * data/push.c: ... to here and compute them from the value of the
4596 %define variable push_pull.
4597 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4598 parsing requests here...
4599 * data/yacc.c: ... hack this to switch to push.c any time
4600 b4_use_push_pull_flag or the %define variable push_pull is set. This
4601 will go away when we mv push.c yacc.c.
4602 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4603 push parsing is not supported since unused %define variables are
4604 reported anyway.
4605 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4606 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4607 comments for consistency with b4_percent_define_check_values.
4608 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4609 muscles.
4610 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4611 Remove.
4612 (prologue_declaration): Remove %push-parser and %push-pull-parser
4613 rules.
4614 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4615 * tests/calc.at: Update declarations.
4616 * tests/input.at (%define enum variables): New test case.
4617 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4618 declaration.
4619 (Push Parsing: Multiple impure instances): Update declaration.
4620 (Push Parsing: Unsupported Skeletons): New test case.
4621 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4622 declaration.
4623 (Exploding the Stack Size with Malloc): Update declaration.
4624
4625 2007-09-24 Wojciech Polak <polak@gnu.org>
4626
4627 Add XSLT transformations.
4628
4629 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4630 * data/xslt/xml2text.xsl: Transform XML into plain text.
4631 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4632 * data/Makefile.am (xsltdir): New variable.
4633 (dist_xslt_DATA): Add xslt/*.xsl files.
4634
4635 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4636
4637 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4638 Problem reported by Wojciech Polak.
4639 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4640 (xml_printf): Undo change I made on 21 September; that is,
4641 indent 2 spaces, not 1.
4642
4643 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4644
4645 Pacify ./configure --enable-gcc-warnings.
4646 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4647 `char const *' instead of `char *'.
4648 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4649 local variable `sep'.
4650
4651 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4652
4653 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4654 elsewhere.
4655 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4656 (xml_printf): Indent just 1 space for level.
4657 (e_char, xlate_char): Remove.
4658 (xml_escape_string): Rewrite to avoid undefined behavior (used
4659 storage that was freed from the stack).
4660 (xml_escape_n): Don't bother checking for subscript error.
4661
4662 2007-09-21 Wojciech Polak <polak@gnu.org>
4663
4664 Add Bison XML Automaton Report.
4665
4666 Add support for an -x option to generate an XML report.
4667 It is not documented yet.
4668 * src/print-xml.c: New file.
4669 * src/print-xml.h: Likewise.
4670 * lib/timevar.def (TV_XML): New var.
4671 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4672 * src/conflicts.c: Include print-xml.h.
4673 (solved_conflicts_xml_obstack): New var.
4674 (log_resolution, conflicts_solve, conflicts_free):
4675 Add support for XML report.
4676 (conflicts_output_val): New function.
4677 * src/conflicts.h (conflicts_output_val): New decl.
4678 * src/files.c (spec_xml_file): New var.
4679 (compute_output_file_names, output_file_names_free): Add XML support.
4680 * src/files.h (spec_xml_file): New decl.
4681 * src/getargs.c (xml_flag): New var.
4682 (usage, short_options, long_options, getargs): Add XML support.
4683 * src/getargs.h (xml_flag): New decl.
4684 * src/gram.c: Include print-xml.h.
4685 (rule_lhs_print_xml, rule_rhs_print_xml):
4686 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4687 New functions.
4688 * src/gram.h: Declare external ones.
4689 * src/main.c: Include print-xml.h.
4690 (main): Add XML support.
4691 * src/reduce.c: Include print-xml.h.
4692 (reduce_xml): New function.
4693 * src/reduce.h: Declare it.
4694 * src/state.c: Include print-xml.h.
4695 (state_new): Add XML support.
4696 (state_rule_lookahead_tokens_print_xml): New function.
4697 * src/state.h: Declare it.
4698 (struct state): New member solved_conflicts_xml.
4699 * src/symtab.c (symbol_class_get_string): New function.
4700 * src/symtab.h: Declare it.
4701
4702 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4703
4704 * GNUmakefile: Switch to coreutils's version.
4705 * bootstrap: Likewise.
4706 * Makefile.cfg: Adjust to new GNUmakefile.
4707 * README-hacking: Likewise.
4708
4709 Import from gnulib:
4710
4711 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4712 Bruno Haible <bruno@clisp.org>
4713
4714 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4715 and is a script that invokes bison. Tighten the code. Add comments.
4716
4717 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4718
4719 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4720 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4721 * doc/bison.texinfo (Decl Summary): Fix.
4722 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4723 * tests/input.at (Boolean %define variables): Update output.
4724 * tests/skeletons.at (%define boolean variables: invalid skeleton
4725 defaults): Rename to...
4726 (%define Boolean variables: invalid skeleton defaults): ... this and
4727 update output.
4728
4729 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4730
4731 In impure push mode, don't allow more than one yypstate to be allocated
4732 since multiple impure parsers would corrupt yynerrs.
4733 * data/push.c (yypstate_allocated): New static global variable
4734 initialized to 0.
4735 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4736 exhaustion if yypstate_allocated is 1, but still return 2.
4737 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4738 already 1. Otherwise, set it to 1.
4739 (yypstate_delete): Set it to 0.
4740 * tests/push.at (Push Parsing: Multiple impure instances): New test
4741 case.
4742
4743 2007-08-17 Bob Rossi <bob@brasko.net>
4744
4745 * doc/bison.texinfo (Push Decl): Document the push parser.
4746 (Table of Symbols): Ditto.
4747 (Pure Decl): Ditto.
4748 (Decl Summary): Ditto.
4749 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4750 Parser Create Function, Parser Delete Function):
4751 Add new push parser symbols.
4752 (Table of Symbols): Document push-parser, push-pull-parser,
4753 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4754
4755 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4756
4757 Update to GPLv3.
4758 * doc/gpl-3.0.texi: New file.
4759 * doc/gpl.texi: Remove.
4760 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4761 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4762 * README-hacking, TODO, bootstrap, bootstrap.conf:
4763 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4764 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4765 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4766 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4767 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4768 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4769 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4770 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4771 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4772 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4773 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4774 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4775 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4776 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4777 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4778 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4779 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4780 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4781 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4782 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4783 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4784 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4785 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4786 * src/complain.c, src/complain.h, src/conflicts.c:
4787 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4788 * src/files.h, src/flex-scanner.h, src/getargs.c:
4789 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4790 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4791 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4792 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4793 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4794 * src/print.c, src/print.h, src/print_graph.c:
4795 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4796 * src/reduce.h, src/relation.c, src/relation.h:
4797 * src/revision.h, src/scan-code.h, src/scan-code.l:
4798 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4799 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4800 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4801 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4802 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4803 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4804 * tests/existing.at, tests/glr-regression.at:
4805 * tests/headers.at, tests/input.at, tests/java.at:
4806 * tests/local.at, tests/output.at, tests/push.at:
4807 * tests/reduce.at, tests/regression.at, tests/sets.at:
4808 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4809 * tests/torture.at:
4810 Update to GPLv3.
4811
4812 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4813
4814 Get rid of broken %no-parser, -n, and --no-parser implementation and
4815 documentation.
4816 * TODO: Don't mention them.
4817 * doc/bison.1: Likewise.
4818 * doc/bison.texinfo (Decl Summary): Likewise.
4819 (Bison Options): Likewise.
4820 (Option Cross Key): Likewise.
4821 * src/getargs.c (no_parser_flag): Remove global variable.
4822 (usage): Don't print description of -n and --no-parser.
4823 (long_options): Remove --no-parser entry here.
4824 (getargs): Remove -n case in the switch here.
4825 * src/getargs.h (no_parser_flag): Remove extern.
4826 * tests/regression.at (Web2c Actions): Remove comment that mentions
4827 --no-parser.
4828
4829 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4830
4831 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4832 name user variables starting with `yy'. Just pass NULL instead of a
4833 dummy local &yylval to yypush_parse.
4834 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4835 starting with `yy'.
4836
4837 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4838
4839 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4840 true since it's then always used regardless of whether yyoverflow is
4841 defined. Reported by Christian Burger at
4842 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4843 * THANKS: Add Christian Burger.
4844
4845 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4846 node names: say "Decl Summary" not "Bison Declaration Summary".
4847
4848 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4849
4850 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4851 determine whether this function has already complained about an invalid
4852 value for a %define boolean variable, don't check whether Bison has
4853 ever examined the value. As written, the check was a tautology.
4854 Instead, record and check for this complaint using a separate muscle.
4855
4856 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4857
4858 Fix push parsing memory leak reported by Brandon Lucia at
4859 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4860 * THANKS: Add Brandon Lucia.
4861 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4862 but the parse never completed and thus freed it.
4863 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4864 * tests/testsuite.at: Include push.at.
4865 * test/push.at: New.
4866 (Push Parsing: Memory Leak for Early Deletion): New test case.
4867
4868 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4869
4870 Improve handling of multiple S/R conflicts in the same state and of S/R
4871 conflicts involving multiple reductions.
4872 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4873 set for a state here or Bison will abort if it is reassigned on a
4874 later conflicted reduction in the same state.
4875 Similarly, don't finalize and assign the solved conflicts report here
4876 or it will be lost if it is reassigned on a later conflicted reduction
4877 in the same state.
4878 (set_conflicts): Instead, assign them both here after all S/R conflicts
4879 in the state have been fully examined.
4880 * src/print.c (shift_set): Rename to...
4881 (no_reduce_set): ... this.
4882 (print_reductions): Update for rename, and add %nonassoc error action
4883 tokens to no_reduce_set so that, when printing the first remaining
4884 reduction on an error action token, the reduction is enclosed in
4885 brackets.
4886 (print_results): Update for rename.
4887 * tests/conflicts.at (Solved conflicts report for multiple reductions
4888 in a state): New test case.
4889 (%nonassoc error actions for multiple reductions in a state): New test
4890 case.
4891
4892 * src/main.c (main): Don't depend on C99 features.
4893
4894 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4895
4896 * build-aux/.cvsignore: Add compile.
4897 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4898 uniwidth.
4899
4900 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4901
4902 * bootstrap (slurp): Create target directories that don't exist.
4903 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4904
4905 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4906
4907 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4908 than item number.
4909 * closure.c (closure): Likewise.
4910 * state.h (reductions): Comment sorting of rules.
4911 (state): Comment sorting of items.
4912
4913 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4914
4915 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4916 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4917 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4918 definition in order to avoid Gnulib headers since we don't use config.h
4919 here.
4920 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4921 rather than AT_DATA so that config.h is included.
4922
4923 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4924
4925 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4926 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4927 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4928 and so that YYFPRINTF is guaranteed to be defined here.
4929
4930 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4931
4932 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4933 with...
4934 (muscle_percent_define_check_values): ... this more helpful function.
4935 Again, it's not used yet, but it will be.
4936 * src/muscle_tab.h: Likewise.
4937
4938 Improve some comments in parser table construction.
4939 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4940 (generate_states): Don't mention ruleset, which is internal to closure.
4941 * src/closure.c (closure): Explain sorting of core and itemset, which
4942 is required for this function to behave correctly.
4943 * src/closure.h (closure): Mention sorting.
4944
4945 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4946
4947 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4948 move the check for disabled transitions to an aver since conflict
4949 resolution hasn't happened yet.
4950
4951 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4952 labels a state as inconsistent just because it has error transitions.
4953 The original form of this check appeared in revision 1.1 of lalr.c,
4954 which was committed on 1991-12-21. Now (at least), changing the
4955 consistency label on such a state appears to have no useful effect in
4956 any of the places it is examined, which I enumerate below. The key
4957 point to understanding each item in this enumeration is that a state
4958 with an error transition is labelled consistent in the first place only
4959 if it has no rules, so the check cannot matter for states that have
4960 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4961 to try to identify its conflicts, and a state must have *rules* to have
4962 conflicts. (2) Labelling a state as inconsistent will affect how
4963 action_row sets the default *rule* for the state. (3) Labelling a
4964 state as inconsistent will cause build_relations to add lookback edges
4965 to *rules* in that state.
4966 * src/state.h (struct state): Word the comment for member consistent
4967 more carefully.
4968
4969 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4970
4971 Don't depend on C99 features.
4972 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4973 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4974 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4975 * src/state.c (state_mark_reachable_states): Fix for-loop.
4976 (state_remove_unreachable_states): Fix for-loop.
4977
4978 Don't widen struct state with member reachable just to temporarily
4979 record reachability. Instead, use a local bitset.
4980 * src/state.h (struct state): Remove member.
4981 * src/state.c (state_new): Don't initialize it.
4982 (state_mark_reachable_states): Rename to...
4983 (state_record_reachable_states): ... this, and use bitset.
4984 (state_remove_unreachable_states): Use bitset.
4985
4986 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4987
4988 * src/Makefile.am (yacc): Quote target action commands properly so
4989 that the yacc script isn't corrupt. Reported by Hans Aberg at
4990 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4991
4992 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4993 the case of pure parsers. Reported by Frans Englich at
4994 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4995 * THANKS: Add Frans Englich.
4996
4997 * NEWS (2.3a+): In the %code entry, reference section `Bison
4998 Declaration Summary' from the manual now since the %code summary has
4999 moved there.
5000 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5001 in the rules section must be terminated by semicolons.
5002
5003 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5004
5005 Extend the front-end API for %define variables to more completely
5006 mirror the back-end. This will be useful in the future.
5007 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5008 Update comments to mention the new front-end counterparts of these
5009 macros.
5010 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5011 for muscle_string_decode and muscle_location_decode.
5012 (muscle_string_decode): New static function.
5013 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5014 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5015 functions.
5016 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5017 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5018 implementation more closely.
5019 (muscle_percent_define_invalid_value): New function.
5020 * src/muscle_tab.h (muscle_percent_define_get,
5021 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5022 Prototype.
5023
5024 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5025
5026 * NEWS (2.3a+): Mention yesterday's state-removal change.
5027 (2.3a): Remove the %language entry, which was added after 2.3a.
5028 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5029 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5030 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5031 tests/existing.at: Update copyright date.
5032
5033 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5034
5035 If conflict resolution makes states unreachable, remove those states,
5036 report rules that are then unused, and don't report conflicts in those
5037 states.
5038 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5039 New global function.
5040 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5041 function.
5042 * src/main.c (main): After conflict resolution, remove the unreachable
5043 states and update all data structures that reference states by number.
5044 * src/state.c (state_new): Initialize each state's reachable member to
5045 false.
5046 (state_mark_reachable_states): New static function.
5047 (state_remove_unreachable_states): New global function.
5048 * src/state.h (struct state): Add member bool reachable.
5049 (state_remove_unreachable_states): Prototype.
5050 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5051 New test case.
5052 * tests/existing.at (GNU pic Grammar): Update test case output now that
5053 an unused rule is discovered.
5054
5055 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5056
5057 Minor code cleanup in parser table construction.
5058 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5059 (new_itemsets, save_reductions): Update for rename to nitemset.
5060 * src/closure.c (nritemset): Rename to...
5061 (nitemset): ... this since the "r" appears to meaningless and isn't
5062 used in the comments.
5063 (closure): Update for rename.
5064 * src/closure.h (nritemset): Update extern to...
5065 (nitemset): ... this.
5066 * src/lalr.c (LA): Fix a typo in comments.
5067 * src/print.c (print_core): Update for rename to nitemset.
5068 * src/print_graph.c (print_graph): Likewise.
5069 * src/state.h: Fix some typos in header comments.
5070
5071 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5072
5073 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5074 still sticks to ASCII. Sorry!
5075
5076 * README-hacking: New file, taken mostly from coreutils, with changes
5077 for Bison. Contains much of the contents of:
5078 * README-cvs: Remove.
5079 * bootstrap: Sync from gnulib.
5080 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5081 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5082
5083 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5084
5085 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5086 Setzer.
5087 (Java Differences): Fix some typos.
5088 * THANKS: Add Sebastian Setzer.
5089
5090 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5091
5092 * data/java.m4 (b4_single_class_if): Remove.
5093 (b4_abstract_if): Look at "%define abstract".
5094 (b4_lexer_if): New.
5095 (b4_union_name): Rename...
5096 (b4_yystype): ... to this. Map to "%define stype".
5097 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5098 b4_maybe_throws): Fix quoting.
5099 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5100 * data/lalr1.java (Lexer interface): Always define.
5101 (Lexer interface within parser class): Remove.
5102 (YYLexer class): New, used when "%code lexer" is present.
5103 (constructor): When "%code lexer" is used, pass %lex-param
5104 to the lexer constructor.
5105 (yylex, yyparse): Remove %lex-param from method invocations
5106 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5107
5108 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5109 abstract". Rename "%define union_name" to "%define stype".
5110 Rename method names according to previous patch.
5111 (Java Scanner Interface): Describe "%code lexer" instead of
5112 "%pure-parser" and "%define single_class".
5113 (Java Differences): Mention "%code lexer".
5114
5115 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5116 Include scanner here, using macros from tests/local.at.
5117 (AT_DATA_CALC_Y): Remove final argument.
5118 (_AT_CHECK_JAVA_CALC): Likewise.
5119 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5120 of %locations and %error-verbose.
5121 (main): Test with and without %lex-param.
5122 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5123 (AT_BISON_OPTION_POPDEFS): Pop it.
5124
5125 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5126
5127 DJGPP spefic issue. Inhibit the use of disallowed characters for
5128 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5129 and concern testsuite case 46.
5130 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5131 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5132 * djgpp/config.bat: Inhibit the use of disallowed characters.
5133
5134 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5135
5136 Miscellaneous %define and %code cleanup.
5137 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5138 values are interpreted.
5139 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5140 documentation a little more.
5141 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5142 muscle_percent_define_insert, muscle_percent_code_grow): New
5143 functions/macros.
5144 * src/muscle_tab.h (muscle_percent_define_insert,
5145 muscle_percent_code_grow): Prototype.
5146 * src/parse-gram.y (prologue_declaration): Use
5147 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5148 %define and %code directives.
5149
5150 Make it easy to share %define boolean variables between the front-end
5151 and back-end. Though not used yet, this will be useful in the future.
5152 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5153 Bison uses of names rather than just skeleton uses of names.
5154 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5155 b4_percent_define_skeleton_variables(VARIABLE) to
5156 b4_percent_define_bison_variables(VARIABLE).
5157 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5158 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5159 b4_percent_code_bison_qualifiers(QUALIFIER).
5160 (b4_check_user_names_wrap): Update for renames.
5161 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5162 muscle_percent_define_default): New functions mimicking
5163 b4_percent_define_flag_if and b4_percent_define_default.
5164
5165 For %define variables, report locations for invalid values and
5166 redefinitions.
5167 * data/bison.m4 (b4_percent_define_flag_if): Read
5168 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5169 value for VARIABLE.
5170 (b4_percent_define_default): Save a special location in
5171 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5172 must later be reported as invalid.
5173 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5174 functions.
5175 (muscle_percent_define_insert): Record the location of VARIABLE in
5176 muscle percent_define_loc(VARIABLE), and use it to report the previous
5177 location for a redefinition.
5178 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5179 (muscle_percent_define_default): Update like b4_percent_define_default.
5180 (muscle_grow_user_name_list): Rename to...
5181 (muscle_user_name_list_grow): ... this for consistency and use
5182 muscle_location_grow.
5183 * src/muscle_tab.h (muscle_location_grow): Prototype.
5184 * tests/input.at (%define errors): Update expected output.
5185 * tests/skeletons.at (%define boolean variables: invalid skeleton
5186 defaults): New test case.
5187
5188 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5189
5190 * src/print.c (lookahead_set, state_default_rule): Remove.
5191 (print_reductions): Replace state_default_rule invocation with
5192 equivalent use of yydefact, which was computed in token_actions in
5193 tables.c.
5194 (print_results): Don't allocate lookahead_set.
5195
5196 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5197
5198 * data/lalr1.java: Prefix all private members with yy.
5199
5200 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5201
5202 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5203 Sebastien Fricker at
5204 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5205 * THANKS: Add Sebastien Fricker.
5206 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5207 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5208 accept a variable number of arguments.
5209
5210 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5211
5212 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5213
5214 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5215
5216 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5217 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5218 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5219
5220 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5221
5222 Undo my 2007-02-07 change, switching back to the c-strcase module
5223 introduced in the 2007-02-03 change. Bruno Haible reported that
5224 the 2007-02-07 change would be dangerous in Turkish if we add a
5225 language whose name contains "i", since "i" is not lowercase "I"
5226 in Turkish.
5227 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5228 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5229 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5230 * m4/.cvsignore: Remove strcase.m4.
5231 * src/getargs.c: Revert 2007-02-07 change, as follows.
5232 Include c-strcase.h.
5233 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5234
5235 2007-02-11 Bruno Haible <bruno@clisp.org>
5236
5237 Enable the Java related testsuite tests when the only Java compiler
5238 found is a gcj < 4.3. Discussed at
5239 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5240 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5241
5242 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5243
5244 * data/Makefile.am: Update copyright date.
5245 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5246 yypstate_new returns NULL.
5247 (yypstate_new): Return NULL if malloc does.
5248 * src/reader.c (packgram): Move translation of rule actions from the
5249 beginning of packgram to...
5250 (check_and_convert_grammar): ... here right before packgram is invoked
5251 so it's easier to write more complete comments, and remove redundant
5252 code.
5253
5254 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5255
5256 As in semantic actions, make @$ in %initial-action, %destructor, and
5257 %printer imply %locations.
5258 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5259 scanning @$.
5260 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5261 (@$ in %initial-action implies %locations,
5262 @$ in %destructor implies %locations,
5263 @$ in %printer implies %locations): ... these new test cases.
5264
5265 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5266
5267 Undo most of the 2007-02-03 change, switching to the strcase module
5268 now that gnulib strcase has been fixed.
5269 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5270 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5271 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5272 * m4/.cvsignore: Add strcase.m4.
5273 * src/getargs.c: Revert 2007-02-03 change, as follows.
5274 Don't include c-strcase.h.
5275 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5276 strcasecmp has "unspecified behavior" outside the POSIX locale,
5277 but it works fine in practice if at least one argument is ASCII,
5278 as is the case in Bison.
5279
5280 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5281
5282 * tests/java.at: Skip tests if only one of javac/java is present.
5283 Reported by Joel E. Denny.
5284 * tests/atlocal.in: Adjust copyright years.
5285
5286 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5287
5288 * data/lalr1.java (Stack): Work around old verifiers that disallow
5289 access to the private fields of an inner class, from the outer class.
5290 We can make Stack's fields public because user code doesn't have access
5291 to the instance of Stack used by parse(). Reported by Paul Eggert.
5292
5293 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5294
5295 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5296 the right spot for these files?
5297 * bootstrap.conf (gnulib_modules): Add c-strcase.
5298 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5299 c-strncasecmp.c.
5300 * src/getargs.c: Include c-strcase.h.
5301 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5302 to avoid unspecified behavior.
5303
5304 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5305
5306 * doc/bison.texinfo (Decl Summary): Correct typo.
5307
5308 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5309
5310 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5311 Complain if the value does not match empty, "true" or "false".
5312 * data/c++.m4: Adjust default definitions of %define variables.
5313 * data/java.m4: Adjust default definitions of %define variables.
5314 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5315 to above behavior.
5316 * tests/input.at (Boolean %define variables): Test new behavior.
5317
5318 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5319
5320 * NEWS: Mention java.
5321 * TODO: Remove things that are done.
5322 * bootstrap.conf: Add javacomp-script and javaexec-script.
5323 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5324
5325 * data/Makefile.am: Add new files.
5326 * data/java-skel.m4: New.
5327 * data/java.m4: New.
5328 * data/lalr1.java: New.
5329
5330 * doc/bison.texinfo: Put "A Complete C++ Example" under
5331 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5332 under Other Languages.
5333
5334 * src/getargs.c (valid_languages): Add Java.
5335 * src/getargs.h (struct bison_language): Update size of string fields.
5336
5337 * tests/Makefile.am: Add java.at.
5338 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5339 * tests/java.at: New.
5340 * tests/testsuite.at: Include it.
5341
5342 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5343
5344 Clean up.
5345 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5346 at_directive_argv arguments so these no longer have to be global
5347 variables. Also, update the implementation for the following changes.
5348 (fail_for_at_directive_too_many_args,
5349 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5350 (at_directive_name): Remove as at_directive_argv[0] will be used for
5351 this now.
5352 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5353 for the directive name.
5354 (at_directive_argc, at_directive_argv): Make these local within
5355 skel_lex instead of global.
5356 (INITIAL): Update directive start action for above changes.
5357 (SC_AT_DIRECTIVE_ARG): Rename to...
5358 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5359 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5360 (scan_skel): Move yylex_destroy to...
5361 (skel_scanner_free): ... here.
5362 * tests/skeletons.at (installed skeleton file name): Rename to...
5363 (installed skeleton file names): ... this.
5364
5365 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5366
5367 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5368 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5369 Summary" not "Directives".
5370 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5371 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5372 since the former is now the more complete one.
5373 (Prologue Alternatives): Likewise and do the same for %defines.
5374 (Table of Symbols): Add summary of %code, add summary of %define, and
5375 move full %code documentation to...
5376 (Decl Summary): ... here for consistency with other entries in these
5377 sections.
5378 Move %define entry in order to keep this list alphabetized.
5379 Reword %define entry a little to put less emphasis on the skeleton
5380 concept, which most users shouldn't have to think about.
5381
5382 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5383
5384 Adjust to recent gnulib changes.
5385 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5386 Add string.h, string_.h, unistd_.h, wchar_.h.
5387 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5388 * src/system.h: Don't include <stpcpy.h>; this is now done by
5389 <string.h>.
5390
5391 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5392
5393 Simplify implementation of unqualified %code, implement macros for
5394 uniform treatment of boolean %define flags. Document %define.
5395 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5396 b4_percent_code_ifdef): New.
5397 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5398 * data/c++.m4: Define default value for global_tokens_and_yystype.
5399 * data/glr.cc: Likewise.
5400 * data/location.cc: Use b4_percent_define_flag_if.
5401
5402 * doc/bison.texinfo (Decl Summary): Document %define.
5403
5404 * src/parse-gram.y (Unqualified %code): Change muscle name to
5405 b4_percent_code().
5406 (content.opt): Default to empty.
5407
5408 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5409
5410 Implement support for relative and absolute skeleton file names.
5411 Discussed starting at
5412 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5413 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5414 (Bison Options): Document in --skeleton entry.
5415 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5416 full_skeleton can't necessarily hold all of pkgdatadir.
5417 If the specified skeleton file name contains a `/', don't prepend
5418 pkgdatadir.
5419 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5420 file name contains a `/', prepend the grammar file directory.
5421 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5422 * skeletons.at: New file.
5423 (relative skeleton file names): New test case.
5424 (installed skeleton file names): New test case.
5425 * tests/testsuite.at: Include skeletons.at.
5426
5427 * bootstrap: Update copyright to 2007.
5428
5429 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5430
5431 * bootstrap: Remove occurrences of .#bootmp from the files.
5432
5433 2007-01-17 Akim Demaille <akim@epita.fr>
5434
5435 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5436 nonterminals.
5437 Use per-type %printer.
5438
5439 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5440
5441 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5442 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5443 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5444 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5445 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5446 tests/glr-regression.at, tests/input.at, tests/local.at,
5447 tests/output.at, tests/torture.at: Update copyright to 2007.
5448
5449 2007-01-16 Akim Demaille <akim@epita.fr>
5450
5451 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5452 error code.
5453 (Calc++ Scanner): Exit with failure if we can't open the input
5454 file.
5455 Accept "-" standing for stdin.
5456 (Calc++ Top Level): Print the result only if the parsing was
5457 successful.
5458
5459 2007-01-16 Akim Demaille <akim@epita.fr>
5460
5461 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5462
5463 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5464 and Joel E. Denny <jdenny@ces.clemson.edu>
5465
5466 Clean up %define and %code implementation in M4 some. Most
5467 importantly, rename all related macros to be in the b4_percent_define
5468 and b4_percent_code namespaces. Also, complete support for `.' in
5469 %define variable names and %code qualifiers.
5470 * data/bison.m4 (b4_check_user_names): Check for special
5471 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5472 m4_foreach loops.
5473 (b4_get_percent_define, b4_get_percent_code): Rename to...
5474 (b4_percent_define_get, b4_percent_code_get): ... these.
5475 Extend documentation with examples.
5476 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5477 b4_percent_define_skeleton_variables and
5478 b4_percent_code_skeleton_qualifiers.
5479 Expect any value for the %define variable `foo' to be stored in the
5480 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5481 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5482 expect any unqualified %code blocks to be stored in a macro named
5483 `b4_percent_code_unqualified'.
5484 Use m4_indir so that %define variable names and %code qualifiers can
5485 contain `.', which is allowed by the grammar parser.
5486 (b4_percent_define_default): New macro to set a default value for a
5487 %define variable.
5488 (m4_wrap): Update wrapped code, and fix some underquoting.
5489 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5490 Expect grammar uses of %define variables and %code qualifiers to be
5491 defined in b4_percent_define_user_variables and
5492 b4_percent_code_user_qualifiers.
5493 * data/c++.m4: Use b4_percent_define_default rather than
5494 m4_define_default. Fix some underquoting. Skeleton usage of %define
5495 variable define_location_comparison now implies skeleton usage of
5496 %define variable filename_type.
5497 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5498 data/push.c, data/yacc.c: Update macro names.
5499 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5500 muscle names.
5501
5502 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5503
5504 DJGPP specific issues.
5505
5506 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5507 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5508
5509 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5510
5511 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5512 run parsers in all tests so that Valgrind is invoked during
5513 maintainer-check-valgrind.
5514 (Duplicate representation of merged trees): Free all semantic values.
5515 (Duplicated user destructor for lookahead): Likewise.
5516
5517 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5518
5519 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5520 command-line prefix.
5521 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5522 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5523 miss Valgrind messages.
5524 (Exploding the Stack Size with Malloc): Likewise.
5525
5526 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5527
5528 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5529 locals. Reported by Juan Manuel Guerrero at
5530 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5531 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5532 Fix some indentation also.
5533 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5534 explaining this issue.
5535
5536 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5537 and Joel E. Denny <jdenny@ces.clemson.edu>
5538
5539 Simplify union and prologue handling, and escape union and lex/parse
5540 params with digraphs.
5541 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5542 values to the empty string since these are no longer guaranteed
5543 initialized by the front-end.
5544 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5545 braces around b4_user_stype since this is no longer done by the
5546 front-end.
5547 * src/files.c, src/files.h (pre_prologue_obstack,
5548 post_prologue_obstack): Remove.
5549 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5550 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5551 with digraphs. This fixes lex params and parse params.
5552 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5553 * src/output.c (prepare): Remove muscle insertion of the prologues.
5554 (output): Remove freeing of pre_prologue_obstack and
5555 post_prologue_obstack.
5556 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5557 than prologue_augment for prologue parsing so you don't need prologue
5558 obstacks.
5559 (grammar_declaration): For %union RHS, use `braceless' instead of
5560 "{...}" so that braces are already stripped and code is escaped with
5561 digraphs.
5562 * src/reader.c (prologue_augment): Remove.
5563 (reader): Remove initialization of pre_prologue_obstack and
5564 post_prologue_obstack.
5565 * src/reader.h (prologue_augment): Remove.
5566
5567 * data/c.m4: Remove stray parenthesis.
5568
5569 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5570
5571 Remove quotes from variables names in %define directives and from
5572 qualifiers in %code directives, and restrict the characters that are
5573 allowed in them to M4-friendly ones. For %define, continue to support
5574 the quoted form as a deprecated feature. Discussed starting at
5575 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5576 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5577 %code.
5578 * doc/bison.texinfo (Prologue Alternatives): Update.
5579 (Decl Summary): In %defines entry, update mention of `%code requires'
5580 and `%code provides'.
5581 (C++ Location Values): Update %define uses.
5582 (Calc++ Parser Interface): Likewise.
5583 (Calc++ Parser): Likewise, and update `%code requires' uses.
5584 (Table of Symbols): Update %code documentation.
5585 * src/parse-gram.y (prologue_declaration): For %define variables, use
5586 `variable' instead of `STRING'.
5587 (grammar_declaration): For %code qualifiers, use `ID' instead of
5588 `STRING'.
5589 (variable): New nonterminal that takes an `ID' or a `STRING'.
5590 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5591 and %define uses.
5592 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5593 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5594 (%define errors): Update %define uses.
5595
5596 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5597
5598 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5599 instead of muscle_insert for %define values so that M4-special
5600 characters are replaced with digraphs.
5601 * tests/input.at (%define errors): Extend to check weird values.
5602
5603 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5604
5605 Instead of having skeletons declare all valid %define variables and
5606 %code qualifiers, provide macros that retrieve the associated values
5607 and build these lists automatically. Thus Bison will now warn when a
5608 variable or qualifier is not used by the skeleton in the current
5609 invocation regardless of whether it might sometimes be used by that
5610 skeleton in other invocations. Also, move all %define value macros to
5611 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5612 form, which is replaced by %code.
5613 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5614 (b4_check_user_names): ... this, and change the series of valid name
5615 arguments to a single list argument for names used in the skeleton
5616 similar to the existing list argument for names used in the grammar.
5617 Warn instead of complaining.
5618 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5619 values and %code code, to format %code code properly, and to build
5620 lists of all %define variables and %code qualifiers used in the
5621 skeleton: b4_skeleton_percent_define_variables and
5622 b4_skeleton_percent_code_qualifiers.
5623 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5624 Remove, and...
5625 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5626 the skeleton names lists can finish building first. In place of
5627 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5628 expect the lists b4_user_percent_define_variables and
5629 b4_user_percent_code_qualifiers.
5630 * data/c++.m4: Where setting default values for b4_parser_class_name,
5631 b4_location_type, b4_filename_type, b4_namespace, and
5632 b4_define_location_comparison, update their names to the
5633 b4_percent_define_ namespace.
5634 * data/glr.c: Don't use b4_check_percent_define_variables and
5635 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5636 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5637 (b4_parser_class_name, b4_namespace): Define these using
5638 b4_get_percent_define for parser_class_name and namespace.
5639 * data/location.cc: Use b4_get_percent_define.
5640 * data/push.c: Don't use b4_check_percent_define_variables and
5641 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5642 * data/yacc.c: Likewise, and don't call m4_exit in
5643 b4_use_push_for_pull_if or m4_wrap code will never execute.
5644 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5645 Rename to...
5646 (muscle_grow_user_name_list): ... this for consistency with the
5647 terminology used in bison.m4.
5648 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5649 %define variable names, and rename muscle used_percent_define_variables
5650 to user_percent_define_variables.
5651 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5652 user_percent_code_qualifiers.
5653 (content): Remove.
5654 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5655 {CODE} form is no longer accepted.
5656 * tests/input.at (Reject bad %code qualifiers): Rename to...
5657 (Reject unused %code qualifiers): ... this, and update test output.
5658 (%define error): Update test output.
5659
5660 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5661
5662 Check for unrecognized %define variables similar to checking for
5663 unrecognized %code qualifiers. Check for redefined %define variables.
5664 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5665 generalizes...
5666 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5667 (b4_check_percent_define_variables): New, also wraps it.
5668 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5669 variables using b4_check_percent_define_variables.
5670 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5671 all those exercised in the test suite and all those listed in the
5672 `Default values' section of c++.m4. Are there others?
5673 * data/push.c, data/yacc.c: Declare no valid %define variables.
5674 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5675 similar to muscle_find, but it works even when the muscle stores a
5676 const value.
5677 (muscle_grow_used_name_list): New function for constructing the used
5678 name list muscles that b4_check_for_unrecognized_names requires.
5679 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5680 %define'd more than once. Define the b4_used_percent_define_variables
5681 muscle with muscle_grow_used_name_list.
5682 (grammar_declaration): Abbreviate %code code with
5683 muscle_grow_used_name_list.
5684 * tests/input.at (%define errors): New.
5685
5686 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5687
5688 Provide warn_at, complain_at, and fatal_at function callbacks to the
5689 skeletons, and use this for %code qualifier complaints.
5690 * data/bison.m4 (b4_error_at): New, invoked by...
5691 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5692 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5693 @fatal_at(...@) directives.
5694 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5695 qualifiers in b4_used_percent_code_qualifiers and to use
5696 b4_complain_at.
5697 * src/location.c, src/location.h (boundary_set_from_string): New global
5698 function.
5699 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5700 function.
5701 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5702 to b4_used_percent_code_qualifiers.
5703 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5704 function.
5705 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5706 (lineno): Rename to...
5707 (out_lineno): ... this so I don't misunderstand it again.
5708 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5709 here; these newlines are in the input but not the output file.
5710 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5711 (at_directive_perform): ... this new static function, and add handling
5712 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5713 directives.
5714 * tests/input.at (Reject bad %code qualifiers): Update test output with
5715 locations and extend.
5716
5717 * tests/output.at (Output file name: [, Output file name: ]): Remove
5718 bogus comment about these tests failing.
5719
5720 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5721
5722 Clean up b4_check_percent_code_qualifiers a little.
5723 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5724 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5725 documentation and add examples.
5726 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5727 qualifiers here.
5728
5729 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5730
5731 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5732 unreliable -- especially when they're hidden inside another macro.
5733 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5734 data/c.m4: Remove m4_divert(-1).
5735 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5736 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5737 m4_divert_push(0) and m4_divert_pop(0).
5738 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5739 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5740 pushed and popped by m4sugar, should be first on the stack.
5741
5742 Provide warn, complain, and fatal function callbacks to the skeletons.
5743 This provides more flexibility than m4_fatal, improves the error
5744 message format, and captures messages for translation. Discussed
5745 starting at
5746 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5747 * data/bison.m4 (b4_error): New, invoked by...
5748 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5749 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5750 directives. Because these M4 macros might be called when the current
5751 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5752 the previous removal of uses of m4_divert, which caused trouble.
5753 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5754 m4_fatal to report unrecognized %code qualifiers.
5755 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5756 push parser requests.
5757 * data/glr.c: Use b4_complain instead of m4_fatal to report
5758 non-deterministic push parser requests.
5759 Update @output usage to @output(...@) form.
5760 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5761 report missing %defines. Update @output usage to @output(...@) form.
5762 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5763 @output(...@) form.
5764 * src/main.c (main): Invoke skel_scanner_free.
5765 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5766 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5767 obstack_for_string from flex-scanner.h.
5768 (YY_DECL): Use to declare skel_lex static.
5769 (decode_at_digraphs): Remove; now handled in the new
5770 SC_AT_DIRECTIVE_ARG start condition.
5771 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5772 functions.
5773 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5774 at_directive_argv): New static globals.
5775 (INITIAL): Use fail_for_invalid_at.
5776 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5777 recognize the start of a generalized `@directive(...@)' form and
5778 start...
5779 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5780 directive args (using the new obstack_for_string), to decode the
5781 contained @ diagraphs, and to perform the directive. It recognizes
5782 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5783 @output(...@).
5784 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5785 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5786 `@,'.
5787 (scan_skel): Initialize obstack_for_string on the first call.
5788 (skel_scanner_free): New function to free obstack_for_string.
5789 * tests/input.at (Reject bad %code qualifiers): Update test output.
5790
5791 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5792
5793 Consolidate the 4 prologue alternative directives (%code, %requires,
5794 %provides, and %code-top) into a single %code directive with an
5795 optional qualifier field. Discussed at
5796 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5797 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5798 alternatives.
5799 * doc/bison.texinfo (Prologue Alternatives): Update.
5800 (Decl Summary): Update to %code "requires" and %code "provides".
5801 (Calc++ Parser): Update to %code "requires".
5802 (Table of Symbols): Remove entries for %requires, %provides, and
5803 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5804 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5805 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5806 which are skeleton-specific.
5807 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5808 declare what %code qualifiers it supports and to complain if any other
5809 qualifiers were used in the grammar.
5810 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5811 and b4_user_code([b4_percent_code_provides]) in place of
5812 b4_user_requires and b4_user_provides.
5813 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5814 Add b4_user_code([b4_percent_code_top]) and
5815 b4_user_code([b4_percent_code]).
5816 Invoke b4_check_percent_code_qualifiers.
5817 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5818 PERCENT_REQUIRES): Remove.
5819 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5820 %requires. Rewrite the %code RHS as the unqualified form defining the
5821 muscle b4_percent_code. Add another RHS for the qualified %code form,
5822 which defines muscles of the form b4_percent_code_QUALIFIER and the
5823 b4_used_percent_code_qualifiers muscle.
5824 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5825 PERCENT_REQUIRES): Remove.
5826 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5827 %code "requires" and %code "provides".
5828 * tests/input.at (Reject bad %code qualifiers): New.
5829
5830 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5831
5832 Use the new code_props interface for destructors and printers.
5833 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5834 printer_location members, and change the type of the destructor and
5835 printer members to code_props.
5836 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5837 symbol_printer_get, semantic_type_destructor_set,
5838 semantic_type_printer_set, default_tagged_destructor_set,
5839 default_tagless_destructor_set, default_tagged_printer_set,
5840 default_tagless_printer_set): Use code_props in arguments and return
5841 types in place of char const * and location.
5842 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5843 since the locations are now contained in the return of
5844 symbol_destructor_get and symbol_printer_get.
5845 * src/output.c (symbol_destructors_output, symbol_printers_output):
5846 Replace with...
5847 (symbol_code_props_output): ... this to eliminate duplicate code.
5848 (output_skeleton): Update to use symbol_code_props_output.
5849 * src/reader.c (symbol_should_be_used): Update use of
5850 symbol_destructor_get.
5851 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5852 Update uses of the various _destructor_set and _printer_set functions.
5853 * src/symtab.c: (default_tagged_destructor_location,
5854 default_tagless_destructor_location, default_tagged_printer_location,
5855 default_tagless_printer_location): Remove since we...
5856 (default_tagged_destructor, default_tagless_destructor,
5857 default_tagged_printer, default_tagless_printer): ... change the type
5858 of these to code_props.
5859 (symbol_new, semantic_type_new, symbol_destructor_set,
5860 semantic_type_destructor_set, symbol_destructor_get,
5861 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5862 symbol_check_alias_consistency, default_tagged_destructor_set,
5863 default_tagless_destructor_set, default_tagged_printer_set,
5864 default_tagless_printer_set): Update.
5865 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5866 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5867 code_props members.
5868 (symbol_print): Use SYMBOL_CODE_PRINT.
5869
5870 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5871
5872 Use the new code_props interface for rule actions.
5873 * src/symlist.h (symbol_list): Replace action, action_location, and
5874 used members with a code_props action_props member.
5875 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5876 grammar_midrule_action, grammar_current_rule_merge_set,
5877 grammar_current_rule_symbol_append, packgram): Update.
5878 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5879 * src/scan-code.l (handle_action_dollar): Update.
5880 (translate_rule_action): Remove, no longer used.
5881 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5882
5883 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5884
5885 Use the new code_props interface in parse-gram.y.
5886 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5887 Update all uses of translate_* functions to use the new code_props
5888 interface and to use gram_scanner_last_string_free and
5889 code_scanner_last_string_free where possible.
5890 (grammar_declaration): symbol_list_destructor_set and
5891 symbol_list_printer_set now perform the translation, so don't do it
5892 here. Use gram_scanner_last_string_free where possible.
5893 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5894 translate_code): Remove, no longer used.
5895 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5896 symbol_list_printer_set): Perform code translation here rather than
5897 depending on the caller to do so.
5898
5899 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5900 * src/scan-gram.h (gram_last_string): Remove declaration.
5901 * src/scan-gram.l (last_string): Declare it static.
5902
5903 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5904
5905 Encapsulate code properties and related functionality for the various
5906 destructors, printers, and actions into a code_props structure and
5907 interface. This patch merely implements code_props in scan-code.h and
5908 scan-code.l. Future patches will rewrite other modules to use it.
5909 Discussed starting at
5910 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5911 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5912 consistently initialize const structs that have an empty location
5913 field.
5914 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5915 to ensure consistency.
5916 * src/scan-code.h (code_props): New structure.
5917 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5918 function, macro, and const global variable for initializing a
5919 code_props with no code.
5920 (code_props_plain_init, code_props_symbol_action_init,
5921 code_props_rule_action_init, code_props_translate_code): The rest of
5922 the new code_props functional interface. Among other things, the init
5923 functions set the code_props kind field so that
5924 code_props_translate_code will know whether to behave like
5925 translate_symbol_action, translate_rule_action, or translate_code.
5926 These old translate functions must remain until all other modules are
5927 updated to use the new code_props interface.
5928 (code_scanner_last_string_free): New function similar to
5929 gram_scanner_last_string_free.
5930 (code_scanner_free): Add documentation.
5931 * src/scan-code.l: Implement the new interface.
5932 (code_lex): Make it static, add a code_props* argument, and remove the
5933 rule argument.
5934 (last_string): New static global similar to the one in scan-gram.l.
5935 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5936 instead of rule.
5937 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5938 code_props since Bison may one day use this information for destructors
5939 and printers.
5940 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5941 (handle_action_dollar): Use symbol_list_n_get and set used flag
5942 directly since symbol_list_n_used_set is removed.
5943 (translate_action): Add a code_props* argument and remove the rule,
5944 action, and location arguments. Pass the code_props* on to code_lex.
5945 (translate_rule_action, translate_symbol_action, translate_code):
5946 Rewrite as wrappers around the new code_props interface.
5947 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5948 it would eventually need to break the encapsulation of code_props.
5949
5950 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5951
5952 * etc/.cvsignore: New.
5953
5954 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5955
5956 Add maintainer-push-check to run maintainer-check using push parsing in
5957 place of pull parsing where available.
5958 * Makefile.am (maintainer-push-check): New.
5959 * data/bison.m4 (b4_use_push_for_pull_if): New.
5960 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5961 appropriately based on their existing values.
5962 (yypush_parse): Don't print push-parser-specific diagnostics if push
5963 parsing is being used in place of pull parsing.
5964 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5965 push.c.
5966 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5967 variable, and insert b4_use_push_for_pull_flag into muscles.
5968 * tests/Makefile.am (maintainer-push-check): New.
5969
5970 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5971
5972 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5973 (whether successful or failed) so that yypush_parse can be invoked
5974 again to start a new parse using the same yypstate.
5975 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5976 check multiple yypull_parse invocations on the same yypstate. For pull
5977 mode, extend to check multiple yyparse invocations.
5978 (Exploding the Stack Size with Alloca): Extend to try with
5979 %push-pull-parser.
5980 (Exploding the Stack Size with Malloc): Likewise.
5981
5982 * tests/calc.at (Simple LALR Calculator): Don't specify
5983 %skeleton "push.c" since %push-pull-parser implies that now.
5984 * tests/headers.at (export YYLTYPE): Don't check for the push
5985 declarations. Otherwise, this test case can't be used to see if push
5986 mode can truly emulate pull mode.
5987 * tests/input.at (Torturing the Scanner): Likewise.
5988 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5989 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5990 AT_YACC_IF, which now includes the case of push mode since %skeleton
5991 need not be used for push mode. This will be more intuitive once
5992 push.c is renamed to yacc.c.
5993
5994 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5995
5996 For push mode, convert yyparse from a macro to a function, invoke yylex
5997 instead of passing a yylexp argument to yypull_parse, and don't
5998 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5999 Discussed starting at
6000 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6001 * data/bison.m4 (b4_pull_if): New.
6002 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6003 * data/push.c: Improve M4 quoting a little.
6004 (b4_generate_macro_args, b4_parenthesize): Remove.
6005 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6006 any time a pull parser is requested.
6007 Don't #define this as a wrapper around yypull_parse. Instead, when
6008 both push and pull are requested, make it a function that does that
6009 same thing.
6010 (yypull_parse): If there's a b4_prefix, #define this to
6011 b4_prefix[pull_parse] when both push and pull are requested.
6012 Don't define this as a function unless both push and pull are
6013 requested.
6014 Remove the yylexp argument and hard-code yylex invocation instead.
6015 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6016 %push-parser.
6017 * src/getargs.c (pull_parser): New global initialized to true.
6018 * getargs.h (pull_parser): extern it.
6019 * src/output.c (prepare): Insert pull_flag muscle.
6020 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6021 (prologue_declaration): Set both push_parser and pull_parser = true for
6022 %push-pull-parser. Set push_parser = true and pull_parser = false for
6023 %push-parser.
6024 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6025 %push-parser since there's no backward-compatibility concern here.
6026 Scan %push-pull-parser.
6027 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6028 instead of %push-parser.
6029 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6030 prototype it in the module that calls yyparse.
6031 * tests/input.at (Torturing the Scanner): Likewise.
6032 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6033
6034 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6035
6036 Update etc/bench.pl. Optimize push mode a little (the yyn change
6037 deserves most of the credit).
6038 * Makefile.am (SUBDIRS): Add etc subdirectory.
6039 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6040 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6041 yytoken, yyval, and yyloc declarations to...
6042 (yyparse or yypush_parse): ... here to improve performance. For
6043 yypush_parse invocations after the first, be sure to assign yyn its old
6044 value again.
6045 (yypstate_new): Don't bother initializing the yyresult field since the
6046 initial value isn't used.
6047 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6048 remove the #define that, in push mode, set it to yyps->NAME.
6049 * etc/Makefile.am: New.
6050 * etc/bench.pl: Remove and build it instead from...
6051 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6052 "tests/bison" from the build directory by default rather than just
6053 invoking "bison" from $PATH.
6054 (calc_grammar): Update push parser code: don't declare yylval globally,
6055 don't define yyparse_wrapper, and don't #define yyparse.
6056 (bench_grammar): Update to check all working combinations of yacc.c,
6057 push.c, impure, pure, pull, and push.
6058
6059 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 For push mode, add pull wrappers around yypush_parse.
6062 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6063 (yypull_parse): New function wrapping yypush_parse.
6064 (yyparse): New #define wrapping yypull_parse.
6065 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6066 is declared.
6067 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6068 prototype yylex in the module that calls yyparse, and don't prototype
6069 yyparse there. Otherwise, the yyparse expansion won't compile.
6070 * tests/input.at (Torturing the Scanner): Likewise.
6071
6072 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6073
6074 Enable push parsers to operate in impure mode. Thus, %push-parser no
6075 longer implies %pure-parser. The point of this change is to move
6076 towards being able to test the push parser code by running the entire
6077 test suite as if %push-parser had been declared.
6078 * data/push.c (yypush_parse): For impure mode, remove the
6079 yypushed_char, yypushed_val, and yypushed_loc arguments.
6080 Instead, declare these as local variables initialized to the global
6081 yychar, yylval, and yylloc.
6082 For the first yypush_parse invocation only, restore the initial values
6083 of these global variables when it's time to read a token since they
6084 have been overwritten.
6085 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6086 %push-parser.
6087 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6088 %pure-parser along with %push-parser since this test case was designed
6089 for pure push parsers.
6090 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6091 (AT_YACC_OR_PUSH_IF): New.
6092 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6093 add a note that it's still wrong for some cases (as it has been for a
6094 while).
6095 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6096 %push-parser no longer implies %pure-parser.
6097
6098 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6099
6100 Remove some unnecessary differences between the pull parser code and
6101 the push parser code. This patch enables yynerrs in push mode.
6102 * data/push.c: Reformat M4 a little.
6103 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6104 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6105 because push mode is on. Instead, if pure mode is on, move yynerrs
6106 to...
6107 (b4_declare_parser_state_variables): ... here.
6108 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6109 to yyps->NAME so it can be used in yypush_parse.
6110 (yypush_parse): Don't omit uses of yynerrs in push mode.
6111
6112 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6113
6114 Fix bug such that the first pushed token's value and location are
6115 sometimes overwritten (sometimes by %initial-action) before being used.
6116 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6117 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6118 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6119 more closely mimic the pull parser logic.
6120 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6121 time to read a token, which is after any initialization of yylval and
6122 yylloc.
6123 (gottoken): Rename label to...
6124 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6125 user namespace.
6126
6127 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6128
6129 Rearrange initialization of the parser state variables so that the
6130 skeleton doesn't have to have a copy for pull mode and another for push
6131 mode. This patch also fixes at least a bug such that yylloc was not
6132 initialized (with b4_location_initial_line and
6133 b4_location_initial_column) upon calling yypush_parse. However, that
6134 initialization now overwrites the first token's location;
6135 %initial-action assigning @$ already did the same thing, and both bugs
6136 will be fixed in a later patch.
6137 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6138 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6139 yyss, yyvs, yyls, and yystacksize.
6140 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6141 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6142 yylsp.
6143 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6144 yyps->NAME so it can be used in yypush_parse.
6145 (yyparse or yypush_parse): For yypush_parse, don't print the
6146 "Starting parse" diagnostic for invocations after the first.
6147 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6148 yypush_parse, only do it for the first invocation.
6149 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6150 initialization to occur in yypush_parse but only on the first
6151 invocation.
6152
6153 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6154
6155 * data/push.c: Add CPP guards around push parser declarations in both
6156 the header and the code file.
6157 In the code file, move the push parser declarations to the same place
6158 they appear in the header file.
6159 Clean up the M4 some, especially the inconsistent underquoting in
6160 some b4_c_function_def and b4_c_function_decl uses.
6161
6162 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6163
6164 Encapsulate the push parser state variables into an M4 macro so the
6165 push skeleton doesn't have to list them again for pull mode's yyparse.
6166 For push mode, remove yypush_parse's local equivalents of these
6167 variables to eliminate unnecessary copying between the two sets at
6168 run-time. This patch also fixes at least a bug related to multiple
6169 %initial-action invocations in push mode.
6170 * data/push.c (b4_declare_parser_variables): Rename to...
6171 (b4_declare_scanner_communication_variables): ... this for clarity and
6172 update both uses.
6173 (b4_declare_yyparse_variables): Remove and move its contents to the one
6174 spot where it was invoked.
6175 (b4_declare_parser_state_variables): New macro containing the parser
6176 state variables required by push mode.
6177 (struct yypstate): Replace all fields but yynew with
6178 b4_declare_parser_state_variables.
6179 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6180 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6181 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6182 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6183 parser state variable declarations with
6184 b4_declare_parser_state_variables.
6185 Don't initialize parser state variables when calling yypush_parse since
6186 yypstate_new already does that.
6187 Invoke the user's initial action only upon the first yypush_parse
6188 invocation.
6189 Remove all code that copies between the local parser state variables
6190 and the yypstate.
6191
6192 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6193
6194 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6195 prevent a name collision in a future patch where these names will
6196 sometimes be #define'd.
6197 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6198 since it no longer has the same name as the existing argument.
6199 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6200
6201 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6202 and Joel E. Denny <jdenny@ces.clemson.edu>
6203
6204 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6205 that the argument is case-insensitive, and there's no `=' here.
6206 For the %skeleton entry, mention that %language is better.
6207 (Bison Options): Likewise for --language and --skeleton. Move the
6208 --skeleton entry so that the `Tuning the parser' section is sorted
6209 alphabetically on long options.
6210 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6211 %language directive in detail here; cross-reference the %language
6212 documentation instead.
6213 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6214 `%require "2.3b"' so that the example is always up-to-date.
6215 (Table of Symbols): Add entries for %language and %skeleton.
6216 * examples/extexi (normalize): Instead of replacing every %require
6217 argument with the current Bison version, just substitute for
6218 `@value{VERSION}'. This guarantees that we're testing what actually
6219 appears in the documentation.
6220 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6221 rather than `@VERSION@'.
6222
6223 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6224
6225 * NEWS: Reword the %language news a bit, and put it earlier.
6226
6227 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6228 Rewrite to simplify the logic.
6229 (language_argmatch): Likewise.
6230 (program_name): We now own this var.
6231 * src/getargs.h (struct bison_language): Use char[] rather than
6232 const char *.
6233
6234 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6235 Java is supported.
6236 * src/complain.c (program_name): Remove decl; no longer needed.
6237 * src/main.c (program_name): Remove; now belongs to getargs.
6238
6239 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6240
6241 * NEWS: Document %language.
6242
6243 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6244
6245 * data/c-skel.m4, data/c++-skel.m4: New files.
6246 * data/glr.c: Complain on push parsers.
6247
6248 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6249 over %skeleton.
6250 (Decl Summary): Document %language and %skeleton.
6251 (Command line): Document -L.
6252
6253 * examples/extexi: Rewrite %require directive.
6254 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6255
6256 * src/files.c (compute_exts_from_gc): Look in language structure
6257 for .y extension.
6258 (compute_file_name_parts): Check whether .tab should be added.
6259 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6260 (language, skeleton_arg, language_argmatch): New.
6261 (long_options): Add --language.
6262 (getargs): Use skeleton_arg, add -L/--language.
6263 * src/getargs.h: Include location.h.
6264 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6265 * src/output.c (prepare): Pick default skeleton from struct language.
6266 Don't dispatch C skeletons here.
6267 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6268 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6269 * src/scan-gram.l ("%language"): New rule.
6270
6271 * tests/calc.at: Test %skeleton and %language.
6272 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6273 (AT_GLR_IF): Look for %skeleton "glr.cc".
6274 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6275 (AT_YACC_IF): Reject %language.
6276
6277 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6278
6279 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6280 since it wasn't used; only the typedef name 'semantic_type' is needed.
6281 Also, omit trailing white space.
6282
6283 * bootstrap: Sync from coreutils.
6284 (gnulib_extra_files): Add build-aux/announce.gen.
6285 (slurp): Adjust .gitignore files like .cvsignore files.
6286 * build-aux/announce-gen: Remove from CVS, since bootstrap
6287 now creates this.
6288
6289 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6290
6291 Make %push-parser imply %pure-parser. This fixes several bugs; see
6292 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6293 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6294 pure_parser = true.
6295 * data/push.c: Don't bother testing b4_push_if when deciding whether
6296 to expand b4_declare_parser_variables globally.
6297 (yypush_parse): Likewise in here.
6298
6299 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6300 (yy_reduce_print): Reformat M4 for readability.
6301
6302 2006-12-15 Bob Rossi <bob@brasko.net>
6303 and Joel Denny <jdenny@ces.clemson.edu>
6304
6305 * data/push.c (yypstate): Add typedef, and update all uses of
6306 struct yypstate to just yypstate.
6307 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6308
6309 2006-12-14 Bob Rossi <bob@brasko.net>
6310
6311 * data/push.c (yypush_parse): Declare prototype regardless of
6312 %locations option.
6313
6314 2006-12-14 Bob Rossi <bob@brasko.net>
6315
6316 * data/push.c (yyparse): Remove the prototype and the #define when in
6317 push-parser mode.
6318
6319 2006-12-13 Bob Rossi <bob@brasko.net>
6320
6321 * data/push.c (yypstate_init): Rename to...
6322 (yypstate_new): ... this and use b4_c_function_def.
6323 (yypstate_delete): New.
6324 (yypush_parse): Change parameters yynval and yynlloc to be const.
6325 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6326 yypstate_delete functions.
6327
6328 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6329
6330 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6331 strange test case titles. Reported by Bob Rossi.
6332
6333 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6334
6335 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6336 of potential ambiguities in GLR grammers.
6337
6338 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6339
6340 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6341 `bison ', use m4_index instead of m4_substr since chopping up a string
6342 containing M4-special characters causes problems here.
6343
6344 Fix a couple of bugs related to special characters in user-specified
6345 file names, and make it easier for skeletons to compute output file
6346 names with the same file name prefix as Bison-computed output file
6347 names.
6348 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6349 b4_parser_file_name and b4_spec_defines_file instead of
6350 @output_parser_name@ and @output_header_name@, which are now redundant.
6351 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6352 b4_parser_file_name, b4_spec_defines_file, and the new
6353 @basename(FILENAME@) instead of @output_parser_name@ and
6354 @output_header_name@, which inappropriately escaped the file names as
6355 C string literals.
6356 * src/files.c (all_but_ext): Remove static qualifier.
6357 (compute_output_file_names): Move `free (all_but_ext)' to...
6358 (output_file_names_free): ... here since all_but_ext is needed later.
6359 * src/files.h (all_but_ext): Extern.
6360 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6361 exactly what MUSCLE_INSERT_STRING used to do.
6362 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6363 characters are escaped properly.
6364 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6365 all_but_ext.
6366 For pkgdatadir muscle, maintain previous functionality by using
6367 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6368 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6369 digraphs would never be expanded. Hopefully no one has M4-special
6370 characters in his Bison installation path.
6371 * src/scan-skel.l: Don't parse @output_header_name@ and
6372 @output_parser_name@ anymore since they're now redundant.
6373 In @output, use decode_at_digraphs.
6374 Parse a new @basename command that invokes last_component.
6375 (decode_at_digraphs): New.
6376 (BASE_QPUTS): Remove unused.
6377 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6378 (Output file name): New tests.
6379
6380 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6381
6382 Warn about output files that are generated by the skeletons and that
6383 conflict with other output files.
6384 * data/glr.c: Don't generate the header file here when glr.cc does.
6385 * src/files.c (file_names, file_names_count): New static globals.
6386 (compute_output_file_names): Invoke output_file_name_check for files
6387 not generated by the skeletons and remove existing checks.
6388 (output_file_name_check): New function that warns about conflicting
6389 output file names.
6390 (output_file_names_free): Free file_names.
6391 * src/files.h (output_file_name_check): Declare.
6392 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6393 the skeletons.
6394 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6395 (Conflicting output files): New tests.
6396
6397 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6398
6399 * doc/bison.texinfo: Fix a couple of typos.
6400
6401 2006-12-08 Bob Rossi <bob@brasko.net>
6402
6403 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6404 Rename to...
6405 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6406 update all uses.
6407 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6408 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6409 local pv.
6410 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6411 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6412
6413 2006-12-07 Bob Rossi <bob@brasko.net>
6414 and Joel Denny <jdenny@ces.clemson.edu>
6415
6416 * data/push.c (yypvarsinit): Change return type from void* to struct
6417 yypvars*. No longer cast to void* on return.
6418 (struct yypvars): Remove yylen since it need not be remembered between
6419 yypushparse invocations.
6420 (yypushparse): Don't copy between yylen and pv->yylen.
6421
6422 2006-12-05 Bob Rossi <bob@brasko.net>
6423
6424 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6425 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6426 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6427 (struct yypvars): Remove b4_declare_parser_variables.
6428 (yypvarsinit): Remove init code for removed variables.
6429 (global scope): Do not declare b4_declare_parser_variables if
6430 push or pure mode.
6431 (yypushparse): Add b4_declare_parser_variables.
6432 Init new local variables, and remove init code for removed
6433 yypvars variables.
6434 (yyparse): Delete.
6435 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6436 and yyparse for other modes.
6437 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6438 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6439 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6440 (AT_PURE_LEX_IF): True if pure or push parser.
6441
6442 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6443
6444 Document Yacc prologue alternatives and default %destructor's and
6445 %printer's as experimental. Don't mention Java yet. Discussed at
6446 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6447 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6448 (2.3a): Annotate this entry to say the old forms of these features were
6449 also experimental.
6450 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6451 Table of Symbols): Say they're experimental. Comment out any mention
6452 of Java (we'll want this back eventually).
6453
6454 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6455
6456 Support a file name argument to %defines. Deprecate `=' in
6457 %file-prefix, %name-prefix, and %output. Discussed at
6458 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6459 * NEWS (2.3a+): Mention.
6460 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6461 form of %defines, and remove `=' from entries for %file-prefix,
6462 %name-prefix, and %output.
6463 * src/parse-gram.y (prologue_declaration): Implement.
6464 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6465 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6466 all but one occurrence of %name-prefix.
6467 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6468 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6469 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6470 occurrence of each of %file-prefix and %output. Add check for %defines
6471 with argument.
6472 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6473 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6474 Remove the `=' from %output.
6475
6476 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6477
6478 Don't escape $ in test case titles since Autoconf 2.61 now does that
6479 correctly.
6480 * tests/actions.at (Default %printer and %destructor are not for error
6481 or $undefined): Here.
6482 (Default %printer and %destructor are not for $accept): Here.
6483 * tests/input.at (Invalid $n and @n): Here.
6484
6485 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6486
6487 Rename <!> to <>. Discussed starting at
6488 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6489 * NEWS (2.3a+): Update.
6490 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6491 Update.
6492 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6493 * src/scan-gram.l (INITIAL): Implement.
6494 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6495 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6496 comment.
6497 * tests/actions.at (Default tagless %printer and %destructor,
6498 Default tagged and per-type %printer and %destructor,
6499 Default %printer and %destructor are not for error or $undefined,
6500 Default %printer and %destructor are not for $accept,
6501 Default %printer and %destructor for mid-rule values): Update.
6502 * tests/input.at (Default %printer and %destructor redeclared,
6503 Unused values with default %destructor): Update.
6504
6505 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6506
6507 Don't let %prec take a nonterminal.
6508 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6509 token.
6510 * tests/input.at (%prec takes a token): New test checking that %prec
6511 won't take a nonterminal.
6512
6513 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6514
6515 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6516 it was double-quoted.
6517 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6518 grammar is maintained with Bison's highest standards.
6519 * src/getargs.c: Fix some typos in Doxygen comments.
6520
6521 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6522
6523 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6524 later. Reported by Paul Eggert in
6525 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6526 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6527 * src/scan-code.l (translate_action): Don't bother invoking
6528 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6529 (code_scanner_free): Instead of invoking
6530 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6531 which frees more.
6532 * src/scan-gram.l (gram_scanner_free): Likewise.
6533 * src/scan-skel.l (scan_skel): Likewise.
6534
6535 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6536
6537 * src/files.c (tr): Change return type to void.
6538 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6539 has been called previously for the same key.
6540 (muscle_find): Return storage instead of value so that
6541 --enable-gcc-warnings doesn't produce warnings that the return discards
6542 const. aver that the value and storage are the same since storage
6543 could potentially be NULL when value is not.
6544 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6545 same as 0.
6546
6547 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6548
6549 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6550 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6551 us a slightly cleaner distribution, and also works.
6552 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6553 gnulib changes.
6554
6555 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6556 and Paul Eggert <eggert@cs.ucla.edu>
6557
6558 Don't let Bison leak memory except when it complains.
6559 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6560 (spec_defines_file, dir_prefix): Now char *, not const char *,
6561 since they are freed.
6562 * src/files.c: Likewise.
6563 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6564 Likewise.
6565 (tr): Now operates in-place. All uses changed.
6566 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6567 values.
6568 (compute_file_name_parts, compute_output_file_names): Don't store
6569 read-only data in variables that will be freed.
6570 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6571 src_extension, and header_extension.
6572 (output_file_names_free): New public function to free
6573 spec_verbose_file, spec_graph_file, spec_defines_file,
6574 parser_file_name, and dir_prefix.
6575 * src/getargs.c (getargs): Don't store read-only data in variables that
6576 will be freed.
6577 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6578 (which previously existed but was unused), and quotearg_free.
6579 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6580 * src/muscle_tab.c: Likewise.
6581 (muscle_entry): Make the value char const *,
6582 and add a new storage member that is char * and can be freed.
6583 (muscle_entry_free): New private function.
6584 (muscle_init): Use it instead of free.
6585 (muscle_insert, muscle_grow): Update and use new storage member.
6586 (muscle_code_grow): Free the string passed to muscle_grow
6587 since it's not needed anymore.
6588 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6589 add a new `char *code' member.
6590 ("{...}"): Declare semantic type as code.
6591 * src/scan-code.h (translate_rule_action):
6592 (translate_symbol_action, translate_code, translate_action): Return
6593 `char const *' rather than `char *' since external code should not free
6594 these strings.
6595 * src/scan-code.l: Likewise.
6596 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6597 which is "{...}" in the parser.
6598 * tests/Makefile.am (maintainer-check-valgrind): Set
6599 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6600 Valgrind.
6601 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6602 complain.
6603 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6604 expecting a non-zero exit status sets --leak-check=summary and
6605 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6606 this case, and we don't want to hear about it.
6607
6608 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6609
6610 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6611 instead of from the template, to simplify configuration a bit.
6612 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6613 and m4/wint_t.m4, as they are needed with the latest gnulib.
6614
6615 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6616
6617 Disable unset/unused mid-rule value warnings by default, and recognize
6618 --warnings=midrule-values to enable them. Discussed starting at
6619 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6620 * NEWS (2.3a+): Mention.
6621 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6622 warnings): Add entry for midrule-values subargument.
6623 * src/reader.c (symbol_should_be_used): Don't return true just because
6624 the value is a set/used mid-rule value unless
6625 --warnings=midrule-values was specified.
6626 * tests/input.at (Unused values, Unused values before symbol
6627 declarations): Run tests with and without --warnings=midrule-values.
6628
6629 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6630 than LIST_FREE directly.
6631
6632 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6633
6634 Finish implementing --warnings=error, which should not be implied by
6635 --warnings=all (or by its synonyms -W and --warnings without
6636 subarguments).
6637 * src/complain.c (set_warning_issued): New function to report that
6638 warnings are being treated as errors and to record an error if so.
6639 Invoke...
6640 (warn_at, warn): ... here.
6641 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6642 "error - warnings are errors" does not appear above "all - all of the
6643 above".
6644 (getargs): For -W and --warnings without subarguments, don't let
6645 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6646 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6647
6648 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6649
6650 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6651 empty subargument list. For example: `bison --warnings= parser.y'.
6652
6653 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6654
6655 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6656 the parser header file so that gcc doesn't warn.
6657
6658 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6659
6660 Split the default %destructor/%printer into two kinds: <*> and <!>.
6661 Discussed starting at
6662 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6663 * NEWS (2.3a+): Mention.
6664 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6665 previous change today related to mid-rules.
6666 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6667 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6668 (TYPE_TAG_ANY): Add as <*>.
6669 (TYPE_TAG_NONE): Add as <!>.
6670 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6671 for <*> and <!>.
6672 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6673 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6674 * src/symlist.c (symbol_list_default_new): Split into tagged and
6675 tagless versions.
6676 (symbol_list_destructor_set, symbol_list_printer_set): Split
6677 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6678 SYMLIST_DEFAULT_TAGLESS.
6679 * src/symlist.h: Update symbol_list_default*_new prototypes.
6680 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6681 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6682 * src/symtab.c (default_destructor, default_destructor_location,
6683 default_printer, default_printer_location): Split each into tagged and
6684 tagless versions.
6685 (symbol_destructor_get, symbol_destructor_location_get,
6686 symbol_printer_get, symbol_printer_location_get): Implement tagged
6687 default and tagless default cases.
6688 (default_destructor_set, default_printer_set): Split each into tagged
6689 and tagless versions.
6690 * src/symtab.h: Update prototypes.
6691 * tests/actions.at (Default %printer and %destructor): Rename to...
6692 (Default tagless %printer and %destructor): ... this, and extend.
6693 (Per-type %printer and %destructor): Rename to...
6694 (Default tagged and per-type %printer and %destructor): ... this, and
6695 extend.
6696 (Default %printer and %destructor for user-defined end token): Extend.
6697 (Default %printer and %destructor are not for error or $undefined):
6698 Update.
6699 (Default %printer and %destructor are not for $accept): Update.
6700 (Default %printer and %destructor for mid-rule values): Extend.
6701 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6702 (Unused values with default %destructor): Extend.
6703
6704 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6705
6706 Don't apply the default %destructor/%printer to an unreferenced midrule
6707 value. Mentioned at
6708 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6709 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6710 like $@n instead of just @n so that the default %destructor/%printer
6711 logic doesn't see them as user-defined symbols.
6712 (symbol_is_dummy): Check for both forms of the name.
6713 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6714 name for which the midrule value is referenced in any action.
6715 * tests/actions.at (Default %printer and %destructor for mid-rule
6716 values): New test.
6717 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6718 for change to dummy symbol names.
6719
6720 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6721
6722 Warn about unset midrule $$ if the corresponding $n is used.
6723 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6724 $n usage.
6725 (packgram): Before invoking grammar_rule_check on any rule, make sure
6726 all actions have already been scanned in order to set `used' flags.
6727 Otherwise, checking that a midrule's $$ is set will not always work
6728 properly because the midrule check must forward-reference the midrule's
6729 parent rule.
6730 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6731 warning.
6732
6733 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6734
6735 More improvements to the documentation of the prologue alternatives:
6736 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6737 Bison manual.
6738 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6739 some text to clarify the relative importance of the new directives and
6740 to show how these directives may be viewed as code labels.
6741
6742 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6743
6744 Similar to the recently removed %before-header, add %code-top as the
6745 alternative to the pre-prologue. Mentioned at
6746 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6747 Also, let the prologue alternatives appear in the grammar section.
6748 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6749 (prologue_declaration): Move the existing prologue alternatives to...
6750 (grammar_declaration): ... here and add %code-top.
6751 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6752
6753 Clean up and extend documentation for the prologue alternatives.
6754 * NEWS (2.3a+): Describe prologue alternatives.
6755 * doc/bison.texinfo (Prologue): Move discussion of prologue
6756 alternatives to...
6757 (Prologue Alternatives): ... this new section, and extend it to discuss
6758 all 4 directives in detail.
6759 (Table of Symbols): Clean up discussion of prologue alternatives and
6760 add %code-top.
6761
6762 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6763
6764 DJGPP specific issues.
6765
6766 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6767 config.bat accordingly.
6768 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6769 * djgpp/config.site: Likewise.
6770
6771 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6772
6773 Replace %*-header with %provides, %requires, %code. See discussion at
6774 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6775
6776 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6777 (b4_user_start_header): Remove.
6778 * data/glr.c: Use new macros instead of b4_*start_header
6779 and b4_*end_header.
6780 * data/glr.cc: Likewise.
6781 * data/lalr1.cc: Likewise.
6782 * data/push.c: Likewise.
6783 * data/yacc.c: Likewise.
6784
6785 * doc/bison.texinfo: Remove %before-header, rename
6786 %{start,end,after}-header to %requires, %provides, %code.
6787
6788 * src/parse-gram.y: Likewise (also rename token names accordingly).
6789 * src/scan-gram.l: Likewise.
6790 * tests/actions.at: Likewise.
6791
6792 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6793
6794 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6795 Problem reported by Joel E. Denny.
6796
6797 2006-10-14 Jim Meyering <jim@meyering.net>
6798
6799 (Sync from coreutils.)
6800 Work also when the working directory (with e.g. coreutils sources)
6801 is version controlled with git, rather than CVS.
6802 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6803 rather than CVS.
6804 In messages and comments, say e.g., "checked-out sources",
6805 rather than "CVS sources".
6806 (version_controlled_file): New function. Work for git as well as
6807 for CVS. Don't use grep's -q option.
6808 (slurp): Call it here, in place of CVS-specific code.
6809
6810 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6811
6812 Fix testsuite for ./configure --enable-gcc-warnings:
6813 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6814 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6815 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6816 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6817 * test/regression.at (Diagnostic that expects two alternatives):
6818 Likewise.
6819
6820 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6821
6822 * bootstrap.conf (gnulib_modules): Add config-h.
6823 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6824 worry about HAVE_CONFIG_H.
6825 * lib/abitset.c: Likewise.
6826 * lib/bitset.c: Likewise.
6827 * lib/bitset_stats.c: Likewise.
6828 * lib/bitsetv-print.c: Likewise.
6829 * lib/bitsetv.c: Likewise.
6830 * lib/ebitset.c: Likewise.
6831 * lib/get-errno.c: Likewise.
6832 * lib/lbitset.c: Likewise.
6833 * lib/subpipe.c: Likewise.
6834 * lib/timevar.c: Likewise.
6835 * lib/vbitset.c: Likewise.
6836 * lib/bitset.c: Include "bitset.h" first, to test interface.
6837 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6838 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6839 * lib/bitsetv.c: Include "bitsetv.h" first.
6840 * lib/get-errno.c: Include "get-errno.h" first.
6841 * m4/.cvsignore: Add config-h.m4.
6842 * tests/actions.at (Default %printer and %destructor for ...):
6843 Adjust expected line numbers in output to reflect removal of #if
6844 HAVE_CONFIG_H lines.
6845 * tests/glr-regression.at (Missed %merge type warnings when ...):
6846 Likewise.
6847 * tests/regression.at (Braced code in declaration in rules section):
6848 Likewise.
6849 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6850 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6851 Include <config.h> unconditionally.
6852
6853 * bootstrap: Sync from coreutils, as follows:
6854
6855 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6856
6857 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6858 variable was sometimes used without being initialized. This
6859 messed up the installation of the INSTALL file in some cases.
6860
6861 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6862
6863 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6864 --copy. Inspired by a suggestion from Bruno Haible.
6865
6866 2006-10-03 Jim Meyering <jim@meyering.net>
6867
6868 * bootstrap: Undo last change to this file, since now gnulib-tool
6869 sticks with the automake default in generating dependencies.
6870
6871 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6872
6873 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6874 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6875
6876 * doc/bison.1: Add copyright notice.
6877
6878 * data/glr.c: Don't include <stdarg.h>; not used.
6879
6880 * NEWS: The -g and --graph options now output graphs in Graphviz
6881 DOT format, not VCG format.
6882 * doc/bison.1: Likewise.
6883 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6884 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6885 of this change in
6886 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6887 * TODO: Remove Graphviz entry.
6888 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6889 remove vcg.c, vcg.h, vcg_defaults.h.
6890 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6891 * src/graphviz.c, src/graphviz.h: New files.
6892 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6893 * src/files.h: Make comment more generic.
6894 * src/main.c (main): Likewise.
6895 * src/print_graph.h: Likewise.
6896 * src/getargs.c (usage): Make usage description more generic.
6897 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6898 (static_graph, fgraph): Remove. All uses changed to pass
6899 arguments instead of sharing a static var.
6900 (print_core, print_actions, print_state, print_graph):
6901 Output graphviz format rather than VCG format.
6902 * tests/.cvsignore: Remove *.vcg; add *.dot.
6903 * tests/output.at: Expect *.dot files, not *.vcg files.
6904
6905 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6906 accommodates the 2006-10-08 change.
6907
6908 2006-10-11 Bob Rossi <bob@brasko.net>
6909
6910 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6911 (b4_yyssa, b4_yyerror_range): New macros.
6912 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6913 (yypvarsinit): Remove init of removed fields.
6914 (yypushparse): Remove use of removed fields; use new macros instead.
6915
6916 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6917
6918 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6919 in a push parser. Reindent slightly to match yacc.c better.
6920
6921 2006-10-11 Bob Rossi <bob@brasko.net>
6922
6923 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6924 yymsg_alloc fields.
6925 (yypvarsinit, yypushparse): Remove init of removed fields.
6926 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6927
6928 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * THANKS: Add Paolo Bonzini and Bob Rossi.
6931
6932 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6933
6934 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6935 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6936 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6937 b4_define_user_cde and uses): Remove.
6938 (b4_comment, b4_prefix, b4_sync_start): New.
6939 * data/bison.m4: New file, with most of the content removed from c.m4.
6940 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6941 * src/output.c (output_skeleton): Pass bison.m4.
6942 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6943 only if specified.
6944
6945 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6946
6947 Fix test failure reported by Tom Lane in
6948 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6949 and try to make such failures easier to catch in the future.
6950 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6951 that's now the caller's responsibility.
6952 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6953 Set yychar = YYEOF if it's negative.
6954 * tests/actions.at (yylex): Abort if asked to read past EOF.
6955 * tests/conflicts.at (yylex): Likewise.
6956 * tests/cxx-type.at (yylex): Likewise.
6957 * tests/glr-regression.at (yylex): Likewise.
6958 * tests/input.at (yylex): Likewise.
6959 * tests/regression.at (yylex): Likewise.
6960 * tests/torture.at (yylex): Likewise.
6961
6962 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6963
6964 Fix problems with translating English-language diagnostics.
6965 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6966 respect to bison-runtime pot generation. The YY_ stuff
6967 wasn't being captured.
6968 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6969 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6970 * runtime-po/POTFILES.in: Add data/push.c.
6971
6972 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6973
6974 Merge bootstrap changes from coreutils.
6975
6976 2006-09-28 Jim Meyering <jim@meyering.net>
6977
6978 Automatically generated dependencies are important even
6979 when all of the sources in a directory come from gnulib.
6980 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6981 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6982
6983 2006-09-23 Jim Meyering <jim@meyering.net>
6984
6985 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6986
6987 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6988
6989 * bootstrap: Add support for --force.
6990 (usage): New function. Describe usage less tersely.
6991 (CVS_only_file): New var.
6992
6993 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6994
6995 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6996 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6997 Adjust white space and comments to match GNU style better.
6998
6999 2006-09-20 Bob Rossi <bob@brasko.net>
7000
7001 * data/push.c (yyresult_get): Remove function.
7002 (YYPUSH_MORE): Add #define.
7003 (yypushparse): Modify return value.
7004
7005 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7006
7007 * stamp-h.in: Remove; no longer needed.
7008 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7009 Remove config.h, config.hin, intl (no longer created).
7010 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7011 stamp-h1.
7012
7013 Sync bootstrap from coreutils, as follows:
7014
7015 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7016
7017 * bootstrap (symlink_to_gnulib): New function.
7018 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7019 to copies-of-gnulib.
7020 (cp_mark_as_generated, slurp, gnulib_files):
7021 Avoid making a copy if it's the same as the old version.
7022 (gnulib_files): Add support for this variable (used by Bison).
7023
7024 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7025
7026 * src/getargs.c (usage): Rework to use conventions similar to
7027 coreutils, to make translation a bit easier and the code a bit
7028 smaller. Problem reported by Tim Van Holder.
7029
7030 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7031
7032 Use some of gnulib's new modules, taken from coreutils.
7033
7034 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7035 * bootstrap.conf: New file.
7036 (gnulib_modules): Add configmake, inttypes, unistd.
7037 (XGETTEXT_OPTIONS): Add complain, complain_at,
7038 fatal, fatal_at, warn, warn_at, unexpected_end.
7039 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7040 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7041 (gl_EARLY): Add.
7042 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7043 (gl_INIT): Add
7044 (GNULIB_AUTOCONF_SNIPPET): Remove.
7045 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7046 the pickiest.
7047 * lib/.cvsignore: Add inttypes_.h.
7048 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7049 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7050 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7051 no-longer-necessary initializations.
7052 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7053 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7054 use the unistd module.
7055 * src/system.h: Likewise.
7056 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7057 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7058 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7059 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7060 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7061 * src/system.h: Include inttypes.h unconditionally, now that we
7062 use the inttypes module. Don't bother to include stdint.h, since
7063 inttypes.h now does that for us.
7064 (LOCALEDIR): Remove, now that we use the configmake module.
7065 * src/getargs.c: Include configmake.h.
7066 * src/main.c: Likewise.
7067 * src/output.c: Likewise.
7068 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7069 not from $abs_top_builddir, since config.h moved.
7070
7071
7072 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7073 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7074
7075 * src/parse-gram.y (symbol_declaration): Don't put statements
7076 before declarations; it's not portable to C89.
7077 * src/scan-code.l (handle_action_at): Likewise.
7078
7079 * src/scan-code.l: Always initialize braces_level; the old code
7080 left it uninitialized and therefore had undefined behavior.
7081
7082 Don't attempt to redefine 'assert', since it runs afoul of
7083 systems where standard headers (mistakenly) include <assert.h>.
7084 Instead, define and use our own alternative, called 'aver'.
7085 * src/reader.c: Don't include assert.h, since we no longer
7086 use assert.
7087 * src/scan-code.l: Likewise.
7088 * src/system.h (assert): Remove, replacing with....
7089 (aver): New function, taking a bool arg. All uses changed.
7090 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7091 not merely an integer.
7092
7093 2006-09-15 Bob Rossi <bob@brasko.net>
7094
7095 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7096 * data/c.m4 (YYPUSH): New.
7097 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7098 * src/getargs.c (push_parser): New var.
7099 * src/getargs.h (push_parser): New declaration.
7100 * src/output.c (prepare): Add macro insertion of `push_flag'.
7101 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7102 (prologue_declaration): Parse %push-parser.
7103 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7104 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7105 list of removed lines from the traces observed.
7106 (AT_CHECK_CALC_LALR): Added push parser tests.
7107
7108 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7109
7110 * NEWS: Version 2.3a.
7111 * configure.ac (AC_INIT): Likewise.
7112
7113 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7114 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7115 due to header ordering dependencies. I don't know why the #define
7116 was there.
7117
7118 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7119 runtime cost when YYDEBUG is not defined, and so that some tests
7120 that used to fail now work. Problem and initial suggestion by
7121 Paolo Bonzini.
7122 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7123 * data/glr.cc (b4_parser_class_name):
7124 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7125 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7126 (yydebug_) [YYDEBUG]: New member.
7127 (yycdebug_): Now defined only if YYDEBUG.
7128 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7129 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7130 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7131 if YYYDEBUG.
7132 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7133 Define only if YYDEBUG.
7134 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7135 set_debug_level.
7136 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7137 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7138 AT_CHECK_CALC_GLR_CC that are working now.
7139
7140 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7141
7142 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7143 We don't need them in glr.cc, and glr.c defines them.
7144 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7145 assumes that defining it to anything is the same as defining
7146 it to 1. Problem reported by Paolo Bonzini.
7147
7148 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7149
7150 * data/c.m4 (b4_null, b4_case): Define.
7151 * src/output.c (prepare_symbols): Use b4_null.
7152 (user_actions_output): Use b4_case.
7153
7154 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7155
7156 * data/glr.c (b4_shared_declarations): Put start-header first,
7157 before any #includes that we generate, so that feature-test
7158 macros work. Problem reported by Michael Deutschmann in
7159 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7160 * data/lalr1.cc: Likewise.
7161 * doc/bison.texinfo (Prologue): Document that feature-test macros
7162 should be defined before any Bison declarations.
7163 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7164 that depend on location.hh after, not before, Bison decls, since
7165 we now include location.hh after the first user prologue.
7166
7167 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7168 Sander Brandenburg in
7169 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7170 Also, fix minor white space and comment issues.
7171 (Prologue): Mention that it's better to define feature-test macros
7172 before Bison declarations. Problem reported by Michael Deutschmann.
7173
7174 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7175 by Jim Meyering.
7176 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7177 This adjusts to recent gnulib changes.
7178
7179 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7180
7181 Finish implementation of per-type %destructor/%printer. Discussed
7182 starting at
7183 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7184 and
7185 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7186 * NEWS (2.3+): Add a description of this feature to the default
7187 %destructor/%printer description.
7188 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7189 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7190 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7191 list node contains a semantic type.
7192 * src/symtab.c, src/symtab.h: Extend with a table that associates
7193 semantic types with their %destructor's and %printer's.
7194 (semantic_type_from_uniqstr, semantic_type_get,
7195 semantic_type_destructor_set, semantic_type_printer_set): New functions
7196 composing the public interface of that table.
7197 (symbol_destructor_get, symbol_destructor_location_get,
7198 symbol_printer_get, symbol_printer_location_get): If there's no
7199 per-symbol %destructor/%printer, look up the per-type before trying
7200 the default.
7201 * tests/actions.at (Per-type %printer and %destructor): New test case.
7202 * tests/input.at (Default %printer and %destructor redeclared):
7203 Extend to check that multiple occurrences of %symbol-default in a
7204 single %destructor/%printer declaration is an error.
7205 (Per-type %printer and %destructor redeclared, Unused values with
7206 per-type %destructor): New test cases.
7207
7208 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7209
7210 Require default %destructor/%printer to be declared using
7211 %symbol-default instead of an empty symbol list, and start working on
7212 new per-type %destructor/%printer. Discussed at
7213 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7214 * NEWS (2.3+): Add %symbol-default to example.
7215 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7216 (Table of Symbols): Add entry for %symbol-default.
7217 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7218 (generic_symlist, generic_symlist_item): New nonterminals for creating
7219 a list in which each item is a symbol, semantic type, or
7220 %symbol-default.
7221 (grammar_declaration): Use generic_symlist in %destructor and %printer
7222 declarations instead of symbols.1 or an empty list.
7223 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7224 for changes to symbol_list.
7225 * src/reader.c: Update for changes to symbol_list.
7226 * src/scan-code.l: Likewise.
7227 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7228 * src/symlist.c, src/symlist.h: Extend such that a list node may
7229 represent a semantic type or a %symbol-default in addition to just an
7230 ordinary symbol. Add switched functions for setting %destructor's and
7231 %printer's.
7232 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7233 %destructor/%printer declarations.
7234
7235 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7236
7237 Whether the default %destructor/%printer applies to a particular symbol
7238 isn't a question of whether the user *declares* that symbol (in %token,
7239 for example). It's a question of whether the user by any means
7240 *defines* the symbol at all (by simply using a char token, for
7241 example). $end is defined by Bison whereas any other token with token
7242 number 0 is defined by the user. The error token is always defined by
7243 Bison regardless of whether the user declares it with %token, but we
7244 may one day let the user define error as a nonterminal instead.
7245 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7246 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7247 the meaning of "user-defined".
7248 * tests/actions.at (Default %printer and %destructor for user-declared
7249 end token): Rename to...
7250 (Default %printer and %destructor for user-defined end token): ...
7251 this.
7252
7253 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7254 computation of whether to apply the default, don't maintain a list of
7255 every Bison-defined symbol. Instead, just check for a first character
7256 of '$', which a user symbol cannot have, and check for the error token.
7257
7258 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7259
7260 Don't apply the default %destructor or %printer to the error token,
7261 $undefined, or $accept. This change fits the general rule that the
7262 default %destructor and %printer are only for user-declared symbols,
7263 and it solves several difficulties that are described in the new test
7264 cases listed below.
7265 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7266 * tests/actions.at (Default %printer and %destructor are not for error
7267 or $undefined, Default %printer and %destructor are not for $accept):
7268 New test cases.
7269
7270 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7271
7272 Allow %start after the first rule.
7273 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7274 when parsing the first rule.
7275 (check_and_convert_grammar): Search for it here after all grammar
7276 declarations have been parsed. Skip midrules, which have dummy LHS
7277 nonterminals.
7278 * src/symtab.c (symbol_is_dummy): New function.
7279 * src/symtab.h (symbol_is_dummy): Declare it.
7280 * tests/input.at (%start after first rule): New test.
7281
7282 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7283
7284 Redo some of the previous commit: add back the ability to use
7285 non-aliased/undeclared string literals since it might be useful to
7286 those declaring %token-table.
7287 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7288 commit: don't worry about complaints from symbols_pack.
7289 * src/symtab.c (symbol_new, symbol_class_set,
7290 symbol_check_alias_consistency): Undo changes in previous commit: count
7291 each string literal as a new symbol and token, assign it a symbol
7292 number, and don't complain about non-aliased string literals.
7293 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7294 and token counts but does still set aliased tokens to the same number,
7295 symbol_pack_processor now leaves empty slots in the symbols array.
7296 Remove those slots.
7297 * tests/regression.at (Undeclared string literal): Remove test case
7298 added in previous commit since non-aliased string literals are allowed
7299 again.
7300 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7301 remove unnecessary string literal declarations.
7302 * tests/sets.at (Firsts): Likewise.
7303
7304 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7305
7306 Don't allow an undeclared string literal, but allow a string literal to
7307 be used before its declaration.
7308 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7309 symbols_pack complained.
7310 * src/symtab.c (symbol_new): Don't count a string literal as a new
7311 symbol.
7312 (symbol_class_set): Don't count a string literal as a new token, and
7313 don't assign it a symbol number since symbol_make_alias does that.
7314 (symbol_make_alias): It's not necessary to decrement the symbol and
7315 token counts anymore. Don't assume that an alias declaration occurs
7316 before any uses of the identifier or string, and thus don't assert that
7317 one of them has the highest symbol number so far.
7318 (symbol_check_alias_consistency): Complain if there's a string literal
7319 that wasn't declared as an alias.
7320 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7321 symbol_pack asserts that every token has been assigned a symbol number
7322 although undeclared string literals have not.
7323 * tests/regression.at (String alias declared after use, Undeclared
7324 string literal): New test cases.
7325 (Characters Escapes, Web2c Actions): Declare string literals as
7326 aliases.
7327 * tests/sets.at (Firsts): Likewise.
7328
7329 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7330
7331 In the grammar scanner, STRING_FINISH unclosed constructs and return
7332 them to the parser in order to improve error messages.
7333 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7334 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7335 * tests/input.at (Unclosed constructs): New test case.
7336 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7337 seen.
7338
7339 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7340 unused global.
7341
7342 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7343
7344 Handle string aliases for character tokens correctly.
7345 * src/symtab.c (symbol_user_token_number_set): If the token has an
7346 alias, check and set its alias's user token number instead of its own,
7347 which is set to indicate the alias. Previously, every occurrence of
7348 the character token in the grammar overwrote that alias indicator with
7349 the character code.
7350 * tests/input.at (String aliases for character tokens): New test.
7351
7352 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7353
7354 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7355
7356 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7357
7358 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7359 to prevent failures when building on older platforms.
7360 Check for autopoint failure.
7361 Set XGETTEXT_OPTIONS to values that check for C format strings,
7362 so that translators are warned about them (this also helps
7363 prevent core dumps).
7364
7365 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7366 function, since it simplifies our code a bit.
7367
7368 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7369 rather than -W, so we don't get bogus warnings about sign comparisons.
7370 Add -Wpointer-arith, since that warning is useful (it reports code
7371 that does not conform to C89 and that some compilers reject).
7372 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7373 since it's no longer needed.
7374
7375 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7376
7377 Clean up scanners a bit.
7378 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7379 definitions so gcc won't warn when obstack_for_string is unused.
7380 * src/scan-code.l: config.h and system.h are already #include'd by
7381 scan-code-c.c, so get rid of them here.
7382 * src/scan-gram.l: Likewise.
7383 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7384 definitions rather than duplicating the rest of it.
7385 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7386
7387 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7388
7389 Suppress signed/unsigned comparison warnings for yycheck.
7390 * data/c.m4 (b4_safest_int_type): New macro.
7391 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7392 a signed int type, cast it to b4_safest_int_type first.
7393 * data/yacc.c: Likewise.
7394 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7395 also overwritten.
7396
7397 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7398
7399 * doc/bison.texinfo: Fix some typos.
7400
7401 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7402
7403 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7404 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7405
7406 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7407 the latest gnulib does this a different way.
7408 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7409 translation was patched, so stop omitting it.
7410
7411 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7412
7413 Enable declaration of default %printer/%destructor. Make the parser
7414 use these for all user-declared grammar symbols for which the user does
7415 not declare a specific %printer/%destructor. Thus, the parser uses it
7416 for token 0 if the user declares it but not if Bison generates it as
7417 $end. Discussed starting at
7418 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7419 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7420 and
7421 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7422 * NEWS (2.3+): Mention.
7423 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7424 declare a %destructor for a mid-rule's semantic value. It's just
7425 impossible to declare one specific to it.
7426 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7427 code. Describe default %destructor form.
7428 * src/parse-gram.y (grammar_declaration): Parse default
7429 %printer/%destructor declarations.
7430 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7431 and symbol_destructor_location_get rather than accessing the destructor
7432 and destructor_location members of struct symbol.
7433 (symbol_printers_output): Likewise but for %printer's.
7434 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7435 again.
7436 * src/symtab.c (default_destructor, default_destructor_location,
7437 default_printer, default_printer_location): New static global
7438 variables to record the default %destructor and %printer.
7439 (symbol_destructor_get, symbol_destructor_location_get,
7440 symbol_printer_get, symbol_printer_location_get): New functions to
7441 compute the appropriate %destructor and %printer for a symbol.
7442 (default_destructor_set, default_printer_set): New functions to set the
7443 default %destructor and %printer.
7444 * src/symtab.h: Prototype all those new functions.
7445 * tests/actions.at (Default %printer and %destructor): New test to
7446 check that the right %printer and %destructor are called, that they're
7447 not called for $end, and that $$ and @$ work correctly.
7448 (Default %printer and %destructor for user-declared end token): New
7449 test to check that the default %printer and %destructor are called for
7450 a user-declared end token.
7451 * tests/input.at (Default %printer and %destructor redeclared, Unused
7452 values with default %destructor): New tests to check related grammar
7453 warnings and errors.
7454
7455 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7456
7457 Clean up handling of %destructor for the end token (token 0).
7458 Discussed starting at
7459 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7460 and
7461 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7462
7463 Make the skeletons consistent in how they pop the end token and invoke
7464 its %destructor.
7465 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7466 state, which has token number 0, since this would invoke the
7467 %destructor for the end token.
7468 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7469 until after shifting the end token, or else it won't be popped.
7470 * data/yacc.c (yyparse): Likewise.
7471
7472 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7473 it's the end token. Upon termination, destroy an unshifted lookahead
7474 even when it's the end token.
7475 * data/lalr1.cc (yy::parser::parse): Likewise.
7476 * data/yacc.c (yyparse): Likewise.
7477
7478 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7479 value warnings for the end token when the user gives the end token a
7480 %destructor.
7481
7482 * tests/actions.at (Printers and Destructors): Test all the above.
7483
7484 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7485
7486 Update to latest gnulib and gettext versions.
7487 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7488 Add fopen-safer.
7489 (gnulib_files): Add m4/warning.m4. Don't worry about files
7490 overwritten by autopoint.
7491 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7492 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7493 rejects them.
7494 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7495 so that we can remove the intl files at a better time.
7496 (intl_files_to_remove): Remove aclocal.m4, since it gets
7497 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7498 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7499 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7500 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7501 Remove datarootdir hack; no longer needed.
7502 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7503 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7504 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7505 strdup.h.
7506 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7507 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7508
7509 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7510
7511 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7512 it with --assume-autoconf='latest-stable'.
7513
7514 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7515
7516 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7517 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7518 YYSTYPE' and `{'.
7519 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7520 those from muscle_tab.c since the old ones are misleading.
7521
7522 2006-07-13 Akim Demaille <akim@epita.fr>
7523
7524 Support %define "KEY" {VALUE}.
7525 * src/scan-code.h, src/scan-code.l (translate_action)
7526 (translate_rule_action, translate_symbol_action, translate_code):
7527 Return char *, not const char *.
7528 * src/parse-gram.y (declaration): Rename as...
7529 (prologue_declaration): this.
7530 (string_content): Remove this nonterminal, use STRING.
7531 (braceless, content, content.opt): New nonterminal.
7532 Use them.
7533 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7534 as value.
7535 * src/scan-gram.l (getargs.h): Don't include it.
7536
7537 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7538
7539 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7540 rather than a for-loop that declares a local bool variable. This
7541 should work around a compatibility problem with a Cray x1e C++
7542 compiler reported by Hung Nguyen in
7543 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7544 The for-loop was introduced in the 2004-11-17 change but I don't
7545 know why it was needed.
7546
7547 2006-07-12 Akim Demaille <akim@epita.fr>
7548
7549 * data/c.m4: Comment changes.
7550
7551 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7552
7553 * src/complain.c (error_message, ERROR_MESSAGE): New.
7554 To factor...
7555 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7556 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7557
7558 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7559
7560 * NEWS: Instead of %union, you can define and use your own union type
7561 YYSTYPE if your grammar contains at least one <type> tag.
7562 Your YYSTYPE need not be a macro; it can be a typedef.
7563 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7564 (Union Decl, Decl Summary): Document this.
7565 * data/glr.c (YYSTYPE): Implement this.
7566 * data/glr.cc (YYSTYPE): Likewise.
7567 * data/lalr1.cc (YYSTYPE): Likewise.
7568 * data/yacc.c (YYSTYPE): Likewise.
7569 * src/output.c (prepare): Output tag_seen_flag.
7570 * src/parse-gram.y (declaration, grammar_declaration):
7571 Use 'union_seen' rather than 'typed' to determine whether
7572 %union has been seen, since grammars can now be typed without
7573 %union.
7574 (symbol_declaration, type.opt, symbol_def):
7575 Keep track of whether a tag has been seen.
7576 * src/reader.c (union_seen, tag_seen): New vars.
7577 (typed): remove.
7578 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7579 * src/scan-code.l (untyped_var_seen): New variable.
7580 (handle_action_dollar): Adjust to above changes.
7581 (handle_action_dollar, handle_action_at):
7582 Improve overflow checking for outlandish numbers.
7583 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7584 avoid new diagnostics generated by above changes.
7585 * tests/regression.at (YYSTYPE typedef): Add test to check
7586 for type tags without %union.
7587
7588 * src/symlist.c (symbol_list_length): Return int, not unsigned
7589 int, since callers expect int. This may need to get revisited
7590 once we have proper integer overflow checking.
7591
7592 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7593 object is now static.
7594
7595 * src/getargs.c (flags_argmatch): Return void, not int,
7596 to pacify ./configure --enable-gcc-warnings.
7597
7598 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7599 since last_string is already defined to FLEX_PREFIX (last_string).
7600
7601 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7602
7603 Implement --warnings/-W.
7604 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7605 replaced by...
7606 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7607 Adjust callers.
7608 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7609 (warnings_args, warnings_types): New.
7610 (getargs, short_options, long_options): Accept -W/--warnings.
7611 Sort the options by alphabetical order, upper case letter right
7612 before its lower case.
7613
7614 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7615
7616 Change %merge result type clash warnings to errors. Discussed at
7617 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7618 * src/reader.c (record_merge_function_type): Use complain_at.
7619 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7620 declared later): Update test case results.
7621
7622 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7623
7624 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7625 to be in alphabetical order.
7626 (trace_args): Spelling fixes.
7627
7628 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7629
7630 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7631 so they don't collide with user-defined macros.
7632 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7633 this was never guaranteed, and now that we're using gnulib stdint,
7634 which defines int_fast16_t to long int, the problem is exposed.
7635
7636 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7637
7638 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7639 need the full POSIX semantics (and weren't implementing them
7640 anyway).
7641
7642 Adjust to Autoconf 2.60 and today's gnulib.
7643 * bootstrap (gnulib_modules): Add stdint.
7644 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7645 no longer copies it.
7646 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7647 since stdint needs the former and wcwidth (which is now required
7648 by mbswidth) needs the latter.
7649 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7650 work around a compatibility glitch between gettext 0.14.6 and
7651 Autoconf 2.60.
7652 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7653 Do not check for uintptr_t, since new stdint module does the right
7654 thing.
7655 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7656 Add stdint.h, stdint_.h, wcwidth.h.
7657 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7658 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7659 stdint.m4, wchar_t.m4, wcwidth.m4.
7660 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7661 usual order for ../lib/*.h files.
7662 (file_name_split): Use last_component, not base_name, to adjust
7663 to gnulib changes.
7664 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7665 for ../lib/*.h files.
7666 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7667 Define unconditionally, since we now assume the stdint module.
7668 * src/scan-skel.l: Include <dirname.h>.
7669 (BASE_QPUTS): Use last_component, not base_name.
7670 * src/system.h: Include <unlocked-io.h> in the usual order
7671 for ../lib/*.h files. Include <stdint.h> unconditionally,
7672 since we now use the stdint module.
7673 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7674 HAVE_UINTPTR_T, since we now use the stdint module.
7675 (base_name): Remove decl, since files now include <dirname.h>
7676 to get the decl.
7677
7678 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7679
7680 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7681 New, default to 1.
7682 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7683 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7684 default.
7685 * tests/calc.at: Adjust.
7686
7687 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7688
7689 * data/c.m4 (b4_basename): New.
7690 (b4_syncline): Also output the location of its invocation (from
7691 the skeleton).
7692 (b4_user_action, b4_define_user_action, b4_user_actions)
7693 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7694 (b4_user_stype): New.
7695 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7696
7697 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7698
7699 In the grammar file, the first column is 1 not 0 on the first line as
7700 on every other line.
7701 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7702 * tests/input.at (Torturing the Scanner): Update output.
7703
7704 * src/scan-gram.l (scanner_cursor): Declare it static.
7705
7706 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7707
7708 In warnings, say "previous declaration" rather than "first
7709 declaration".
7710 * src/symtab.c (redeclaration): Do that here.
7711 * src/reader.c (record_merge_function_type): In the case of a result
7712 type clash, report the previous declaration rather than the very first
7713 one in the grammar file.
7714 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7715 declared later): Add a third declaration to check this behavior.
7716 * tests/input.at (Incompatible Aliases): Update output.
7717
7718 2006-06-27 Akim Demaille <akim@epita.fr>
7719
7720 * doc/Doxyfile.in: New.
7721 * doc/Makefile.am: Use it.
7722 * src/lalr.h, src/symtab.h: Initial doxygenation.
7723
7724 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7725
7726 Don't miss %merge result type warnings just because the LHS types are
7727 declared after the %merge. This continues the effort of the previous
7728 patch.
7729 * src/reader.c (get_merge_function): Don't set the merger type yet.
7730 (record_merge_function_type): New function for setting the merger type
7731 and checking for clashes.
7732 (grammar_current_rule_merge_set): Set the location of the %merge for
7733 the current rule.
7734 (packgram): Invoke record_merge_function_type for each rule now that
7735 all symbol type declarations have been parsed.
7736 * src/reader.h (merger_list.type_declaration_location): New member
7737 storing the location of the first %merge from which the type for this
7738 merging function was derived.
7739 * src/symlist.h (symbol_list.merger_declaration_location): New member
7740 storing the location of a rule's %merge, if any.
7741 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7742 declared later): New test to catch the error fixed by the above patch.
7743
7744 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7745
7746 Get action warnings (grammar_rule_check) right even when symbol
7747 declarations appear after the rules. Discussed at
7748 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7749 and
7750 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7751 Don't mistake the type of $$ in a midrule to be that of its parent
7752 rule's $$.
7753 * src/reader.c (grammar_current_rule_end): Don't invoke
7754 grammar_rule_check yet since not all symbol declarations may have been
7755 parsed yet.
7756 (grammar_midrule_action): Likewise.
7757 Don't record whether the midrule's $$ has been used yet since actions
7758 haven't been translated yet.
7759 Record the midrule's parent rule and its RHS index within the parent
7760 rule.
7761 (grammar_current_rule_action_append): Don't translate the action yet
7762 since not all symbol declarations may have been parsed yet and, thus,
7763 warnings about types for $$, $n, @$, and @n can't be reported yet.
7764 (packgram): Translate the action and invoke grammar_rule_check now that
7765 all symbol declarations have been parsed.
7766 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7767 after parsing the entire grammar file, the symbol list here in the case
7768 of a midrule is actually the midrule's empty RHS, so reference its
7769 parent rule's RHS where necessary.
7770 On the other hand, now that you can already know it's a midrule, you
7771 aren't forced to think $$ has the same type as its parent rule's $$.
7772 (handle_action_at): In the case of a midrule, reference the parent rule
7773 where necessary.
7774 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7775 members.
7776 (symbol_list_length): Now that this is invoked after all rules have
7777 been parsed, a NULL symbol (rather than a NULL symbol list node)
7778 terminates a rule. symbol_list_print already does this correctly.
7779 * src/symlist.h (symbol_list.midrule_parent_rule,
7780 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7781 remember their relationships with their parents.
7782 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7783 fixed by the above patch.
7784 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7785 implementing...
7786 (Unused values): ... this old test case and...
7787 (Unused values before symbol declarations): ... this new test case.
7788 This one is the same as `Unused values' except that all symbol
7789 declarations appear after the rules in order to catch the rest of the
7790 errors fixed by the above patch.
7791
7792 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7793
7794 More cleanup.
7795 * src/reader.c (current_rule): Declare it static since it's no longer
7796 used outside this file.
7797 (grammar_current_rule_action_append): Remove redundant arguments from
7798 translate_rule_action invocation.
7799 * src/reader.h (current_rule): Remove this unused extern.
7800 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7801 * src/scan-code.l (translate_rule_action): Likewise.
7802
7803 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 Clean up yesterday's patch.
7806 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7807 to...
7808 * src/reader.c (grammar_current_rule_action_append): ... here for
7809 consistency with grammar_current_rule_symbol_append.
7810 * tests/regression.at (Braced code in declaration in rules section):
7811 Make yyerror and yylex static as usual.
7812
7813 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7814
7815 Fix bug that mistakes braced code in a declaration in the rules section
7816 to be a rule action. Mentioned at
7817 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7818 * src/scan-gram.l: Move midrule action detection from the start of the
7819 scanning of any braced code to...
7820 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7821 action. For readability, use $2 and @2 rather than the equivalent
7822 global variables.
7823 * tests/regression.at (Braced code in declaration in rules section):
7824 New test to catch the error fixed by the above patch.
7825
7826 Work on code readability some.
7827 * src/scan-code.l (current_rule): Get rid of this misleading and
7828 redundant declaration: it's actually extern'ed in reader.h.
7829 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7830 translate_action): Add a rule argument and use it instead of the global
7831 current_rule.
7832 (translate_rule_action): This already receives current_rule through an
7833 argument, so pass it on to translate_action instead of assigning
7834 current_rule to current_rule.
7835 (translate_symbol_action, translate_code): Pass rule = NULL to
7836 translate_action.
7837
7838 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7839
7840 Rename %before-definitions to %start-header and %after-definitions to
7841 %end-header. Don't use these declarations to separate pre-prologue
7842 blocks from post-prologue blocks. Add new order-independent
7843 declarations %before-header and %after-header as alternatives to the
7844 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7845 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7846 * NEWS (2.3+): Update for these changes.
7847 * data/glr.c (b4_before_definitions): Update to...
7848 (b4_start_header): ... this.
7849 (b4_after_definitions): Update to...
7850 (b4_end_header): ... this.
7851 * data/glr.cc: Likewise.
7852 * data/lalr1.cc: Likewise.
7853 * data/yacc.c: Likewise.
7854 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7855 prologue blocks with %*-header declarations.
7856 (Calc++ Parser): Likewise.
7857 (Decl Summary): Update names.
7858 (Table of Symbols): Update description.
7859 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7860 (PERCENT_END_HEADER): ... this.
7861 (PERCENT_BEFORE_DEFINITIONS): Update to...
7862 (PERCENT_START_HEADER): ... this.
7863 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7864 (declaration): Update token names and m4 macro names.
7865 When parsing %end-header and %start-header, invoke translate_code
7866 before muscle_code_grow, and no longer set global booleans to remember
7867 whether these declarations have been seen.
7868 Parse new %after-header and %before-header.
7869 * src/reader.c (before_definitions, after_definitions): Remove.
7870 (prologue_augment): Accept a new bool argument to specify whether to
7871 augment the pre-prologue or post-prologue.
7872 * src/reader.h (before_definitions, after_definitions): Remove these
7873 extern's.
7874 (prologue_augment): Add new bool argument.
7875 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7876 (PERCENT_END_HEADER): ... this.
7877 (PERCENT_BEFORE_DEFINITIONS): Update to...
7878 (PERCENT_START_HEADER): ... this.
7879 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7880 * tests/actions.at (Printers and Destructors): Update names.
7881
7882 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7883
7884 Add comparison operators for C++ location classes. Discussed at
7885 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7886 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7887 declaration indicating whether filename_type has an operator==. If
7888 filename_type is `std::string', it defaults to `1', `0' otherwise.
7889 * data/location.cc: Iff b4_define_location_comparison is `1', add
7890 operator== and operator!= for class position and for class location.
7891
7892 Some minor fixes.
7893 * src/scan-action.l: Remove unused file.
7894 * src/symtab.c (symbol_printer_set): Use printer_location not
7895 destructor_location.
7896 * src/symtab.h (struct symbol): Replace incorrect source comment for
7897 printer members.
7898 * tests/input.at (Incompatible Aliases): Update output with correct
7899 printer location.
7900
7901 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7902
7903 Don't put the pre-prologue in the header file. For the yacc.c code
7904 file and the glr.c header and code files, move the pre-prologue before
7905 the token definitions. Add new %before-definitions and
7906 %after-definitions to declare code that will go in both the header file
7907 and code file. Discussed at
7908 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7909 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7910 and
7911 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7912 * NEWS (2.3+): Describe these changes.
7913 * data/glr.c (b4_pre_prologue): Move from within to before...
7914 (b4_shared_declarations): ... this.
7915 Add new b4_before_definitions before b4_token_enums.
7916 Add new b4_after_definitions at the end.
7917 * data/glr.cc (b4_pre_prologue): Replace with...
7918 (b4_before_definitions): ... this in the header file.
7919 (b4_after_definitions): New near the end of the header file.
7920 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7921 code file right before including the header file.
7922 (b4_before_definitions): New in the previous position of
7923 b4_pre_prologue in the header file.
7924 (b4_after_definitions): New near the end of the header file.
7925 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7926 (b4_token_enums_defines): In the code file, move to right before
7927 YYSTYPE for consistency with the header file.
7928 (b4_before_definitions): New right before b4_token_enums_defines in
7929 both the header and code file.
7930 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7931 header and code file.
7932 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7933 of prologues for %union dependencies.
7934 (Decl Summary): In %defines description, mention the effect of
7935 %before-definitions and %after-definitions on the header file.
7936 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7937 than in the pre-prologue so that make check succeeds.
7938 (Table of Symbols): Add entries for %before-definitions and
7939 %after-definitions.
7940 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7941 %before-definitions.
7942 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7943 (declaration): Parse those declarations and append to
7944 b4_before_definitions and b4_after_definitions, respectively.
7945 * src/reader.c (before_definitions, after_definitions): New bools to
7946 track whether those declarations have been seen.
7947 (prologue_augment): Add to the post-prologue if %union,
7948 %before-definitions, or %after-definitions has been seen.
7949 * src/reader.h (before_definitions, after_definitions): New extern's.
7950 * src/scan-gram.l: Scan the new declarations.
7951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7952 prologue block in a %before-definitions or a %after-definitions based
7953 on whether the %union is declared.
7954 * tests/regression.at (Early token definitions with --yacc, Early token
7955 definitions without --yacc): Move tests for token definitions into the
7956 post-prologue since token names are no longer defined in the
7957 pre-prologue.
7958
7959 2006-06-20 Akim Demaille <akim@epita.fr>
7960
7961 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7962 (symbol_get): Use it.
7963 * src/parse-gram.y: Use it.
7964
7965 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7966
7967 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7968 build succeeds when configured with --enable-gcc-warnings.
7969
7970 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7971
7972 * src/parse-gram.y (char_name): New function.
7973 (CHAR, STRING, string_content): For %printer, properly escape.
7974 (ID): Prefer fputs to fprintf.
7975 (id): Reindent to be consistent with other rules.
7976 Properly quote char.
7977
7978 The Translation Project changed its way of publishing translations
7979 to maintainers. I haven't received any responses to my request
7980 for supporting the old way, or for documenting the new way. I
7981 have modified 'bootstrap' to use screen scraping
7982 (in this case, HTML scraping). This is unreliable and inelegant,
7983 but I don't see any better way. Yuck.
7984 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7985 (get_translations): New function, which uses HTML scraping to
7986 deduce locations of latest translations.
7987 Use this function to grab both bison and bison-runtime .po files.
7988 Don't bother priming the pump for the runtime-po domain any more,
7989 as it's now translated better than bison is.
7990
7991 2006-06-19 Akim Demaille <akim@epita.fr>
7992
7993 * src/scan-gram.l: No longer "parse" things after `%union' until
7994 `{'. Rather, return a single "%union" token.
7995 No longer make symbols: return strings, and leave the conversion
7996 to symbols to the parser.
7997 (SC_PRE_CODE, token_type): Remove.
7998 * src/parse-gram.y (%union): New field `character'.
7999 Sort tokens.
8000 (CHAR): New token.
8001 (ID, ID_COLON): Now that the scanner no longer makes them
8002 identifiers, adjust all uses to invoke symbol_get.
8003 (id_colon): New, wraps the conversion from string to symbol.
8004 (%union): Accept a possible union_name.
8005 (symbol): Now can be a char.
8006 * data/c.m4 (b4_union_name): Leave a default value.
8007 * data/glr.c, data/yacc.c: Use it.
8008
8009 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8010
8011 For associating token numbers with token names for "yacc.c", don't use
8012 #define statements unless `--yacc' is specified; always use enum
8013 yytokentype. Most important discussions start at:
8014 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8015 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8016 and
8017 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8018 * NEWS (2.3+): Mention.
8019 * data/c.m4 (b4_yacc_if): New.
8020 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8021 token #define's.
8022 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8023 on token name definitions.
8024 * src/getargs.c (usage): Capitalize `Yacc' in English.
8025 * src/output.c (prepare): Define b4_yacc_flag.
8026 * tests/regression.at (Early token definitions): Test that tokens names
8027 are defined before the pre-prologue not just before the post-prologue.
8028 Remove this test case and copy to...
8029 (Early token definitions with --yacc): ... this to test #define's.
8030 (Early token definitions without --yacc): ... and this to test enums.
8031
8032 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8033
8034 * NEWS: Reword the post-2.3 change to not be so optimistic about
8035 removing the old "look-ahead" spelling.
8036 Update previous look-ahead/lookahead change reports.
8037 * REFERENCES: look-ahead -> lookahead (since that's
8038 what he actually wrote).
8039 * doc/refcard.tex: look ahead -> lookahead,
8040 look-ahead -> lookahead
8041
8042 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8043
8044 For consistency, use `lookahead' instead of `look-ahead' or
8045 `look_ahead'. Discussed starting at
8046 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8047 and then at
8048 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8049 * NEWS: For the next release, note the change to `--report'.
8050 * TODO, doc/bison.1: Update English.
8051 * doc/bison.texinfo: Update English.
8052 (Understanding Your Parser, Bison Options): Document as
8053 `--report=lookahead' rather than `--report=look-ahead'.
8054 * src/conflicts.c: Update English in comments.
8055 (lookahead_set): Rename from look_ahead_set.
8056 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8057 (resolve_sr_conflict): Rename local look_ahead_tokens to
8058 lookahead_tokens, and update other uses.
8059 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8060 count_rr_conflicts, conflicts_free): Update uses.
8061 * src/getargs.c (report_args): Move "lookahead" before alternate
8062 spellings.
8063 (report_types): Update uses.
8064 (usage): For `--report' usage description, state `lookahead' spelling
8065 rather than `look-ahead'.
8066 * src/getargs.h (report.report_lookahead_tokens): Rename from
8067 report_look_ahead_tokens.
8068 * src/lalr.c: Update English in comments.
8069 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8070 (state_lookahead_tokens_count): Rename from
8071 state_look_ahead_tokens_count.
8072 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8073 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8074 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8075 Update other uses.
8076 Update English in output.
8077 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8078 * src/print.c: Update English in comments.
8079 (lookahead_set): Rename from look_ahead_set.
8080 (print_reduction): Rename argument lookahead_token from
8081 look_ahead_token.
8082 (print_core, state_default_rule, print_reductions, print_results):
8083 Update uses.
8084 * src/print_graph.c: Update English in comments.
8085 (print_core): Update uses.
8086 * src/state.c: Update English in comments.
8087 (reductions_new): Update uses.
8088 (state_rule_lookahead_tokens_print): Rename from
8089 state_rule_look_ahead_tokens_print, and update other uses.
8090 * src/state.h: Update English in comments.
8091 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8092 (state_rule_lookahead_tokens_print): Rename from
8093 state_rule_look_ahead_tokens_print.
8094 * src/tables.c: Update English in comments.
8095 (conflict_row, action_row): Update uses.
8096 * tests/glr-regression.at
8097 (Incorrect lookahead during deterministic GLR,
8098 Incorrect lookahead during nondeterministic GLR): Rename
8099 print_look_ahead to print_lookahead.
8100 * tests/torture.at: Update English in comments.
8101 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8102 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8103 (Many lookahead tokens): Update uses.
8104 * data/glr.c: Update English in comments.
8105 * lalr1.cc: Likewise.
8106 * yacc.c: Likewise.
8107 * src/conflicts.h: Likewise.
8108 * src/lalr.h: Likewise.
8109 * src/main.c: Likewise.
8110 * src/output.c: Likewise.
8111 * src/parse-gram.c: Likewise.
8112 * src/tables.h: Likewise.
8113 * tests/calc.at: Likewise.
8114
8115 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8116
8117 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8118
8119 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8120
8121 * TODO: Add request from Nelson H. F. Beebe to be able to install
8122 Bison without installing the yacc script.
8123
8124 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8125
8126 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8127 and yytext if they're already #define'd.
8128 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8129 * src/scan-code-c.c: ... here.
8130 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8131 <config.h>.
8132
8133 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8134
8135 Get Bison to build again when configured with --enable-gcc-warnings.
8136 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8137 missing #include's.
8138 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8139 loc argument as it shadows a global.
8140 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8141 invocation.
8142
8143 * src/.cvsignore: Add scan-code.c.
8144
8145 2006-06-07 Akim Demaille <akim@epita.fr>
8146
8147 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8148 to...
8149 * src/scan-code.l: here.
8150 * tests/input.at (Torturing the Scanner): Fix another location
8151 error.
8152
8153 2006-06-07 Akim Demaille <akim@epita.fr>
8154
8155 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8156
8157 2006-06-06 Akim Demaille <akim@epita.fr>
8158
8159 Extract the parsing of user actions from the grammar scanner.
8160 As a consequence, the relation between the grammar scanner and
8161 parser is much simpler. We can also split "composite tokens" back
8162 into simple tokens.
8163 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8164 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8165 rename as...
8166 * src/location.h, src/location.c (add_column_width)
8167 (location_compute): these.
8168 Fix the column count: the initial column is 0.
8169 (location_print): Be robust to ending column being 0.
8170 * src/location.h (boundary_set): New.
8171 * src/main.c: Adjust to scanner_free being renamed as
8172 gram_scanner_free.
8173 * src/output.c: Include scan-code.h.
8174 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8175 Use boundary_set.
8176 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8177 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8178 which is now, again, a separate token.
8179 Adjust all dependencies.
8180 Whereever actions with $ and @ are used, use translate_code.
8181 (action): Remove this nonterminal which is now useless.
8182 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8183 (grammar_current_rule_action_append): Use translate_code.
8184 (packgram): Bound check ruleno, itemno, and rule_length.
8185 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8186 (last_string, last_braced_code_loc, max_left_semantic_context)
8187 (scanner_initialize, scanner_free, scanner_last_string_free)
8188 (gram_out, gram_lineno, YY_DECL_): Move to...
8189 * src/scan-gram.h: this new file.
8190 (YY_DECL): Rename as...
8191 (GRAM_DECL): this.
8192 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8193 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8194 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8195 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8196 Move these declarations, and...
8197 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8198 these to...
8199 * src/flex-scanner.h: this new file.
8200 * src/scan-gram.l (rule_length, rule_length_overflow)
8201 (increment_rule_length): Remove.
8202 (last_braced_code_loc): Rename as...
8203 (gram_last_braced_code_loc): this.
8204 Adjust to the changes of the parser.
8205 Move all the handling of $ and @ into...
8206 * src/scan-code.l: here.
8207 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8208 (handle_action_dollar, handle_action_at): Move to...
8209 * src/scan-code.l: here.
8210 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8211 scan-code.h, scan-code-c.c, scan-gram.h.
8212 (EXTRA_bison_SOURCES): Add scan-code.l.
8213 (BUILT_SOURCES): Add scan-code.c.
8214 (yacc): Be robust to white spaces.
8215
8216 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8217 * tests/regression.at: Adjust the column numbers.
8218 * tests/regression.at: Adjust the error message.
8219
8220 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8221
8222 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8223 Use Akim's wording from
8224 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8225
8226 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8227
8228 Between Bison releases, manually append `+' to the previous Bison
8229 release number, and use that as a signal to automatically print the
8230 ChangeLog's CVS Id keyword from --version. Discussed starting at
8231 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8232 * ChangeLog: Add Id header.
8233 * configure.ac (AC_INIT): Append `+' to `2.3'.
8234 * src/.cvsignore: Add revision.c.
8235 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8236 (BUILT_SOURCES): Add revision.c.
8237 (revision.c): New target rule. This file defines a new global variable
8238 named revision. It initializes it with either the Id from ChangeLog
8239 or, if VERSION doesn't contain `+', with the empty string.
8240 * src/getargs.c (version): Print the value of revision.
8241 * src/revision.h: Extern revision.
8242
8243 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8244
8245 * NEWS: Version 2.3.
8246 * configure.ac (AC_INIT): Likewise.
8247
8248 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8249
8250 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8251 with no arguments, not as an object-like macro. This is for
8252 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8253 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8254 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8255 Document this.
8256
8257 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8258
8259 * src/getargs.c (usage): Back out yesterday's modification of the
8260 --help output so that we don't have to wait for translation before
8261 releasing 2.3.
8262
8263 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8264
8265 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8266 Problem reported by Akim Demaille.
8267
8268 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8269
8270 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8271
8272 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8273
8274 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8275 generated source code. Problem reported by Frans Englich in
8276 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8277
8278 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8279
8280 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8281 shell, not within 'make', so that 'make' by an ordinary builder
8282 (using GNU make) does not worry about configuring gzip. This also
8283 works around a bug reported independently by Keith Thompson and by
8284 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8285 stderr rather than stdout, messing up the build logs.
8286
8287 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8288
8289 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8290 to make sure that YYID will never be unused. This fixes a 'make
8291 maintainer-check' failure caused by the recent changes to the 'Trivial
8292 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8293 not used.
8294 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8295
8296 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8297
8298 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8299 state before an empty RHS is always resolved here. Only the location
8300 of that state is guaranteed to be resolved, and that's enough. This
8301 fixes the remaining bug reported by Derek M. Jones in
8302 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8303 * tests/glr-regression.at (Uninitialized location when reporting
8304 ambiguity): Test the above case.
8305 Also, the embedded comments in this test case claim it checks the case
8306 of an empty RHS that has inherited the initial location. However, the
8307 corresponding LHS was already resolved, so yyresolveLocations didn't
8308 actually have reason to modify it. Fix this by forcing
8309 nondeterministic operation at the beginning of the parse.
8310
8311 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8312
8313 * data/c.m4 (b4_yy_symbol_print_generate):
8314 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8315 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8316 of the bugs reported today by Derek M Jones in
8317 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8318 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8319 defined to be a type name without parens or brackets.
8320 (Location Type): Similarly for YYLTYPE.
8321 * tests/regression.at (Trivial grammars): Put in a test for this
8322 bug that will be caught by 'make maintainer-check' (though not,
8323 alas, by 'make check' unless your compiler is picky).
8324
8325 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8326
8327 * NEWS: Version 2.2.
8328 * configure.ac (AC_INIT): Likewise.
8329
8330 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8331
8332 * data/glr.c (yyreportTree): Make room in yystates for the state
8333 preceding the RHS. This fixes the segmentation fault reported by Derek
8334 M. Jones in
8335 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8336 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8337 to the user. Reported for yyreportTree by Derek M. Jones later in the
8338 same thread.
8339 * THANKS: Add Derek M. Jones.
8340 Update my email address.
8341 Fix typo in Steve Murphy's name.
8342
8343 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8344
8345 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8346 checking against YYLAST that caused the parser to miss a potential
8347 alternative in its diagnostic.
8348 Problem reported by Maria Jose Moron Fernandez in
8349 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8350 * data/lalr1.cc (yysyntax_error_): Likewise.
8351 * data/yacc.c (yysyntax_error): Likewise.
8352 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8353 tokens, in case we run into an older C compiler.
8354 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8355 Use them to check for the off-by-one error fixed above.
8356
8357 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8358 YYSIZE_T, not size_t.
8359 * tests/regression.at (Trivial grammars): New test, to catch
8360 the error fixed by the above patch.
8361
8362 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8363
8364 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8365 scheme.
8366 Reported by Steve Murphy.
8367
8368 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8369
8370 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8371 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8372
8373 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8374
8375 Implement --trace=m4.
8376 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8377 * src/output.c (output_skeleton): When set, pass -dV to m4.
8378
8379 Factor the handling of flags in m4.
8380 * src/output.c (prepare): Rename the muscle names debug, defines,
8381 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8382 * data/c.m4: Adjust.
8383 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8384 Use b4_define_flag_if to define other b4_FLAG_if macros.
8385 (b4_location_if): As a consequence, rename as...
8386 (b4_locations_if): this, for consistency.
8387 Adjust all the skeletons.
8388
8389 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8390
8391 * etc/bench.pm: Shorten bench names.
8392
8393 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8394
8395 * src/output.h, src/output.c (error_verbose): Move to...
8396 * src/getargs.h, src/getargs.c: here.
8397 Sort the flags.
8398 Adjust dependencies.
8399
8400 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8401
8402 * data/c.m4 (b4_copyright): Put the special exception for Bison
8403 skeletons here, so we don't have to put it in each skeleton. All
8404 uses changed. Suggested by Akim Demaille. Also, wrap the
8405 copyright notice, in case it is longer than 80 columns. Replace
8406 comma by newline after title.
8407
8408 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8409
8410 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8411 incompatibility, not a bug. Mention that it wasn't fixed as of
8412 flex 2.5.33.
8413
8414 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8415
8416 * examples/extexi: Enforce the precedence of concatenation over
8417 >>.
8418 Reported by Tommy Nordgren.
8419
8420 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8421
8422 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8423 with the member "token".
8424 Reported by Martin Nylin.
8425
8426 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 * data/glr.c: Switch to Bison 2.2 special-exception language in
8429 the copyright notice. Use more-regular format for titles and
8430 copyright notices.
8431 * data/glr.cc: Likewise.
8432 * data/location.cc: Likewise.
8433 * data/yacc.cc: Likewise.
8434 * doc/bison.texinfo (Conditions): Document this.
8435 * NEWS: likewise. Upgrade version to 2.2.
8436
8437 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8438
8439 * data/glr.cc: Remove dead code.
8440
8441 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8442
8443 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8444 that variable and the line breaks the bootstrap. Problem reported
8445 by Juan M. Guerrero.
8446
8447 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8448
8449 * doc/bison.texinfo (Multiple start-symbols): New.
8450
8451 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8452
8453 * etc/README, etc/bench.pl: New.
8454
8455 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8456
8457 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8458 rule.
8459 Reported by Mickael Labau.
8460 * tests/input.at (Torturing the Scanner): Test it.
8461
8462 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8463
8464 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8465 Problem reported by Bob Rossi.
8466
8467 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8468
8469 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8470 and didn't really work.
8471 For the index, use @ifnotinfo, not @iftex.
8472 Minor cleanups of spacing and terminology.
8473
8474 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8475
8476 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8477 of AT_NAME_PREFIX when %name-prefix is not used.
8478
8479 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8480
8481 Apply --prefix to C++ skeletons too: they change the namespace.
8482 The test suite already exercize these cases.
8483 * data/c++.m4 (b4_namespace): New.
8484 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8485 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8486 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8487 * doc/bison.texinfo: Document it.
8488 (Option Cross Key): Use @multitable in all formats. It looks
8489 nicer, even in TeX outputs.
8490 (Rules): Use the same code whatever the output type is.
8491 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8492 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8493 * tests/calc.at: Use it, instead of hard coding `yy'.
8494
8495 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8496
8497 * TODO: Remove dead items.
8498
8499 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8500
8501 * doc/FAQ: Remove, merged into...
8502 * doc/bison.texinfo (FAQ): this.
8503 * doc/Makefile.am (EXTRA_DIST): Adjust.
8504
8505 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8506
8507 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8508 even if empty.
8509 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8510 * doc/bison.texinfo (Calc++ Scanner): Use it.
8511
8512 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8513
8514 Fix two nits reported by twlevo, plus one more that I discovered.
8515
8516 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8517 this is the usual Bison style.
8518 * src/location.h (location_print): Likewise.
8519
8520 * src/reader.h (token_name): Likewise.
8521
8522 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8523
8524 Fix some nits reported by twlevo.
8525 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8526 and "POSIX". Use more-modern syntax for URLs. Mention C++
8527 and ask for Java. Don't hardwire OS version numbers. Add
8528 copyright notice.
8529 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8530 * src/conflicts.c (solved_conflicts_obstack): Now static.
8531
8532 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8533
8534 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8535 page. Say "you can use it" not "you may use it" as on the web page;
8536 we're describing capabilities not granting permission.
8537
8538 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8539
8540 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8541 shadowing warnings. Use usual patter for iterating through RHS.
8542 * tests/glr-regression.at
8543 (Uninitialized location when reporting ambiguity):
8544 Modify yylex so that it uses its argument, rather than trying
8545 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8546 const char -> char const.
8547
8548 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8549 Don't use tabs inside commands; it messes up 'ps'.
8550 Problem reported by twlevo.
8551
8552 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8553
8554 * tests/glr-regression.at (Uninitialized location when reporting
8555 ambiguity): New test case.
8556 * data/glr.c (yyresolveLocations): New function, which uses
8557 YYLLOC_DEFAULT.
8558 (yyresolveValue): Invoke yyresolveLocations before reporting an
8559 ambiguity.
8560 * doc/bison.texinfo (Default Action for Locations): Note
8561 YYLLOC_DEFAULT's usage for ambiguity locations.
8562 (GLR Semantic Actions): Cross-reference those notes.
8563
8564 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8565
8566 * tests/glr-regression.at (Leaked semantic values when reporting
8567 ambiguity): Remove unnecessary union and type declarations.
8568 (Leaked lookahead after nondeterministic parse syntax error): New test
8569 case.
8570 * data/glr.c (yyparse): Check for zero stacks remaining before
8571 attempting to shift the lookahead so that you don't lose it.
8572
8573 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8574
8575 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8576 * tests/glr-regression.at (Leaked semantic values when reporting
8577 ambiguity): New test case.
8578 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8579 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8580 now unnecessary yystackp parameter.
8581 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8582 destructors can be called.
8583
8584 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8585 in existing testcases.
8586
8587 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8588
8589 Don't leak semantic values for parent RHS when a user action cuts the
8590 parser, and clean up related code a bit.
8591 * tests/glr-regression.at (Leaked merged semantic value if user action
8592 cuts parse): Rename to...
8593 (Leaked semantic values if user action cuts parse): ... this. Add check
8594 for leaked parent RHS values.
8595 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8596 between an unresolved state (non-empty chain of semantic options) and
8597 an incomplete one (signaled by an empty chain).
8598 (yyresolveStates): Document the interface. Move all manipulation of a
8599 successfully or unsuccessfully resolved yyGLRState to...
8600 (yyresolveValue): ... here so that yyresolveValue always leaves a
8601 yyGLRState with consistent data and thus is easier to understand.
8602 Remove the yyvalp and yylocp parameters since they are always just
8603 taken from the yys parameter. When reporting a discarded merged value
8604 in debugging output, note that it is incompletely merged. Document the
8605 interface.
8606 (yyresolveAction): If resolving any of the RHS states fails, destroy
8607 them all rather than leaking them. Thus, as long as user actions are
8608 written to clean up the RHS correctly, yyresolveAction always cleans up
8609 the RHS of a semantic option. Document the interface.
8610
8611 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8612
8613 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8614 led to a segmentation fault in GNU Pascal. Problem reported
8615 by Waldek Hebisch.
8616
8617 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8618
8619 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8620 mid-rule action inside a nonterminal symbol in order to declare a
8621 destructor for its semantic value.
8622
8623 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8624
8625 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8626 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8627 __cplusplus && ! defined _STDLIB_H && !
8628 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8629 defined free))]: Include <stdlib.h> rather than rolling our own
8630 declarations of malloc and free, to avoid problems with
8631 incompatible declarations (using 'throw') C++'s stdlib.h. This
8632 should fix Debian bug 340012
8633 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8634 reported by Guillaume Melquiond.
8635
8636 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8637
8638 * NEWS: Clarify symbols versus types in unused-value warnings.
8639
8640 * configure.ac (AC_INIT): Bump version number.
8641
8642 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8643
8644 * NEWS: Version 2.1a.
8645 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8646 since C99 requires this.
8647
8648 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8649
8650 * m4/c-working.m4: New file.
8651 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8652
8653 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8654
8655 * Makefile.maint: Merge from coreutils.
8656
8657 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8658
8659 More portability fixes for problems summarized by Nelson H. F. Beebe.
8660
8661 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8662 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8663 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8664 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8665 messes up because C++ code is compiled in 32-bit mode but linked
8666 in 64-bit mode.
8667
8668 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8669
8670 More portability fixes for problems summarized by Nelson H. F. Beebe.
8671
8672 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8673 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8674
8675 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8676 nodist_PROGRAMS, since we don't need to actually compile the
8677 example if we're just doing a plain 'make'. This avoids bothering
8678 the installer unnecessarily about problems due to weird C++
8679 compilers.
8680
8681 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8682
8683 More portability fixes for problems summarized by Nelson H. F. Beebe.
8684
8685 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8686 than #include "...", and compile with -I'.'. The old method was
8687 not portable, according to Posix and the C standard, and it does
8688 not work with Sun C 5.7, where previous #line directives affect
8689 the working directory used in later #include "..." directives.
8690
8691 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8692
8693 Various DJGGP specific issues in /djgpp
8694
8695 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8696
8697 More portability fixes for problems summarized by Nelson H. F. Beebe.
8698
8699 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8700 '#include <map>' works and that you can apply ++ to iterators.
8701
8702 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8703
8704 Work around portability problems summarized by Nelson H. F. Beebe in
8705 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8706
8707 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8708 that '#include <string>' works.
8709
8710 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8711 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8712 "warning: sorry: semantics of inline function static data `const
8713 unsigned char translate_table[262]' are wrong (you'll wind up with
8714 multiple copies)".
8715
8716 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8717 or, xor to not_, and_, or_, and xor_, respectively. This works
8718 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8719 random system header somewhere that includes the equivalent of
8720 <iso646.h>.
8721
8722 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8723 -E" works; it apparently doesn't work with PathScale EKO Compiler
8724 Suite Version 2.0.
8725
8726 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8727
8728 During deterministic GLR operation, user actions should be able to
8729 influence the parse by changing yychar. To make this easier to fix and
8730 to make glr.c easier to evolve in general, don't maintain yytoken in
8731 parallel with yychar; just compute yytoken when needed.
8732 * tests/glr-regression.at (Incorrect lookahead during deterministic
8733 GLR): Check that setting yychar in a user action has the intended
8734 effect.
8735 * data/glr.c (yyGLRStack): Remove yytokenp member.
8736 (yyclearin): Don't set *yytokenp.
8737 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8738 yychar rather than *yytokenp to determine the current lookahead.
8739 Compute yytoken locally when needed.
8740 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8741 point to.
8742
8743 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8744 after `--report' documentation.
8745
8746 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8747
8748 * src/parse-gram.y (grammar_declaration): Location of printer
8749 symbol is @1, not list->location. Bug reported by twlevo.
8750 * tests/input.at (Incompatible Aliases): Adjust to above change.
8751
8752 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8753
8754 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8755 all the test at once. This makes the output easier to read in the
8756 normal case.
8757
8758 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8759 got from <http://bro-ids.org/download.html>. The bug is that
8760 when two actions appeared in succession, the second one was
8761 scanned before the first one was added to the grammar rule
8762 as a midrule action. Bison then output the incorrect warning
8763 "parse.y:905.17-906.36: warning: unused value: $3".
8764 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8765 associated with a value.
8766 (rhs): Don't invoke grammar_current_rule_action_append.
8767 (action): Invoke it here instead.
8768 * src/reader.c (grammar_midrule_action): Now extern.
8769 (grammar_current_rule_action_append): Don't invoke
8770 grammar_midrule_action; that is now the scanner's job.
8771 * src/reader.h (last_string, last_braced_code_loc):
8772 (grammar_midrule_action): New decls.
8773 * src/scan-gram.l (last_string): Now extern, sigh.
8774 (last_braced_code_loc): New extern variable.
8775 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8776 rule already has an action.
8777 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8778 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8779 Add some tests to check that the above changes fixed the bug.
8780
8781 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8782
8783 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8784 All used changed. Check whether the symbol has a destructor,
8785 not whether it is typed.
8786 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8787 that the values are still reported as unused. All line numbers
8788 adjusted.
8789
8790 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8791
8792 Work around a bug in bro 0.8, which underparenthesizes its
8793 definition of YYLLOC_DEFAULT.
8794 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8795 their arguments.
8796 * data/lalr1.cc: Likewise.
8797 * data/yacc.cc: Likewise.
8798
8799 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8800
8801 Work around a bug in Pike 7.0, and give the Pike folks a
8802 better way to override the usual int widths.
8803 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8804 user can override the types.
8805 (short): #undef, to work around a bug in Pike 7.0.
8806 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8807 (union yyalloc.yyss): Use yytype_int16 rather than short.
8808 All uses changed.
8809 (yysigned_char): Remove.
8810 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8811 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8812 * tests/regression.at (Web2c Actions): Adjust to above changes.
8813
8814 * src/reader.c (check_and_convert_grammar): New function.
8815 (reader): Close the input file even if something went wrong during
8816 parsing. Minor file descriptor leak reported by twlevo.
8817
8818 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8819 to pacify gcc -Wswitch-default.
8820 * src/scan-gram.l (adjust_location): Use a default: break; case
8821 to pacify gcc -Wswitch-default.
8822 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8823 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8824 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8825 Move these decls to scan-skel.l, since they don't need to be
8826 visible elsewhere.
8827 * src/scan-skel.l: Accept the above decls.
8828 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8829 is used.
8830
8831 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8832
8833 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8834 since we don't want to insist on a version number at the start
8835 of the changelog every time.
8836 * Makefile.maint: Sync from coreutils a bit better.
8837 (sc_trailing_blank): Renamed from sc_trailing_space.
8838 All uses changed.
8839 (sc_no_if_have_config_h, sc_require_config_h):
8840 (sc_prohibit_assert_without_use): New rules.
8841 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8842 (sc_dd_max_sym_length): Fix leading spaces in rule.
8843 (sc_system_h_headers): Prefix with @.
8844 (sc_useless_cpp_parens, m4-check): Output line numbers.
8845 (changelog-check): Allow version only in head.
8846 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8847 satisfy new Makefile.maint rule.
8848 * data/glr.c: Likewise.
8849 * data/glr.cc: Likewise.
8850 * data/lalr1.cc: Likewise.
8851 * data/yacc.c: Likewise.
8852 * lib/ebitsetv.c: Likewise.
8853 * lib/lbitset.c: Likewise.
8854 * lib/subpipe.c: Likewise.
8855 * lib/timevar.c: Likewise.
8856 * src/system.h: Likewise.
8857 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8858 * djgpp/Makefile.maint: Add copyright notice.
8859 * djgpp/README.in: Likewise.
8860 * djgpp/config.bat: Likewise.
8861 * djgpp/config.site: Likewise.
8862 * djgpp/config_h.sed: Likewise.
8863 * djgpp/djunpack.bat: Likewise.
8864 * djgpp/config.sed: Fix copyright notice to match standard format.
8865 * djgpp/subpipe.h: Likewise.
8866 * lib/bitsetv-print.c: Likewise.
8867 * lib/bitsetv.c: Likewise.
8868 * lib/subpipe.h: Likewise.
8869 * lib/timevar.c: Likewise.
8870 * lib/timevar.h: Likewise.
8871 * djgpp/subpipe.c: Use standard recipe for config.h.
8872 * lib/abitset.c: Likewise.
8873 * lib/bitset.c: Likewise.
8874 * lib/bitset_stats.c: Likewise.
8875 * lib/bitsetv-print.c: Likewise.
8876 * lib/bitsetv.c: Likewise.
8877 * lib/ebitsetv.c: Likewise.
8878 * lib/get-errno.c: Likewise.
8879 * lib/lbitset.c: Likewise.
8880 * lib/subpipe.c: Likewise.
8881 * lib/timevar.c: Likewise.
8882 * lib/vbitset.c: Likewise.
8883 * tests/local.at: Likewise.
8884 * src/scan-gram.l: Don't include verify.h, since system.h does
8885 that for us.
8886 * .x-sc_require_config_h: New file.
8887 * .x-sc_unmarked_diagnostics: New file.
8888
8889 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8890
8891 Be a bit more systematic about using 'abort'.
8892 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8893 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8894 Put 'default: abort ();' before some other case, to satisfy older
8895 pedantic compilers.
8896 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8897 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8898 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8899 * src/conflicts.c (resolve_sr_conflict): Likewise.
8900 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8901 (get_decision_str, get_orientation_str, get_node_alignment_str):
8902 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8903 (get_linestyle_str, get_arrowstyle_str): Likewise.
8904 * src/conflicts.c (resolve_sr_conflict):
8905 Use a default case rather than one for the one remaining enum
8906 value, to catch invalid enum values as well.
8907 * src/lalr.c (set_goto_map, map_goto):
8908 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8909 * src/nullable.c (nullable_compute, token_definitions_output):
8910 Likewise.
8911 * src/reader.c (packgram, reader): Likewise.
8912 * src/state.c (transitions_to, state_new, state_reduction_find):
8913 Likewise.
8914 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8915 (symbol_pack): Likewise.
8916 * src/tables.c (conflict_row, pack_vector): Likewise.
8917 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8918 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8919 * src/system.h: Don't include <assert.h>.
8920 (assert): New macro.
8921
8922 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8923 (Destructor Decl, Parser Function, Pure Calling):
8924 Describe rules for braces inside C code more carefully.
8925
8926 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8927
8928 Fix some porting glitches found by Nelson H. F. Beebe.
8929 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8930 compilers that don't understand that abort () does not return.
8931 * src/state.c (transitions_to): Likewise.
8932 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8933 that '#include <cstdlib>' works.
8934 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8935 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8936 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8937 for the benefit of some pre-C99 compilers.
8938
8939 * bootstrap: Undo changes to gnulib files that autoreconf made.
8940
8941 Minor fixups to get 'make maintainer-check' to work.
8942 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8943 with the new verify.h implementation.
8944 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8945 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8946 * data/yacc.c (YYUSE): Likewise.
8947 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8948 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8949 * src/parse-gram.y (declaration): Don't pass a string constant
8950 to a function that expects char *, since GCC might complain
8951 about the constant value.
8952 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8953 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8954 before #defining them.
8955 * tests/glr-regression.at
8956 (Incorrectly initialized location for empty right-hand side in GLR):
8957 In yyerror, use the msg arg.
8958 (Corrupted semantic options if user action cuts parse):
8959 (Incorrect lookahead during deterministic GLR):
8960 (Incorrect lookahead during nondeterministic GLR):
8961 Don't name a local var 'index'; it shadows string.h's 'index'.
8962
8963 2006-01-19 Akim Demaille <akim@epita.fr>
8964
8965 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8966 location, not just parts of it.
8967
8968 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8969
8970 * NEWS: Document the fact that multiple %unions are now allowed.
8971 * doc/bison.texinfo (Union Decl): Likewise.
8972 * TODO: This feature is now implemented, so remove it from
8973 the wishlist.
8974
8975 * Makefile.maint: Merge with coreutils Makefile.maint.
8976 (CVS_LIST): Use build-aux version if available.
8977 (VERSION_REGEXP): New macro.
8978 (syntax-check-rules): Add sc_no_if_have_config_h,
8979 sc_prohibit_assert_without_use, sc_require_config_h,
8980 sc_useless_cpp_parens.
8981 (sc_obsolete_symbols): Check for O_NDELAY.
8982 (sc_dd_max_sym_length): Track coreutils.
8983 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8984 (sc_useless_cpp_parens): New rule.
8985 (news-date-check): Look for version or today's date.
8986 (changelog-check): Don't require version number near head.
8987 (copyright-check): Use current year instead of hardwiring 2005.
8988 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8989 (announcement): Add --gpg-key-ID.
8990
8991 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8992 with "file system".
8993
8994 Avoid undefined behavior that addressed just before the start of an
8995 array. Problem reported by twlevo.
8996 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8997 * src/lalr.c (build_relations): Rely on new sentinel.
8998 * src/gram.c (gram_free): Adjust to new sentinel.
8999
9000 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9001
9002 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9003 yylookaheadNeeds. All uses updated.
9004 (yysplitStack): Rename local yynewLookaheadStatuses to
9005 yynewLookaheadNeeds.
9006 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9007 GLR): In comments, change `lookahead status' to `lookahead need'.
9008
9009 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9010
9011 * data/glr.c (yysplitStack): A little stylistic rewrite.
9012
9013 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9014
9015 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9016
9017 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9018
9019 * doc/bison.texinfo: Fix some typos.
9020 (GLR Semantic Actions): New subsection discussing special
9021 considerations because GLR semantic actions might be deferred.
9022 (Actions): Mention look-ahead usage of yylval.
9023 (Actions and Locations): Mention look-ahead usage of yylloc.
9024 (Special Features for Use in Actions): Add YYEOF entry and mention it
9025 in the yychar entry.
9026 In the yychar entry, remove mention of the local yychar case (pure
9027 parser) since this is irrelevant information when writing semantic
9028 actions and since it's already discussed in `Table of Symbols' where
9029 yychar is otherwise described as an external variable.
9030 In the yychar entry, don't call it the `current' look-ahead since it
9031 isn't when semantic actions are deferred.
9032 In the yychar and yyclearin entries, add note about deferred semantic
9033 actions.
9034 Add yylloc and yylval entries discussing look-ahead usage.
9035 (Look-Ahead Tokens): When discussing yychar, don't call it the
9036 `current' look-ahead, and do mention yylval and yylloc.
9037 (Error Recovery): Cross-reference `Action Features' when mentioning
9038 yyclearin.
9039 (Table of Symbols): In the yychar entry, don't call it the `current'
9040 look-ahead.
9041 In the yylloc and yylval entries, mention look-ahead usage.
9042
9043 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9044
9045 * tests/glr-regression.at: Update copyright year to 2006.
9046
9047 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9048
9049 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9050 use during nondeterministic operation to track which stacks have
9051 actually needed the current lookahead.
9052 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9053 Allocate, deallocate, resize, and otherwise shuffle space for
9054 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9055 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9056 appropriately during nondeterministic operation.
9057 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9058 members to store the current lookahead to be used by the deferred
9059 user action.
9060 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9061 from which the RHS is taken. Set the lookahead members of the new
9062 yySemanticOption according to the lookahead status for stack yyk.
9063 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9064 yyaddDeferredAction.
9065 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9066 members of yySemanticOption before invoking yyuserAction, and then set
9067 them back to their current values afterward.
9068 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9069 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9070 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9071 titles for consistency.
9072 (Leaked merged semantic value if user action cuts parse): In order to
9073 suppress lint warnings, use arguments in merge function, and assign
9074 char value < 128 in main.
9075 (Incorrect lookahead during deterministic GLR): New test case.
9076 (Incorrect lookahead during nondeterministic GLR): New test case.
9077
9078 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9079
9080 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9081 !yyvaluep as signal that no semantic value is available to print.
9082 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9083 to print a semantic value.
9084
9085 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9086
9087 * tests/glr-regression.at: For consistency with my newer test cases,
9088 don't thank myself.
9089
9090 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9091
9092 * data/glr.c (yyresolveValue): When merging semantic options, if at
9093 least one user action succeeds but a later one cuts the parse, then
9094 destroy the semantic value before returning rather than leaking it.
9095 (yyresolveStates): If a user action cuts the parse and thus
9096 yyresolveValue fails, ignore the (unset) semantic value rather than
9097 corrupting the yyGLRState, and empty the semantic options list since
9098 the user actions should have called all necessary destructors.
9099 Simplify code with YYCHK.
9100 * tests/glr-regression.at (Corrupted semantic options if user action
9101 cuts parse): New test case.
9102 (Undesirable destructors if user action cuts parse): New test case.
9103 Before applying any of this patch, this test case never actually failed
9104 for me... but only because the corrupted semantic options usually
9105 masked this bug.
9106 (Leaked merged semantic value if user action cuts parse): New test
9107 case.
9108
9109 2006-01-05 Akim Demaille <akim@epita.fr>
9110
9111 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9112
9113 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9114
9115 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9116 _MSC_VER. Problem reported by Cenzato Marco.
9117 (b4_c_function_def): Use it.
9118 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9119 b4_c_modern.
9120 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9121 than rolling our own.
9122
9123 2006-01-04 Akim Demaille <akim@epita.fr>
9124
9125 Also warn about non-used mid-rule values.
9126 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9127 member.
9128 (symbol_list_new): Adjust.
9129 * src/reader.c (symbol_typed_p): New.
9130 (grammar_rule_check): Use it.
9131 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9132 Check its rule.
9133 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9134 Use it.
9135 * tests/actions.at (Exotic Dollars): Adjust.
9136
9137 2006-01-04 Akim Demaille <akim@epita.fr>
9138
9139 * src/reader.c (grammar_midrule_action): If $$ is set in a
9140 mid-rule, move the `used' bit to its lhs.
9141 * tests/input.at (Unused values): New.
9142 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9143
9144 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9145
9146 * doc/bison.texinfo (Bison Options): Say more accurately what
9147 --yacc does.
9148 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9149 about declarations in the grammar when in Yacc mode, as POSIX does
9150 not require a diagnostic when the grammar uses extensions.
9151
9152 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9153
9154 Warn about dubious constructions like "%token T T".
9155 Reported by twlevo.
9156 * src/symtab.h (struct symbol.declared): New member.
9157 * src/symtab.c (symbol_new): Initialize it to false.
9158 (symbol_class_set): New arg DECLARING, specifying whether
9159 this is a declaration that we want to warn about, if there
9160 is more than one of them. All uses changed.
9161
9162 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9163 Allow multiple %union directives, whose contents concatenate.
9164 * src/parse-gram.y (grammar_declaration): Likewise.
9165 Use muscle_code_grow, so that we don't need stype_line any more.
9166 All uses changed.
9167
9168 * src/muscle_tab.c (muscle_grow): Fix comment.
9169
9170 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9171 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9172 Update copyright year to 2006.
9173
9174 2006-01-03 Akim Demaille <akim@epita.fr>
9175
9176 Have glr.cc pass (some of) the calc.at tests.
9177 * data/glr.cc (b4_parse_param_orig): New.
9178 (b4_parse_param): Improve its definition, and bound it more
9179 clearly in the skeleton.
9180 (b4_epilogue): Append, instead of prepending, in order to keep
9181 #line consistency.
9182 Simplify the generation of auxiliary functions: locations and
9183 purity are mandated.
9184 (b4_global_tokens_and_yystype): Honor it.
9185 * data/location.cc (c++.m4): Don't include it.
9186 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9187 and AT_SKEL_CC_IF.
9188 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9189 AT_LALR1_CC_IF.
9190 Be sure to initialize the first position's filename.
9191 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9192 mandated anyway.
9193 (AT_CHECK_CALC_GLR_CC): New.
9194 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9195
9196 2006-01-02 Akim Demaille <akim@epita.fr>
9197
9198 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9199 c.m4.
9200 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9201 * data/glr.cc: Do not include stack.hh.
9202
9203 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9204
9205 * data/glr.c: Reformat whitespace with tabs.
9206 (b4_lpure_formals): Remove this unused m4 macro.
9207 * tests/cxx-type.at: Reformat whitespace with tabs.
9208 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9209 since it's a member. Rename type to isNterm for clarity.
9210
9211 2005-12-29 Akim <akim@sulaco.local>
9212
9213 Let glr.cc catch up with symbol_value_print.
9214 * data/glr.cc (b4_yysymprint_generate): Replace by...
9215 (b4_yy_symbol_print_generate): this.
9216 (yy_symbol_print, yy_symbol_value_print): Declare them.
9217
9218 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9219
9220 * src/location.h (boundary): Note that a line or column equal
9221 to INT_MAX indicates an overflow.
9222 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9223 (rule_length_overflow, increment_rule_length, add_column_width):
9224 New functions.
9225 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9226 (<SC_BRACED_CODE>"}"):
9227 Use increment_rule_length rather than incrementing it by hand.
9228 (adjust_location, handle_syncline): Diagnose overflow.
9229 (handle_action_dollar, handle_action_at):
9230 Fix bug with monstrosities like $-2147483648.
9231 Remove now-unnecessary checks.
9232 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9233 (convert_ucn_to_byte): Verify assumptions.
9234 (handle_syncline): New arg LOC. All callers changed.
9235 Don't store through a value derived from char const * pointer.
9236
9237 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9238 GCC warnings.
9239
9240 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9241
9242 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9243 Remove unnecessary forward static decls.
9244
9245 2005-12-27 Akim Demaille <akim@epita.fr>
9246
9247 * src/reader.c (grammar_current_rule_check): Also check that $$
9248 is used.
9249 Take the rule to check as argument, hence rename as...
9250 (grammar_rule_check): this.
9251 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9252 Rename as...
9253 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9254 (grammar_midrule_action, grammar_symbol_append): Now static.
9255 * tests/torture.at (input): Don't rely on the default action
9256 being always performed.
9257 * tests/calc.at: "Set" $$ even when the action is "cut" with
9258 YYERROR or other.
9259 * tests/actions.at (Exotic Dollars): Instead of using unused
9260 values, check that the warning is issued.
9261
9262 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9263
9264 * NEWS: Improve wording for unused-value warnings.
9265
9266 2005-12-22 Akim Demaille <akim@epita.fr>
9267
9268 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9269 (b4_yysymprint_generate): Rename as...
9270 (b4_yy_symbol_print_generate): this.
9271 Generate yy_symbol_print instead of yysymprint.
9272 Generate also yy_symbol_value_print, and use it.
9273
9274 2005-12-22 Akim Demaille <akim@epita.fr>
9275
9276 * NEWS: Warn about unused values.
9277 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9278 a `used' member.
9279 (symbol_list_n_get, symbol_list_n_used_set): New.
9280 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9281 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9282 * src/reader.c (grammar_current_rule_check): Check that values are
9283 used.
9284 * src/symtab.c (symbol_print): Accept 0.
9285 * tests/existing.at: Remove the type information.
9286 Empty the actions.
9287 Remove useless actions (beware of mid-rule actions: perl -000
9288 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9289 * tests/actions.at (Exotic Dollars): Use unused values.
9290 * tests/calc.at: Likewise.
9291 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9292 Likewise.
9293
9294 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9295 rule_useful_p.
9296
9297 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9298
9299 Undo 2005-12-01 tentative license wording change. The wording is
9300 still being reviewed by the lawyers, and we don't want to wait for
9301 them before publishing a test release. For now, revert to the
9302 previous wording.
9303 * NEWS: Undo 2005-12-01 change.
9304 * data/glr.c: Revert to previous license wording.
9305 * data/glr.cc: Likewise.
9306 * data/lalr1.cc: Likewise.
9307 * data/location.cc: Likewise.
9308 * data/yacc.c: Likewise.
9309
9310 * NEWS: Reword %destructor vs YYABORT etc.
9311 * data/glr.c: Use American spacing, for consistency.
9312 * data/glr.cc: Likewise.
9313 * data/lalr1.cc: Likewise.
9314 * data/yacc.c: Likewise.
9315 * data/yacc.c: Reformat comments slightly.
9316 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9317 for consistency. Fix some spelling errors and reword recently-included
9318 text slightly.
9319 * tests/cxx-type.at: Cast results of malloc, for C++.
9320
9321 2005-12-21 Joel E. Denny <address@hidden>
9322
9323 * tests/cxx-type.at: Construct a tree, count the parents of shared
9324 nodes, and free each node once and only once. Previously, the memory
9325 for semantic values was leaked instead.
9326
9327 2005-12-21 Joel E. Denny <address@hidden>
9328
9329 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9330 (yylval, yylloc): If pure, #define to yystackp->yyval and
9331 yystackp->yyloc similar to yychar and yynerrs.
9332 (yyparse): If pure, remove local yylval and yylloc. Add local
9333 yystackp to accommodate pure definitions of yylval and yylloc.
9334 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9335 yylvalp and yyllocp to &yylval and &yylloc.
9336 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9337 namespace. Previously, nerrs and char were missing, but lval and lloc
9338 weren't necessary.
9339 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9340 yylvalp and yyllocp parameters since, if pure, these are now always
9341 accessible through yystackp. If not pure, they are still accessible
9342 globally.
9343 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9344 `if (YYID (N))' to pacify lint.
9345
9346 2005-12-21 Akim Demaille <akim@epita.fr>
9347
9348 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9349 destroy the RHS symbols of a rule.
9350 * data/yacc.c (yylen): Initialize to 0.
9351 Keep its value to the number of items to possibly shift.
9352 In particular, a regular successful parse that ends on YYFINAL by
9353 a (internal) YYACCEPT must not have yylen != 0.
9354 (yyerrorlab, yyreturn): Pop the RHS.
9355 Reorder a bit to emphasize the `shifting' bits of code.
9356 (YYPOPSTACK): Now accept a number of items to pop.
9357 * data/lalr1.cc: Likewise.
9358 * data/glr.c: Formatting changes.
9359 Use goto instead of fall through.
9360 * doc/bison.texinfo (Destructor Decl): Complete.
9361
9362 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9363
9364 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9365 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9366 * djgpp/config.bat: Replace every occurence of the file name
9367 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9368 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9369 * djgpp/config.sed: Replace every occurence of the file name
9370 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9371 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9372 * djgpp/djunpack.bat: DJGPP specific file.
9373 * djgpp/fnchange.lst: DJGPP specific file.
9374 * djgpp/README.in: Add new information about how to unpack the bison
9375 source on MSDOS and other systems which have 8.3 file name restrictions
9376 using djunpack.bat and fnchange.lst.
9377
9378 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9379
9380 * bootstrap (build_cvs_prefix): Remove; unused.
9381 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9382 when getting gnulib.
9383
9384 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9385
9386 * data/glr.c: Reorder typedef declarations for structs to match order
9387 of struct declarations.
9388 Rename yystack everywhere to yystackp except in yyparse where it's not
9389 a pointer.
9390 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9391 consistency.
9392 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9393 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9394 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9395 lint.
9396
9397 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9398
9399 * tests/sets.at (Accept): Fix typos in regular expression used to
9400 sed out the final state number.
9401
9402 Work around portability problem on Solaris 10: flex-generated
9403 files include <stdio.h> before <config.h>, which messes up
9404 because the latter defines __EXTENSIONS__. Address the problem
9405 by creating two new little files that include <config.h> first,
9406 then include the flex-generated files. Rewrite everyone else
9407 to include <config.h> first, as well.
9408 * lib/timevar.c: Always include "config.h".
9409 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9410 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9411 (EXTRA_bison_SOURCES): New macro.
9412 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9413 * src/system.h: Don't include config.h.
9414 * src/LR0.c: Include <config.h> first.
9415 * src/assoc.c: Likewise.
9416 * src/closure.c: Likewise.
9417 * src/complain.c: Likewise.
9418 * src/conflicts.c: Likewise.
9419 * src/derives.c: Likewise.
9420 * src/files.c: Likewise.
9421 * src/getargs.c: Likewise.
9422 * src/gram.c: Likewise.
9423 * src/lalr.c: Likewise.
9424 * src/location.c: Likewise.
9425 * src/main.c: Likewise.
9426 * src/muscle_tab.c: Likewise.
9427 * src/nullable.c: Likewise.
9428 * src/output.c: Likewise.
9429 * src/parse-gram.y: Likewise.
9430 * src/print.c: Likewise.
9431 * src/print_graph.c: Likewise.
9432 * src/reader.c: Likewise.
9433 * src/reduce.c: Likewise.
9434 * src/relation.c: Likewise.
9435 * src/state.c: Likewise.
9436 * src/symlist.c: Likewise.
9437 * src/symtab.c: Likewise.
9438 * src/tables.c: Likewise.
9439 * src/uniqstr.c: Likewise.
9440 * src/vcg.c: Likewise.
9441
9442 * src/parse-gram.y: Fix minor problems uncovered by lint.
9443 (current_lhs, current_lhs_location): Now static.
9444 (current_assoc): Remove unused variable.
9445
9446 Cleanups so that Bison-generated parsers have less lint.
9447 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9448 Prepend /*ARGSUSED*/, for lint's sake.
9449 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9450 definition if 'lint' is defined.
9451 (YYID): New macro (or function, if lint).
9452 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9453 * data/yacc.c: Likewise.
9454 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9455 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9456 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9457 is C++ only.
9458 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9459 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9460 Use YYID(0) rather than 0, for lint.
9461 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9462 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9463
9464 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9465
9466 * tests/glr-regression.at
9467 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9468 Close memory leak reported by twlevo.
9469
9470 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9471
9472 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9473 all stacks.
9474 (yyparse): Iterate another stack in order to call user destructors.
9475 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9476 New test case.
9477 (Duplicated user destructor for lookahead): This test now is expected
9478 to succeed.
9479
9480 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9481
9482 * NEWS: Document the following change.
9483 * data/yacc.c: Say "parser skeleton" rather than "file", since
9484 it's no longer just a file.
9485 * data/glr.c: Grant a special exception for C GLR parsers, that
9486 reads like the already-existing exception for C LALR(1) parsers.
9487 * data/glr.cc: Likewise.
9488 * data/lalr1.cc: Likewise.
9489 * data/location.cc: Likewise.
9490 * data/yacc.c: Reword the "written by" statement to clarify that
9491 it was the parser skeleton, not the entire output file.
9492 * data/glr.c: Written by Paul Hilfinger.
9493 * data/glr.cc: Written by Akim Demaille.
9494 * data/lalr1.cc: Likewise.
9495
9496 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9497
9498 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9499 Fix typos in previous change that broke 'make check'.
9500 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9501 supported in C.
9502 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9503 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9504 We can revert this once things settle down.
9505
9506 * src/conflicts.c (conflicts_print): Don't print file name twice
9507 when %expect fails because there were no conflicts.
9508 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9509 change.
9510 * tests/conflicts.at (%expect not enough, %expect too much):
9511 (%expect with reduce conflicts): Adjust to new behavior.
9512
9513 2005-11-18 Akim Demaille <akim@epita.fr>
9514
9515 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9516 errors.
9517 * NEWS: Document this.
9518 * doc/bison.texinfo (Expect Decl): Likewise.
9519
9520 2005-11-16 Akim Demaille <akim@epita.fr>
9521
9522 Generalize the display of semantic values and locations in traces.
9523 * data/glr.c (yy_reduce_print): Fix indices (again).
9524 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9525 literal integers.
9526 * data/lalr1.cc (yyreduce_print): Rename as...
9527 (yy_reduce_print): this.
9528 Display values and locations.
9529 * data/yacc.c (yy_reduce_print): Likewise.
9530 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9531 (yysymprint): Move higher to be visible from yy_reduce_print).
9532 (yyparse): Adjust.
9533 * tests/calc.at: Adjust the expected length of the traces.
9534
9535 2005-11-14 Akim Demaille <akim@epita.fr>
9536
9537 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9538 from 1 to N, while values and location start at 0.
9539 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9540
9541 2005-11-14 Akim Demaille <akim@epita.fr>
9542
9543 * data/glr.c (yy_reduce_print): Fix the $ number.
9544
9545 2005-11-14 Akim Demaille <akim@epita.fr>
9546
9547 "Use" parse parameters.
9548 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9549 * data/glr.c, data/glr.cc: Use them.
9550 * data/glr.c (YYUSE): Have a C++ definition that supports
9551 non-pointer types.
9552
9553 2005-11-14 Akim Demaille <akim@epita.fr>
9554
9555 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9556
9557 2005-11-14 Akim Demaille <akim@epita.fr>
9558
9559 * data/glr.cc: New.
9560 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9561
9562 2005-11-12 Akim Demaille <akim@epita.fr>
9563
9564 Let position and location be PODs.
9565 * data/location.cc (position::initialize, location::initialize): New.
9566 (position::position, location::location): Define only if
9567 b4_location_constructors is defined.
9568 * data/lalr1.cc (b4_location_constructors): Define it for backward
9569 compatibility.
9570 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9571
9572 2005-11-12 Akim Demaille <akim@epita.fr>
9573
9574 * data/lalr1.cc: Move the body of the ctor and dtor into the
9575 parser file (instead of the header).
9576 Wrap the implementations in a "namespace yy".
9577
9578 2005-11-12 Akim Demaille <akim@epita.fr>
9579
9580 Have glr.c include its header file when created.
9581 * data/glr.c (b4_shared_declarations): New.
9582 Output them verbatim in the parser if !%defines, otherwise
9583 output then in the header file, and include it instead.
9584
9585 2005-11-11 Akim Demaille <akim@epita.fr>
9586
9587 * data/glr.c: Comment changes.
9588
9589 2005-11-11 Akim Demaille <akim@epita.fr>
9590
9591 When yydebug, report semantic and location values for reductions.
9592 * data/glr.c (yy_reduce_print): Report the semantic values and the
9593 locations.
9594 (YY_REDUCE_PRINT): Adjust.
9595 (yyglrReduce): Use them.
9596 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9597 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9598 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9599 traces.
9600
9601 2005-11-10 Akim Demaille <akim@epita.fr>
9602
9603 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9604 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9605 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9606
9607 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9608
9609 * m4/cxx.m4, examples/Makefile.am: Don't build
9610 examples/calc++ if no C++ compiler is available. (trivial change)
9611
9612 2005-11-09 Akim Demaille <akim@epita.fr>
9613
9614 * src/scan-skel.l: Use a couple of asserts.
9615
9616 2005-11-03 Akim Demaille <akim@epita.fr>
9617
9618 In some (weird) cases, the final state number is incorrect.
9619 Reported by Alexandre Duret-Lutz.
9620 * src/LR0.c (state_list_append): Remove the computation of
9621 final_state.
9622 (save_reductions): Do it here.
9623 (get_state): Alpha conversion.
9624 (generate_states): Use a for loop.
9625 * src/gram.h (item_number_is_rule_number)
9626 (item_number_is_symbol_number): New.
9627 * src/state.c: Use assert.
9628 * src/system.h: Include assert.h.
9629 * tests/sets.at (Accept): New.
9630
9631 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9632
9633 * data/glr.c (yyfill): Adjust comment.
9634 (yyresolveAction): Initialize default location properly
9635 for empty right-hand sides.
9636 (yydoAction): Ditto.
9637 Add comment explaining apparently dead code.
9638 * tests/glr-regression.at
9639 (Incorrectly initialized location for empty right-hand side in GLR):
9640 New test.
9641
9642 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9643
9644 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9645 gnulib when interrupted. This fixes some race conditions and
9646 works around some portability problems (one noted by Paul
9647 Hilfinger).
9648
9649 2005-10-22 Akim <akim@epita.fr>
9650
9651 * Makefile.cfg: Adjust to config -> build-aux.
9652 Reported by twledo.
9653
9654 2005-10-21 Akim Demaille <akim@epita.fr>
9655
9656 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9657 the %parse-params.
9658 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9659 * data/yacc.c (b4_Pure_if): Rename as...
9660 (b4_yacc_pure_if): this.
9661 (YY_SYMBOL_PRINT, yyparse): Adjust.
9662 * doc/bison.texinfo: Formatting changes.
9663
9664 2005-10-21 Akim Demaille <akim@epita.fr>
9665
9666 Finish the transition config -> build-aux.
9667 * configure.ac, Makefile.am: Use build-aux.
9668 * config/prev-version, config/announce-gen, config/Makefile.am:
9669 Move to...
9670 * build-aux/prev-version, build-aux/announce-gen,
9671 * build-aux/Makefile.am: here.
9672
9673 2005-10-14 Akim Demaille <akim@epita.fr>
9674
9675 * examples/calc++/test: Use set -x only when VERBOSE.
9676
9677 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9678
9679 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9680 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9681
9682 2005-10-13 Akim Demaille <akim@epita.fr>
9683
9684 * src/scan-skel.l: Output the base name parts of the parser and
9685 header file names.
9686 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9687 additional checks.
9688 Use this to exercise C++ outputs in subdirs.
9689 Reported by Oleg Smolsky.
9690
9691 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9692
9693 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9694 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9695 Problem reported by John P. Hartmann.
9696 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9697 already defined it.
9698
9699 2005-10-12 Akim Demaille <akim@epita.fr>
9700
9701 * src/parse-gram.y (version_check): Exit 63 to please missing
9702 (stands for "version mismatch).
9703 * tests/input.at, doc/bison.texinfo: Adjust.
9704
9705 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9706
9707 Work around portability problems with Visual Age C compiler
9708 (xlc and xlC_r) reported by John P. Hartmann.
9709 * data/location.cc (initial_column, initial_line): Remove.
9710 All uses replaced by 0 and 1.
9711 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9712 that xlc complains about.
9713 * src/scan-skel.l (skel_wrap): Likewise.
9714 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9715 as __STDC__.
9716 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9717 __STDC_VERSION__. Use it everywhere instead of looking at
9718 __STDC__ and __cplusplus.
9719
9720 2005-10-10 Akim Demaille <akim@epita.fr>
9721
9722 * examples/calc++/test: Be quiet unless VERBOSE.
9723
9724 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9725
9726 * data/c.m4 (yydestruct, yysymprint):
9727 Use YYUSE instead of casting to void.
9728 * data/glr.c (YYUSE): New macro.
9729 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9730 Use it instead of rolling our own.
9731 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9732 (YYCHK1):
9733 Use /*CONSTCOND*/ to suppress lint warnings.
9734 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9735 (YY_STACK_PRINT): Use 'false' not '0'.
9736 (YYUSE): New macro.
9737 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9738 * data/yacc.c (YYUSE): New macro.
9739 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9740 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9741 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9742
9743
9744 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9745 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9746
9747 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9748
9749 Undo the parts of the unlocked-I/O change that substituted
9750 putc or puts for printf. This might hurt performance a bit,
9751 but some people prefer the printf style.
9752 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9753 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9754 All uses replaced by YYFPRINTF and YYDPRINTF.
9755 * data/yacc.c: Likewise.
9756 * lib/bitset.c (bitset_print): Likewise.
9757 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9758 putc and puts.
9759 * lib/lbitset.c (debug_lbitset): Likewise.
9760 * src/closure.c (print_firsts, print_fderives): Likewise.
9761 * src/gram.c (grammar_dump): Likewise.
9762 * src/lalr.c (look_ahead_tokens_print): Likewise.
9763 * src/output.c (escaped_output): Likewise.
9764 (user_actions_output): Break apart two printfs.
9765 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9766 * src/reduce.c (reduce_print): Likewise.
9767 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9768 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9769
9770 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9771 Use assignments rather than casts-to-void to suppress
9772 unused-variable warnings. This pacifies 'lint'.
9773 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9774 unused-variable warnings.
9775
9776 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9777
9778 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9779
9780 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9781
9782 Use unlocked I/O for a minor performance improvement on hosts like
9783 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9784 is to use the gnlib unlocked-io module, and to prefer putc and
9785 puts to printf when either will work (since the latter doesn't
9786 come in an unlocked flavor).
9787 * bootstrap (gnulib_modules): Add unlocked-io.
9788 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9789 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9790 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9791 and similarly for puts and putc and printf.
9792 * data/yacc.c: Likewise.
9793 * lib/bitset.c (bitset_print): Likewise.
9794 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9795 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9796 to printf.
9797 * lib/lbitset.c (debug_lbitset): Likewise.
9798 * src/closure.c (print_firsts, print_fderives): Likewise.
9799 * src/gram.c (grammar_dump): Likewise.
9800 * src/lalr.c (look_ahead_tokens_print): Likewise.
9801 * src/output.c (escaped_output): Likewise.
9802 (user_actions_output): Coalesce two printfs.
9803 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9804 * src/reduce.c (reduce_print): Likewise.
9805 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9806 * src/system.h: Include unlocked-io.h rather than stdio.h.
9807
9808 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9809 this confuses xgettext.
9810
9811 2005-10-02 Akim Demaille <akim@epita.fr>
9812
9813 * bootstrap (gnulib_modules): Add strverscmp.
9814 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9815 * m4/.cvsignore: Add strverscmp.m4.
9816 * src/parse-gram.y (%require): New token, new rule.
9817 (version_check): New.
9818 * src/scan-gram.l (%require): Adjust.
9819 * tests/input.at (AT_REQUIRE): New.
9820 Use it.
9821 * doc/bison.texinfo (Require Decl): New.
9822 (Calc++ Parser): Use %require.
9823
9824 2005-10-02 Akim Demaille <akim@epita.fr>
9825
9826 * data/location.cc: New.
9827
9828 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9829 Akim Demaille <akim@epita.fr>
9830
9831 Make sure -odir/foo.cc creates dir/location.hh etc.
9832 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9833 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9834 (spec_defines_file): Now const.
9835 (dir_prefix): New.
9836 (short_base_name): Remove.
9837 * src/files.c: Adjust.
9838 (dirname.h): Include.
9839 (base_name): Don't prototype it.
9840 (finput): Remove, duplicates gram_in.
9841 (full_base_name, short_base_name): Replace by...
9842 (all_but_ext, all_but_tab_ext): these.
9843 (compute_base_names): Rename as...
9844 (compute_file_name_parts): this.
9845 Update to compute the new variables, including dir_prefix.
9846 Adjust dependencies.
9847 * src/output.c (prepare): Output them.
9848 * src/reader.c: Adjust to use gram_in, not finput.
9849 * src/scan-skel.l (@dir_prefix@): New.
9850
9851 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9852
9853 * lib/subpipe.c: New function end_of_output_subpipe() added
9854 to allow support for non-posix systems. This is a no-op function
9855 for posix systems.
9856
9857 * lib/subpipe.h: New function end_of_output_subpipe() added
9858 to allow support for non-posix systems. This is a no-op function
9859 for posix systems.
9860
9861 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9862 handle the lack of pipe/fork functionality on non-posix systems.
9863
9864 * djgpp/Makefile.maint: DJGPP specific file.
9865
9866 * djgpp/README.in: DJGPP specific file.
9867
9868 * djgpp/config.bat: DJGPP specific configuration file.
9869
9870 * djgpp/config.sed: DJGPP specific configuration file.
9871
9872 * djgpp/config.site: DJGPP specific configuration file.
9873
9874 * djgpp/config_h.sed: DJGPP specific configuration file.
9875
9876 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9877
9878 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9879
9880 2005-10-02 Akim Demaille <akim@epita.fr>
9881
9882 * data/location.cc: New, extract from...
9883 * data/lalr1.cc: here.
9884 (location.hh): Include it after the user prologue, in case the
9885 filename type is defined by the user.
9886 Forward declation location and position before the pre-prologue.
9887 (yyresult_): Rename as...
9888 (yyresult): this, it's a local variable, not an attribute.
9889 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9890
9891 2005-10-01 Akim Demaille <akim@epita.fr>
9892
9893 * examples/extexi: Restore the #line generation.
9894
9895 2005-09-30 Akim Demaille <akim@epita.fr>,
9896 Alexandre Duret-Lutz <adl@gnu.org>
9897
9898 Move the token type and YYSTYPE in the parser class.
9899 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9900 (parser::token): New, from the moved free definition of tokens.
9901 (parser::semantic_value): Now a full definition instead of an
9902 indirection to YYSTYPE.
9903 (b4_post_prologue): No longer included in the header file, but
9904 in the implementation file.
9905 * doc/bison.texi (C+ Language Interface): Update.
9906 * src/parse-gram.y: Support unary %define.
9907 * tests/actions.at: Define global_tokens_and_yystype for backward
9908 compatibility until we update the tests.
9909 * tests/calc.at: Idem.
9910 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9911 to simplify the code.
9912
9913 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9914
9915 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9916 Ah, the good old days! Problem reported by Peter Klein.
9917 * bootstrap (gnulib_modules): Add strerror, strtoul.
9918 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9919 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9920
9921 2005-09-29 Akim Demaille <akim@epita.fr>
9922
9923 * data/c.m4 (b4_error_verbose_if): New.
9924 * data/lalr1.cc: Use it.
9925 (YYERROR_VERBOSE_IF): Remove.
9926 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9927 parser members, replaced by...
9928 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9929 local variables.
9930 (yysyntax_error_): Takes the state number as argument.
9931 (yyreduce_print_): Use the argument yyrule, not the former
9932 attribute yyn_.
9933
9934 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9935
9936 * bootstrap (gnulib_modules): Add verify.
9937 * lib/.cvsignore: Add verify.h.
9938 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9939 * src/system.h (verify): Remove.
9940 Include verify.h instead.
9941 * src/tables.c (tables_generate): Use new API for 'verify'.
9942
9943 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9944
9945 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9946 local variables whose names begin with 'yy'.
9947 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9948 Trivial changes from Joel E. Denny.
9949
9950 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9951 it itself.
9952 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9953 don't use alloca any more.
9954
9955 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9956 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9957 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9958 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9959 to match yacc.c, to test more hosts.
9960
9961 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9962
9963 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9964 doesn't affect behavior.
9965 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9966 Solaris, AIX, MSC.
9967 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9968 This works a bit better with glibc, if user code has already included
9969 stdlib.h.
9970 * doc/bison.texinfo (Bison Parser): Document that users can't
9971 arbitrarily use malloc and free for other purposes. Document
9972 that <alloca.h> and <malloc.h> might be included.
9973 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9974 user must declare alloca.
9975
9976 * HACKING (release): Forwarn the Translation Project about
9977 stable releses.
9978
9979 2005-09-20 Akim Demaille <akim@epita.fr>
9980
9981 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9982
9983 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9984
9985 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9986 (YYSTACK_ALLOC_MAXIMUM): Use it.
9987 (yysyntax_error): New function.
9988 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9989 multiple syntax errors are reported, and alloca is being used.
9990 Instead, reallocate buffers twice as big each time, so that
9991 we waste at most half the allocated memory. Start with a small
9992 (128-byte) buffer that will suffice in most cases anyway.
9993 Use yysyntax_error to do most of the work.
9994
9995 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9996 yynerrs is the number of errors reported, not the number of
9997 errors encountered.
9998
9999 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10000 Mark it as expected to fail.
10001 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10002 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10003 Don't start user-code symbols with "yy", to avoid name space problems.
10004
10005 2005-09-19 Akim Demaille <akim@epita.fr>
10006
10007 Remove the traits, failed experiment.
10008 It never proved useful, and anyway because of the current
10009 definition, it was not possible to have several specialization of
10010 this traits, making it useless.
10011 * data/lalr1.cc (yy:traits): Remove.
10012 Inline its definitions in the parser class.
10013
10014 2005-09-19 Akim Demaille <akim@epita.fr>
10015
10016 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10017 least Mac OSX with a /usr/local install of gettext.
10018
10019 2005-09-19 Akim Demaille <akim@epita.fr>
10020
10021 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10022 and yytoken for similarity with the other skeletons.
10023
10024 2005-09-19 Akim Demaille <akim@epita.fr>
10025
10026 * NEWS, configure.ac: update version number to 2.1a.
10027
10028 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10029
10030 * NEWS: Version 2.1.
10031
10032 * NEWS: Remove notice of yytname change, since it was never in an
10033 official release.
10034 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10035 diagnostic.
10036 * src/output.c (prepare): Likewise.
10037 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10038 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10039 is not defined. This is an awful hack, but it's enough for now.
10040 All callers changed.
10041 * tests/glr-regression-at (make_value): Args are const pointers now,
10042 to avoid GCC warning.
10043 (Duplicated user destructor for lookahead): New test. Currently
10044 skipped. It fails on my host but I'm not sure it'll always fail.
10045
10046 2005-09-16 Akim Demaille <akim@epita.fr>
10047
10048 * src/symtab.h (struct symbol): Declare the printer and destructor
10049 as const, to avoid accidental calls to free.
10050 (symbol_destructor_set, symbol_printer_set): Adjust.
10051 * src/symtab.c: Adjust.
10052
10053 2005-09-16 Akim Demaille <akim@epita.fr>
10054
10055 * data/c.m4 (b4_token_enums): New.
10056 (b4_token_defines): Rename as...
10057 (b4_token_enums_defines): this.
10058 (b4_token_defines): New, output only the #defines.
10059 * data/yacc.c, data/glr.c: Adjust.
10060 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10061 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10062 as default values.
10063
10064 2005-09-16 Akim Demaille <akim@epita.fr>
10065
10066 * data/lalr1.cc (yylex_): Remove, inline its code.
10067 (yyreport_syntax_error_): Remove, replaced by...
10068 (yysyntax_error_): this which returns a string and leaves to the
10069 caller the call to the users' error function.
10070 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10071 Move from members of the parser object...
10072 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10073 to local variables of the parse function.
10074
10075 2005-09-16 Akim Demaille <akim@epita.fr>
10076
10077 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10078 since it's in Bison's name space.
10079
10080 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10081
10082 * data/glr.c (yyresolveValue): Add default case to pacify
10083 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10084
10085 * NEWS: Document when yyparse started to return 2.
10086 * doc/bison.texinfo (Parser Function): Document when yyparse
10087 returns 2.
10088
10089 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10090 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10091 changed.
10092 (class position): file_name -> filename (reverting). All uses changed.
10093
10094 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10095
10096 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10097 do anything if $@ exists. This reverts part of the 2005-07-07
10098 patch.
10099
10100 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10101
10102 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10103 contains obsolete information and isn't worth distributing as a
10104 separate file anyway.
10105 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10106 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10107 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10108 (yyparse): Abort if user code uses longjmp to throw an unexpected
10109 value.
10110
10111 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10112
10113 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10114 Suggested by twlevo@xs4all.nl.
10115
10116 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10117 This avoids a diagnostic from gcc -Wswitch-enum.
10118 Problem reported by twlevo@xs4all.nl.
10119
10120 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10121 standards. Use "file name" or "file" or "name", depending on
10122 the context.
10123 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10124 not to hack/foo.tab.c.
10125 (Calc++ Top Level): 2nd arg of main is not const.
10126 * data/glr.c: b4_filename -> b4_file_name.
10127 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10128 All uses changed.
10129 (class position): filename -> file_name. All uses changed.
10130 * data/yacc.c: b4_filename -> b4_file_name.
10131 * lib/bitset.h: filename -> file_name in local vars.
10132 * lib/bitset_stats.c: Likewise.
10133 * src/files.c: Likewise.
10134 * src/scan-skel.l ("@output ".*\n): Likewise.
10135 * src/files.c (file_name_split): Renamed from filename_split.
10136 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10137
10138 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10139
10140 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10141 to accommodate latest gnulib.
10142
10143 * tests/glr-regression.at (Duplicate representation of merged trees):
10144 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10145
10146 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10147 needed.
10148
10149 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10150
10151 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10152 All uses changed. Invoke user destructor after an error during a
10153 split parse (trivial change from Joel E. Denny).
10154
10155 * tests/glr-regression.at
10156 (User destructor after an error during a split parse): New test case.
10157 Problem reported by Joel E. Denny in:
10158 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10159
10160 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10161
10162 * README-cvs: Give URLs for recommended tools.
10163 Mention Gzip version problem, and bootstrapping issues.
10164 Remove troubleshooting section, as it's somewhat obsolete.
10165
10166 * bootstrap (no_cache): New var, to accommodate different wget
10167 variants. Use it instead of '-C off'. Problem reported by
10168 twlevo@xs4all.nl.
10169
10170 * data/glr.c (yydestroyStackItem): New function.
10171 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10172 debugging information. Problem reported by Joel E. Denny.
10173
10174 2005-08-25 Akim Demaille <akim@epita.fr>
10175
10176 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10177
10178 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10179
10180 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10181 Don't invoke destructor on unresolved entries.
10182 * tests/glr-regression.at
10183 (User destructor for unresolved GLR semantic value): New test case.
10184 Problem reported by Joel E. Denny in:
10185 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10186
10187 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10188
10189 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10190 Add strnlen.c.
10191 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10192 lib-prefix.m4, po.m4.
10193
10194 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10195 in yydestruct diagnostic, since it might not be an error.
10196 Problem reported by Joel Denny near end of
10197 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10198 * data/lalr1.cc (yyerturn): Likewise.
10199 * data/yacc.c (yyreturn): Likewise.
10200 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10201
10202 * src/files.c: Remove obsolete FIXME comment.
10203
10204 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10205 with the other templates, and to fix bogus run-on messages such
10206 as the one reported at the end of
10207 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10208 All callers changed to avoid the newline.
10209 (yyprocessOneStack): Output two lines rather than one, to accommodate
10210 the above change. This changes the debug output format slightly.
10211
10212 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10213 reported by Joel E. Denny in
10214 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10215 (trivial change).
10216 * tests/glr-regression.at (Duplicate representation of merged trees):
10217 New test, from Joel E. Denny in:
10218 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10219 * THANKS: Add Joel E. Denny.
10220
10221 * configure.ac (AC_INIT): Bump to 2.0c.
10222
10223 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10224
10225 * NEWS: Version 2.0b.
10226
10227 * Makefile.am (SUBDIRS): Put examples before tests, so that
10228 "make check" doesn't finish with "All 1 tests passed".
10229
10230 * tests/regression.at (Token definitions): Don't rely on
10231 AT_PARSER_CHECK for data that contains backslashes. It currently
10232 uses 'echo', and 'echo' isn't portable if its argument contains
10233 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10234 that the byte '\0xff' is not printable in the C locale; it is,
10235 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10236 not printable, so use '\0x81' to test.
10237
10238 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10239 version of GCC, since the macro is used with non-GCC compilers.
10240
10241 Fix core dump reported by Pablo De Napoli in
10242 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10243 * tests/regression.at (Invalid inputs with {}): New test.
10244 * src/parse-gram.y (token_name): Translate type before using
10245 it as an index.
10246
10247 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10248 the user's name space. All uses changed to __attribute__
10249 ((__unused__)).
10250 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10251 Add __attribute__ ((__noreturn__)).
10252
10253 * etc/clcommit: Remove. We weren't using it, and it failed
10254 "make maintainer-distcheck".
10255 * Makefile.maint: Merge from coreutils.
10256 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10257 (syntax-check-rules): Change list of rules as described below.
10258 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10259 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10260 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10261 (sc_trailing_space): New rules.
10262 (sc_xalloc_h_in_src): Remove.
10263 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10264 (sc_space_tab, sc_error_exit_success, sc_changelog):
10265 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10266 (makefile-check, po-check, author_mark_check):
10267 (makefile_path_separator_check, copyright-check):
10268 Use grep -n, to make it easier to find violations.
10269 Use CVS_LIST and CVS_LIST_EXCEPT.
10270 (header_regexp, h_re): Remove.
10271 (dd_c): New macro.
10272 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10273 (my-distcheck): Use more-modern GCC flags.
10274 (signatures, %.asc): Remove.
10275 (rel-files, announcement): Remove signatures.
10276 Restore old updating code, even though we don't use it, so
10277 that we're the same as coreutils.
10278 (alpha, beta, major): Depend on news-date-check.
10279 Make the upload commands.
10280
10281 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10282 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10283 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10284 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10285 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10286 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10287 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10288 * tests/sets.at: Likewise.
10289
10290 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10291 we comment out the Autoconf version number.
10292 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10293 it's error-prone and "make maintainer-distcheck" rejects it.
10294
10295 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10296 Indent calls to "error" to pacify "make maintainer-distcheck",
10297 when the calls are not intended to be translated.
10298 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10299
10300 * src/Makefile.am (DEFS): Use +=, to pacify
10301 "make maintainer-distcheck".
10302 (bison_SOURCES): Add scan-skel.h.
10303 (sc_tight_scope): New rule, from coreutils.
10304
10305 * src/files.c (src_extension, header_extension):
10306 Now static, not extern.
10307 * src/getargs.c (short_options): Likewise.
10308 * src/muscle_tab.c (muscle_table): Likewise.
10309 * src/parse-gram.y (current_class, current_type, current_prec):
10310 Likewise.
10311 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10312 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10313 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10314 void, to avoid warning when NLS is disabled.
10315 * src/output.c: Include scan-skel.h.
10316 (scan_skel): Remove decl, since scan-skel.h does this.
10317 (output_skeleton):
10318 Indent calls to "error" to pacify "make maintainer-distcheck".
10319 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10320 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10321 "make maintainer-distcheck".
10322 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10323 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10324 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10325 (skel_lex_destroy, scan_skel): Move these decls to...
10326 * src/scan-skel.h: New file.
10327 * src/uniqstr.c (uniqstr_assert):
10328 Indent calls to "error" to pacify "make maintainer-distcheck".
10329
10330 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10331 not @VAR@.
10332
10333 * tests/torture.at: Revamp to avoid misuse of atoi that
10334 "make maintainer-distcheck" complained about.
10335
10336 * examples/extexi (message): Don't print a message more than once,
10337 and omit line-number decoration that makes Emacs compile think
10338 that informative messages are worth worrying about.
10339
10340 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10341
10342 * configure.ac: Update version number.
10343
10344 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10345 accidentally.
10346 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10347 autogenerated by the maintainer.
10348 * examples/calc++/.cvsignore: Add *.yy.
10349
10350 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10351 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10352 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10353
10354 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10355
10356 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10357 from maintainer-distcheck about casting the argument of 'free'.
10358
10359 * NEWS: Mention recent yytname changes.
10360 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10361
10362 * bootstrap: For translations that have not yet been upgraded to
10363 the new runtime-po domain, prime the pump by extracting the
10364 relevant strings from the obsolete translations. This code can be
10365 removed once the bison-runtime domain has been translated by each
10366 team.
10367
10368 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10369 now that token names are already quoted.
10370
10371 Fix problem reported by Anthony Heading.
10372 * data/glr.c (YYTOKEN_TABLE): New macro.
10373 (yytname): Define if YYTOKEN_TABLE.
10374 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10375 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10376 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10377 * src/output.c (prepare_symbols): Output token_table_flag.
10378
10379 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10380
10381 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10382 again if the first call fails.
10383
10384 * data/glr.c (yytnamerr): New function.
10385 (yyreportSyntaxError): Use it to dequote most string literals.
10386 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10387 with other skeletons. All uses changed.
10388 (yytnameerr_): New function.
10389 (yyreport_syntax_error): Use it to dequote most string literals.
10390 * data/yacc.c (yytnamerr): New function.
10391 (yyerrlab): Use it to decode most string literals.
10392 * doc/bison.texinfo (Decl Summary, Calling Convention):
10393 Clarify quoting convention of yytname.
10394 * src/output.c (prepare_symbols): Quote all names. This undoes
10395 the 2005-04-17 change, which is now accomplished (mostly) via
10396 changes in the parsers as described above.
10397 * tests/regression.at (Token definitions, Web2c Actions):
10398 Undo most 2005-04-17 change here, too.
10399
10400 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10401
10402 Fix more problems reported by twlevo@xs4all.nl.
10403 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10404 remove trailing spaces. This loses the exit status of ./types,
10405 and isn't needed since ./types shouldn't be emitting trailing
10406 spaces.
10407 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10408 as the stack isn't valid in that case.
10409
10410 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10411 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10412 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10413 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10414 is used.
10415 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10416 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10417 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10418 Likewise.
10419
10420 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10421 overly-picky compilers that reject 'char *foo = "bar";'.
10422
10423 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10424 to FILE * parameter, not to stderr. This fixes a typo introduced
10425 in the 2005-07-12 change.
10426
10427 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10428 warnings from GCC 4.
10429
10430 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10431 (yyglrShiftDefer, yysplitStack):
10432 Remove unused parameters b4_pure_formals. All uses changed.
10433 (yyglrShift): Remove unused parameters b4_user_formals.
10434 All uses changed.
10435 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10436
10437 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10438
10439 Destructor cleanups and regularization among the three skeletons.
10440 * NEWS: Document the behavior changes.
10441 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10442 stack before failing, as the cleanup code will do it for us now.
10443 * data/lalr1.cc (yyerrlab): Likewise.
10444 * data/glr.c (yyparse): Pop everything off the stack before
10445 freeing it, so that destructors get called properly.
10446 * data/lalr1.cc (yyreturn): Likewise.
10447 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10448 This is more consistent.
10449 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10450 why destructors might be called. 1.875 -> 2.1.
10451 (Destructor Decl, Decl Summary, Table of Symbols):
10452 Some English-language cleanups for %destructor.
10453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10454 Add output line for destructor of start symbol.
10455 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10456 because of that same extra output line.
10457
10458 * NEWS: Document minor wording changes in diagnostics of
10459 Bison-generated parsers.
10460 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10461 Remove unused formals. All uses changed.
10462 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10463 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10464 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10465 Rename yyoverflowab to yyexhaustedlab.
10466 When memory exhaustion occurs during syntax-error reporting,
10467 report it separately rather than in a single diagnostic; this
10468 eases translation.
10469 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10470 (Memory Exhausted): Renamed from Parser Stack Overflow.
10471 Revamp wording slightly to prefer "memory exhaustion".
10472 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10473
10474 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10475
10476 Add i18n support to the GLR skeleton. Partially fix the C++
10477 skeleton; a C++ expert needs to finish this. Remove debugging
10478 msgids; there's little point to having them translated, since they
10479 can be understood only by someone who can read the
10480 (English-language) source code.
10481
10482 Generate runtime-po/bison-runtime.pot automatically, so that we
10483 don't have to worry about garbage getting in that file. We'll
10484 make sure after the next official release that old msgids don't
10485 get lost. See
10486 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10487
10488 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10489 Now auto-generated.
10490 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10491 Fix typos in explanations of the runtime file.
10492 * bootstrap: Change gettext keyword from YYI18N to YY_.
10493 Use standard Makefile.in.in in runtime-po, since we'll arrange
10494 for backward-compatible bison-runtime.po files in a different way.
10495 * data/glr.c (YY_): New macro, from yacc.c.
10496 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10497 Translate messages intended for users.
10498 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10499 the wording in the other skeletons. We don't know that the memory
10500 is virtual.
10501 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10502 Use same method that yacc.c uses.
10503 Don't translate debugging messages.
10504 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10505 it doesn't work (yet), and requires C++ expertise to fix.
10506 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10507 Move defn to a more logical place, to be consistent with other
10508 skeletons.
10509 Don't translate debugging messages.
10510 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10511 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10512 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10513 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10514
10515 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10516 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10517 void, not int.
10518 * tests/glr-regression.at (Badly Collapsed GLR States):
10519 Likewise.
10520 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10521 yylex should return 0 at EOF rather than aborting.
10522
10523 Improve tests for stack overflow in GLR parser.
10524 Problem reported by twlevo@xs4all.nl.
10525 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10526 All uses removed.
10527 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10528 can handle the problem.
10529 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10530 (yyparse): New local variable yyresult to record the result.
10531 Use result of setjmp to set it, rather than storing itinto
10532 struct.
10533 (yyDone): Remove label.
10534 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10535 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10536 if YYABORT is used).
10537 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10538 yyparse status; put status > 1 into diagnostic.
10539 Check that status==2 works.
10540 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10541 Use exit status 3 for failure to open (which shouldn't happen).
10542
10543 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10544
10545 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10546 1 on syntax error; just let yyparse do its thing.
10547 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10548 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10549 (Exploding the Stack Size with Alloca):
10550 (Exploding the Stack Size with Malloc):
10551 Expect exit status 2, not 1, since the parser is supposed to blow
10552 its stack. Problem reported by twlevo@xs4all.nl.
10553
10554 * data/glr.c (yyparse): Don't assume that the initial calls
10555 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10556 Print a stack-overflow message and fail instead.
10557 Initialize the line-number information before creating the stack,
10558 so that the stack-overflow message can report line zero safely.
10559
10560 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10561
10562 Fix problems reported by twlevo@xs4all.nl.
10563 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10564 (yyuserMerge): Provide a default case if b4_mergers is empty.
10565 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10566 * tests/glr-regression.at
10567 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10568 Add casts to pacify C++ compilers.
10569 * tests/glr-regression.at (Improper merging of GLR delayed action
10570 sets): Declare yylex before using it.
10571 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10572 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10573 test for valgrind; valgrind is independent of g++.
10574 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10575 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10576 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10577 Use a destructor, so that we can expand the stack. Change
10578 YYSTYPE to char * so that we can free it. Cast result of malloc.
10579
10580 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10581
10582 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10583 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10584
10585 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10586
10587 * PACKAGING: New file, suggested by Bruno Haible and taken from
10588 similar wording in gettext's PACKAGING file.
10589 * NEWS: Mention PACKAGING.
10590 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10591
10592 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10593
10594 * NEWS: Document recent i18n improvements.
10595 * bootstrap: Get runtime translations into runtime-po.
10596 Create runtime-po files automatically, if possible.
10597 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10598 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10599 does not infringe on the user's name space.
10600 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10601 * doc/bison.texinfo (Internationalization): Revamp the English
10602 and Texinfo syntax a bit, to try to make it clearer.
10603 (Bison Options, Option Cross Key): Mention --print-localedir.
10604 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10605 YYENABLE_NLS. Quote a bit more.
10606 * runtime-po/.cvsignore: New file.
10607 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10608 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10609 * runtime-po/quot.sed: Likewise.
10610 * runtime-po/boldquot.sed: Likewise.
10611 * runtime-po/en@quot.header: Likewise.
10612 * runtime-po/en@boldquot.header: Likewise.
10613 * runtime-po/insert-header.sin: Likewise.
10614 * runtime-po/remove-potcdate.sin: Likewise.
10615 * runtime-po/Makevars: Likewise.
10616 * runtime-po/LINGUAS: Likewise.
10617 * runtime-po/de.po: Likewise; we will rely on the translation project
10618 to maintain this, so "bootstrap" should get it.
10619 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10620 its value.
10621 * src/main.c (main): Bind the bison-runtime domain, too.
10622
10623 2005-07-12 Bruno Haible <bruno@clisp.org>
10624
10625 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10626 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10627 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10628 * runtime-po: New directory.
10629 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10630 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10631 * runtime-po/Rules-quot: New file, copied from po/.
10632 * runtime-po/quot.sed: Likewise.
10633 * runtime-po/boldquot.sed: Likewise.
10634 * runtime-po/en@quot.header: Likewise.
10635 * runtime-po/en@boldquot.header: Likewise.
10636 * runtime-po/insert-header.sin: Likewise.
10637 * runtime-po/remove-potcdate.sin: Likewise.
10638 * runtime-po/Makevars: New file.
10639 * runtime-po/POTFILES.in: New file.
10640 * runtime-po/LINGUAS: New file.
10641 * runtime-po/bison-runtime.pot: New file.
10642 * runtime-po/de.po: New file.
10643 * m4/bison.m4: New file.
10644 * Makefile.am (SUBDIRS): Add runtime-po.
10645 (aclocaldir, aclocal_DATA): New variables.
10646 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10647 Define aclocaldir.
10648 * src/getargs.c (usage): Document --print-localedir option.
10649 (PRINT_LOCALEDIR_OPTION): New enum item.
10650 (long_options): Add --print-localedir option.
10651 (getargs): Handle --print-localedir option.
10652 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10653 (Internationalization): New section.
10654
10655 2005-07-12 Akim Demaille <akim@epita.fr>
10656
10657 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10658 for consistency with the rest of the code.
10659 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10660 Add separators.
10661
10662 2005-07-12 Akim Demaille <akim@epita.fr>
10663
10664 * src/parse-gram.y: Use %printer instead of YYPRINT.
10665
10666 2005-07-12 Akim Demaille <akim@epita.fr>
10667
10668 * src/symtab.h, src/symtab.c (symbol_print): New.
10669 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10670 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10671
10672 2005-07-12 Akim Demaille <akim@epita.fr>
10673
10674 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10675 b4_at_dollar and b4_dollar_dollar.
10676
10677 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10678
10679 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10680 and Pennello's paper.
10681
10682 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * data/yacc.c (yyparse): Undo previous patch. Instead,
10685 set yylsp[0] and yyvsp[0] only if the initial action
10686 sets yylloc and yylval, respectively.
10687
10688 * data/yacc.c (yyparse): In the initial action, set
10689 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10690 This avoids the use of undefined variables if the initial
10691 action does not set yylloc and/or yylval.
10692
10693 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10694
10695 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10696 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10697 Remove from CVS. These files are automatically generated.
10698 * examples/extexi: Clarify that this file is now part of Bison,
10699 not GNU M4, and that it works with any POSIX-compatible Awk.
10700 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10701 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10702 so that we also get calc++-parser.yy. Geneate it.
10703 Use $(AWK), not gawk, since any conforming Awk will do.
10704 Put comment before action, since older 'make' can't handle comment
10705 in action.
10706 $(BUILT_SOURCES): List all built sources, not just some of them.
10707 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10708 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10709 $($(calc_sources_generated)): Remove unnecessary test for existence
10710 of target. (This had a shell syntax error anyway; a stray "x".)
10711 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10712 calc++-parser.yy.
10713 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10714
10715 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10716 implied by the other modules.
10717
10718 2005-07-06 Akim Demaille <akim@epita.fr>
10719
10720 Bind examples/calc++ to the package.
10721 * examples/calc++/Makefile: Remove, replaced by...
10722 * examples/calc++/Makefile.am: ... this new file.
10723 * examples/calc++/test: Remove input.
10724 * examples/calc++/compile: Remove.
10725 * examples/Makefile.am: New.
10726 * configure.ac, Makefile.am: Adjust.
10727 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10728
10729 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10730
10731 * data/glr.c (yyFail): Drastically simplify; since the format argument
10732 never had any % directives, we can simply pass it to yyerror.
10733 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10734 be modified later, as that is the usual style in glr.c.
10735 Problems reported by Paul Hilfinger.
10736
10737 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10738 and size overflow errors.
10739 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10740 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10741 (YYSIZEMAX): New macro.
10742 (yystpcpy): New function, taken from yacc.c.
10743 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10744 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10745 so that we don't have to maintain their signatures.
10746 (yyFail): Check for buffer overflow, by using vsnprintf rather
10747 than vsprintf. Allocate a bigger buffer if possible.
10748 Report an error if buffer allocation fails.
10749 (yyStackOverflow): New function.
10750 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10751 the initialization was successful. It might fail if storage was
10752 exhausted.
10753 (yyexpandGLRStack): Add more checks for storage allocation failure.
10754 Use yyStackOverflow to report failures.
10755 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10756 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10757 Don't assume stack number fits in int.
10758 (yysplitStack): Check for storage allocation failure.
10759 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10760 can print diagnostics on storage allocation failure. All callers
10761 changed.
10762 (yyresolveValue): Use yybool for boolean.
10763 (yyreportSyntaxError): Check for size-calculation overflow.
10764 This code is taken from yacc.c.
10765 (yyparse): Check for storage allocation errors when allocating
10766 the initial stack.
10767
10768 2005-07-05 Akim Demaille <akim@epita.fr>
10769
10770 Extract calc++ from the documentation.
10771 * doc/bison.texinfo (Calc++): Add the extraction marks.
10772 * examples/extexi: New, from the aborted GNU Programming 2E.
10773 Separate the different paragraph of a file with empty lines.
10774 * examples/Makefile: Use it to extract the whole calc++ example.
10775
10776 2005-06-24 Akim Demaille <akim@epita.fr>
10777
10778 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10779 class typedefs.
10780
10781 2005-06-22 Akim Demaille <akim@epita.fr>
10782
10783 * doc/bison.texinfo (C++ Language Interface): First stab.
10784 (C++ Parsers): Remove.
10785
10786 2005-06-22 Akim Demaille <akim@epita.fr>
10787
10788 * data/lalr1.cc (yylex_): Honor %lex-param.
10789
10790 2005-06-22 Akim Demaille <akim@epita.fr>
10791
10792 Start a set of simple examples.
10793 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10794 * examples/calc++/calc++-driver.hh,
10795 * examples/calc++/calc++-parser.yy,
10796 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10797 * examples/calc++/compile, examples/calc++/test: New.
10798
10799 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10800
10801 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10802 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10803 which stems from the 2005-05-27 patch.
10804
10805 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10806
10807 * data/glr.c: Modify treatment of unused parameters to permit use
10808 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10809
10810 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10811
10812 Fix infringement on user name space reported by Janos Zoltan Szabo.
10813 * data/yacc.c (yyparse): strlen -> yystrlen.
10814
10815 2005-05-30 Akim Demaille <akim@epita.fr>
10816
10817 * data/lalr1.cc (_): New.
10818 Translate the various messages.
10819
10820 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10821
10822 Fix infringement on user name space reported by Bruno Haible.
10823 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10824 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10825 the user's name space.
10826 (alloca): Include <stdlib.h> to get it, if it's not built in.
10827 (YYMALLOC, YYFREE): Define only if needed.
10828 (malloc, free): Declare, but only if needed, as this infringes on
10829 the user name space.
10830
10831 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10832
10833 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10834 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10835 with %d format.
10836 * lib/ebitset.c (min, max): Undef before defining.
10837 * lib/vbitset.c (min, max): Likewise.
10838 * lib/subpipe.c (create_subpipe): Save local variables in case
10839 vfork clobbers them.
10840
10841 2005-05-24 Bruno Haible <bruno@clisp.org>
10842
10843 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10844 error message syntax used by gcc-4.0.
10845
10846 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 * README: Mention m4 1.4.3. Remove obsolete advice about
10849 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10850
10851 * bootstrap: Remove workaround for problem I encountered with
10852 gettext 0.14.1; it seems to be fixed now.
10853
10854 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10855
10856 * NEWS: Version 2.0a.
10857
10858 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10859 the previous change.
10860
10861 Various maintainer cleanups.
10862 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10863 conftest*, for benefit of CVS commands run at the same time as
10864 "configure". Add build-aux, since "bootstrap" now creates it and
10865 its subfiles.
10866 * Makefile.cfg (move_if_change): Remove.
10867 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10868 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10869 (po_repo, do-po-update, po-update, wget_files, get-targets):
10870 (config.guess-url_prefix, config.sub-url_prefix):
10871 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10872 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10873 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10874 Remove.
10875 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10876 this is now the recommended name.
10877 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10878 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10879 ylwrap. These files now go into build-aux.
10880 * config/move-if-change: Remove.
10881 * config/prev-version.txt: Bump from 1.75 to 2.0.
10882
10883 * bootstrap: Add stdio-safer, unistd-safer modules.
10884 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10885 we don't need it).
10886 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10887 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10888 * lib/subpipe.c: Include "unistd-safer.h".
10889 (create_subpipe): Make sure all the newly-created
10890 file descriptors are > 2, so that diagnostics don't
10891 get sent down them (which might cause Bison to hang, in theory).
10892 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10893 * src/files.c (xfopen): Use fopen_safer, not fopen.
10894
10895 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10896 yesterday's yacc.c fix.
10897
10898 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10899
10900 * data/glr.c, data/lalr1.cc: Update copyright date.
10901
10902 Fix a destructor bug reported by Wolfgang Spraul in
10903 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10904 * data/yacc.c (yyabortlab): Don't call destructor, and
10905 don't set yychar to EMPTY.
10906 (yyoverflowlab): Don't call destructor.
10907 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10908 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10909 since we no longer output the message "discarding lookahead token
10910 end of input ()".
10911
10912 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10913
10914 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10915 fix a small glitch in debugging output.
10916 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10917 after YY_SYMBOL_PRINT where needed.
10918
10919 (struct yyGLRState): Add some comments.
10920 (struct yySemanticOption): Add some comments.
10921 (union yyGLRStackItem): Add comment.
10922
10923 (yymergeOptionSets): Correct this to properly perform the union,
10924 avoiding infinite reported by Michael Rosien.
10925 Update comment.
10926
10927 * tests/glr-regression.at: Add test for GLR merging error reported
10928 by M. Rosien.
10929
10930 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10931
10932 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10933 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10934 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10935 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10936 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10937 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10938 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10939 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10940 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10941 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10942 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10943 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10944 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10945 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10946 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10947 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10948 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10949 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10950 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10951 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10952 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10953 src/output.h, src/parse-gram.c, src/parse-gram.h,
10954 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10955 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10956 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10957 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10958 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10959 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10960 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10961 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10962 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10963 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10964 tests/reduce.at, tests/regression.at, tests/sets.at,
10965 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10966 Update FSF postal mail address.
10967
10968 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10969
10970 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10971 Problem reported by Ralf Menzel.
10972
10973 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10974
10975 * tests/actions.at: Test that stack overflow invokes destructors.
10976 From Marcus Holland-Moritz.
10977 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10978 from here....
10979 (yyreturn): to here. That way, destructors are called properly
10980 even if the stack overflows, or the user calls YYACCEPT or
10981 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10982 (yyoverflowlab): Destroy the lookahead.
10983
10984 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10985
10986 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10987
10988 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10989
10990 * NEWS: Bison-generated C parsers no longer quote literal strings
10991 associated with tokens.
10992 * src/output.c (prepare_symbols): Don't escape strings,
10993 since users don't want to see C escapes.
10994 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10995 in diagnostics.
10996 * tests/input.at (Torturing the Scanner): Likewise.
10997 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10998
10999 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11000
11001 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11002 the data size is known to be too small and we can't increase it.
11003 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11004
11005 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11006
11007 * src/parse-gram.y: Include quotearg.h.
11008 (string_as_id): Quote $1 before using it as a key, since the
11009 lexer no longer quotes it for us.
11010 (string_content): Don't strip quotes, since lexer no longer
11011 quotes it for us.
11012 * src/scan-gram.l: Include quotearg.h.
11013 ("\""): Omit quote.
11014 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11015 a key, since the rest of the lexer doesn't quote it.
11016 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11017 * tests/regression.at (Token definitions): Check for backslashes
11018 in token strings.
11019
11020 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11021 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11022 (yyparse): Revamp code to generate long syntax error message, to
11023 make it easier to translate, and to avoid problems with arithmetic
11024 overflow. Change "virtual memory" to "memory" in diagnostic, since
11025 we don't know whether the memory is virtual.
11026
11027 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11028
11029 * NEWS: Bison-generated C parsers now use the _ macro to
11030 translate strings.
11031 * data/yacc.c (_) [!defined _]: New macro.
11032 All English strings wrapped inside this macro.
11033 * doc/bison.texinfo (Bison Parser): Document _.
11034 * po/POTFILES.in: Include src/parse-gram.c, since it now
11035 includes translateable strings that parse-gram.y doesn't.
11036
11037 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11038
11039 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11040 reverting the 2004-10-11 change to this function.
11041 (symbol_check_alias_consistency): Don't call symbol_type_set
11042 if the type name is already correct.
11043 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11044
11045 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11046
11047 * tests/regression.at (Token definitions): Don't use a token named
11048 c, as that generates a "#define c ..." that runs afoul of buggy
11049 stdlib.h that uses the identifier c as a member of struct
11050 drand48_data. Problem reported by Horst Wente.
11051
11052 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11053
11054 * bootstrap: Change translation URL from
11055 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11056 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11057 redirection glitches. Problem reported by twlevo@xs4all.nl.
11058
11059 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11060
11061 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11062 after operands; POSIX says this isn't portable for the c99 command.
11063
11064 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11065
11066 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11067 immediately if a data overrun has occurred; this may help us track
11068 down what may be a spurious failure on MacOS.
11069
11070 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11071
11072 Respond to problems reported by twlevo@xs4all.nl.
11073
11074 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11075
11076 * src/vcg.h: Comment fix.
11077 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11078 (G_CMAX): Change to -1 instead of INT_MAX.
11079
11080 * data/yacc.c (yyparse): Omit spaces before #line.
11081
11082 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11083
11084 * src/tables.c (state_number_to_vector_number): Put it inside an
11085 "#if 0", since it's not currently used. Problem reported by
11086 Roland McGrath.
11087
11088 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11089
11090 * src/output.c (escaped_output): Renamed from
11091 escaped_file_name_output, since we now use it for symbol tags as
11092 well. All uses changed.
11093 (symbol_destructors_output, symbol_printers_output):
11094 Escape symbol tags too.
11095 Problem reported by Matyas Forstner in
11096 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11097
11098 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11099 not needed.
11100 * src/output.c (user_actions_output, token_definitions_output,
11101 symbol_destructors_output, symbol_printers_output): Likewise.
11102 * src/reader.c (prologue_augment): Likewise.
11103 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11104
11105 * src/vcg.c (output_edge): Don't quote linestyle arg.
11106 Problem reported by twlevo@xs4all.nl.
11107
11108 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11109
11110 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11111 example, reported by Derek M Jones. Also, make the example even
11112 more outrageous, to better illustrate how bad the problem is.
11113
11114 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11115
11116 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11117 putsym. Typo reported by Sebastian Piping.
11118
11119 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11120
11121 * doc/bison.texinfo (Language and Grammar): some -> same
11122 (Epilogue): int he -> in the
11123 Typos reported by Sebastian Piping via Justin Pence.
11124
11125 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11126
11127 * tests/glr-regression.at (Improper handling of embedded actions
11128 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11129 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11130 with dollar signs in test names.
11131 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11132 for a similar reason.
11133
11134 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11135
11136 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11137 wants to redefine G_VIEW.
11138
11139 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11140
11141 * src/vcg.c (get_view_str): Remove case for normal_view.
11142 Problem reported by twlevo@xs4all.nl.
11143
11144 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11145
11146 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11147 Problem reported by twlevo@xs4all.nl.
11148
11149 * doc/bison.texinfo: Change @dircategory from "GNU programming
11150 tools" to "Software development". Requested by Richard Stallman
11151 via Karl Berry.
11152
11153 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11154
11155 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11156 Problem reported by twlevo@xs4all.nl.
11157
11158 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11159
11160 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11161 keyword; it's not needed with modern compilers, and it doesn't
11162 affect correctness with older compilers. Suggested by
11163 twlevo@xs4all.nl.
11164
11165 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11166
11167 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11168 gcc -Wswitch-default.
11169 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11170 * data/yacc.c (yyparse): Likewise.
11171
11172 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11173
11174 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11175 already. Let config.h define any nonstandard values.
11176
11177 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11178
11179 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11180 for the benefit of slower hosts. Problem reported by
11181 Nelson H. F. Beebe.
11182
11183 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11184
11185 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11186 being defined and not used.
11187 * data/lalr1.cc (yyparse): Likewise.
11188 Use "if (false)" rather than "if (0)".
11189
11190 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11191
11192 * TODO: Mention that we should allow NUL bytes in tokens.
11193
11194 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11195
11196 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11197 Problem reported by Hans Aberg.
11198
11199 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11200
11201 * src/getargs.c (version): Happy new year; update overall
11202 program copyright date from 2004 to 2005.
11203
11204 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11205 Problem reported by Hans Aberg.
11206 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11207 (Output file names.): Add a test for the case when standard output
11208 is closed.
11209
11210 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11211
11212 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11213 to fix an oversight in the Bison 2.0 manual.
11214
11215 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11216
11217 * NEWS: Version 2.0. Reformat the existing news items since
11218 1.875, so that related items are grouped together.
11219 * configure.ac (AC_INIT): Bump version to 2.0.
11220 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11221
11222 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11223 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11224 otherwise, we're not testing alloca. Unfortunately there's no
11225 simple way to consult HAVE_ALLOCA here.
11226
11227 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11228 for yymsg, too.
11229
11230 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11231 hand. This avoids a warning about comparing int to size_t when
11232 GCC warnings are enabled.
11233
11234 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11235
11236 * NEWS: Bison-generated parsers no longer default to using the
11237 alloca function (when available) to extend the parser stack, due
11238 to widespread problems in unchecked stack-overflow detection.
11239 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11240 responsibility to set it to a positive value. This lets the user
11241 specify a value that is not a preprocessor constant.
11242 * data/yacc.c (YYMAXDEPTH): Likewise.
11243 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11244 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11245 to be a compile-time constant. However, explain the constraints on it.
11246 Also, explain the constraints on YYINITDEPTH.
11247 (Table of Symbols): Explain that alloca is no longer the default.
11248 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11249 to 1.
11250
11251 * doc/bison.texinfo (Location Default Action): Mention that n must
11252 be zero when k is zero. Suggested by Frank Heckenbach.
11253
11254 2004-12-22 Akim Demaille <akim@epita.fr>
11255
11256 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11257 (parser::state_type, parser::semantic_type, parser::location_type):
11258 Private, not public.
11259 (parser::parse): Return ints, not bool.
11260 Returning a bool introduces a problem: 0 corresponds to false, and
11261 it seems weird to return false on success. Returning true changes
11262 the conventions for yyparse.
11263 Alternatively we could return void and send an exception.
11264 There is no clear consensus (yet?).
11265 (state_stack, semantic_stack, location_stack): Rename as...
11266 (state_stack_type, semantic_stack_type, location_stack_type): these.
11267 Private, not public.
11268 * tests/c++.at: New.
11269 * tests/testsuite.at, tests/Makefile.am: Adjust.
11270
11271 2004-12-21 Akim Demaille <akim@epita.fr>
11272
11273 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11274
11275 2004-12-21 Akim Demaille <akim@epita.fr>
11276
11277 Don't impose std::string for filenames.
11278
11279 * data/lalr1.cc (b4_filename_type): New.
11280 (position::filename): Use it.
11281 (parser.hh): Move the inclusion of stack.hh and location.hh below
11282 the user code, so that needed headers for the filename type can be
11283 included first.
11284 Forward declare them before the user code.
11285 * tests/Makefile.am (check-local, installcheck-local): Pass
11286 TESTSUITEFLAGS to the TESTSUITE.
11287
11288 2004-12-20 Akim Demaille <akim@epita.fr>
11289
11290 Use more STL like names: my_class instead of MyClass.
11291
11292 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11293 (SemanticStack, SemanticType, StateStack, StateType)
11294 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11295 (Parser::value): Rename as...
11296 (location_stack, location_type, rhs_number_type, semantic_stack)
11297 (semantic_type, state_stack, state_type, token_number_type, stack)
11298 (slice, traits, parser::yylloc, parser::yylval): these.
11299
11300 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11301
11302 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11303
11304 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11305 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11306
11307 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11308
11309 Remove uses of 'short int' and 'unsigned short int'. This raises
11310 some arbitrary limits. It uses more memory but nowadays that's
11311 not much of an issue.
11312
11313 This change does not affect the generated parsers; that's a different
11314 task, as some users will want to conserve memory there.
11315
11316 Ideally we should use size_t to represent all object counts, and
11317 something like ptrdiff_t to represent signed differences of object
11318 counts; but that will require more code-cleanup than I have the
11319 time to do right now.
11320
11321 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11322 Use size_t, not int or short int, to count objects.
11323 * src/closure.c (nritemset, closure): Likewise.
11324 * src/closure.h (nritemset, closure): Likewise.
11325 * src/nullable.c (nullable_compute): Likewise.
11326 * src/print.c (print_core): Likewise.
11327 * src/print_graph.c (print_core): Likewise.
11328 * src/state.c (state_compare, state_hash): Likewise.
11329 * src/state.h (struct state): Likewise.
11330 * src/tables.c (default_goto, goto_actions): Likewise.
11331
11332 * src/gram.h (rule_number, rule): Use int, not short int.
11333 * src/output.c (prepare_rules): Likewise.
11334 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11335 errs, reductions): Likewise.
11336 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11337 Likewise.
11338 * src/tables.c (vector_number, tally, action_number,
11339 ACTION_NUMBER_MINIMUM): Likewise.
11340 * src/output.c (muscle_insert_short_int_table): Remove.
11341
11342 2004-12-17 Akim Demaille <akim@epita.fr>
11343
11344 * data/lalr1.cc: Extensive Doxygenation.
11345 (error_): Rename as...
11346 (error): this, since it is visible to the user.
11347 Adjust callers.
11348 (Parser::message): Now an automatic variable from...
11349 (Parser::yyreport_syntax_error_): here.
11350 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11351 Parser::error.
11352 * tests/input.at: Escape $.
11353
11354 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11355
11356 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11357 Parenthesize rhs to avoid obscure problems with mistakes like
11358 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11359 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11360 b4_rhs_location): Likewise.
11361 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11362 b4_rhs_location): Likewise.
11363
11364 2004-12-16 Akim Demaille <akim@epita.fr>
11365
11366 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11367 yacc.c: be sure to stay within yycheck_.
11368 * tests/actions.at: Re-enable C++ tests.
11369
11370 2004-12-16 Akim Demaille <akim@epita.fr>
11371
11372 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11373 real.
11374
11375 2004-12-16 Akim Demaille <akim@epita.fr>
11376
11377 Use #define to handle the %name-prefix.
11378
11379 * data/glr.c, data/yacc.c: Comment changes.
11380 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11381 so that one can refer to yylex in the parser file, and have it
11382 renamed, as is the case with other skeletons.
11383
11384 2004-12-16 Akim Demaille <akim@epita.fr>
11385
11386 Move lalr1.cc internals into yy*.
11387
11388 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11389 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11390 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11391 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11392 (empty_, final_, terror_, errcode_, ntokens_)
11393 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11394 (looka_, ilooka_, error_range_, nerrs_):
11395 Rename as...
11396 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11397 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11398 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11399 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11400 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11401 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11402 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11403 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11404 these.
11405
11406 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11407
11408 Fix some problems reported by twlevo at xs4all.
11409 * src/symtab.c (symbol_new): Report an error if the input grammar
11410 contains too many symbols. This is better than calling abort() later.
11411 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11412 (struct node, struct graph):
11413 Rename member expand to stretch. All uses changed.
11414 (struct graph): Remove member layoutalgorithm. All uses removed.
11415 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11416 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11417 All uses changed.
11418 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11419
11420 2004-12-15 Akim Demaille <akim@epita.fr>
11421
11422 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11423 Add more Doxygen comments.
11424 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11425 (report_syntax_error_, translate_): Rename as...
11426 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11427 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11428
11429 2004-12-15 Akim Demaille <akim@epita.fr>
11430
11431 * data/lalr1.cc (lex_): Rename as...
11432 (yylex_): this.
11433 Move the trace here.
11434 Take the %name-prefix into account.
11435 Reported by Alexandre Duret-Lutz.
11436
11437 2004-12-15 Akim Demaille <akim@epita.fr>
11438
11439 Simplify the C++ parser constructor.
11440
11441 * data/lalr1.cc (debug_): Rename as...
11442 (yydebug_): so that the parser's internals are always in the yy*
11443 pseudo namespace.
11444 Adjust uses.
11445 (b4_parse_param_decl): Remove the leading comma as it is now only
11446 called as unique argument list.
11447 (Parser::Parser): Remove the constructor accepting a location and
11448 an initial debugging level.
11449 Remove from the other ctor the argument for the debugging level.
11450 (debug_level_type, debug_level, set_debug_level): New.
11451
11452 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11453 constructor calls.
11454
11455 2004-12-15 Akim Demaille <akim@epita.fr>
11456
11457 Remove b4_root related material: failure experiment
11458 (which goal was to allow to derive from a class).
11459
11460 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11461 definitions and uses.
11462
11463 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11464
11465 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11466 not 2, since it's not portable to subtract 1 from the start of an
11467 array. The new item 0 is never set or used. All uses changed.
11468
11469 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11470 the default definition of YYLLOC_DEFAULT. Problem reported
11471 by Frank Heckenbach.
11472
11473 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11474
11475 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11476 the normal case and one for the error case. Just use the
11477 first one uniformly. Problem reported by Frank Heckenbach.
11478 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11479 use exactly the same macro in both places.
11480 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11481 so that the normal-case YYRHSLOC works for the error case too.
11482 All uses changed.
11483 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11484 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11485 * doc/bison.texinfo (Location Default Action): Don't claim that
11486 we have an array of locations. Use the same macro for both glr
11487 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11488 the index is 0.
11489
11490 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11491
11492 * HACKING: Update email addresses to send announcements to.
11493
11494 * configure.ac (AC_INIT): Bump version to 1.875f.
11495
11496 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11497
11498 * NEWS: Version 1.875e.
11499 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11500
11501 * src/scan-skel.l: Include "complain.h", for "fatal".
11502
11503 * src/relation.h (relation_print, relation_digraph):
11504 Relation sizes are of type relation_node, not size_t (this is
11505 merely a doc fix, since the two types are equivalent).
11506 (relation_transpose): Relation sizes are of type relation_node,
11507 not int.
11508 * src/relation.c: Likewise.
11509 (top, infinity): Now of type relation_node, not int.
11510 (traverse, relation_transpose): Use relation_node, not int.
11511
11512 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11513 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11514 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11515
11516 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11517 specifying whether the test should be skipped. Use it tp
11518 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11519 fail on some hosts, and should be skipped.
11520
11521 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11522
11523 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11524 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11525 unless otherwise specified below.
11526
11527 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11528 to allocate kernel_base, kernel_items, kernel_size, since
11529 they needn't be initialized to 0.
11530 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11531 * src/closure.c (new_closure): Likewise, for itemset.
11532 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11533 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11534 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11535 (build_relations): Likewise for edge, states1, includes.
11536 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11537 * src/reader.c (packgram): Likewise, for ritem, rules.
11538 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11539 * src/relation.c (relation_digraph): Likewise for VERTICES.
11540 (relation_transpose): Likewise for new_R, end_R.
11541 * src/symtab.c (symbols_token_translations_init): Likewise for
11542 token_translations.
11543 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11544 (token_actions): Likewise for yydefact, actrow, conflrow,
11545 conflict_list.
11546 (save_column): Likewise for froms[symno], tos[symno].
11547 (goto_actions): Likewise for state_count.
11548 (pack_table): Likewise for base, pos, check.
11549 (tables_generate): Likewise for width.
11550
11551 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11552 for initial core. Just have a separate core, so we needn't worry
11553 about whether kernel_size and kernel_base are initialized.
11554
11555 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11556 kernel_size, kernel_items): Remove unnecessary initialization.
11557 * src/conflicts.c (conflicts): Likewise.
11558 * src/derives.c (derives): Likewise.
11559 * src/muscle_tablc (muscle_insert): Likewise.
11560 * src/relation.c (relation_digraph): Likewise.
11561 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11562 conflrow, conflict_table, conflict_list, table, check):
11563 Likewise.
11564
11565 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11566 This is because all callers pass unsigned int.
11567 * src/closure.h (new_closure): Likewise.
11568
11569 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11570 (build_relations): Initialize includes[i] in all cases.
11571 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11572 and rules[ruleno].precsym. Initialize members in order.
11573 * src/relation.c (relation_transpose): Always initialize new_R[i]
11574 and end_R[i].
11575 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11576
11577 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11578 conflict_list[0] was always 0, but now it isn't initialized.
11579
11580 * src/table.c (table_grow): When conflict_table grew, the grown
11581 area wasn't cleared. Fix this.
11582
11583 * lib/.cvsignore: Add strdup.c, strdup.h.
11584 * m4/.cvsignore: Add strdup.m4.
11585
11586 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11587
11588 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11589 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11590 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11591 ngotos + 1 without checking for overflow.
11592 (build_relations): Use END_NODE, not -1, to denote end of edges.
11593 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11594 build_relations): Use goto_number, not int, for goto numbers.
11595 * src/tables.c (save_column, default_goto): Likewise.
11596
11597 2004-11-23 Akim Demaille <akim@epita.fr>
11598
11599 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11600 of #defining from yystype.
11601 Don't typedef yystype, C++ does not need it.
11602 This lets it possible to forward declare it as union.
11603
11604 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11605
11606 * bootstrap (gnulib_modules): Add extensions.
11607 Problem reported by Jim Meyering.
11608
11609 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11610
11611 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11612 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11613 src/system.h, src/tables.c: XFREE -> free, to accommodate
11614 recent change to gnulib xalloc.h.
11615 Problem reported by Jim Meyering.
11616
11617 2004-11-17 Akim Demaille <akim@epita.fr>
11618
11619 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11620
11621 2004-11-17 Akim Demaille <akim@epita.fr>,
11622 Alexandre Duret-Lutz <adl@gnu.org>
11623
11624 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11625 changes.
11626 (YYCDEBUG): Adjust.
11627 Use it instead of cdebug_.
11628 (Parser::debug_stream, Parser::set_debug_stream): New.
11629 (Parser::symprint_): Define cdebug_ for temporary backward
11630 compatibility.
11631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11632 debug_stream ().
11633
11634 2004-11-17 Akim Demaille <akim@epita.fr>
11635
11636 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11637 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11638 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11639 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11640
11641 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11642
11643 * data/glr.c (yyloc_default): Remove; not used.
11644 Problem reported by Frank Heckenbach.
11645
11646 2004-10-25 Akim Demaille <akim@epita.fr>
11647
11648 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11649 Introduce another definition to address simple location arrays.
11650 (yyGLRStack): New member: yyerror_range.
11651 (yyrecoverSyntaxError, yyparse): Update it.
11652 (yyrecoverSyntaxError): Use it when shifting the error token to
11653 have an accurate range, equivalent to the one computed by both
11654 yacc.c and lalr1.cc.
11655 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11656 that column numbers start at column 0, as per GNU Coding
11657 Standards, the others tests, and the doc.
11658 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11659 Adjust to the above change (first column is 0).
11660 And adjust the location of the "<error>", now covering the whole
11661 line.
11662
11663 2004-10-22 Akim Demaille <akim@epita.fr>
11664 and Paul Eggert <eggert@cs.ucla.edu>
11665
11666 Remove some arbitrary limits on goto numbers and relations.
11667 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11668 initial values, since they're never used.
11669 (set_goto_map): ngotos is now unsigned, so test for overflow
11670 by seeing whether it wraps around to zero.
11671 * src/lalr.h (goto_number): Now size_t, not short int.
11672 (GOTO_NUMBER_MAXIMUM): Remove.
11673 * src/relation.c (relation_print, traverse, relation_transpose):
11674 Check for END_NODE rather than looking at sign.
11675 * src/relation.h (END_NODE): New macro.
11676 (relation_node): Now size_t, not short int.
11677
11678 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11679
11680 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11681 keyword, not an identifier. Problem reported by Baron Schwartz in
11682 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11683
11684 2004-10-11 Akim Demaille <akim@epita.fr>
11685
11686 * src/symtab.c (symbol_check_alias_consistency): Also check
11687 type names, destructors, and printers.
11688 Reported by Alexandre Duret-Lutz.
11689 Recode the handling of associativity and precedence in terms
11690 of symbol_precedence_set.
11691 Accept no redeclaration at all, not even equal to the previous
11692 value.
11693 (redeclaration): New.
11694 Use it to factor redeclaration complaints.
11695 (symbol_make_alias): Don't set the type of the alias, let
11696 symbol_check_alias_consistency do it as for other features.
11697 * src/symtab.h (symbol): Add new member prec_location, and
11698 type_location.
11699 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11700 * tests/input.at (Incompatible Aliases): New.
11701
11702 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11703
11704 .cvsignore fixes to accommodate gnulib changes,
11705 and the practice of naming build directories "_build".
11706 * .cvsignore: Add "_*". Sort.
11707 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11708 * m4/.cvsignore: Add "*_gl.m4".
11709
11710 2004-10-06 Akim Demaille <akim@epita.fr>
11711
11712 * src/parse-gram.y (add_param): Fix the truncation of trailing
11713 spaces.
11714
11715 2004-10-05 Akim Demaille <akim@epita.fr>
11716
11717 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11718 whether the reducion was empty or not. This leaves room to
11719 improve the use of YYLLOC_DEFAULT in such a case.
11720 lalr1.cc is still experimental, so changing this is acceptable.
11721 And finally, there are probably not many users who changed the
11722 handling of locations in GLR, so changing is admissible too.
11723
11724 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11725 empty reduction, set @$ to an empty location ending the previously
11726 stacked symbol.
11727 Adjust uses to make sure the code is triggered on empty
11728 reductions.
11729 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11730 expected output: empty reductions have empty locations.
11731
11732 2004-09-29 Akim Demaille <akim@epita.fr>
11733
11734 * data/lalr1.cc: Move towards a more standard C++ coding style
11735 for templates: Class < T > -> Class<T>.
11736
11737 2004-09-29 Akim Demaille <akim@epita.fr>
11738
11739 * data/lalr1.cc: Reinstall the former ctor, for sake of
11740 compatibility, but warn it will be removed.
11741 Move towards a more standard C++ coding style (i.e., type *var ->
11742 type* var).
11743
11744 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11745
11746 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11747 since it's less likely to work if NULs are involved in the future.
11748
11749 2004-09-27 Akim Demaille <akim@epita.fr>
11750
11751 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11752
11753 2004-09-27 Akim Demaille <akim@epita.fr>
11754
11755 * data/lalr1.cc (b4_parse_param_decl_1): New.
11756 (b4_parse_param_decl): Use it to have different names between attribute
11757 and argument names.
11758 (b4_cc_constructor_call): Likewise.
11759
11760 2004-09-24 Akim Demaille <akim@epita.fr>
11761
11762 * src/parse-gram.y (add_param): Strip the leading and trailing
11763 blanks from a formal argument declaration.
11764 (YY_LOCATION_PRINT): New.
11765
11766 2004-09-24 Akim Demaille <akim@epita.fr>
11767
11768 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11769 after the location.
11770
11771 2004-09-24 Akim Demaille <akim@epita.fr>
11772
11773 * doc/bison.texinfo (Table of Symbols): Sort.
11774
11775 2004-09-21 Akim Demaille <akim@epita.fr>
11776
11777 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11778 the useless parentheses.
11779 Suggested by Paul Eggert.
11780
11781 2004-09-20 Akim Demaille <akim@epita.fr>
11782
11783 Let the initial-action act on the look-ahead, and use it for the
11784 "initial push" (corresponding to an hypothetical beginning-of-file).
11785 And let lalr1.cc honor %initial-action.
11786
11787 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11788 example.
11789 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11790 (Parser::Parser): Remove the ctor that used to initialize it.
11791 (Parser::parse): Like in the other skeletons, issue the "starting
11792 parse" message before any action.
11793 Honor %initial-action.
11794 Initialize the stacks with the lookahead.
11795 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11796 look-ahead.
11797 Push them in the stacks.
11798 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11799
11800 2004-09-20 Akim Demaille <akim@epita.fr>
11801
11802 * doc/bison.texinfo (Initial Action Decl): New.
11803
11804 2004-09-20 Akim Demaille <akim@epita.fr>
11805
11806 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11807 clearer criterion to define it.
11808 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11809 When reducing on an empty RHS, use the latest stacked location as
11810 location.
11811 yylloc is not always available.
11812 * data/glr.c: Likewise.
11813 Also, honor initial-actions.
11814
11815 2004-09-20 Akim Demaille <akim@epita.fr>
11816
11817 * data/yacc.c (YY_LOCATION_PRINT): New.
11818 Define when we know YYLTYPE's structure, i.e., when the default
11819 YYLLOC_DEFAULT is used.
11820 * data/c.m4 (b4_yysymprint_generate): Use it.
11821 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11822 value of the result.
11823 (error_start_): Replace with...
11824 (error_range_): this location array.
11825 This allows to replace code relying on the implementation of
11826 locations by portable code.
11827 * data/yacc.c (yylerrsp): Replace with...
11828 (yyerror_range): this.
11829 Every time a token is popped, update yyerror_range[0], to have an
11830 accurate location for the error token.
11831 * data/glr.c (YY_LOCATION_PRINT): New.
11832 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11833 deference a pointer.
11834 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11835 report the location in %printers.
11836
11837 * src/scan-skel.l: Instead of abort, report error messages to ease
11838 understanding skeleton scanning failures.
11839
11840 2004-09-16 Akim Demaille <akim@epita.fr>
11841
11842 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11843 (iterator, const_iterator): these, to be more in the C++ spirit.
11844 Also, return reverse iterators so that when displaying the stack
11845 we display its bottom first.
11846 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11847 from yacc.c.
11848 We should probably use vector here though.
11849
11850 2004-09-16 Akim Demaille <akim@epita.fr>
11851
11852 Have more complete shift traces.
11853
11854 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11855 to report Shifts instead of ad hoc YYDPRINTF invocations,
11856 including for the error token.
11857 * data/lalr1.cc (symprint_): Output the location.
11858 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11859 output the location within the %printer.
11860 Activate GLR tests, at least to make sure they compile properly.
11861 They still don't pass though.
11862 * tests/calc.at: Adjust expect verbose output, since now "Entering
11863 state..." is on a different line than the "Shifting" message.
11864
11865 2004-09-08 Akim Demaille <akim@epita.fr>
11866
11867 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11868 Bison directive from the Bison file to the invocation of this
11869 macro, so that these directives are passed to
11870 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11871 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11872 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11873 the extra Bison directives instead of the whole series.
11874 Change the grammar so that there are recoverable errors, and
11875 unrecoverable errors. Now we can have the parser give up before
11876 consuming the whole input. As a result we now can observe that
11877 the lookahead is freed when needed.
11878 Change the parser source to parse argv[1] instead of a hard coded
11879 string.
11880 Simplify yylex, and give a value and location to EOF.
11881 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11882 passed directives already coded in the file.
11883 Add some tests to check the location of "error".
11884 For some tests, the C++ parser is correct, and not yacc.c.
11885 For other tests, they provide different, but unsatisfying, values,
11886 so keep the C++ value so that at least one parser is "correct"
11887 according to the test suite.
11888 (Actions after errors): Remove, this is subsumed by the
11889 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11890
11891 2004-09-06 Akim Demaille <akim@epita.fr>
11892
11893 * data/lalr1.cc: Adjust the indentation of the labels.
11894 (Parser::pop): New.
11895 Use it.
11896
11897 2004-09-06 Akim Demaille <akim@epita.fr>
11898
11899 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11900 argument, an informative message.
11901 Call YY_SYMBOL_PRINT.
11902 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11903 * data/lalr1.cc (destruct_): Likewise.
11904 In addition, no longer depend on b4_yysymprint_generate and
11905 b4_yydestruct_generate to generate these functions, do it "by
11906 hand".
11907
11908 2004-09-03 Akim Demaille <akim@epita.fr>
11909
11910 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11911 invoked, yydestruct the lookahead.
11912 * tests/calc.at (Calculator $1): Update the expected lengths of
11913 traces: there is an added line for the discarded lookahead.
11914 * doc/bison.texinfo (Destructor Decl): Some rewording.
11915 Define "discarded" symbols.
11916
11917 2004-09-02 Akim Demaille <akim@epita.fr>
11918
11919 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11920
11921 2004-09-02 Akim Demaille <akim@epita.fr>
11922
11923 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11924 (YYDSYMPRINTF): Rename as...
11925 (YY_SYMBOL_PRINT): this.
11926 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11927 two.
11928 Use it instead of direct symprint_ calls.
11929 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11930 one.
11931
11932 2004-09-02 Akim Demaille <akim@epita.fr>
11933
11934 * data/lalr1.cc (b4_yysymprint_generate): New.
11935 (symprint_): New member function, defined when YYDEBUG.
11936 Use it consistently instead of token/nterm debugging output by
11937 hand.
11938 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11939 %printer calls to use cdebug_ when using lalr1.cc.
11940
11941 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11942
11943 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11944 with #ifdef YYDEBUG.
11945
11946 2004-08-26 Akim Demaille <akim@epita.fr>
11947
11948 * doc/bison.texinfo (Implementing Loops): Rename as...
11949 (Implementing Gotos/Loops): this.
11950
11951 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11952
11953 Adjust to latest gnulib.
11954 * bootstrap (gnulib_modules): Add xalloc-die.
11955 Set LC_ALL=C so that file names sort consistently.
11956 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11957 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11958 uintmax_t.m4, ulonglong.m4.
11959 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11960 po.m4 since we are now using _gl.m4 instead.
11961
11962 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11963
11964 * src/scan-action.l: Remove. Scanning of semantic actions is
11965 handled in scan-gram.l.
11966
11967 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11968
11969 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11970
11971 * src/location.h (struct): The file member is a uniqstr.
11972 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11973
11974 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11975
11976 Fix bug with non-%union parsers that have printers or destructors,
11977 which led to a Bison core dump. Reported by Peter Fales in
11978 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11979
11980 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11981 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11982 not to our own type.
11983 * src/output.c (symbol_destructors_output, symbol_printers_output):
11984 Don't assume %union.
11985 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11986 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11987 UNION-FLAG. All callers changed.
11988 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11989 Use type char, not unsigned int, when declaring an array of char;
11990 this lets us remove a cast.
11991 (Printers and Destructors): Add non-%union test cases.
11992
11993 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11994
11995 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11996 GLR writeups. E.g., avoid frenchspacing and the future tense,
11997 change "lookahead" to "look-ahead", and change "wrt" to "with
11998 respect to".
11999
12000 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12001
12002 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12003 New sections, split off from the GLR Parsers section. Put the new
12004 Simple GLR Parser near the start of the GLR section, for clarity.
12005 Rewrite connective text.
12006
12007 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12008
12009 * doc/bison.texinfo (Simple GLR Parsers): New section.
12010
12011 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12012
12013 * NEWS, TODO, doc/bison.texinfo:
12014 Use "look-ahead" instead of "lookahead", to be consistent.
12015 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12016 while we're fixing "look-ahead".
12017 * src/conflicts.c (shift_set): Renamed from shiftset.
12018 (look_ahead_set): Renamed from lookaheadset.
12019 * src/print.c: Likewise.
12020 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12021 name for "lookahead".
12022 (report_types, usage): Likewise.
12023 * src/getargs.h (report_look_ahead_tokens): Renamed from
12024 report_lookaheads.
12025 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12026 compute_lookaheads.
12027 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12028 (look_ahead_tokens_print): Renamed from lookaheads_print.
12029 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12030 state_rule_lookaheads_print.
12031 * src/state.h: Likewise.
12032 (reductions.look_ahead_tokens): Renamed from lookaheads.
12033 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12034 AT_DATA_LOOKAHEADS_GRAMMAR.
12035
12036 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12037
12038 * README: Update location of patched M4 distribution.
12039
12040 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12041
12042 Don't assume the C++ compiler takes the same arguments as the C compiler
12043 (trivial change).
12044 * configure.ac (O0CXXFLAGS): New var.
12045 * tests/atlocal.in (CXXFLAGS): Use it.
12046
12047 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12048
12049 Fix some "make check" problems with C++ reported by
12050 Albert Chin-A-Young for Tru64 C++ in this thread:
12051 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12052
12053 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12054 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12055 Output to a .cc file for C++, not to a .c file.
12056 * tests/calc.at (AT_CHECK_CALC): Likewise.
12057 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12058 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12059
12060 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12061
12062 * tests/calc.at, tests/actions.at: Workaround for SGI
12063 C++ compiler. (trivial change)
12064
12065 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12066
12067 Spent a few hours checking out which prerequisite versions the
12068 current sources actually require. I went all the way back to
12069 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12070 a seemingly endless set of combinations of versions more recent
12071 than that. The bottom line is that the current sources require
12072 fairly recent versions of the build tools, and it'll be some work
12073 to change this.
12074 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12075 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12076 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12077 Add comments explaining why those particular versions are
12078 currently needed.
12079
12080 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12081 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12082 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12083
12084 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12085 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12086
12087 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12088
12089 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12090 0.11.5. Suggested by Bruno Haible.
12091 * bootstrap: Remove gettext version checking.
12092
12093 * doc/bison.texinfo (Decl Summary): Also mention that %union
12094 can depend on prerequisite types. Problem reported by Tim
12095 Van Holder.
12096
12097 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12098
12099 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12100 * README-alpha: Don't tell people not to package this.
12101
12102 * bootstrap: Don't assume $(...) works; use `...` instead.
12103 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12104 gettext better.
12105
12106 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12107 put into the -d output file, and mention what to do if YYSTYPE is
12108 defined as a macro.
12109
12110 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12111
12112 Undo change made earlier today: it caused autopoint to not bring
12113 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12114 autopoint's.
12115
12116 * bootstrap: Check that gettext version matches what's in
12117 configure.ac. Warn users to ignore robots.txt ERROR 404.
12118 * bootstrap: Undo today's earlier change (logged below).
12119 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12120
12121 The gettext version checking is causing more trouble than it's
12122 curing; remove it. Problem reported by Paul Hilfinger.
12123
12124 * bootstrap: Issue a warning that one can expect a message
12125 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12126 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12127
12128 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12129
12130 Ensure that the C++ compiler used for testing actually works on a
12131 simple test program; if not, skip the C++-related tests. Problem
12132 reported by Vin Shelton in:
12133 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12134
12135 * m4/cxx.m4: New file.
12136 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12137 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12138 * tests/local.at (AT_COMPILE_CXX): Use it.
12139
12140 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12141
12142 * data/glr.c (yylloc): Output this macro even if locations are not
12143 being generated, as the GLR parser needs it even in that case.
12144 Problem reported by Troy A. Johnson
12145 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12146
12147 * configure.ac (AC_INIT): Update to 1.875e.
12148
12149 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12150
12151 * NEWS: Version 1.875d.
12152 * configure.ac (AC_INIT): Likewise.
12153 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12154
12155 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12156 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12157 lalr1.cc runs afoul of the first, and the last two are no longer
12158 supported by GCC 3.4.0.
12159 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12160 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12161
12162 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12163
12164 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12165 unsigned int, for compatibility with latest gnulib hash module.
12166 * src/state.c (state_hash, state_hasher): Likewise.
12167 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12168 * src/uniqstr.c (hash_uniqstr): Likewise.
12169
12170 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12171
12172 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12173
12174 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12175 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12176 character and string literals.
12177 (unexpected_end): New function.
12178 (unexpected_eof): Use it.
12179 (unexpected_newline): New function.
12180 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12181 actions.
12182
12183 * NEWS: Document %expect-rr.
12184
12185 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12186 Fix typo by replacing $1 with $option.
12187 Remove more 'intl'-related files.
12188 Don't DEFUN AM_INTL_SUBDIR twice.
12189
12190 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12191 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12192 strtoul.c.
12193 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12194 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12195 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12196 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12197 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12198 * src/.cvsignore: Add *.output.
12199
12200 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12201 gets copied to the output file.
12202
12203 2004-04-28 Paul Eggert <eggert@twinsun.com>
12204
12205 Get files from the gnulib and po repositories, instead of relying
12206 on them being in our CVS. Upgrade to latest versions of gnulib
12207 and Automake.
12208
12209 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12210 * bootstrap: Bootstrap from gnulib and po repositories.
12211 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12212 * README-cvs: Document these changes. Remove version numbers from
12213 mentions of build tools, since they change so often. Mention Flex.
12214
12215 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12216 (gl_USE_SYSTEM_EXTENSIONS): Add.
12217 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12218 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12219 does this for us.
12220 (AC_ISC_POSIX): Remove; we no longer support this
12221 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12222 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12223 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12224 Do not check for C89 headers, except for locale.h which is used
12225 by the Yacc library and must port to K&R hosts.
12226 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12227 Do not check for C89 functions, except for setlocale which is
12228 used by the Yacc library.
12229 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12230 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12231 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12232 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12233 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12234 AM_GNU_GETTEXT): Remove; now done by:
12235 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12236 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12237 for us.
12238
12239 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12240 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12241 Define to empty, as gnulib.mk will do the rest for us.
12242 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12243 for us.
12244 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12245 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12246
12247 * src/files.c: Include gnulib's xstrndup.h.
12248
12249 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12250 (REALLOC): Use xnrealloc, for likewise.
12251 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12252 (strnlen, memrchr): Remove decls; functions no longer used.
12253 Include <stpcpy.h>.
12254
12255 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12256 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12257 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12258 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12259 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12260 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12261 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12262 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12263 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12264 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12265 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12266 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12267 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12268 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12269 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12270 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12271 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12272 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12273 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12274 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12275 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12276 Remove, as these files are now generated automatically
12277 by bootstrap or automake.
12278
12279 * po/ChangeLog: Remove: all but one entry was a duplicate
12280 of this file, and I moved that 2000-11-02 entry here.
12281
12282 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12283 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12284 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12285 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12286 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12287 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12288 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12289 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12290 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12291 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12292 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12293 xstrndup.h.
12294 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12295 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12296 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12297 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12298 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12299 * src/.cvsignore: Remove *_.c.
12300
12301
12302 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12303 support it. (The latest stable gzip doesn't.)
12304
12305 2004-04-27 Paul Eggert <eggert@twinsun.com>
12306
12307 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12308 case, as stos_ is now used by destructors due to the 2004-02-09
12309 change.
12310
12311 Remove more K&R C support.
12312 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12313 * lib/subpipe.c (errno): Remove decl.
12314 Include <stdlib.h> unconditionally.
12315 (EXIT_FAILURE): Remove macro.
12316 * src/complain.c (vfprintf, strerror): Remove.
12317 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12318 unconditionally.
12319 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12320 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12321 (strchr, strspn, memchr): Remove decls.
12322 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12323 unconditionally. Do not declare perror.
12324 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12325 unconditionally.
12326
12327 * src/complain.c (_): Remove useless defn, as system.h defines this.
12328
12329 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12330 with latest obstack.h.
12331 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12332 to procedure types, as obstack.h now does that for us.
12333 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12334
12335 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12336 so that this include file can stand alone.
12337 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12338 does this now. Include subpipe.h first after config.h, to
12339 test whether it can stand alone.
12340
12341 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12342 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12343 unused declaration.
12344
12345 * tests/synclines.at (%union synch line): Put a dummy member in
12346 the union, because empty unions aren't allowed in C. Caught
12347 by GCC 3.4.0.
12348
12349 2004-04-13 Jim Meyering <jim@meyering.net>
12350
12351 * src/conflicts.c (conflicts_print): Correct format string typo:
12352 use `%%' to produce literal `%'. (trivial change)
12353
12354 2004-03-30 Paul Eggert <eggert@twinsun.com>
12355
12356 * src/getargs.c (version): Update copyright year to 2004.
12357
12358 * data/c.m4 (b4_int_type): Use 'short int' rather than
12359 'short', and similarly for 'long', 'unsigned', etc.
12360 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12361 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12362 yy_yypstack, yydumpstack): Likewise.
12363 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12364 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12365 Likewise.
12366 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12367 yy_stack_print, yyparse): Likewise.
12368 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12369 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12370 * lib/bitset.c (bitset_print): Likewise.
12371 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12372 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12373 * lib/bitsetv.c (bitsetv_dump): Likewise.
12374 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12375 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12376 Likewise.
12377 * src/LR0.c (allocate_itemsets): Likewise.
12378 * src/gram.h (rule_number, rule): Likewise.
12379 * src/lalr.h (goto_number): Likewise.
12380 * src/nullable.c (nullable_compute): Likewise.
12381 * src/output.c (prepare_rules): Likewise.
12382 * src/relation.c (relation_print, relation_digraph): Likewise.
12383 * src/relation.h (relation_node): Likewise.
12384 * src/state.h (state_number, transitions, errs, reductions,
12385 struct state): Likewise.
12386 * src/symtab.h (symbol_number, struct symbol): Likewise.
12387 * src/tables.c (vector_number, tally, action_number,
12388 default_goto, goto_actions): Likewise.
12389 * tests/existing.at (GNU Cim Grammar): Likewise.
12390 * tests/regression.at (Web2c Actions): Likewise.
12391
12392 * src/output.c (muscle_insert_short_int_table): Renamed from
12393 muscle_insert_short_table. All uses changed.
12394
12395 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12396
12397 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12398 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12399 Add %expect-rr rule.
12400
12401 * src/scan-gram.l: Recognize %expect-rr.
12402
12403 * src/conflicts.h (expected_sr_conflicts): Rename from
12404 expected_conflicts.
12405 (expected_rr_conflicts): Declare.
12406
12407 * src/conflicts.c (expected_sr_conflicts): Rename from
12408 expected_conflicts.
12409 (expected_rr_conflicts): Define.
12410 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12411 for GLR parsers.
12412 Use expected_sr_conflicts in place of expected_conflicts.
12413 Warn if expected_rr_conflicts used in non-GLR parser.
12414
12415 * doc/bison.texinfo: Add documentation for %expect-rr.
12416
12417 2004-03-08 Paul Eggert <eggert@gnu.org>
12418
12419 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12420 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12421
12422 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12423 in lalr1.cc.
12424 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12425 * src/scan-gram.l (scan_integer): New function.
12426 ({int}): Use it.
12427 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12428 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12429 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12430 Say "long int", not "long", for uniformity with GNU style.
12431
12432 2004-02-25 Paul Eggert <eggert@twinsun.com>
12433
12434 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12435 compilers. This fixes a problem with Intel's C++ compiler being
12436 chatty, reported by Guido Trentalancia in
12437 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12438
12439 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12440
12441 Support %destructor and merge error locations in lalr1.cc.
12442
12443 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12444 (Parser::stos_): Define unconditionally.
12445 (Parser::destruct_): New method. Generate its body with
12446 b4_yydestruct_generate.
12447 (Parser::error_start_): New attribute.
12448 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12449 token which are discarded.
12450 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12451 error_start_ when erroneous token are discarded.
12452 (Parser::parse) <yyerrlab1>: Compute the location of the error
12453 token so that it covers all the discarded tokens.
12454 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12455 it can be called with `%skeleton "lalr1.cc"', and do that.
12456
12457 2004-02-02 Paul Eggert <eggert@twinsun.com>
12458
12459 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12460 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12461 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12462 There's no need to mention top_builddir since Automake does that
12463 for us.
12464 (INCLUDES): Remove, as Automake says it's obsolescent.
12465 Contents migrated into AM_CPPFLAGS as described above.
12466 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12467
12468 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12469
12470 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12471 (yyreportSyntaxError): Handle case where lookahead token is
12472 YYEMPTY.
12473
12474 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12475
12476 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12477 resulting parsers are compilable with C++.
12478
12479 2003-12-23 Paul Eggert <eggert@twinsun.com>
12480
12481 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12482 * src/output.c (output_skeleton): Rename local var.
12483 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12484 Bison tokens, as this runs afoul of the 2003-10-07 change that
12485 disallowed NUL bytes in character constants or string literals.
12486
12487 * tests/local.at: Require Autoconf 2.59's Autotest.
12488 * tests/testsuite.at: Don't include local.at, since we now assume
12489 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12490 including it.
12491 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12492 multiple inclusion warnings.
12493
12494 2003-12-02 Akim Demaille <akim@epita.fr>
12495
12496 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12497 conditions.
12498 From Bruno Haible.
12499
12500 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12501
12502 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12503
12504 2003-10-07 Paul Eggert <eggert@twinsun.com>
12505
12506 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12507 if testsuite doesn't exist.
12508
12509 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12510 literals, unfortunately.
12511 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12512 Complain about NUL bytes in character constants or string literals.
12513
12514 2003-10-05 Paul Eggert <eggert@twinsun.com>
12515
12516 * NEWS: Don't document %no-default-prec, as it's still
12517 too experimental.
12518 * doc/bison.texinfo: Document %no-default-prec only if
12519 the defaultprec flag is set. Normally it's not.
12520
12521 2003-10-04 Paul Eggert <eggert@twinsun.com>
12522
12523 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12524 non-modifiable lvalue, instead of a modifiable one.
12525 * doc/bison.texinfo (Actions): Document that $$ can
12526 be assigned to. Do not claim that $$ and $N are
12527 array element references: user code should not rely on this.
12528
12529 2003-10-01 Paul Eggert <eggert@twinsun.com>
12530
12531 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12532 (grammar_declaration): Use it.
12533 * src/scan-gram.l: New token %no-default-prec.
12534 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12535 * NEWS, doc/bison.texinfo: Document the above.
12536
12537 2003-10-01 Akim Demaille <akim@epita.fr>
12538
12539 VCG no longer supports long_straight_phase.
12540
12541 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12542 * src/print_graph.c (print_graph): Adjust.
12543
12544 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12545 and Paul Eggert <eggert@twinsun.com>
12546
12547 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12548 Table of Symbols): Document %default-prec.
12549 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12550 (grammar_declaration): Set default_prec on %default-prec.
12551 * src/scan-gram.l (%default-prec): New token.
12552 * src/reader.h (default_prec): New flag.
12553 * src/reader.c: Likewise.
12554 (packgram): Handle it.
12555 * tests/conflicts.at (%default-prec without %prec,
12556 %default-prec with %prec, %default-prec 1): New tests.
12557
12558 2003-09-30 Paul Eggert <eggert@twinsun.com>
12559
12560 * tests/testsuite.at: Include local.at, not input.at, fixing
12561 a typo in the 2003-08-25 patch.
12562
12563 2003-08-27 Akim Demaille <akim@epita.fr>
12564
12565 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12566 GCC warnings.
12567
12568 2003-08-26 Akim Demaille <akim@epita.fr>
12569
12570 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12571 "<\#" to avoid magic from Gnus when posting parts of this script.
12572
12573 2003-08-26 Akim Demaille <akim@epita.fr>
12574
12575 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12576 (Parser::parse): here.
12577 Adjust: nerrs and errstatus is now replaced by...
12578 (Parser::nerrs_, Parser::errstatus_): New.
12579
12580 2003-08-25 Akim Demaille <akim@epita.fr>
12581
12582 * config/announce-gen, Makefile.cfg: New.
12583 * Makefile.am: Adjust.
12584 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12585 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12586
12587 2003-08-25 Akim Demaille <akim@epita.fr>
12588
12589 When reducing initial empty rules, Bison parser read an initial
12590 location that is not defined. This results in garbage, and that
12591 affects Bison's own parser. Therefore we need (i) to extend Bison
12592 to support a means to initialize this location, and (ii) to use
12593 this CVS Bison to fix CVS Bison's parser.
12594
12595 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12596 with...
12597 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12598 * src/parse-gram.y: Adjust.
12599 (%initial-action): New.
12600 (%error-verbose): Since we require CVS Bison, there is no reason
12601 not to use it.
12602 * src/scan-gram.l: Adjust.
12603 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12604 * data/yacc.c (yyparse): Use b4_initial_action.
12605
12606 2003-08-25 Akim Demaille <akim@epita.fr>
12607
12608 * doc/bison.texinfo: Don't promote stdout for error messages.
12609
12610 2003-08-25 Akim Demaille <akim@epita.fr>
12611
12612 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12613 From Alexandre Duret-Lutz.
12614
12615 2003-08-25 Akim Demaille <akim@epita.fr>
12616
12617 Version 1.875c.
12618
12619 2003-08-25 Akim Demaille <akim@epita.fr>
12620
12621 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12622 Use them.
12623
12624 2003-08-25 Akim Demaille <akim@epita.fr>
12625
12626 * data/lalr1.cc (Parser::reduce_print_): New.
12627 Use it.
12628
12629 2003-08-25 Akim Demaille <akim@epita.fr>
12630
12631 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12632 error recovery loops. This patch is based on
12633 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12634 Also, augment the similarity between lalr1.cc and yacc.c.
12635 Note: the locations of error recovery rules are not correct yet.
12636
12637 * data/lalr1.cc: Comment changes to augment the similarity between
12638 lalr1.cc and yacc.c.
12639 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12640 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12641 yyerrlab), when hitting EOF, pop the whole stack here instead of
12642 merely falling thru the default error handling mechanism.
12643 (yyerrorlab): New label, with the old contents of YYERROR,
12644 plus the following change: pop the stack of rhs corresponding
12645 to the production that invoked YYERROR. That is how Yacc
12646 behaves (required by POSIX).
12647 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12648 fail.
12649
12650 2003-08-25 Akim Demaille <akim@epita.fr>
12651
12652 Tune local.at so that people can "autom4te -l autotest calc.at -o
12653 calc" for instance, to extract a sub test suite.
12654
12655 * tests/testsuite.at: Move the initialization, Autotest version
12656 requirement, and AT_TESTED invocation into...
12657 * tests/local.at: here.
12658 * tests/testsuite.at: Include it for compatibility with Autoconf
12659 2.57.
12660 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12661 be ignore.
12662
12663 2003-08-04 Paul Eggert <eggert@twinsun.com>
12664
12665 Rework code slightly to avoid gcc -Wtraditional warnings.
12666 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12667 The returned value is now stored in *YY0. All callers changed.
12668 * src/output.c (merge_output): Adjust to the above change.
12669
12670 2003-07-26 Paul Eggert <eggert@twinsun.com>
12671
12672 * data/glr.c (YYASSERT): New macro.
12673 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12674 yyresolveStates, yyprocessOneStack):
12675 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12676 Derived from a suggestion by Frank Heckenbach.
12677
12678 2003-07-25 Paul Eggert <eggert@twinsun.com>
12679
12680 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12681 for portability to K&R C (after ansi2knr, presumably). See
12682 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12683 by Frank Heckenbach, though I have omitted the structure-initialization
12684 part of his glr-knr.diff patch since I recall that the Portable
12685 C Compiler didn't require that change.
12686
12687 Let the user specify how to allocate and free memory.
12688 Derived from a suggestion by Frank Heckenbach in
12689 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12690 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12691 All uses of free, malloc, realloc changed to use these macros,
12692 and unnecessary casts removed.
12693 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12694
12695 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12696
12697 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12698 use s.empty() rather than s == "" to test for empty string; see
12699 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12700 (trivial change)
12701
12702 2003-06-25 Akim Demaille <akim@epita.fr>
12703
12704 * config/depcomp, config/install-sh: Update from masters.
12705
12706 2003-06-20 Paul Eggert <eggert@twinsun.com>
12707
12708 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12709 and return properly parenthesized result.
12710 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12711 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12712 Remove unnecessary parentheses from uses.
12713 * doc/bison.texinfo (Location Default Action): Describe the
12714 conventions for parentheses.
12715
12716 2003-06-19 Paul Eggert <eggert@twinsun.com>
12717
12718 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12719 yyreportTree): Do not assume that size_t is the same width as int,
12720 when printing sizes. Print sizes using an unsigned format.
12721 Problem reported by Frank Heckenbach in
12722 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12723
12724 Port to Forte Developer 7 C compiler.
12725 * data/glr.c (struct YYLTYPE): If locations are not being used,
12726 declare a single dummy member, as empty structs do not conform
12727 to the C standard.
12728 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12729 the Forte Developer 7 C compiler complains that end-of-loop
12730 code is not reached.
12731
12732 2003-06-17 Paul Eggert <eggert@twinsun.com>
12733
12734 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12735 avoid warnings from picky compilers about redefinition of PARAMS.
12736
12737 2003-06-17 Paul Eggert <eggert@twinsun.com>
12738
12739 Version 1.875b.
12740
12741 * NEWS: Document 1.875b.
12742
12743 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12744 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12745 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12746 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12747 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12748 per recent gettext manual's suggestion.
12749 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12750 Use prototypes, not old-style definitions.
12751 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12752 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12753 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12754 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12755 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12756 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12757 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12758 vbitset_or_and_cmp, vbitset_copy): Likewise.
12759
12760 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12761 Do not include <stdlib.h>.
12762 (PARAMS): Define unconditionally for C89.
12763 (ATTRIBUTE_NORETURN): Remove.
12764 (ATTRIBUTE_UNUSED): Define unconditionally.
12765
12766 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12767 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12768 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12769 * lib/vbitset.c, lib/vbitset.h: New files.
12770 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12771 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12772 from libbitset.
12773
12774 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12775 `How Can I Reset @code{yyparse}', since texinfo does not allow
12776 arbitrary @ in node names.
12777
12778 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12779 shouldn't be needed according to the gettext 0.12.1 documentation
12780 but which seem to be needed anyway: codeset.m4 glibc21.m4
12781 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12782 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12783 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12784
12785 * lib/.cvsignore: Add stdbool.h.
12786 * m4/.cvsignore: Add nls.m4, po.m4.
12787
12788 Upgrade to CVS gnulib.
12789 * stdbool_.h: File renamed from stdbool.h.in.
12790 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12791 AC_HEADER_STDBOOL.
12792 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12793 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12794 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12795 (MOSTLYCLEANFILES): New var.
12796 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12797 (stdbool.h): New rule.
12798 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12799 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12800 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12801 m4/quote.m4: Upgrade to today's gnulib.
12802
12803 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12804 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12805 the tests right now.
12806 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12807 yyerror are declared before use; C99 requires this.
12808
12809 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12810
12811 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12812 first.
12813 (yyrecoverSyntaxError): Correct the logic for setting and testing
12814 yyerrState.
12815 Correct comment on handling EOF.
12816 Allow states with only a default reduction, rather than failing
12817 (I can't quite reconstruct why these were not allowed before).
12818
12819 Fixes to avoid problem that $-N rules in GLR parsers can cause
12820 buffer overruns, corrupting state.
12821
12822 * src/output.c (prepare_rules): Output max_left_semantic_context
12823 definition.
12824 * src/reader.h (max_left_semantic_context): New variable declaration.
12825 * src/scan-gram.l (max_left_semantic_context): Define.
12826 (handle_action_dollar): Update max_left_semantic_context.
12827 * data/glr.c (YYMAXLEFT): New definition.
12828 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12829 (yyresolveAction): Ditto.
12830
12831 Fixes to problems with location handling in GLR parsers reported by
12832 Frank Heckenbach (2003/06/05).
12833
12834 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12835 (YYRHSLOC): Add parentheses, and define only if locations used.
12836 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12837 locations not used.
12838 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12839 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12840
12841 * tests/cxx-type.at: Exercise location information; update tests
12842 to differentiate output with and without locations.
12843 Remove forward declarations of yylex and yyerror---caused errors
12844 because default YYLTYPE not yet defined.
12845 Change semantic actions to compute strings, rather than printing
12846 them directly (to test proper passing of semantics values). Change
12847 output to prefix notation and update test data and expected results.
12848 (yylex): Track locations.
12849 (stmtMerge): Return value rather than printing, and include arguments
12850 in value.
12851
12852 2003-06-03 Paul Eggert <eggert@twinsun.com>
12853
12854 Avoid warnings generated by GCC 2.95.4 when Bison is
12855 configured with --enable-gcc-warnings.
12856 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12857 yy::]b4_parser_class_name[::translate_,
12858 yy::Stack::operator[] (unsigned),
12859 yy::Stack::operator[] (unsigned) const,
12860 yy::Slice::operator[] (unsigned),
12861 yy::Slice::operator[] (unsigned) const):
12862 Rename local vars to avoid warnings.
12863 * tests/glr-regression.at (Improper handling of embedded actions
12864 and $-N in GLR parsers): Remove unused local variable from yylex.
12865 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12866 (void) as arg when not pure, since we now assume C89 when building
12867 Bison. Pacify GCC by using parameter.
12868
12869 2003-06-02 Paul Eggert <eggert@twinsun.com>
12870
12871 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12872 yy::Location::lines, yy::Location::columns): Rename arguments
12873 to avoid shadowing; this removes a warning generated by GCC 3.3.
12874
12875 2003-06-01 Paul Eggert <eggert@twinsun.com>
12876
12877 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12878 to g++, as GCC 3.3 complains if you do it.
12879 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12880 everything that WARNING_CFLAGS has, except omit warnings
12881 not suitable for C++.
12882 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12883 * tests/atlocal.in (CXXFLAGS): New var.
12884 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12885
12886 Fix a GLR parser bug I reported in February; see
12887 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12888 The problem was that GLR parsers did not conform to the C standard,
12889 because actions like { $1 = $2 + $3; } expanded to expressions
12890 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12891 to a local variable. The C standard says that expressions
12892 like (var = f ()) + (var = f ()) have undefined behavior.
12893 Another problem was that GCC sometimes issues warnings that
12894 yyfill and its parameters are unused.
12895
12896 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12897 as possibly unused.
12898 (yyfill): New function.
12899 (YYFILL): Use it.
12900 (yyuserAction): Change type of yynormal to bool, so that it matches
12901 the new yyfill signature. Mark it as possibly unused.
12902
12903
12904 Follow up on a bug I reported in February, where a Bison-generated
12905 parser can loop. Provide a test case and a fix for yacc.c. I
12906 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12907 The original bug report is in:
12908 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12909
12910 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12911 macro's size was becoming unwieldy.
12912 (yyerrlab): Do not discard an empty lookahead symbol, as this
12913 might destroy garbage.
12914 (yyerrorlab): New label, with the old contents of YYERROR,
12915 plus the following change: pop the stack of rhs corresponding
12916 to the production that invoked YYERROR. That is how Yacc
12917 behaves, and POSIX requires this behavior.
12918 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12919 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12920 Define 'alarm' to do nothing if unistd.h is not available.
12921 Add a new rule "exp: '-' error;" to test the above change to
12922 data/yacc.c. Use 'alarm' to abort any test taking longer than
12923 10 seconds, as it's probably looping.
12924 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12925 Also, the new yacc.c generates two fewer diagnostics for an
12926 existing test.
12927
12928 2003-05-24 Paul Eggert <eggert@twinsun.com>
12929
12930 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12931 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12932 This fixes a problem reported by John Bowman when the Compaq/HP
12933 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12934 -ansi -Wall -gall).
12935 * data/yacc.c (union yyalloc): Likewise.
12936 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12937
12938 Switch from 'int' to 'bool' where that makes sense.
12939
12940 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12941 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12942 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12943 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12944 Return or accept bool, not int. All callers changed.
12945 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12946 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12947 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12948 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12949 bitset_or_and_cmp_): Likewise.
12950 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12951 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12952 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12953 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12954 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12955 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12956 bitset_stats_or_and_cmp): Likewise.
12957 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12958 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12959 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12960 ebitset_xor_cmp): Likewise.
12961 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12962 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12963 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12964 lbitset_xor_cmp): Likewise.
12965 * lib/bbitset.h: Include <stdbool.h>.
12966 (struct bitset_vtable): The following members now return bool, not
12967 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12968 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12969 or_and_cmp).
12970 * src/conflicts.c (count_rr_conflicts): Likewise.
12971 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12972 All uses changed.
12973 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12974 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12975 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12976 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12977 graph_flag): Likewise.
12978 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12979 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12980 graph_flag): Likewise.
12981 * src/output.c (error_verbose): Likewise.
12982 * src/output.h (error_verbose): Likewise.
12983 * src/reader.c (start_flag, typed): Likewise.
12984 * src/reader.h (typed): Likewise.
12985 * src/getargs.c (LOCATIONS_OPTION): New constant.
12986 (long_options, getargs): Use it.
12987 * src/lalr.c (build_relations): Use bool, not int.
12988 * src/nullable.c (nullable_compute): Likewise.
12989 * src/print.c (print_reductions): Likewise.
12990 * src/tables.c (action_row, pack_vector): Likewise.
12991 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12992 * src/output.c (prepare): Use it.
12993 * src/output.c (token_definitions_output,
12994 symbol_destructors_output, symbol_destructors_output): Use string,
12995 not boolean integer, to keep track of whether to output separator.
12996 * src/print_graph.c (print_core): Likewise.
12997 * src/state.c (state_rule_lookaheads_print): Likewise.
12998
12999 * config/install-sh: Sync from automake 1.7.5.
13000
13001 2003-05-14 Paul Eggert <eggert@twinsun.com>
13002
13003 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13004 semicolon after a grammar declaration, in the interest of possible
13005 future changes to the Bison input language.
13006 Do not allow a stray semicolon at the start of the grammar.
13007 (rhses.1): Allow one or more semicolons after any rule, including
13008 just before "|" as required by POSIX.
13009 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13010 grammar.
13011
13012 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13013
13014 %parse-param support for lalr1.cc.
13015
13016 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13017 b4_cc_constructor_calls, b4_cc_constructor_call,
13018 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13019 definitions.
13020 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13021 parse-param arguments.
13022 (yy::b4_parser_class_name): Declare instance variables to
13023 hold parse-param arguments.
13024 * tests/calc.at: s/value/semantic_value/ because value clashes
13025 with a member of yy::b4_parser_class_name. Adjust C++ code
13026 to handle %parse-param. Enable %parse-param test in C++.
13027
13028 2003-05-12 Paul Eggert <eggert@twinsun.com>
13029
13030 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13031 English a bit. Fix fclose typo. Change "const char" to "char
13032 const", and use ANSI C rather than K&R for "main". Suggest
13033 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13034 and suggest yy_switch_to_buffer.
13035
13036 2003-05-05 Paul Eggert <eggert@twinsun.com>
13037
13038 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13039 C89. This avoids a diagnostic on compilers that define __STDC__
13040 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13041 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13042
13043 2003-05-03 Paul Eggert <eggert@twinsun.com>
13044
13045 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13046 Do not overrun array bounds.
13047 This should fix a bug reported today by Olatunji Oluwabukunmi in
13048 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13049
13050 2003-04-29 Akim Demaille <akim@epita.fr>
13051
13052 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13053 * src/getargs.c, src/getargs.h: here, as bool, not int.
13054 (nondeterministic_parser): New.
13055 * src/parse-gram.y, src/scan-gram.l: Support
13056 %nondeterministic-parser.
13057 * src/output.c (prepare): Use nondeterministic_parser instead
13058 of glr_parser where appropriate.
13059 * src/tables.c (conflict_row, action_row, save_row)
13060 (token_actions, token_actions, pack_vector): Ditto.
13061
13062 2003-04-29 Akim Demaille <akim@epita.fr>
13063
13064 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13065
13066 2003-04-29 Akim Demaille <akim@epita.fr>
13067
13068 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13069 with %pure-parser and %locations to exercise the patch from Yakov
13070 Markovitch below.
13071
13072 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13073
13074 * data/yacc.c: (b4_lex_param): Corrected for the case where
13075 %lex-param is provided and %pure-parser isn't.
13076
13077 2003-04-27 Paul Eggert <eggert@twinsun.com>
13078
13079 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13080 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13081 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13082 if it is not defined.
13083 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13084
13085 2003-04-26 Paul Eggert <eggert@twinsun.com>
13086
13087 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13088 Declare to be of type suitable for the ninf value itself, not of
13089 type suitable for the corresponding table, since the latter might
13090 be unsigned but the ninf value might be negative. This fixes a
13091 bug reported by Alexandre Duret-Lutz in
13092 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13093
13094 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13095 invokes it. We shouldn't invoke it twice because it will attempt
13096 to put error.o in the archive twice. This fixes a glitch reported
13097 by Martin Mokrejs in
13098 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13099
13100 2003-04-21 Paul Eggert <eggert@twinsun.com>
13101
13102 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13103 to gnulib.
13104
13105 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13106
13107 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13108 Fix obvious typo that results in uncompilable GLR parsers
13109 when both %pure-parser and %locations are used. (trivial change)
13110
13111 2003-04-17 Paul Eggert <eggert@twinsun.com>
13112
13113 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13114 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13115 Do not insert the expected token via unput, as this runs afoul
13116 of a POSIX-compatibility bug in flex 2.5.31.
13117 All uses changed to BEGIN the parent state,
13118 since we no longer insert the expected token via unput.
13119 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13120 that is no longer emitted after the above change.
13121
13122 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13123 the first one. This change is from Paul Hilfinger, and it fixes
13124 regression reported by Werner Lemberg in
13125 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13126
13127 (resolve_sr_conflict): Don't invoke state_errs_set
13128 unless one or more tokens have been explicitly made errors.
13129 Otherwise, the above change causes Bison to abort.
13130
13131 * tests/existing.at (GNU pic Grammar): New test case, taken from
13132 Lemberg's email.
13133
13134 2003-03-31 Akim Demaille <akim@epita.fr>
13135
13136 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13137
13138 2003-03-31 Akim Demaille <akim@epita.fr>
13139
13140 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13141 output.
13142
13143 2003-03-31 Akim Demaille <akim@epita.fr>
13144
13145 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13146 From Paul Hilfinger.
13147
13148 2003-03-29 Akim Demaille <akim@epita.fr>
13149
13150 * m4/error.m4: Do not put under dynamic conditions some code which
13151 expansion is under static control.
13152
13153 2003-03-29 Akim Demaille <akim@epita.fr>
13154
13155 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13156
13157 2003-03-29 Akim Demaille <akim@epita.fr>
13158
13159 * doc/bison.texinfo (Strings are Destroyed): New.
13160
13161 2003-03-13 Paul Eggert <eggert@twinsun.com>
13162
13163 * .cvsignore: Add configure.lineno.
13164 * src/.cvsignore: Add yacc.
13165 * tests/.cvsignore: Add testsuite.log.
13166 * doc/fdl.texi: Sync with latest FSF version.
13167
13168 2003-03-12 Paul Eggert <eggert@twinsun.com>
13169
13170 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13171 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13172 cursor, instead of leaving it undefined. This fixes a bug
13173 reported by Tim Van Holder in
13174 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13175 * tests/input.at (Torturing the Scanner): Test the scanner on
13176 an empty input file, which was Tim Van Holder's test case.
13177
13178 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13179 <sys/resource.h> can be included, include sys/time.h and
13180 sys/times.h first, if available. This works around the SunOS
13181 4.1.4 porting bug reported by Bruce Becker in
13182 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13183
13184 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13185 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13186 AC_HEADER_SYS_WAIT.
13187
13188 Merge changes from gnulib. This was prompted because the CVS
13189 snapshot didn't build on Solaris 7 due to strnlen problems.
13190
13191 These changes need to be merged back into gnulib:
13192 * lib/hash.c: Include <stdbool.h> unconditionally.
13193 * m4/onceonly.m4 (m4_quote): New macro.
13194 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13195 Quote AC_FOREACH variable-expansions properly.
13196 The 2003-01-03 obstack.h change also needs merging.
13197 {end of changes requiring merging}
13198
13199 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13200 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13201 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13202 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13203 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13204 New files, imported from gnulib.
13205 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13206 above.
13207
13208 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13209 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13210 gnulib sources.
13211
13212 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13213 Add.
13214 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13215 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13216 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13217 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13218 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13219 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13220 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13221 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13222 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13223 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13224 (jm_PREREQ_ARGMATCH): Remove.
13225 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13226 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13227
13228 * src/system.h: Include <stdbool.h> unconditionally.
13229
13230 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13231 assuming at least C89 in the bitset code for some time now.
13232
13233 2003-03-03 Akim Demaille <akim@epita.fr>
13234
13235 * ro.po: New.
13236
13237 2003-03-02 Akim Demaille <akim@epita.fr>
13238
13239 * doc/bison.texinfo (Table of Symbols): Reactivate the
13240 documentation for %lex-param, and %parse-param.
13241
13242 2003-03-02 Akim Demaille <akim@epita.fr>
13243
13244 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13245 generate verbose error messages.
13246 Use the number of tokens as an upper bound in yytname, as it
13247 cannot be a non terminal.
13248
13249 2003-03-02 Akim Demaille <akim@epita.fr>
13250
13251 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13252 message.
13253
13254 2003-03-02 Akim Demaille <akim@epita.fr>
13255
13256 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13257 Use them to exercise yycheck overrun.
13258 Based on Andrew Suffield's grammar.
13259
13260 2003-03-02 Akim Demaille <akim@epita.fr>
13261
13262 Create tests/local.at for Bison generic testing macros.
13263
13264 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13265 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13266 This new file.
13267 * tests/calc.at (AT_CHECK_CALC): Adjust.
13268 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13269 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13270 * tests/local.at: here.
13271 (AT_COMPILE_CXX): Tags the tests using it as c++.
13272 Ignore the test if CXX is not functional.
13273
13274 2003-03-01 Paul Eggert <eggert@twinsun.com>
13275
13276 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13277 not loc->end, since loc->end might contain garbage and this leads
13278 to undefined behavior on some platforms.
13279 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13280 depend on *loc, so that the reader doesn't give the the false
13281 impression that *loc is initialized.
13282 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13283 does not survive the return.
13284
13285 2003-03-01 Akim Demaille <akim@epita.fr>
13286
13287 * src/scan-gram.l (code_start): Always initialize it when entering
13288 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13289 yylex invocation. An alternative would be making it static, but
13290 then it starts with the second %%'s beginning, instead of its end.
13291
13292 2003-02-28 Paul Eggert <eggert@twinsun.com>
13293
13294 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13295 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13296 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13297
13298 2003-02-26 Paul Eggert <eggert@twinsun.com>
13299
13300 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13301 Remove Sequent/Pyramid discussion (nobody uses them any more).
13302 Merge VMS and MS-DOS discussion; these ports may well be dead
13303 but let's keep mentioning them for now. Put <> around email
13304 addresses. Add copyright notice.
13305
13306 2003-02-24 Paul Eggert <eggert@twinsun.com>
13307
13308 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13309 to avoid collision with flex use of yylineno.
13310 Problem reported by Bruce Lilly in
13311 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13312 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13313 * data/yacc.c (yy_reduce_print): Likewise.
13314
13315 * config/depcomp: Sync with Automake 1.7.3.
13316
13317 2003-02-21 Akim Demaille <akim@epita.fr>
13318
13319 * data/lalr1.cc: Use temporary variables instead of casts to
13320 change integer types.
13321 Suggested by Paul Eggert.
13322
13323 2003-02-21 Akim Demaille <akim@epita.fr>
13324
13325 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13326 to avoid confusions with lalr1.cc's notion of Position.
13327 Suggested by Paul Eggert.
13328
13329 2003-02-20 Akim Demaille <akim@epita.fr>
13330
13331 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13332 before initial_columns.
13333 (location.hh): Use consistent variable names when defining the
13334 operator<<.
13335 Use "last" so that we subtract from Positions, not from unsigned.
13336
13337 2003-02-20 Akim Demaille <akim@epita.fr>
13338
13339 * data/lalr1.cc (position.hh): New subfile, including the extended
13340 and Doxygen'ed documentation of class Position.
13341 (location.hh): Use it.
13342 Document a` la Doxygen.
13343 With the help of Benoit Perrot.
13344
13345 2003-02-20 Akim Demaille <akim@epita.fr>
13346
13347 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13348 AT_YACC_IF.
13349 Redefine AT_YYERROR_SEES_LOC_IF using it.
13350 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13351 not defined.
13352 Don't use the location in yy::Parser::error_ and
13353 yy::Parser::print_ when not %locations.
13354 Activate more lalr1.cc tests.
13355
13356 2003-02-19 Akim Demaille <akim@epita.fr>
13357
13358 * data/lalr1.cc: When displaying a line number, be sure to make it
13359 an int.
13360
13361 2003-02-19 Akim Demaille <akim@epita.fr>
13362
13363 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13364 Remove, useless.
13365 (YYABORT, YYACCEPT, YYERROR): New.
13366 * tests/calc.at: Renable the lalr1.cc test.
13367
13368 2003-02-19 Akim Demaille <akim@epita.fr>
13369
13370 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13371 error recovery, mixing with/without pops and discarding of the
13372 lookahead.
13373 Exercise YYERROR.
13374 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13375
13376 2003-02-17 Paul Eggert <eggert@twinsun.com>
13377
13378 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13379 * tests/testsuite.at (AT_COMPILE): Use them.
13380 This fixes the testsuite problem reported by Robert Lentz in
13381 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13382
13383 2003-02-12 Paul Eggert <eggert@twinsun.com>
13384
13385 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13386 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13387 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13388 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13389 Check for malloc failure, for consistency with yacc.c.
13390 (yytname_size): Remove, for consistency with yacc.c.
13391
13392 The bug still remains in data/lalr1.cc, as I didn't have time
13393 to fix it there.
13394
13395 2003-02-06 Akim Demaille <akim@epita.fr>
13396
13397 * configure.ac (GXX): Rename as...
13398 (CXX): this, to keep the original Autoconf semantics.
13399 Require 2.57.
13400 * data/lalr1.cc: Fix b4_copyright invocations.
13401 If YYDEBUG is not defined, don't depend upon name_ being defined.
13402 (location.hh): Include string and iostream.
13403 (Position::filename): New member.
13404 (Position::Position ()): New.
13405 (operator<< (Position)): New.
13406 (operator- (Position, int)): New.
13407 (Location::first, Location::last): Rename as...
13408 (Location::begin, Location::end): these, to mock the conventional
13409 iterator names.
13410 (operator<< (Location)): New.
13411 * tests/atlocal.in (CXX): New.
13412 * tests/testsuite.at (AT_COMPILE_CXX): New.
13413 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13414 locations in a more synthetic way.
13415 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13416 lalr1.cc is used.
13417 Adjust the C locations to match those from Emacs: first column is
13418 column 0.
13419 Change all the expected results.
13420 Conform to the GCS: simplify the locations when applicable.
13421 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13422 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13423 these CPP macros with the m4 macros new defined by...
13424 (AT_CHECK_PUSHDEFS): this, i.e.:
13425 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13426 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13427 New macros.
13428 (AT_CHECK_POPDEFS): Undefine them.
13429 (AT_CHECK_CALC_LALR1_CC): New.
13430 Use it for the first lalr1.cc test.
13431
13432 2003-02-04 Akim Demaille <akim@epita.fr>
13433
13434 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13435 Location as is defined.
13436
13437 2003-02-04 Akim Demaille <akim@epita.fr>
13438
13439 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13440 name_ being defined.
13441
13442 2003-02-03 Paul Eggert <eggert@twinsun.com>
13443
13444 * src/gram.h (start_symbol): Remove unused decl.
13445
13446 Use more-consistent naming conventions for local vars.
13447
13448 * src/derives.c (derives_compute): Change type of local var from
13449 int to rule_number.
13450 * src/gram.c (grammar_rules_partial_print): Likewise.
13451 * src/print.c (print_core): Likewise.
13452 * src/reduce.c (reduce_grammar_tables): Likewise.
13453
13454 * src/gram.c (grammar_dump): Change name of item_number *
13455 local var from r to rp.
13456 * src/nullable.c (nullable_compute): Likewise.
13457
13458 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13459
13460 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13461 for symbol or symbol_number var.
13462 * src/reader.c (grammar_start_symbol_set): Likewise.
13463 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13464 Likewise.
13465 * src/state.c (transitions_to): Likewise.
13466 * src/state.h: Likewise.
13467 * src/tables.c (symbol_number_to_vector_number): Likewise.
13468
13469 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13470 char * var.
13471
13472 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13473 var.
13474
13475 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13476 var.
13477
13478 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13479 Use str, not s, for char * var. Use ch, not c, for character var.
13480 Use size for size var.
13481
13482 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13483 char * var.
13484 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13485 uniqstr var.
13486 * src/uniqstr.h: Likewise.
13487
13488 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13489 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13490 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13491 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13492 param to have same name as that of enum, so that we don't use
13493 "s" to stand for a non-state.
13494
13495 2003-02-02 Akim Demaille <akim@epita.fr>
13496
13497 * src/scan-skel.l: Scan more than one inert character per yylex
13498 invocation.
13499
13500 2003-02-01 Paul Eggert <eggert@twinsun.com>
13501
13502 Version 1.875a.
13503
13504 * po/LINGUAS: Add ms.
13505
13506 2003-01-30 Akim Demaille <akim@epita.fr>
13507
13508 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13509
13510 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13511
13512 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13513 of $1.
13514
13515 Changes in response to error report by S. Eken: GLR mode does not
13516 handle negative $ indices or $ indices in embedded rules correctly.
13517 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13518
13519 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13520 (b4_rhs_location): Ditto.
13521 (yyfill): New function to copy from stack tree into array
13522 incrementally.
13523 (yyuserAction): Modify to allow incremental move of semantic values
13524 to rhs array when in GLR mode.
13525 Define YYFILL to use in user-defined actions to fill semantic array
13526 as needed.
13527 Remove dummy use of yystack, as there is now a guaranteed use.
13528 (yydoAction): Modify to allow incremental move of semantic values
13529 to rhs array when in GLR mode.
13530 (yyresolveAction): Ditto.
13531 (yyglrShiftDefer): Update comment.
13532 (yyresolveStates): Use X == NULL for pointers, not !X.
13533 (yyglrReduce): Ditto.
13534 (yydoAction): Ditto
13535
13536 * tests/glr-regr1.at: Rename to ...
13537 * tests/glr-regression.at: Add new regression test for the problems
13538 described above (adapted from S. Eken).
13539 Update copyright notice.
13540 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13541 * tests/Makefile.am: Ditto.
13542
13543 2003-01-28 Paul Eggert <eggert@twinsun.com>
13544
13545 * data/lalr1.cc: Do not use @output_header_name@ unless
13546 b4_defines_flag is set. This fixes two bugs reported by
13547 Tim Van Holder in
13548 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13549 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13550
13551 2003-01-21 Paul Eggert <eggert@twinsun.com>
13552
13553 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13554 we don't need to worry about yyerrlab1 being reported as an
13555 "unused label" by non-GCC C compilers. The downside is that if
13556 locations are used then a couple of statements are duplicated each
13557 time YYERROR is invoked, but the upside is that the warnings
13558 should vanish.
13559 (yyerrlab1): Move code to YERROR.
13560 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13561 This reverts some of the 2002-12-27 change.
13562
13563 2003-01-17 Paul Eggert <eggert@twinsun.com>
13564
13565 * src/output.c (symbol_printers_output): Fix typo that led
13566 to core dump. Problem reported by Antonio Rus in
13567 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13568
13569 2003-01-13 Akim Demaille <akim@epita.fr>,
13570 Quoc Peyrot <chojin@lrde.epita.fr>,
13571 Robert Anisko <anisko_r@lrde.epita.fr>
13572
13573 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13574 when the stacks contain one element, as the loop would otherwise
13575 free the last state, and then use the top state (the one we just
13576 popped). This means that the initial elements will not be freed
13577 explicitly, as is the case in yacc.c; it is not a problem, as
13578 these elements have fake values.
13579
13580 2003-01-11 Paul Eggert <eggert@twinsun.com>
13581
13582 * NEWS: %expect-violations are now just warnings, reverting
13583 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13584 bootstrapping problem reported by Matthias Klose; see
13585 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13586 * src/conflicts.c (conflicts_print): Likewise.
13587 * tests/conflicts.at (%expect not enough, %expect too much,
13588 %expect with reduce conflicts): Likewise.
13589 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13590 that the warning is enabled if the number of conflicts changes
13591 (not necessarily increases).
13592
13593 * src/getargs.c (version): Update copyright year.
13594
13595 2003-01-09 Akim Demaille <akim@epita.fr>
13596
13597 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13598
13599 2003-01-08 Paul Eggert <eggert@twinsun.com>
13600
13601 * Makefile.maint (WGETFLAGS):
13602 New macro, containing "-C off" to disable proxy caches.
13603 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13604 (rel-check): Use $(WGET) instead of wget.
13605
13606 2003-01-06 Paul Eggert <eggert@twinsun.com>
13607
13608 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13609 the GLR paper of Scott, Johnstone and Hussain.
13610
13611 2003-01-04 Paul Eggert <eggert@twinsun.com>
13612
13613 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13614 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13615 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13616 (EXTRA_LIBRARIES): New var, for liby.a.
13617 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13618 (EXTRA_SCRIPTS): New var, for yacc.
13619
13620 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13621 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13622 Problem reported by Nelson H. F. Beebe.
13623
13624 2003-01-03 Paul Eggert <eggert@twinsun.com>
13625
13626 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13627 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13628 when compiling Bison 1.875's `bitset bset = obstack_alloc
13629 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13630
13631 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13632 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13633 grow to a huge size with typical invocation.
13634
13635 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13636 Use the pattern recommended by Autoconf 2.57, except also protect
13637 against double-definition.
13638 * src/system.h: Likewise.
13639 Portability issues reported by Nelson H. F. Beebe.
13640
13641 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13642 All uses changed. Provide a definition in both C and C++.
13643 (yytrue, yyfalse): Define even if defined (__cplusplus).
13644
13645 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13646 Reported by Nelson H. F. Beebe.
13647
13648 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13649
13650 2003-01-02 Paul Eggert <eggert@twinsun.com>
13651
13652 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13653 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13654 Bug reported by Nelson H. F. Beebe.
13655
13656 2003-01-01 Paul Eggert <eggert@twinsun.com>
13657
13658 * Version 1.875.
13659
13660 2002-12-30 Paul Eggert <eggert@twinsun.com>
13661
13662 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13663 Moved here from...
13664 (<INITIAL>","): Here. This causes stray "," to be treated
13665 more uniformly.
13666
13667 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13668 last brace in braced code when not in Yacc mode, for compatibility
13669 with Bison 1.35. This resurrects the 2001-12-15 patch to
13670 src/reader.c.
13671
13672 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13673 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13674
13675 2002-12-28 Paul Eggert <eggert@twinsun.com>
13676
13677 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13678 that of SYM's type. This fixes Debian bug 168069, reported by
13679 Thomas Olsson.
13680
13681 2002-12-28 Paul Eggert <eggert@twinsun.com>
13682
13683 Version 1.75f.
13684
13685 Switch back to the Yacc style of conflict reports, undoing some
13686 of the 2002-07-30 change.
13687 * doc/bison.texinfo (Understanding): Use Yacc style for
13688 conflict reports. Also, use new way of locating rules.
13689 * src/conflicts.c (conflict_report):
13690 Renamed from conflict_report_yacc, removing the old
13691 'conflict_report'. Translate the entire conflict report at once,
13692 so that we don't assume that "," has the same interpretation in
13693 all languages.
13694 (conflicts_output): Use Yacc-style conflict report for each state,
13695 instead of our more-complicated style.
13696 (conflicts_print): Use Yacc-style conflict report, except print
13697 the input file name when not emulating Yacc.
13698 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13699 Conflicted Reduction, %expect not enough, %expect too much,
13700 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13701 * tests/existing.at (GNU Cim Grammar): Likewise.
13702 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13703
13704 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13705 fatal): Don't invoke fflush; it's not needed and it might even be
13706 harmful for stdout, as stdout might not be open.
13707 * src/reduce.c (reduce_print): Likewise.
13708
13709 2002-12-27 Paul Eggert <eggert@twinsun.com>
13710
13711 Fix a bug where error locations were not being recorded correctly.
13712 This problem was originally reported by Paul Hilfinger in
13713 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13714
13715 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13716 top of the location stack's error locations.
13717 (yyerrlab): Set it. When discarding a token, push its location
13718 onto yylerrsp so that we don't lose track of the error's end.
13719 (yyerrlab1): Now is only the target of YYERROR, so that we can
13720 properly record the location of the action that failed. For GCC
13721 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13722 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13723 (yyerrlab2): New label, which yyerrlab now falls through to.
13724 Compute the error's location by applying YYLLOC_DEFAULT to
13725 the locations of all the symbols that went into the error.
13726 * doc/bison.texinfo (Location Default Action): Mention that
13727 YYLLOC_DEFAULT is also invoked for syntax errors.
13728 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13729 Error locations include the locations of all the tokens that were
13730 discarded, not just the last token.
13731
13732 2002-12-26 Paul Eggert <eggert@twinsun.com>
13733
13734 * src/files.c: Include quote.h.
13735 (compute_output_file_names): Warn if we detect conflicting
13736 outputs to the same file. This should catch the misunderstanding
13737 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13738
13739 * src/conflicts.c (conflicts_print): If the user specifies
13740 "%expect N", report an error if there are any reduce/reduce
13741 conflicts. This is what the manual says should happen.
13742 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13743 * tests/conflicts.at (%expect with reduce conflicts): New test.
13744
13745 Don't use m4_include on relative file names, as it doesn't work as
13746 desired if there happens to be a file with that name under ".".
13747
13748 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13749 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13750 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13751 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13752 * src/output.c (output_skeleton): Use full path names when
13753 specifying a file to include; don't rely on include path, as
13754 it's unreliable when the working file contains a file with
13755 that name.
13756
13757 2002-12-25 Paul Eggert <eggert@twinsun.com>
13758
13759 Remove obsolete references to bison.simple and bison.hairy.
13760 Problem mentioned by Aubin Mahe in
13761 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13762 * data/glr.c: Comment fix.
13763 * doc/bison.1: Remove references. Also, mention "yacc".
13764
13765 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13766 with -g option.
13767
13768 * src/parse-gram.y (declaration): Use enum "report_states" rather
13769 than its numeric value 1.
13770
13771 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13772 opening a new one. This fixes Debian bug 165349, reported by
13773 Bruce Stephens.
13774
13775 2002-12-24 Paul Eggert <eggert@twinsun.com>
13776
13777 Version 1.75e.
13778
13779 * Makefile.maint (cvs-update): Don't assume that the shell
13780 supports $(...), as Solaris sh doesn't.
13781
13782 * src/parse-gram.y (lloc_default): Remove test for empty
13783 nonterminals at the end, since it didn't change the result.
13784
13785 2002-12-24 Paul Eggert <eggert@twinsun.com>
13786
13787 If the user does not define YYSTYPE as a macro, Bison now declares it
13788 using typedef instead of defining it as a macro. POSIX requires this.
13789 For consistency, YYLTYPE is also declared instead of defined.
13790
13791 %union directives can now have a tag before the `{', e.g., the
13792 directive `%union foo {...}' now generates the C code
13793 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13794 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13795 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13796 instead of `yyltype'.
13797
13798 `yystype' and `yyltype' are now obsolescent macros instead of being
13799 typedefs or tags; they are no longer documented and will be
13800 withdrawn in a future release.
13801
13802 * data/glr.c (b4_location_type): Remove.
13803 (YYSTYPE): Renamed from yystype.
13804 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13805 (struct YYLTYPE): Renamed from struct yyltype.
13806 (YYLTYPE): Renamed from yyltype.
13807 (yyltype, yystype): New (and obsolescent) macros,
13808 for backward compatibility.
13809 * data/yacc.c: Likewise.
13810
13811 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13812 does not specify a union tag. This is for compatibility with
13813 Solaris 9 yacc.
13814
13815 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13816 const *, since it is now modified by stripping surrounding { }.
13817 (current_braced_code): Remove.
13818 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13819 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13820 trailing " {...}". Now of type <chars>.
13821 (grammar_declaration): Adjust to bundled tokens.
13822 (code_content): Remove; stripping is now done by add_param.
13823 (print_token_value): Print contents of bundled tokens.
13824 (token_name): New function.
13825
13826 * src/reader.h (braced_code, current_braced_code): Remove.
13827 (token_name): New decl.
13828
13829 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13830 token_type, not braced_code code_kind. All uses changed.
13831 (SC_PRE_CODE): New state, for scanning after a keyword that
13832 has (or usually has) an immediately-following braced code.
13833 (token_type): New local var, to keep track of which token type
13834 to return when scanning braced code.
13835 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13836 <INITIAL>"%parse-param", <INITIAL>"%printer",
13837 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13838 instead of returning a token type immediately.
13839 (<INITIAL>"{"): Set token type.
13840 (<SC_BRACED_CODE>"}"): Use it.
13841 (handle_action_dollar, handle_action_at): Now returns bool
13842 indicating success. Fail if ! current_rule; this prevents a core dump.
13843 (handle_symbol_code_dollar, handle_symbol_code_at):
13844 Remove; merge body into caller.
13845 (handle_dollar, handle_at): Complain in invalid contexts.
13846
13847 * NEWS, doc/bison.texinfo: Document the above.
13848 * NEWS: Fix years and program names in copyright notice.
13849
13850 2002-12-17 Paul Eggert <eggert@twinsun.com>
13851
13852 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13853 Reporting, Table of Symbols): Omit mentions of %lex-param and
13854 %parse-param from the documentation for now.
13855
13856 2002-12-15 Paul Eggert <eggert@twinsun.com>
13857
13858 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13859 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13860 lookahead symbol, and which sets yychar in parser actions) and it
13861 disagreed with the Bison documentation. Bug
13862 reported by Andrew Walrond.
13863
13864 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13865 as the caller now does that.
13866 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13867 (YYEMPTY): Parenthesize right hand side, since others use it.
13868 (yyparse): Don't assume that our generated code is the only code
13869 that sets yychar.
13870
13871 2002-12-13 Paul Eggert <eggert@twinsun.com>
13872
13873 Version 1.75d.
13874
13875 POSIX requires a "yacc" command.
13876 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13877 (MOSTLYCLEANFILES): Add yacc.
13878 (yacc): New rule.
13879 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13880 as an alias for bison y.
13881
13882 * po/LINGUAS: Add da.
13883
13884 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13885 problem with latest <getopt.h>.
13886 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13887
13888 * doc/fdl.texi: Upgrade to 1.2.
13889 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13890 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13891 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13892 gnulib.
13893 * config/install-sh: Sync with autotools.
13894
13895 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13896 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13897 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13898 locations are requested.
13899 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13900 locations are requested.
13901
13902 2002-12-12 Paul Eggert <eggert@twinsun.com>
13903
13904 Remove unportable casts and storage allocation tricks.
13905 While we're at it, remove almost all casts, since they
13906 usually aren't needed and are a sign of trouble.
13907
13908 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13909
13910 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13911 the pointer DSET returned by malloc; this isn't portable.
13912 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13913 Similarly for DERIVES.
13914 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13915 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13916 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13917
13918 * src/derives.c (derives_compute): Do not bother invoking
13919 int_of_rule_number, since rule numbers are integers.
13920
13921 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13922 rather than XMALLOC (char, N).
13923
13924 * src/files.c (filename_split): Rewrite to avoid cast.
13925
13926 * src/gram.h (symbol_number_as_item_number,
13927 item_number_as_symbol_number, rule_number_as_item_number,
13928 item_number_as_rule_number):
13929 Now inline functions rather than macros, to avoid casts.
13930 * src/state.h (state_number_as_int): Likewise.
13931 * src/tables.c (state_number_to_vector_number,
13932 symbol_number_to_vector_number): Likewise.
13933
13934 * src/gram.h (int_of_rule_number): Remove; no longer used.
13935
13936 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13937 since the resulting storage is always stored into.
13938
13939 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13940 where it's needed.
13941
13942 * src/muscle_tab.c (muscle_m4_output):
13943 Now inline. Return bool, not int.
13944 * src/state.c (state_compare): Likewise.
13945 * src/symtab.c (symbol_check_defined,
13946 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13947 hash_compare_symbol, hash_symbol):
13948 Likewise.
13949 * src/uniqstr.c (uniqstr_print): Likewise.
13950 * src/muscle_tab.c (muscle_m4_output_processor):
13951 New function, to avoid casts.
13952 * src/state.c (state_comparator, stage_hasher): Likewise.
13953 * src/symtab.c (symbol_check_defined_processor,
13954 symbol_check_alias_consistency_processor, symbol_pack_processor,
13955 symbol_translation_processor, hash_symbol_comparator,
13956 hash_symbol_hasher): Likewise.
13957 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13958 * src/muscle_tab.c (muscles_m4_output):
13959 Use new functions instead of casting old functions unportably.
13960 * src/state.c (state_hash_new): Likewise.
13961 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13962 symbols_token_translations_init):
13963 Likewise.
13964 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13965
13966 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13967 var instead of casting to long, to avoid casts.
13968 (prepare_states): Use MALLOC rather than alloca, so that we don't
13969 have to worry about alloca.
13970 * src/state.c (state_hash_lookup): Likewise.
13971
13972 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13973 local var instead of casting to unsigned char, to avoid casts.
13974
13975 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13976 STATE_ALLOC): Remove.
13977 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13978 rather than calloc, and use offsetof to avoid allocating slightly
13979 too much storage.
13980 (state_new): Initialize all members.
13981
13982 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13983
13984 * src/symtab.c (symbol_free): Remove; unused.
13985 (symbol_get): Remove cast in lhs of assignment.
13986 (symbols_do): Now static. Accept generic arguments, not
13987 hashing-related ones.
13988
13989 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13990 (symbol_processor): Remove.
13991 (symbols_do): Remove decl; now static.
13992
13993 * src/system.h (alloca): Remove; decl no longer needed.
13994 (<stddef.h>): Include, for offsetof.
13995 (<inttypes.>, <stdint.h>): Include if available.
13996 (uintptr_t): New type, if system lacks it.
13997 (CALLOC, MALLOC, REALLOC): New macros.
13998 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13999 new macros.
14000
14001 * src/tables.c (table_size): Now int, to pacify GCC.
14002 (table_grow, table_ninf_remap): Use signed table size.
14003 (save_row): Don't bother initializing locals when not needed.
14004 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14005 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14006
14007 * src/vcg.h: Correct misspellings.
14008
14009 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14010
14011
14012 * src/getargs.c (getargs): Don't assume EOF == -1.
14013
14014 2002-12-09 Paul Eggert <eggert@twinsun.com>
14015
14016 Change identifier spellings to avoid collisions with names
14017 that are reserved by POSIX.
14018
14019 Don't use names ending in _t, since POSIX reserves them.
14020 For consistency, remove _e and _s endings -- they're weren't
14021 needed to remove ambiguity. All uses changed.
14022 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14023 turn was just renamed from struniq_t.
14024 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14025 which in turn was just renamed from struniq_processor_t.
14026 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14027 in turn was renamed from hash_compare_struniq_t.
14028 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14029 (state_list): Renamed from state_list_t.
14030 * src/assoc.h (assoc): Renamed from assoc_t.
14031 * src/conflicts.c (enum conflict_resolution): Renamed from
14032 enum conflict_resolution_e.
14033 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14034 (rule_list): Renamed from rule_list_t.
14035 * src/getargs.h (enum trace): Renamed from enum trace_e.
14036 (enum report): Renamed from enum report_e.
14037 * src/gram.h (item_number): Renamed from item_number_t.
14038 (rule_number): Renamed from rule_number_t.
14039 (struct rule_s): Remove the "rule_s" part; not used.
14040 (rule): Renamed from rule_t.
14041 (rule_filter): Renamed from rule_filter_t.
14042 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14043 (goto_list): Renamed from goto_list_t.
14044 * src/lalr.h (goto_number): Renamed from goto_number_t.
14045 * src/location.h (location): Renamed from location_t.
14046 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14047 and moved here from:
14048 * src/muscle_tab.h (muscle_entry_t): here.
14049 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14050 (rule_list): Renamed from rule_list_t.
14051 * src/print_graph.c (static_graph): Renamed from graph.
14052 * src/reader.h (braced_code): Renamed from braced_code_t.
14053 Remove brace_code_e tag.
14054 * src/relation.h (relation_node): Renamed from relation_node_t.
14055 (relation_nodes): Renamed from relation_nodes_t.
14056 (relation): Renamed from relation_t.
14057 * src/state.h (state_number): Renamed from state_number_t.
14058 (struct state): Renamed from struct state_s.
14059 (state): Renamed from state_t.
14060 (transitions): Renamed from transitions_t. Unused (and
14061 misspelled) transtion_s tag removed.
14062 (errs): Renamed from errs_t. Unused errs_s tag removed.
14063 (reductions): Renamed from reductions_t. Unused tag
14064 reductions_s removed.
14065 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14066 (struct symbol_list): Renamed from struct symbol_list_s.
14067 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14068 (struct symbol): Renamed from struct symbol_s.
14069 (symbol): Renamed from symbol_t.
14070 * src/tables.c (vector_number): Renamed from vector_number_t.
14071 (action_number): Renamed from action_t.
14072 * src/tables.h (base_number): Renamed from base_t.
14073 * src/vcg.h (enum color): Renamed from enum color_e.
14074 (enum textmode): Renamed from enum textmode_e.
14075 (enum shape): Renamed from enum shape_e.
14076 (struct colorentry): Renamed from struct colorentry_s.
14077 (struct classname): Renamed from struct classname_s.
14078 (struct infoname): Renamed from struct infoname_s.
14079 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14080 (enum decision): Renamed from enum decision_e.
14081 (enum orientation): Renamed from enum orientation_e.
14082 (enum alignment): Renamed from enum alignment_e.
14083 (enum arrow_mode): Renamed from enum arrow_mode_e.
14084 (enum crossing_type): Renamed from enum crossing_type_e.
14085 (enum view): Renamed from enum view_e.
14086 (struct node): Renamed from struct node_s.
14087 (node): Renamed from node_t.
14088 (enum linestyle): Renamed from enum linestyle_e.
14089 (enum arrowstyle): Renamed from enum arrowstyle_e.
14090 (struct edge): Renamed from struct edge.
14091 (edge): Renamed from edge_t.
14092 (struct graph): Renamed from struct graph_s.
14093 (graph): Renamed from graph_t.
14094 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14095 Rename value_t -> value.
14096 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14097 value_t_as_yystype -> value_as_yystype.
14098
14099 Don't include <errno.h> in the mainstream code, since it
14100 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14101 * lib/get-errno.c, lib/get-errno.h: New files.
14102 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14103 get-errno.c.
14104 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14105 * src/output.c (output_skeleton): Likewise.
14106 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14107 instead of errno.
14108 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14109 Likewise.
14110 (handle_action_dollar, handle_action_at): Likewise.
14111 * src/system.h: Do not include <errno.h>.
14112 (TAB_EXT): Renamed from EXT_TAB.
14113 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14114
14115 Avoid str[a-z]*, since <string.h> reserves that name space.
14116 Change all instances of "struniq" in names to "uniqstr", and
14117 likewise for "STRUNIQ" and "UNIQSTR".
14118 * src/uniqstr.c: Renamed from src/struniq.c.
14119 * src/uniqstr.h: Renamed from src/struniq.h.
14120 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14121 * src/files.c (strsuffix): Remove; unused.
14122 (concat2): Renamed from stringappend. Now static.
14123 * src/files.h (strsuffix, stringappend): Remove; unused.
14124 * src/parse-gram.y (<chars>): Renamed from <string>.
14125 (<uniqstr>): Renamed from <struniq>.
14126 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14127 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14128 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14129 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14130 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14131 (N_EXPAND): Renamed from N_STRETCH.
14132
14133 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14134 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14135 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14136 Remove; unused.
14137 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14138 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14139 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14140 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14141 (BASE_MAXIMUM): Renamed from BASE_MAX.
14142 (BASE_MINIMUM): Renamed from BASE_MIN.
14143 (ACTION_MAX): Remove; unused.
14144 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14145 Unnecessary casts removed from above defines.
14146
14147
14148 Fix misspelling in names.
14149 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14150 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14151 G_NODE_ALIGNEMENT.
14152
14153
14154 * lib/timevar.c (timevar_report): Renamed from time_report,
14155 for consistency with other names.
14156 * lib/timevar.h (timevar_report): New decl.
14157 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14158
14159
14160 Sort include-file uses.
14161
14162 Reorder all include files under src to be in the order "system.h".
14163 then the ../lib include files in angle brackets (alphabetized),
14164 then the . include files in double-quotes (alphabetized). Fix
14165 dependency breakages encountered in this process, as follows:
14166 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14167 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14168 * src/state.h: Include "symtab.h".
14169
14170 2002-12-08 Paul Eggert <eggert@twinsun.com>
14171
14172 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14173 since this causes problems when __file__ contains character
14174 sequences like "@" that are treated specially by src/scan-skel.l.
14175 Instead, just use the file's basename. This fixes the bug
14176 reported by Martin Mokrejs in
14177 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14178
14179 2002-12-06 Paul Eggert <eggert@twinsun.com>
14180
14181 Add support for rules that do not have trailing semicolons, as
14182 POSIX requires. Improve the quality of locations in Bison
14183 diagnostics.
14184
14185 * src/location.c: Include <quotearg.h>.
14186 (empty_location): Now const.
14187 (location_print): New function. Follow the recommendation of the
14188 GNU Coding Standards for locations that span file boundaries.
14189 * src/location.h: Do not include <quotearg.h>; no longer needed.
14190 (boundary): New type.
14191 (location_t): Use it. This allows locations to span file boundaries.
14192 All member uses changed: file -> start.file or end.file (as needed),
14193 first_line -> start.line, first_column -> start.column,
14194 last_line -> end.line, last_column -> end.column.
14195 (equal_boundaries): New function.
14196 (LOCATION_RESET, LOCATION_STEP): Remove.
14197 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14198 (empty_location): Now const.
14199 (location_print): New decl.
14200 * src/parse-gram.y (lloc_default): New function, which handles
14201 empty locations more accurately.
14202 (YYLLOC_DEFAULT): Use it.
14203 (%token COLON): Remove.
14204 (%token ID_COLON): New token.
14205 (rules): Use it.
14206 (declarations, rules): Remove trailing semicolon.
14207 (declaration, rules_or_grammar_declaration):
14208 Allow empty (";") declaration.
14209 (symbol_def): Remove empty actions; no longer needed.
14210 (rules_or_grammar_declaration): Remove trailing semicolon.
14211 (semi_colon.opt): Remove.
14212 * src/reader.h: Include location.h.
14213 (scanner_cursor): New decl.
14214 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14215 rolling our own.
14216 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14217 of *loc.
14218 (STEP): Remove. No longer needed, now that adjust_location does
14219 the work. All uses removed.
14220 (scanner_cursor): New var.
14221 (adjust_location): Renamed from extend_location. It now sets
14222 *loc and adjusts the scanner cursor. All uses changed.
14223 Don't bother testing for CR.
14224 (handle_syncline): Remove location arg; now updates scanner cursor.
14225 All callers changed.
14226 (unexpected_end_of_file): Now accepts start boundary of token or
14227 comment, not location. All callers changed. Update scanner cursor,
14228 not the location.
14229 (SC_AFTER_IDENTIFIER): New state.
14230 (context_state): Renamed from c_context. All uses changed.
14231 (id_loc, code_start, token_start): New local vars.
14232 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14233 processing of Yacc white space and equivalents here.
14234 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14235 instead of returning ID immediately, since we need to search for
14236 a subsequent colon.
14237 (<INITIAL>"'", "\""): Save token_start.
14238 (<INITIAL>"%{", "{", "%%"): Save code_start.
14239 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14240 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14241 BEGIN context_state at end, not INITIAL.
14242 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14243 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14244 Return correct token start.
14245 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14246 the start of a character, string or multiline comment is found.
14247 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14248 Reduction): Adjust reported locations to match the more-precise
14249 results now expected.
14250 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14251 * tests/reduce.at (Useless Rules, Reduced Automaton,
14252 Underivable Rules): Likewise.
14253 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14254 or "|"' now that so many other tokens are allowed by the new grammar.
14255
14256 * src/complain.h (current_file): Remove duplicate decl;
14257 current_file is now owned by files.h.
14258 * src/complain.c, src/scan-gram.l: Include files.h.
14259
14260 2002-12-06 Paul Eggert <eggert@twinsun.com>
14261
14262 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14263 promotes to int; it might be unsigned int.
14264 * data/yacc.c (yy_reduce_print): Likewise.
14265
14266 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14267 be #defined in the prologue, not in the Bison declarations.
14268 This fixes Debian Bug 102878, reported by Shaul Karl.
14269
14270 2002-12-02 Paul Eggert <eggert@twinsun.com>
14271
14272 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14273 * lib/strtoul.c: New file, from gnulib.
14274 This fixes a porting bug reported by Peter Klein in
14275 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14276
14277 2002-11-30 Paul Eggert <eggert@twinsun.com>
14278
14279 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14280 and put only a forward declaration in the prologue. This is for
14281 consistency with the other scanner helper functions.
14282
14283 Type clashes now generate warnings, not errors, since it
14284 appears that POSIX may allow some grammars with type clashes.
14285 * src/reader.c (grammar_current_rule_check): Warn about
14286 type clashes instead of complaining.
14287 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14288
14289 Add Yacc library, since POSIX requires it.
14290 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14291 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14292 * lib/main.c, lib/yyerror.c: New files.
14293
14294 gram_error can be static; it need not be extern.
14295 * src/reader.h (gram_error): Remove decl.
14296 * src/parse-gram.y (gram_error): Now static. Add static decl.
14297 (print_token_value): Omit parameter names from forward decl,
14298 for consistency.
14299
14300 2002-11-29 Paul Eggert <eggert@twinsun.com>
14301
14302 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14303 be declared before being used. E.g., one should typically
14304 declare them in the prologue. Use GNU coding style in examples.
14305 Put "const" consistently after the type it modifies. Mention
14306 that C99 supports "inline". Mention that yyerror traditionally
14307 returns "int".
14308
14309 %parse-param and %lex-param now take just one argument, the
14310 declaration; the argument name is deduced from the declaration.
14311
14312 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14313 Reporting, Table of Symbols): Document this.
14314 * src/parse-gram.y (add_param): New function.
14315 (COMMA): Remove.
14316 (declaration): Implement new rule for %parse-param and %lex-param.
14317 * src/scan-gram.l: "," now elicits a warning, rather than being
14318 a token; this is more compatible with byacc.
14319 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14320
14321 2002-11-27 Paul Eggert <eggert@twinsun.com>
14322
14323 Rename identifiers to avoid real and potential collisions.
14324
14325 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14326 to avoid collision with lex macro described by Bruce Lilly in
14327 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14328 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14329 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14330 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14331 All uses changed.
14332 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14333 The name "yycontrol" violates the name space rules, and this stuff
14334 wasn't being used anyway.
14335 (input): Remove action; this stuff wasn't being used.
14336 (gram_error): Rename local variable yylloc -> loc.
14337 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14338 (YY_DECL): Don't use "yy" at start of local variables.
14339 All uses changed, e.g., yylloc -> loc.
14340 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14341 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14342 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14343 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14344
14345 * src/parse-gram.y (gram_error): loc is now const *.
14346 * src/reader.h (gram_error): Likewise.
14347
14348 2002-11-24 Paul Eggert <eggert@twinsun.com>
14349
14350 Version 1.75c.
14351
14352 * tests/actions.at (Actions after errors): Use an output format
14353 more similar to that of the Printers and Destructors test.
14354 Test the position of the ';' token too.
14355 (Printers and Destructors): Likewise.
14356 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14357 unnecessarily alarming people when the test fails.
14358
14359 * data/yacc.c (yyerrlab1): Move this label down, so that the
14360 parser does not discard the lookahead token if the user code
14361 invokes YYERROR. This change is required for POSIX conformance.
14362
14363 * lib/error.c: Sync with gnulib.
14364
14365 2002-11-22 Paul Eggert <eggert@twinsun.com>
14366
14367 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14368 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14369 * lib/xmalloc.c: Likewise.
14370
14371 2002-11-20 Paul Eggert <eggert@twinsun.com>
14372
14373 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14374
14375 2002-11-20 Paul Eggert <eggert@twinsun.com>
14376
14377 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14378 should use `if (! x) abort ();' rather than `assert (x);', and
14379 anyway it's one less thing to worry about configuring.
14380
14381 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14382 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14383 and replace all instances of assert with abort.
14384 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14385 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14386
14387 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14388 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14389 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14390 hash_find_entry, hash_rehash, hash_insert): Likewise.
14391 * src/conflicts.c (resolve_sr_conflict): Likewise.
14392 * src/lalr.c (set_goto_map, map_goto): Likewise.
14393 * src/nullable.c (nullable_compute): Likewise.
14394 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14395 * src/reader.c (packgram, reader): Likewise.
14396 * src/state.c (state_new, state_free, state_transitions_set,
14397 state_reduction_find): Likewise.
14398 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14399 symbol_pack): Likewise.
14400 * src/tables.c (conflict_row, pack_vector): Likewise.
14401 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14402 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14403 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14404 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14405
14406 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14407 (ARGMATCH_CONSTRAINT): New macro.
14408 (ARGMATCH_ASSERT): Use it.
14409
14410 * src/system.h (verify): New macro.
14411 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14412 rather than assert.
14413 * src/tables.c (tables_generate): Likewise.
14414
14415 * src/struniq.c (struniq_assert): Now returns void, and aborts
14416 if the assertion is false.
14417 (struniq_assert_p): Remove.
14418 * src/struniq.h: Likewise.
14419
14420 2002-11-18 Paul Eggert <eggert@twinsun.com>
14421
14422 * data/glr.c (yygetLRActions): Replace `yyindex' with
14423 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14424 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14425 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14426
14427 2002-11-18 Akim Demaille <akim@epita.fr>
14428
14429 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14430 space.
14431 From Tim Van Holder.
14432
14433 2002-11-17 Paul Eggert <eggert@twinsun.com>
14434
14435 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14436 to "SyntaxError" for consistency with my 2002-11-15 change.
14437
14438 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14439 not define to {}, since this breaks the common use of `YYDPRINTF
14440 ((...));' if a single statement is desired (e.g. before `else').
14441 Work around GCC warnings by surrounding corresponding calls with
14442 {} if needed.
14443 (yyhasResolvedValue): Remove unused function.
14444 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14445 loop body.
14446 (yyreportSyntaxError): Renamed from yyreportParseError.
14447 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14448 All uses changed.
14449 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14450 extern when possible. Remove unused initializations.
14451
14452 2002-11-16 Akim Demaille <akim@epita.fr>
14453
14454 Augment the similarity between GLR and LALR traces.
14455
14456 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14457 (YY_REDUCE_PRINT): New.
14458 (yyparse): Use them.
14459 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14460 YYDPRINT here.
14461 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14462 state reached after the reduction/recovery, since...
14463 (yyparse, yyprocessOneStack): Report the state we are entering in.
14464
14465 2002-11-16 Akim Demaille <akim@epita.fr>
14466
14467 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14468 Add support for --trace=skeleton.
14469 * src/scan-skel.l: %option debug.
14470 Scan strings of non-@ or \n instead of character by character.
14471 (scan_skel): Handle trace_skeleton.
14472 (QPUTS): New.
14473 (@output_parser_name@, @output_header_name@): ``Restore'' their
14474 support (used to be M4 macros).
14475 * data/yacc.c: Quote larger chunks, a la glr.c.
14476 * data/lalr1.cc: Likewise.
14477 The header guards are no longer available, so use some other
14478 string than `YYLSP_NEEDED'.
14479
14480 2002-11-16 Akim Demaille <akim@epita.fr>
14481
14482 Make the ``Printers and Destructors'' test more verbose, taking
14483 `yacc.c''s behavior as (possibly wrong) reference.
14484
14485 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14486 instead of fprint on stdout.
14487 Set and report the last_line of the symbols.
14488 Consistently display values and locations.
14489
14490 2002-11-16 Paul Eggert <eggert@twinsun.com>
14491
14492 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14493
14494 2002-11-15 Paul Eggert <eggert@twinsun.com>
14495
14496 * tests/actions.at (Actions after errors): New test case.
14497
14498 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14499 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14500 tests/action.at, tests/calc.at, tests/conflicts.at,
14501 tests/cxx-type.at, tests/regression.at:
14502 "parse error" -> "syntax error" for POSIX compatibility.
14503 "parsing stack overflow..." -> "parser stack overflow" so
14504 that code matches Bison documentation.
14505
14506 2002-11-15 Akim Demaille <akim@epita.fr>
14507
14508 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14509 take two BRACED_CODE, not two string_content.
14510 Free the scanner's obstack when we are done.
14511 (code_content): New.
14512 * tests/calc.at: Adjust.
14513 * doc/bison.texinfo: Adjust.
14514 Also, make sure to include the `,' for these declarations.
14515
14516 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14517
14518 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14519 definition; avoids potential autoreconf problems.
14520
14521 2002-11-15 Akim Demaille <akim@epita.fr>
14522
14523 Always check the value returned by yyparse.
14524
14525 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14526 returned by yyparse.
14527 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14528 Adjust calls.
14529 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14530 returned by yyparse.
14531
14532 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14533
14534 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14535 on input.at test.
14536
14537 2002-11-14 Paul Eggert <eggert@twinsun.com>
14538
14539 * src/output.c (output_skeleton): Call xfopen instead of
14540 duplicating xfopen's body.
14541
14542 Fix bugs reported by Nelson H. F. Beebe in
14543 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14544
14545 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14546 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14547 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14548 file twice in the grammar, as an extra check.
14549
14550 * tests/input.at (Torturing the Scanner): Surround the
14551 backslash-newline tests with "#if 0", to make it less likely that
14552 we'll run into compiler bugs. Bring back solitary \ inside
14553 comment, but add a closing comment to work around HP C bug. Don't
14554 test backslash-newline in C character constant.
14555
14556 2002-11-14 Akim Demaille <akim@epita.fr>
14557
14558 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14559 status of the compiler.
14560 Calling `exit 1' is no longer needed.
14561 Reported by Nelson H. F. Beebe.
14562
14563 2002-11-14 Akim Demaille <akim@epita.fr>
14564
14565 * tests/atlocal.in (CPPFLAGS): We have config.h.
14566 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14567 New.
14568 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14569 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14570 * tests/regression.at, tests/torture.at: Use them for all the
14571 grammars that are to be compiled.
14572 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14573 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14574 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14575
14576 2002-11-14 Akim Demaille <akim@epita.fr>
14577
14578 * doc/bison.texinfo: Various formatting changes (alignments in
14579 samples, additional @group/@end group, GCS in samples.
14580 Use @deffn instead of simple @table to define the directives,
14581 macros, variables etc.
14582
14583 2002-11-13 Paul Eggert <eggert@twinsun.com>
14584
14585 Fix some bugs reported by Albert Chin-A-Young in
14586 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14587
14588 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14589 -o c"; the HP C compiler chatters during compilation.
14590 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14591 * tests/headers.at (export YYLTYPE): Likewise.
14592
14593 * tests/input.at (Torturing the Scanner): Remove lines containing
14594 solitary backslashes, as they tickle a bug in the HP C compiler.
14595
14596 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14597 comments, since they're not portable. Use GNU coding style.
14598
14599 2002-11-13 Akim Demaille <akim@epita.fr>
14600
14601 * data/yacc.c: Leave bigger chunks of quoted text.
14602 (YYDSYMPRINTF): New.
14603 Use it to report symbol activities.
14604 * data/glr.c (YYDSYMPRINTF): New.
14605 Use it.
14606
14607 2002-11-12 Paul Eggert <eggert@twinsun.com>
14608
14609 Version 1.75b.
14610
14611 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14612 (yyglrReduce): Return yyok, not 0.
14613 This should avoid the enumerated-type warnings reported
14614 by Nelson H. F. Beebe in
14615 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14616
14617 * lib/bbitset.h (BITSET_INLINE): Remove.
14618 * lib/bitset.h [! BITSET_INLINE]: Remove.
14619 (bitset_set, bitset_reset, bitset_test): Rename local vars
14620 to avoid shadowing warnings by GCC.
14621
14622 * data/glr.c (inline): Remove #define. It's the user's
14623 responsibility to #define it away, just like 'const'.
14624 This fixes one of the bugs reported by Nelson H. F. Beebe in
14625 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14626
14627 * Makefile.maint (po-check): Scan .l and .y files instead of the
14628 .c and the .h files that they generate. This fixes the bug
14629 reported by Tim Van Holder in:
14630 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14631 Look for N_ as well as for _. Try to avoid matching #define for
14632 N_ and _.
14633 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14634 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14635 * src/scan-gram.l: Revamp regular expressions so that " and '
14636 do not confuse xgettext.
14637
14638 * src/struniq.h (struniq_new): Do not declare the return type
14639 to be 'const'; this violates the C standard.
14640 * src/struniq.c (struniq_new): Likewise.
14641
14642 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14643
14644 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14645 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14646 linker.
14647
14648 2002-11-12 Akim Demaille <akim@epita.fr>
14649
14650 * Makefile.maint: Sync with Autoconf:
14651 (local_updates): New.
14652
14653 2002-11-12 Akim Demaille <akim@epita.fr>
14654
14655 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14656
14657 2002-11-12 Akim Demaille <akim@epita.fr>
14658
14659 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14660 locations.
14661
14662 2002-11-12 Akim Demaille <akim@epita.fr>
14663
14664 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14665 not yyvalue.
14666
14667 2002-11-12 Akim Demaille <akim@epita.fr>
14668
14669 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14670 Use it to test the GLR parser.
14671
14672 2002-11-12 Akim Demaille <akim@epita.fr>
14673
14674 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14675 defines it.
14676 * data/glr.c (yystos): New.
14677 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14678 (YYDSYMPRINT): New.
14679 (yyval): Don't define it, it is handled via M4.
14680 (yyrecoverParseError): Free verbosely the discarded symbols.
14681 * data/yacc.c (yysymprint): Remove, rather...
14682 (b4_yysymprint_generate): invoke.
14683 * data/c.m4 (b4_yysymprint_generate): New.
14684 Accept pointers as arguments, as opposed to the version from
14685 yacc.c.
14686 (b4_yydestruct_generate): Likewise.
14687 * tests/cations.at (Printers and Destructors): Use Bison directives
14688 instead of CPP macros.
14689 Don't rely on internal details.
14690
14691 2002-11-12 Akim Demaille <akim@epita.fr>
14692
14693 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14694 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14695 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14696 it against YYEMPTY and so forth), work on yytoken (i.e., set
14697 it to YYEMPTY etc.).
14698 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14699 (b4_symbol_actions): Remove.
14700 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14701 for 0, end-of-input.
14702
14703 2002-11-12 Akim Demaille <akim@epita.fr>
14704
14705 * doc/bison.texinfo (Destructor Decl): New.
14706
14707 2002-11-12 Akim Demaille <akim@epita.fr>
14708
14709 * src/tables.c (tables_generate): Use free for pointers that
14710 cannot be NULL, not XFREE.
14711 (pack_vector): Use assert, not fatal, for bound violations.
14712 * src/state.c (state_new): Likewise.
14713 * src/reader.c (reader): Likewise.
14714 * src/lalr.c (set_goto_map): Likewise.
14715 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14716 the file name.
14717
14718 2002-11-12 Akim Demaille <akim@epita.fr>
14719
14720 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14721 Restore.
14722 * src/scan-gram.l (last_string): Is global to the file, not to
14723 yylex.
14724 * src/parse-gram.y (input): Don't append the epilogue here,
14725 (epilogue.opt): do it here, and free the scanner's obstack.
14726 * src/reader.c (epilogue_set): Rename as...
14727 (epilogue_augment): this.
14728 * data/c.m4 (b4_epilogue): Defaults to empty.
14729
14730 2002-11-12 Akim Demaille <akim@epita.fr>
14731
14732 * src/getargs.c (long_options): Remove duplicates.
14733 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14734 Remove.
14735 * doc/bison.rnh: Remove.
14736 * doc/bison.texinfo (VMS Invocation): Remove.
14737
14738 2002-11-12 Akim Demaille <akim@epita.fr>
14739
14740 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14741 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14742
14743 Use struniq for symbols.
14744
14745 * src/symtab.h (symbol_t): The tag member is a struniq.
14746 (symbol_type_set): Adjust.
14747 * src/symtab.c (symbol_new): Takes a struniq.
14748 (symbol_free): Don't free the tag member.
14749 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14750 (hash_compare_symbol, hash_symbol): these.
14751 Use the fact that tags as struniqs.
14752 (symbol_get): Use struniq_new.
14753 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14754 Returns a strniq.
14755 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14756 and type members are struniqs.
14757 * src/reader.c (get_merge_function)
14758 (grammar_current_rule_merge_set): Adjust.
14759 (TYPE, current_type): Are struniq.
14760
14761 Use struniq for file names.
14762
14763 * src/files.h, src/files.c (infile): Split into...
14764 (grammar_file, current_file): these.
14765 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14766 * src/reduce.c (reduce_print): Likewise.
14767 * src/getargs.c (getargs): Likewise.
14768 * src/complain.h, src/complain.c: Likewise.
14769 * src/main.c (main): Call struniqs_new early enough to use it for
14770 file names.
14771 Don't free the input file name.
14772
14773 2002-11-12 Akim Demaille <akim@epita.fr>
14774
14775 * src/symtab.c (symbol_free): Remove dead deactivated code:
14776 type_name are properly removed.
14777 Don't use XFREE to free items that cannot be NULL.
14778 * src/struniq.h, src/struniq.c: New.
14779 * src/main.c (main): Initialize/free struniqs.
14780 * src/parse-gram.y (%union): Add astruniq member.
14781 (yyprint): Adjust.
14782 * src/scan-gram.l (<{tag}>): Return a struniq.
14783 Free the obstack bit that used to store it.
14784 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14785
14786 2002-11-11 Paul Eggert <eggert@twinsun.com>
14787
14788 Revamp to fix many (but not all) of the C- and M4-related quoting
14789 problems. Among other things, this fixes the Bison bug reported
14790 by Jan Hubicka when processing the Bash grammar; see:
14791 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14792
14793 Use new @ escapes consistently. Represent brackets with @{ and @}
14794 rather than @<:@ and @:>@, since this works a bit better with dumb
14795 editors like vi. Represent @ with @@, since @ is now consistently
14796 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14797 __ofile__, to avoid unexpected expansions. Similarly, use @output
14798 rather than #output.
14799
14800 * data/c.m4 (b4_copyright): Omit file name from comment, since
14801 the file name could contain "*/".
14802 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14803 be quoted. All uses changed.
14804
14805 * data/glr.c: Use new @ escapes consistently.
14806 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14807 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14808 Remove, since they couldn't handle arbitrary characters in file
14809 names.
14810 * data/lalr1.cc: Likewise.
14811 * data/yacc.c: Likewise.
14812
14813 * src/files.c (output_infix): Remove; all uses removed.
14814 * src/files.h: Likewise.
14815
14816 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14817 mishandled funny characters in file names, and anyway it isn't
14818 needed any more.
14819 * data/yacc.c: Likewise.
14820 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14821
14822 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14823 * data/yacc.c: Likewise.
14824
14825 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14826 strings now.
14827 (muscle_init): Quote filename as a C string.
14828 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14829 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14830 * src/output.c (escaped_file_name_output): New function.
14831 (prepare_symbols): Quote tokens for M4.
14832 (prepare): Don't insert output_infix, output_prefix,
14833 output_parser_name, output_header_name; this is now down by scan-skel.
14834 Insert skeleton as a C string.
14835
14836 * src/output.c (user_actions_output, symbol_destructors_output,
14837 symbol_printers_output): Quote filenames for C and M4.
14838 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14839
14840 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14841 escapes other than \\ and \'; this simplifies the code.
14842 (<SC_STRING>): Likewise, for \\ and \".
14843 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14844 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14845 Use new escapes @{ and @} for [ and ].
14846
14847 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14848 them with auto vars.
14849 Switch to new escape scheme, where @ is the escape character uniformly.
14850 Abort if a stray escape character is found. Avoid unbounded input
14851 buffer when parsing non-escaped text.
14852
14853 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14854 __oline__, #output, $@, and @{ do not have unintended meanings.
14855
14856 2002-11-09 Paul Eggert <eggert@twinsun.com>
14857
14858 Fix the test failure due to GCC warnings described in
14859 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14860 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14861 evaluate to 0 if it's impossible for NINF to be in the respective
14862 table.
14863 (yygetLRActions, yyrecoverParseError): Use them.
14864
14865 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14866 counted in the token inserted at end of file. Now takes
14867 location_t *, not location_t, so that the location can be
14868 adjusted. All uses changed.
14869
14870 * tests/regression.at (Invalid inputs): Adjust wording in
14871 diagnostic to match the new behavior.
14872
14873 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14874 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14875 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14876 abort ();'. This reduces the runtime of the "Many lookaheads"
14877 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14878 GCC 3.2.
14879
14880 2002-11-07 Paul Eggert <eggert@twinsun.com>
14881
14882 * src/parse-gram.y (CHARACTER): Remove unused token.
14883 All uses removed.
14884
14885 * src/scan-gram.l: Remove stack option. We no longer use the
14886 stack, since the stack was never deeper than 1; instead, use the
14887 new auto var c_context to record the stacked value.
14888
14889 Remove nounput option. At an unexpected end of file, we now unput
14890 the minimal input necessary to end cleanly; this simplifies the
14891 code.
14892
14893 Avoid unbounded token sizes where this is easy.
14894
14895 (unexpected_end_of_file): New function.
14896 Use it to systematize the error message on unexpected EOF.
14897 (last-string): Now auto, not static.
14898 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14899 (scanner_last_string_free): Remove; not used.
14900 (percent_percent_count): Move decl to just before use.
14901 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14902 not the (never otherwised-used) CHARACTER.
14903
14904 2002-11-07 Akim Demaille <akim@epita.fr>
14905
14906 Let yyerror always receive the msg as last argument, so that
14907 yyerror can be variadic.
14908
14909 * data/yacc.c (b4_yyerror_args): New.
14910 Use it when calling yyerror.
14911 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14912 Use it when calling yyerror.
14913 * doc/bison.texinfo (Error Reporting): Adjust.
14914 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14915 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14916
14917 2002-11-06 Akim Demaille <akim@epita.fr>
14918
14919 #line should have quoted strings.
14920 Ideally, this should be done by m4_quotearg.
14921
14922 * src/scan-skel.l: Include quotearg.h.
14923 Quote __ofile__.
14924 * src/output.c (symbol_printers_output)
14925 (symbol_destructors_output): Quote the file name.
14926
14927 2002-11-06 Akim Demaille <akim@epita.fr>
14928
14929 * tests/regression.at (Invalid inputs): Adjust to the recent
14930 messages.
14931
14932 2002-11-06 Akim Demaille <akim@epita.fr>
14933
14934 Restore --no-lines.
14935 Reported by Jim Kent.
14936
14937 * data/c.m4 (b4_syncline): New.
14938 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14939 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14940 * src/output.c (user_actions_output): Likewise.
14941 (prepare): Define 'b4_synclines_flag'.
14942 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14943
14944 2002-11-06 Akim Demaille <akim@epita.fr>
14945
14946 * src/main.c (main): Free `infile'.
14947 * src/scan-gram.l (handle_syncline): New.
14948 Recognize `#line'.
14949 * src/output.c (user_actions_output, symbol_destructors_output)
14950 (symbol_printers_output): Use the location's file name, not
14951 infile.
14952 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14953
14954 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14955
14956 * src/tables.c (matching_state): Don't allow states to match if
14957 either has GLR conflict entries.
14958
14959 2002-11-05 Paul Eggert <eggert@twinsun.com>
14960
14961 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14962 "integer out of range" rather than "invalid value".
14963 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14964 accordingly.
14965
14966 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14967 Also, remove one static variable in the scanner.
14968
14969 * src/scan-gram.l (braces_level): Now auto, not static.
14970 Initialize to zero if the compiler is being picky.
14971 (INITIAL): Clear braces_level instead of incrementing it.
14972 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14973 as POSIX 1003.1-2001 requires.
14974 * src/system.h (IF_LINT): New macro, taken from coreutils.
14975 * configure.ac: Define "lint" if --enable-gcc-warnings.
14976
14977 2002-11-05 Akim Demaille <akim@epita.fr>
14978
14979 * src/scan-gram.l: When it starts with `%', complain about the
14980 whole directive, not just that `invalid character: %'.
14981
14982 2002-11-04 Akim Demaille <akim@epita.fr>
14983
14984 * Makefile.maint: Update from Autoconf.
14985 (update, cvs-update, po-update, do-po-update): New.
14986
14987 2002-11-04 Akim Demaille <akim@epita.fr>
14988
14989 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14990 and yyerror.
14991 Have yyerror `use' its arguments.
14992 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14993 returns true when location & yacc & pure & parse-param.
14994 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14995
14996 2002-11-04 Akim Demaille <akim@epita.fr>
14997
14998 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14999 clashes.
15000 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15001 font-lock-mode.
15002 Use complain_at.
15003 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15004 slot 0.
15005
15006 2002-11-03 Paul Eggert <eggert@twinsun.com>
15007
15008 * src/reader.c (get_merge_function, grammar_current_rule_check):
15009 Use consistent diagnostics for reporting type name clashes.
15010 Quote the types with <>, for consistency with Yacc.
15011 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15012
15013 2002-11-03 Akim Demaille <akim@epita.fr>
15014
15015 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15016 New.
15017 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15018 (b4_parse_param): Remove.
15019 Use b4_identification.
15020 Propagate b4_pure_args where needed to pass them to yyerror.
15021 * data/glr.m4 (b4_parse_param): Remove.
15022 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15023 (b4_lpure_formals): New.
15024 Use b4_identification.
15025 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15026 b4_user_formals and b4_user_args.
15027 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15028 (yyreportAmbiguity): When using a pure parser, also need
15029 the location, and the parse-params.
15030 Adjust callers.
15031 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15032 When using a pure parser, also need the parse-params.
15033 Adjust callers.
15034 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15035 (%pure-parser + %parse-param) LALR and GLR parsers.
15036 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15037 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15038 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15039 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15040 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15041 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15042 * doc/bison.texinfo: Untabify the whole file.
15043 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15044 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15045 (Error Reporting): Adjust to these new directives.
15046 Document %error-verbose, deprecate YYERROR_VERBOSE.
15047
15048 2002-11-03 Akim Demaille <akim@epita.fr>
15049
15050 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15051 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15052 command line options.
15053 * tests/cxx-type.at: Formatting changes.
15054
15055 2002-11-03 Paul Eggert <eggert@twinsun.com>
15056
15057 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15058 to count columns correctly, and to check for invalid inputs.
15059
15060 Use mbsnwidth to count columns correctly. Account for tabs, too.
15061 Include mbswidth.h.
15062 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15063 (extend_location): New function.
15064 (YY_LINES): Remove.
15065
15066 Handle CRLF in C code rather than in Lex code.
15067 (YY_INPUT): New macro.
15068 (no_cr_read): New function.
15069
15070 Scan UCNs, even though we don't fully handle them yet.
15071 (convert_ucn_to_byte): New function.
15072
15073 Handle backslash-newline correctly in C code.
15074 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15075 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15076 all uses changed.
15077 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15078 Use {splice} wherever C allows backslash-newline.
15079 YY_STEP after space, newline, vertical-tab.
15080 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15081
15082 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15083
15084 ({int}, handle_action_dollar, handle_action_at): Check for integer
15085 overflow.
15086
15087 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15088
15089 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15090 as well as \000. Check for UCHAR_MAX, not 255.
15091 Allow \x with an arbitrary positive number of digits, as in C.
15092 Check for overflow here.
15093 Allow \? and UCNs, for compatibility with C.
15094
15095 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15096 with quote slot used by complain_at.
15097
15098 * tests/input.at: Add tests for backslash-newline, m4 quotes
15099 in symbols, long literals, and funny escapes in strings.
15100
15101 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15102 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15103 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15104 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15105 * m4/mbswidth.m4: New file, from GNU coreutils.
15106
15107 * doc/bison.texinfo (Grammar Outline): Document // comments.
15108 (Symbols): Document that trigraphs have no special meaning in Bison,
15109 nor is backslash-newline allowed.
15110 (Actions): Document that trigraphs have no special meaning.
15111
15112 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15113 no longer used.
15114
15115 2002-11-02 Paul Eggert <eggert@twinsun.com>
15116
15117 * src/reader.c: Don't include quote.h; not needed.
15118 (get_merge_function): Reword warning to be consistent with
15119 type clash diagnostic in grammar_current_rule_check.
15120
15121 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15122 bug in trigraph handling.
15123
15124 * src/output.c (prepare_symbols): When printing token names,
15125 escape "[" as "@<:@" and likewise for "]".
15126
15127 * src/system.h (errno): Remove declaration, as we are now
15128 assuming C89 or better, and C89 guarantees errno.
15129
15130 2002-10-30 Paul Eggert <eggert@twinsun.com>
15131
15132 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15133 Check for close failures.
15134 * src/files.h (xfclose): Return void, not int, since it always
15135 returned zero.
15136 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15137 indicates one.
15138 * src/output.c (output_skeleton): Use xfclose rather than fclose
15139 and ferror. xfclose now checks ferror.
15140
15141 * data/glr.c (YYLEFTMOST_STATE): Remove.
15142 (yyreportTree): Use a stack-based leftmost state. This avoids
15143 our continuing battles with bogus warnings about initializers.
15144
15145 2002-10-30 Akim Demaille <akim@epita.fr>
15146
15147 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15148 #if.
15149
15150 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15151
15152 * tests/glr-regr1.at: New test for reported regressions.
15153 * tests/testsuite.at: Add glr-regr1.at test.
15154 * tests/Makefile.am: Add glr-regr1.at test.
15155
15156 2002-10-24 Paul Eggert <eggert@twinsun.com>
15157
15158 Version 1.75a.
15159
15160 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15161 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15162 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15163 Don't assume strdup exists; POSIX says its an XSI extension.
15164 Check for buffer overflow on input.
15165
15166 2002-10-24 Akim Demaille <akim@epita.fr>
15167
15168 * src/output.c (output_skeleton): Don't disable M4sugar comments
15169 too soon: it results in comments being expanded.
15170 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15171 first output.
15172
15173 2002-10-24 Akim Demaille <akim@epita.fr>
15174
15175 * data/yacc.c (m4_int_type): New.
15176 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15177 char' as only yacc.c wants K&R portability.
15178 * data/glr.c (yysigned_char): Remove.
15179 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15180 Reported by Quoc Peyrot.
15181
15182 2002-10-23 Paul Eggert <eggert@twinsun.com>
15183
15184 * src/main.c (main): With --trace=time, report times even if a
15185 non-fatal error occurs. Formerly, the times were reported in some
15186 such cases but not in others.
15187 * src/reader.c (reader): Just return if a complaint has been issued,
15188 instead of exiting, so that 'main' can report times.
15189
15190 2002-10-22 Akim Demaille <akim@epita.fr>
15191
15192 * src/system.h: Include sys/types.
15193 Reported by Bert Deknuydt.
15194
15195 2002-10-23 Paul Eggert <eggert@twinsun.com>
15196
15197 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15198 Suggested by Art Haas.
15199
15200 2002-10-22 Paul Eggert <eggert@twinsun.com>
15201
15202 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15203 decl; not needed any more.
15204 * src/main.c (main): Use return to exit, undoing yesterday's change.
15205 The last OS that we could find where this wouldn't work is
15206 SunOS 3.5, and that's too old to worry about now.
15207
15208 * data/glr.c (struct yyltype): Define members even when not
15209 doing locations. This is more consistent with yacc.c, and it
15210 works around the following bug reports:
15211 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15212 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15213
15214 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15215 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15216 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15217
15218 2002-10-22 Akim Demaille <akim@epita.fr>
15219
15220 * data/README: New.
15221
15222 2002-10-21 Paul Eggert <eggert@twinsun.com>
15223
15224 Be consistent about 'bool'; the old code used an enum in one
15225 module and an int in another, and this violates the C standard.
15226 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15227 * configure.ac (AC_HEADER_STDBOOL): Add.
15228 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15229 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15230 * src/symtab.c (hash_compare_symbol_t): Likewise.
15231 * src/system.h (bool, false, true): Use a definition consistent
15232 with ../lib/hash.c. All uses changed.
15233
15234 * src/complain.c (warning_issued): Renamed from warn_message_count,
15235 so that we needn't worry about integer overflow (!).
15236 Now of type bool. All uses changed.
15237 (complaint_issued): Renamed from complain_message_count; likewise.
15238
15239 * src/main.c (main): Use exit to exit with failure.
15240
15241 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15242 rather than 1 and 0.
15243 * src/main.c (main): Likewise.
15244 * src/getargs.c (getargs): Likewise.
15245 * src/reader.c (reader): Likewise.
15246
15247 * src/getarg.c (getargs): Remove duplicate code for
15248 "Try `bison --help'".
15249
15250 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15251 What was that "2" for?
15252
15253 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15254 * src/getargs.c (usage): Likewise.
15255
15256 * src/getargs.c (getargs): When there are too few operands, report
15257 the last one. When there are too many, report the first extra
15258 one. This is how diffutils does it.
15259
15260 2002-10-20 Paul Eggert <eggert@twinsun.com>
15261
15262 Remove K&R vestiges.
15263 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15264 * src/complain.c (VA_START): Remove. Assume prototypes.
15265 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15266 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15267 fatal): Assume prototypes.
15268 * src/complain.h: Assume prototypes.
15269 * src/system.h (PARAMS): Remove.
15270 Include <limits.h> unconditionally, since it's guaranteeed even
15271 for a freestanding C89 compiler.
15272 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15273 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15274
15275 2002-10-20 Akim Demaille <akim@epita.fr>
15276
15277 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15278 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15279 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15280 (yyresolveStates, yyresolveAction, yyresolveStack)
15281 (yyprocessOneStack): Use them.
15282 (yy_reduce_print): New.
15283 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15284
15285 2002-10-20 Akim Demaille <akim@epita.fr>
15286
15287 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15288 arguments and output `void'.
15289 (b4_c_function): Rename as...
15290 (b4_c_function_def): this.
15291 (b4_c_function_decl, b4_c_ansi_function_def)
15292 (b4_c_ansi_function_decl): New.
15293 Change the interpretation of the arguments: before `int, foo', now
15294 `int foo, foo'.
15295 * data/yacc.c (yyparse): Prototype and define thanks to these.
15296 Adjust b4_c_function_def uses.
15297 * data/glr.c (yyparse): Likewise, but ANSI only.
15298
15299 2002-10-20 Akim Demaille <akim@epita.fr>
15300
15301 * src/output.c (prepare): Move the definition of `tokens_number',
15302 `nterms_number', `undef_token_number', `user_token_number_max'
15303 to...
15304 (prepare_tokens): Here.
15305 (prepare_tokens): Rename as...
15306 (prepare_symbols): this.
15307 (prepare): Move the definition of `rules_number' to...
15308 (prepare_rules): here.
15309 (prepare): Move the definition of `last', `final_state_number',
15310 `states_number' to...
15311 (prepare_states): here.
15312 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15313
15314 2002-10-20 Akim Demaille <akim@epita.fr>
15315
15316 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15317
15318 2002-10-20 Akim Demaille <akim@epita.fr>
15319
15320 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15321 * data/c.m4: here.
15322
15323 2002-10-20 Akim Demaille <akim@epita.fr>
15324
15325 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15326 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15327 `pair'.
15328 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15329 `name' to...
15330 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15331 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15332 These.
15333
15334 2002-10-19 Paul Eggert <eggert@twinsun.com>
15335
15336 Do not create a temporary file, as that involves security and
15337 cleanup headaches. Instead, use a pair of pipes.
15338 Derived from a suggestion by Florian Krohm.
15339 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15340 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15341 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15342 (BISON_PREREQ_SUBPIPE): Add.
15343 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15344 Add subpipe.h, subpipe.c.
15345 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15346 * po/POTFILES.in: Add lib/subpipe.c.
15347 * src/output.c: Include "subpipe.h".
15348 (m4_invoke): Remove decl.
15349 (scan_skel): New decl.
15350 (output_skeleton): Use pipe rather than temporary file for m4 input.
15351 Check that m4sugar.m4 is readable, to avoid deadlock.
15352 Check for pipe I/O error.
15353 * src/scan-skel.l (readpipe): Remove decl.
15354 (scan_skel): New function, to be used in place of m4_invoke.
15355 Read from stream rather than file.
15356
15357 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15358 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15359 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15360 this generates a more-accurate value anyway.
15361
15362 * lib/timevar.c (timervar_accumulate): Rename locals to
15363 avoid confusion with similarly-named more-global.
15364 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15365
15366 * src/output.c (prepare): Use xstrdup to convert char const *
15367 to char *, to avoid GCC warning.
15368
15369 2002-10-19 Akim Demaille <akim@epita.fr>
15370
15371 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15372 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15373 Use them to have `calc.y' ready for %pure-parser.
15374 * data/yacc.c (YYLEX): Pass a yylex return type to
15375 b4_c_function_call.
15376
15377 2002-10-19 Akim Demaille <akim@epita.fr>
15378
15379 Prototype support of %lex-param and %parse-param.
15380
15381 * src/parse-gram.y: Add the definition of the %lex-param and
15382 %parse-param tokens, plus their rules.
15383 Drop the `_' version of %glr-parser.
15384 Add the "," token.
15385 * src/scan-gram.l (INITIAL): Scan them.
15386 * src/muscle_tab.c: Comment changes.
15387 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15388 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15389 (muscle_entry_s): The `value' member is no longer const.
15390 Adjust all dependencies.
15391 * src/muscle_tab.c (muscle_init): Adjust: use
15392 MUSCLE_INSERT_STRING.
15393 Initialize the obstack earlier.
15394 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15395 (muscle_pair_list_grow): New.
15396 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15397 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15398 * tests/calc.at: Use %locations, not --locations.
15399 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15400
15401 2002-10-19 Akim Demaille <akim@epita.fr>
15402
15403 * src/getargs.c (usage): Take status as argument and exit
15404 accordingly.
15405 Report the traditional `Try ... --help' message when status != 0.
15406 (usage, version): Don't take a FILE * as arg, it is pointless.
15407 (getargs): When there is an incorrect number of arguments, make it
15408 an error, and report it GNUlically thanks to `usage ()'.
15409
15410 2002-10-18 Paul Eggert <eggert@twinsun.com>
15411
15412 * data/glr.c (yyreportParseError): Don't assume that sprintf
15413 yields the length of the printed string, as this is not true
15414 on SunOS 4.1.4. Reported by Peter Klein.
15415
15416 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15417 * tests/conflicts.at (%nonassoc and eof): Likewise.
15418 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15419
15420 2002-10-17 Akim Demaille <akim@epita.fr>
15421
15422 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15423 * src/getargs.c (trace_types, trace_args): Adjust.
15424 * src/reader.c (grammar_current_rule_prec_set)
15425 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15426 Standardize error messages.
15427 And s/@prec/%prec/!
15428 (reader): Use trace_flag to enable scanner/parser debugging,
15429 instead of an adhoc scheme.
15430 * src/scan-gram.l: Remove trailing debugging code.
15431
15432 2002-10-16 Paul Eggert <eggert@twinsun.com>
15433
15434 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15435 MUSCLE_TAB_H.
15436
15437 * NEWS: Officially drop support for building Bison with K&R C,
15438 since it didn't work anyway and it's not worth worrying about.
15439 * Makefile.maint (wget_files): Remove ansi2knr.c.
15440 (ansi2knr.c-url_prefix): Remove.
15441 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15442 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15443 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15444
15445 2002-10-15 Paul Eggert <eggert@twinsun.com>
15446
15447 Stop using the "enum_" trick for K&R-style function definitions;
15448 it confused me, and I was the author! Instead, assume that people
15449 who want to use K&R C compilers (when using these modules in GCC,
15450 perhaps?) will run ansi2knr.
15451
15452 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15453 All uses of "enum_" changed to "enum ".
15454 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15455 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15456
15457 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15458 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15459 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15460 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15461 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15462 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15463 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15464 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15465 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15466 Use function prototypes; this removes the need for declaring
15467 static functions simply to provide their prototypes.
15468 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15469 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15470 bitset_count_, bitset_create, bitset_dump, bitset_first,
15471 bitset_free, bitset_init, bitset_last, bitset_next,
15472 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15473 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15474 bitset_print, bitset_release_memory, bitset_toggle_,
15475 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15476 debug_bitset): Likewise.
15477 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15478 * lib/bitset_stats.c (bitset_log_histogram_print,
15479 bitset_percent_histogram_print, bitset_stats_and,
15480 bitset_stats_and_cmp, bitset_stats_and_or,
15481 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15482 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15483 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15484 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15485 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15486 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15487 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15488 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15489 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15490 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15491 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15492 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15493 bitset_stats_zero): Likewise.
15494 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15495 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15496 bitsetv_dump, debug_bitsetv): Likewise.
15497 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15498 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15499 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15500 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15501 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15502 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15503 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15504 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15505 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15506 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15507 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15508 Likewise.
15509 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15510 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15511 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15512 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15513 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15514 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15515 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15516 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15517 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15518 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15519 lbitset_xor_cmp, lbitset_zero): Likewise.
15520
15521 2002-10-14 Akim Demaille <akim@epita.fr>
15522
15523 Version 1.75.
15524
15525 2002-10-14 Akim Demaille <akim@epita.fr>
15526
15527 * tests/Makefile.am (maintainer-check-posix): New.
15528
15529 2002-10-14 Akim Demaille <akim@epita.fr>
15530
15531 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15532 member.
15533
15534 2002-10-14 Akim Demaille <akim@epita.fr>
15535
15536 * src/tables.c (table_ninf_remap): base -> tab.
15537 Reported by Matt Rosing.
15538
15539 2002-10-14 Paul Eggert <eggert@twinsun.com>
15540
15541 * tests/action.at, tests/calc.at, tests/conflicts.at,
15542 tests/cxx-type.at, tests/headers.at, tests/input.at,
15543 tests/regression.at, tests/synclines.at, tests/torture.at:
15544 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15545 so that the tests still work even if POSIXLY_CORRECT is set.
15546 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15547
15548 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15549 for portability to K&R hosts. Fix typo: signed char is guaranteed
15550 only to 127, not to 128.
15551 * data/glr.c (yysigned_char): New type.
15552 * data/yacc.c (yysigned_char): Likewise.
15553 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15554
15555 2002-10-13 Paul Eggert <eggert@twinsun.com>
15556
15557 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15558 true due to limited range of data type" warning from GCC.
15559
15560 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15561 by wrapping enum yytokentype's definition inside #ifndef
15562 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15563
15564 2002-10-13 Akim Demaille <akim@epita.fr>
15565
15566 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15567 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15568
15569 2002-10-13 Akim Demaille <akim@epita.fr>
15570
15571 * Makefile.maint: Update from Autoconf 2.54.
15572 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15573
15574 2002-10-13 Akim Demaille <akim@epita.fr>
15575
15576 * src/print.c (print_state): Separate the list of solved conflicts
15577 from the other items.
15578 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15579
15580 2002-10-13 Akim Demaille <akim@epita.fr>
15581
15582 Let nondeterministic skeletons be usable with deterministic
15583 tables.
15584
15585 With the patch, GAWK compiled by GCC without -O2 passes its test
15586 suite using a GLR parser driven by LALR tables. It fails with -O2
15587 because `struct stat' gives two different answers on my machine:
15588 88 (definition of an auto var) and later 96 (memset on this var).
15589 Hence the stack is badly corrumpted. The headers inclusion is to
15590 blame: if I move the awk.h inclusion before GLR's system header
15591 inclusion, the two struct stat have the same size.
15592
15593 * src/tables.c (pack_table): Always create conflict_table.
15594 (token_actions): Always create conflict_list.
15595 * data/glr.c (YYFLAG): Remove, unused.
15596
15597 2002-10-13 Akim Demaille <akim@epita.fr>
15598
15599 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15600 (O0FLAGS): New.
15601 (VALGRIND, GXX): New.
15602 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15603 * tests/bison.in: Run $PREBISON a pre-command.
15604 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15605 (maintainer-check-g++): New.
15606 * Makefile.am (maintainer-check): New.
15607
15608 2002-10-13 Akim Demaille <akim@epita.fr>
15609
15610 * data/glr.c: Formatting changes.
15611 Tweak some trace messages to match yacc.c's.
15612
15613 2002-10-13 Akim Demaille <akim@epita.fr>
15614
15615 GLR parsers sometimes raise parse errors instead of performing the
15616 default reduction.
15617 Reported by Charles-Henry de Boysson.
15618
15619 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15620 check the length of the traces when %glr.
15621 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15622 GLR's traces.
15623 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15624 Test GLR parsers.
15625 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15626 (yyltype): Remove the yy prefix from the member names.
15627 (yytable): Complete its comment.
15628 (yygetLRActions): Map error action number from YYTABLE from
15629 YYTABLE_NINF to 0.
15630 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15631 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15632 not satisfying as we could compare an YYACTION computed from
15633 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15634 only value for error actions.
15635 (yyreportParseError): In verbose parse error messages, don't issue
15636 `error' in the list of expected tokens.
15637 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15638 next action to perform to match glr.c's decoding.
15639 (yytable): Complete its comment.
15640
15641 2002-10-13 Paul Eggert <eggert@twinsun.com>
15642
15643 Fix problem reported by Henrik Grubbstroem in
15644 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15645 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15646 because the Bison parser reads the second action before reducing
15647 the first one.
15648 * src/scan-gram.l (rule_length): New static var.
15649 Use it to keep track of the rule length in the scanner, since
15650 we can't expect the parser to be in lock-step sync with the scanner.
15651 (handle_action_dollar, handle_action_at): Use this var.
15652 * tests/actions.at (Exotic Dollars): Test for the problem.
15653
15654 2002-10-12 Paul Eggert <eggert@twinsun.com>
15655
15656 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15657 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15658 Include <sys/time.h> when checking for clock_t and struct tms.
15659 Use same include order as source.
15660 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15661 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15662
15663 * lib/timevar.c: Update copyright date and clarify comments.
15664 (get_time) [IN_GCC]: Keep the GCC version for reference.
15665
15666 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15667 GCC version as of today, then merge Bison's changes.
15668 Change "GCC" to "Bison" in copyright notice. timevar.def's
15669 author is Akim, so change that too.
15670
15671 * src/reader.c (grammar_current_rule_check):
15672 Don't worry about the default action if $$ is untyped.
15673 Prevents bogus warnings reported by Jim Gifford in
15674 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15675
15676 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15677 * data/glr.c, data/lalr1.cc, data/yacc.c:
15678 Output token definitions before the first part of user declarations.
15679 Fixes compatibility problem reported by Jim Gifford for kbd in
15680 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15681
15682 2002-10-11 Paul Eggert <eggert@twinsun.com>
15683
15684 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15685 (yyparse): here. This undoes some of the 2002-07-25 change.
15686 Compatibility problem reported by Ralf S. Engelschall with
15687 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15688
15689 2002-10-11 Akim Demaille <akim@epita.fr>
15690
15691 * tests/regression.at Characters Escapes): New.
15692 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15693 characters.
15694 Reported by Jan Nieuwenhuizen.
15695
15696 2002-10-11 Akim Demaille <akim@epita.fr>
15697
15698 * po/id.po: New.
15699
15700 2002-10-10 Paul Eggert <eggert@twinsun.com>
15701
15702 Portability fixes for bitsets; this also avoids several GCC
15703 warnings.
15704
15705 * lib/abitset.c: Include <stddef.h>, for offsetof.
15706 * lib/lbitset.c: Likewise.
15707
15708 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15709 properly for vectors of objects. Do not assume that adding a
15710 header size to a multiple of a word size yields a value that is
15711 properly aligned for the whole union.
15712 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15713
15714 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15715 unique names for structures.
15716 * lib/ebitset.c (ebitset_bytes): Likewise.
15717 * lib/lbitset.c (lbitset_bytes): Likewise.
15718
15719 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15720 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15721 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15722 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15723 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15724 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15725 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15726 to improve the type-checking that GCC can do.
15727 * lib/bitset.c (bitset_op4_cmp): Likewise.
15728 * lib/bitset_stats.c (bitset_stats_count,
15729 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15730 bitset_stats_copy, bitset_stats_disjoint_p,
15731 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15732 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15733 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15734 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15735 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15736 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15737 bitset_stats_or_and_cmp): Likewise.
15738 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15739 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15740 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15741 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15742
15743 * lib/abitset.h: Include bitset.h, not bbitset.h.
15744 * lib/ebitset.h: Likewise.
15745 * lib/lbitset.h: Likewise.
15746
15747 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15748 All instances of parameters of type enum bitset_opts are now of
15749 type enum_bitset_opts, to conform to the C Standard, and similarly
15750 for enum_bitset_type.
15751 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15752 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15753
15754 Do not use "struct bitset_struct" to mean different things in
15755 different modules. Not only is this confusing, it violates
15756 the C Standard, which requires that structure types in different
15757 modules must be compatible if one is to be passed to the other.
15758 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15759 All instances of "struct bitset_struct *" replaced with "bitset".
15760 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15761 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15762 struct lbitset_struct, struct bitset_stats_struct): New types.
15763 All uses of struct bitset_struct changed to union bitset_union,
15764 etc.
15765 * lib/abitset.c (struct abitset_struct, abitset,
15766 struct bitset_struct): Remove.
15767 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15768 struct bitset_struct): Remove.
15769 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15770 bitset_struct): Remove.
15771 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15772 Likewise.
15773
15774 Do not call a function of type T using a call that assumes the
15775 function is of a different type U. Standard C requires that a
15776 function must be called with a type that is compatible with its
15777 definition.
15778 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15779 New decls.
15780 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15781 New functions.
15782 * lib/ebitset.c (PFV): Remove.
15783 * lib/lbitset.c (PFV): Likewise.
15784 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15785 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15786 decls.
15787 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15788 (ebitset_vtable): Use them.
15789 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15790 lbitset_xor): New functions.
15791 (lbitset_vtable): Use them.
15792
15793 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15794 Declare.
15795
15796 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15797 GCC warning.
15798 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15799 Use offsetof, for simplicity.
15800
15801 2002-10-06 Paul Eggert <eggert@twinsun.com>
15802
15803 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15804 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15805 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15806 which was inadvertently undone by the 2002-09-30 patch.
15807 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15808 the same width as int.
15809
15810 2002-10-04 Paul Eggert <eggert@twinsun.com>
15811
15812 Version 1.50.
15813
15814 * configure.ac (AC_INIT), NEWS: Increment version number.
15815
15816 * doc/bison.texinfo: Minor spelling, grammar, and white space
15817 fixes.
15818 (Symbols): Mention that any negative value returned from yylex
15819 signifies end-of-input. Warn about negative chars. Mention
15820 the portable Standard C character set.
15821
15822 The GNU coding standard says CFLAGS and YFLAGS are reserved
15823 for the installer to set.
15824 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15825 * src/Makefile.am (AM_CFLAGS): Likewise.
15826 (AM_YFLAGS): Renamed from YFLAGS.
15827
15828 Fix some MAX and MIN problems.
15829 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15830 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15831 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15832 * src/reader.c (reader): Use it.
15833
15834 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15835 POSIX 1003.1-2001 has removed fgrep.
15836
15837 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15838
15839 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15840 interpreted as signed.
15841 * lib/ebitset.c (ebitset_list): Fix bug.
15842
15843 2002-10-01 Paul Eggert <eggert@twinsun.com>
15844
15845 More fixes for 64-bit hosts and large bitsets.
15846
15847 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15848 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15849 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15850 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15851 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15852 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15853 bitset_count_): Likewise.
15854 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15855 bitset_first, bitset_last): Likewise.
15856 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15857 bitset_stats_list_reverse, bitset_stats_size,
15858 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15859 Likewise.
15860 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15861 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15862 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15863 bitsetv_reflexive_transitive_closure): Likewise.
15864 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15865 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15866 Likewise.
15867 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15868 Likewise.
15869
15870 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15871 Use size_t, not unsigned int, to count bytes.
15872 * lib/abitset.h (abitset_bytes): Likewise.
15873 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15874 Likewise.
15875 * lib/bitset.h (bitset_bytes): Likewise.
15876 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15877 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15878 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15879 * lib/ebitset.c (ebitset_bytes): Likewise.
15880 * lib/ebitset.h (ebitset_bytes): Likewise.
15881 * lib/lbitset.c (lbitset_bytes): Likewise.
15882 * lib/lbitset.h (lbitset_bytes): Likewise.
15883
15884 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15885 abitset_subset_p, abitset_disjoint_p, abitset_and,
15886 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15887 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15888 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15889 abitset_or_and, abitset_or_and_cmp):
15890 Use bitset_windex instead of unsigned int.
15891 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15892 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15893 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15894 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15895 Likewise.
15896 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15897
15898 * lib/bitset.c (bitset_print):
15899 Use proper printf formats for widths of integer types.
15900 * lib/bitset_stats.c (bitset_percent_histogram_print,
15901 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15902 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15903 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15904 * lib/lbitset.c (lbitset_bytes): Likewise.
15905
15906 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15907 BITSET_SIZE_MAX): New macros.
15908 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15909 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15910 to BITSET_WINDEX_MAX.
15911
15912 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15913 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15914 since we now return the bitset_bindex type (not int).
15915
15916 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15917 when computing sizes.
15918 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15919
15920 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15921 and avoid cast to unsigned.
15922
15923 2002-09-30 Akim Demaille <akim@epita.fr>
15924
15925 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15926 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15927 Updates from Michael Hayes.
15928
15929 2002-09-30 Art Haas <ahaas@neosoft.com>
15930
15931 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15932 invocations.
15933 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15934 defined.
15935
15936 2002-09-27 Akim Demaille <akim@epita.fr>
15937
15938 Version 1.49c.
15939
15940 2002-09-27 Akim Demaille <akim@epita.fr>
15941
15942 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15943 (Because of AC_LIBSOURCE).
15944
15945 2002-09-27 Akim Demaille <akim@epita.fr>
15946
15947 Playing with Autoscan.
15948
15949 * configure.ac: Remove the old LIBOBJ tweaks.
15950 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15951 * lib/strrchr.c: New.
15952 * lib/strtol.c: New, from the Coreutils 4.5.1.
15953
15954 2002-09-27 Akim Demaille <akim@epita.fr>
15955
15956 Playing with Autoscan.
15957
15958 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15959 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15960 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15961 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15962 Coreutils 4.5.1.
15963
15964 2002-09-24 Akim Demaille <akim@epita.fr>
15965
15966 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15967 (Frequently Asked Questions, Parser Stack Overflow): New.
15968
15969 2002-09-13 Akim Demaille <akim@epita.fr>
15970
15971 Playing with autoscan.
15972
15973 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15974 * src/files.c (skeleton_find): Remove, unused.
15975 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15976 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15977
15978 2002-09-13 Akim Demaille <akim@epita.fr>
15979
15980 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15981 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15982
15983 2002-09-13 Akim Demaille <akim@epita.fr>
15984
15985 * configure.ac: Require 2.54.
15986 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15987 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15988 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15989 Remove, provided by Autoconf macros.
15990
15991 2002-09-12 Akim Demaille <akim@epita.fr>
15992
15993 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15994
15995 2002-09-12 Akim Demaille <akim@epita.fr>
15996
15997 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15998 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15999 Reported by Martin Mokrejs.
16000
16001 2002-09-10 Akim Demaille <akim@epita.fr>
16002
16003 * src/parse-gram.y: Associate a human readable string to each
16004 token type.
16005 * tests/regression.at (Invalid inputs): Adjust.
16006
16007 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16008
16009 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16010 with an Autoconf-2.5x style configure.ac.
16011
16012 2002-09-06 Paul Eggert <eggert@twinsun.com>
16013
16014 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16015 exception applies only to yacc.c. This is a modification of a
16016 patch originally suggested by Akim Demaille.
16017
16018 2002-09-06 Akim Demaille <akim@epita.fr>
16019
16020 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16021 here to...
16022 * data/yacc.c: here.
16023
16024 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16025 LocationType.
16026 (b4_ltype): Default to yy::Location from location.hh.
16027
16028 2002-09-04 Jim Meyering <jim@meyering.net>
16029
16030 * data/yacc.c: Guard the declaration of yytoknum also with
16031 `#ifdef YYPRINT', so it is declared only when used.
16032
16033 2002-09-04 Akim Demaille <akim@epita.fr>
16034
16035 * configure.in: Rename as...
16036 * configure.ac: this.
16037 Bump to 1.49c.
16038
16039 2002-09-04 Akim Demaille <akim@epita.fr>
16040
16041 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16042 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16043 translate maintainer only messages.
16044
16045 2002-08-12 Paul Eggert <eggert@twinsun.com>
16046
16047 Version 1.49b.
16048
16049 * Makefile.am (SUBDIRS): Remove intl.
16050 (DISTCLEANFILES): Remove.
16051 * NEWS: Mention that GNU M4 is now required. Clarify what is
16052 meant by "larger grammars". Mention the pt_BR translation.
16053 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16054 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16055 Bump version from 0.11.2 to 0.11.5.
16056 (BISON_PREREQ_STAGE): Remove.
16057 (AM_GNU_GETTEXT): Use external gettext.
16058 (AC_OUTPUT): Remove intl/Makefile.
16059
16060 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16061
16062 * data/glr.c: Include string.h, for strlen.
16063 (yyreportParseError): Use size_t for yysize.
16064 (yy_yypstack): No longer nested inside yypstates, as nested
16065 functions are not portable. Do not assume size_t is the
16066 same width as int.
16067 (yypstates): Do not assume that ptrdiff_t is the same width
16068 as int, and similarly for yyposn and YYINDEX.
16069
16070 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16071
16072 * lib/Makefile.am (INCLUDES): Do not include from the intl
16073 directory, which has been removed.
16074 * src/Makefile.am (INCLUDES): Likewise.
16075
16076 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16077 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16078 New vars.
16079
16080 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16081 * tests/Makefile.am (EXTRA_DIST): Likewise.
16082
16083 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16084 Do not assume that bitset_windex is the same width as unsigned.
16085
16086 * lib/abitset.c (abitset_unused_clear): Do not assume that
16087 bitset_word is the same width as int.
16088 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16089 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16090 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16091 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16092 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16093
16094 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16095 portability to one's complement hosts!).
16096 * lib/ebitset.c (ebitset_op1): Likewise.
16097 * lib/lbitset.c (lbitset_op1): Likewise.
16098
16099 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16100 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16101 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16102 Sync with fileutils.
16103 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16104 lib/gettext.h: Sync with diffutils.
16105
16106 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16107 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16108
16109 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16110 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16111 check for void *.
16112
16113 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16114 size_t; the old version tried to do this but casted improperly.
16115 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16116 (bitset_test): Now returns int, not unsigned long.
16117
16118 * lib/bitset_stats.c: Include "gettext.h".
16119 (_): New macro.
16120 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16121 name locals "index", as it generates unnecessary warnings on some
16122 hosts that have an "index" function.
16123
16124 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16125 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16126 they need translation.
16127 * src/LR0.c (state_list_append, new_itemsets, get_state,
16128 append_states, generate_states): Likewise.
16129 * src/assoc.c (assoc_to_string): Likewise.
16130 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16131 * src/gram.c (grammar_dump): Likewise.
16132 * src/injections.c (injections_compute): Likewise.
16133 * src/lalr.c (lookaheads_print): Likewise.
16134 * src/relation.c (relation_transpose): Likewise.
16135 * src/scan-gram.l: Likewise.
16136 * src/tables.c (table_grow, pack_vector): Likewise.
16137
16138 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16139 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16140 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16141 * m4/mbstate_t.m4: Sync with fileutils.
16142 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16143
16144 * po/LINGUAS: Add pt_BR.
16145 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16146 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16147 lib/timevar.c.
16148 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16149 manual recommends.
16150 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16151
16152 * src/complain.c (strerror_r): Remove decl; not needed.
16153 (strerror): Use same pattern as ../lib/error.c.
16154
16155 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16156
16157 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16158
16159 * src/main.c (main): Cast result of bindtextdomain and textdomain
16160 to void, to avoid a GCC warning when --disable-nls is in effect.
16161
16162 * src/scan-gram.l: Use strings rather than escapes when possible,
16163 to minimize the number of warnings from xgettext.
16164 (handle_action_dollar, handle_action_at): Don't use isdigit,
16165 as it mishandles negative chars and it may not work as expected
16166 outside the C locale.
16167
16168 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16169 this is a GCC extension and is not portable to other compilers.
16170
16171 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16172 Do not include <ctype.h>; no longer needed.
16173 Do not include <malloc.h>; no longer needed (and generates
16174 warnings on OpenBSD 3.0).
16175
16176 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16177 it's not portable.
16178
16179 * tests/regression.at: Do not use 'cc -c input.c -o input';
16180 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16181
16182 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16183 exit status as failure, not just exit status 1. Sun C exits
16184 with status 2 sometimes.
16185
16186 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16187 Use it for the two large tests.
16188
16189 2002-08-02 Akim Demaille <akim@epita.fr>
16190
16191 * src/conflicts.c (conflicts_output): Don't output rules never
16192 reduced here, since anyway that computation doesn't work.
16193 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16194 (rule_useless_p, rule_never_reduced_p): New.
16195 (grammar_rules_partial_print): Use a filter instead of a range.
16196 Display the title only if needed.
16197 (grammar_rules_print): Adjust.
16198 (grammar_rules_never_reduced_report): New.
16199 * src/tables.c (action_row): Move the computation of rules never
16200 reduced to...
16201 (token_actions): here.
16202 * src/main.c (main): Make the parser before making the report, so
16203 that rules never reduced are computed.
16204 Call grammar_rules_never_reduced_report.
16205 * src/print.c (print_results): Report rules never reduced.
16206 * tests/conflicts.at, tests/reduce.at: Adjust.
16207
16208 2002-08-01 Akim Demaille <akim@epita.fr>
16209
16210 Instead of attaching lookaheads and duplicating the rules being
16211 reduced by a state, attach the lookaheads to the reductions.
16212
16213 * src/state.h (state_t): Remove the `lookaheads',
16214 `lookaheads_rule' member.
16215 (reductions_t): Add a `lookaheads' member.
16216 Use a regular array for the `rules'.
16217 * src/state.c (reductions_new): Initialize the lookaheads member
16218 to 0.
16219 (state_rule_lookaheads_print): Adjust.
16220 * src/state.h, src/state.c (state_reductions_find): New.
16221 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16222 (count_rr_conflicts): Adjust.
16223 * src/lalr.c (LArule): Remove.
16224 (add_lookback_edge): Adjust.
16225 (state_lookaheads_count): New.
16226 (states_lookaheads_initialize): Merge into...
16227 (initialize_LA): this.
16228 (lalr_free): Adjust.
16229 * src/main.c (main): Don't free nullable and derives too early: it
16230 is used by --verbose.
16231 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16232
16233 2002-08-01 Akim Demaille <akim@epita.fr>
16234
16235 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16236 `rule_number_t**'.
16237 (set_derives, free_derives): Rename as...
16238 (derives_compute, derives_free): this.
16239 Adjust all dependencies.
16240 * src/nullable.c (set_nullable, free_nullable): Rename as...
16241 (nullable_compute, nullable_free): these.
16242 (rule_list_t): Store rule_t *, not rule_number_t.
16243 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16244 pointers, instead of their numbers.
16245 * src/main.c (main): Call nullable_free, and derives_free earlier,
16246 as they were lo longer used.
16247
16248 2002-08-01 Akim Demaille <akim@epita.fr>
16249
16250 * lib/timevar.c (get_time): Include children time.
16251 * src/lalr.h (LA, LArule): Don't export them: used with the
16252 state_t.
16253 * src/lalr.c (LA, LArule): Static.
16254 * src/lalr.h, src/lalr.c (lalr_free): New.
16255 * src/main.c (main): Call it.
16256 * src/tables.c (pack_vector): Check whether loc is >= to the
16257 table_size, not >.
16258 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16259 (tables_generate): do it, since that's also it which allocates
16260 them.
16261 Don't free LA and LArule, main does.
16262
16263 2002-07-31 Akim Demaille <akim@epita.fr>
16264
16265 Separate parser tables computation and output.
16266
16267 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16268 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16269 (yydefgoto, yydefact, high): Move to...
16270 * src/tables.h, src/tables.c: here.
16271 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16272 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16273 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16274 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16275 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16276 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16277 (action_row, save_row, token_actions, save_column, default_goto)
16278 (goto_actions, sort_actions, matching_state, pack_vector)
16279 (table_ninf_remap, pack_table, prepare_actions): Move to...
16280 * src/tables.c: here.
16281 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16282 * src/output.c (token_actions, output_base, output_conflicts)
16283 (output_check): Merge into...
16284 (prepare_actions): this.
16285 (actions_output): Rename as...
16286 (user_actions_output): this.
16287 * src/main.c (main): Call tables_generate and tables_free.
16288
16289 2002-07-31 Akim Demaille <akim@epita.fr>
16290
16291 Steal GCC's --time-report support.
16292
16293 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16294 stolen/adjusted from GCC.
16295 * m4/stage.m4: Remove time related checks.
16296 * m4/timevar.m4: New.
16297 * configure.in: Adjust.
16298 * src/system.h: Adjust to using timevar.h.
16299 * src/getargs.h, src/getargs.c: Support trace_time for
16300 --trace=time.
16301 * src/main.c (stage): Remove.
16302 (main): Replace `stage' invocations with timevar calls.
16303 * src/output.c: Insert pertinent timevar calls.
16304
16305 2002-07-31 Akim Demaille <akim@epita.fr>
16306
16307 Let --trace have arguments.
16308
16309 * src/getargs.h (enum trace_e): New.
16310 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16311 (long_options, short_options): --trace/-T takes an optional
16312 argument.
16313 Change all the uses of trace_flag to reflect the new flags.
16314 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16315
16316 Strengthen `stage' portability.
16317
16318 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16319 * configure.in: Use it.
16320 Don't check for malloc.h and sys/times.h.
16321 * src/system.h: Include them when appropriate.
16322 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16323 times and struct tms are available.
16324
16325 2002-07-30 Akim Demaille <akim@epita.fr>
16326
16327 In verbose parse error message, don't report `error' as an
16328 expected token.
16329 * tests/actions.at (Printers and Destructors): Adjust.
16330 * tests/calc.at (Calculator $1): Adjust.
16331 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16332 error message, do not report the parser accepts the error token in
16333 that state.
16334
16335 2002-07-30 Akim Demaille <akim@epita.fr>
16336
16337 Normalize conflict related messages.
16338
16339 * src/complain.h, src/complain.c (warn, complain): New.
16340 * src/conflicts.c (conflicts_print): Use them.
16341 (conflict_report_yacc): New, extracted from...
16342 (conflicts_print): here.
16343 * tests/conflicts.at, tests/existing.at: Adjust.
16344
16345 2002-07-30 Akim Demaille <akim@epita.fr>
16346
16347 Report rules which are never reduced by the parser: those hidden
16348 by conflicts.
16349
16350 * src/LR0.c (save_reductions): Don't make the final state too
16351 different: save its reduction (accept) instead of having a state
16352 without any action (no shift or goto, no reduce).
16353 Note: the final state is now a ``regular'' state, i.e., the
16354 parsers now contain `reduce 0' as default reduction.
16355 Nevertheless, since they decide to `accept' when yystate =
16356 final_state, they still will not reduce rule 0.
16357 * src/print.c (print_actions, print_reduction): Adjust.
16358 * src/output.c (action_row): Track reduced rules.
16359 (token_actions): Report rules never reduced.
16360 * tests/conflicts.at, tests/regression.at: Adjust.
16361
16362 2002-07-30 Akim Demaille <akim@epita.fr>
16363
16364 `stage' was accidently included in a previous patch.
16365 Initiate its autoconfiscation.
16366
16367 * configure.in: Look for malloc.h and sys/times.h.
16368 * src/main.c (stage): Adjust.
16369 Report only when trace_flag.
16370
16371 2002-07-29 Akim Demaille <akim@epita.fr>
16372
16373 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16374 state_number_t.
16375 (errs_t): symbol_t*, not symbol_number_t.
16376 (reductions_t): rule_t*, not rule_number_t.
16377 (FOR_EACH_SHIFT): New.
16378 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16379 * src/print.c, src/print_graph.c: Adjust.
16380
16381 2002-07-29 Akim Demaille <akim@epita.fr>
16382
16383 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16384
16385 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16386 (endtoken, accept): these.
16387 * src/reader.c (reader): Set endtoken's default tag to "$end".
16388 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16389 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16390 Adjust.
16391
16392 2002-07-29 Akim Demaille <akim@epita.fr>
16393
16394 * src/reduce.c (reduce_grammar): When the language is empty,
16395 complain about the start symbol, not the axiom.
16396 Use its location.
16397 * tests/reduce.at (Empty Language): New.
16398
16399 2002-07-26 Akim Demaille <akim@epita.fr>
16400
16401 * src/reader.h, src/reader.c (gram_error): ... can't get
16402 yycontrol without making too strong assumptions on the parser
16403 itself.
16404 * src/output.c (prepare_tokens): Use the real 0th value of
16405 token_translations instead of `0'.
16406 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16407 visible here.
16408 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16409 for the time being: %locations ought to provide it to yyerror.
16410
16411 2002-07-25 Akim Demaille <akim@epita.fr>
16412
16413 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16414 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16415 * tests/regression.at (Web2c Actions): Adjust.
16416
16417 2002-07-25 Akim Demaille <akim@epita.fr>
16418
16419 Stop storing rules from 1 to nrules + 1.
16420
16421 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16422 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16423 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16424 Iterate from 0 to nrules.
16425 Use rule_number_as_item_number and item_number_as_rule_number.
16426 Adjust to `derive' now containing possibly 0.
16427 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16428 Handle the `- 1' part in rule numbers from/to item numbers.
16429 * src/conflicts.c (log_resolution): Fix the message which reversed
16430 shift and reduce.
16431 * src/output.c (action_row): Initialize default_rule to -1.
16432 (token_actions): Adjust.
16433 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16434 expected output.
16435 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16436
16437 2002-07-25 Akim Demaille <akim@epita.fr>
16438
16439 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16440 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16441 (b4_c_knr_arg_decl): New.
16442 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16443 yyreport_parse_error.
16444
16445 2002-07-25 Akim Demaille <akim@epita.fr>
16446
16447 * data/yacc.c (yyreport_parse_error): New, extracted from...
16448 (yyparse): here.
16449 (yydestruct, yysymprint): Move above yyparse.
16450 Be K&R compliant.
16451
16452 2002-07-25 Akim Demaille <akim@epita.fr>
16453
16454 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16455 replace...
16456 (b4_sint_type, b4_uint_type): these.
16457 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16458 * tests/regression.at (Web2c Actions): Adjust.
16459
16460 2002-07-25 Akim Demaille <akim@epita.fr>
16461
16462 * src/gram.h (TIEM_NUMBER_MAX): New.
16463 (item_number_of_rule_number, rule_number_of_item_number): Rename
16464 as...
16465 (rule_number_as_item_number, item_number_as_rule_number): these.
16466 Adjust dependencies.
16467 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16468 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16469 (symbol_number_to_vector_number): New.
16470 (order): Of vector_number_t* type.
16471 (base_t, BASE_MAX, BASE_MIN): New.
16472 (froms, tos, width, pos, check): Of base_t type.
16473 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16474 (actrow): Of action_number_t type.
16475 (conflrow): Of unsigned int type.
16476 (table_ninf, base_ninf): New.
16477 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16478 (muscle_insert_int_table, muscle_insert_base_table)
16479 (muscle_insert_rule_number_table): New.
16480 (prepare_tokens): Output `toknum' as int_table.
16481 (action_row): Returns a rule_number_t.
16482 Use ACTION_MIN, not SHRT_MIN.
16483 (token_actions): yydefact is rule_number_t*.
16484 (table_ninf_remap): New.
16485 (pack_table): Use it for `base' and `table'.
16486 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16487 replaced with...
16488 (YYPACT_NINF, YYTABLE_NINF): these.
16489 (yypact, yytable): Compute their types instead of hard-coded
16490 `short'.
16491 * tests/regression.at (Web2c Actions): Adjust.
16492
16493 2002-07-19 Akim Demaille <akim@epita.fr>
16494
16495 * src/scan-gram.l (id): Can start with an underscore.
16496
16497 2002-07-16 Akim Demaille <akim@epita.fr>
16498
16499 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16500 Adjust all former `associativity' dependencies.
16501 * src/symtab.c (symbol_new): Default associativity is `undef', not
16502 `right'.
16503 (symbol_check_alias_consistence): Adjust.
16504
16505 2002-07-09 Akim Demaille <akim@epita.fr>
16506
16507 * doc/bison.texinfo: Properly set the ``header'' part.
16508 Use @dircategory ``GNU programming tools'' as per Texinfo's
16509 documentation.
16510 Use @copying.
16511
16512 2002-07-09 Akim Demaille <akim@epita.fr>
16513
16514 * lib/quotearg.h: Protect against multiple inclusions.
16515 * src/location.h (location_t): Add a `file' member.
16516 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16517 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16518 `error_one_per_line' support.
16519
16520 2002-07-09 Akim Demaille <akim@epita.fr>
16521
16522 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16523 * src/reader.c (lineno): Remove.
16524 Adjust all dependencies.
16525 (get_merge_function): Take a location and use complain_at.
16526 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16527 * tests/regression.at (Invalid inputs, Mixing %token styles):
16528 Adjust.
16529
16530 2002-07-09 Akim Demaille <akim@epita.fr>
16531
16532 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16533 recovery rule, and forbid extensions when --yacc.
16534 (gram_error): Use complain_at.
16535 * src/reader.c (reader): Exit if there were parse errors.
16536
16537 2002-07-09 Akim Demaille <akim@epita.fr>
16538
16539 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16540 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16541 Reported by R Blake <blakers@mac.com>.
16542
16543 2002-07-09 Akim Demaille <akim@epita.fr>
16544
16545 * data/yacc.c: Output the copyright notive in the header.
16546
16547 2002-07-03 Akim Demaille <akim@epita.fr>
16548
16549 * src/output.c (froms, tos): Are state_number_t.
16550 (save_column): sp, sp1, and sp2 are state_number_t.
16551 (prepare): Rename `final' as `final_state_number', `nnts' as
16552 `nterms_number', `nrules' as `rules_number', `nstates' as
16553 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16554 unused.
16555 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16556 * data/lalr1.cc (nsym_): Remove, unused.
16557
16558 2002-07-03 Akim Demaille <akim@epita.fr>
16559
16560 * src/lalr.h, src/lalr.c (goto_number_t): New.
16561 * src/lalr.c (goto_list_t): New.
16562 Propagate them.
16563 * src/nullable.c (rule_list_t): New.
16564 Propagate.
16565 * src/types.h: Remove.
16566
16567 2002-07-03 Akim Demaille <akim@epita.fr>
16568
16569 * src/closure.c (print_fderives): Use rule_rhs_print.
16570 * src/derives.c (print_derives): Use rule_rhs_print.
16571 (rule_list_t): New, replaces `shorts'.
16572 (set_derives): Add comments.
16573 * tests/sets.at (Nullable, Firsts): Adjust.
16574
16575 2002-07-03 Akim Demaille <akim@epita.fr>
16576
16577 * src/output.c (prepare_actions): Free `tally' and `width'.
16578 (prepare_actions): Allocate and free `order'.
16579 * src/symtab.c (symbols_free): Free `symbols'.
16580 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16581 * src/output.c (m4_invoke): Move to...
16582 * src/scan-skel.l: here.
16583 (<<EOF>>): Close yyout, and free its name.
16584
16585 2002-07-03 Akim Demaille <akim@epita.fr>
16586
16587 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16588
16589 * src/LR0.c (new_state): Merge into...
16590 (state_list_append): this.
16591 (new_states): Merge into...
16592 (generate_states): here.
16593 (set_states): Don't ensure a proper `errs' state member here, do it...
16594 * src/conflicts.c (conflicts_solve): here.
16595 * src/state.h, src/state.c: Comment changes.
16596 (state_t): Rename member `shifts' as `transitions'.
16597 Adjust all dependencies.
16598 (errs_new): For consistency, also take the values as argument.
16599 (errs_dup): Remove.
16600 (state_errs_set): New.
16601 (state_reductions_set, state_transitions_set): Assert that no
16602 previous value was assigned.
16603 (state_free): New.
16604 (states_free): Use it.
16605 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16606 temporary storage: use `errs' and `nerrs' as elsewhere.
16607 (set_conflicts): Allocate and free this `errs'.
16608
16609 2002-07-02 Akim Demaille <akim@epita.fr>
16610
16611 * lib/libiberty.h: New.
16612 * lib: Update the bitset implementation from upstream.
16613 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16614 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16615 * src/main.c: Adjust bitset stats calls.
16616
16617 2002-07-01 Paul Eggert <eggert@twinsun.com>
16618
16619 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16620 char, so that negative chars don't collide with $.
16621
16622 2002-06-30 Akim Demaille <akim@epita.fr>
16623
16624 Have the GLR tests be `warning' checked, and fix the warnings.
16625
16626 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16627 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16628 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16629 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16630 (yyaddDeferredAction): static.
16631 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16632 (yyreportParseError): yyprefix is const.
16633 yytokenp is used only when verbose.
16634 (yy__GNUC__): Replace with __GNUC__.
16635 (yypdumpstack): yyi is size_t.
16636 (yypreference): Un-yy local variables and arguments, to avoid
16637 clashes with `yyr1'. Anyway, we are not in the user name space.
16638 (yytname_size): be an int, as is compared with ints.
16639 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16640 Use them.
16641 * tests/cxx-gram.at: Use quotation to protect $1.
16642 Use AT_COMPILE to enable warnings hunts.
16643 Prototype yylex and yyerror.
16644 `Use' argc.
16645 Include `string.h', not `strings.h'.
16646 Produce and prototype stmtMerge only when used.
16647 yylex takes a location.
16648
16649 2002-06-30 Akim Demaille <akim@epita.fr>
16650
16651 We spend a lot of time in quotearg, in particular when --verbose.
16652
16653 * src/symtab.c (symbol_get): Store a quoted version of the key.
16654 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16655 Adjust all callers.
16656
16657 2002-06-30 Akim Demaille <akim@epita.fr>
16658
16659 * src/state.h (reductions_t): Rename member `nreds' as num.
16660 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16661 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16662
16663 2002-06-30 Akim Demaille <akim@epita.fr>
16664
16665 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16666 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16667 (shifts_to): Rename as...
16668 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16669 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16670 (TRANSITION_IS_DISABLED, transitions_to): these.
16671
16672 2002-06-30 Akim Demaille <akim@epita.fr>
16673
16674 * src/print.c (print_shifts, print_gotos): Merge into...
16675 (print_transitions): this.
16676 (print_transitions, print_errs, print_reductions): Align the
16677 lookaheads columns.
16678 (print_core, print_transitions, print_errs, print_state,
16679 print_grammar): Output empty lines separator before, not after.
16680 (state_default_rule_compute): Rename as...
16681 (state_default_rule): this.
16682 * tests/conflicts.at (Defaulted Conflicted Reduction),
16683 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16684 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16685
16686 2002-06-30 Akim Demaille <akim@epita.fr>
16687
16688 Display items as we display rules.
16689
16690 * src/gram.h, src/gram.c (rule_lhs_print): New.
16691 * src/gram.c (grammar_rules_partial_print): Use it.
16692 * src/print.c (print_core): Likewise.
16693 * tests/conflicts.at (Defaulted Conflicted Reduction),
16694 (Unresolved SR Conflicts): Adjust.
16695 (Unresolved SR Conflicts): Adjust and rename as...
16696 (Resolved SR Conflicts): this, as was meant.
16697 * tests/regression.at (Web2c Report): Adjust.
16698
16699 2002-06-30 Akim Demaille <akim@epita.fr>
16700
16701 * src/print.c (state_default_rule_compute): New, extracted from...
16702 (print_reductions): here.
16703 Pessimize, but clarify the code.
16704 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16705
16706 2002-06-30 Akim Demaille <akim@epita.fr>
16707
16708 * src/output.c (action_row): Let default_rule be always a rule
16709 number.
16710
16711 2002-06-30 Akim Demaille <akim@epita.fr>
16712
16713 * src/closure.c (print_firsts, print_fderives, closure):
16714 Use BITSET_EXECUTE.
16715 * src/lalr.c (lookaheads_print): Likewise.
16716 * src/state.c (state_rule_lookaheads_print): Likewise.
16717 * src/print_graph.c (print_core): Likewise.
16718 * src/print.c (print_reductions): Likewise.
16719 * src/output.c (action_row): Likewise.
16720 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16721
16722 2002-06-30 Akim Demaille <akim@epita.fr>
16723
16724 * src/print_graph.c: Use report_flag.
16725
16726 2002-06-30 Akim Demaille <akim@epita.fr>
16727
16728 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16729 to...
16730 * src/relation.h, src/relation.c (traverse, relation_digraph)
16731 (relation_print, relation_transpose): New.
16732
16733 2002-06-30 Akim Demaille <akim@epita.fr>
16734
16735 * src/state.h, src/state.c (shifts_to): New.
16736 * src/lalr.c (build_relations): Use it.
16737
16738 2002-06-30 Akim Demaille <akim@epita.fr>
16739
16740 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16741 (item_number_of_rule_number, rule_number_of_item_number): New.
16742 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16743 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16744 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16745 Propagate their use.
16746 Much remains to be done, in particular wrt `shorts' from types.h.
16747
16748 2002-06-30 Akim Demaille <akim@epita.fr>
16749
16750 * src/symtab.c (symbol_new): Initialize the `printer' member.
16751
16752 2002-06-30 Akim Demaille <akim@epita.fr>
16753
16754 * src/LR0.c (save_reductions): Remove, replaced by...
16755 * src/state.h, src/state.c (state_reductions_set): New.
16756 (reductions, errs): Rename as...
16757 (reductions_t, errs_t): these.
16758 Adjust all dependencies.
16759
16760 2002-06-30 Akim Demaille <akim@epita.fr>
16761
16762 * src/LR0.c (state_list_t, state_list_append): New.
16763 (first_state, last_state): Now symbol_list_t.
16764 (this_state): Remove.
16765 (new_itemsets, append_states, save_reductions): Take a state_t as
16766 argument.
16767 (set_states, generate_states): Adjust.
16768 (save_shifts): Remove, replaced by...
16769 * src/state.h, src/state.c (state_shifts_set): New.
16770 (shifts): Rename as...
16771 (shifts_t): this.
16772 Adjust all dependencies.
16773 * src/state.h (state_t): Remove the `next' member.
16774
16775 2002-06-30 Akim Demaille <akim@epita.fr>
16776
16777 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16778 escaped in slot 0.
16779
16780 2002-06-30 Akim Demaille <akim@epita.fr>
16781
16782 Use hash.h for the state hash table.
16783
16784 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16785 (allocate_storage): Use state_hash_new.
16786 (free_storage): Use state_hash_free.
16787 (new_state, get_state): Adjust.
16788 * src/lalr.h, src/lalr.c (states): Move to...
16789 * src/states.h (state_t): Remove the `link' member, no longer
16790 used.
16791 * src/states.h, src/states.c: here.
16792 (state_hash_new, state_hash_free, state_hash_lookup)
16793 (state_hash_insert, states_free): New.
16794 * src/states.c (state_table, state_compare, state_hash): New.
16795 * src/output.c (output_actions): Do not free states now, since we
16796 still need to know the final_state number in `prepare', called
16797 afterwards. Do it...
16798 * src/main.c (main): here: call states_free after `output'.
16799
16800 2002-06-30 Akim Demaille <akim@epita.fr>
16801
16802 * src/state.h, src/state.c (state_new): New, extracted from...
16803 * src/LR0.c (new_state): here.
16804 * src/state.h (STATE_ALLOC): Move to...
16805 * src/state.c: here.
16806 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16807 * src/state.h, src/state.c: here.
16808
16809 2002-06-30 Akim Demaille <akim@epita.fr>
16810
16811 * src/reader.c (gensym): Rename as...
16812 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16813 (getsym): Rename as...
16814 (symbol_get): this.
16815
16816 2002-06-30 Akim Demaille <akim@epita.fr>
16817
16818 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16819 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16820 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16821 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16822
16823 2002-06-30 Akim Demaille <akim@epita.fr>
16824
16825 Make the test suite pass with warnings checked.
16826
16827 * tests/actions.at (Printers and Destructors): Improve.
16828 Avoid unsigned vs. signed issues.
16829 * tests/calc.at: Don't exercise the scanner here, do it...
16830 * tests/input.at (Torturing the Scanner): here.
16831
16832 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16833
16834 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16835 reorganize first lines parallel to yacc.c.
16836
16837 2002-06-28 Akim Demaille <akim@epita.fr>
16838
16839 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16840 (b4_token_enum, b4_token_defines): New, factored from...
16841 * data/lalr1.cc, data/yacc.c, glr.c: here.
16842
16843 2002-06-28 Akim Demaille <akim@epita.fr>
16844
16845 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16846 unused variables.
16847 * src/output.c (merger_output): static.
16848
16849 2002-06-28 Akim Demaille <akim@epita.fr>
16850
16851 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16852 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16853 pacify GCC.
16854 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16855
16856 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16857
16858 Accumulated changelog for new GLR parsing features.
16859
16860 * src/conflicts.c (count_total_conflicts): Change name to
16861 conflicts_total_count.
16862 * src/conflicts.h: Ditto.
16863 * src/output.c (token_actions): Use the new name.
16864 (output_conflicts): Change conflp => conflict_list_heads, and
16865 confl => conflict_list for better readability.
16866 * data/glr.c: Use the new names.
16867 * NEWS: Add self to GLR announcement.
16868
16869 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16870
16871 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16872 Akim Demaille.
16873
16874 * data/bison.glr: Change name to glr.c
16875 * data/glr.c: Renamed from bison.glr.
16876 * data/Makefile.am: Add glr.c
16877
16878 * src/getargs.c:
16879
16880 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16881 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16882
16883 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16884
16885 * data/bison.glr: Be sure to restore the
16886 current #line when returning to the skeleton contents after having
16887 exposed the input file's #line.
16888
16889 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16890
16891 * data/bison.glr: Bring up to date with changes to bison.simple.
16892
16893 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16894
16895 * data/bison.glr: Correct definitions that use b4_prefix.
16896 Various reformatting.
16897 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16898 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16899 yytokenp argument; now part of stack.
16900 (yychar): Define to behave as documented.
16901 (yyclearin): Ditto.
16902
16903 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16904
16905 * src/reader.h: Add declaration for free_merger_functions.
16906
16907 * src/reader.c (merge_functions): New variable.
16908 (get_merge_function): New function.
16909 (free_merger_functions): New function.
16910 (readgram): Check for %prec that is not followed by a symbol.
16911 Handle %dprec and %merge declarations.
16912 (packgram): Initialize dprec and merger fields in rules array.
16913
16914 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16915 conflict_list_cnt, conflict_list_free): New variables.
16916 (table_grow): Also grow conflict_table.
16917 (prepare_rules): Output dprec and merger tables.
16918 (conflict_row): New function.
16919 (action_row): Output conflict lists for GLR parser. Don't use
16920 default reduction in conflicted states for GLR parser so that there
16921 are spaces for the conflict lists.
16922 (save_row): Also save conflict information.
16923 (token_actions): Allocate conflict list.
16924 (merger_output): New function.
16925 (pack_vector): Pack conflict table, too.
16926 (output_conflicts): New function to output yyconflp and yyconfl.
16927 (output_check): Allocate conflict_tos.
16928 (output_actions): Output conflict tables, also.
16929 (output_skeleton): Output b4_mergers definition.
16930 (prepare): Output b4_max_rhs_length definition.
16931 Use 'bison.glr' as default skeleton for GLR parsers.
16932
16933 * src/gram.c (glr_parser): New flag.
16934 (grammar_free): Call free_merger_functions.
16935
16936 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16937 all pairs of conflicting reductions, rather than just all tokens
16938 causing conflicts. Needed to size conflict tables.
16939 (conflicts_output): Modify call to count_rr_conflicts for new
16940 interface.
16941 (conflicts_print): Ditto.
16942 (count_total_conflicts): New function.
16943
16944 * src/reader.h (merger_list): New type.
16945 (merge_functions): New variable.
16946
16947 * src/lex.h (tok_dprec, tok_merge): New token types.
16948
16949 * src/gram.h (rule_s): Add dprec and merger fields.
16950 (glr_parser): New flag.
16951
16952 * src/conflicts.h (count_total_conflicts): New function.
16953
16954 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16955
16956 * doc/bison.texinfo (Generalized LR Parsing): New section.
16957 (GLR Parsers): New section.
16958 (Language and Grammar): Mention GLR parsing.
16959 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16960 Correct typo ("tge" -> "the").
16961
16962 * data/bison.glr: New skeleton for GLR parsing.
16963
16964 * tests/cxx-gram.at: New tests for GLR parsing.
16965
16966 * tests/testsuite.at: Include cxx-gram.at.
16967
16968 * tests/Makefile.am: Add cxx-gram.at.
16969
16970 * src/parse-gram.y:
16971
16972 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16973
16974 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16975
16976 2002-06-27 Akim Demaille <akim@epita.fr>
16977
16978 * src/options.h, src/options.c: Remove.
16979 * src/getargs.c (short_options, long_options): New.
16980
16981 2002-06-27 Akim Demaille <akim@epita.fr>
16982
16983 * data/bison.simple, data/bison.c++: Rename as...
16984 * data/yacc.c, data/lalr1.cc: these.
16985 * doc/bison.texinfo (Environment Variables): Remove.
16986
16987 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16988
16989 * src/getargs.c (report_argmatch): Initialize strtok().
16990
16991 2002-06-20 Akim Demaille <akim@epita.fr>
16992
16993 * data/bison.simple (b4_symbol_actions): New, replaces...
16994 (b4_symbol_destructor, b4_symbol_printer): these.
16995 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16996 user token numbers.
16997
16998 2002-06-20 Akim Demaille <akim@epita.fr>
16999
17000 * data/bison.simple (yydestructor): Rename as...
17001 (yydestruct): this.
17002
17003 2002-06-20 Akim Demaille <akim@epita.fr>
17004
17005 * src/symtab.h, src/symtab.c (symbol_type_set)
17006 (symbol_destructor_set, symbol_precedence_set): The location is
17007 the last argument.
17008 Adjust all callers.
17009
17010 2002-06-20 Akim Demaille <akim@epita.fr>
17011
17012 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17013 internals.
17014 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17015 Takes a location.
17016 * src/symtab.h, src/symtab.c (symbol_class_set)
17017 (symbol_user_token_number_set): Likewise.
17018 Adjust all callers.
17019 Promote complain_at.
17020 * tests/input.at (Type Clashes): Adjust.
17021
17022 2002-06-20 Akim Demaille <akim@epita.fr>
17023
17024 * data/bison.simple (YYLEX): Fix the declaration when
17025 %pure-parser.
17026
17027 2002-06-20 Akim Demaille <akim@epita.fr>
17028
17029 * data/bison.simple (yysymprint): Don't print the token number,
17030 just its name.
17031 * tests/actions.at (Destructors): Rename as...
17032 (Printers and Destructors): this.
17033 Also exercise %printer.
17034
17035 2002-06-20 Akim Demaille <akim@epita.fr>
17036
17037 * data/bison.simple (YYDSYMPRINT): New.
17038 Use it to remove many of the #if YYDEBUG/if (yydebug).
17039
17040 2002-06-20 Akim Demaille <akim@epita.fr>
17041
17042 * src/symtab.h, src/symtab.c (symbol_t): printer and
17043 printer_location are new members.
17044 (symbol_printer_set): New.
17045 * src/parse-gram.y (PERCENT_PRINTER): New token.
17046 Handle its associated rule.
17047 * src/scan-gram.l: Adjust.
17048 (handle_destructor_at, handle_destructor_dollar): Rename as...
17049 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17050 * src/output.c (symbol_printers_output): New.
17051 (output_skeleton): Call it.
17052 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17053 since there are already many grammar files with a user `yyprint'.
17054 Replace the calls to YYPRINT to calls to yysymprint.
17055 * tests/calc.at: Adjust.
17056 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17057 taking advantage of parser very internal details (stack size!).
17058
17059 2002-06-20 Akim Demaille <akim@epita.fr>
17060
17061 * src/scan-gram.l: Complete the scanner with the missing patterns
17062 to pacify Flex.
17063 Use `quote' and `symbol_tag_get' where appropriate.
17064
17065 2002-06-19 Akim Demaille <akim@epita.fr>
17066
17067 * tests/actions.at (Destructors): Augment to test locations.
17068 * data/bison.simple (yydestructor): Pass it the current location
17069 if locations are enabled.
17070 Prototype only when __STDC__ or C++.
17071 Change the argument names to move into the yy name space: there is
17072 user code here.
17073
17074 2002-06-19 Akim Demaille <akim@epita.fr>
17075
17076 * data/bison.simple (b4_pure_if): New.
17077 Use it instead of #ifdef YYPURE.
17078
17079 2002-06-19 Akim Demaille <akim@epita.fr>
17080
17081 * data/bison.simple (b4_location_if): New.
17082 Use it instead of #ifdef YYLSP_NEEDED.
17083
17084 2002-06-19 Akim Demaille <akim@epita.fr>
17085
17086 Prepare @$ in %destructor, but currently don't bind it in the
17087 skeleton, as %location use is not cleaned up yet.
17088
17089 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17090 (handle_action_at): New.
17091 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17092 a braced_code_t and a location as additional arguments.
17093 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17094 unquote one when outputting `b4_dollar_dollar'.
17095 Adjust callers.
17096 * data/bison.simple (b4_eval): Remove.
17097 (b4_symbol_destructor): Adjust.
17098 * tests/input.at (Invalid @n): Adjust.
17099
17100 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17101
17102 * doc/bison.texinfo: Document ability to have multiple
17103 prologue sections.
17104
17105 2002-06-18 Akim Demaille <akim@epita.fr>
17106
17107 * src/files.c (compute_base_names): When computing the output file
17108 names from the input file name, strip the directory part.
17109
17110 2002-06-18 Akim Demaille <akim@epita.fr>
17111
17112 * data/bison.simple.new: Comment changes.
17113 Reported by Andreas Schwab.
17114
17115 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17116
17117 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17118 there are no `label `yyoverflowlab' defined but not used' warnings
17119 when yyoverflow is defined.
17120
17121 2002-06-18 Akim Demaille <akim@epita.fr>
17122
17123 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17124 new member.
17125 (symbol_destructor_set): Adjust.
17126 * src/output.c (symbol_destructors_output): Output the destructor
17127 locations.
17128 Output the symbol name.
17129 * data/bison.simple (b4_symbol_destructor): Adjust.
17130
17131 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17132 and Akim Demaille <akim@epita.fr>
17133
17134 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17135 what's left on the stack when the error recovery hits EOF.
17136 * tests/actions.at (Destructors): Complete to exercise this case.
17137
17138 2002-06-17 Akim Demaille <akim@epita.fr>
17139
17140 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17141 arguments is really empty, not only equal to `[]'.
17142 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17143 member.
17144 (symbol_destructor_set): New.
17145 * src/output.c (symbol_destructors_output): New.
17146 * src/reader.h (brace_code_t, current_braced_code): New.
17147 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17148 (handle_dollar): Rename as...
17149 (handle_action_dollar): this.
17150 (handle_destructor_dollar): New.
17151 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17152 (grammar_declaration): Use it.
17153 * data/bison.simple (yystos): Is always defined.
17154 (yydestructor): New.
17155 * tests/actions.at (Destructors): New.
17156 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17157
17158 2002-06-17 Akim Demaille <akim@epita.fr>
17159
17160 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17161 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17162 rule_length only when needed.
17163 * src/output.c (actions_output, token_definitions_output): Output
17164 the full M4 block.
17165 * src/symtab.c: Don't access directly to the symbol tag, use
17166 symbol_tag_get.
17167 * src/parse-gram.y: Use symbol_list_free.
17168
17169 2002-06-17 Akim Demaille <akim@epita.fr>
17170
17171 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17172 (symbol_list_prepend, get_type_name): Move to...
17173 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17174 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17175 Adjust all callers.
17176 (symbol_list_free): New.
17177 * src/scan-gram.l (handle_dollar): Takes a location.
17178 * tests/input.at (Invalid $n): Adjust.
17179
17180 2002-06-17 Akim Demaille <akim@epita.fr>
17181
17182 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17183 (symbol_list_prepend): New.
17184 * src/parse-gram.y (%union): `list' is a new member.
17185 (symbols.1): New, replaces...
17186 (terms_to_prec.1, nterms_to_type.1): these.
17187 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17188 Take a location as additional argument.
17189 Adjust all callers.
17190
17191 2002-06-15 Akim Demaille <akim@epita.fr>
17192
17193 * src/parse-gram.y: Move %token in the declaration section so that
17194 we don't depend upon CVS Bison.
17195
17196 2002-06-15 Akim Demaille <akim@epita.fr>
17197
17198 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17199 * src/print.c (print_core): Use it.
17200
17201 2002-06-15 Akim Demaille <akim@epita.fr>
17202
17203 * src/conflicts.c (log_resolution): Accept the rule involved in
17204 the sr conflicts instead of the lookahead number that points to
17205 that rule.
17206 (flush_reduce): Accept the current lookahead vector as argument,
17207 instead of the index in LA.
17208 (resolve_sr_conflict): Accept the current number of lookahead
17209 bitset to consider for the STATE, instead of the index in LA.
17210 (set_conflicts): Adjust.
17211 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17212
17213 2002-06-15 Akim Demaille <akim@epita.fr>
17214
17215 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17216 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17217 Adjust all dependencies.
17218 * src/lalr.c (initialize_lookaheads): Split into...
17219 (states_lookaheads_count, states_lookaheads_initialize): these.
17220 (lalr): Adjust.
17221
17222 2002-06-15 Akim Demaille <akim@epita.fr>
17223
17224 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17225 out of...
17226 (grammar_rules_print): here.
17227 * src/reduce.c (reduce_output): Use it.
17228 * tests/reduce.at (Useless Rules, Reduced Automaton)
17229 (Underivable Rules): Adjust.
17230
17231 2002-06-15 Akim Demaille <akim@epita.fr>
17232
17233 Copy BYacc's nice way to report the grammar.
17234
17235 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17236 New.
17237 Don't print the rules' location, it is confusing and useless.
17238 (rule_print): Use grammar_rhs_print.
17239 * src/print.c (print_grammar): Use grammar_rules_print.
17240
17241 2002-06-15 Akim Demaille <akim@epita.fr>
17242
17243 Complete and rationalize `useless thing' warnings.
17244
17245 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17246 (symbol_tag_print): New.
17247 Use them everywhere in place of accessing directly the tag member.
17248 * src/gram.h, src/gram.c (rule_print): New.
17249 Use it where a rule used to be printed `by hand'.
17250 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17251 (reduce_grammar_tables): Report the useless rules.
17252 (reduce_print): Useless things are a warning, not an error.
17253 Report it as such.
17254 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17255 (Reduced Automaton, Underivable Rules): Adjust.
17256 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17257 * tests/conflicts.at (Unresolved SR Conflicts)
17258 (Solved SR Conflicts): Adjust.
17259
17260 2002-06-15 Akim Demaille <akim@epita.fr>
17261
17262 Let symbols have a location.
17263
17264 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17265 (getsym): Adjust.
17266 Adjust all callers.
17267 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17268 Use location_t, not int.
17269 * src/symtab.c (symbol_check_defined): Take advantage of the
17270 location.
17271 * tests/regression.at (Invalid inputs): Adjust.
17272
17273 2002-06-15 Akim Demaille <akim@epita.fr>
17274
17275 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17276 (input): Don't try to initialize yylloc here, do it in the
17277 scanner.
17278 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17279 * src/gram.h (rule_t): Change line and action_line into location
17280 and action_location, of location_t type.
17281 Adjust all dependencies.
17282 * src/location.h, src/location.c (empty_location): New.
17283 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17284 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17285 (grammar_current_rule_symbol_append)
17286 (grammar_current_rule_action_append): Expect a location as argument.
17287 * src/reader.c (grammar_midrule_action): Adjust to attach an
17288 action's location as dummy symbol location.
17289 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17290 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17291 the line numbers.
17292
17293 2002-06-14 Akim Demaille <akim@epita.fr>
17294
17295 Grammar declarations may be found in the grammar section.
17296
17297 * src/parse-gram.y (rules_or_grammar_declaration): New.
17298 (declarations): Each declaration may end with a semicolon, not
17299 just...
17300 (grammar_declaration): `"%union"'.
17301 (grammar): Branch to rules_or_grammar_declaration.
17302
17303 2002-06-14 Akim Demaille <akim@epita.fr>
17304
17305 * src/main.c (main): Invoke scanner_free.
17306
17307 2002-06-14 Akim Demaille <akim@epita.fr>
17308
17309 * src/output.c (m4_invoke): Extracted from...
17310 (output_skeleton): here.
17311 Free tempfile.
17312
17313 2002-06-14 Akim Demaille <akim@epita.fr>
17314
17315 * src/parse-gram.y (directives, directive, gram)
17316 (grammar_directives, precedence_directives, precedence_directive):
17317 Rename as...
17318 (declarations, declaration, grammar, grammar_declaration)
17319 (precedence_declaration, precedence_declarator): these.
17320 (symbol_declaration): New.
17321
17322 2002-06-14 Akim Demaille <akim@epita.fr>
17323
17324 * src/files.c (action_obstack): Remove, unused.
17325 (output_obstack): Remove it, and all its dependencies, as it is no
17326 longer needed.
17327 * src/reader.c (epilogue_set): Build the epilogue in the
17328 muscle_obstack.
17329 * src/output.h, src/output.c (muscle_obstack): Move to...
17330 * src/muscle_tab.h, src/muscle_tab.h: here.
17331 (muscle_init): Initialize muscle_obstack.
17332 (muscle_free): New.
17333 * src/main.c (main): Call it.
17334
17335 2002-06-14 Akim Demaille <akim@epita.fr>
17336
17337 * src/location.h: New, extracted from...
17338 * src/reader.h: here.
17339 * src/Makefile.am (noinst_HEADERS): Merge into
17340 (bison_SOURCES): this.
17341 Add location.h.
17342 * src/parse-gram.y: Use location_t instead of Bison's.
17343 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17344 Use location_t instead of ints.
17345
17346 2002-06-14 Akim Demaille <akim@epita.fr>
17347
17348 * data/bison.simple, data/bison.c++: Be sure to restore the
17349 current #line when returning to the skeleton contents after having
17350 exposed the input file's #line.
17351
17352 2002-06-12 Akim Demaille <akim@epita.fr>
17353
17354 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17355 eager.
17356 * tests/actions.at (Exotic Dollars): New.
17357
17358 2002-06-12 Akim Demaille <akim@epita.fr>
17359
17360 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17361 ['"/] too eagerly.
17362 * tests/input.at (Torturing the Scanner): New.
17363
17364 2002-06-11 Akim Demaille <akim@epita.fr>
17365
17366 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17367 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17368 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17369 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17370 * src/reader.c (reader): Use it.
17371
17372 2002-06-11 Akim Demaille <akim@epita.fr>
17373
17374 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17375 Adjust all callers.
17376 (scanner_last_string_free): New.
17377
17378 2002-06-11 Akim Demaille <akim@epita.fr>
17379
17380 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17381 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17382 (last_string, YY_OBS_FREE): New.
17383 Use them when returning an ID.
17384
17385 2002-06-11 Akim Demaille <akim@epita.fr>
17386
17387 Have Bison grammars parsed by a Bison grammar.
17388
17389 * src/reader.c, src/reader.h (prologue_augment): New.
17390 * src/reader.c (copy_definition): Remove.
17391
17392 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17393 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17394 (grammar_current_rule_prec_set, grammar_current_rule_check)
17395 (grammar_current_rule_symbol_append)
17396 (grammar_current_rule_action_append): Export.
17397 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17398 (symbol_list_action_append): Remove.
17399 Hook the routines from reader.
17400 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17401 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17402
17403 * src/reader.c (read_declarations): Remove, unused.
17404
17405 * src/parse-gram.y: Handle the epilogue.
17406 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17407 (grammar_start_symbol_set): this.
17408 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17409 * src/reader.c (readgram): Remove, unused.
17410 (reader): Adjust to insert eoftoken and axiom where appropriate.
17411
17412 * src/reader.c (copy_dollar): Replace with...
17413 * src/scan-gram.h (handle_dollar): this.
17414 * src/parse-gram.y: Remove `%thong'.
17415
17416 * src/reader.c (copy_at): Replace with...
17417 * src/scan-gram.h (handle_at): this.
17418
17419 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17420 New.
17421
17422 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17423 time being.
17424
17425 * src/reader.h, src/reader.c (grammar_rule_end): New.
17426
17427 * src/parse.y (current_type, current_class): New.
17428 Implement `%nterm', `%token' support.
17429 Merge `%term' into `%token'.
17430 (string_as_id): New.
17431 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17432 type name.
17433
17434 * src/parse-gram.y: Be sure to handle properly the beginning of
17435 rules.
17436
17437 * src/parse-gram.y: Handle %type.
17438 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17439
17440 * src/parse-gram.y: More directives support.
17441 * src/options.c: No longer handle source directives.
17442
17443 * src/parse-gram.y: Fix %output.
17444
17445 * src/parse-gram.y: Handle %union.
17446 Use the prologue locations.
17447 * src/reader.c (parse_union_decl): Remove.
17448
17449 * src/reader.h, src/reader.c (epilogue_set): New.
17450 * src/parse-gram.y: Use it.
17451
17452 * data/bison.simple, data/bison.c++: b4_stype is now either not
17453 defined, then default to int, or to the contents of %union,
17454 without `union' itself.
17455 Adjust.
17456 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17457
17458 * src/output.c (actions_output): Don't output braces, as they are
17459 already handled by the scanner.
17460
17461 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17462 characters to themselves.
17463
17464 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17465 that the epilogue has a proper #line.
17466
17467 * src/parse-gram.y: Handle precedence/associativity.
17468
17469 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17470 a terminal.
17471 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17472 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17473 at all to define terminals that cannot be emitted.
17474
17475 * src/scan-gram.l: Escape M4 characters.
17476
17477 * src/scan-gram.l: Working properly with escapes in user
17478 strings/characters.
17479
17480 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17481 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17482 grammar.
17483 Use more modest sizes, as for the time being the parser does not
17484 release memory, and therefore the process swallows a huge amount
17485 of memory.
17486
17487 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17488 stricter %token grammar.
17489
17490 * src/symtab.h (associativity): Add `undef_assoc'.
17491 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17492 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17493
17494 * tests/regression.at (Invalid %directive): Remove, as it is now
17495 meaningless.
17496 (Invalid inputs): Adjust to the new error messages.
17497 (Token definitions): The new grammar doesn't allow too many
17498 eccentricities.
17499
17500 * src/lex.h, src/lex.c: Remove.
17501 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17502 (copy_character, copy_string2, copy_string, copy_identifier)
17503 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17504 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17505 (parse_action): Remove.
17506 * po/POTFILES.in: Adjust.
17507
17508 2002-06-11 Akim Demaille <akim@epita.fr>
17509
17510 * src/reader.c (parse_action): Don't store directly into the
17511 rule's action member: return the action as a string.
17512 Don't require `rule_length' as an argument: compute it.
17513 (grammar_current_rule_symbol_append)
17514 (grammar_current_rule_action_append): New, eved out from
17515 (readgram): here.
17516 Remove `action_flag', `rulelength', unused now.
17517
17518 2002-06-11 Akim Demaille <akim@epita.fr>
17519
17520 * src/reader.c (grammar_current_rule_prec_set).
17521 (grammar_current_rule_check): New, eved out from...
17522 (readgram): here.
17523 Remove `xaction', `first_rhs': useless.
17524 * tests/input.at (Type clashes): New.
17525 * tests/existing.at (GNU Cim Grammar): Adjust.
17526
17527 2002-06-11 Akim Demaille <akim@epita.fr>
17528
17529 * src/reader.c (grammar_midrule_action): New, Eved out from
17530 (readgram): here.
17531
17532 2002-06-11 Akim Demaille <akim@epita.fr>
17533
17534 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17535 New.
17536 (readgram): Use them as replacement of inlined code, crule and
17537 crule1.
17538
17539 2002-06-11 Akim Demaille <akim@epita.fr>
17540
17541 * src/reader.c (grammar_end, grammar_symbol_append): New.
17542 (readgram): Use them.
17543 Make the use of `p' as local as possible.
17544
17545 2002-06-10 Akim Demaille <akim@epita.fr>
17546
17547 GCJ's parser requires the tokens to be defined before the prologue.
17548
17549 * data/bison.simple: Output the token definition before the user's
17550 prologue.
17551 * tests/regression.at (Braces parsing, Duplicate string)
17552 (Mixing %token styles): Check the output from bison.
17553 (Early token definitions): New.
17554
17555 2002-06-10 Akim Demaille <akim@epita.fr>
17556
17557 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17558 assigning twice the same user number to a token, so that we can
17559 use it in...
17560 * src/lex.c (lex): here.
17561 Also use `symbol_class_set' instead of hand written code.
17562 * src/reader.c (parse_assoc_decl): Likewise.
17563
17564 2002-06-10 Akim Demaille <akim@epita.fr>
17565
17566 * src/symtab.c, src/symtab.c (symbol_class_set)
17567 (symbol_user_token_number_set): New.
17568 * src/reader.c (parse_token_decl): Use them.
17569 Use a switch instead of ifs.
17570 Use a single argument.
17571
17572 2002-06-10 Akim Demaille <akim@epita.fr>
17573
17574 Remove `%thong' support as it is undocumented, unused, duplicates
17575 `%token's job, and creates useless e-mail traffic with people who
17576 want to know what it is, why it is undocumented, unused, and
17577 duplicates `%token's job.
17578
17579 * src/reader.c (parse_thong_decl): Remove.
17580 * src/options.c (option_table): Remove "thong".
17581 * src/lex.h (tok_thong): Remove.
17582
17583 2002-06-10 Akim Demaille <akim@epita.fr>
17584
17585 * src/symtab.c, src/symtab.c (symbol_type_set)
17586 (symbol_precedence_set): New.
17587 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17588 (value_components_used): Remove, unused.
17589
17590 2002-06-09 Akim Demaille <akim@epita.fr>
17591
17592 Move symbols handling code out of the reader.
17593
17594 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17595 (axiom): Move to...
17596 * src/symtab.h, src/symtab.c: here.
17597
17598 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17599 * src/reader.c (startval): Rename as...
17600 * src/symtab.h, src/symtab.c (startsymbol): this.
17601 * src/reader.c: Adjust.
17602
17603 * src/reader.c (symbol_check_defined, symbol_make_alias)
17604 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17605 (token_translations_init)
17606 Move to...
17607 * src/symtab.c: here.
17608 * src/reader.c (packsymbols): Move to...
17609 * src/symtab.h, src/symtab.c (symbols_pack): here.
17610 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17611 argument.
17612
17613 2002-06-03 Akim Demaille <akim@epita.fr>
17614
17615 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17616 then statements.
17617
17618 2002-06-03 Akim Demaille <akim@epita.fr>
17619
17620 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17621 structs with non literals.
17622 * src/scan-skel.l: never-interactive.
17623 * src/conflicts.c (enum conflict_resolution_e): No trailing
17624 comma.
17625 * src/getargs.c (usage): Split long literal strings.
17626 Reported by Hans Aberg.
17627
17628 2002-05-28 Akim Demaille <akim@epita.fr>
17629
17630 * data/bison.c++: Use C++ ostreams.
17631 (cdebug_): New member.
17632
17633 2002-05-28 Akim Demaille <akim@epita.fr>
17634
17635 * src/output.c (output_skeleton): Be sure to allocate enough room
17636 for `/' _and_ for `\0' in full_skeleton.
17637
17638 2002-05-28 Akim Demaille <akim@epita.fr>
17639
17640 * data/bison.c++: Catch up with bison.simple:
17641 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17642 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17643 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17644 and popping traces.
17645
17646 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17647
17648 * src/output.c (output_skeleton): Put an explicit path in front of
17649 the skeleton file name, rather than relying on the -I directory,
17650 to partially alleviate effects of having a skeleton file lying around
17651 in the current directory.
17652
17653 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17654
17655 * src/conflicts.c (log_resolution): Correct typo:
17656 obstack_printf should be obstack_fgrow1.
17657
17658 2002-05-26 Akim Demaille <akim@epita.fr>
17659
17660 * src/state.h (state_t): `solved_conflicts' is a new member.
17661 * src/LR0.c (new_state): Set it to 0.
17662 * src/conflicts.h, src/conflicts.c (print_conflicts)
17663 (free_conflicts, solve_conflicts): Rename as...
17664 (conflicts_print, conflicts_free, conflicts_solve): these.
17665 Adjust callers.
17666 * src/conflicts.c (enum conflict_resolution_e)
17667 (solved_conflicts_obstack): New, used by...
17668 (log_resolution): this.
17669 Adjust to attach the conflict resolution to each state.
17670 Complete the description with the precedence/associativity
17671 information.
17672 (resolve_sr_conflict): Adjust.
17673 * src/print.c (print_state): Output its solved_conflicts.
17674 * tests/conflicts.at (Unresolved SR Conflicts)
17675 (Solved SR Conflicts): Exercise --report=all.
17676
17677 2002-05-26 Akim Demaille <akim@epita.fr>
17678
17679 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17680 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17681 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17682 (token_number_t, item_number_as_token_number)
17683 (token_number_as_item_number, muscle_insert_token_number_table):
17684 Rename as...
17685 (symbol_number_t, item_number_as_symbol_number)
17686 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17687 these, since it is more appropriate.
17688
17689 2002-05-26 Akim Demaille <akim@epita.fr>
17690
17691 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17692 `Error:' lines.
17693 * data/bison.simple (yystos) [YYDEBUG]: New.
17694 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17695 error recovery.
17696 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17697
17698 2002-05-25 Akim Demaille <akim@epita.fr>
17699
17700 * doc/bison.texinfo (Debugging): Split into...
17701 (Tracing): this new section, its former contents, and...
17702 (Understanding): this new section.
17703 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17704 by...
17705 (report_flag): this.
17706 Adjust all dependencies.
17707 (report_args, report_types, report_argmatch): New.
17708 (usage, getargs): Report/support -r, --report.
17709 * src/options.h
17710 (struct option_table_struct): Rename as..,
17711 (struct option_table_s): this.
17712 Rename the `set_flag' member to `flag' to match with getopt_long's
17713 struct.
17714 * src/options.c (option_table): Split verbose into an entry for
17715 %verbose, and another for --verbose.
17716 Support --report/-r, so remove -r from the obsolete --raw.
17717 * src/print.c: Attach full item sets and lookaheads reports to
17718 report_flag instead of trace_flag.
17719 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17720
17721 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17722 and Paul Eggert <eggert@twinsun.com>
17723
17724 * data/bison.simple (yyparse): Correct error handling to conform to
17725 POSIX and yacc. Specifically, after syntax error is discovered,
17726 do not reduce further before shifting the error token.
17727 Clean up the code a bit by removing the labels yyerrdefault,
17728 yyerrhandle, yyerrpop.
17729 * NEWS: Document the above.
17730
17731 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17732
17733 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17734 type; it isn't always big enough, since it doesn't necessarily
17735 include non-terminals.
17736 (yytranslate): Expand definition of yy_token_number_type, so that
17737 the latter can be removed.
17738 (yy_token_number_type): Remove, only one use.
17739 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17740 don't use TokenNumberType as element type.
17741
17742 * tests/regression.at: Modify expected output to agree with change
17743 to yyr1 and yytranslate.
17744
17745 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17746
17747 * src/reader.c (parse_action): Use copy_character instead of
17748 obstack_1grow.
17749
17750 2002-05-13 Akim Demaille <akim@epita.fr>
17751
17752 * tests/regression.at (Token definitions): Prototype yylex and
17753 yyerror.
17754
17755 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17756
17757 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17758 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17759 32-bit arithmetic.
17760 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17761
17762 2002-05-07 Akim Demaille <akim@epita.fr>
17763
17764 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17765 avoid GCC warnings.
17766
17767 2002-05-07 Akim Demaille <akim@epita.fr>
17768
17769 Kill GCC warnings.
17770
17771 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17772 over the RHS of each rule.
17773 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17774 * src/state.h (state_t): Member `nitems' is unsigned short.
17775 * src/LR0.c (get_state): Adjust.
17776 * src/reader.c (packgram): Likewise.
17777 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17778 `Type'.
17779 (muscle_insert_int_table): Remove, unused.
17780 (prepare_rules): Remove `max'.
17781
17782 2002-05-06 Akim Demaille <akim@epita.fr>
17783
17784 * src/closure.c (print_firsts): Display of the symbol tags.
17785 (bitmatrix_print): Move to...
17786 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17787 here.
17788 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17789
17790 2002-05-06 Akim Demaille <akim@epita.fr>
17791
17792 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17793 hash_do_for_each.
17794
17795 2002-05-06 Akim Demaille <akim@epita.fr>
17796
17797 * src/LR0.c (new_state, get_state): Instead of using the global
17798 `kernel_size' and `kernel_base', have two new arguments:
17799 `core_size' and `core'.
17800 Adjust callers.
17801
17802 2002-05-06 Akim Demaille <akim@epita.fr>
17803
17804 * src/reader.c (packgram): No longer end `ritem' with a 0
17805 sentinel: it is not used.
17806
17807 2002-05-05 Akim Demaille <akim@epita.fr>
17808
17809 New experimental feature: display the lookaheads in the report and
17810 graph.
17811
17812 * src/print (print_core): When --trace-flag, display the rules
17813 lookaheads.
17814 * src/print_graph.c (print_core): Likewise.
17815 Swap the arguments.
17816 Adjust caller.
17817
17818 2002-05-05 Akim Demaille <akim@epita.fr>
17819
17820 * tests/torture.at (Many lookaheads): New test.
17821
17822 2002-05-05 Akim Demaille <akim@epita.fr>
17823
17824 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17825 (GENERATE_MUSCLE_INSERT_TABLE): this.
17826 (output_int_table, output_unsigned_int_table, output_short_table)
17827 (output_token_number_table, output_item_number_table): Replace with...
17828 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17829 (muscle_insert_short_table, muscle_insert_token_number_table)
17830 (muscle_insert_item_number_table): these.
17831 Adjust all callers.
17832 (prepare_tokens): Don't free `translations', since...
17833 * src/reader.h, src/reader.c (grammar_free): do it.
17834 Move to...
17835 * src/gram.h, src/gram.c (grammar_free): here.
17836 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17837 b4_translate_max.
17838
17839 2002-05-05 Akim Demaille <akim@epita.fr>
17840
17841 * src/output.c (output_unsigned_int_table): New.
17842 (prepare_rules): `i' is unsigned.
17843 `prhs', `rline', `r2' are unsigned int.
17844 Rename muscle `rhs_number_max' as `rhs_max'.
17845 Output muscles `prhs_max', `rline_max', and `r2_max'.
17846 Free rline and r1.
17847 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17848 to compute types instead of constant types.
17849 * tests/regression.at (Web2c Actions): Adjust.
17850
17851 2002-05-04 Akim Demaille <akim@epita.fr>
17852
17853 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17854 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17855 Adjust dependencies.
17856 * src/output.c (token_definitions_output): Be sure not to output a
17857 `#define 'a'' when fed with `%token 'a' "a"'.
17858 * tests/regression.at (Token definitions): New.
17859
17860 2002-05-03 Paul Eggert <eggert@twinsun.com>
17861
17862 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17863 for K&R C.
17864
17865 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17866
17867 * Makefile.am (SUBDIRS): Remove intl.
17868 (EXTRA_DIST): Add config/config.rpath.
17869
17870 2002-05-03 Akim Demaille <akim@epita.fr>
17871
17872 * data/bison.simple (m4_if): Don't output empty enums.
17873 And actually, output valid enum definitions :(.
17874
17875 2002-05-03 Akim Demaille <akim@epita.fr>
17876
17877 * configure.bat: Remove, completely obsolete.
17878 * Makefile.am (EXTRA_DIST): Adjust.
17879 Don't distribute config.rpath...
17880 * config/Makefile.am (EXTRA_DIST): Do it.
17881
17882 2002-05-03 Akim Demaille <akim@epita.fr>
17883
17884 * configure.in (GETTEXT_VERSION): New.
17885 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17886
17887 2002-05-03 Akim Demaille <akim@epita.fr>
17888
17889 * data/bison.simple (b4_token_enum): New.
17890 (b4_token_defines): Use it to output tokens both as #define and
17891 enums.
17892 Suggested by Paul Eggert.
17893 * src/output.c (token_definitions_output): Don't output spurious
17894 white spaces.
17895
17896 2002-05-03 Akim Demaille <akim@epita.fr>
17897
17898 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17899
17900 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17901
17902 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17903 Update the stack class, give a try to deque as the default container.
17904
17905 2002-05-02 Akim Demaille <akim@epita.fr>
17906
17907 * data/bison.simple (yyparse): Do not implement @$ = @1.
17908 (YYLLOC_DEFAULT): Adjust to do it.
17909 * doc/bison.texinfo (Location Default Action): Fix.
17910
17911 2002-05-02 Akim Demaille <akim@epita.fr>
17912
17913 * src/reader.c (parse_braces): Merge into...
17914 (parse_action): this.
17915
17916 2002-05-02 Akim Demaille <akim@epita.fr>
17917
17918 * configure.in (ALL_LINGUAS): Remove.
17919 * po/LINGUAS, hr.po: New.
17920
17921 2002-05-02 Akim Demaille <akim@epita.fr>
17922
17923 Remove the so called hairy (semantic) parsers.
17924
17925 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17926 * src/gram.h, src/gram.c (semantic_parser): Remove.
17927 (rule_t): Remove the guard and guard_line members.
17928 * src/lex.h (token_t): remove tok_guard.
17929 * src/options.c (option_table): Remove %guard and %semantic_parser
17930 support.
17931 * src/output.c, src/output.h (guards_output): Remove.
17932 (prepare): Adjust.
17933 (token_definitions_output): Don't output the `T'
17934 tokens (???).
17935 (output_skeleton): Don't output the guards.
17936 * src/files.c, src/files.c (attrsfile): Remove.
17937 * src/reader.c (symbol_list): Remove the guard and guard_line
17938 members.
17939 Adjust dependencies.
17940 (parse_guard): Remove.
17941 * data/bison.hairy: Remove.
17942 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17943 BISON_HAIRY.
17944
17945 2002-05-02 Akim Demaille <akim@epita.fr>
17946
17947 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17948 (parse_guard): Rename the formal argument `stack_offset' as
17949 `rule_length', which is more readable.
17950 Adjust callers.
17951 (copy_at, copy_dollar): Instead of outputting the hard coded
17952 values of $$, $n and so forth, output invocation to b4_lhs_value,
17953 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17954 Note: this patch partially drops `semantic-parser' support: it
17955 always does `rule_length - n', where semantic parsers ought to
17956 always use `-n'.
17957 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17958 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17959
17960 2002-05-02 Akim Demaille <akim@epita.fr>
17961
17962 * configure.in (AC_INIT): Bump to 1.49b.
17963 (AM_INIT_AUTOMAKE): Short invocation.
17964
17965 2002-05-02 Akim Demaille <akim@epita.fr>
17966
17967 Version 1.49a.
17968
17969 2002-05-01 Akim Demaille <akim@epita.fr>
17970
17971 * src/skeleton.h: Remove.
17972
17973 2002-05-01 Akim Demaille <akim@epita.fr>
17974
17975 * src/skeleton.h: Fix the #endif.
17976 Reported by Magnus Fromreide.
17977
17978 2002-04-26 Paul Eggert <eggert@twinsun.com>
17979
17980 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17981 Define if we define YYSTYPE and YYLTYPE, respectively.
17982 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17983
17984 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17985
17986 * src/scan-skel.l: Postprocess quadrigraphs.
17987
17988 * src/reader.c (copy_character): New function, used to output
17989 single characters while replacing `[' and `]' with quadrigraphs, to
17990 avoid troubles with M4 quotes.
17991 (copy_comment): Output characters with copy_character.
17992 (read_additionnal_code): Likewise.
17993 (copy_string2): Likewise.
17994 (copy_definition): Likewise.
17995
17996 * tests/calc.at: Exercise M4 quoting.
17997
17998 2002-04-25 Akim Demaille <akim@epita.fr>
17999
18000 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18001 between `!' and the command.
18002 Reported by Paul Eggert.
18003
18004 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18005
18006 * tests/calc.at: Exercise prologue splitting.
18007
18008 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18009 `b4_post_prologue' instead of `b4_prologue'.
18010
18011 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18012 muscles.
18013 (output): Free pre_prologue_obstack and post_prologue_obstack.
18014 * src/files.h, src/files.c (attrs_obstack): Remove.
18015 (pre_prologue_obstack, post_prologue_obstack): New.
18016 * src/reader.c (copy_definition): Add a parameter to specify the
18017 obstack to fill, instead of using attrs_obstack unconditionally.
18018 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18019 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18020
18021 2002-04-23 Paul Eggert <eggert@twinsun.com>
18022
18023 * data/bison.simple: Remove unnecessary commentary and white
18024 space differences from 1_29-branch.
18025 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18026
18027 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18028 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18029 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18030 constructors or destructors.
18031
18032 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18033
18034 2002-04-23 Akim Demaille <akim@epita.fr>
18035
18036 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18037 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18038 location with columns.
18039 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18040 All reported by Paul Eggert.
18041
18042 2002-04-22 Akim Demaille <akim@epita.fr>
18043
18044 * src/reduce.c (dump_grammar): Move to...
18045 * src/gram.h, src/gram.c (grammar_dump): here.
18046 Be sure to separate long item numbers.
18047 Don't read the members of a rule's prec if its nil.
18048
18049 2002-04-22 Akim Demaille <akim@epita.fr>
18050
18051 * src/output.c (table_size, table_grow): New.
18052 (MAXTABLE): Remove, replace uses with table_size.
18053 (pack_vector): Instead of dying when the table is too big, grow it.
18054
18055 2002-04-22 Akim Demaille <akim@epita.fr>
18056
18057 * data/bison.simple (yyr1): Its type is that of a token number.
18058 * data/bison.c++ (r1_): Likewise.
18059 * tests/regression.at (Web2c Actions): Adjust.
18060
18061 2002-04-22 Akim Demaille <akim@epita.fr>
18062
18063 * src/reader.c (token_translations_init): 256 is now the default
18064 value for the error token, i.e., it will be assigned another
18065 number if the user assigned 256 to one of her tokens.
18066 (reader): Don't force 256 to error.
18067 * doc/bison.texinfo (Symbols): Adjust.
18068 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18069 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18070 etc. instead of 10, 20, 30 (which was used to `jump' over error
18071 (256) and undefined (2)).
18072
18073 2002-04-22 Akim Demaille <akim@epita.fr>
18074
18075 Propagate more token_number_t.
18076
18077 * src/gram.h (token_number_as_item_number)
18078 (item_number_as_token_number): New.
18079 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18080 Use it to create output_item_number_table and
18081 output_token_number_table.
18082 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18083 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18084 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18085 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18086
18087 2002-04-22 Akim Demaille <akim@epita.fr>
18088
18089 * src/output.h, src/output.c (get_lines_number): Remove.
18090
18091 2002-04-19 Akim Demaille <akim@epita.fr>
18092
18093 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18094 as Lex/Flex'.
18095 (Debugging): More details about enabling the debugging features.
18096 (Table of Symbols): Describe $$, $n, @$, and @n.
18097 Suggested by Tim Josling.
18098
18099 2002-04-19 Akim Demaille <akim@epita.fr>
18100
18101 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18102
18103 2002-04-10 Akim Demaille <akim@epita.fr>
18104
18105 * src/system.h: Rely on HAVE_LIMITS_H.
18106 Suggested by Paul Eggert.
18107
18108 2002-04-09 Akim Demaille <akim@epita.fr>
18109
18110 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18111 full stderr, and strip it according to the bison options, instead
18112 of composing the error message from different bits.
18113 This makes it easier to check for several error messages.
18114 Adjust all the invocations.
18115 Add an invocation exercising the error token.
18116 Add an invocation demonstrating a stupid error message.
18117 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18118 Adjust the tests.
18119 Error message are for stderr, not stdout.
18120
18121 2002-04-09 Akim Demaille <akim@epita.fr>
18122
18123 * src/gram.h, src/gram.c (error_token_number): Remove, use
18124 errtoken->number.
18125 * src/reader.c (reader): Don't specify the user token number (2)
18126 for $undefined, as it uselessly prevents using it.
18127 * src/gram.h (token_number_t): Move to...
18128 * src/symtab.h: here.
18129 (state_t.number): Is a token_number_t.
18130 * src/print.c, src/reader.c: Use undeftoken->number instead of
18131 hard coded 2.
18132 (Even though this 2 is not the same as above: the number of the
18133 undeftoken remains being 2, it is its user token number which
18134 might not be 2).
18135 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18136 `user_token_number_max'.
18137 Output `undef_token_number'.
18138 * data/bison.simple, data/bison.c++: Use them.
18139 Be sure to map invalid yylex return values to
18140 `undef_token_number'. This saves us from gratuitous SEGV.
18141
18142 * tests/conflicts.at (Solved SR Conflicts)
18143 (Unresolved SR Conflicts): Adjust.
18144 * tests/regression.at (Web2c Actions): Adjust.
18145
18146 2002-04-08 Akim Demaille <akim@epita.fr>
18147
18148 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18149 Adding #line.
18150 Remove the duplicate `typedefs'.
18151 (RhsNumberType): Fix the declaration and various other typos.
18152 Use __ofile__.
18153 * data/bison.simple: Use __ofile__.
18154 * src/scan-skel.l: Handle __ofile__.
18155
18156 2002-04-08 Akim Demaille <akim@epita.fr>
18157
18158 * src/gram.h (item_number_t): New, the type of item numbers in
18159 RITEM. Note that it must be able to code symbol numbers as
18160 positive number, and the negation of rule numbers as negative
18161 numbers.
18162 Adjust all dependencies (pretty many).
18163 * src/reduce.c (rule): Remove this `short *' pointer: use
18164 item_number_t.
18165 * src/system.h (MINSHORT, MAXSHORT): Remove.
18166 Include `limits.h'.
18167 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18168 (shortcpy): Remove.
18169 (MAXTABLE): Move to...
18170 * src/output.c (MAXTABLE): here.
18171 (prepare_rules): Use output_int_table to output rhs.
18172 * data/bison.simple, data/bison.c++: Adjust.
18173 * tests/torture.at (Big triangle): Move the limit from 254 to
18174 500.
18175 * tests/regression.at (Web2c Actions): Ajust.
18176
18177 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18178 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18179 passes, but produces negative #line number, once fixed, GCC is
18180 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18181 C), it passes.
18182 * src/state.h (state_h): Code input lines on ints, not shorts.
18183
18184 2002-04-08 Akim Demaille <akim@epita.fr>
18185
18186 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18187 and then the grammar.
18188
18189 2002-04-08 Akim Demaille <akim@epita.fr>
18190
18191 * src/system.h: No longer using strndup.
18192
18193 2002-04-07 Akim Demaille <akim@epita.fr>
18194
18195 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18196 * src/output.c (output_table_data): Return the longest number.
18197 (prepare_tokens): Output `token_number_max').
18198 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18199 New.
18200 Use them to define yy_token_number_type/TokenNumberType.
18201 Use this type for yytranslate.
18202 * tests/torture.at (Big triangle): Push the limit from 124 to
18203 253.
18204 * tests/regression.at (Web2c Actions): Adjust.
18205
18206 2002-04-07 Akim Demaille <akim@epita.fr>
18207
18208 * tests/torture.at (Big triangle): New.
18209 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18210 * tests/existing.at: here.
18211
18212 2002-04-07 Akim Demaille <akim@epita.fr>
18213
18214 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18215 nritems.
18216 Adjust dependencies.
18217
18218 2002-04-07 Akim Demaille <akim@epita.fr>
18219
18220 * src/reader.c: Normalize increments to prefix form.
18221
18222 2002-04-07 Akim Demaille <akim@epita.fr>
18223
18224 * src/reader.c, symtab.c: Remove debugging code.
18225
18226 2002-04-07 Akim Demaille <akim@epita.fr>
18227
18228 Rename all the `bucket's as `symbol_t'.
18229
18230 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18231 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18232 * src/symtab.c, src/symtab.h (bucket): Rename as...
18233 (symbol_t): this.
18234 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18235 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18236 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18237 (buckets_new, buckets_free, buckets_do): Rename as...
18238 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18239 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18240 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18241 (symbols_new, symbols_free, symbols_do): these.
18242
18243 2002-04-07 Akim Demaille <akim@epita.fr>
18244
18245 Use lib/hash for the symbol table.
18246
18247 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18248 EOF.
18249 * src/lex.c (lex): Set the `number' member of new terminals.
18250 * src/reader.c (bucket_check_defined, bucket_make_alias)
18251 (bucket_check_alias_consistence, bucket_translation): New.
18252 (reader, grammar_free, readgram, token_translations_init)
18253 (packsymbols): Adjust.
18254 (reader): Number the predefined tokens.
18255 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18256 for predefined tokens.
18257 * src/symtab.h (bucket): Remove all the hash table related
18258 members.
18259 * src/symtab.c (symtab): Replace by...
18260 (bucket_table): this.
18261 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18262 (buckets_new, buckets_do): New.
18263
18264 2002-04-07 Akim Demaille <akim@epita.fr>
18265
18266 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18267 (start_symbol, max_user_token_number, semantic_parser)
18268 (error_token_number): Initialize.
18269 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18270 Initialize.
18271 (reader): Don't.
18272 (errtoken, eoftoken, undeftoken, axiom): Extern.
18273
18274 2002-04-07 Akim Demaille <akim@epita.fr>
18275
18276 * src/gram.h (rule_s): prec and precsym are now pointers
18277 to the bucket giving the priority/associativity.
18278 Member `associativity' removed: useless.
18279 * src/reduce.c, src/conflicts.c: Adjust.
18280
18281 2002-04-07 Akim Demaille <akim@epita.fr>
18282
18283 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18284 Properly escape the symbols' TAG when outputting them.
18285
18286 2002-04-07 Akim Demaille <akim@epita.fr>
18287
18288 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18289
18290 2002-04-07 Akim Demaille <akim@epita.fr>
18291
18292 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18293 (LArule): this, which is an array to rule_t*.
18294 * src/print.c, src/conflicts.c: Adjust.
18295
18296 2002-04-07 Akim Demaille <akim@epita.fr>
18297
18298 * src/gram.h (rule_t): Rename `number' as `user_number'.
18299 `number' is a new member.
18300 Adjust dependencies.
18301 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18302
18303 2002-04-07 Akim Demaille <akim@epita.fr>
18304
18305 As a result of the previous patch, it is no longer needed
18306 to reorder ritem itself.
18307
18308 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18309
18310 2002-04-07 Akim Demaille <akim@epita.fr>
18311
18312 Be sure never to walk through RITEMS, but use only data related to
18313 the rules themselves. RITEMS should be banished.
18314
18315 * src/output.c (output_token_translations): Rename as...
18316 (prepare_tokens): this.
18317 In addition to `translate', prepare the muscles `tname' and
18318 `toknum', which were handled by...
18319 (output_rule_data): this.
18320 Remove, and move the remainder of its outputs into...
18321 (prepare_rules): this new routines, which also merges content from
18322 (output_gram): this.
18323 (prepare_rules): Be sure never to walk through RITEMS.
18324 (output_stos): Rename as...
18325 (prepare_stos): this.
18326 (output): Always invoke prepare_states, after all, just don't use it
18327 in the output if you don't need it.
18328
18329 2002-04-07 Akim Demaille <akim@epita.fr>
18330
18331 * src/LR0.c (new_state): Display `nstates' as the name of the
18332 newly created state.
18333 Adjust to initialize first_state and last_state if needed.
18334 Be sure to distinguish the initial from the final state.
18335 (new_states): Create the itemset of the initial state, and use
18336 new_state.
18337 * src/closure.c (closure): Now that the initial state has its
18338 items properly set, there is no need for a special case when
18339 creating `ruleset'.
18340
18341 As a result, now the rule 0, reducing to $axiom, is visible in the
18342 outputs. Adjust the test suite.
18343
18344 * tests/conflicts.at (Solved SR Conflicts)
18345 (Unresolved SR Conflicts): Adjust.
18346 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18347 * tests/conflicts.at (S/R in initial): New.
18348
18349 2002-04-07 Akim Demaille <akim@epita.fr>
18350
18351 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18352 the RHS of the rules.
18353 * src/output.c (output_gram): Likewise.
18354
18355 2002-04-07 Akim Demaille <akim@epita.fr>
18356
18357 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18358 bucket.
18359 Adjust all dependencies.
18360 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18361 `number' of the buckets too.
18362 * src/gram.h: Include `symtab.h'.
18363 (associativity): Move to...
18364 * src/symtab.h: here.
18365 No longer include `gram.h'.
18366
18367 2002-04-07 Akim Demaille <akim@epita.fr>
18368
18369 * src/gram.h, src/gram.c (rules_rhs_length): New.
18370 (ritem_longest_rhs): Use it.
18371 * src/gram.h (rule_t): `number' is a new member.
18372 * src/reader.c (packgram): Set it.
18373 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18374 the end of `rules', and count them out of `nrules'.
18375 (reduce_output, dump_grammar): Adjust.
18376 * src/print.c (print_grammar): It is no longer needed to check for
18377 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18378 * tests/reduce.at (Reduced Automaton): New test.
18379
18380 2002-04-07 Akim Demaille <akim@epita.fr>
18381
18382 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18383 lacking `+ 1' to nrules, Bison reported as useless a token if it
18384 was used solely to set the precedence of the last rule...
18385
18386 2002-04-07 Akim Demaille <akim@epita.fr>
18387
18388 * data/bison.c++, data/bison.simple: Don't output the current file
18389 name in #line, to avoid useless diffs between two identical
18390 outputs under different names.
18391
18392 2002-04-07 Akim Demaille <akim@epita.fr>
18393
18394 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18395 Normalize loops to using `< nrules + 1', not `<= nrules'.
18396
18397 2002-04-07 Akim Demaille <akim@epita.fr>
18398
18399 * TODO: Update.
18400
18401 2002-04-07 Akim Demaille <akim@epita.fr>
18402
18403 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18404 bucket.value as bucket.number.
18405
18406 2002-04-07 Akim Demaille <akim@epita.fr>
18407
18408 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18409 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18410 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18411 RHS, instead of being an index in RITEMS.
18412
18413 2002-04-04 Paul Eggert <eggert@twinsun.com>
18414
18415 * doc/bison.texinfo: Update copyright date.
18416 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18417 (Symbols): Warn about running Bison in one character set,
18418 but compiling and/or running in an incompatible one.
18419 Warn about character code 256, too.
18420
18421 2002-04-03 Paul Eggert <eggert@twinsun.com>
18422
18423 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18424 YYERROR_VERBOSE is nonzero, not whether it is defined.
18425
18426 Merge changes from bison-1_29-branch.
18427
18428 2002-03-20 Paul Eggert <eggert@twinsun.com>
18429
18430 Merge fixes from Debian bison_1.34-1.diff.
18431
18432 * configure.in (AC_PREREQ): 2.53.
18433
18434 2002-03-20 Akim Demaille <akim@epita.fr>
18435
18436 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18437
18438 2002-03-19 Paul Eggert <eggert@twinsun.com>
18439
18440 * src/bison.simple (YYCOPY): New macro.
18441 (YYSTACK_RELOCATE): Use it.
18442 Remove Type arg; no longer needed. All callers changed.
18443 (yymemcpy): Remove; no longer needed.
18444
18445 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18446 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18447
18448 2002-03-19 Akim Demaille <akim@epita.fr>
18449
18450 Test and fix the #line outputs.
18451
18452 * tests/atlocal.at (GCC): New.
18453 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18454 (Prologue synch line, %union synch line, Postprologue synch line)
18455 (Action synch line, Epilogue synch line): New tests.
18456 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18457 * data/bison.simple, data/bison.c++: Use it.
18458
18459 2002-03-19 Akim Demaille <akim@epita.fr>
18460
18461 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18462 (Solved SR Conflicts, %expect not enough, %expect right)
18463 (%expect too much): Move to...
18464 * tests/conflicts.at: this new file.
18465
18466 2002-03-19 Akim Demaille <akim@epita.fr>
18467
18468 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18469 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18470 that we can move to enums for instance.
18471 * src/output.c (token_definitions_output): Output a list of
18472 `token-name, token-number' instead of the #define.
18473 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18474
18475 2002-03-14 Akim Demaille <akim@epita.fr>
18476
18477 Use Gettext 0.11.1.
18478
18479 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18480
18481 * data/bison.c++: Make the user able to add members to the generated
18482 parser by subclassing.
18483
18484 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18485
18486 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18487 a character.
18488 Reported by Nicolas Tisserand and Nicolas Burrus.
18489
18490 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18491
18492 * src/reader.c: Warn about lacking semi-colons, do not complain.
18493
18494 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18495
18496 * data/bison.c++: Remove a debug line.
18497
18498 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18499
18500 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18501 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18502 provide a default implementation.
18503
18504 2002-03-04 Akim Demaille <akim@epita.fr>
18505
18506 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18507 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18508 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18509 * tests/semantic.at (Parsing Guards): Similarly.
18510 * src/reader.at (readgram): Complain if the last rule is not ended
18511 with a semi-colon.
18512
18513 2002-03-04 Akim Demaille <akim@epita.fr>
18514
18515 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18516 * src/closure.c: here.
18517 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18518 RTC.
18519 * src/warshall.h, src/warshall.c: Remove.
18520 * tests/sets.at (Broken Closure): Adjust.
18521
18522 2002-03-04 Akim Demaille <akim@epita.fr>
18523
18524 * src/output.c (output_skeleton): tempdir is const.
18525 bytes_read is unused.
18526
18527 2002-03-04 Akim Demaille <akim@epita.fr>
18528
18529 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18530 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18531 Update.
18532 From Michael Hayes.
18533
18534 2002-03-04 Akim Demaille <akim@epita.fr>
18535
18536 * src/closure.c (closure): `r' is unused.
18537
18538 2002-03-04 Akim Demaille <akim@epita.fr>
18539
18540 * tests/sets.at (Broken Closure): Add the ending `;'.
18541 * src/reader.at (readgram): Complain if a rule is not ended with a
18542 semi-colon.
18543
18544 2002-03-04 Akim Demaille <akim@epita.fr>
18545
18546 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18547 (count_sr_conflicts): Use bitset_count.
18548 * src/reduce.c (inaccessable_symbols): Ditto.
18549 (bits_size): Remove.
18550 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18551
18552 2002-03-04 Akim Demaille <akim@epita.fr>
18553
18554 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18555 * src/reduce.c: Remove the `bitset_zero's following the
18556 `bitset_create's, as now it is performed by the latter.
18557
18558 2002-03-04 Akim Demaille <akim@epita.fr>
18559
18560 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18561 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18562 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18563 latest sources from Michael.
18564
18565 2002-03-04 Akim Demaille <akim@epita.fr>
18566
18567 * src/output.c (output): Don't free the grammar.
18568 * src/reader.c (grammar_free): New.
18569 * src/main.c (main): Call it and don't free symtab here.
18570
18571 2002-03-04 Akim Demaille <akim@epita.fr>
18572
18573 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18574 before returning.
18575 Reported by Benoit Perrot.
18576
18577 2002-03-04 Akim Demaille <akim@epita.fr>
18578
18579 Use bitset operations when possible, not loops over bits.
18580
18581 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18582 bitset_or.
18583 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18584 * src/reduce.c (useless_nonterminals): Formatting changes.
18585 * src/warshall.c (TC): Use bitset_or.
18586
18587 2002-03-04 Akim Demaille <akim@epita.fr>
18588
18589 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18590 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18591 Ditto.
18592
18593 2002-03-04 Akim Demaille <akim@epita.fr>
18594
18595 * src/lalr.c (F): Now a bitset*.
18596 Adjust all dependencies.
18597
18598 2002-03-04 Akim Demaille <akim@epita.fr>
18599
18600 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18601 Adjust all dependencies.
18602
18603 2002-03-04 Akim Demaille <akim@epita.fr>
18604
18605 * src/L0.c, src/LR0.h (nstates): Be size_t.
18606 Adjust comparisons (signed vs unsigned).
18607 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18608 bitset*.
18609 Adjust all dependencies.
18610
18611 2002-03-04 Akim Demaille <akim@epita.fr>
18612
18613 * src/closure.c (firsts): Now, also a bitset.
18614 Adjust all dependencies.
18615 (varsetsize): Remove, now unused.
18616 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18617
18618 2002-03-04 Akim Demaille <akim@epita.fr>
18619
18620 * src/print.c: Convert to use bitset.h, not hand coded iterations
18621 over ints.
18622
18623 2002-03-04 Akim Demaille <akim@epita.fr>
18624
18625 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18626
18627 2002-03-04 Akim Demaille <akim@epita.fr>
18628
18629 * src/closure.c (ruleset): Be a bitset.
18630 (rulesetsize): Remove.
18631
18632 2002-03-04 Akim Demaille <akim@epita.fr>
18633
18634 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18635 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18636 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18637 * src/closure.c (fderives): Be an array of bitsets.
18638
18639 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18640
18641 * data/bison.c++: Merge the two generated headers. Insert a copyright
18642 notice in each output file.
18643
18644 2002-02-28 Akim Demaille <akim@epita.fr>
18645
18646 * data/bison.c++: Copy the prologue of bison.simple to fetch
18647 useful M4 definitions, such as b4_header_guard.
18648
18649 2002-02-25 Akim Demaille <akim@epita.fr>
18650
18651 * src/getargs.c (version): Give the name of the authors, and use a
18652 translator friendly scheme for the bgr
18653 copyright notice.
18654
18655 2002-02-25 Akim Demaille <akim@epita.fr>
18656
18657 * src/output.c (header_output): Remove, now handled completely via
18658 M4.
18659
18660 2002-02-25 Akim Demaille <akim@epita.fr>
18661
18662 * m4/m4.m4: New, from CVS Autoconf.
18663 * configure.in: Invoke it.
18664 * src/output.c (output_skeleton): Use its result instead of the
18665 hard coded name.
18666
18667 2002-02-25 Akim Demaille <akim@epita.fr>
18668
18669 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18670 Fileutils 4.1.5.
18671 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18672 * src/output.c (output_skeleton): Use mkstemp to create a real
18673 temporary file.
18674 Move the filling of `skeleton' and its muscle to...
18675 (prepare): here.
18676 (output): Move the definition of the prologue muscle to...
18677 (prepare): here.
18678 * src/system.h (DEFAULT_TMPDIR): New.
18679
18680 2002-02-14 Paul Eggert <eggert@twinsun.com>
18681
18682 Remove the support for C++ namespace cleanliness; it was
18683 causing more problems than it was curing, since it didn't work
18684 properly on some nonstandard C++ compilers. This can wait
18685 for a proper C++ parser.
18686
18687 * NEWS: Document this.
18688 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18689 of C++, as it's treated like C now.
18690 * src/bison.simple (YYSTD): Remove.
18691 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18692 Treat C++ just like Standard C instead of trying to support
18693 namespace cleanliness.
18694
18695 2002-02-14 Akim Demaille <akim@epita.fr>
18696
18697 * tests/regression.at (else): Adjust to Andreas' change.
18698
18699 2002-02-14 Akim Demaille <akim@epita.fr>
18700
18701 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18702
18703 2002-02-13 Andreas Schwab <schwab@suse.de>
18704
18705 * src/output.c (output_rule_data): Don't output NULL, it might
18706 not be defined yet.
18707
18708 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18709
18710 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18711 (Copyright notice): Update.
18712
18713 2002-02-11 Akim Demaille <akim@epita.fr>
18714
18715 * tests/regression.at (%nonassoc and eof): Don't include
18716 nonportable headers.
18717
18718 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18719
18720 * data/bison.c++: Correct error recovery. Make the user able to
18721 initialize the starting location.
18722
18723 2002-02-07 Akim Demaille <akim@epita.fr>
18724
18725 * tests/input.at: New.
18726
18727 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18728
18729 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18730 more consistent when naming methods and variables. Put preprocessor
18731 directives around tables only needed for debugging.
18732
18733 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18734
18735 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18736 C++ parsers.
18737 (yy::b4_name::parse): Use print_.
18738
18739 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18740
18741 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18742
18743 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18744
18745 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18746 C++ parsers.
18747 (yy::b4_name::parse): Build verbose error messages, and use error_.
18748
18749 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18750
18751 * data/bison.c++: Fix m4 quoting in comments.
18752
18753 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18754
18755 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18756 not expanded by m4.
18757
18758 2002-02-05 Akim Demaille <akim@epita.fr>
18759
18760 * data/bison.c++: Adjust to the M4 back end.
18761 More is certainly needed.
18762
18763 2002-02-05 Akim Demaille <akim@epita.fr>
18764
18765 Give a try to M4 as a back end.
18766
18767 * lib/readpipe.c: New, from wdiff.
18768 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18769 BISON_HAIRY.
18770 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18771 specific values. Now it is m4 that performs the lookup.
18772 * src/parse-skel.y: Remove.
18773 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18774 * src/output.c (actions_output, guards_output)
18775 (token_definitions_output): No longer keeps track of the output
18776 line number, hence remove the second argument.
18777 (guards_output): Check against the guard member of a rule, not the
18778 action member.
18779 Adjust callers.
18780 (output_skeleton): Don't look for the skeleton location, let m4 do
18781 that.
18782 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18783 file will be used.
18784 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18785 (prepare): Given that for the time being changesyntax is not
18786 usable in M4, rename the muscles using `-' to `_'.
18787 Define `defines_flag', `output_parser_name' and `output_header_name'.
18788 * src/output.h (actions_output, guards_output)
18789 (token_definitions_output): Adjust prototypes.
18790 * src/scan-skel.l: Instead of scanning the skeletons, it now
18791 processes the output of m4: `__oline__' and `#output'.
18792 * data/bison.simple: Adjust to be used by M4(sugar).
18793 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18794 to date.
18795 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18796 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18797 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18798 shamelessly stolen from CVS Autoconf.
18799
18800 2002-02-05 Akim Demaille <akim@epita.fr>
18801
18802 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18803 * configure.in: Check for the declarations of free and malloc.
18804 * src/muscle_tab.c: Adjust.
18805
18806 2002-02-05 Akim Demaille <akim@epita.fr>
18807
18808 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18809 which have no values.
18810
18811 2002-02-05 Akim Demaille <akim@epita.fr>
18812
18813 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18814 * data/: here.
18815
18816 2002-01-29 Paul Eggert <eggert@twinsun.com>
18817
18818 * src/bison.simple (YYSIZE_T): Do not define merely because
18819 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18820 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18821
18822 2002-01-27 Akim Demaille <akim@epita.fr>
18823
18824 Fix `%nonassoc and eof'.
18825
18826 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18827 which were not properly copied! Replace
18828 memcpy (res->errs, src->errs, src->nerrs);
18829 with
18830 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18831 !!!
18832 * tests/regression.at (%nonassoc and eof): Adjust to newest
18833 Autotest: `.' is not in the PATH.
18834
18835 2002-01-27 Akim Demaille <akim@epita.fr>
18836
18837 * tests/sets.at (AT_EXTRACT_SETS): New.
18838 (Nullable): Use it.
18839 (Firsts): New.
18840
18841 2002-01-26 Akim Demaille <akim@epita.fr>
18842
18843 * tests/actions.at, tests/calc.at, tests/headers.at,
18844 * tests/torture.at: Adjust to the newest Autotest which no longer
18845 forces `.' in the PATH.
18846
18847 2002-01-25 Akim Demaille <akim@epita.fr>
18848
18849 * tests/regression.at (%nonassoc and eof): New.
18850 Suggested by Robert Anisko.
18851
18852 2002-01-24 Akim Demaille <akim@epita.fr>
18853
18854 Bison dumps core when trying to complain about broken input files.
18855 Reported by Cris van Pelt.
18856
18857 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18858 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18859 into...
18860 (Invalid inputs): Strengthen: exercise parse_percent_token.
18861
18862 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18863
18864 * src/Makefile.am: Add bison.c++.
18865 * src/bison.c++: New skeleton.
18866
18867 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18868
18869 * po/it.po: New.
18870
18871 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18872
18873 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18874
18875 2002-01-20 Marc Autret <marc@gnu.org>
18876
18877 * src/files.c (compute_output_file_names): Fix
18878
18879 2002-01-20 Marc Autret <marc@gnu.org>
18880
18881 * tests/output.at: New test.
18882 * src/files.c (compute_base_names): Don't map extensions when
18883 the YACC flag is set, use defaults.
18884 Reported by Evgeny Stambulchik.
18885
18886 2002-01-20 Marc Autret <marc@gnu.org>
18887
18888 * src/system.h: Need to define __attribute__ away for non-GCC
18889 compilers as well (i.e., the vendor C compiler).
18890 Suggested by Albert Chin-A-Young.
18891
18892 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18893
18894 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18895 canonical definition.
18896 * src/system.h: Use the canonical definition for PARAMS (avoids
18897 a conflict with the macro from lib/hash.h).
18898
18899 2002-01-11 Akim Demaille <akim@epita.fr>
18900
18901 * configure.in: Use AC_FUNC_STRNLEN.
18902 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18903
18904 2002-01-09 Akim Demaille <akim@epita.fr>
18905
18906 * src/files.c, src/files.h (output_infix): New.
18907 (tab_extension): Remove.
18908 (compute_base_names): Compute the former, drop the latter.
18909 * src/output.c (prepare): Insert the muscles `output-infix', and
18910 `output-suffix'.
18911 * src/parse-skel.y (string, string.1): New.
18912 (section.header): Use it.
18913 (section.yacc): Remove.
18914 (prefix): Remove too.
18915 * src/scan-skel.l: Adjust.
18916 * src/bison.simple, src/bison.hairy: Adjust.
18917
18918 2002-01-09 Akim Demaille <akim@epita.fr>
18919
18920 * configure.in (WERROR_CFLAGS): Compute it.
18921 * src/Makefile.am (CFLAGS): Pass it.
18922 * tests/atlocal.in (CFLAGS): Idem.
18923 * src/files.c: Fix a few warnings.
18924 (get_extension_index): Remove, unused.
18925
18926 2002-01-08 Akim Demaille <akim@epita.fr>
18927
18928 * src/getargs.c (AS_FILE_NAME): New.
18929 (getargs): Use it to convert DOSish file names.
18930 * src/files.c (base_name): Rename as full_base_name to avoid
18931 clashes with `base_name ()'.
18932 (filename_split): New.
18933 (compute_base_names): N-th rewrite, using filename_split.
18934
18935 2002-01-08 Akim Demaille <akim@epita.fr>
18936
18937 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18938 New, stolen from the Fileutils 4.1.
18939 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18940 * configure.in: Check for the presence of memrchr, and of its
18941 prototype.
18942
18943 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18944
18945 * lib/hash.h (__P): Added definition for this macro.
18946 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18947 BUILT_SOURCES, to ensure they are generated first.
18948 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18949 %error-verbose to allow bootstrapping with bison 1.30x.
18950
18951 2002-01-06 Akim Demaille <akim@epita.fr>
18952
18953 * src/reader.c (parse_braces): Don't fetch the next char, the
18954 convention is to fetch on entry.
18955 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18956 'switch' without a following semicolon.
18957 * tests/regression.at (braces parsing): New.
18958
18959 2002-01-06 Akim Demaille <akim@epita.fr>
18960
18961 Bison is dead wrong in its RR conflict reports.
18962
18963 * tests/torture.at (GNU Cim Grammar): New.
18964 * src/conflicts.c (count_rr_conflicts): Fix.
18965
18966 2002-01-06 Akim Demaille <akim@epita.fr>
18967
18968 Creating package.m4 from configure.ac causes too many problems.
18969
18970 * tests/Makefile.am (package.m4): Create it by hand,
18971 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18972
18973 2002-01-06 Akim Demaille <akim@epita.fr>
18974
18975 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18976 skeleton.h.
18977
18978 2002-01-04 Paul Eggert <eggert@twinsun.com>
18979
18980 * doc/bison.texinfo (Debugging):
18981 Remove YYSTDERR; it's no longer defined or used.
18982 Also, s/cstdio.h/cstdio/.
18983
18984 2002-01-03 Akim Demaille <akim@epita.fr>
18985
18986 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18987
18988 2002-01-03 Akim Demaille <akim@epita.fr>
18989
18990 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18991 tracing code to --trace, wait for a better --trace option, with
18992 args.
18993
18994 2002-01-03 Akim Demaille <akim@epita.fr>
18995
18996 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18997 The ISO C++ standard is extremely clear about it: stderr is
18998 considered a macro, not a regular symbol (see table 94 `Header
18999 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19000 Therefore std:: does not apply to it. It still does with fprintf.
19001 Also, s/cstdio.h/cstdio/.
19002
19003 2002-01-03 Akim Demaille <akim@epita.fr>
19004
19005 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19006 for non system headers.
19007
19008 2002-01-02 Akim Demaille <akim@epita.fr>
19009
19010 Equip the skeleton chain with location tracking, runtime trace,
19011 pure parser and scanner.
19012
19013 * src/parse-skel.y: Request a pure parser, locations, and prefix
19014 renaming.
19015 (%union): Having several members with the same type does not help
19016 type mismatches, simplify.
19017 (YYPRINT, yyprint): New.
19018 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19019 (skel_error): this.
19020 Handle locations.
19021 * src/scan-skel.l: Adjust to these changes.
19022 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19023 (LOCATION_PRINT, skel_control_t): New.
19024
19025 2001-12-30 Akim Demaille <akim@epita.fr>
19026
19027 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19028 replace `gb' with BLANKS.
19029 * src/scan-skel.l: Adjust.
19030
19031 2001-12-30 Akim Demaille <akim@epita.fr>
19032
19033 * src/system.h: We don't need nor want bcopy.
19034 Throw away MS-DOS crap: we don't need getpid.
19035 * configure.in: We don't need strndup. It was even causing
19036 problems: because Flex includes the headers *before* us,
19037 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19038 not visible.
19039 * lib/xstrndup.c: New.
19040 * src/scan-skel.l: Use it.
19041 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19042 * src/parse-skel.y: Use %directives instead of #defines.
19043
19044 2001-12-30 Akim Demaille <akim@epita.fr>
19045
19046 * src/skeleton.h: New.
19047 * src/output.c (output_parser, output_master_parser): Remove, dead
19048 code.
19049 * src/output.h (get_lines_number, actions_output, guards_output)
19050 (token_definitions_output): Prototype them.
19051 * src/parse-skel.y: Add the license notice.
19052 Include output.h and skeleton.h.
19053 (process_skeleton): Returns void, and takes a single parameter.
19054 * src/scan-skel.l: Add the license notice.
19055 Include skeleton.h.
19056 Don't use %option yylineno: it seems that then Flex imagines
19057 REJECT has been used, and therefore it won't reallocate its
19058 buffers (which makes no other sense to me than a bug). It results
19059 in warnings for `unused: yy_flex_realloc'.
19060
19061 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19062
19063 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19064 (MUSCLE_INSERT_PREFIX): ...to there.
19065 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19066 (MUSCLE_INSERT_PREFIX): Move from here...
19067
19068 * src/bison.hairy: Add a section directive. Put braces around muscle
19069 names. This parser skeleton is still broken, but Bison should not
19070 choke on a bad muscle 'syntax'.
19071 * src/bison.simple: Add a section directive. Put braces around muscle
19072 names.
19073
19074 * src/files.h (strsuffix, stringappend): Add declarations.
19075 (tab_extension): Add declaration.
19076 (short_base_name): Add declaration.
19077
19078 * src/files.c (strsuffix, stringappend): No longer static. These
19079 functions are used in the skeleton parser.
19080 (tab_extension): New.
19081 (compute_base_names): Use the computations done in this function
19082 to guess if the generated parsers should have '.tab' in their
19083 names.
19084 (short_base_name): No longer static.
19085
19086 * src/output.c (output_skeleton): New.
19087 (output): Disable call to output_master_parser, and give a try to
19088 a new skeleton handling system.
19089 (guards_output, actions_output): No longer static.
19090 (token_definitions_output, get_lines_number): No longer static.
19091
19092 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19093
19094 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19095 parse-skel.y.
19096
19097 * src/parse-skel.y: New file.
19098 * src/scan-skel.l: New file.
19099
19100 2001-12-29 Akim Demaille <akim@epita.fr>
19101
19102 %name-prefix is broken.
19103
19104 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19105 Adjust all dependencies.
19106 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19107 %name-prefix.
19108
19109 Renaming yylval but not yylloc is not consistent. Now we do.
19110
19111 * src/bison.simple: Prefix yylloc if used.
19112 * doc/bison.texinfo (Decl Summary): Document that.
19113
19114 2001-12-29 Akim Demaille <akim@epita.fr>
19115
19116 * doc/bison.texinfo: Promote `%long-directive' over
19117 `%long_directive'.
19118 Remove all references to fixed-output-files, yacc is enough.
19119
19120 2001-12-29 Akim Demaille <akim@epita.fr>
19121
19122 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19123 user prologue. These are defaults.
19124 * tests/actions.at (Mid-rule actions): Make sure the user can
19125 define YYDEBUG and YYERROR_VERBOSE.
19126
19127 2001-12-29 Akim Demaille <akim@epita.fr>
19128
19129 * src/output.c (header_output): Don't forget to export YYLTYPE and
19130 yylloc.
19131 * tests/headers.at (export YYLTYPE): New, make sure it does.
19132 * tests/regression.at (%union and --defines, Invalid CPP headers):
19133 Move to...
19134 * tests/headers.at: here.
19135
19136 2001-12-29 Akim Demaille <akim@epita.fr>
19137
19138 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19139
19140 2001-12-29 Akim Demaille <akim@epita.fr>
19141
19142 * tests/actions.at (Mid-rule actions): Output on a single line
19143 instead of several.
19144
19145 2001-12-29 Akim Demaille <akim@epita.fr>
19146
19147 * doc/bison.texinfo: Formatting changes.
19148
19149 2001-12-29 Akim Demaille <akim@epita.fr>
19150
19151 Don't store the token defs in a muscle, just be ready to output it
19152 on command. Now possible via `symbols'. Fixes a memory leak.
19153
19154 * src/output.c (token_definitions_output): New.
19155 (output_parser, header_output): Use it.
19156 * src/reader.c (symbols_save): Remove.
19157
19158 2001-12-29 Akim Demaille <akim@epita.fr>
19159
19160 * src/bison.simple: Do not provide a default for YYSTYPE and
19161 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19162 default.
19163
19164 2001-12-29 Akim Demaille <akim@epita.fr>
19165
19166 Mid-rule actions are simply... ignored!
19167
19168 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19169 the empty-rule associated to the dummy symbol, not to the host
19170 rule.
19171 * tests/actions.at (Mid-rule actions): New.
19172
19173 2001-12-29 Akim Demaille <akim@epita.fr>
19174
19175 Memory leak.
19176
19177 * src/reader.c (reader): Free grammar.
19178
19179 2001-12-29 Akim Demaille <akim@epita.fr>
19180
19181 Memory leak.
19182
19183 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19184 since it allocates it for each state, although only one is needed.
19185 (allocate_storage): Do it here.
19186
19187 2001-12-29 Akim Demaille <akim@epita.fr>
19188
19189 * src/options.h, src/options.c (create_long_option_table): Rename
19190 as...
19191 (long_option_table_new): this, with a clearer prototype.
19192 (percent_table): Remove, unused,
19193 * src/getargs.c (getargs): Adjust.
19194
19195 2001-12-29 Akim Demaille <akim@epita.fr>
19196
19197 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19198 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19199 as states.
19200
19201 2001-12-29 Akim Demaille <akim@epita.fr>
19202
19203 * src/lalr.c (build_relations): Rename `states' as `states1'.
19204 Sorry, I don't understand exactly what it is, no better name...
19205
19206 2001-12-29 Akim Demaille <akim@epita.fr>
19207
19208 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19209 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19210 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19211 as rules.
19212
19213 2001-12-29 Akim Demaille <akim@epita.fr>
19214
19215 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19216 ago.
19217
19218 2001-12-29 Akim Demaille <akim@epita.fr>
19219
19220 * src/reader.c, src/reader.h (user_toknums): Remove.
19221 Adjust all users to use symbols[i]->user_token_number.
19222
19223 2001-12-29 Akim Demaille <akim@epita.fr>
19224
19225 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19226 Adjust all users to use symbols[i]->prec or ->assoc.
19227
19228 2001-12-29 Akim Demaille <akim@epita.fr>
19229
19230 * src/reader.c, src/reader.h (tags): Remove.
19231 Adjust all users to use symbols[i]->tag.
19232
19233 2001-12-29 Akim Demaille <akim@epita.fr>
19234
19235 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19236 and rule_table.
19237 * src/reader.c (packsymbols): Fill this table.
19238 Drop sprec.
19239 * src/conflicts.c (resolve_sr_conflict): Adjust.
19240 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19241 single table.
19242 Use symbols[i]->tag instead of tags[i].
19243
19244 2001-12-29 Akim Demaille <akim@epita.fr>
19245
19246 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19247 In addition, put a comment in there, to replace...
19248 * tests/regression.at (%union and C comments): Remove.
19249
19250 2001-12-29 Akim Demaille <akim@epita.fr>
19251
19252 * tests/regression.at (Web2c Actions): Blindly move the actual
19253 output as expected output. The contents *seem* right to me, but I
19254 can't pretend reading perfectly parser tables... Nonetheless, all
19255 the other tests pass correctly, the table look OK, even though the
19256 presence of `$axiom' is to be noted: AFAICS it is useless (but
19257 harmless).
19258
19259 2001-12-29 Akim Demaille <akim@epita.fr>
19260
19261 * src/reader.c (readgram): Don't add the rule 0 if there were no
19262 rules read. In other words, add it _after_ having performed
19263 grammar sanity checks.
19264 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19265
19266 2001-12-29 Akim Demaille <akim@epita.fr>
19267
19268 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19269 visible, and some states have now a different number.
19270
19271 2001-12-29 Akim Demaille <akim@epita.fr>
19272
19273 * src/reader.c (readgram): Bind the initial rule's lineno to that
19274 of the first rule.
19275 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19276 (Solved SR Conflicts): Adjust rule 0's line number.
19277
19278 2001-12-29 Akim Demaille <akim@epita.fr>
19279
19280 Fix the `GAWK Grammar' failure.
19281
19282 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19283 the reductions of the first state which was mistakenly confused
19284 with the final state because precisely final_state was initialized
19285 to 0.
19286 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19287 now noticed by Bison.
19288 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19289 have a reduction on $default.
19290
19291 2001-12-29 Akim Demaille <akim@epita.fr>
19292
19293 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19294 rule line numbers.
19295 * src/closure.c (print_closure): Likewise.
19296 * src/derives.c (print_derives): Likewise.
19297 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19298 now.
19299
19300 2001-12-29 Akim Demaille <akim@epita.fr>
19301
19302 * src/lalr.c (lookaheads_print): New.
19303 (lalr): Call it when --trace-flag.
19304 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19305 are dumped.
19306
19307 2001-12-29 Akim Demaille <akim@epita.fr>
19308
19309 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19310 when walking through ritem, even via rule->rhs.
19311 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19312 (useful_production, useless_nonterminals): Likewise.
19313 (reduce_grammar_tables): Likewise, plus update nritems.
19314 * src/nullable.c (set_nullable): Likewise.
19315 * src/lalr.c (build_relations): Likewise.
19316 * tests/sets.at (Nullable): Adjust.
19317 Fortunately, now, the $axiom is no longer nullable.
19318
19319 2001-12-29 Akim Demaille <akim@epita.fr>
19320
19321 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19322 the 0-sentinel.
19323 * src/gram.c (ritem_longest_rhs): Likewise.
19324 * src/reduce.c (nonterminals_reduce): Likewise.
19325 * src/print_graph.c (print_graph): Likewise.
19326 * src/output.c (output_rule_data): Likewise.
19327 * src/nullable.c (set_nullable): Likewise.
19328
19329 2001-12-29 Akim Demaille <akim@epita.fr>
19330
19331 * src/output.c: Comment changes.
19332
19333 2001-12-27 Paul Eggert <eggert@twinsun.com>
19334
19335 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19336 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19337 Sparc, as they were causing more porting problems than the
19338 (minor) performance improvement was worth.
19339
19340 Also, catch up with 1.31's YYSTD.
19341
19342 2001-12-27 Akim Demaille <akim@epita.fr>
19343
19344 * src/output.c (output_gram): Rely on nritems, not the
19345 0-sentinel. See below.
19346 Use -1 as separator, not 0.
19347 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19348 Rely on -1 as separator in yyrhs, instead of 0.
19349 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19350 twice `Now at end of input', therefore there are two lines less to
19351 expect.
19352
19353 2001-12-27 Akim Demaille <akim@epita.fr>
19354
19355 * tests/regression.at (Unresolved SR Conflicts):
19356 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19357 below.
19358
19359 2001-12-27 Akim Demaille <akim@epita.fr>
19360
19361 * src/LR0.c (new_state): Recognize the final state by the fact it
19362 is reached by eoftoken.
19363 (insert_start_shifting_state, insert_eof_shifting_state)
19364 (insert_accepting_state, augment_automaton): Remove, since now
19365 these states are automatically computed from the initial state.
19366 (generate_states): Adjust.
19367 * src/print.c: When reporting a rule number to the user, substract
19368 1, so that the axiom rule is rule 0, and the first user rule is 1.
19369 * src/reduce.c: Likewise.
19370 * src/print_graph.c (print_core): For the time being, just as for
19371 the report, depend upon --trace-flags to dump the full set of
19372 items.
19373 * src/reader.c (readgram): Once the grammar read, insert the rule
19374 0: `$axiom: START-SYMBOL $'.
19375 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19376 number of the states has changed (the final state is no longer
19377 necessarily the last), catch up.
19378
19379 2001-12-27 Akim Demaille <akim@epita.fr>
19380
19381 Try to make the use of the eoftoken valid. Given that its value
19382 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19383 is used instead of > 0 where appropriate, (ii), depend upon nritems
19384 instead of the 0-sentinel.
19385
19386 * src/gram.h, src/gram.c (nritems): New.
19387 Expected to be duplication of nitems, but for the time being...
19388 * src/reader.c (packgram): Assert nritems and nitems are equal.
19389 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19390 * src/closure.c (print_closure, print_fderives): Likewise.
19391 * src/gram.c (ritem_print): Likewise.
19392 * src/print.c (print_core, print_grammar): Likewise.
19393 * src/print_graph.c: Likewise.
19394
19395 2001-12-27 Akim Demaille <akim@epita.fr>
19396
19397 * src/main.c (main): If there are complains after grammar
19398 reductions, then output the report anyway if requested, then die.
19399 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19400 * src/reader.c (eoftoken): New.
19401 (parse_token_decl): If the token being defined has value `0', it
19402 is the eoftoken.
19403 (packsymbols): No longer hack `tags' to insert `$' by hand.
19404 Be sure to preserve the value of the eoftoken.
19405 (reader): Make sure eoftoken is defined.
19406 Initialize nsyms to 0: now eoftoken is created just like the others.
19407 * src/print.c (print_grammar): Don't special case the eof token.
19408 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19409 lie anyway, albeit pleasant.
19410 * tests/calc.at: Exercise error messages with eoftoken.
19411 Change the grammar so that empty input is invalid.
19412 Adjust expectations.
19413 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19414
19415 2001-12-27 Akim Demaille <akim@epita.fr>
19416
19417 * configure.in: Check the protos of strchr ans strspn.
19418 Replace strchr if needed.
19419 * src/system.h: Provide the protos of strchr, strspn and memchr if
19420 missing.
19421 * lib/strchr.c: New.
19422 * src/reader.c (symbols_save): Use strchr.
19423
19424 2001-12-27 Akim Demaille <akim@epita.fr>
19425
19426 * src/print.c, src/print_graph.c (escape): New.
19427 Use it to quote the TAGS outputs.
19428 * src/print_graph.c (print_state): Now errors are in red, and
19429 reductions in green.
19430 Prefer high to wide: output the state number on a line of its own.
19431
19432 2001-12-27 Akim Demaille <akim@epita.fr>
19433
19434 * src/state.h, src/state.c (reductions_new): New.
19435 * src/LR0.c (set_state_table): Let all the states have a
19436 `reductions', even if reduced to 0.
19437 (save_reductions): Adjust.
19438 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19439 * src/print.c (print_reductions, print_actions): Adjust.
19440 * src/output.c (action_row): Adjust.
19441
19442 2001-12-27 Akim Demaille <akim@epita.fr>
19443
19444 * src/state.h, src/state.c (errs_new, errs_dup): New.
19445 * src/LR0.c (set_state_table): Let all the states have an errs,
19446 even if reduced to 0.
19447 * src/print.c (print_errs, print_reductions): Adjust.
19448 * src/output.c (output_actions, action_row): Adjust.
19449 * src/conflicts.c (resolve_sr_conflict): Adjust.
19450
19451 2001-12-27 Akim Demaille <akim@epita.fr>
19452
19453 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19454
19455 2001-12-27 Akim Demaille <akim@epita.fr>
19456
19457 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19458 * src/print.c: here.
19459 (lookaheadset, shiftset): New, used as additional storage by
19460 print_reductions.
19461 (print_results): Adjust.
19462 (print_shifts, print_gotos, print_errs): New, extracted from...
19463 (print_actions): here.
19464 * src/print_graph.c (print_actions): Remove dead code.
19465
19466 2001-12-27 Akim Demaille <akim@epita.fr>
19467
19468 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19469 `$n' and `@n'.
19470
19471 2001-12-27 Akim Demaille <akim@epita.fr>
19472
19473 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19474 (build_relations): Adjust.
19475
19476 2001-12-27 Akim Demaille <akim@epita.fr>
19477
19478 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19479 duplication.
19480
19481 2001-12-27 Akim Demaille <akim@epita.fr>
19482
19483 * src/reader.c (packgram): Catch nitems overflows.
19484
19485 2001-12-27 Akim Demaille <akim@epita.fr>
19486
19487 * src/files.c, src/files.h (guard_obstack): Remove.
19488 * src/output.c (output): Adjust.
19489 * src/reader.c (parse_braces): New, factoring...
19490 (copy_action, copy_guard): these two which are renamed as...
19491 (parse_action, parse_guard): these.
19492 As a voluntary consequence, using braces around guards is now
19493 mandatory.
19494
19495 2001-12-27 Akim Demaille <akim@epita.fr>
19496
19497 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19498 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19499 members.
19500 (symbol_list_new): Adjust.
19501 (copy_action): action_line is the first line, not the last.
19502 (copy_guard): Just as for actions, store the `action' only, not
19503 the switch/case/break flesh.
19504 Don't parse the user action that might follow the guard, let...
19505 (readgram): do it, i.e., now, there can be an action after a
19506 guard.
19507 In other words the guard is just explicitly optional.
19508 (packgram): Adjust.
19509 * src/output.c (guards_output): New.
19510 (output_parser): Call it when needed.
19511 (output): Also free the guard and attrs obstacks.
19512 * src/files.c, src/files.h (obstack_save): Remove.
19513 (output_files): Remove.
19514 As a result, if one needs the former `.act' file, using an
19515 appropriate skeleton which requires actions and guards is now
19516 required.
19517 * src/main.c (main): Adjust.
19518 * tests/semantic.at: New.
19519 * tests/regression.at: Use `input.y' as input file name.
19520 Avoid 8+3 problems by requiring input.c when the test needs the
19521 parser.
19522
19523 2001-12-27 Akim Demaille <akim@epita.fr>
19524
19525 * src/reader.c (symbol_list_new): Be sure to initialize all the
19526 fields.
19527
19528 2001-12-27 Akim Demaille <akim@epita.fr>
19529
19530 All the hacks using a final pseudo state are now useless.
19531
19532 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19533 * src/lalr.c (nLA): New.
19534 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19535 instead of lookaheadsp from the pseudo state (nstate + 1).
19536
19537 2001-12-27 Akim Demaille <akim@epita.fr>
19538
19539 * src/output.c (action_row, token_actions): Use a state_t instead
19540 of a integer, and nlookaheads instead of the following state's
19541 lookaheadsp.
19542
19543 2001-12-27 Akim Demaille <akim@epita.fr>
19544
19545 * src/conflicts.c (log_resolution, flush_shift)
19546 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19547 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19548 (conflicts_print, print_reductions): Use a state_t instead of an
19549 integer when referring to a state.
19550 As much as possible, depend upon nlookaheads, instead of the
19551 `lookaheadsp' member of the following state (since lookaheads of
19552 successive states are successive, the difference between state n + 1
19553 and n served as the number of lookaheads for state n).
19554 * src/lalr.c (add_lookback_edge): Likewise.
19555 * src/print.c (print_core, print_actions, print_state)
19556 (print_results): Likewise.
19557 * src/print_graph.c (print_core, print_actions, print_state)
19558 (print_graph): Likewise.
19559 * src/conflicts.h: Adjust.
19560
19561 2001-12-27 Akim Demaille <akim@epita.fr>
19562
19563 * src/bison.hairy: Formatting/comment changes.
19564 ANSIfy.
19565 Remove `register' indications.
19566 Add plenty of `static'.
19567
19568 2001-12-27 Akim Demaille <akim@epita.fr>
19569
19570 * src/output.c (prepare): Drop the muscle `ntbase' which
19571 duplicates ntokens.
19572 * src/bison.simple: Formatting/comment changes.
19573 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19574 is an undocumented synonym.
19575
19576 2001-12-22 Akim Demaille <akim@epita.fr>
19577
19578 * src/output.c (output_table_data): Change the prototype to use
19579 `int' for array ranges: some invocations do pass an int, not a
19580 short.
19581 Reported by Wayne Green.
19582
19583 2001-12-22 Akim Demaille <akim@epita.fr>
19584
19585 Some actions of web2c.y are improperly triggered.
19586 Reported by Mike Castle.
19587
19588 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19589 * tests/regression.at (Web2c): Rename as...
19590 (Web2c Report): this.
19591 (Web2c Actions): New.
19592
19593 2001-12-22 Akim Demaille <akim@epita.fr>
19594
19595 Reductions in web2c.y are improperly reported.
19596 Reported by Mike Castle.
19597
19598 * src/conflicts.c (print_reductions): Fix.
19599 * tests/regression.at (Web2c): New.
19600
19601 2001-12-18 Akim Demaille <akim@epita.fr>
19602
19603 Some host fail on `assert (!"foo")', which expands to
19604 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19605 Reported by Nelson Beebee.
19606
19607 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19608 `#define it_succeeded 0' and `assert (it_succeeded)'.
19609
19610 2001-12-17 Marc Autret <autret_m@epita.fr>
19611
19612 * src/bison.simple: Don't hard code the skeleton line and filename.
19613 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19614 New line counter 'skeleton_line' (skeleton-line muscle).
19615
19616 2001-12-17 Paul Eggert <eggert@twinsun.com>
19617
19618 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19619 YYDEBUG must be defined to a nonzero value.
19620
19621 * src/bison.simple (yytname): Do not assume that the user defines
19622 YYDEBUG to a properly parenthesized expression.
19623
19624 2001-12-17 Akim Demaille <akim@epita.fr>
19625
19626 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19627 nlookaheads is a new member.
19628 Adjust all users.
19629 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19630 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19631 state.
19632
19633 2001-12-17 Akim Demaille <akim@epita.fr>
19634
19635 * src/files.h, src/files.c (open_files, close_files): Remove.
19636 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19637 let...
19638 * src/reader.c (reader): Do it.
19639
19640 2001-12-17 Akim Demaille <akim@epita.fr>
19641
19642 * src/conflicts.c (print_reductions): Formatting changes.
19643
19644 2001-12-17 Akim Demaille <akim@epita.fr>
19645
19646 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19647 (flush_reduce): New.
19648 (resolve_sr_conflict): Adjust.
19649
19650 2001-12-17 Akim Demaille <akim@epita.fr>
19651
19652 * src/output.c (output_obstack): Be static and rename as...
19653 (format_obstack): this, to avoid any confusion with files.c's
19654 output_obstack.
19655 * src/reader.h (muscle_obstack): Move to...
19656 * src/output.h: here, since it's defined in output.c.
19657
19658 2001-12-17 Akim Demaille <akim@epita.fr>
19659
19660 * src/output.c (action_row, save_column, default_goto)
19661 (sort_actions, matching_state, pack_vector): Better variable
19662 locality.
19663
19664 2001-12-17 Akim Demaille <akim@epita.fr>
19665
19666 * src/output.c: Various formatting changes.
19667
19668 2001-12-17 Akim Demaille <akim@epita.fr>
19669
19670 * src/files.c (output_files): Free the output_obstack.
19671 * src/main.c (main): Call print and print_graph conditionally.
19672 * src/print.c (print): Work unconditionally.
19673 * src/print_graph.c (print_graph): Work unconditionally.
19674 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19675
19676 2001-12-16 Marc Autret <autret_m@epita.fr>
19677
19678 * src/output.c (actions_output): Fix. When we use %no-lines,
19679 there is one less line per action.
19680
19681 2001-12-16 Marc Autret <autret_m@epita.fr>
19682
19683 * src/bison.simple: Remove a useless #line directive.
19684 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19685 * src/output.c (get_lines_number): New.
19686 (output_parser): Adjust, now takes care about the lines of a
19687 output muscles.
19688 Fix line numbering.
19689 (actions_output): Computes the number of lines taken by actions.
19690 (output_master_parser): Insert new skeleton which is the name of
19691 the output parser file name.
19692
19693 2001-12-15 Marc Autret <autret_m@epita.fr>
19694
19695 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19696
19697 2001-12-15 Marc Autret <autret_m@epita.fr>
19698
19699 * src/output.c (output_gram): Keep track of the hairy one.
19700
19701 2001-12-15 Akim Demaille <akim@epita.fr>
19702
19703 Make `make distcheck' work.
19704
19705 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19706 system.h which uses libgettext.h.
19707
19708 2001-12-15 Akim Demaille <akim@epita.fr>
19709
19710 * src/nullable.c (set_nullable): Useless rules must be skipped,
19711 otherwise, since we range over their symbols, we might look at a
19712 nonterminal which no longer ``exists'', i.e., it is not counted in
19713 `nvars', hence we overflow our arrays.
19714
19715 2001-12-15 Akim Demaille <akim@epita.fr>
19716
19717 The header can also be produced directly, without any obstack!
19718 Yahoo!
19719
19720 * src/files.c, src/files.h (defines_obstack): Remove.
19721 (compute_header_macro): Global.
19722 (defines_obstack_save): Remove.
19723 * src/reader.c (parse_union_decl): No longer output to
19724 defines_obstack: its content can be found in the `stype' muscle
19725 anyway.
19726 (output_token_translations): Merge into...
19727 (symbols_output): this.
19728 Rename as...
19729 (symbols_save): this.
19730 (reader): Adjust.
19731 * src/output.c (header_output): New.
19732 (output): Call it.
19733
19734 2001-12-15 Akim Demaille <akim@epita.fr>
19735
19736 * src/reader.c (parse_union_decl): Instead of handling two obstack
19737 simultaneously, use one to define the `stype' muscle, and use the
19738 value of the latter to fill defines_obstack.
19739 (copy_comment): Remove.
19740 (copy_comment2): Work for a single obstack.
19741 Rename as...
19742 (copy_comment): this.
19743
19744 2001-12-15 Akim Demaille <akim@epita.fr>
19745
19746 * src/lex.c, src/lex.h (xgetc): No longer static.
19747 * src/reader.c (parse_union_decl): Revamp.
19748
19749 2001-12-15 Akim Demaille <akim@epita.fr>
19750
19751 Still making progress in separating Bison into (i) input, (ii)
19752 process, (iii) output: now we can directly output the parser file
19753 without using table_obstack at all.
19754
19755 * src/files.c, src/files.h (table_obstack): Bye bye.
19756 (parser_file_name): New.
19757 * src/files.c (compute_output_file_names): Compute it.
19758 * src/output.c (actions_output, output_parser)
19759 (output_master_parser): To a file instead of an obstack.
19760
19761 2001-12-15 Akim Demaille <akim@epita.fr>
19762
19763 Attach actions to rules, instead of pre-outputting them to
19764 actions_obstack.
19765
19766 * src/gram.h (rule_t): action and action_line are new members.
19767 * src/reader.c (symbol_list): Likewise.
19768 (copy_action): Save the actions within the rule.
19769 (packgram): Save them in rule_table.
19770 * src/output.c (actions_output): New.
19771 (output_parser): Use it on `%%actions'.
19772 (output_rule_data): Don't free rule_table.
19773 (output): Do it.
19774 (prepare): Don't save the `action' muscle.
19775 * src/bison.simple: s/%%action/%%actions/.
19776
19777 2001-12-15 Akim Demaille <akim@epita.fr>
19778
19779 * src/reader.c (copy_action): When --yacc, don't append a `;'
19780 to the user action: let it fail if lacking.
19781 Suggested by Arnold Robbins and Tom Tromey.
19782
19783 2001-12-14 Akim Demaille <akim@epita.fr>
19784
19785 * src/lex.c (literalchar): Simply return the char you decoded, non
19786 longer mess around with obstacks and int pointers.
19787 Adjust all callers.
19788
19789 2001-12-14 Akim Demaille <akim@epita.fr>
19790
19791 * src/lex.c (literalchar): Don't escape the special characters,
19792 just decode them, and keep them as char (before, eol was output as
19793 the 2 char string `\n' etc.).
19794 * src/output.c (output_rule_data): Use quotearg to output the
19795 token strings.
19796
19797 2001-12-13 Paul Eggert <eggert@twinsun.com>
19798
19799 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19800 Do not infringe on the global user namespace when using C++.
19801 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19802 All uses of `fprintf' and `stderr' changed.
19803
19804 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19805
19806 2001-12-13 Akim Demaille <akim@epita.fr>
19807
19808 The computation of nullable is broken: it doesn't handle empty
19809 RHS's properly.
19810
19811 * tests/torture.at (GNU AWK Grammar): New.
19812 * tests/sets.at (Nullable): New.
19813 * src/nullable.c (set_nullable): Instead of blindly looping over
19814 `ritems', loop over the rules, and then over their rhs's.
19815
19816 Work around Autotest bugs.
19817
19818 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19819 frame, because Autotest understand lines starting with a `+' as
19820 traces from the shell. Then, they are not processed properly.
19821 Admittedly an Autotest bug, but we don't have time to wait for
19822 Autotest to catch up.
19823 * tests/regression.at (Broken Closure): Adjust to the new table
19824 frames.
19825 Move to...
19826 * tests/sets.at: here.
19827
19828 2001-12-13 Akim Demaille <akim@epita.fr>
19829
19830 * src/closure.c (closure): Use nrules instead of playing tricks
19831 with BITS_PER_WORD.
19832
19833 2001-12-13 Akim Demaille <akim@epita.fr>
19834
19835 * src/print.c (print_actions): Output the handling of `$' as the
19836 traces do: shifting the token EOF. Before EOF was treated as a
19837 nonterminal.
19838 * tests/regression.at: Adjust some tests.
19839 * src/print_graph.c (print_core): Complete the set of items via
19840 closure. The next-to-final and final states are still unsatisfying,
19841 but that's to be addressed elsewhere.
19842 No longer output the rule numbers, but do output the state number.
19843 A single loop for the shifts + gotos is enough, but picked a
19844 distinct color for each.
19845 (print_graph): Initialize and finalize closure.
19846
19847 2001-12-13 Akim Demaille <akim@epita.fr>
19848
19849 * src/reader.c (readgram): Remove dead code, an strip useless
19850 braces.
19851 (get_type): Remove, unused.
19852
19853 2001-12-12 Akim Demaille <akim@epita.fr>
19854
19855 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19856 on that of lib/error.c.
19857
19858 2001-12-12 Akim Demaille <akim@epita.fr>
19859
19860 Some hosts don't like `/' in includes.
19861
19862 * src/system.h: Include libgettext.h without qualifying the path.
19863 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19864 $(top_srcdir).
19865
19866 2001-12-11 Marc Autret <autret_m@epita.fr>
19867
19868 * src/output.c (output_parser): Remove useless muscle.
19869
19870 2001-12-11 Marc Autret <autret_m@epita.fr>
19871
19872 * src/bison.simple: Remove #line just before %%epilogue. It
19873 is now handled in ...
19874 * src/reader.c (read_additionnal_code): Add the output of a
19875 #line for the epilogue.
19876
19877 2001-12-10 Marc Autret <autret_m@epita.fr>
19878
19879 * src/reader.c (copy_definition): Re-use CPP-outed code which
19880 replace precedent remove.
19881 * src/bison.simple: Remove #line before %%prologue because
19882 %%input-line is wrong at this time.
19883
19884 2001-12-10 Marc Autret <autret_m@epita.fr>
19885
19886 * src/reader.c (symbols_output): Clean up.
19887 * src/output.c (output_gram, output): Clean up.
19888
19889 2001-12-10 Akim Demaille <akim@epita.fr>
19890
19891 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19892 * src/LR0.c (set_state_table): here.
19893 * src/lalr.c (lalr): Call it.
19894
19895 2001-12-10 Akim Demaille <akim@epita.fr>
19896
19897 * src/state.h (shifts): Remove the `number' member: shifts are
19898 attached to state, hence no longer need to be labelled with a
19899 state number.
19900
19901 2001-12-10 Akim Demaille <akim@epita.fr>
19902
19903 Now that states have a complete set of members, the linked list of
19904 shifts is useless: just fill directly the state's shifts member.
19905
19906 * src/state.h (shifts): Remove the `next' member.
19907 * src/LR0.c (first_state, last_state): Remove.
19908 Adjust the callers.
19909 (augment_automaton): Don't look for the shifts that must be added
19910 a shift on EOF: it is those of the state we looked for! But now,
19911 since shifts are attached, it is no longer needed to looking
19912 merely by its id: its number.
19913
19914 2001-12-10 Akim Demaille <akim@epita.fr>
19915
19916 * src/LR0.c (augment_automaton): Better variable locality.
19917 Remove an impossible branch: if there is a state corresponding to
19918 the start symbol being shifted, then there is shift for the start
19919 symbol from the initial state.
19920
19921 2001-12-10 Akim Demaille <akim@epita.fr>
19922
19923 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19924 only when appropriate: when insert_start_shifting_state' is not
19925 invoked.
19926 * tests/regression.at (Rule Line Numbers): Adjust.
19927
19928 2001-12-10 Akim Demaille <akim@epita.fr>
19929
19930 * src/LR0.c (augment_automaton): Now that all states have shifts,
19931 merge the two cases addition shifts to the initial state.
19932
19933 2001-12-10 Akim Demaille <akim@epita.fr>
19934
19935 * src/lalr.c (set_state_table): Move to...
19936 * src/LR0.c: here.
19937 * src/lalr.c (lalr): Don't call it...
19938 * src/LR0.c (generate_states): do it.
19939 * src/LR0.h (first_state): Remove, only the table is used.
19940
19941 2001-12-10 Akim Demaille <akim@epita.fr>
19942
19943 * src/LR0.h (first_shift, first_reduction): Remove.
19944 * src/lalr.c: Don't use first_shift: find shifts through the
19945 states.
19946
19947 2001-12-10 Akim Demaille <akim@epita.fr>
19948
19949 * src/LR0.c: Attach shifts to states as soon as they are
19950 computed.
19951 * src/lalr.c (set_state_table): Instead of assigning shifts to
19952 state, just assert that the mapping was properly done.
19953
19954 2001-12-10 Akim Demaille <akim@epita.fr>
19955
19956 * src/LR0.c (insert_start_shift): Rename as...
19957 (insert_start_shifting_state): this.
19958 (insert_eof_shifting_state, insert_accepting_state): New.
19959 (augment_automaton): Adjust.
19960 Better locality of the variables.
19961 When looking if the start_symbol is shifted from the initial
19962 state, using `while (... symbol != start_symbol ...)' sounds
19963 better than `while (... symbol < start_symbol ...)': If fail
19964 to see how the order between symbols could be relevant!
19965
19966 2001-12-10 Akim Demaille <akim@epita.fr>
19967
19968 * src/getargs.h: Don't declare `spec_name_prefix' and
19969 `spec_file_prefix', declared by src/files.h.
19970 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19971 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19972 * src/output.c (prepare): Adjust.
19973 * src/reader.c (symbols_output): Likewise.
19974 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19975
19976 2001-12-10 Akim Demaille <akim@epita.fr>
19977
19978 * src/muscle_tab.c (muscle_init): NULL is a better default than
19979 `"0"'.
19980
19981 2001-12-10 Akim Demaille <akim@epita.fr>
19982
19983 * src/reader.c (reader): Calling symbols_output once is enough.
19984
19985 2001-12-10 Akim Demaille <akim@epita.fr>
19986
19987 Now that states have a complete set of members, the linked list of
19988 reductions is useless: just fill directly the state's reductions
19989 member.
19990
19991 * src/state.h (struct reductions): Remove member `number' and
19992 `next'.
19993 * src/LR0.c (first_reduction, last_reduction): Remove.
19994 (save_reductions): Don't link the new reductions, store them in
19995 this_state.
19996 * src/lalr.c (set_state_table): No need to attach reductions to
19997 states, it's already done.
19998 * src/output.c (output_actions): No longer free the shifts, then
19999 the reductions, then the states: free all the states and their
20000 members.
20001
20002 2001-12-10 Akim Demaille <akim@epita.fr>
20003
20004 * src/options.c (OPTN, DRTV, BOTH): New.
20005 (option_table): Use them.
20006
20007 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20008 the job of system.h.
20009 * src/options.c: Don't include stdio.h and xalloc.h for the same
20010 reasons.
20011
20012 2001-12-10 Akim Demaille <akim@epita.fr>
20013
20014 * src/output.c (output, prepare): Make sure the values of the
20015 muscles `action' and `prologue' are 0-terminated.
20016
20017 2001-12-10 Akim Demaille <akim@epita.fr>
20018
20019 Clean up GCC warnings.
20020
20021 * src/reader.c (copy_action): `buf' is not used.
20022 (parse_skel_decl): Be static.
20023 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20024 * src/options.h (create_long_option_table): Have a real prototype.
20025 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20026 (hash_delete_at): Return const void *.
20027 Adjust casts to preserve the const.
20028
20029 2001-12-10 Akim Demaille <akim@epita.fr>
20030
20031 * configure.in: Require 2.52g.
20032 M4 is not needed, but AUTOM4TE is.
20033 * m4/m4.m4: Remove.
20034 * tests/Makefile.am: Adjust.
20035
20036 2001-12-10 Akim Demaille <akim@epita.fr>
20037
20038 One structure for states is enough, even though theoretically
20039 there are LR(0) states and LALR(1) states.
20040
20041 * src/lalr.h (state_t): Remove.
20042 (state_table): Be state_t **, not state_t *.
20043 * src/state.h (core, CORE_ALLOC): Rename as...
20044 (state_t, STATE_ALLOC): this.
20045 Add the LALR(1) members: shifts, reductions, errs.
20046 * src/LR0.c (state_table): Rename as...
20047 (state_hash): this, to avoid name clashes with the global
20048 `state_table'.
20049 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20050 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20051
20052 2001-12-10 Akim Demaille <akim@epita.fr>
20053
20054 Bison dumps core on bash.y.
20055 Reported by Pascal Bart.
20056
20057 * src/warshall.c (bitmatrix_print): New.
20058 (TC): Use it.
20059 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20060 j must be the outer loop.
20061 * tests/regression.at (Broken Closure): New.
20062
20063 2001-12-05 Akim Demaille <akim@epita.fr>
20064
20065 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20066 its argument.
20067 Reported by Peter Hamorsky.
20068
20069 2001-12-05 Akim Demaille <akim@epita.fr>
20070
20071 * src/conflicts.c (err_table): Remove.
20072 (resolve_sr_conflict): Adjust.
20073 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20074 Rename as...
20075 (state_t.reductions, state_t.shifts): this.
20076
20077 2001-12-05 Akim Demaille <akim@epita.fr>
20078
20079 * src/reduce.c (reduce_grammar_tables): No longer disable the
20080 removal of useless rules via CPP but via `if (0)', so that the
20081 compiler still check the code is valid.
20082 For instance, it should have noticed `rline' no longer exists: use
20083 the `line' member of rule_t.
20084 * src/gram.c (dummy, rline): Remove, unused.
20085
20086 2001-12-05 Akim Demaille <akim@epita.fr>
20087
20088 * src/output.c (pack_vector): Use assert, not berror.
20089 * src/main.c (berror): Remove, unused.
20090
20091 2001-12-05 Akim Demaille <akim@epita.fr>
20092
20093 New experimental feature: if --verbose --trace output all the
20094 items of a state, not only its kernel.
20095
20096 * src/print.c (print_core): If `trace_flag', then invoke closure
20097 before outputting the items of the state (print_core is no longer
20098 a correct name them).
20099 (print_results): Invoke new_closure/free_closure if needed.
20100
20101 2001-12-05 Akim Demaille <akim@epita.fr>
20102
20103 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20104 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20105 (nitemset): for consistency with the rest of the project.
20106
20107 2001-12-05 Akim Demaille <akim@epita.fr>
20108
20109 * src/closure.c (print_closure): Improve.
20110 (closure): Use it for printing input and output.
20111
20112 2001-12-05 Akim Demaille <akim@epita.fr>
20113
20114 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20115 indexed by nonterminals.
20116
20117 2001-12-05 Akim Demaille <akim@epita.fr>
20118
20119 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20120 what it was!).
20121 * src/warshall.h: Remove accidental duplication of the content.
20122
20123 2001-12-05 Akim Demaille <akim@epita.fr>
20124
20125 * src/closure.c (set_fderives): De-obfuscate.
20126
20127 2001-12-05 Akim Demaille <akim@epita.fr>
20128
20129 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20130
20131 2001-12-05 Akim Demaille <akim@epita.fr>
20132
20133 * src/closure.c (set_firsts): De-obfuscate.
20134
20135 2001-12-05 Akim Demaille <akim@epita.fr>
20136
20137 * src/output.c (action_row): De-obfuscate
20138 using the good o' techniques: arrays not pointers, variable
20139 locality, BITISSET, RESETBIT etc.
20140
20141 2001-12-05 Akim Demaille <akim@epita.fr>
20142
20143 Pessimize the code to simplify it: from now on, all the states
20144 have a valid SHIFTS, which NSHIFTS is possibly 0.
20145
20146 * src/LR0.c (shifts_new): Be global and move to..
20147 * src/state.c, src/state.h: here.
20148 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20149 * src/print_graph: Adjust.
20150
20151 2001-12-05 Akim Demaille <akim@epita.fr>
20152
20153 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20154 * src/conflicts.c: Use it.
20155 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20156 incorrectly ``simplified''.
20157
20158 2001-12-05 Akim Demaille <akim@epita.fr>
20159
20160 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20161 using the good o' techniques: arrays not pointers, variable
20162 locality, BITISSET, RESETBIT etc.
20163
20164 2001-12-05 Akim Demaille <akim@epita.fr>
20165
20166 * src/state.h (SHIFT_SYMBOL): New.
20167 * src/conflicts.c: Use it to deobfuscate.
20168
20169 2001-12-05 Akim Demaille <akim@epita.fr>
20170
20171 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20172 (print_reductions): De-obfuscate using the good o' techniques:
20173 arrays not pointers, variable locality, BITISSET.
20174
20175 2001-12-05 Akim Demaille <akim@epita.fr>
20176
20177 * src/conflicts.c (print_reductions): Arrays, not pointers.
20178 Use BITISSET.
20179
20180 2001-12-05 Akim Demaille <akim@epita.fr>
20181
20182 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20183
20184 2001-12-05 Akim Demaille <akim@epita.fr>
20185
20186 * src/conflicts.c (print_reductions): Improve variable locality.
20187
20188 2001-12-05 Akim Demaille <akim@epita.fr>
20189
20190 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20191
20192 2001-12-05 Akim Demaille <akim@epita.fr>
20193
20194 * src/conflicts.c (print_reductions): Improve variable locality.
20195
20196 2001-12-05 Akim Demaille <akim@epita.fr>
20197
20198 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20199 * src/lalr.c: Use them.
20200
20201 2001-12-05 Akim Demaille <akim@epita.fr>
20202
20203 * src/LR0.c (augment_automaton): Formatting changes.
20204 Better variable locality.
20205
20206 2001-12-05 Akim Demaille <akim@epita.fr>
20207
20208 * src/lalr.c (matrix_print): New.
20209 (transpose): Use it.
20210 Use arrays instead of pointers.
20211
20212 2001-12-05 Akim Demaille <akim@epita.fr>
20213
20214 * src/lalr.c (maxrhs): Move to...
20215 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20216 * src/lalr.c (build_relations): Adjust.
20217
20218 2001-12-05 Akim Demaille <akim@epita.fr>
20219
20220 * src/lalr.c (transpose): Free the memory allocated to the
20221 argument, as it is replaced by the results by the unique caller.
20222 (build_relations): Merely invoke transpose: it handles the memory
20223 deallocation.
20224 Improve variable locality.
20225 Avoid variables used as mere abbreviations.
20226 (compute_lookaheads): Use arrays instead of pointers.
20227
20228 2001-12-05 Akim Demaille <akim@epita.fr>
20229
20230 * src/lalr.c (initialize_F): Improve variable locality.
20231 Avoid variables used as mere abbreviations.
20232
20233 2001-12-05 Akim Demaille <akim@epita.fr>
20234
20235 * src/derives.c (print_derives): Display the ruleno.
20236 * src/lalr.c (initialize_F, transpose): Better variable locality
20237 to improve readability.
20238 Avoid variables used as mere abbreviations.
20239
20240 2001-12-05 Akim Demaille <akim@epita.fr>
20241
20242 * src/lalr.c (traverse): Use arrays instead of pointers.
20243
20244 2001-12-05 Akim Demaille <akim@epita.fr>
20245
20246 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20247 the handling of squeue.
20248 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20249
20250 2001-12-05 Akim Demaille <akim@epita.fr>
20251
20252 Because useless nonterminals are now kept alive (instead of being
20253 `destroyed'), we now sometimes examine them, and store information
20254 related to them. Hence we need to know their number, and adjust
20255 memory allocations.
20256
20257 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20258 static.
20259 * src/LR0.c (allocate_itemsets): The memory allocated to
20260 `symbol_count' was used for two different purpose: once to count
20261 the number of occurrences of each symbol, and later reassigned to
20262 `shift_symbol', containing the symbol that can be shifted from a
20263 given state.
20264 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20265 only, and...
20266 (new_itemsets): Allocate `shift_symbol' here.
20267 (allocate_itemsets): symbol_count includes useless nonterminals.
20268 Make room for them.
20269 (free_storage): Use `free', not `XFREE', for pointers that cannot
20270 be null.
20271
20272 2001-12-05 Akim Demaille <akim@epita.fr>
20273
20274 * src/nullable.c (set_nullable): Deobfuscate the handling of
20275 ritem.
20276 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20277
20278 2001-12-05 Akim Demaille <akim@epita.fr>
20279
20280 * src/gram.c, src/gram.h (ritem_print): New.
20281 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20282 (This useless function was defined only to work around VMS linkers
20283 that can't handle compilation units with variables only).
20284 * src/reduce.c (dump_grammar): Use it to trace the construction of
20285 ritem.
20286
20287 2001-12-04 Paul Eggert <eggert@twinsun.com>
20288
20289 * src/bison.simple (union yyalloc): Change member names
20290 to be the same as the stack names.
20291 (yyparse): yyptr is now union yyalloc *, not char *.
20292 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20293 and may generate better code on some machines.
20294 (yystpcpy): Use prototype if __STDC__ is defined, not just
20295 if __cplusplus is defined.
20296
20297 2001-11-30 Akim Demaille <akim@epita.fr>
20298
20299 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20300 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20301 Gettext doesn't compile cleanly, and dies with -Werror.
20302 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20303 Include WARNING_CFLAGS here.
20304 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20305 before being defined.
20306
20307 2001-11-27 Paul Eggert <eggert@twinsun.com>
20308
20309 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20310 First arg is int, not unsigned.
20311 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20312 (SIZE_MAX, UINT_MAX): New macros.
20313 (quotearg_n_options): Abort if N is negative.
20314 Avoid overflow check on hosts where size_t is 64 bits and int
20315 is 32 bits, as overflow is impossible there.
20316 Fix off-by-one typo that caused unnecessary reallocation.
20317
20318 2001-11-29 Paul Eggert <eggert@twinsun.com>
20319
20320 Name space cleanup in generated parser.
20321
20322 * doc/bison.texinfo (Bison Parser): Discuss system headers
20323 and their effect on the user name space.
20324
20325 * src/bison.simple:
20326 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20327 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20328 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20329
20330 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20331 on user names when possible.
20332
20333 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20334 Simplify test for whather <alloca.h> exists.
20335
20336 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20337
20338 (<stdio.h>): Include if YYDEBUG.
20339
20340 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20341 ! defined (yyoverflow) && ! defined (yymemcpy).
20342
20343 (yymemcpy, yyparse): Rename local variables as needed so that
20344 they all begin with 'yy'.
20345
20346 (yystrlen, yystpcpy): New functions.
20347
20348 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20349 All uses changed.
20350
20351 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20352 instead of relying on string.h functions. Use YYSTACK_ALLOC
20353 and YYSTACK_FREE instead of malloc and free.
20354
20355 2001-11-30 Akim Demaille <akim@epita.fr>
20356
20357 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20358 before their first uses.
20359 (YYBISON, YYPURE): Move to the top of the output.
20360
20361 2001-11-30 Akim Demaille <akim@epita.fr>
20362
20363 * tests/reduce.at (Useless Nonterminals): Fix.
20364
20365 2001-11-30 Akim Demaille <akim@epita.fr>
20366
20367 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20368 if body instead of `;' to pacify GCC's warnings.
20369
20370 2001-11-30 Akim Demaille <akim@epita.fr>
20371
20372 Instead of mapping the LHS of unused rules to -1, keep the LHS
20373 valid, but flag the rules as invalid.
20374
20375 * src/gram.h (rule_t): `useful' is a new member.
20376 * src/print.c (print_grammar): Adjust.
20377 * src/derives.c (set_derives): Likewise.
20378 * src/reader.c (packgram, reduce_output): Likewise.
20379 * src/reduce.c (reduce_grammar_tables): Likewise.
20380 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20381
20382 2001-11-30 Akim Demaille <akim@epita.fr>
20383
20384 * src/reduce.c (reduce_output): Formatting changes.
20385 * src/print.c (print_results, print_grammar): Likewise.
20386 * tests/regression.at (Rule Line Numbers)
20387 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20388
20389 2001-11-30 Akim Demaille <akim@epita.fr>
20390
20391 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20392 useless nonterminals, move them at the end of the symbol arrays.
20393 (reduce_output): Adjust.
20394 * tests/reduce.at (Useless Nonterminals): Adjust.
20395
20396 2001-11-30 Akim Demaille <akim@epita.fr>
20397
20398 * src/reduce.c: Various comment/formatting changes.
20399 (nonterminals_reduce): New, extracted from...
20400 (reduce_grammar_tables): here.
20401 (reduce_grammar): Call nonterminals_reduce.
20402
20403 2001-11-29 Paul Eggert <eggert@twinsun.com>
20404
20405 * src/bison.simple (YYSTACK_REALLOC): Remove.
20406 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20407 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20408 New macros.
20409 (union yyalloc): New type.
20410 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20411 an arbitrary restriction on hosts where size_t is wider than int.
20412
20413 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20414 a parser stack overflow. Allocate just one block of memory for all
20415 three stacks, instead of allocating three blocks; this typically is
20416 faster and reduces fragmentation.
20417
20418 Do not limit the number of items in the stack to a value that fits
20419 in 'int', as this is an arbitrary limit on hosts with 64-bit
20420 size_t and 32-bit int.
20421
20422 2001-11-29 Marc Autret <autret_m@epita.fr>
20423
20424 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20425 of defining YYERROR_VERBOSE.
20426 [AT_DATA]: $4 is now out of C declarations in the prologue.
20427
20428 2001-11-28 Marc Autret <autret_m@epita.fr>
20429
20430 * src/reader.c (parse_dquoted_param): New.
20431 (parse_skel_decl): Use it.
20432 * src/lex.h: Add its prototype.
20433 * src/lex.c (literalchar): Become not static.
20434
20435 2001-11-28 Marc Autret <autret_m@epita.fr>
20436
20437 * src/output.h: And put its extern declaration here.
20438 * src/output.c (error_verbose): Define here.
20439 (prepare): Echo name modification.
20440 * src/getargs.h: Clean its extern declaration.
20441 * src/getargs.c (error_verbose_flag): Remove.
20442 (getargs): Remove case 'e'.
20443 * src/options.c (option_table): 'error-verbose' is now seen as simple
20444 percent option.
20445 Include output.h.
20446
20447 * src/reader.c (read_declarations): Remove case tok_include.
20448 (parse_include_decl): Remove.
20449 * src/lex.h (token_t): Remove tok_include.
20450 * src/options.c (option_table): 'include' is now a simple command line
20451 option.
20452
20453 2001-11-28 Marc Autret <autret_m@epita.fr>
20454
20455 * src/bison.simple: Adjust muscle names.
20456 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20457 * src/output.c (prepare): s/_/-/ for the muscles names.
20458 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20459
20460 2001-11-28 Marc Autret <autret_m@epita.fr>
20461
20462 * src/bison.simple: Fix debug.
20463 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20464
20465 2001-11-28 Akim Demaille <akim@epita.fr>
20466
20467 * src/LR0.c (shifts_new): New.
20468 (save_shifts, insert_start_shift, augment_automaton): Use it.
20469
20470 2001-11-28 Akim Demaille <akim@epita.fr>
20471
20472 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20473 keep ruleno only.
20474
20475 2001-11-28 Akim Demaille <akim@epita.fr>
20476
20477 * src/closure.c (closure): Instead of looping over word in array
20478 then bits in words, loop over bits in array.
20479
20480 2001-11-28 Akim Demaille <akim@epita.fr>
20481
20482 * src/closure.c (closure): No longer optimize the special case
20483 where all the bits of `ruleset[r]' are set to 0, to make the code
20484 clearer.
20485
20486 2001-11-28 Akim Demaille <akim@epita.fr>
20487
20488 * src/closure.c (closure): `r' and `c' are new variables, used to
20489 de-obfuscate accesses to RULESET and CORE.
20490
20491 2001-11-28 Akim Demaille <akim@epita.fr>
20492
20493 * src/reduce.c (reduce_print): Use ngettext.
20494 (dump_grammar): Improve the trace accuracy.
20495
20496 2001-11-28 Akim Demaille <akim@epita.fr>
20497
20498 * src/reduce.c (dump_grammar): Don't translate trace messages.
20499
20500 2001-11-28 Akim Demaille <akim@epita.fr>
20501
20502 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20503 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20504 as all tags are free'ed afterwards.
20505 From Enrico Scholz.
20506
20507 2001-11-27 Paul Eggert <eggert@twinsun.com>
20508
20509 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20510 use alloca when we didn't want to, and vice versa.
20511
20512 2001-11-27 Marc Autret <autret_m@epita.fr>
20513
20514 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20515 initialization.
20516 * src/output.c (prepare): Remove its update.
20517
20518 2001-11-27 Marc Autret <autret_m@epita.fr>
20519
20520 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20521 Use %error-verbose.
20522
20523 2001-11-27 Marc Autret <autret_m@epita.fr>
20524
20525 * src/bison.simple: Remove YYERROR_VERBOSE using.
20526 Use %%error_verbose.
20527 (yyparse): Likewise.
20528 * src/output.c (prepare): Give its final value.
20529 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20530 * src/getargs.h: Add its extern declaration.
20531 * src/getargs.c (error_verbose_flag): New int.
20532 (getargs): Update to catch new case.
20533 * src/options.c (option_table): 'error-verbose' is a new option.
20534 (shortopts): Update.
20535
20536 2001-11-27 Akim Demaille <akim@epita.fr>
20537
20538 * src/system.h: Use intl/libgettext.h.
20539 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20540
20541 2001-11-27 Akim Demaille <akim@epita.fr>
20542
20543 * tests/torture.at (Exploding the Stack Size with Malloc):
20544 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20545
20546 2001-11-27 Akim Demaille <akim@epita.fr>
20547
20548 * src/files.c: Include error.h.
20549 Reported by Hans Aberg.
20550
20551 2001-11-26 Marc Autret <autret_m@epita.fr>
20552
20553 * src/reader.c (parse_include_decl): New, not yet implemented.
20554 (read_declarations): Add case tok_include.
20555 * src/getargs.h (include): Add its extern definition.
20556 * src/getargs.c (include): New const char *.
20557 (getargs): Add case '-I'.
20558 * src/options.c (option_table): Add include as command line and
20559 percent option.
20560 * src/lex.h (token_t): Add tok_include.
20561
20562 2001-11-26 Akim Demaille <akim@epita.fr>
20563
20564 * src/reader.c (readgram): Make sure rules for mid-rule actions
20565 have a lineno equal to that of their host rule.
20566 Reported by Hans Aberg.
20567 * tests/regression.at (Rule Line Numbers): New.
20568
20569 2001-11-26 Akim Demaille <akim@epita.fr>
20570
20571 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20572 size_ts.
20573
20574 2001-11-26 Akim Demaille <akim@epita.fr>
20575
20576 * src/complain.c, src/complain.h (error): Remove, provided by
20577 lib/error.[ch].
20578
20579 2001-11-26 Akim Demaille <akim@epita.fr>
20580
20581 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20582 issue an error message.
20583 * tests/regression.at (Invalid %directive): New.
20584 Reported by Hans Aberg.
20585
20586 2001-11-26 Akim Demaille <akim@epita.fr>
20587
20588 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20589 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20590
20591 2001-11-26 Akim Demaille <akim@epita.fr>
20592
20593 * src/conflicts.c (conflicts_print): Don't complain at all when
20594 there are no reduce/reduce conflicts, and as many shift/reduce
20595 conflicts as expected.
20596 * tests/regression.at (%expect right): Adjust.
20597
20598 2001-11-23 Akim Demaille <akim@epita.fr>
20599
20600 * lib/alloca.c: Update, from fileutils.
20601
20602 2001-11-23 Akim Demaille <akim@epita.fr>
20603
20604 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20605
20606 2001-11-23 Akim Demaille <akim@epita.fr>
20607
20608 * src/system.h: Include alloca.h.
20609 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20610
20611 2001-11-23 Akim Demaille <akim@epita.fr>
20612
20613 * src/print_graph.c (print_actions): Remove `rule', unused.
20614 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20615 pacify GCC's signed < unsigned warnings.
20616 * src/closure.c (itemsetsize): Likewise.
20617 * src/reader.c (symbol_list_new): Static.
20618
20619 2001-11-23 Akim Demaille <akim@epita.fr>
20620
20621 Attaching lineno to buckets is stupid, since only one copy of each
20622 symbol is kept, only the line of the first occurrence is kept too.
20623
20624 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20625 * src/reader.c (rline_allocated): Remove, unused.
20626 (symbol_list): Have a `line' member.
20627 (symbol_list_new): New.
20628 (readgram): Use it.
20629 * src/print.c (print_grammar): Output the rule line numbers.
20630 * tests/regression.at (Solved SR Conflicts)
20631 (Unresolved SR Conflicts): Adjust.
20632 Reported by Hans Aberg.
20633
20634 2001-11-22 Marc Autret <autret_m@epita.fr>
20635
20636 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20637
20638 2001-11-22 Marc Autret <autret_m@epita.fr>
20639
20640 * src/muscle_tab.c (muscle_init): Remove initialization of
20641 skeleton muscle.
20642 * src/output.c (output_master_parser): Do it here.
20643
20644 2001-11-20 Akim Demaille <akim@epita.fr>
20645
20646 * po/sv.po: New.
20647 * configure.in (ALL_LINGUAS): Adjust.
20648 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20649 longer contains strings to translate.
20650
20651 2001-11-19 Akim Demaille <akim@epita.fr>
20652
20653 * src/conflicts.c (conflicts_print): Add a missing \n.
20654
20655 2001-11-19 Akim Demaille <akim@epita.fr>
20656
20657 * src/nullable.c (nullable_print): New.
20658 (set_nullable): Call it when tracing.
20659 Better locality of variables.
20660
20661 2001-11-19 Akim Demaille <akim@epita.fr>
20662
20663 * src/print.c (print_actions): Better locality of variables.
20664
20665 2001-11-19 Akim Demaille <akim@epita.fr>
20666
20667 * src/derives.c (print_derives): Fix and enrich.
20668 * src/closure.c (print_fderives): Likewise.
20669
20670 2001-11-19 Akim Demaille <akim@epita.fr>
20671
20672 * src/closure.c (itemsetend): Remove, replaced with...
20673 (itemsetsize): new.
20674
20675 2001-11-19 Akim Demaille <akim@epita.fr>
20676
20677 * src/LR0.c (kernel_end): Remove, replaced with...
20678 (kernel_size): new.
20679
20680 2001-11-19 Akim Demaille <akim@epita.fr>
20681
20682 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20683 to clarify.
20684
20685 2001-11-19 Akim Demaille <akim@epita.fr>
20686
20687 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20688
20689 2001-11-19 Akim Demaille <akim@epita.fr>
20690
20691 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20692 trace messages.
20693 * src/LR0.c: Likewise.
20694 (allocate_itemsets): Use arrays instead of pointers to clarify.
20695
20696 2001-11-19 Akim Demaille <akim@epita.fr>
20697
20698 * src/getargs.c (statistics_flag): Replace with...
20699 (trace_flag): New.
20700 (longopts): Accept --trace instead of --statistics.
20701 * src/getargs.h, src/options.c: Adjust.
20702 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20703 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20704
20705 2001-11-19 Akim Demaille <akim@epita.fr>
20706
20707 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20708 pointers to clarify the code.
20709 (save_reductions, save_shifts): Factor common parts of alternatives.
20710
20711 2001-11-19 Akim Demaille <akim@epita.fr>
20712
20713 * src/LR0.c (new_state, get_state): Complete TRACE code.
20714 * src/closure.c: Include `reader.h' to get `tags', needed by the
20715 trace code.
20716 Rename the conditional DEBUG as TRACE.
20717 Output consistently TRACEs to stderr, not stdout.
20718 * src/derives.c: Likewise.
20719 * src/reduce.c: (inaccessable_symbols): Using if is better style
20720 than goto.
20721 Use `#if TRACE' instead of `#if 0' for tracing code.
20722
20723 2001-11-19 Akim Demaille <akim@epita.fr>
20724
20725 * src/system.h (LIST_FREE, shortcpy): New.
20726 * src/LR0.c: Use them.
20727 * src/output.c (free_itemsets, free_reductions, free_shifts):
20728 Remove, replaced by LIST_FREE.
20729
20730 2001-11-19 Akim Demaille <akim@epita.fr>
20731
20732 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20733 (REDUCTIONS_ALLOC): New.
20734 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20735 allocation.
20736
20737 2001-11-19 Akim Demaille <akim@epita.fr>
20738
20739 * src/LR0.c (new_state): Complete trace code.
20740 * src/nullable.c (set_nullable): Don't translate traces.
20741
20742 2001-11-19 Akim Demaille <akim@epita.fr>
20743
20744 * src/print_graph.c (print_core): Better locality of variables.
20745 * src/print.c (print_core): Likewise.
20746
20747 2001-11-19 Akim Demaille <akim@epita.fr>
20748
20749 * src/vcg.c: You do the output, so you are responsible of the
20750 handling of VCG syntax, in particular: use quotearg.
20751 * src/print_graph.c: Don't.
20752 (print_actions): Don't output the actions as part of the nodes,
20753 since that's the job of the edges.
20754 (print_state): Don't output by hand: fill the node description,
20755 and ask for its output.
20756
20757 2001-11-19 Akim Demaille <akim@epita.fr>
20758
20759 * src/bison.simple (yyparse): When verbosely reporting an error,
20760 no longer put additional quotes around token names.
20761 * tests/calc.at: Adjust.
20762
20763 2001-11-19 Akim Demaille <akim@epita.fr>
20764
20765 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20766 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20767 * src/output.c: Adjust.
20768
20769 2001-11-19 Akim Demaille <akim@epita.fr>
20770
20771 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20772 (rule_t): this.
20773 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20774
20775 2001-11-19 Akim Demaille <akim@epita.fr>
20776
20777 * src/gram.h (rule_t): New.
20778 (rule_table): New.
20779 (rrhs, rlhs): Remove, part of state_t.
20780 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20781 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20782 * src/reader.c, src/reduce.c: Adjust.
20783
20784 2001-11-19 Akim Demaille <akim@epita.fr>
20785
20786 * src/reader.c (symbols_output): New, extracted from...
20787 (packsymbols): Here.
20788 (reader): Call it.
20789
20790 2001-11-19 Akim Demaille <akim@epita.fr>
20791
20792 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20793 (maxrhs): this new function.
20794
20795 2001-11-19 Akim Demaille <akim@epita.fr>
20796
20797 * src/lalr.c (F): New macro to access the variable F.
20798 Adjust.
20799
20800 2001-11-19 Akim Demaille <akim@epita.fr>
20801
20802 * src/lalr.h (LA): New macro to access the variable LA.
20803 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20804 * src/lalr.c: Adjust.
20805
20806 2001-11-19 Akim Demaille <akim@epita.fr>
20807
20808 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20809 (set_state_table): handle the `lookaheads' members.
20810
20811 2001-11-19 Akim Demaille <akim@epita.fr>
20812
20813 * src/lalr.h (lookaheads): Removed array, whose contents is now
20814 a member of...
20815 (state_t): this structure.
20816 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20817 Adjust.
20818
20819 2001-11-19 Akim Demaille <akim@epita.fr>
20820
20821 * src/lalr.h (consistent): Removed array, whose contents is now
20822 a member of...
20823 (state_t): this structure.
20824 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20825 Adjust.
20826
20827 2001-11-19 Akim Demaille <akim@epita.fr>
20828
20829 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20830 contents are now members of...
20831 (state_t): this structure.
20832 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20833 Adjust.
20834
20835 2001-11-19 Akim Demaille <akim@epita.fr>
20836
20837 * src/lalr.h (state_t): New.
20838 (state_table): Be a state_t * instead of a core **.
20839 (accessing_symbol): Remove, part of state_t.
20840 * src/lalr.c: Adjust.
20841 (set_accessing_symbol): Merge into...
20842 (set_state_table): this.
20843 * src/print_graph.c, src/conflicts.c: Adjust.
20844
20845 2001-11-14 Akim Demaille <akim@epita.fr>
20846
20847 * tests/calc.at, tests/output.at, tests/regression.at,
20848 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20849 now the tests are run in private dirs, therefore AC_CLEANUP and
20850 family can be simplified to 0-ary.
20851 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20852 use abs. path to find config.h.
20853 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20854 stderr, there can be way too much random noise.
20855 Instead pass -Werror to GCC and rely on the exit status.
20856 Reported by Wolfram Wagner.
20857
20858 2001-11-14 Akim Demaille <akim@epita.fr>
20859
20860 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20861 defined only if yyoverflow is defined, to avoid `warning: unused
20862 variable `yyvs1''.
20863 Reported by The Test Suite.
20864
20865 2001-11-14 Akim Demaille <akim@epita.fr>
20866
20867 * src/print.c: Include reduce.h.
20868 Reported by Hans Aberg.
20869
20870 2001-11-14 Akim Demaille <akim@epita.fr>
20871
20872 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20873 Revert a previous patch: these are really const.
20874 * src/conflicts.c (conflict_report): Additional useless pair of
20875 braces to pacify GCC's warnings for `if () if () {} else {}'.
20876 * src/lex.c (parse_percent_token): Replace equal_offset with
20877 arg_offset.
20878 arg is const.
20879 Be sure to strdup `arg' when used, since there is no reason for
20880 token_buffer not to change.
20881
20882 2001-11-14 Akim Demaille <akim@epita.fr>
20883
20884 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20885 definition.
20886 * src/main.c (main): Use them.
20887 Suggested by Hans Aberg.
20888
20889 2001-11-12 Akim Demaille <akim@epita.fr>
20890
20891 * src/system.h (ngettext): Now that we use ngettext, be sure to
20892 provide a default definition when NLS are not used.
20893
20894 2001-11-12 Akim Demaille <akim@epita.fr>
20895
20896 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20897 Use @kbd to denote user input.
20898 (Language and Grammar): ANSIfy the example.
20899 Adjust its layout for info/notinfo.
20900 (Location Tracking Calc): Output error messages to stderr.
20901 Output locations in a more GNUtically correct way.
20902 Fix a couple of Englishos.
20903 Adjust @group/@end group pairs.
20904
20905 2001-11-12 Akim Demaille <akim@epita.fr>
20906
20907 %expect was not functioning at all.
20908
20909 * src/conflicts.c (expected_conflicts): Set to -1.
20910 (conflict_report): Use ngettext.
20911 (conflicts_print): Check %expect and make its violation an error.
20912 * doc/bison.texinfo (Expect Decl): Adjust.
20913 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20914 * tests/regression.at (%expect not enough, %expect right)
20915 (%expect too much): New.
20916
20917 2001-11-12 Akim Demaille <akim@epita.fr>
20918
20919 * tests/regression.at (Conflicts): Rename as...
20920 (Unresolved SR Conflicts): this.
20921 (Solved SR Conflicts): New.
20922
20923 2001-11-12 Akim Demaille <akim@epita.fr>
20924
20925 * src/reduce.c (print_results): Rename as...
20926 (reduce_output): This.
20927 Output to OUT, passed as argument, instead of output_obstack.
20928 (dump_grammar): Likewise.
20929 (reduce_free): New.
20930 Also free V1.
20931 (reduce_grammar): No longer call reduce_output, since...
20932 * src/print.c (print_results): do it.
20933 * src/main.c (main): Call reduce_free;
20934
20935 2001-11-12 Akim Demaille <akim@epita.fr>
20936
20937 * src/conflicts.c (print_reductions): Accept OUT as argument.
20938 Output to it, not to output_obstack.
20939 * src/print.c (print_actions): Adjust.
20940
20941 2001-11-12 Akim Demaille <akim@epita.fr>
20942
20943 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20944 the result instead of using...
20945 (src_total, rrc_total, src_count, rrc_count): Remove.
20946 (any_conflicts): Remove.
20947 (print_conflicts): Split into...
20948 (conflicts_print, conflicts_output): New.
20949 * src/conflicts.h: Adjust.
20950 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20951 * src/print.c (print_grammar): Issue `\n' between two rules.
20952 * tests/regression.at (Conflicts): New.
20953 Reported by Tom Lane.
20954
20955 2001-11-12 Akim Demaille <akim@epita.fr>
20956
20957 * tests/regression.at (Invalid input): Remove, duplicate with
20958 ``Invalid input: 1''.
20959
20960 2001-11-12 Akim Demaille <akim@epita.fr>
20961
20962 * tests/torture.at (AT_DATA_STACK_TORTURE)
20963 (Exploding the Stack Size with Alloca)
20964 (Exploding the Stack Size with Malloc): New.
20965
20966 2001-11-12 Akim Demaille <akim@epita.fr>
20967
20968 * src/bison.simple (YYSTACK_REALLOC): New.
20969 (yyparse) [!yyoverflow]: Use it and free the old stack.
20970 Reported by Per Allansson.
20971
20972 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20973
20974 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20975 define CPP macro, which substitute YYSTYPE by yystype.
20976 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20977 with yyltype/YYLTYPE. This allows inclusion of the generated
20978 header within the parser if the compiler, such as GGC, accepts
20979 multiple equivalent #defines.
20980 From Akim.
20981
20982 2001-11-05 Akim Demaille <akim@epita.fr>
20983
20984 * src/reader.c (symbols_output): New, extracted from...
20985 (packsymbols): here.
20986 (reader): Adjust.
20987
20988 2001-11-05 Akim Demaille <akim@epita.fr>
20989
20990 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20991
20992 2001-11-05 Akim Demaille <akim@epita.fr>
20993
20994 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20995 pattern.
20996
20997 2001-11-05 Akim Demaille <akim@epita.fr>
20998
20999 * src/options.h (struct option_table_struct): set_flags is void*.
21000 * src/options.c (longopts): Support `--output' and `%output'.
21001 (usage): Adjust.
21002 * src/lex.h (tok_setopt): Remove, replaced with...
21003 (tok_intopt, tok_stropt): these new guys.
21004 * src/lex.c (getopt.h): Not needed.
21005 (token_buffer, unlexed_token_buffer): Not const.
21006 (percent_table): Promote `-' over `_' in directive names.
21007 Active `%name-prefix', `file-prefix', and `output'.
21008 (parse_percent_token): Accept possible arguments to directives.
21009 Promote `-' over `_' in directive names.
21010
21011 2001-11-04 Akim Demaille <akim@epita.fr>
21012
21013 * doc/bison.texinfo (Decl Summary): Split the list into
21014 `directives for grammars' and `directives for bison'.
21015 Sort'em.
21016 Add description of `%name-prefix', `file-prefix', and `output'.
21017 Promote `-' over `_' in directive names.
21018 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21019 Simplify the description of `--name-prefix'.
21020 Promote `-' over `_' in directive names.
21021 Promote `--output' over `--output-file'.
21022 Fix the description of `--defines'.
21023 * tests/output.at: Exercise %file-prefix and %output.
21024
21025 2001-11-02 Akim Demaille <akim@epita.fr>
21026
21027 * doc/refcard.tex: Update.
21028
21029 2001-11-02 Akim Demaille <akim@epita.fr>
21030
21031 * src/symtab.h (SUNDEF): New.
21032 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21033 stand for `uninitialized', instead of 0.
21034 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21035 * src/lex.c (lex): Adjust.
21036
21037 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21038 Number it 0.
21039 Let yylex return it instead of a plain 0.
21040 Reported by Dick Streefland.
21041
21042 2001-11-02 Akim Demaille <akim@epita.fr>
21043
21044 * tests/regression.at (Mixing %token styles): New test.
21045
21046 2001-11-02 Akim Demaille <akim@epita.fr>
21047
21048 * src/reader.c (parse_thong_decl): Formatting changes.
21049 (token_translations_init): New, extracted from...
21050 (packsymbols): Here.
21051 Adjust.
21052
21053 2001-11-01 Akim Demaille <akim@epita.fr>
21054
21055 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21056 Check that `9foo.y' produces correct cpp guards.
21057 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21058 guards.
21059 Reported by Wwp.
21060
21061 2001-11-01 Akim Demaille <akim@epita.fr>
21062
21063 * tests/regression.at (Invalid input: 2): New.
21064 * src/lex.c (unlexed_token_buffer): New.
21065 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21066 too.
21067 Reported by Wwp.
21068
21069 2001-11-01 Akim Demaille <akim@epita.fr>
21070
21071 * tests/calc.at: Catch up with 1.30.
21072 * configure.in: Bump to 1.49a.
21073 Adjust to newer Autotest.
21074
21075 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21076
21077 * src/conflicts.c: Move global variables rrc_total and src_total ...
21078 (print_conflicts): here.
21079 * src/output.c (output): Free global variable user_toknums.
21080 * src/lex.c (token_obstack): Become static.
21081
21082 2001-10-18 Akim Demaille <akim@epita.fr>
21083
21084 * tests/atlocal.in (GCC): Add.
21085 * tests/calc.at: s/m4_match/m4_bmatch/.
21086 s/m4_patsubst/m4_bpatsubst/.
21087 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21088 * configure.in: AC_SUBST(GCC).
21089
21090 2001-10-14 Marc Autret <autret_m@epita.fr>
21091
21092 * src/options.c (create_long_option_table): Fix.
21093
21094 2001-10-10 Akim Demaille <akim@epita.fr>
21095
21096 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21097
21098 2001-10-04 Akim Demaille <akim@epita.fr>
21099
21100 * src/reader.c (parse_union_decl): Push the caracters in
21101 union_obstack, not attrs_obstack.
21102
21103 2001-10-04 Akim Demaille <akim@epita.fr>
21104
21105 Merge in the branch 1.29.
21106
21107 * src/reader.c (packsymbols): Use a temporary obstack for
21108 `%%tokendef', since output_stack is already used elsewhere.
21109
21110 2001-10-02 Akim Demaille <akim@epita.fr>
21111
21112 Bump 1.29d.
21113
21114 2001-10-02 Akim Demaille <akim@epita.fr>
21115
21116 Version 1.29c.
21117
21118 2001-10-02 Akim Demaille <akim@epita.fr>
21119
21120 * tests/regression.at (Invalid CPP headers): New.
21121 From Alexander Belopolsky.
21122 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21123
21124 2001-10-02 Akim Demaille <akim@epita.fr>
21125
21126 * tests/regression.at (Invalid input): New.
21127 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21128 Reported by Shura.
21129
21130 2001-10-02 Akim Demaille <akim@epita.fr>
21131
21132 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21133
21134 2001-10-02 Akim Demaille <akim@epita.fr>
21135
21136 * src/output.c (output_parser): Assert `skeleton'.
21137 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21138 systems.
21139 From Shura.
21140
21141 2001-10-01 Marc Autret <autret_m@epita.fr>
21142
21143 * src/lex.h: Echo modifications.
21144 * src/lex.c (unlex): Parameter is now token_t.
21145 From Hans Aberg.
21146
21147 2001-10-01 Marc Autret <autret_m@epita.fr>
21148
21149 * src/main.c: Include lex.h.
21150 From Hans Aberg.
21151
21152 2001-09-29 Akim Demaille <akim@epita.fr>
21153
21154 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21155
21156 2001-09-28 Akim Demaille <akim@epita.fr>
21157
21158 * tests/testsuite.at: Update to newer Autotest.
21159 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21160
21161 2001-09-27 Akim Demaille <akim@epita.fr>
21162
21163 Position independent wrapper.
21164
21165 * tests/bison: Remove.
21166 * tests/bison.in: New.
21167 * configure.in: Adjust.
21168
21169 2001-09-27 Paul Eggert <eggert@twinsun.com>
21170
21171 Port quotearg fixes from tar 1.13.24.
21172
21173 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21174 tm to be declared.
21175 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21176 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21177
21178 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21179 * m4/mbrtowc.m4: New file.
21180 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21181 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21182
21183 2001-09-27 Akim Demaille <akim@epita.fr>
21184
21185 Bump to 1.29c.
21186
21187 2001-09-27 Akim Demaille <akim@epita.fr>
21188
21189 Version 1.29b.
21190
21191 2001-09-25 Akim Demaille <akim@epita.fr>
21192
21193 * src/system.h: Include `xalloc.h'.
21194 Remove it from the C files.
21195 * src/files.c (output_files): Free the obstacks.
21196 * src/lex.c (init_lex): Rename as...
21197 (lex_init): this.
21198 (lex_free): New.
21199 * src/main.c (main): Use it.
21200
21201 2001-09-24 Marc Autret <autret_m@epita.fr>
21202
21203 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21204 to output informations in fout (FILE*).
21205 (open_graph, close_graph): Likewise.
21206 (output_graph, output_edge, output_node): Likewise.
21207 * src/vcg.h: Update function prototypes.
21208 * src/print_graph.c (print_graph): Open output graph file.
21209 (print_actions): Adjust.
21210 * src/files.h: Remove extern declaration.
21211 * src/files.c: Remove graph_obstack declaration.
21212 (open_files): Remove graph_obstack initialization.
21213 (output_files): Remove graph_obstack saving.
21214
21215 2001-09-24 Marc Autret <autret_m@epita.fr>
21216
21217 * src/files.c (compute_output_file_names): Fix.
21218
21219 2001-09-24 Marc Autret <autret_m@epita.fr>,
21220 Akim Demaille <akim@epita.fr>
21221
21222 * src/reader.c (reader): Remove call to free_symtab ().
21223 * src/main.c (main): Call it here.
21224 Include symtab.h.
21225 * src/conflicts.c (initialize_conflicts): Rename as...
21226 (solve_conflicts): this.
21227 * src/print.c (print_core, print_actions, print_state)
21228 (print_grammar): Dump to a file instead a `output_obstack'.
21229 (print_results): Dump `output_obstack', and then proceed with the
21230 FILE *.
21231 * src/files.c (compute_output_file_names, close_files): New.
21232 (output_files): Adjust.
21233 * src/main.c (main): Adjust.
21234
21235 2001-09-23 Marc Autret <autret_m@epita.fr>
21236
21237 * src/files.c (compute_header_macro): Computes header macro name
21238 from spec_defines_file when given.
21239
21240 2001-09-23 Marc Autret <autret_m@epita.fr>
21241
21242 * src/files.c (output_files): Add default extensions.
21243
21244 2001-09-22 Akim Demaille <akim@epita.fr>
21245
21246 * src/conflicts.c (finalize_conflicts): Rename as...
21247 (free_conflicts): this.
21248
21249 2001-09-22 Akim Demaille <akim@epita.fr>
21250
21251 * src/gram.c (gram_free): Rename back as...
21252 (dummy): this.
21253 (output_token_translations): Free `token_translations'.
21254 * src/symtab.c (free_symtab): Free the tag field.
21255
21256 2001-09-22 Akim Demaille <akim@epita.fr>
21257
21258 Remove `translations' as it is always set to true.
21259
21260 * src/gram.h: Adjust.
21261 * src/reader.c (packsymbols, parse_token_decl): Adjust
21262 * src/print.c (print_grammar): Adjust.
21263 * src/output.c (output_token_translations): Adjust.
21264 * src/lex.c (lex): Adjust.
21265 * src/gram.c: Be sure the set pointers to NULL.
21266 (dummy): Rename as...
21267 (gram_free): this.
21268
21269 2001-09-22 Akim Demaille <akim@epita.fr>
21270
21271 * configure.in: Invoke AM_LIB_DMALLOC.
21272 * src/system.h: Use dmalloc.
21273 * src/LR0.c: Be sure to have pointers initialized to NULL.
21274 (allocate_itemsets): Allocate kernel_items only if needed.
21275
21276 2001-09-22 Akim Demaille <akim@epita.fr>
21277
21278 * configure.in: Bump to 1.29b.
21279 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21280 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21281 need xmalloc.c in calc.y.
21282 From Pascal Bart.
21283
21284 2001-09-21 Akim Demaille <akim@epita.fr>
21285
21286 Version 1.29a.
21287 * Makefile.maint, config/config.guess, config/config.sub,
21288 * config/missing: Update from masters.
21289 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21290 upon package.m4.
21291 * configure.in (ALL_LINGUAS): Add `tr'.
21292
21293 2001-09-21 Akim Demaille <akim@epita.fr>
21294
21295 * tests/Makefile.am (package.m4): Move to...
21296 ($(srcdir)/$(TESTSUITE)): here.
21297
21298 2001-09-20 Akim Demaille <akim@epita.fr>
21299
21300 * src/complain.c: No longer try to be standalone: use system.h.
21301 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21302 * src/complain.h: Likewise.
21303 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21304 Remove the unused variable `n'.
21305 From Albert Chin-A-Young.
21306
21307 2001-09-18 Marc Autret <autret_m@epita.fr>
21308
21309 * doc/bison.1: Update.
21310 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21311 descriptions.
21312 (Option Cross Key): Update.
21313 Add --graph.
21314
21315 2001-09-18 Marc Autret <autret_m@epita.fr>
21316
21317 * tests/regression.at: New test (comment in %union).
21318
21319 2001-09-18 Marc Autret <autret_m@epita.fr>
21320
21321 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21322 do that.
21323 Reported by Keith Browne.
21324
21325 2001-09-18 Marc Autret <autret_m@epita.fr>
21326
21327 * tests/output.at: Add tests for --defines and --graph.
21328
21329 2001-09-18 Marc Autret <autret_m@epita.fr>
21330
21331 * tests/output.at: Removes tests of %{header,src}_extension features.
21332
21333 2001-09-18 Akim Demaille <akim@epita.fr>
21334
21335 * tests/Makefile.am (package.m4): New.
21336 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21337 (_AT_CHECK_CALC_ERROR): Likewise.
21338 Factor the `, ' part of verbose error messages.
21339
21340 2001-09-18 Marc Autret <autret_m@epita.fr>
21341
21342 * src/getargs.c (longopts): Declare --defines and --graph as options
21343 with optional arguments.
21344 * src/files.h: Add extern declarations.
21345 * src/files.c (spec_graph_file, spec_defines_file): New.
21346 (output_files): Update.
21347 Remove CPP-outed code.
21348
21349 2001-09-18 Marc Autret <autret_m@epita.fr>
21350
21351 Turn off %{source,header}_extension feature.
21352
21353 * src/files.c (compute_exts_from_gf): Update.
21354 (compute_exts_from_src): Update.
21355 (output_files): CPP-out useless code.
21356 * src/files.h: Remove {header,source}_extension extern declarations.
21357 * src/reader.c (parse_dquoted_param): CPP-out.
21358 (parse_header_extension_decl): Remove.
21359 (parse_source_extension_decl): Remove.
21360 (read_declarations): Remove cases tok_{hdrext,srcext}.
21361 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21362 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21363
21364 2001-09-10 Akim Demaille <akim@epita.fr>
21365
21366 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21367 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21368 (AT_CHECK_OUTPUT): this.
21369 Merely check ls' exit status, its output is useless.
21370
21371 2001-09-10 Akim Demaille <akim@epita.fr>
21372
21373 * tests/calc.at: Use m4_match.
21374 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21375
21376 2001-09-10 Marc Autret <autret_m@epita.fr>,
21377 Akim Demaille <akim@epita.fr>
21378
21379 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21380 enum color_e.
21381 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21382 to `normal'.
21383 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21384 * src/lex.h: Adjust prototype.
21385 (token_t): Add `tok_undef'.
21386 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21387 (parse_percent_token): Now returns token_t.
21388 Add default statement in switch.
21389 (lex): Separate `c' as an input variable, from the token_t result
21390 part.
21391 (unlexed): Is a token_t.
21392
21393 2001-09-10 Akim Demaille <akim@epita.fr>
21394
21395 * configure.in: Bump to 1.29a.
21396
21397 2001-09-07 Akim Demaille <akim@epita.fr>
21398
21399 Version 1.29.
21400
21401 2001-08-30 Akim Demaille <akim@epita.fr>
21402
21403 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21404 * m4/atconfig.m4: Remove.
21405 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21406 * tests/bison: New.
21407 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21408 m4_if, m4_patsubst, and m4_regexp.
21409 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21410 `input' file instead of echo.
21411
21412 2001-08-29 Akim Demaille <akim@epita.fr>
21413
21414 Bump to 1.28e.
21415
21416 2001-08-29 Akim Demaille <akim@epita.fr>
21417
21418 Version 1.28d.
21419
21420 2001-08-29 Paul Eggert <eggert@twinsun.com>
21421
21422 * src/bison.simple (yyparse): Don't take the address of an
21423 item before the start of an array, as that doesn't conform to
21424 the C Standard.
21425
21426 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21427
21428 * doc/bison.texinfo (Location Tracking Calc): New node.
21429
21430 2001-08-29 Paul Eggert <eggert@twinsun.com>
21431
21432 * src/output.c (output): Do not define const, as this now
21433 causes more problems than it cures.
21434
21435 2001-08-29 Akim Demaille <akim@epita.fr>
21436
21437 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21438 the nodes.
21439 Be sure to tag the `detailmenu'.
21440
21441 2001-08-29 Akim Demaille <akim@epita.fr>
21442
21443 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21444 download in a tmp dir.
21445
21446 2001-08-28 Marc Autret <autret_m@epita.fr>
21447
21448 * config/depcomp: New file.
21449
21450 2001-08-28 Marc Autret <autret_m@epita.fr>
21451
21452 * doc/bison.1 (mandoc): Adjust.
21453 From Juan Manuel Guerrero.
21454
21455 2001-08-28 Marc Autret <autret_m@epita.fr>
21456
21457 * src/print_graph.c (print_state): Fix.
21458
21459 2001-08-27 Marc Autret <autret_m@epita.fr>
21460
21461 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21462 char * members.
21463 Echo modifications to the functions prototypes.
21464 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21465
21466 2001-08-27 Marc Autret <autret_m@epita.fr>
21467
21468 * src/vcg.c: Include `xalloc.h'.
21469 (add_colorentry): New.
21470 (add_classname): New.
21471 (add_infoname): New.
21472 * src/vcg.h: Add new prototypes.
21473
21474 2001-08-27 Akim Demaille <akim@epita.fr>
21475
21476 * Makefile.maint: Sync. again with CVS Autoconf.
21477
21478 2001-08-27 Akim Demaille <akim@epita.fr>
21479
21480 * Makefile.maint: Formatting changes.
21481 (po-update, cvs-update, update): New targets.
21482 (AMTAR): Remove.
21483
21484 2001-08-27 Akim Demaille <akim@epita.fr>
21485
21486 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21487 * Makefile.maint: Sync. with CVS Autoconf.
21488
21489 2001-08-27 Marc Autret <autret_m@epita.fr>
21490
21491 * src/vcg.h (struct infoname_s): New.
21492 (struct colorentry_s): New.
21493 (graph_s): New fields {vertical,horizontal}_order in structure.
21494 Add `infoname' field.
21495 Add `colorentry' field;
21496 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21497 (G_HORIZONTAL_ORDER): New.
21498 (G_INFONAME): New.
21499 (G_COLORENTRY): New.
21500 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21501 Add output of `infoname'.
21502 Add output of `colorentry'.
21503
21504 2001-08-27 Marc Autret <autret_m@epita.fr>
21505
21506 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21507 This one shadowed a global parameter.
21508
21509 2001-08-24 Marc Autret <autret_m@epita.fr>
21510
21511 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21512 instead of `unsigned'.
21513 (print_state): Do not call obstack_object_size () in obstack_grow ()
21514 to avoid macro variables shadowing.
21515
21516 2001-08-23 Marc Autret <autret_m@epita.fr>
21517
21518 * src/lex.c (percent_table): Typo: s/naem/name/.
21519 Add graph option.
21520 Normalize new options declarations.
21521
21522 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21523
21524 * tests/suite.at: Exercise %header_extension and %source_extension.
21525
21526 2001-08-16 Marc Autret <autret_m@epita.fr>
21527
21528 * src/reader.c (parse_dquoted_param): New.
21529 (parse_header_extension_decl): Use it.
21530 (parse_source_extension_decl): Likewise.
21531
21532 2001-08-16 Marc Autret <autret_m@epita.fr>
21533
21534 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21535 (get_xxxx_str): Use assert () instead of complain ().
21536 Remove return invokations in default cases.
21537 (get_decision_str): Modify default behaviour. Remove second argument.
21538 Echo modifications on calls.
21539 (output_graph): Fix.
21540
21541 2001-08-16 Marc Autret <autret_m@epita.fr>
21542
21543 * src/getargs.c (usage): Update with ``-g, --graph''.
21544
21545 2001-08-16 Marc Autret <autret_m@epita.fr>
21546
21547 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21548 (Option Cross Key): Likewise.
21549 * doc/bison.1: Update.
21550
21551 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21552
21553 * src/output.c (output_master_parser): Don't finish action_obstack.
21554 (output_parser): Don't care about the muscle action, here.
21555 (prepare): Copy the action_obstack in the action muscle.
21556 (output): Free action_obstack.
21557
21558 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21559
21560 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21561 will contain `%union' declaration.
21562 (parse_union_decl): Delete #line directive output.
21563 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21564 informations about %union.
21565 (parse_union_decl): Copy the union_obstack in the muscle stype.
21566 * src/bison.simple: Add new #line directive.
21567 Add typdef %%stype YYSTYPE.
21568
21569 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21570
21571 * src/bison.simple: Add new `#line' directive.
21572
21573 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21574
21575 * src/bison.simple: New `#line' directive.
21576 * src/output.c (output_parser): Support new dynamic muscle input_line.
21577
21578 2001-09-22 Marc Autret <autret_m@epita.fr>
21579
21580 * src/output.c (output_master_parser): New.
21581 (output_parser): Be more re-entrant.
21582
21583 2001-09-21 Marc Autret <autret_m@epita.fr>
21584
21585 * src/reader.c (copy_definition, parse_union_decl): Update and use
21586 `linef' muscle.
21587 (copy_action): Likewise.
21588 Use obstack_1grow ().
21589 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21590
21591 2001-09-21 Marc Autret <autret_m@epita.fr>
21592
21593 * src/options.c (option_table): Adjust.
21594 * src/lex.c (parse_percent_token): Fix.
21595
21596 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21597
21598 * src/options.c (symtab.h): Include it, need by lex.h.
21599
21600 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21601
21602 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21603 is now an option_table_struct*.
21604 (option_strcmp): New function option_strcmp.
21605 (parse_percent_token): Call option_strcmp.
21606 * src/getargs.c (xalloc.h, options.h): Include it.
21607 (getargs): Call create_long_option_table.
21608 (getargs): Free longopts at the end of the function.
21609 (shortopts): Move in options.c.
21610 * src/options.c (create_long_option_table): New function. Convert
21611 information from option_table to option structure.
21612 * src/reader.c (options.h): Include it.
21613
21614 * src/Makefile.am: Adjust.
21615 * src/options.c (option_table): Create from longopts and percent_table.
21616 * src/getargs.c (longopts): Delete.
21617 * src/lex.c (struct percent_table_struct): Delete.
21618 (percent_table): Delete.
21619 (options.h): Include it.
21620 * src/options.c: Create.
21621 * src/options.h: Create.
21622 Declare enum opt_access_e.
21623 Define struct option_table_struct.
21624
21625 2001-09-20 Marc Autret <autret_m@epita.fr>
21626
21627 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21628 sections of Bison.
21629
21630 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21631
21632 * src/bison.simple: s/%%filename/%%skeleton.
21633 * src/muscle_tab.c (getargs.h): Include it.
21634 (muscle_init): Insert new muscle skeleton.
21635
21636 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21637
21638 * src/output.c (output_parser): Delete unused variable actions_dumped.
21639
21640 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21641
21642 * src/output.c (output): Delete call to reader_output_yylsp.
21643 * src/reader.c (reader): Likewise.
21644 * src/reader.h: Delete declaration of reader_output_yylsp.
21645
21646 2001-09-02 Marc Autret <autret_m@epita.fr>
21647
21648 * src/reader.c: Include muscle_tab.h.
21649 (parse_union_decl): Update.
21650 (parse_macro_decl): Rename parse_muscle_decl.
21651 Update to use renamed functions and variable.
21652 (read_declarations, copy_action, read_additionnal_code, : Updated
21653 with correct variables and functions names.
21654 (packsymbols, reader): Likewise.
21655
21656 * src/reader.h (muscle_obstack): Extern declaration update.
21657
21658 * src/output.c: Include muscle_tab.h
21659 In all functions using macro_insert, change by using muscle_insert ().
21660 (macro_obstack): Rename muscle_obstack.
21661 Echo modifications in the whole file.
21662 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21663 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21664 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21665
21666 * src/muscle_tab.h: Update double inclusion macros.
21667 (macro_entry_s): Rename muscle_entry_s.
21668 Update prototypes.
21669
21670 * src/muscle_tab.c: Include muscle_tab.h.
21671 Rename macro_tabble to muscle_table.
21672 (mhash1, mhash2, mcmp): Use muscle_entry.
21673 (macro_init): Rename muscle_init. Update.
21674 (macro_insert): Rename muscle_insert. Update.
21675 (macro_find): Rename muscle_find. Update.
21676
21677 * src/main.c: Include muscle_tab.h.
21678 (main): Call muscle_init ().
21679 * src/Makefile.am (bison_SOURCES): Echo modifications.
21680
21681 2001-09-02 Marc Autret <autret_m@epita.fr>
21682
21683 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21684
21685 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21686
21687 2001-09-02 Marc Autret <autret_m@epita.fr>
21688
21689 * src/macrotab.c, src/macrotab.h: Remove.
21690
21691 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21692
21693 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21694 filename.
21695
21696 2001-09-01 Marc Autret <autret_m@epita.fr>
21697
21698 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21699 to an explicit value to activate the feature. We do it here.
21700
21701 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21702
21703 * src/output.c (prepare): Delete the `filename' muscule insertion.
21704 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21705 (parse_union_decl): Likewise.
21706 * src/macrotab.c (macro_init): Initialize filename by infile.
21707
21708 2001-08-31 Marc Autret <autret_m@epita.fr>
21709
21710 * src/bison.simple (YYLSP_NEEDED): New definition.
21711 * src/output.c (prepare): Add macro insertion of `locations_flag'
21712
21713 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21714
21715 * src/output.c (prepare): Delete insertion of previous muscles,
21716 and insert the `prefix' muscles.
21717 * src/macrotab.c (macro_init): Likewise.
21718 (macro_init): Initialization prefix directive by `yy'.
21719 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21720 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21721 yylval, yydebug, yyerror, yynerrs and yyparse.
21722 New directive `#define' to substitute yydebug, ... with option
21723 name_prefix.
21724
21725 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21726
21727 * src/main.c (main): Standardize.
21728 * src/output.c (output_table_data, output_parser): Likewise.
21729 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21730
21731 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21732
21733 * src/reader.c (read_additionnal_code): Rename %%user_code to
21734 %%epilogue.
21735 * src/output.c (output): Rename %%declarations to %%prologue.
21736 * src/bison.simple: Echo modifications.
21737
21738 2001-08-31 Marc Autret <autret_m@epita.fr>
21739
21740 * src/reader.c (readgram): CleanUp.
21741 (output_token_defines): Likewise.
21742 (packsymbols): Likewise.
21743 (reader): Likewise.
21744 * src/output.c (output): CPP-out useless code.
21745
21746 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21747
21748 * src/reader.c (reader): Delete obsolete call to function
21749 output_trailers and output_headers.
21750 * src/output.h: Remove obsolete functions prototypes of output_headers
21751 and output_trailers.
21752
21753 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21754
21755 * src/main.c: Include macrotab.h.
21756 * src/macrotab.h (macro_entry_s): Constify fields.
21757 Adjust functions prototypes.
21758 * src/macrotab.c (macro_insert): Constify key and value.
21759 (macro_find): Constify key.
21760 (macro_insert): Include 'xalloc.h'
21761 (macro_insert): Use XMALLOC.
21762 (macro_find): Constify return value.
21763 * src/output.c (output_table_data): Rename table to table_data.
21764 (output_parser): Constify macro_key, macro_value.
21765
21766 2001-08-30 Marc Autret <autret_m@epita.fr>
21767
21768 * src/reader.c (parse_skel_decl): New.
21769 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21770 * src/lex.h (token_t): New token `tok_skel'.
21771 * src/lex.c (percent_table): Add skeleton option entry.
21772 Standardize.
21773
21774 2001-08-29 Marc Autret <autret_m@epita.fr>
21775
21776 * src/bison.simple: Add %%user_code directive at the end.
21777 * src/reader.c (read_additionnal_code): New.
21778 (reader): Use it.
21779 * src/output.c (output_program): Remove.
21780 (output): Update.
21781
21782 2001-08-28 Marc Autret <autret_m@epita.fr>
21783
21784 * src/output.c (output_actions): Clean up.
21785 (output_gram): CPP-out useless code.
21786 * src/reader.c (reader): Clean up, CPP-out useless code.
21787
21788 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21789
21790 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21791 directive.
21792 * src/bison.simple: Add `%%definitions'.
21793
21794 2001-08-28 Marc Autret <autret_m@epita.fr>
21795
21796 * config/depcomp: New file.
21797
21798 2001-08-27 Paul Eggert <eggert@twinsun.com>
21799
21800 * src/bison.simple (yyparse): Don't take the address of an
21801 item before the start of an array, as that doesn't conform to
21802 the C Standard.
21803
21804 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21805
21806 * src/output.c (output): Remove the initialization of the macro
21807 obstack. It was done too late here.
21808
21809 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21810 completely wrong.
21811 (reader): Initialize the macro obstack here, since we need it to grow
21812 '%define' directives.
21813
21814 * src/reader.h: Declare the macro obstack as extern.
21815
21816 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21817
21818 * src/output.c (output_parser): Fix. Store single '%' characters in
21819 the output obstack instead of throwing them away.
21820
21821 2001-08-27 Akim Demaille <akim@epita.fr>
21822
21823 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21824
21825 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21826
21827 * lib/Makefile.am: Adjust.
21828
21829 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21830
21831 * src/bison.simple: Update and add '%%' directives.
21832
21833 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21834
21835 * src/reader.c (reader): Remove calls to 'output_headers' and
21836 'output_trailers'. Remove some C output.
21837 (readgram): Disable a piece of code that was writing a default
21838 definition for 'YYSTYPE'.
21839 (reader_output_yylsp): Remove.
21840 (packsymbols): Output token defintions to a macro.
21841 (copy_definition): Disable C output.
21842
21843 * src/reader.c (parse_macro_decl): New function used to parse macro
21844 declarations.
21845 (copy_string2): Put the body of copy_string into this new function.
21846 Add a parameter to let the caller choose whether he wants to copy the
21847 string delimiters or not.
21848 (copy_string): Be a simple call to copy_string2 with the last argument
21849 bound to true.
21850 (read_declarations): Add case for macro definition.
21851 (copy_identifier): New.
21852 (parse_macro_decl): Read macro identifiers using copy_identifier
21853 rather than lex.
21854
21855 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21856
21857 * src/output.c (prepare): Add prefixed names.
21858 (output_parser): Output semantic actions.
21859 (output_parser): Fix bug on '%%line' directives.
21860
21861 * src/output.c (output_headers): Remove. The C code printed by this
21862 function should now be in the skeletons.
21863 (output_trailers): Remove.
21864 (output): Disable call to 'reader_output_yylsp'.
21865 (output_rule_data): Do not output tables to the table obstack.
21866
21867 * src/output.c: Remove some C dedicated output.
21868 Improve the use of macro and output obstacks.
21869 (output_defines): Remove.
21870
21871 * src/output.c (output_token_translations): Associate 'translate'
21872 table with a macro. No output to the table obstack.
21873 (output_gram): Same for 'rhs' and 'prhs'.
21874 (output_stos): Same for 'stos'.
21875 (output_rule_data): Same for 'r1' and 'r2'.
21876 (token_actions): Same for 'defact'.
21877 (goto_actions): Same for 'defgoto'.
21878 (output_base): Same for 'pact' and 'pgoto'.
21879 (output_table): Same for 'table'.
21880 (output_check): Same for 'check'.
21881
21882 * src/output.c (output_table_data): New function.
21883 (output_short_table): Remove.
21884 (output_short_or_char_table): Remove.
21885
21886 * src/output.c (output_parser): Replace most of the skeleton copy code
21887 with something new. Skeletons are now processed character by character
21888 rather than line by line, and Bison looks for '%%' macros. This is the
21889 first step in making Bison's output process (a lot) more flexible.
21890 (output_parser): Use the macro table.
21891
21892 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21893
21894 * src/main.c (main): Initialize the macro table.
21895
21896 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21897
21898 * src/lex.c (percent_table): Add tok_define.
21899 * src/lex.h: Add tok_define.
21900
21901 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21902
21903 * src/macrotab.c: New file.
21904 * src/macrotab.h: New file.
21905 * src/Makefile.am: Update.
21906
21907 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21908
21909 * lib/hash.c: New file.
21910 * lib/hash.h: New file.
21911 * lib/Makefile.am: Update.
21912
21913 2001-08-15 Akim Demaille <akim@epita.fr>
21914
21915 Version 1.28c.
21916
21917 2001-08-15 Marc Autret <autret_m@epita.fr>
21918
21919 * src/reader.c (readgram): Indent output macro YYSTYPE.
21920 (packsymbols): Likewise.
21921 (output_token_defines): Likewise.
21922 * src/files.c: Standardize.
21923 (compute_header_macro): New.
21924 (defines_obstack_save): New. Use compute_header_macro.
21925 (output_files): Update. Use defines_obstack_save.
21926
21927 2001-08-15 Akim Demaille <akim@epita.fr>
21928
21929 * doc/bison.texinfo (Table of Symbols): Document
21930 YYSTACK_USE_ALLOCA.
21931
21932 2001-08-15 Akim Demaille <akim@epita.fr>
21933
21934 * missing: Update from CVS Automake.
21935 * config/config.guess, config/config.sub, config/texinfo.tex:
21936 Update from gnu.org.
21937
21938 2001-08-15 Akim Demaille <akim@epita.fr>
21939
21940 * Makefile.maint: Sync with CVS Autoconf.
21941
21942 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21943
21944 * doc/bison.texinfo: Include GNU Free Documentation License from
21945 `fdl.texi'.
21946 * doc/fdl.texi: Add to package.
21947
21948 2001-08-14 Marc Autret <autret_m@epita.fr>
21949
21950 Turn on %{source,header}_extension features.
21951
21952 * src/lex.c (percent_table): Un-CPP out header_extension and
21953 source_extension.
21954 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21955 (compute_exts_from_src): Remove conditions. It restores priorities
21956 between options.
21957
21958 2001-08-14 Marc Autret <autret_m@epita.fr>
21959
21960 * src/files.c (compute_base_names): Add extensions computing when
21961 `--file-prefix' used.
21962 Standardize function calls.
21963
21964 2001-08-13 Marc Autret <autret_m@epita.fr>
21965
21966 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21967 defining it (defined but null disables alloca).
21968
21969 2001-08-13 Marc Autret <autret_m@epita.fr>
21970
21971 * src/bison.simple (_yy_memcpy): CPP reformat.
21972
21973 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21974
21975 * tests/atconfig.in (CPPFLAGS): Fix.
21976
21977 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21978
21979 * doc/bison.texinfo: Include GNU General Public License from
21980 `gpl.texi'.
21981 * doc/gpl.texi: Add to package.
21982
21983 2001-08-10 Marc Autret <autret_m@epita.fr>
21984
21985 * src/print_graph.h: Fix.
21986 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21987
21988 2001-08-10 Akim Demaille <akim@epita.fr>
21989
21990 * src/system.h: Provide default declarations for stpcpy, strndup,
21991 and strnlen.
21992
21993 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21994
21995 * doc/bison.texinfo (Locations): Update @$ stuff.
21996
21997 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21998
21999 * src/bison.simple (YYLLOC_DEFAULT): Update.
22000 (yyparse): Adjust.
22001
22002 2001-08-08 Marc Autret <autret_m@epita.fr>
22003
22004 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22005 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22006 Reported by Fabrice Bauzac.
22007
22008 2001-08-08 Marc Autret <autret_m@epita.fr>
22009
22010 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22011 * src/vcg.c (output_node): Fix.
22012 * src/vcg.h: Cleanup.
22013 * src/print_graph.c: Add comments.
22014 (node_output_size): New global variable. Simplify the formatting of
22015 the VCG graph output.
22016 (print_actions): Unused code is now used. It notifies the final state
22017 and no action states in the VCG graph. It also give the reduce actions.
22018 The `shift and goto' edges are red and the `go to state' edges are
22019 blue.
22020 Get the current node name and node_obstack by argument.
22021 (node_obstack): New variable.
22022 (print_state): Manage node_obstack.
22023 (print_core): Use node_obstack given by argument.
22024 A node is not only computed here but in print_actions also.
22025 (print_graph): CPP out useless code instead of commenting it.
22026
22027 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22028
22029 * tests/atconfig.in (CPPFLAGS): Fix.
22030
22031 2001-08-07 Akim Demaille <akim@epita.fr>
22032
22033 * src/print_graph.c (quote): New.
22034 (print_core): Use it.
22035
22036 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22037
22038 * src/vcg.c (complain.h): Include it.
22039 Unepitaize `return' invocations.
22040 [NDEBUG] (main): Remove.
22041 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22042 * src/files.c (open_files): Initialize graph_obstack.
22043 * src/print_graph.c (print_actions): CPP out useless code.
22044 (print_core): Don't output the last `\n' in labels.
22045 Use `quote'.
22046 * src/files.c (output_files): Output the VCG file.
22047 * src/main.c (main): Invoke print_graph ();
22048
22049 2001-08-06 Marc Autret <autret_m@epita.fr>
22050
22051 Automaton VCG graph output.
22052 Using option ``-g'' or long option ``--graph'', you can generate
22053 a gram_filename.vcg file containing a VCG description of the LALR (1)
22054 automaton of your grammar.
22055
22056 * src/main.c: Call to print_graph() function.
22057 * src/getargs.h: Update.
22058 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22059 (graph_flag): New flag.
22060 (longopts): Update.
22061 (getargs): Add case `g'.
22062 * src/files.c (graph_obstack): New obstack struct.
22063 (open_files): Initialize new obstack.
22064 (output_files): Saves graph_obstack if required.
22065 * src/files.h (graph_obstack): New extern declaration.
22066 * src/Makefile.am: Add new source files.
22067
22068 2001-08-06 Marc Autret <autret_m@epita.fr>
22069
22070 * src/print_graph.c, src/print_graph.h (graph): New.
22071 * src/vcg.h: New file.
22072 * src/vcg.c: New file, VCG graph handling.
22073
22074 2001-08-06 Marc Autret <autret_m@epita.fr>
22075
22076 Add of %source_extension and %header_extension which specify
22077 the source or/and the header output file extension.
22078
22079 * src/files.c (compute_base_names): Remove initialisation of
22080 src_extension and header_extension.
22081 (compute_exts_from_gf): Update.
22082 (compute_exts_from_src): Update.
22083 (output_files): Update.
22084 * src/reader.c (parse_header_extension_decl): New.
22085 (parse_source_extension_decl): New.
22086 (read_declarations): New case statements for the new tokens.
22087 * src/lex.c (percent_table): Add entries for %source_extension
22088 and %header_extension.
22089 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22090
22091 2001-08-06 Marc Autret <autret_m@epita.fr>
22092
22093 * configure.in: Bump to 1.28c.
22094 * doc/bison.texinfo: Texinfo thingies.
22095
22096 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22097
22098 * tests/atconfig.in (CPPFLAGS): Add.
22099 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22100
22101 2001-08-03 Akim Demaille <akim@epita.fr>
22102
22103 Version 1.28b.
22104
22105 2001-08-03 Akim Demaille <akim@epita.fr>
22106
22107 * tests/Makefile.am (check-local): Ship testsuite.
22108 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22109 Include `string.h'.
22110
22111 2001-08-03 Akim Demaille <akim@epita.fr>
22112
22113 * configure.in: Try using -Wformat when compiling.
22114
22115 2001-08-03 Akim Demaille <akim@epita.fr>
22116
22117 * configure.in: Bump to 1.28b.
22118
22119 2001-08-03 Akim Demaille <akim@epita.fr>
22120
22121 * src/complain.c: Adjust strerror_r portability issues.
22122
22123 2001-08-03 Akim Demaille <akim@epita.fr>
22124
22125 Version 1.28a.
22126
22127 2001-08-03 Akim Demaille <akim@epita.fr>
22128
22129 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22130 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22131 * src/getargs.c: Include complain.h.
22132 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22133 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22134
22135 2001-08-03 Akim Demaille <akim@epita.fr>
22136
22137 * src/reader.c (readgram): Display hidden chars in error messages.
22138
22139 2001-08-03 Akim Demaille <akim@epita.fr>
22140
22141 Update to gettext 0.10.39.
22142
22143 2001-08-03 Akim Demaille <akim@epita.fr>
22144
22145 * lib/strspn.c: New.
22146
22147 2001-08-01 Marc Autret <autret_m@epita.fr>
22148
22149 * doc/bison.texinfo: Update.
22150 * doc/bison.1 (mandoc): Update.
22151 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22152 * src/files.c: Support output files extensions computing.
22153 (src_extension): New static variable.
22154 (header_extension): New static variable.
22155 (tr): New function.
22156 (get_extension_index): New function, gets the index of an extension
22157 filename in a string.
22158 (compute_exts_from_gf): New function, computes extensions from the
22159 grammar file extension.
22160 (compute_exts_from_src): New functions, computes extensions from the
22161 C source file extension, file given by ``-o'' option.
22162 (compute_base_names): Update.
22163 (output_files): Update.
22164
22165 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22166
22167 * doc/bison.texi: Document @$.
22168 (Locations): New section.
22169
22170 2001-07-18 Akim Demaille <akim@epita.fr>
22171
22172 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22173 * config/prev-version.txt, config/move-if-change: New.
22174 * Makefile.am: Adjust.
22175
22176 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22177
22178 * src/bison.simple (yyparse): Suppress warning `comparaison
22179 between signed and unsigned'.
22180
22181 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22182
22183 * src/getargs.h (raw_flag): Remove.
22184 * src/getargs.c: Die on `-r'/`--raw'.
22185 * src/lex.c (parse_percent_token): Die on `%raw'.
22186 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22187 * tests/calc.at: Suppress test with option `--raw'.
22188
22189 2001-07-14 Akim Demaille <akim@epita.fr>
22190
22191 * config/: New.
22192 * configure.in: Require Autoconf 2.50.
22193 Update to gettext 0.10.38.
22194
22195 2001-03-16 Akim Demaille <akim@epita.fr>
22196
22197 * doc/bison.texinfo: ANSIfy the examples.
22198
22199 2001-03-16 Akim Demaille <akim@epita.fr>
22200
22201 * getargs.c (skeleton): New variable.
22202 (longopts): --skeleton is a new option.
22203 (shortopts, getargs): -S is a new option.
22204 * getargs.h: Declare skeleton.
22205 * output.c (output_parser): Use it.
22206
22207 2001-03-16 Akim Demaille <akim@epita.fr>
22208
22209 * m4/strerror_r.m4: New.
22210 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22211 * lib/error.h, lib/error.c: Update.
22212
22213 2001-03-16 Akim Demaille <akim@epita.fr>
22214
22215 * src/getargs.c (longopts): Clean up.
22216
22217 2001-02-21 Akim Demaille <akim@epita.fr>
22218
22219 * src/reader.c (gensym): `gensym_count' is your own.
22220 Use a static buf to create the symbol name, as token_buffer is no
22221 longer a buffer.
22222
22223 2001-02-08 Akim Demaille <akim@epita.fr>
22224
22225 * src/conflicts.c (conflict_report): Be sure not to append to res
22226 between two calls, which could happen if both first sprintf were
22227 skipped, but not the first cp += strlen.
22228
22229 2001-02-08 Akim Demaille <akim@epita.fr>
22230
22231 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22232 New, from fileutils 4.0.37.
22233 * configure.in: Require Autoconf 2.49c. I took some time before
22234 making this decision. This is the only way out for portability
22235 issues in Bison, it would mean way too much duplicate effort to
22236 import in Bison features implemented in 2.49c since 2.13.
22237 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22238
22239 2001-02-02 Akim Demaille <akim@epita.fr>
22240
22241 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22242 * lib/xalloc.h, lib/xmalloc.c: Update.
22243
22244 2001-01-19 Akim Demaille <akim@epita.fr>
22245
22246 Get rid of the ad hoc handling of token_buffer in the scanner: use
22247 the obstacks.
22248
22249 * src/lex.c (token_obstack): New.
22250 (init_lex): Initialize it. No longer call...
22251 (grow_token_buffer): this. Remove it.
22252 Adjust all the places which used it to use the obstack.
22253
22254 2001-01-19 Akim Demaille <akim@epita.fr>
22255
22256 * src/lex.h: Rename all the tokens:
22257 s/\bENDFILE\b/tok_eof/g;
22258 s/\bIDENTIFIER\b/tok_identifier/g;
22259 etc.
22260 Let them be enums, not #define, to ease debugging.
22261 Adjust all the code.
22262
22263 2001-01-18 Akim Demaille <akim@epita.fr>
22264
22265 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22266 * src/lex.c (maxtoken, grow_token_buffer): Static.
22267
22268 2001-01-18 Akim Demaille <akim@epita.fr>
22269
22270 Since we now use obstacks, more % directives can be enabled.
22271
22272 * src/lex.c (percent_table): Also accept `%yacc',
22273 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22274 `%debug'.
22275 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22276 instead of returning a token.
22277 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22278 * src/reader.c (read_declarations): Adjust.
22279 * src/files.c (open_files): Don't call `compute_base_names', don't
22280 compute `attrsfile' since they depend upon data which might be
22281 *in* the input file now.
22282 (output_files): Do it here.
22283 * src/output.c (output_headers): Document the fact that this patch
22284 introduces a guaranteed SEGV for semantic parsers.
22285 * doc/bison.texinfo: Document them.
22286 * tests/suite.at: Exercise these %options.
22287
22288 2000-12-20 Akim Demaille <akim@epita.fr>
22289
22290 Also handle the output file (--verbose) with obstacks.
22291
22292 * files.c (foutput): Remove.
22293 (output_obstack): New.
22294 Adjust all dependencies.
22295 * src/conflicts.c: Return a string.
22296 * src/system.h (obstack_grow_string): Rename as...
22297 (obstack_sgrow): this. Be ready to work with non literals.
22298 (obstack_fgrow4): New.
22299
22300 2000-12-20 Akim Demaille <akim@epita.fr>
22301
22302 * src/files.c (open_files): Fix the computation of short_base_name
22303 in the case of `-o foo.tab.c'.
22304
22305 2000-12-20 Akim Demaille <akim@epita.fr>
22306
22307 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22308 (copy_dollar): Now that everything uses obstacks, get rid of the
22309 FILE * parameters.
22310
22311 2000-12-20 Akim Demaille <akim@epita.fr>
22312
22313 * src/files.c (open_files): Actually the `.output' file is based
22314 on the short_base_name, not base_name.
22315 * tests/suite.at (Checking output file names): Adjust.
22316
22317 2000-12-20 Akim Demaille <akim@epita.fr>
22318
22319 * src/bison.s1: Remove, we now use directly...
22320 * src/bison.simple: this.
22321 * src/Makefile.am: Use pkgdata instead of data.
22322
22323 2000-12-20 Akim Demaille <akim@epita.fr>
22324
22325 * src/files.c (guard_obstack): New.
22326 (open_files): Initialize it.
22327 (output_files): Dump it...
22328 * src/files.h: Export it.
22329 * src/reader.c (copy_guard): Use it.
22330
22331 2000-12-19 Akim Demaille <akim@epita.fr>
22332
22333 * src/files.c (outfile, defsfile, actfile): Removed as global
22334 vars.
22335 (open_files): Don't compute them.
22336 (output_files): Adjust.
22337 (base_name, short_base_name): Be global.
22338 Adjust dependencies.
22339
22340 2000-12-19 Akim Demaille <akim@epita.fr>
22341
22342 * src/files.c (strsuffix): New.
22343 (stringappend): Be just like strcat but allocate.
22344 (base_names): Eve out from open_files.
22345 Try to simplify the rather hairy computation of base_name and
22346 short_base_name.
22347 (open_files): Use it.
22348 * tests/suite.at (Checking output file names): New test.
22349
22350 2000-12-19 Akim Demaille <akim@epita.fr>
22351
22352 * src/system.h (obstack_grow_literal_string): Rename as...
22353 (obstack_grow_string): this.
22354 * src/output.c (output_parser): Recognize `%% actions' instead of
22355 `$'.
22356 * src/bison.s1: s/$/%% actions/.
22357 * src/bison.hairy: Likewise.
22358
22359 2000-12-19 Akim Demaille <akim@epita.fr>
22360
22361 * src/output.c (output_parser): Compute the `#line' lines when
22362 there are.
22363 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22364 Suggested by Hans Aberg.
22365
22366 2000-12-19 Akim Demaille <akim@epita.fr>
22367
22368 Let the handling of the skeleton files be local to the procedures
22369 that use it.
22370
22371 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22372 longer static.
22373 (fparser, open_extra_files): Remove.
22374 (open_files, output_files): Don't take care of fparser.
22375 * src/files.h: Adjust.
22376 * src/output.c (output_parser): Open and close the file to the
22377 skeleton.
22378 * src/reader.c (read_declarations): When %semantic_parser, open
22379 fguard.
22380
22381 2000-12-19 Akim Demaille <akim@epita.fr>
22382
22383 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22384 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22385
22386 2000-12-19 Akim Demaille <akim@epita.fr>
22387
22388 * src/files.c (open_files): Yipee! We no longer need all the code
22389 looking for `/tmp' since we have no tmp file.
22390
22391 2000-12-19 Akim Demaille <akim@epita.fr>
22392
22393 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22394 New macros.
22395 * src/files.c (open_files): Less dependency on MSDOS etc.
22396
22397 2000-12-14 Akim Demaille <akim@epita.fr>
22398
22399 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22400 Provide a default definition.
22401 Use it when executing the default @ action.
22402 * src/reader.c (reader_output_yylsp): No longer include
22403 `timestamp' and `text' in the default YYLTYPE.
22404
22405 2000-12-12 Akim Demaille <akim@epita.fr>
22406
22407 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22408 (copy_guard): Quote the file names.
22409 Reported by Laurent Mascherpa.
22410
22411 2000-12-12 Akim Demaille <akim@epita.fr>
22412
22413 * src/output.c (output_headers, output_program, output): Be sure
22414 to escape special characters when outputting filenames.
22415 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22416 (output_headers): Don't depend on them, Use ACTSTR.
22417
22418 2000-11-17 Akim Demaille <akim@epita.fr>
22419
22420 * lib/obstack.h: Formatting changes.
22421 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22422 prevents type checking.
22423 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22424 cast the value to (void *): assigning a `foo *' to a `void *'
22425 variable is valid.
22426 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22427 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22428 append characters.
22429
22430 2000-11-17 Akim Demaille <akim@epita.fr>
22431
22432 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22433 as...
22434 (suite.m4, regression.m4, calc.m4): these.
22435 * tests/atgeneral.m4: Update from CVS Autoconf.
22436
22437 2000-11-17 Akim Demaille <akim@epita.fr>
22438
22439 * tests/regression.m4 (%union and --defines): New test,
22440 demonstrating a current bug in the obstack implementation.
22441
22442 2000-11-17 Akim Demaille <akim@epita.fr>
22443
22444 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22445 macros.
22446 Use them to declare the variables which are global or local to
22447 `yyparse'.
22448
22449 2000-11-17 Akim Demaille <akim@epita.fr>
22450
22451 * acconfig.h: Remove, no longer used.
22452
22453 2000-11-07 Akim Demaille <akim@epita.fr>
22454
22455 * src: s/Copyright (C)/Copyright/g.
22456
22457 2000-11-07 Akim Demaille <akim@epita.fr>
22458
22459 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22460 defining.
22461 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22462
22463 2000-11-07 Akim Demaille <akim@epita.fr>
22464
22465 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22466 Merge in a single CPP if/else.
22467
22468 2000-11-07 Akim Demaille <akim@epita.fr>
22469
22470 * src/output.c (output): Remove useless variables.
22471 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22472 argument `data' for consistency with the prototypes.
22473 Qualify it `const'.
22474 (obstack_copy, obstack_copy0): Rename the second argument as
22475 `address' for consistency. Qualify it `const'.
22476 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22477 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22478 `const' their input argument (`data' or `address').
22479 Adjust the corresponding macros to include `const' in casts.
22480
22481 2000-11-03 Akim Demaille <akim@epita.fr>
22482
22483 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22484 s/PFILE1/BISON_HAIRY/.
22485 Adjust dependencies.
22486
22487 2000-11-03 Akim Demaille <akim@epita.fr>
22488
22489 For some reason, this was not applied.
22490
22491 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22492 `unlink': it's no longer used.
22493
22494 2000-11-03 Akim Demaille <akim@epita.fr>
22495
22496 * src/files.c (skeleton_find): New function, eved out of...
22497 (open_files, open_extra_files): here.
22498
22499 2000-11-03 Akim Demaille <akim@epita.fr>
22500
22501 Don't use `atexit'.
22502
22503 * src/files.c (obstack_save): New function.
22504 (done): Rename as...
22505 (output_files): this.
22506 Use `obstack_save'.
22507 * src/main.c (main): Don't use `atexit' to register `done', since
22508 it no longer has to remove tmp files, just call `output_files'
22509 when there are no errors.
22510
22511 2000-11-02 Akim Demaille <akim@epita.fr>
22512
22513 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22514 `unlink': it's no longer used.
22515 * src/files.h: Formatting changes.
22516
22517 2000-11-02 Akim Demaille <akim@epita.fr>
22518
22519 Remove the last uses of mktemp and unlink/delete.
22520
22521 * src/files.c (fdefines, ftable): Removed.
22522 (defines_ostack, table_obstack): New.
22523 Adjust dependencies of the former into uses of the latter.
22524 * src/output.c (output_short_or_char_table, output_short_table):
22525 Convert to using obstacks.
22526 * src/reader.c (copy_comment2): Accept one FILE * and two
22527 obstacks.
22528 (output_token_defines, reader_output_yylsp): Use obstacks.
22529 * src/system.h (obstack_fgrow3): New.
22530 * po/POTFILES.in: Adjust.
22531
22532 2000-11-01 Akim Demaille <akim@epita.fr>
22533
22534 Change each use of `fattrs' into a use of `attrs_obstack'.
22535
22536 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22537 * src/files.c (fattrs): Remove.
22538 (attrs_obstack): New.
22539 Adjust all dependencies.
22540 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22541
22542 2000-11-01 Akim Demaille <akim@epita.fr>
22543
22544 Introduce obstacks.
22545 Change each use of `faction' into a use of `action_obstack'.
22546
22547 * lib/obstack.h, lib/obstack.c: New files.
22548 * src/files.c (faction): Remove.
22549 (action_obstack): New.
22550 Adjust all dependencies.
22551
22552 2000-10-20 Akim Demaille <akim@epita.fr>
22553
22554 * lib/quote.h (PARAMS): New macro. Use it.
22555
22556 2000-10-16 Akim Demaille <akim@epita.fr>
22557
22558 * src/output.c (output_short_or_char_table): New function.
22559 (output_short_table, output_token_translations): Use it.
22560 (goto_actions): Use output_short_table.
22561
22562 2000-10-16 Akim Demaille <akim@epita.fr>
22563
22564 * src/symtab.c (bucket_new): New function.
22565 (getsym): Use it.
22566
22567 * src/output.c (output_short_table): New argument to display the
22568 comment associated with the table.
22569 Adjust dependencies.
22570 (output_gram): Use it.
22571 (output_rule_data): Nicer output layout for YYTNAME.
22572
22573 2000-10-16 Akim Demaille <akim@epita.fr>
22574
22575 * src/lex.c (read_typename): New function.
22576 (lex): Use it.
22577 * src/reader.c (copy_dollar): Likewise.
22578
22579 2000-10-16 Akim Demaille <akim@epita.fr>
22580
22581 * src/reader.c (copy_comment2): Expect the input stream to be on
22582 the `/' which is suspected to open a comment, instead of being
22583 called after `//' or `/*' was read.
22584 (copy_comment, copy_definition, parse_union_decl, copy_action)
22585 (copy_guard): Adjust.
22586
22587 2000-10-16 Akim Demaille <akim@epita.fr>
22588
22589 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22590 `read_signed_integer'.
22591
22592 2000-10-16 Akim Demaille <akim@epita.fr>
22593
22594 * src/reader.c (copy_dollar): New function.
22595 (copy_guard, copy_action): Use it.
22596
22597 2000-10-16 Akim Demaille <akim@epita.fr>
22598
22599 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22600 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22601 New files, from Fileutils 4.0.27.
22602 * src/main.c (printable_version): Remove.
22603 * src/lex.c, src/reader.c: Use `quote'.
22604
22605 2000-10-04 Akim Demaille <akim@epita.fr>
22606
22607 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22608
22609 2000-10-04 Akim Demaille <akim@epita.fr>
22610
22611 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22612
22613 2000-10-04 Akim Demaille <akim@epita.fr>
22614
22615 When a literal string is used to define two different tokens,
22616 `bison -v' segfaults.
22617 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22618
22619 * tests/regression.m4: New file.
22620 Include the core of the sample provided by Piotr Gackiewicz.
22621 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22622 properly.
22623
22624 2000-10-04 Akim Demaille <akim@epita.fr>
22625
22626 * src/reader.c (parse_expect_decl): Keep `count' within the size
22627 of `buffer'.
22628 From Neil Booth.
22629
22630 2000-10-02 Paul Eggert <eggert@twinsun.com>
22631
22632 * bison.s1 (yyparse): Assign the default value
22633 unconditionally, to avoid a GCC warning and make the parser a
22634 tad smaller.
22635
22636 2000-10-02 Akim Demaille <akim@epita.fr>
22637
22638 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22639 options.
22640
22641 2000-10-02 Akim Demaille <akim@epita.fr>
22642
22643 * src/derives.c, src/print.c, src/reduce.c: To ease the
22644 translation, move some `\n' out of the translated strings.
22645
22646 2000-10-02 Akim Demaille <akim@epita.fr>
22647
22648 The location tracking mechanism is precious for parse error
22649 messages. Nevertheless, it is enabled only when `@n' is used in
22650 the grammar, which is a different issue (you can use it in error
22651 message, but not in the grammar per se). Therefore, there should
22652 be another means to enable it.
22653
22654 * src/getargs.c (getargs): Support `--locations'.
22655 (usage): Report it.
22656 * src/getargs.h (locationsflag): Export it.
22657 * src/lex.c (percent_table): Support `%locations'.
22658 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22659 with `locationsflag'.
22660 * doc/bison.texinfo: Document `--locations' and `%locations'.
22661 Sort the options.
22662 * tests/calc.m4: Test it.
22663
22664 For regularity of the names, replace each
22665 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22666 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22667 In addition replace each `flag' with `_flag'.
22668
22669 2000-10-02 Akim Demaille <akim@epita.fr>
22670
22671 Also test parse error messages, including with YYERROR_VERBOSE.
22672
22673 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22674 associative).
22675 Use it to check the computations.
22676 Use it to check `nonassoc' is honored.
22677 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22678 `--yyerror-verbose'.
22679 (_AT_CHECK_CALC): Adjust to this option.
22680 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22681
22682 2000-10-02 Akim Demaille <akim@epita.fr>
22683
22684 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22685 the latter demonstrates a flaw in the handling of non debugging
22686 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22687 was used in order to simplify:
22688
22689 #if YYDEBUG
22690 if (yydebug)
22691 {
22692 ...
22693 }
22694 #endif
22695
22696 into
22697
22698 if (yydebug)
22699 {
22700 ...
22701 }
22702
22703 unfortunately this leads to a CPP conflict when
22704 `--name-prefix=foo' is used since it produces `#define yydebug
22705 foodebug'.
22706
22707 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22708 (YYDPRINTF): New macro.
22709 Spread its use.
22710 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22711 the bison options.
22712 Also test `--verbose', `--defines' and `--name-prefix'.
22713
22714 2000-10-02 Akim Demaille <akim@epita.fr>
22715
22716 Improve the readability of the produced parsers.
22717
22718 * src/bison.s1: Formatting changes.
22719 Improve the comment related to the `$' mark.
22720 (yydefault): Don't fall through to `yyresume': `goto' there.
22721 * src/output.c (output_parser): When the `$' is met, skip the end
22722 of its line.
22723 New variable, `number_of_dollar_signs', to check there's exactly
22724 one `$' in the parser skeleton.
22725
22726 2000-10-02 Akim Demaille <akim@epita.fr>
22727
22728 * lib/xstrdup.c: New file, from the fileutils.
22729 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22730 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22731 instead of strlen + xmalloc + strcpy.
22732 * src/symtab.c (copys): Remove, use xstrdup instead.
22733
22734 2000-10-02 Akim Demaille <akim@epita.fr>
22735
22736 * src/gram.h (associativity): New enum type which replaces the
22737 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22738 `right_assoc', `left_assoc' and `non_assoc'.
22739 Adjust all dependencies.
22740 * src/reader.c: Formatting changes.
22741 (LTYPESTR): Don't define it, use it as a literal in
22742 `reader_output_yylsp'.
22743 * src/symtab.h (symbol_class): New enum type which replaces the
22744 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22745 `sunknown', `stoken and `snterm'.
22746
22747 2000-10-02 Akim Demaille <akim@epita.fr>
22748
22749 * src/getargs.c (fixed_outfiles): Rename as...
22750 (yaccflag): for consistency and accuracy.
22751 Adjust dependencies.
22752
22753 2000-10-02 Akim Demaille <akim@epita.fr>
22754
22755 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22756 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22757 difficult and introduced a lot of core dump. It turns out that
22758 Bison used an implementation of `xmalloc' based on `calloc', and
22759 at various places it does depend upon the initialization to 0. I
22760 have not tried to isolate the pertinent places, and all the former
22761 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22762 someone should address this issue.
22763
22764 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22765 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22766 files.
22767 Adjust dependencies.
22768 * src/warshall.h: New file.
22769 Propagate.
22770
22771 2000-10-02 Akim Demaille <akim@epita.fr>
22772
22773 Various anti-`extern in *.c' changes.
22774
22775 * src/system.h: Include `assert.h'.
22776
22777 2000-10-02 Akim Demaille <akim@epita.fr>
22778
22779 * src/state.h (nstates, final_state, first_state, first_shift)
22780 (first_reduction): Move their exportation from here...
22781 * src/LR0.h: to here.
22782 Adjust dependencies.
22783 * src/getargs.c (statisticsflag): New variable.
22784 Add support for `--statistics'.
22785 Adjust dependencies.
22786
22787 Remove a lot of now useless `extern' statements in most files.
22788
22789 2000-10-02 Akim Demaille <akim@epita.fr>
22790
22791 * src/LR0.h: New file.
22792 Propagate its use.
22793
22794 2000-10-02 Akim Demaille <akim@epita.fr>
22795
22796 * src/print.h: New file.
22797 Propagate its use.
22798 * src/print.c: Formatting and ordering changes.
22799 (verbose, terse): Replace with...
22800 (print_results): this new function.
22801 Adjust dependencies.
22802
22803 2000-10-02 Akim Demaille <akim@epita.fr>
22804
22805 * src/conflicts.c (conflict_report): New function.
22806 (conflict_log, verbose_conflict_log): Replace with...
22807 (print_conflicts): this function.
22808 Adjust dependencies.
22809 * src/conflicts.h: New file.
22810 Propagate its inclusion.
22811
22812 2000-10-02 Akim Demaille <akim@epita.fr>
22813
22814 * src/nullable.h: New file.
22815 Propagate its inclusion.
22816 * src/nullable.c: Formatting changes.
22817
22818 2000-10-02 Akim Demaille <akim@epita.fr>
22819
22820 * src/reduce.h: New file.
22821 Propagate its inclusion.
22822 * src/reduce.c: Topological sort and other formatting changes.
22823 (bool, TRUE, FALSE): Move their definition to...
22824 * src/system.h: here.
22825
22826 2000-10-02 Akim Demaille <akim@epita.fr>
22827
22828 * src/files.c: Formatting changes.
22829 (tryopen, tryclose, openfiles): Rename as...
22830 (xfopen, xfclose, open_files): this.
22831 (stringappend): static.
22832 * src/files.h: Complete the list of exported symbols.
22833 Propagate its use.
22834
22835 2000-10-02 Akim Demaille <akim@epita.fr>
22836
22837 * src/reader.h: New file.
22838 Propagate its use instead of tedious list of `extern' and
22839 prototypes.
22840 * src/reader.c: Formatting changes, topological sort,
22841 s/register//.
22842
22843 2000-10-02 Akim Demaille <akim@epita.fr>
22844
22845 * src/lex.h: Prototype `lex.c' exported functions.
22846 * src/reader.c: Adjust.
22847 * src/lex.c: Formatting changes.
22848 (safegetc): Rename as...
22849 (xgetc): this.
22850
22851 2000-10-02 Akim Demaille <akim@epita.fr>
22852
22853 * src/lalr.h: New file.
22854 Propagate its inclusion instead of prototypes and `extern'.
22855 * src/lalr.c: Formatting changes, topological sorting etc.
22856
22857 2000-10-02 Akim Demaille <akim@epita.fr>
22858
22859 * src/output.c (token_actions): Introduce a temporary array,
22860 YYDEFACT, that makes it possible for this function to use
22861 output_short_table.
22862
22863 2000-10-02 Akim Demaille <akim@epita.fr>
22864
22865 `user_toknums' is output as a `short[]' in `output.c', while it is
22866 defined as a `int[]' in `reader.c'. For consistency with the
22867 other output tables, `user_toknums' is now defined as a table of
22868 shorts.
22869
22870 * src/reader.c (user_toknums): Be a short table instead of an int
22871 table.
22872 Adjust dependencies.
22873
22874 Factor the short table outputs.
22875
22876 * src/output.c (output_short_table): New function.
22877 * src/output.c (output_gram, output_stos, output_rule_data)
22878 (output_base, output_table, output_check): Use it.
22879
22880 2000-10-02 Akim Demaille <akim@epita.fr>
22881
22882 * src/output.c (output): Topological sort of the functions, in
22883 order to get rid of the `static' prototypes.
22884 No longer use `register'.
22885 * src/output.h: New file.
22886 Propagate its inclusion in files explicitly prototyping functions
22887 from output.c.
22888
22889 2000-09-21 Akim Demaille <akim@epita.fr>
22890
22891 * src/atgeneral.m4: Update from Autoconf.
22892
22893 2000-09-21 Akim Demaille <akim@epita.fr>
22894
22895 * src/closure.h: New file.
22896 * src/closure.c: Formatting changes, topological sort over the
22897 functions, use of closure.h.
22898 (initialize_closure, finalize_closure): Rename as...
22899 (new_closure, free_closure): these. Adjust dependencies.
22900 * src/LR0.c: Formatting changes, topological sort, use of
22901 cloture.h.
22902 (initialize_states): Rename as...
22903 (new_states): this.
22904 * src/Makefile.am (noinst_HEADERS): Adjust.
22905
22906 2000-09-20 Akim Demaille <akim@epita.fr>
22907
22908 * src/acconfig.h: Don't protect config.h against multiple
22909 inclusion.
22910 Don't define PARAMS.
22911 * src/system.h: Define PARAMS.
22912 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22913 purpose of config.h. system.h must not try to fix wrong
22914 definitions in config.h.
22915
22916 2000-09-20 Akim Demaille <akim@epita.fr>
22917
22918 * src/derives.h: New file.
22919 * src/main.c, src/derives.h: Use it.
22920 Formatting changes.
22921 * src/Makefile.am (noinst_HEADERS): Adjust.
22922
22923 2000-09-20 Akim Demaille <akim@epita.fr>
22924
22925 * tests/atgeneral.m4: Update from Autoconf.
22926 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22927 (AT_CHECK_CALC): New macros.
22928 Use these macros to test bison with options `', `--raw',
22929 `--debug', `--yacc', `--yacc --debug'.
22930
22931 2000-09-19 Akim Demaille <akim@epita.fr>
22932
22933 * src/output.c: Formatting changes.
22934 * src/machine.h: Remove, leaving its contents in...
22935 * src/system.h: here.
22936 Include stdio.h.
22937 Adjust all dependencies on stdio.h and machine.h.
22938 * src/getargs.h: New file.
22939 Let all `extern' declarations about getargs.c be replaced with
22940 inclusion of `getargs.h'.
22941 * src/Makefile.am (noinst_HEADERS): Adjust.
22942
22943 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22944 scope.
22945 (yyerror): Returns void, not int.
22946 * doc/bison.texinfo: Formatting changes.
22947
22948 2000-09-19 Akim Demaille <akim@epita.fr>
22949
22950 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22951 portable.
22952
22953 2000-09-18 Akim Demaille <akim@epita.fr>
22954
22955 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22956 * src/Makefile.am (INCLUDES): Don't.
22957 Be ready to fetch headers in lib/.
22958
22959 2000-09-18 Akim Demaille <akim@epita.fr>
22960
22961 * doc/bison.texinfo: Update the copyright.
22962 ANSIfy and GNUify the examples.
22963 Remove the old menu.
22964
22965 2000-09-18 Akim Demaille <akim@epita.fr>
22966
22967 First set of tests: use the `calc' example from the documentation.
22968
22969 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22970 is defined only when YYDEBUG is.
22971 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22972 * src/files.c (tryopen, tryclose): Formatting changes.
22973 Move to the top and be static.
22974 * src/reader.c (read_signed_integer): Likewise.
22975 * tests/calc.m4: New file.
22976 * Makefile.am, suite.m4: Adjust.
22977 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22978
22979 2000-09-18 Akim Demaille <akim@epita.fr>
22980
22981 Add support for an Autotest test suite for Bison.
22982
22983 * m4/m4.m4, m4/atconfig.m4: New files.
22984 * m4/Makefile.am (EXTRA_DIST): Adjust.
22985 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22986 files.
22987 * src/getargs.c: Display a more standard --version message.
22988 * src/reader.c (reader): Formatting changes.
22989 No longer depend upon VERSION_STRING.
22990 * configure.in: No longer use `dnl'.
22991 Set up the test suite and the new directory `tests/.
22992 (VERSION_STRING): Remove.
22993
22994 2000-04-14 Akim Demaille <akim@epita.fr>
22995
22996 * src/reader.c (copy_comment2): New function, same as former
22997 `copy_comment', but outputs into two FILE *.
22998 (copy_comment): Use it.
22999 (parse_union_decl): Use it.
23000 (get_type, parse_start_decl): Use the same `invalid' message.
23001 (parse_start_decl, parse_union_decl): Use the same `multiple'
23002 message.
23003 (parse_union_decl, copy_guard, copy_action): Use the same
23004 `unmatched' message.
23005 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23006
23007 2000-03-31 Akim Demaille <akim@epita.fr>
23008
23009 * src/files.c (tryopen, tryclose): Move to the top.
23010 Be static.
23011
23012 2000-03-31 Akim Demaille <akim@epita.fr>
23013
23014 * src/main.c (main): Don't call `done', exit does it.
23015
23016 2000-03-31 Akim Demaille <akim@epita.fr>
23017
23018 * allocate.c: s/return (foo)/return foo/.
23019 * lalr.c: Likewise.
23020 * LR0.c: Likewise.
23021 * output.c: Likewise.
23022 * reader.c: Likewise.
23023 * symtab.c: Likewise.
23024 * vmsgetargs.c: Likewise.
23025
23026 2000-03-31 Akim Demaille <akim@epita.fr>
23027
23028 Clean up the error reporting functions.
23029
23030 * src/report.c: New file.
23031 * src/report.h: Likewise.
23032 * src/Makefile.am: Adjust.
23033 * m4/error.m4: New file.
23034 * m4/Makefile.am: Adjust.
23035 * configure.in (jm_PREREQ_ERROR): Call it.
23036 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23037 Remove.
23038 (fatal, fatals): Remove. All callers use complain.c::fatal.
23039 (warn, warni, warns, warnss, warnss): Remove. All callers use
23040 complain.c::complain.
23041 (toomany): Remove, use fatal instead.
23042 * src/files.c (done): No argument, use complain_message_count.
23043 * src/main.c (main): Register `done' to `atexit'.
23044
23045 * src/getargs.c (usage): More `fputs', less `fprintf'.
23046
23047 2000-03-28 Akim Demaille <akim@epita.fr>
23048
23049 * lib/: New directory.
23050 * Makefile.am (SUBDIRS): Adjust.
23051 * configure.in: Adjust.
23052 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23053 useless.
23054 * src/alloca.c: Moved to lib/.
23055 * src/getopt.c: Likewise.
23056 * src/getopt1.c: Likewise.
23057 * src/getopt.h: Likewise.
23058 * src/ansi2knr.c: Likewise.
23059 * src/ansi2knr.1: Likewise.
23060 * src/Makefile.am: Adjust.
23061 * lib/Makefile.am: New file.
23062
23063 2000-03-28 Akim Demaille <akim@epita.fr>
23064
23065 * src/getargs.c (usage): Refresh the help message.
23066
23067 2000-03-17 Akim Demaille <akim@epita.fr>
23068
23069 * src/getopt1.c: Updated from textutils 2.0e
23070 * src/getopt.c: Likewise.
23071 * src/getopt.h: Likewise.
23072
23073 2000-03-17 Akim Demaille <akim@epita.fr>
23074
23075 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23076 the file name, not the whole `#line LINE FILE'.
23077
23078 2000-03-17 Akim Demaille <akim@epita.fr>
23079
23080 On syntax errors, report the token on which we choked.
23081
23082 * src/bison.s1 (yyparse): In the label yyerrlab, when
23083 YYERROR_VERBOSE, add yychar in msg.
23084
23085 2000-03-17 Akim Demaille <akim@epita.fr>
23086
23087 * src/reader.c (copy_at): New function.
23088 (copy_guard): Use it.
23089 (copy_action): Use it.
23090
23091 2000-03-17 Akim Demaille <akim@epita.fr>
23092
23093 Be kind to translators, save some useless translations.
23094
23095 * src/main.c (banner): New function.
23096 (fatal_banner): Use it.
23097 (warn_banner): Use it.
23098
23099 2000-03-17 Akim Demaille <akim@epita.fr>
23100
23101 * src/reader.c (copy_definition): Use copy_string and
23102 copy_comment. Removed now unused `match', `ended',
23103 `cplus_comment'.
23104 (copy_comment, copy_string): Moved, to be visible from
23105 copy_definition.
23106
23107 2000-03-17 Akim Demaille <akim@epita.fr>
23108
23109 * src/reader.c (copy_string): Declare `static inline'. No
23110 problems with inline, since it is checked by configure.
23111 (copy_comment): Likewise.
23112
23113 2000-03-17 Akim Demaille <akim@epita.fr>
23114
23115 * src/reader.c (packsymbols): Formatting changes.
23116
23117 2000-03-17 Akim Demaille <akim@epita.fr>
23118
23119 * src/reader.c (copy_comment): New function, factored out from:
23120 (copy_action): Use it. Removed now unused `match', `ended',
23121 `cplus_comment'.
23122 (copy_guard): Likewise.
23123
23124 2000-03-17 Akim Demaille <akim@epita.fr>
23125
23126 * src/reader.c (copy_string): New function, factored out from:
23127 (copy_action): Use it.
23128 (copy_guard): Likewise.
23129
23130 2000-03-17 Akim Demaille <akim@epita.fr>
23131
23132 Change the handling of @s so that they behave exactly like $s.
23133 There is now a pseudo variable @$ (readble and writable), location
23134 of the lhs of the rule (by default ranging from the location of
23135 the first symbol of the rhs, to the location of the last symbol,
23136 or, if the rhs is empty, YYLLOC).
23137
23138 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23139 yyval.
23140 (yyparse): When providing a default semantic action, provide a
23141 default location action.
23142 (after the $): No longer change `*YYLSP', just stack YYLOC the
23143 same way you stack YYVAL.
23144 * src/reader.c (read_declarations): Use warns.
23145 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23146 (copy_action, case '@'): Likewise.
23147 Use a standard error message, to save useless work from
23148 translators.
23149
23150 2000-03-17 Akim Demaille <akim@epita.fr>
23151
23152 * src/bison.s1: Formatting and cosmetics changes.
23153 * src/reader.c: Likewise.
23154 Update the Copyright notice.
23155
23156 2000-03-17 Akim Demaille <akim@epita.fr>
23157
23158 * src/bison.s1 (#line): All set to `#line' only, since the
23159 Makefile now handles them.
23160
23161 2000-03-16 Akim Demaille <akim@epita.fr>
23162
23163 * src/output.c (output_rule_data): Output the documentation of
23164 some of the tables.
23165 (Copyright notice): Update.
23166 Formatting changes.
23167
23168 2000-03-16 Akim Demaille <akim@epita.fr>
23169
23170 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23171 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23172 One `#if YYDEBUG' remains, since it uses variables which are
23173 defined only if `YYDEBUG != 0'.
23174
23175 2000-03-16 Akim Demaille <akim@epita.fr>
23176
23177 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23178 and related variables so that the similarities are highlighted.
23179
23180 2000-03-16 Akim Demaille <akim@epita.fr>
23181
23182 * src/bison.s1: Properly indent CPP directives.
23183
23184 2000-03-16 Akim Demaille <akim@epita.fr>
23185
23186 * src/bison.s1: Properly indent the `alloca' CPP section.
23187
23188 2000-03-16 Akim Demaille <akim@epita.fr>
23189
23190 Do not hard code values of directories in `configure.in'.
23191 Update the `configure' tool chain.
23192
23193 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23194 src/makefile.am.
23195 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23196 (AC_OUTPUT): Add m4/Makefile.
23197 Bump to bison 1.28a, 1.29 has never been released.
23198 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23199 handled via src/Makefile.am.
23200 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23201 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23202 autoheader.
23203 * Makefile.am (SUBDIRS): Add m4.
23204 (ACLOCAL_AM_FLAGS): New variable.
23205 (AUTOMAKE_OPTIONS): Add check-news.
23206 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23207 the proper line number and file name.
23208 (DEFS): Propagate the location of bison library files and of the
23209 locale files.
23210 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23211 builddir.
23212 * acinclude.m4: Remove, replaced by the directory m4.
23213 * m4/Makefile.am (EXTRA_DIST): New variable.
23214 * m4/gettext.m4: New file, from the fileutils.
23215 * m4/lcmessage.m4: Likewise
23216 * m4/progtest.m4: Likewise.
23217 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23218
23219 2000-03-10 Akim Demaille <akim@epita.fr>
23220
23221 * src/closure.c:
23222 Formatting changes of various comments.
23223 Respect the GNU coding standards at various places.
23224 Don't use `_()' when no translation is needed.
23225
23226 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23227
23228 * src/files.c:
23229 OS/2 honors TMPDIR environment variable.
23230
23231 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23232
23233 * doc/bison.texinfo: Tweaked spelling and grammar.
23234 Updated ISBN.
23235 Removed reference to price of printed copy.
23236 Mention BISON_SIMPLE and BISON_HAIRY.
23237
23238 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23239
23240 * configure.in, NEWS:
23241 Bison 1.29 released.
23242
23243 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23244
23245 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23246 Added reference card.
23247
23248 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23249
23250 * po/ru.po: Added Russian translation.
23251
23252 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23253
23254 * configure.in: Added Russian translation.
23255
23256 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23257
23258 * configure.in, NEWS, README:
23259 Released version 1.28.
23260
23261 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23262
23263 * src/system.h:
23264 Squashed redefinition warning on some systems.
23265
23266 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23267 Have configure build version string instead of relying on ANSI string
23268 concatentation.
23269
23270 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23271
23272 * po/POTFILES.in: Got rid of version.c.
23273
23274 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23275
23276 * acconfig.h, configure.in:
23277 Have configure build version string instead of relying on ANSI string
23278 concatentation.
23279
23280 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23281
23282 * doc/bison.1:
23283 Dropped mention of `+' for long-named options.
23284
23285 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23286
23287 * src/files.c: Added <unistd.h> for unlink().
23288
23289 * src/Makefile.am, src/system.h:
23290 I18n fixes.
23291
23292 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23293
23294 * README: Added a FAQ list.
23295
23296 * configure.in, acconfig.h:
23297 I18n fixes.
23298
23299 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23300
23301 * doc/FAQ, doc/Makefile.am:
23302 Added a FAQ list.
23303
23304 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23305
23306 * src/alloc.h, src/symtab.h, src/version.c:
23307 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23308
23309 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23310
23311 * src/.cvsignore, src/Makefile.am:
23312 Reorganized: sources in `src', documentation in `doc'.
23313
23314 * src/lex.c (literalchar):
23315 fixed the code for escaping double quotes (thanks
23316 Jonathan Czisny.)
23317
23318 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23319
23320 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23321 Adjusted paths to reflect directory reorganization.
23322
23323 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23324
23325 * doc/.cvsignore, doc/Makefile.am:
23326 Reorganized: sources in `src', documentation in `doc'.
23327
23328 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23329
23330 * configure.in:
23331 Updated AC_INIT file to reflect directory reorganization.
23332
23333 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23334 Reorganized: sources in `src', documentation in `doc'.
23335
23336 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23337
23338 * src/allocate.c:
23339 Don't declare calloc() and realloc() if not necessary.
23340
23341 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23342
23343 * configure.in, acconfig.h, acinclude.m4:
23344 Don't declare calloc() and realloc() if not necessary.
23345
23346 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23347
23348 * po/.cvsignore: Added i18n support.
23349
23350 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23351
23352 * acconfig.h, configure.in, Makefile.am:
23353 Added i18n support.
23354
23355 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23356
23357 * src/bison.s1: Fixed #line numbers.
23358
23359 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23360
23361 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23362 Added PO files from Translation Project.
23363
23364 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23365
23366 * Makefile.am:
23367 Added support for non-ANSI compilers (ansi2knr).
23368
23369 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23370
23371 * configure.in: Bumped version number to 1.27.
23372
23373 * Makefile.am:
23374 Added `bison.simple' to list of files removed by `make distclean'.
23375
23376 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23377
23378 * src/files.c, src/files.h:
23379 Defined locations of parser files in config.h instead of Makefile.
23380
23381 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23382
23383 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23384 Defined locations of parser files in config.h instead of Makefile.
23385
23386 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23387
23388 * Makefile.am:
23389 Removed inappropriate use of $< macro.
23390
23391 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23392
23393 * po/Makefile.in.in, po/POTFILES.in:
23394 Add `po' directory skeleton.
23395
23396 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23397
23398 * README: Document help-bison list.
23399
23400 * configure.in: Add check for mkstemp().
23401
23402 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23403
23404 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23405 Hush a few compiler warnings.
23406
23407 * src/files.c:
23408 Add tryclose(), which verifies that fclose was successful.
23409 Hush a couple of compiler warnings.
23410
23411 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23412
23413 * Makefile.am, OChangeLog:
23414 ChangeLog is now automatically generated. Include the old version as
23415 OChangeLog.
23416
23417 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23418
23419 * 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:
23420 Update FSF address.
23421
23422 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23423
23424 * doc/bison.texinfo: Fix formatting glitch.
23425
23426 * doc/bison.texinfo: Update FSF address.
23427
23428 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23429
23430 * acconfig.h: Update FSF address.
23431
23432 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23433
23434 * src/system.h:
23435 Don't define PACKAGE here, since config.h defines it.
23436
23437 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23438
23439 * src/reader.c: Update copyright date.
23440
23441 * src/main.c:
23442 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23443 favor of output directly to stderr (avoids buffer overruns).
23444
23445 * src/reader.c: Some checks for premature EOF.
23446
23447 * 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:
23448 Use prototypes if the compiler understands them.
23449
23450 * src/files.c: Honor TMPDIR on Unix hosts.
23451 Use prototypes if the compiler understands them.
23452
23453 * src/reader.c:
23454 Fix a couple of buffer overrun bugs.
23455 Use prototypes if the compiler understands them.
23456
23457 * src/system.h: Include unistd.h and ctype.h.
23458 Use #ifdef instead of #if for NLS symbols.
23459
23460 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23461
23462 * doc/bison.texinfo:
23463 Delete comment "consider using @set for edition number, etc..." since
23464 we now are doing so.
23465
23466 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23467
23468 * configure.in:
23469 Use prototypes if the compiler understands them.
23470
23471 * NEWS: Document 1.26 highlights.
23472
23473 * Makefile.am: Require Automake 1.3 or later.
23474
23475 * acconfig.h:
23476 Use prototypes if the compiler understands them.
23477
23478 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23479
23480 * src/version.c:
23481 Use VERSION symbol from automake for version number.
23482
23483 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23484
23485 * acconfig.h, configure.in, version.cin:
23486 Use VERSION symbol from automake for version number.
23487
23488 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23489
23490 * Makefile.am:
23491 Distribute original version of simple parser (bison.s1), not built
23492 version (bison.simple).
23493
23494 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23495
23496 * doc/bison.texinfo: Add info dir entry.
23497
23498 * doc/bison.texinfo:
23499 Let automake put version number into documentation.
23500
23501 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23502
23503 * src/bison.cld, src/build.com, src/vmshlp.mar:
23504 Add non-RCS files from /gd/gnu/bison.
23505
23506 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23507
23508 * doc/bison.1:
23509 Document the BISON_HAIRY and BISON_SIMPLE variables.
23510
23511 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23512
23513 * src/version.c: Build version.c automatically.
23514
23515 * src/reader.c:
23516 Fix token numbering (used to start at 258, not 257).
23517
23518 * src/system.h: Include config.h.
23519
23520 * src/getargs.c: Update bug report address.
23521
23522 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23523 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23524
23525 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23526
23527 * Makefile.am:
23528 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23529
23530 * configure.in, version.cin:
23531 Build version.c automatically.
23532
23533 * AUTHORS: Add AUTHORS file.
23534
23535 * README: Update bug report address.
23536
23537 * bison.simple:
23538 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23539
23540 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23541 Add automake stuff.
23542
23543 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23544
23545 * doc/bison.texinfo: Clean up some formatting.
23546
23547 1998-05-05 Richard Stallman <rms@gnu.org>
23548
23549 * doc/bison.texinfo:
23550 Explain better why to make a pure parser.
23551
23552 1998-01-05 Richard Stallman <rms@gnu.org>
23553
23554 * src/files.c (openfiles):
23555 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23556 find a temporary directory, if possible. Do not unlink files while
23557 they are open.
23558
23559 1997-08-25 Richard Stallman <rms@gnu.org>
23560
23561 * src/reader.c (stack_offset;):
23562 Change some warni to warns.
23563
23564 * src/lex.c (literalchar): Use warns, not warni.
23565
23566 1997-06-28 Richard Stallman <rms@gnu.org>
23567
23568 * src/bison.s1: Add a Bison version comment.
23569
23570 * src/main.c (fatal, warn, berror):
23571 Use program_name.
23572
23573 1997-06-28 Richard Stallman <rms@gnu.org>
23574
23575 * Makefile.in (bison_version): New variable.
23576 (dist): Use that variable.
23577 (bison.s1): Substitute the Bison version into bison.simple.
23578
23579 * bison.simple: Add a Bison version comment.
23580
23581 1997-06-18 Richard Stallman <rms@gnu.org>
23582
23583 * src/main.c (fatal, warn, berror):
23584 Make error messages standard.
23585 (toomany): Improve error message text.
23586
23587 * 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:
23588 new.h renamed to alloc.h.
23589
23590 1997-06-18 Richard Stallman <rms@gnu.org>
23591
23592 * Makefile.in: new.h renamed to alloc.h.
23593
23594 1997-05-24 Richard Stallman <rms@gnu.org>
23595
23596 * src/lex.c (literalchar):
23597 Fix the code for escaping \, " and '.
23598
23599 (lex): Avoid trouble when there are many chars
23600 to discard in a char literal with just several chars in it.
23601
23602 1997-05-17 Richard Stallman <rms@gnu.org>
23603
23604 * src/bison.s1:
23605 Use malloc, if using alloca is troublesome.
23606 (YYSTACK_USE_ALLOCA): New flag macro.
23607 Define it for some systems and compilers.
23608 (YYSTACK_ALLOC): New macro.
23609 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23610 If it was malloc'd, free it.
23611
23612 1997-05-17 Richard Stallman <rms@gnu.org>
23613
23614 * bison.simple:
23615 Use malloc, if using alloca is troublesome.
23616 (YYSTACK_USE_ALLOCA): New flag macro.
23617 Define it for some systems and compilers.
23618 (YYSTACK_ALLOC): New macro.
23619 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23620 If it was malloc'd, free it.
23621
23622 1997-04-23 Richard Stallman <rms@gnu.org>
23623
23624 * src/bison.s1:
23625 (alloca) [__hpux]: Always define as __builtin_alloca.
23626
23627 1997-04-23 Richard Stallman <rms@gnu.org>
23628
23629 * bison.simple:
23630 (alloca) [__hpux]: Always define as __builtin_alloca.
23631
23632 1997-04-22 Richard Stallman <rms@gnu.org>
23633
23634 * src/bison.s1:
23635 [__hpux]: Include alloca.h (right for HPUX 10)
23636 instead of declaring alloca (right for HPUX 9).
23637
23638 * src/bison.s1 (__yy_memcpy):
23639 Declare arg `count' as unsigned int.
23640 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23641
23642 1997-04-22 Richard Stallman <rms@gnu.org>
23643
23644 * bison.simple:
23645 [__hpux]: Include alloca.h (right for HPUX 10)
23646 instead of declaring alloca (right for HPUX 9).
23647
23648 * bison.simple (__yy_memcpy):
23649 Declare arg `count' as unsigned int.
23650 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23651
23652 1997-01-03 Richard Stallman <rms@gnu.org>
23653
23654 * src/allocate.c: [__STDC__ or _MSC_VER]:
23655 Declare calloc and realloc to return void *.
23656
23657 1997-01-02 Richard Stallman <rms@gnu.org>
23658
23659 * src/system.h:
23660 [_MSC_VER]: Include stdlib.h and process.h.
23661 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23662
23663 * src/main.c (main): Return FAILURE as a value.
23664 (printable_version): Declare arg as int, not char.
23665
23666 1997-01-02 Richard Stallman <rms@gnu.org>
23667
23668 * Makefile.in (dist):
23669 Explicitly check for symlinks, and copy them.
23670
23671 1996-12-19 Richard Stallman <rms@gnu.org>
23672
23673 * src/files.c:
23674 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23675
23676 1996-12-18 Paul Eggert <eggert@gnu.org>
23677
23678 * src/bison.s1 (yyparse):
23679 If __GNUC__ and YYPARSE_PARAM are both defined,
23680 declare yyparse to have a void * argument.
23681
23682 1996-12-18 Paul Eggert <eggert@gnu.org>
23683
23684 * bison.simple (yyparse):
23685 If __GNUC__ and YYPARSE_PARAM are both defined,
23686 declare yyparse to have a void * argument.
23687
23688 1996-12-17 Richard Stallman <rms@gnu.org>
23689
23690 * src/reduce.c (nbits): Add some casts.
23691
23692 1996-08-12 Richard Stallman <rms@gnu.org>
23693
23694 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23695
23696 1996-08-12 Richard Stallman <rms@gnu.org>
23697
23698 * bison.simple: Test _MSDOS as well as _MSDOS_.
23699
23700 1996-07-31 Richard Stallman <rms@gnu.org>
23701
23702 * src/bison.s1:
23703 [__sun && __i386]: Include alloca.h.
23704
23705 1996-07-31 Richard Stallman <rms@gnu.org>
23706
23707 * bison.simple:
23708 [__sun && __i386]: Include alloca.h.
23709
23710 1996-07-30 Richard Stallman <rms@gnu.org>
23711
23712 * src/bison.s1: Comment change.
23713
23714 * src/bison.s1: Test _MSDOS_, not MSDOS.
23715
23716 1996-07-30 Richard Stallman <rms@gnu.org>
23717
23718 * bison.simple: Comment change.
23719
23720 * bison.simple: Test _MSDOS_, not MSDOS.
23721
23722 1996-06-01 Richard Stallman <rms@gnu.org>
23723
23724 * 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:
23725 Insert `_' macro around many string constants.
23726
23727 * src/main.c:
23728 Insert `_' macro around many string constants.
23729
23730 (main): Call setlocale, bindtextdomain and textdomain.
23731
23732 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23733 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23734 [ENABLE_NLS]: Include libintl.h.
23735 [ENABLE_NLS] (gettext): Define.
23736 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23737 (N_, PACKAGE, LOCALEDIR): New macros.
23738
23739 1996-06-01 Richard Stallman <rms@gnu.org>
23740
23741 * POTFILES.in: New file.
23742
23743 * Makefile.in (allocate.o):
23744 Define target explicitly.
23745
23746 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23747 (LDFLAGS): Set to @LDFLAGS@.
23748 (configure): Run autoconf only if preceding `cd' succeeds.
23749 (bison.s1): Redirect output to temporary file then move the
23750 temporary to the target, rather than redirecting directly to bison.s1.
23751 (clean): Remove config.status and config.log.
23752 (distclean): Don't remove config.status here.
23753
23754 1996-05-12 Richard Stallman <rms@gnu.org>
23755
23756 * src/bison.s1:
23757 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23758
23759 1996-05-12 Richard Stallman <rms@gnu.org>
23760
23761 * bison.simple:
23762 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23763
23764 1996-05-11 Richard Stallman <rms@gnu.org>
23765
23766 * src/bison.s1 (__yy_memcpy):
23767 Really reorder the args, as was supposedly done on Feb 14 1995.
23768 (yyparse): Calls changed accordingly.
23769
23770 1996-05-11 Richard Stallman <rms@gnu.org>
23771
23772 * Makefile.in (dist): Don't use $(srcdir).
23773
23774 * bison.simple (__yy_memcpy):
23775 Really reorder the args, as was supposedly done on Feb 14 1995.
23776 (yyparse): Calls changed accordingly.
23777
23778 1996-01-27 Richard Stallman <rms@gnu.org>
23779
23780 * src/output.c (output_rule_data):
23781 Test YYERROR_VERBOSE in the conditional
23782 around the definition of ttyname.
23783
23784 1995-12-29 Richard Stallman <rms@gnu.org>
23785
23786 * src/bison.s1:
23787 Fix line numbers in #line commands.
23788
23789 1995-12-29 Richard Stallman <rms@gnu.org>
23790
23791 * bison.simple:
23792 Fix line numbers in #line commands.
23793
23794 1995-12-27 Richard Stallman <rms@gnu.org>
23795
23796 * src/bison.s1 (YYPARSE_PARAM_DECL):
23797 In C++, make it always null.
23798 (YYPARSE_PARAM_ARG): New macro.
23799 (yyparse): Use YYPARSE_PARAM_ARG.
23800
23801 1995-12-27 Richard Stallman <rms@gnu.org>
23802
23803 * bison.simple (YYPARSE_PARAM_DECL):
23804 In C++, make it always null.
23805 (YYPARSE_PARAM_ARG): New macro.
23806 (yyparse): Use YYPARSE_PARAM_ARG.
23807
23808 1995-11-29 Richard Stallman <rms@gnu.org>
23809
23810 * doc/bison.texinfo:
23811 Describe literal string tokens, %raw, %no_lines, %token_table.
23812
23813 1995-11-29 Daniel Hagerty <hag@gnu.org>
23814
23815 * doc/bison.texinfo: Fixed update date
23816
23817 1995-10-16 Richard Stallman <rms@gnu.org>
23818
23819 * src/version.c: Version 1.25.
23820
23821 1995-10-16 Richard Stallman <rms@gnu.org>
23822
23823 * NEWS: *** empty log message ***
23824
23825 1995-10-16 Richard Stallman <rms@gnu.org>
23826
23827 * doc/bison.1, doc/bison.rnh:
23828 Add new options.
23829
23830 1995-10-15 Richard Stallman <rms@gnu.org>
23831
23832 * src/vmsgetargs.c, src/getargs.c:
23833 Added -n, -k, and -raw switches.
23834 (noparserflag, toknumflag, rawtoknumflag): New variables.
23835
23836 * src/symtab.h (SALIAS):
23837 New #define for adding aliases to %token.
23838 (struct bucket): Added `alias' field.
23839
23840 * src/reduce.c (reduce_grammar):
23841 Revise error message.
23842 (print_notices): Remove final `.' from error message.
23843
23844 * src/reader.c (reader_output_yylsp):
23845 New function.
23846 (readgram): Use `#if 0' around code that accepted %command
23847 inside grammar rules: The documentation doesn't allow it,
23848 and it will fail since the %command processors scan for the next %.
23849 (parse_token_decl): Extended the %token
23850 declaration to allow a multi-character symbol as an alias.
23851 (parse_thong_decl): New function.
23852 (read_declarations): Added %thong declarations.
23853 (read_declarations): Handle NOOP to deal with allowing
23854 % declarations as another means to specify the flags.
23855 (readgram): Allow %prec prior to semantics embedded in a rule.
23856 (skip_to_char, read_declarations, copy_definition)
23857 (parse_token_decl, parse_start_decl, parse_type_decl)
23858 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23859 (get_type_name, copy_guard, copy_action, readgram)
23860 (get_type, packsymbols): Revised most error messages.
23861 Changed `fatal' to `warnxxx' to avoid aborting for error.
23862 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23863 (read_declarations): Improve the error message for
23864 an invalid character. Do not abort.
23865 (read_declarations, copy_guard, copy_action): Use
23866 printable_version to avoid unprintable characters in printed output.
23867 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23868 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23869 Allow the type of a non-terminal can be given
23870 more than once, as long as all specifications give the same type.
23871
23872 * src/output.c:
23873 (output_headers, output_trailers, output, output_gram)
23874 (output_rule_data): Implement noparserflag variable.
23875 Implement toknumflag variable.
23876 (output): Call reader_output_yylsp to output LTYPESTR.
23877
23878 * src/main.c (main):
23879 If reader sees an error, don't process the grammar.
23880 (fatals): Updated to not use VARARGS1.
23881 (printable_version, int_to_string, warn, warni, warns, warnss)
23882 (warnsss): New error reporting functions. Avoid abort for error.
23883
23884 * src/lex.h:
23885 Added THONG and NOOP for alias processing.
23886 Added SETOPT for the new code that allows setting options with %flags.
23887
23888 * src/lex.c:
23889 Include getopt.h. Add some extern decls.
23890 (safegetc): New function to deal with EOF gracefully.
23891 (literalchar); new function to deal with reading \ escapes.
23892 (lex): Use literalchar.
23893 (lex): Implemented "..." tokens.
23894 (literalchar, lex, parse_percent_token): Made tokenbuffer
23895 always contain the token. This includes growing the token
23896 buffer while reading an integer.
23897 (parse_percent_token): Replaced if-else statement with percent_table.
23898 (parse_percent_token): Added % declarations as another
23899 way to specify the flags -n, -l, and -r. Also added hooks for
23900 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23901 major changes to files.c.
23902 (lex) Retain in the incoming stream a character following
23903 an incorrect '/'.
23904 (skip_white_space, lex): Revised most error messages
23905 and changed fatal to warn to avoid aborting.
23906 (percent_table): Added %thong declarations.
23907
23908 * src/gram.h: Comment changes.
23909
23910 * src/files.c (openfiles, open_extra_files, done):
23911 Add faction flag
23912 and actfile file. Handle noparserflag. Both for -n switch.
23913
23914 * src/conflicts.c (resolve_sr_conflict):
23915 Remove use of alloca.
23916
23917 1995-06-01 Jim Meyering <meyering@gnu.org>
23918
23919 * doc/bison.texinfo: *** empty log message ***
23920
23921 1995-05-06 Richard Stallman <rms@gnu.org>
23922
23923 * src/bison.s1: Comment change.
23924
23925 1995-05-06 Richard Stallman <rms@gnu.org>
23926
23927 * bison.simple: Comment change.
23928
23929 1995-05-03 Richard Stallman <rms@gnu.org>
23930
23931 * src/version.c: Version now 1.24.
23932
23933 * src/bison.s1: Change distribution terms.
23934
23935 * src/version.c: Version now 1.23.
23936
23937 1995-05-03 Richard Stallman <rms@gnu.org>
23938
23939 * doc/bison.texinfo:
23940 Rewrite "Conditions for Using Bison".
23941 Update version to 1.24.
23942
23943 1995-05-03 Richard Stallman <rms@gnu.org>
23944
23945 * bison.simple: Change distribution terms.
23946
23947 1995-02-23 Richard Stallman <rms@gnu.org>
23948
23949 * src/files.c: Test __VMS_POSIX as well as VMS.
23950
23951 1995-02-14 Jim Meyering <meyering@gnu.org>
23952
23953 * src/bison.s1 (__yy_memcpy):
23954 Renamed from __yy_bcopy to avoid
23955 confusion. Reverse FROM and TO arguments to be consistent with
23956 those of memcpy.
23957
23958 1995-02-14 Jim Meyering <meyering@gnu.org>
23959
23960 * bison.simple (__yy_memcpy):
23961 Renamed from __yy_bcopy to avoid
23962 confusion. Reverse FROM and TO arguments to be consistent with
23963 those of memcpy.
23964
23965 1994-11-10 David J. MacKenzie <djm@gnu.org>
23966
23967 * NEWS: reformat
23968
23969 * NEWS: New file.
23970
23971 * Makefile.in (DISTFILES): Include NEWS.
23972
23973 * Makefile.in (DISTFILES):
23974 Include install-sh, not install.sh.
23975
23976 * configure.in: Update to Autoconf v2 macro names.
23977
23978 1994-10-05 David J. MacKenzie <djm@gnu.org>
23979
23980 * Makefile.in: fix typo
23981
23982 * Makefile.in (prefix, exec_prefix):
23983 Let configure set them.
23984
23985 1994-09-28 David J. MacKenzie <djm@gnu.org>
23986
23987 * Makefile.in: Set datadir to $(prefix)/share.
23988
23989 1994-09-15 Richard Stallman <rms@gnu.org>
23990
23991 * src/bison.s1:
23992 Update copyright notice and GPL version.
23993
23994 1994-09-15 Richard Stallman <rms@gnu.org>
23995
23996 * bison.simple:
23997 Update copyright notice and GPL version.
23998
23999 1994-07-12 Richard Stallman <rms@gnu.org>
24000
24001 * src/reduce.c, src/reader.c:
24002 entered into RCS
24003
24004 1994-05-05 David J. MacKenzie <djm@gnu.org>
24005
24006 * Makefile.in: entered into RCS
24007
24008 1994-03-26 Richard Stallman <rms@gnu.org>
24009
24010 * src/bison.s1: entered into RCS
24011
24012 1994-03-26 Richard Stallman <rms@gnu.org>
24013
24014 * bison.simple: entered into RCS
24015
24016 1994-03-25 Richard Stallman <rms@gnu.org>
24017
24018 * src/main.c: entered into RCS
24019
24020 1994-03-24 Richard Stallman <rms@gnu.org>
24021
24022 * src/conflicts.c: entered into RCS
24023
24024 1994-01-02 Richard Stallman <rms@gnu.org>
24025
24026 * Makefile.in: *** empty log message ***
24027
24028 1993-11-21 Richard Stallman <rms@gnu.org>
24029
24030 * src/bison.s1: *** empty log message ***
24031
24032 1993-11-21 Richard Stallman <rms@gnu.org>
24033
24034 * doc/bison.texinfo: entered into RCS
24035
24036 * doc/bison.texinfo: *** empty log message ***
24037
24038 1993-11-21 Richard Stallman <rms@gnu.org>
24039
24040 * bison.simple: *** empty log message ***
24041
24042 1993-10-25 David J. MacKenzie <djm@gnu.org>
24043
24044 * doc/bison.texinfo: *** empty log message ***
24045
24046 1993-10-19 Richard Stallman <rms@gnu.org>
24047
24048 * src/bison.s1: *** empty log message ***
24049
24050 1993-10-19 Richard Stallman <rms@gnu.org>
24051
24052 * bison.simple: *** empty log message ***
24053
24054 1993-10-14 Richard Stallman <rms@gnu.org>
24055
24056 * src/bison.s1: *** empty log message ***
24057
24058 1993-10-14 Richard Stallman <rms@gnu.org>
24059
24060 * bison.simple: *** empty log message ***
24061
24062 1993-09-14 David J. MacKenzie <djm@gnu.org>
24063
24064 * doc/bison.texinfo: *** empty log message ***
24065
24066 1993-09-13 Noah Friedman <friedman@gnu.org>
24067
24068 * Makefile.in: *** empty log message ***
24069
24070 1993-09-10 Richard Stallman <rms@gnu.org>
24071
24072 * src/conflicts.c: *** empty log message ***
24073
24074 * src/system.h: entered into RCS
24075
24076 1993-09-10 Richard Stallman <rms@gnu.org>
24077
24078 * doc/bison.1: entered into RCS
24079
24080 1993-09-06 Noah Friedman <friedman@gnu.org>
24081
24082 * src/version.c: entered into RCS
24083
24084 1993-09-06 Noah Friedman <friedman@gnu.org>
24085
24086 * Makefile.in: *** empty log message ***
24087
24088 1993-07-30 David J. MacKenzie <djm@gnu.org>
24089
24090 * Makefile.in: *** empty log message ***
24091
24092 1993-07-24 Richard Stallman <rms@gnu.org>
24093
24094 * src/bison.s1: *** empty log message ***
24095
24096 1993-07-24 Richard Stallman <rms@gnu.org>
24097
24098 * bison.simple: *** empty log message ***
24099
24100 1993-07-08 David J. MacKenzie <djm@gnu.org>
24101
24102 * Makefile.in: *** empty log message ***
24103
24104 1993-07-04 Richard Stallman <rms@gnu.org>
24105
24106 * src/bison.s1: *** empty log message ***
24107
24108 1993-07-04 Richard Stallman <rms@gnu.org>
24109
24110 * bison.simple: *** empty log message ***
24111
24112 1993-06-26 David J. MacKenzie <djm@gnu.org>
24113
24114 * src/getargs.c: entered into RCS
24115
24116 1993-06-26 David J. MacKenzie <djm@gnu.org>
24117
24118 * doc/bison.texinfo: *** empty log message ***
24119
24120 * doc/bison.1: New file.
24121
24122 1993-06-25 Richard Stallman <rms@gnu.org>
24123
24124 * src/getargs.c: New file.
24125
24126 1993-06-16 Richard Stallman <rms@gnu.org>
24127
24128 * src/bison.s1: *** empty log message ***
24129
24130 1993-06-16 Richard Stallman <rms@gnu.org>
24131
24132 * bison.simple: *** empty log message ***
24133
24134 1993-06-03 Richard Stallman <rms@gnu.org>
24135
24136 * src/bison.s1: New file.
24137
24138 1993-06-03 Richard Stallman <rms@gnu.org>
24139
24140 * doc/bison.texinfo: *** empty log message ***
24141
24142 1993-06-03 Richard Stallman <rms@gnu.org>
24143
24144 * bison.simple: New file.
24145
24146 1993-05-19 Richard Stallman <rms@gnu.org>
24147
24148 * doc/bison.texinfo: New file.
24149
24150 1993-05-07 Noah Friedman <friedman@gnu.org>
24151
24152 * Makefile.in: *** empty log message ***
24153
24154 1993-04-28 Noah Friedman <friedman@gnu.org>
24155
24156 * src/reader.c: *** empty log message ***
24157
24158 1993-04-23 Noah Friedman <friedman@gnu.org>
24159
24160 * src/alloc.h: entered into RCS
24161
24162 1993-04-20 David J. MacKenzie <djm@gnu.org>
24163
24164 * src/version.c: *** empty log message ***
24165
24166 * src/files.c, src/allocate.c:
24167 entered into RCS
24168
24169 * src/reader.c: *** empty log message ***
24170
24171 * src/lex.c: entered into RCS
24172
24173 * src/conflicts.c: New file.
24174
24175 * src/symtab.c: entered into RCS
24176
24177 * src/alloc.h: New file.
24178
24179 * src/LR0.c: entered into RCS
24180
24181 1993-04-18 Noah Friedman <friedman@gnu.org>
24182
24183 * src/reader.c: New file.
24184
24185 * src/version.c: *** empty log message ***
24186
24187 1993-04-18 Noah Friedman <friedman@gnu.org>
24188
24189 * Makefile.in: *** empty log message ***
24190
24191 1993-04-17 Noah Friedman <friedman@gnu.org>
24192
24193 * Makefile.in: *** empty log message ***
24194
24195 1993-04-15 Richard Stallman <rms@gnu.org>
24196
24197 * src/main.c, src/files.c:
24198 New file.
24199
24200 1993-04-15 Noah Friedman <friedman@gnu.org>
24201
24202 * configure.in: entered into RCS
24203
24204 * configure.in: *** empty log message ***
24205
24206 * configure.in: New file.
24207
24208 1993-04-14 Richard Stallman <rms@gnu.org>
24209
24210 * Makefile.in: New file.
24211
24212 1993-04-13 Richard Stallman <rms@gnu.org>
24213
24214 * src/version.c: New file.
24215
24216 1993-03-25 Richard Stallman <rms@gnu.org>
24217
24218 * src/output.c: entered into RCS
24219
24220 1992-09-25 Richard Stallman <rms@gnu.org>
24221
24222 * configure.bat: entered into RCS
24223
24224 1992-06-22 Richard Stallman <rms@gnu.org>
24225
24226 * src/vmsgetargs.c: entered into RCS
24227
24228 1992-06-22 Richard Stallman <rms@gnu.org>
24229
24230 * doc/bison.rnh: entered into RCS
24231
24232 1992-04-20 David J. MacKenzie <djm@gnu.org>
24233
24234 * README: entered into RCS
24235
24236 1992-01-22 Richard Stallman <rms@gnu.org>
24237
24238 * src/machine.h: entered into RCS
24239
24240 1991-12-21 Richard Stallman <rms@gnu.org>
24241
24242 * src/lalr.c, src/closure.c:
24243 entered into RCS
24244
24245 1991-12-20 Richard Stallman <rms@gnu.org>
24246
24247 * src/state.h: entered into RCS
24248
24249 1991-12-18 Richard Stallman <rms@gnu.org>
24250
24251 * src/print.c, src/nullable.c, src/derives.c:
24252 entered into RCS
24253
24254 1991-11-03 David J. MacKenzie <djm@gnu.org>
24255
24256 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24257 entered into RCS
24258
24259 1988-09-09 Richard Stallman <rms@gnu.org>
24260
24261 * src/bison.hairy: entered into RCS
24262
24263 1987-12-16 Richard Stallman <rms@gnu.org>
24264
24265 * REFERENCES: entered into RCS
24266
24267
24268 -----
24269
24270 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24271 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24272 2008, 2009 Free Software Foundation, Inc.
24273
24274 Copying and distribution of this file, with or without
24275 modification, are permitted provided the copyright notice and this
24276 notice are preserved.