]> git.saurik.com Git - bison.git/blob - ChangeLog
Miscellaneous code readability improvements.
[bison.git] / ChangeLog
1 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2
3 Miscellaneous code readability improvements.
4
5 * src/reader.c (reader): Move %define front-end variable
6 defaults and checking into...
7 (prepare_percent_define_front_end_variables): ... this new
8 function.
9
10 * src/scan-gram.l (INITIAL): For consistency with string
11 literals, don't store open quote on character literal. It's
12 discarded before returning anyway.
13 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
14 Make length test more readable, and make the character stored
15 for an empty literal more obvious while consistent with the
16 previous behavior.
17
18 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
19 USER_NUMBER_HAS_STRING_ALIAS throughout.
20 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
21 that is repeated in symtab.h. Improve argument names to make it
22 clear which side of the symbol-string alias pair is which.
23 (symbol_check_alias_consistency): Improve local variable names
24 for the same purpose.
25 * src/symtab.h (struct symbol): Make comments about aliases
26 clearer.
27 (symbol_make_alias): Improve comments and argument name.
28 * src/output.c (token_definitions_output): Update for rename to
29 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
30
31 2009-08-08 Alex Rozenman <rozenman@gmail.com>
32
33 Convert "misleading reference" messages to warnings.
34 * src/scan-code.l: New function 'show_sub_messages', more
35 factoring.
36 * tests/named-ref.at: Adjust tests.
37
38 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
39
40 maint: run "make update-copyright"
41
42 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
43
44 maint: make update-b4-copyright easier to use
45 * build-aux/update-b4-copyright: In warnings, report line
46 numbers rather than character positions.
47 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
48 that update-copyright runs it.
49 * gnulib: Update.
50
51 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
52
53 maint: clean up update-b4-copyright code
54 * build-aux/update-b4-copyright: Do not accept 2-digit
55 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
56 Don't accept a `[' in a b4_copyright argument.
57 Format code more consistently.
58 Don't assume b4*copyright never occurs.
59
60 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
61
62 maint: automate b4_copyright updates.
63 * Makefile.am (update-b4-copyright): New target rule.
64 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
65 * build-aux/update-b4-copyright: New.
66 * data/yacc.c: Remove stray characters around b4_copyright
67 invocations.
68
69 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
70
71 maint: automate annual package-wide copyright-year update.
72 * .x-update-copyright: New.
73 * Makefile.am (EXTRA_DIST): Remove maint.mk.
74 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
75 update-copyright. Remove gnumakefile, which is implied by
76 maintainer-makefile.
77 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
78 * gnulib: Update.
79 * maint.mk: Remove, now copied from gnulib.
80 * examples/extexi: Add missing "(C)" in copyright statement so
81 update-copyright can recognize it.
82 * src/LR0.h: Likewise.
83 * src/print.h: Likewise.
84 * src/print_graph.h: Likewise.
85 * src/gram.c: Add missing comma in copyright statement.
86 * src/gram.h: Likewise.
87
88 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
89
90 Fix "make distcheck".
91 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
92 of just calc.stamp.
93
94 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
95
96 Pacify "gcc -Wunused" for the input function from Flex.
97 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
98 and later.
99 * src/scan-code.l: Add "%option noinput", which I cannot find in
100 the Flex manual, but which Flex has supported since at least as
101 far back as 2.5.4. However, if any of our developers still use
102 Flex 2.5.4, they'll need to stop configuring with
103 --enable-gcc-warnings because "%option noinput" didn't work
104 correctly until Flex 2.5.6.
105 * src/scan-gram.l: Likewise.
106 * src/scan-skel.l: Likewise.
107
108 2009-07-31 Alex Rozenman <rozenman@gmail.com>
109
110 Fix --enable-gcc-warnings problems.
111 * src/reader.c: Adjust variable names.
112 * src/scan-code.l: Fix prototypes and adjust names.
113 * src/named-ref.c: Remove redundant "if".
114
115 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
116
117 Fix a --enable-gcc-warnings problem.
118 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
119 variable.
120
121 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
122
123 Warn about character literals not of length one.
124 * NEWS (2.5): Document.
125 * src/scan-gram.l (INITIAL): Remove comment that we don't check
126 the length.
127 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
128 * tests/input.at (Bad character literals): New test group.
129
130 2009-07-24 Alex Rozenman <rozenman@gmail.com>
131
132 Fix some memory leaks.
133 * src/named-ref.c: Add a pointer check (named_ref_free).
134 * src/scan-code.l: New function (variant_table_free). Called in
135 code_scanner_free.
136 * src/symlist.c: Call to named_ref_free (symbol_list_free).
137
138 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
139
140 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
141
142 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
143
144 Some M4 cleanup in the testsuite.
145 Suggested by Eric Blake at
146 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
147 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
148 complicate the code by distinguishing between a missing value
149 and an empty string value for an optional argument. This fix is
150 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
151 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
152 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
153 arguments are not needed because of the following changes.
154 Fix stale comments.
155 Bison developers should use GNU M4 and should not use
156 POSIXLY_CORRECT when building the test suite, so do not
157 complicate the code by avoiding $10 and above.
158 Do not quote an empty string value for an optional argument, and
159 do not distinguish between a missing value and an empty string
160 value.
161
162 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
163
164 Revert unnecessary column realignment in --help output.
165 Reported by Akim Demaille at
166 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
167 * src/getargs.c (usage): Here.
168
169 2009-07-04 Alex Rozenman <rozenman@gmail.com>
170
171 Alphabetical order in src/local.mk.
172 * src/local.mk: Adjust.
173
174 2009-07-04 Alex Rozenman <rozenman@gmail.com>
175
176 Style changes and factoring.
177 * src/named-ref.h: Add comments.
178 * src/parse-gram.y: Readability and style changes.
179 * src/reader.c: Factoring: assign_named_ref function.
180 * src/scan-code.l: Factoring and style changes. Rename
181 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
182 Use "unsigned" type for variant index. Improve readablity.
183 * src/scan-gram.l: Change error messages and add comments.
184 * src/symlist.h: symbol_list_null: New function decl.
185 * src/symlist.c: symbol_list_null: Implement here.
186 * tests/named-refs.at: Adjust for new error messages.
187
188 2009-06-29 Eric Blake <ebb9@byu.net>
189
190 scan-code: avoid compiler warnings
191 * src/scan-code.l (parse_named_ref): Use correct specifiers.
192
193 2009-06-29 Akim Demaille <demaille@gostai.com>
194
195 build: avoid concurrent extraction of calc++.
196 * examples/calc++/Makefile.am (calc.stamp): New.
197 Depend on it to create the sources of calc++ so that concurrent
198 builds don't launch several "extexi" in parallel.
199 Not only this is inefficient, this also builds incorrect sources
200 with several extractions mixed together.
201
202 2009-06-29 Akim Demaille <demaille@gostai.com>
203
204 parse.error: fix.
205 * data/bison.m4: Move code related to specific variables after the
206 definition of the variable-maintaining macros so that we don't
207 "invoke" b4_percent_define_check_values before it is defined.
208
209 2009-06-29 Akim Demaille <demaille@gostai.com>
210
211 variables: parse.error
212
213 Implement, document, and test the replacement of %error-verbose
214 by %define parse.error "verbose".
215 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
216 values of the parse.error variable.
217 Make "simple" its default value.
218 Check the valid values.
219 * src/parse-gram.y: Use %define parse.error.
220 (PERCENT_ERROR_VERBOSE): New token.
221 Support it.
222 * src/scan-gram.l: Support %error-verbose.
223
224 * doc/bison.texinfo (Decl Summary): Replace the documentation of
225 %define error-verbose by that of %define parse.error.
226 * NEWS: Document it.
227
228 * tests/actions.at, tests/calc.at: Use parse.error instead of
229 %error-verbose.
230
231 2009-06-27 Alex Rozenman <rozenman@gmail.com>
232
233 Implement support for named symbol references.
234 * src/parse-gram.y: Add new syntax (named_ref.opt).
235 * src/reader.c: Store named refs in symbol lists.
236 * src/reader.h: New argument for symbol_append and
237 action_append functions.
238 * src/scan-code.h: Add new field (named_ref) into
239 code_props data structure. Keeps named ref of midrule
240 actions.
241 * src/scan-code.l: Support for named refs in semantic
242 action code. New function 'parse_named_ref'.
243 * src/scan-gram.l: Support bracketed id.
244 * src/symlist.c: Store named refs in symbol lists.
245 * src/symlist.h: New field in symbol list: named_ref.
246 * src/named-ref.h: New file, a struct for named_ref.
247 * src/named-ref.cp: New file, named_ref_new function.
248 * src/local.mk: Add two new files.
249 * tests/testsuite.at: Include new test group:
250 * tests/named-refs.at: this new file.
251
252 2009-06-25 Akim Demaille <demaille@gostai.com>
253
254 hash: check insertion for memory exhaustion.
255 * src/uniqstr.c (uniqstr_new): New.
256
257 2009-06-24 Akim Demaille <demaille@gostai.com>
258
259 variables: rename namespace as api.namespace.
260 Discussed in
261 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
262
263 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
264 New.
265 (b4_percent_define_use): New.
266 Use it where applicable.
267 * data/c++.m4: Replace uses of the variable "namespace" by
268 "api.namespace".
269 Default the latter to the former.
270 * doc/bison.texinfo (Decl Summary): Document "namespace" as
271 obsolete.
272 Document api.namespace.
273 Use @samp to document %define uses, keep @code for identifiers.
274 * NEWS: Likewise.
275 * tests/c++.at, tests/input.at: Test api.namespace instead of
276 namespace. (The tests passed with namespace.)
277
278 2009-06-11 Akim Demaille <demaille@gostai.com>
279
280 style changes.
281 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
282 * src/print-xml.c: Style changes.
283 * tests/conflicts.at: Comment changes.
284
285 2009-06-11 Akim Demaille <demaille@gostai.com>
286
287 xml: beware of user strings used to give a %prec to rules.
288 * tests/conflicts.at (%prec with user strings): New.
289 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
290 XML output.
291
292 2009-06-11 Akim Demaille <demaille@gostai.com>
293
294 hash: check insertion for memory exhaustion.
295 * src/muscle-tab.c (muscle_insert, muscle_grow)
296 * src/state.c (state_hash_insert): Check the return value of
297 hash_insert.
298
299 2009-06-11 Akim Demaille <demaille@gostai.com>
300
301 tests: honor TESTSUITEFLAGS in every check target.
302 * tests/local.mk (RUN_TESTSUITE): New.
303 (check-local, installcheck-local, maintainer-check-g++)
304 (maintainer-check-posix, maintainer-check-valgrind): Use it.
305
306 2009-06-10 Akim Demaille <demaille@gostai.com>
307
308 deterministic test suite.
309 Some consistency checks on symbols are performed after all the
310 symbols were read, by an iteration over the symbol table. This
311 traversal is nondeterministic, which can be a problem for test
312 cases.
313 Avoid this.
314 Addresses another form of nondeterminism reported by Joel E. Denny.
315 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
316
317 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
318 test in two.
319 Use different file names for the three tests to make the
320 maintenance easier.
321
322 2009-06-10 Akim Demaille <demaille@gostai.com>
323
324 gnulib: update.
325 * gnulib: Update to latest.
326 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
327 * m4/.gitignore: Regen.
328 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
329 Call xalloc_die on hash_insert failures.
330 Requested by the new __warn_unused_result__ attribute of
331 hash_insert.
332
333 2009-06-10 Akim Demaille <demaille@gostai.com>
334
335 deterministic user-token-number redeclaration errors.
336 Address nondeterminism reported by Joel E. Denny.
337 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
338
339 * src/uniqstr.h: Comment changes.
340 * src/location.h (boundary_cmp, location_cmp): New.
341 * src/symtab.c (user_token_number_redeclaration): New.
342 (symbol_translation): Use it.
343 * tests/input.at (Numbered tokens): Adjust the expected output.
344
345 2009-05-25 Akim Demaille <demaille@gostai.com>
346
347 build: avoid ignored errors.
348 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
349 errors, they pollute the output.
350
351 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
352
353 Convert multiple variable definition warnings to complaints.
354 * NEWS (2.5): Add a new entry for that change.
355 * doc/bison.texinfo (Decl Summary): Update %define entry.
356 (Bison Options): Update -D/--define/-F/--force-define entry.
357 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
358 * src/muscle-tab.h (muscle_percent_define_insert): Update
359 comments.
360 * tests/input.at (`%define errors'): Update.
361 (`%define, --define, --force-define'): Update.
362
363 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
364
365 -F/--force-define and relative %define/-D/--define priorities.
366 * NEWS (2.5): Add documentation to -D/--define entry.
367 * build-aux/cross-options.pl: Hard-code association of
368 --force-define with %define.
369 * doc/bison.texinfo (Decl Summary): In %define entry,
370 cross-reference command-line options.
371 (Bison Options): Add documentation to -D/--define entry.
372 (Option Cross Key): Widen column for --force-define row.
373 * src/getargs.c (usage): Document -F/--force-define. Realign
374 options in output.
375 (short_options, long_options, getargs): Parse -F/--force-define,
376 and update muscle_percent_define_insert invocations.
377 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
378 (muscle_percent_define_insert): Add argument with that type.
379 * src/muscle-tab.c (muscle_percent_define_insert): Implement
380 -F/--force-define behavior and priorities.
381 (muscle_percent_define_ensure): Update
382 muscle_percent_define_insert invocation.
383 * src/parse-gram.y (prologue_declaration): Update
384 muscle_percent_define_insert invocations.
385 * tests/input.at (`%define, --define'): Rename to...
386 (`%define, --define, --force-define'): ... this and extend.
387
388 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
389
390 Update some comments to make sense for -D.
391 * data/bison.m4 (b4_check_user_names): In header comments, say
392 "user occurrence" instead of "grammar occurrence".
393 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
394 (muscle_percent_code_grow): Likewise just for consistency.
395
396 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
397
398 * data/c++.m4 (b4_namespace_close): Simplify slightly.
399
400 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
401
402 Handle a trailing `:' in a user-supplied C++ namespace better.
403 * data/c++.m4 (b4_namespace_close): Don't let it be printed
404 among the closing braces here. This fix might make the
405 generated code easier to debug, but otherwise it should be
406 insignificant because a trailing `:' is a C++ error already.
407
408 2009-05-19 Akim Demaille <demaille@gostai.com>
409
410 remove useless variable.
411 * src/getargs.c (skeleton_arg): Remove now useless variable.
412 Should help the compiler see that this printf-like call is sane.
413
414 2009-05-15 Akim Demaille <demaille@gostai.com>
415
416 Rename token.prefix as api.tokens.prefix.
417 Discussed here.
418 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
419
420 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
421 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
422 (token.prefix): Rename as...
423 (api.tokens.prefix): this.
424
425 2009-05-11 Akim Demaille <demaille@gostai.com>
426
427 doc: use C++ headers.
428 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
429 headers.
430
431 2009-05-11 Akim Demaille <demaille@gostai.com>
432
433 doc: token.prefix
434 * doc/bison.simple (Decl Summary): Document token.prefix.
435 (Calc++ Parser): Various fixes.
436 Formatting changes.
437 Use token.prefix.
438 Introduce a macro TOKEN to shorten the code and make it more
439 readable.
440 (Calc++ Scanner): Adjust.
441 * NEWS (Variable token.prefix): New.
442
443 2009-05-04 Akim Demaille <demaille@gostai.com>
444
445 bison: catch bad symbol names.
446 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
447 * tests/input.at: Adjust.
448
449 2009-05-04 Akim Demaille <demaille@gostai.com>
450
451 identifiers: dashes are letters.
452 Dashes can now start identifiers (symbols and directives).
453
454 * src/scan-gram.l ({letter}): Add dash.
455 ({id}): Remove it.
456 * tests/input.at (Symbols): Adjust.
457 Remove stray comment.
458 * tests/regression.at (Invalid inputs): Adjust error message.
459 * doc/bison.texinfo (Symbols): Update.
460
461 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
462
463 Declare %code to be a permanent feature.
464 * NEWS (2.4.2): Here.
465 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
466 experimental.
467 (Decl Summary): Likewise.
468
469 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
470
471 Convert underscores to dashes in some %define variable names.
472 For now, just api.push-pull and lr.keep-unreachable-states.
473 Maintain old names for backward compatibility.
474 * NEWS (2.5): Document.
475 * data/c.m4 (b4_identification): Update comment.
476 * data/yacc.c: Update access.
477 * doc/bison.texinfo: Update.
478 * etc/bench.pl.in (bench_push_parser): Update use.
479 * src/files.c (tr): Move to...
480 * src/getargs.c, src/getargs.h (tr): ... here because I can't
481 think of a better place to expose it. My logic is that, for all
482 uses of tr so far, command-line arguments can be involved, and
483 getargs.h is already included.
484 * src/main.c (main): Update access.
485 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
486 variable names to new variable names before assigning value.
487 * src/reader.c (reader): Update setting default.
488 * tests/calc.at: Update uses.
489 * tests/conflicts.at (Unreachable States After Conflict
490 Resolution): Update use.
491 * tests/input.at (%define enum variables): Update use.
492 (%define backward compatibility): New test group.
493 * tests/push.at: Update uses.
494 * tests/reduce.at: Update uses.
495 * tests/torture.at: Update uses.
496
497 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
498
499 Set all front-end %define defaults in one place.
500 * src/main.c (main): Move lr.keep_unreachable_states default...
501 * src/reader.c (reader): ... to here.
502
503 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
504
505 Rename lr.default_reductions to lr.default-reductions.
506 * NEWS (2.5): Here.
507 * doc/bison.texinfo: Here.
508 * src/lalr.c (initialize_LA): Here.
509 * src/print.c (print_reductions): Here.
510 * src/reader.c (reader): Here.
511 * src/tables.c (action_row): Here.
512 * tests/input.at (%define enum variables): Here.
513 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
514
515 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
516
517 Pacify ./configure --enable-gcc-warnings.
518 * tests/input.at (Symbols): Prototype yyerror and yylex.
519
520 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
521
522 Document how `%define "var" "value"' is not M4-friendly.
523 * src/parse-gram.y (variable): In comments here.
524
525 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
526
527 Clean up recent patches a little.
528 Reported by Akim Demaille.
529 * doc/bison.texinfo (Understanding): Fix typos.
530 * src/print.c (print_reductions): Don't use negated variable.
531
532 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
533
534 List accepted values for a %define enum variable with an invalid value.
535 Suggested by Akim Demaille at
536 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
537 * data/bison.m4 (_b4_percent_define_check_values): Implement.
538 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
539 * tests/input.at (%define lr.default_reductions invalid values): Merge
540 into...
541 (%define enum variables): ... here, and update output.
542
543 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
544
545 Rename "default rule" to "default reduction".
546 This includes changing variable names in code, changing
547 comments, and renaming %define lr.default_rules to %define
548 lr.default_reductions.
549 * NEWS (2.5): Update IELR documentation.
550 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
551 documentation.
552 * data/glr.c, data/lalr1.java: Sync copyright dates.
553 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
554 and lr.type documentation. Make some other wording
555 improvements.
556 (Glossary): Adjust cross-references and Default Reduction
557 definition.
558 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
559 Remove a confusing comment pointed out by Akim Demaille.
560 (initialize_LA): Adjust code.
561 * src/print-xml.c (print_reductions): Adjust code.
562 * src/print.c (print_reductions): Adjust code.
563 * src/reader.c (reader): Adjust code.
564 * src/tables.c (action_row): Adjust code.
565 (token_actions): Adjust code.
566 * src/tables.h: Adjust YYDEFACT documentation.
567 * tests/input.at (%define lr.default_rules invalid values):
568 Rename test group to...
569 (%define lr.default_reductions invalid values): ... this, and
570 update grammar file and expected output.
571 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
572 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
573
574 2009-04-21 Akim Demaille <demaille@gostai.com>
575
576 tests: check the use of dashes and periods in symbols.
577 * tests/input.at (Symbol): New test group.
578
579 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
580
581 Document %define lr.type and lr.default_rules.
582 * NEWS (2.5): Add an entry.
583 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
584 besides just LALR(1) and GLR(1).
585 * doc/bison.texinfo (Introduction): Likewise.
586 (Language and Grammar): Bison is no longer limited to LALR(1)
587 restrictions.
588 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
589 when trying to distinguish from GLR. Talk about LR(1) grammars
590 rather than LALR(1) grammars.
591 (Decl Summary): In %define api.push_pull entry, say it applies
592 to deterministic parsers in C rather than LALR(1) parsers in C.
593 Add lr.default_rules entry.
594 Add lr.type entry.
595 (Mystery Conflicts): Bison is no longer limited to LALR(1)
596 restrictions.
597 (Generalized LR Parsing): Same changes as for the previous GLR
598 section.
599 (Memory Management): Say deterministic rather than LALR(1).
600 (Understanding): Correct some bison output.
601 Index discussion of "accepting state".
602 Say deterministic rather than LALR(1).
603 (Bison Options): In --yacc entry, say deterministic rather than
604 LALR(1).
605 In --report, --graph, and --xml entries, just don't mention
606 LALR(1).
607 (C++ Parsers): Say deterministic rather than LALR(1).
608 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
609 (Glossary): Add Accepting State, Consistent State, Default Rule,
610 and IELR(1) definitions.
611 In Generalized LR (GLR) definition, make same changes as in
612 previous GLR sections.
613 In LALR(1) definition, say Bison uses LALR(1) by default rather
614 than implying Bison is limited to LALR(1).
615 (LocalWords): Add IELR.
616
617 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
618
619 Finish implementing %define lr.type.
620 Its value can be "LALR", "IELR", or "canonical LR".
621 * lib/timevar.def (TV_IELR_PHASE1): New var.
622 (TV_IELR_PHASE2): New var.
623 (TV_IELR_PHASE3): New var.
624 (TV_IELR_PHASE4): New var.
625 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
626 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
627 Sbitset.h, ielr.h, and ielr.c.
628 * src/getargs.h, src/getargs.c (enum trace, trace_args,
629 trace_types): Add trace_ielr.
630 * src/lalr.h, src/lalr.c (ngotos): Export it.
631 (F): Rename to...
632 (goto_follows): ... this, update all uses, and export it.
633 (set_goto_map): Export it.
634 (map_goto): Export it.
635 (compute_lookahead_tokens): Don't free goto_follows yet. Now
636 handled in ielr.
637 (initialize_LA): Export it. Move lookback allocation to...
638 (lalr): ... here because, for canonical LR, initialize_LA must
639 be invoked but lookback and much of the rest of LALR isn't
640 needed.
641 * main.c (main): Instead of lalr, invoke ielr, which invokes
642 lalr.
643 * src/reader.c (reader): Default lr.type to "LALR".
644 Default lr.default_rules to "accepting" if lr.type is "canonical
645 LR". Leave the default as "all" otherwise.
646 Check for a valid lr.type value.
647 * src/state.h, src/state.c (struct state_list): Add state_list
648 member.
649 (state_new): Initialize state_list member to NULL.
650 (state_new_isocore): New function, exported.
651 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
652 exercises all values of lr.type.
653 (GNU AWK Grammar): Rename test group to...
654 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
655 AT_TEST_EXISTING_GRAMMAR.
656 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
657 (GNU pic Grammar): Rename test group to...
658 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
659 AT_TEST_EXISTING_GRAMMAR.
660 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
661 all values of lr.type.
662 (Single State Split): New test groups using AT_TEST_LR_TYPE.
663 (Lane Split): Likewise.
664 (Complex Lane Split): Likewise.
665 (Split During Added Lookahead Propagation): Likewise.
666
667 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
668
669 Add new files for IELR and canonical LR implementation.
670 * src/AnnotationList.c: New.
671 * src/AnnotationList.h: New.
672 * src/InadequacyList.c: New.
673 * src/InadequacyList.h: New.
674 * src/Sbitset.c: New.
675 * src/Sbitset.h: New.
676 * src/ielr.c: New.
677 * src/ielr.h: New.
678
679 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
680
681 Implement %define lr.default_rules.
682 Its value describes the states that are permitted to contain
683 default rules: "all", "consistent", or "accepting".
684 * src/reader.c (reader): Default lr.default_rules to "all".
685 Check for a valid lr.default_rules value.
686 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
687 is "accepting", then only mark the accepting state as
688 consistent.
689 (initialize_LA): Tell state_lookahead_tokens_count whether
690 lr.default_rules is "accepting".
691 * src/tables.c (action_row): If lr.default_rules is not "all",
692 then disable default rules in inconsistent states.
693 * src/print.c (print_reductions): Use this opportunity to
694 perform some assertions about whether lr.default_rules was
695 obeyed correctly.
696 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
697 helps with checking the parser tables for a grammar.
698 * tests/input.at (%define lr.default_rules invalid values): New
699 test group.
700 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
701 AT_TEST_TABLES_AND_PARSE.
702 (`no %define lr.default_rules'): New test group generated by
703 AT_TEST_LR_DEFAULT_RULES.
704 (`%define lr.default_rules "all"'): Likewise.
705 (`%define lr.default_rules "consistent"'): Likewise.
706 (`%define lr.default_rules "accepting"'): Likewise.
707
708 2009-04-20 Akim Demaille <demaille@gostai.com>
709
710 Formatting change.
711
712 2009-04-20 Akim Demaille <demaille@gostai.com>
713
714 bison: factoring.
715 * src/output.c (token_definitions_output): Use symbol_id_get
716 instead of duplicating its logic.
717 * TODO (YYERRCODE): Extend.
718
719 2009-04-20 Akim Demaille <demaille@gostai.com>
720
721 variables: prefer error-verbose to error_verbose.
722 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
723 instead of error_verbose.
724 * src/scan-gram.l (%error-verbose): Map to the error-verbose
725 variable.
726 * doc/bison.texinfo: Promote %define error-verbose instead of
727 %error-verbose.
728 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
729
730 2009-04-15 Akim Demaille <demaille@gostai.com>
731
732 variables: accept dashes.
733 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
734 underscores.
735 * src/scan-gram.l ({id}): Also accept dashes after the initial
736 letter.
737 ({directive}): Use {id}.
738 * src/parse-gram.y: Comment and formatting changes.
739 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
740 symbols.
741 * src/complain.h, src/complain.c (yacc_at): New.
742 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
743 symbol names.
744 * src/output.c (token_definitions_output): Do not #define token
745 names with dashes.
746
747 2009-04-20 Akim Demaille <demaille@gostai.com>
748
749 Consistently refer to Yacc, not YACC.
750 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
751
752 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
753
754 Pacify make maintainer-check-posix.
755 * tests/input.at (%define, --define): Move bison command-line
756 options before grammar file name.
757
758 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
759
760 Document semicolon warnings.
761 * NEWS (2.5): Here.
762
763 2009-04-14 Akim Demaille <demaille@gostai.com>
764
765 variables: use `parse.assert' instead of `assert'.
766 * TODO (assert): Remove.
767 * data/bison.m4 (b4_assert_if): Replace with...
768 (b4_parse_assert_if): this.
769 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
770 * doc/bison.texinfo (Decl Summary): Document parse.assert.
771
772 2009-04-14 Akim Demaille <demaille@gostai.com>
773
774 variables: use `parse.trace' instead of `debug'.
775 * src/getargs.c (getargs): Map -t to %define trace.parse.
776 * src/scan-gram.l (%debug): Map to %define trace.parse.
777 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
778 names to `_' in macro names.
779 (b4_debug_if): Replace with...
780 (b4_parse_trace_if): this.
781 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
782 * data/yacc.c: Adjust.
783 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
784 Use @code to label the variable list.
785 Document the variable parse.trace.
786 (Tracing): Promote the parse.trace variable.
787 * TODO: %printer is not documented.
788
789 2009-04-14 Akim Demaille <demaille@gostai.com>
790
791 doc: minor fixes.
792 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
793 (Table of Symbols): Remove duplicate entry for %debug.
794
795 2009-04-10 Eric Blake <ebb9@byu.net>
796
797 submodules: update to latest
798 * submodules/autoconf: Use latest upstream Autoconf.
799
800 2009-04-06 Eric Blake <ebb9@byu.net>
801
802 Work around autoconf 2.63b bug in testsuite.
803 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
804 autoconf bug related to # in test.
805
806 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
807
808 * NEWS (2.5): New section. Describe new -D/--define feature.
809
810 2009-04-06 Akim Demaille <demaille@gostai.com>
811
812 Regen.
813 * src/parse-gram.h, src/parse-gram.c: Regen.
814
815 2009-04-06 Akim Demaille <demaille@gostai.com>
816
817 rename muscle_tab.* as muscle-tab.* for consistency.
818 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
819 * src/muscle-tab.h, src/muscle-tab.c: these.
820 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
821 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
822
823 2009-04-06 Akim Demaille <demaille@gostai.com>
824
825 Makefile: introduce $(BISON).
826 * src/local.mk (BISON): New.
827 (YACC): Use it.
828
829 2009-04-06 Akim Demaille <demaille@gostai.com>
830
831 parser: handle %locations as %define locations.
832 * src/getargs.h, src/getargs.c (locations_flag): Remove.
833 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
834 to set "locations" to true.
835 * src/output.c (prepare): Don't output "locations".
836 * src/scan-gram.l (%locations): Handle it as a %<flag>.
837 * src/parse-gram.y: It's no longer a token.
838 Don't handle it.
839 * data/bison.m4 (b4_locations_if): Define it with
840 b4_percent_define_if_define.
841 * data/c.m4, data/glr.cc: Adjust.
842
843 2009-04-06 Akim Demaille <demaille@gostai.com>
844
845 Regen.
846 * src/parse-gram.c: Regen.
847
848 2009-04-06 Akim Demaille <demaille@gostai.com>
849
850 muscle: factor the handling of obsolete of obsolete directives.
851 Suggested by Joel E. Denny.
852
853 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
854 New, extracted from...
855 * src/parse-gram.y (prologue_declaration: pure-parser): here.
856 Remove it.
857 (prologue_declaration: "%<flag>"): Use
858 muscle_percent_define_ensure.
859 (%error-verbose, %pure-parser): No longer tokens.
860 * src/scan-gram.l (pure-parser): Return as a %<flag>.
861
862 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
863
864 Fix options documentation.
865 * build-aux/cross-options.pl: As in --help output, write optional
866 arguments as [=ARG] not =[ARG].
867 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
868
869 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
870
871 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
872 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
873 requirements for a correct m4 are stricter.
874 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
875 * configure.ac: Update to use AC_PROG_GNU_M4.
876 Reported by Eric Blake.
877
878 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
879
880 Help with updating web manual.
881 * HACKING: Incorporate instructions from gnulib/doc/README.
882 * bootstrap.conf (gnulib_modules): Add gendocs.
883
884 2009-04-03 Akim Demaille <demaille@gostai.com>
885
886 Regen.
887 * src/parse-gram.h, src/parse-gram.c: Regen.
888
889 2009-04-03 Akim Demaille <demaille@gostai.com>
890
891 Factor %FLAG at scan level.
892 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
893 definitions and associated rules, replaced by....
894 (PERCENT_FLAG): this new token type, and rule.
895 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
896 Use it for %debug and %error-verbose.
897
898 2009-04-03 Akim Demaille <demaille@gostai.com>
899
900 Regen.
901 * src/parse-gram.h, src/parse-gram.c: Regen.
902
903 2009-04-03 Akim Demaille <demaille@gostai.com>
904
905 Treat %debug as %define debug.
906 * data/bison.m4 (b4_debug_if): New.
907 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
908 * data/lalr1.java: Use it instead of b4_debug_flag.
909 * src/getargs.h, src/getargs.c (debug_flag): Remove.
910 * src/output.c (prepare): Don't output it.
911 * src/parse-gram.y: Treat %debug as %define debug.
912
913 2009-04-03 Akim Demaille <demaille@gostai.com>
914
915 Treat %error-verbose as %define error_verbose.
916 This allows to pass -Derror_verbose on the command line. Better
917 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
918 ERROR_VERBOSE being defined as false or true.
919 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
920 on b4_percent_define_ifdef, for does not check the defined value,
921 but only whether the symbol is defined, rely on
922 b4_percent_define_flag_if, so that a value of "false" is processed
923 as a false.
924 If not defined, define the flag to "false".
925 (b4_error_verbose_if): New.
926 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
927 b4_error_verbose_flag.
928 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
929 * src/output.c (prepare): Don't output it.
930 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
931
932 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
933
934 Fix strange %define locations for default values.
935 Reported by Akim Demaille at
936 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
937 and discussed again starting at
938 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
939 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
940 because location information is bogus.
941 Use angle brackets to delimit fake file name because square brackets
942 look like underexpanded m4. Choose a better fake file name.
943 Use negative line numbers.
944 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
945 * src/location.c (location_print): If line for a boundary is negative,
946 only print that boundary's file name.
947 * src/location.h: Document that.
948 * tests/skeletons.at (%define Boolean variables: invalid skeleton
949 defaults): Update output.
950
951 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
952
953 Pacify ./configure --enable-gcc-warnings.
954 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
955 in lib won't compile with it.
956 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
957
958 2009-03-31 Akim Demaille <demaille@gostai.com>
959
960 bootstrap: --help to stdout.
961 * bootstrap (usage): Don't send --help to stderr.
962 Use a here doc instead of a long string.
963
964 2009-03-31 Akim Demaille <demaille@gostai.com>
965
966 bootstrap: README-hacking no longer exists
967 * bootstrap (checkout_only_file): Set to HACKING.
968
969 2009-03-26 Akim Demaille <demaille@gostai.com>
970
971 doc: merge HACKING and README-hacking.
972 Two files is confusing.
973 Reported by Alexandre Duret-Lutz.
974
975 * README-hacking: Merge into...
976 * HACKING (Working from the repository): here.
977
978 2009-03-26 Akim Demaille <demaille@gostai.com>
979
980 doc: update README-hacking.
981 * README-hacking: We now use git and git submodules.
982 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
983
984 2009-03-26 Akim Demaille <demaille@gostai.com>
985
986 lalr1.cc: avoid GCC 4.3 warnings.
987 GCC 4.3 now warns about "a || b && c" and asks for explicit
988 parentheses.
989 Reported by Alexandre Duret-Lutz.
990 * data/location.cc: Update copyright years.
991 (Position::operator==): Use parens to make precedence explicit.
992 Compare lines and columns first, as they are more likely to be
993 different, and they are faster to compare.
994
995 2009-03-26 Akim Demaille <demaille@gostai.com>
996
997 gnulib: update.
998 * gnulib: Update to latest.
999 * src/local.mk (AM_CFLAGS): Move to...
1000 * Makefile.am: here.
1001 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1002 AM_CFLAGS.
1003
1004 2009-03-02 Akim Demaille <demaille@gostai.com>
1005
1006 Comment changes.
1007
1008 2009-03-02 Akim Demaille <demaille@gostai.com>
1009
1010 Share b4_yytranslate_define.
1011 * data/lalr1.cc (b4_yytranslate_define): Move to...
1012 * data/c++.m4: here.
1013
1014 2009-03-02 Akim Demaille <demaille@gostai.com>
1015
1016 Use locations in the variant example.
1017 Yes, this obfuscates the point of this example, variants only.
1018 But glr.cc cannot work (yet?) without locations. This change
1019 makes it easier to use this example with glr.cc.
1020
1021 * examples/variant.yy (assert): %define it.
1022 (locations): Request them.
1023 (yylex): Bind the location to the stage.
1024
1025 2009-03-02 Akim Demaille <demaille@gostai.com>
1026
1027 Dub make_TOKEN as a public type interface.
1028 * data/c++.m4 (b4_symbol_constructor_declare)
1029 (b4_symbol_constructor_define): New empty stubs.
1030 (b4_public_types_declare, b4_public_types_define): Use them.
1031 * data/lalr1.cc (b4_symbol_constructor_declare)
1032 (b4_symbol_constructor_declare_)
1033 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1034 Move to...
1035 * data/variant.hh: here.
1036 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1037 needed.
1038 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1039 b4_symbol_constructor_declare, as it is now done by
1040 b4_public_types_define and b4_public_types_declare.
1041
1042 2009-03-02 Akim Demaille <demaille@gostai.com>
1043
1044 Coding style changes.
1045 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1046 (b4_symbol_constructor_declarations)
1047 (b4_symbol_constructor_definition_)
1048 (b4_symbol_constructor_definitions)
1049 (b4_yytranslate_definition): Rename as...
1050 (b4_symbol_constructor_declare_)
1051 (b4_symbol_constructor_declare)
1052 (b4_symbol_constructor_define_)
1053 (b4_symbol_constructor_define)
1054 (b4_yytranslate_define): these.
1055 * data/variant.hh (b4_variant_definition): Rename as...
1056 (b4_variant_define): this.
1057
1058 2009-03-02 Akim Demaille <demaille@gostai.com>
1059
1060 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1061 * data/bison.m4 (b4_percent_define_if_define): New.
1062 * data/c++.m4 (b4_variant_if): Move to...
1063 * data/bison.m4: Here, using b4_percent_define_if_define.
1064 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1065 * data/bison.m4: Here, using b4_percent_define_if_define.
1066
1067 2009-03-02 Akim Demaille <demaille@gostai.com>
1068
1069 Dub symbol_type_base as a public type.
1070 * data/c++.m4 (b4_public_types_declare): Now define
1071 symbol_type_base and symbol_type.
1072 (b4_public_types_define): New.
1073 In both cases, the definitions are taken verbatim from lalr1.cc.
1074 * data/lalr1.cc: Adjust.
1075
1076 2009-03-02 Akim Demaille <demaille@gostai.com>
1077
1078 b4_public_types_declare.
1079 * data/c++.m4 (b4_public_types_declare): New.
1080 * data/glr.cc, data/lalr1.cc: Use it.
1081
1082 2009-03-02 Akim Demaille <demaille@gostai.com>
1083
1084 b4_semantic_type_declare.
1085 * data/c++.m4 (b4_semantic_type_declare): New.
1086 Factors and generalizes what was in glr.cc and lalr1.cc.
1087 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1088 variants.
1089 * data/lalr1.cc, data/glr.cc: Use it.
1090
1091 2009-02-26 Akim Demaille <demaille@gostai.com>
1092
1093 Upgrade gnulib.
1094 * gnulib: Upgrade from master.
1095 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1096 Regen.
1097
1098 2009-02-25 Akim Demaille <demaille@gostai.com>
1099
1100 Remove useless arguments.
1101 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1102 relevant.
1103
1104 2009-02-25 Akim Demaille <demaille@gostai.com>
1105
1106 Comment changes.
1107 * data/lalr1.cc: here.
1108
1109 2009-02-25 Akim Demaille <demaille@gostai.com>
1110
1111 Fix glr.cc's debug level handling.
1112 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1113 glr.c which is used.
1114 (debug_level, set_debug_level): Adjust.
1115
1116 2009-02-25 Akim Demaille <demaille@gostai.com>
1117
1118 Copyright years.
1119 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1120
1121 2009-02-25 Akim Demaille <demaille@gostai.com>
1122
1123 Style changes.
1124 * etc/bench.pl.in (generate_grammar_list): Consitently use
1125 location_type, not yy::location.
1126
1127 2009-02-25 Akim Demaille <demaille@gostai.com>
1128
1129 Comment change.
1130 * data/lalr1.cc: here.
1131
1132 2009-02-19 Akim Demaille <demaille@gostai.com>
1133
1134 Make yyparser::error public.
1135 * data/lalr1.cc: here.
1136 There is no good reason to keep it private (and it is convenient
1137 to use it from the scanner for instance). It is already public in
1138 glr.cc.
1139
1140 2009-02-19 Akim Demaille <demaille@gostai.com>
1141
1142 Comment changes.
1143 * data/glr.cc: here.
1144
1145 2009-02-19 Akim Demaille <demaille@gostai.com>
1146
1147 Remove trailing blanks.
1148 The epilogue has its own ending \n, no need to add another.
1149
1150 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1151 epilogue.
1152 * data/glr.cc: dnl when extending the epilogue.
1153 Remove stray "private:".
1154
1155 2009-02-19 Akim Demaille <demaille@gostai.com>
1156
1157 Use b4_c_modern.
1158 * data/c.m4 (b4_c_function_decl): Here.
1159
1160 2009-02-19 Akim Demaille <demaille@gostai.com>
1161
1162 Comment changes.
1163 * data/lalr1.cc: here.
1164
1165 2009-02-19 Akim Demaille <demaille@gostai.com>
1166
1167 Extract variant.hh
1168 * data/variant.hh: New, extracted from...
1169 * data/lalr1.cc: here.
1170 Adjust.
1171 * data/local.mk: Adjust.
1172
1173 2009-02-19 Akim Demaille <demaille@gostai.com>
1174
1175 Extract stack.hh from lalr1.cc.
1176 * data/stack.hh: New.
1177 * data/lalr1.cc: Extract from here.
1178 * data/local.mk: Adjust.
1179
1180 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1181
1182 Add reminder about uploading public key to keys.gnupg.net.
1183 * HACKING (Release Procedure): Here.
1184
1185 2009-01-28 Akim Demaille <demaille@gostai.com>
1186
1187 * NEWS: Update information about 2.4.1 and 2.4.2.
1188
1189 2008-11-04 Akim Demaille <demaille@gostai.com>
1190
1191 Reformat NEWS.
1192 * NEWS: Use more outline-mode markup.
1193 Suggested by Jim Meyering.
1194
1195 2009-01-08 Akim Demaille <demaille@gostai.com>
1196
1197 Fix grep portability issues.
1198 Grep on Solaris does not support -q.
1199 Reported by Summum Bonum.
1200
1201 * NEWS: Add a stub for 2.4.2.
1202 * THANKS: Add Summum Bonum.
1203 * tests/atlocal.in (EGREP): New.
1204 (CC, CXX, XSLTPROC): Make it possible to override them via
1205 envvars.
1206 * tests/java.at: Use $EGREP instead of egrep.
1207 Use AT_CHECK's ignore instead of grep's -q.
1208
1209 2008-12-11 Akim Demaille <demaille@gostai.com>
1210
1211 Pass the token type to yysyntax_error.
1212 * data/yacc.c (yysyntax_error): Take the transated token instead
1213 of the raw number.
1214 Adjust callers.
1215 * TODO: Update.
1216
1217 2008-12-11 Akim Demaille <demaille@gostai.com>
1218
1219 Formatting changes.
1220 * data/glr.c: Formatting changes.
1221
1222 2008-12-11 Akim Demaille <demaille@gostai.com>
1223
1224 Propagate i18n changes into glr.c.
1225 * TODO: Update.
1226 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1227 building the error message format dynamically.
1228 * data/lalr1.java: Formatting changes.
1229
1230 2008-12-11 Akim Demaille <demaille@gostai.com>
1231
1232 Use testsuite -C.
1233 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1234 Solves problems when top_srcdir is an absolute path.
1235 Suggested by Eric Blake.
1236 * configure.ac: Require Autoconf 2.62.
1237
1238 2008-12-11 Akim Demaille <demaille@gostai.com>
1239
1240 Simplify the i18n of the error messages.
1241 * data/lalr1.cc: Comment changes.
1242 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1243 lalr1.cc instead of building dynamically the format string.
1244
1245 2008-12-08 Akim Demaille <demaille@gostai.com>
1246
1247 Fix portability issue in the test suite.
1248 * tests/local.at (AT_MATCHES_CHECK): New.
1249 Based on Perl instead of Sed. Sed has too many portability
1250 pitfalls, not ever Sed is GNU Sed.
1251 * tests/actions.at (Fix user actions without a trailing semicolon):
1252 Use it.
1253
1254 2008-12-08 Akim Demaille <demaille@gostai.com>
1255
1256 Update data/README.
1257 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1258
1259 2008-12-08 Akim Demaille <demaille@gostai.com>
1260
1261 Install autoconf as a submodule to get m4sugar.
1262 * .gitmodules: Add submodules/autoconf.
1263 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1264 submodules/autoconf.
1265
1266 2008-12-08 Akim Demaille <demaille@gostai.com>
1267
1268 Test token.prefix in all the skeletons.
1269 * data/java.m4 (b4_token_enum): Use the token.prefix.
1270 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1271 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1272 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1273 * tests/java.at: Comment changes.
1274 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1275 (Java parser class and package names): Add token.prefix check.
1276
1277 2008-12-08 Akim Demaille <demaille@gostai.com>
1278
1279 Fix regeneration of atconfig.
1280 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1281 remove it: now that there is no tests/Makefile.am, the top-level
1282 Makefile properly updates atconfig when needed.
1283
1284 2008-12-07 Di-an Jan <dianj@freeshell.org>
1285
1286 Implement the FIXME that ends an user action with a semicolon
1287 if it seems necessary.
1288 * src/scan-code.l (flex rules section): Flag cpp directive from
1289 any `#' to the first unescaped end-of-line. Semicolon is not
1290 needed after `;', `{', '}', or cpp directives and is needed after
1291 any other token (whitespaces and comments have no effect).
1292 * tests/actions.at (Fix user actions without a trailing semicolon):
1293 New test.
1294 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1295 to make user actions complete statements.
1296 Adjust column numbers in error messages.
1297 * tests/regression.at (Fix user actions without a trailing semicolon):
1298 Remove. Covered by new test.
1299
1300 2008-12-07 Akim Demaille <demaille@gostai.com>
1301
1302 Update gnulib.
1303 * gnulib: Update from master.
1304
1305 2008-12-05 Eric Blake <ebb9@byu.net>
1306
1307 Avoid compiler warning.
1308 * src/output.c (muscle_insert_item_number_table): Delete unused
1309 function.
1310
1311 2008-12-02 Eric Blake <ebb9@byu.net>
1312
1313 Build testsuite with newer autoconf.
1314 * tests/output.at (m4_expand): Don't override in newer autoconf,
1315 where the underlying implementation changed.
1316 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1317 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1318 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1319 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1320 since some of them contain unbalanced ')'.
1321
1322 2008-12-01 Akim Demaille <demaille@gostai.com>
1323
1324 Use b4_symbol for printers and destructors everywhere.
1325 * data/bison.m4 (b4_symbol_action_location): New.
1326 * data/c.m4 (b4_symbol_actions): Remove.
1327 Adjust all callers to use by b4_symbol_foreach and the corresponding
1328 b4_symbol_printer/destructor macro.
1329 * data/glr.cc: Adjust.
1330 * data/lalr1.java: Adjust the %destructor sanity check.
1331 * src/output.c (symbol_code_props_output): Remove, we no longer
1332 need the b4_symbol_printers/destructors tables.
1333
1334 2008-12-01 Akim Demaille <demaille@gostai.com>
1335
1336 Use b4_symbol_case_.
1337 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1338 b4_symbol_case_.
1339
1340 2008-12-01 Akim Demaille <demaille@gostai.com>
1341
1342 Move b4_symbol based macro to bison.m4.
1343 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1344 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1345 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1346 (b4_type_foreach): Move to...
1347 * data/bison.m4: Here.
1348 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1349 b4_symbol_value_template instead of b4_symbol_value.
1350
1351 2008-12-01 Akim Demaille <demaille@gostai.com>
1352
1353 b4_symbol/type_foreach.
1354 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1355 Use them.
1356
1357 2008-12-01 Akim Demaille <demaille@gostai.com>
1358
1359 Use the symbol properties to output the printer/destructor for lalr1.cc.
1360 Instead of defining complex list of tuples to define various
1361 properties of the symbols, we now prefer to define symbols as
1362 "structs" in m4: using the symbol key (its number), and the
1363 property name, b4_symbol gives it value. Use this to handle
1364 destructors and printers.
1365
1366 * src/output.c (CODE_PROP): New.
1367 (prepare_symbol_definitions): Use it to define the printer and
1368 destructor related attributes of the symbols.
1369 * data/lalr1.cc (b4_symbol_actions): Rename as...
1370 (b4_symbol_action): this.
1371 Use b4_symbol instead of 6 arguments.
1372 (b4_symbol_printer, b4_symbol_destructor): New.
1373 Use them instead of b4_symbol_actions.
1374
1375 2008-12-01 Akim Demaille <demaille@gostai.com>
1376
1377 Avoid capturing variables too easily.
1378 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1379 v__ and p__ instead of v and p.
1380
1381 2008-12-01 Akim Demaille <demaille@gostai.com>
1382
1383 Remove spurious empty line before syncline.
1384 * data/bison.m4 (b4_syncline): Don't output an empty line before
1385 the output.
1386
1387 2008-11-26 Akim Demaille <demaille@gostai.com>
1388
1389 Convert lib/Makefile.am into lib/local.mk.
1390 The real problem is rather gnulib.mk, which itself is extracted
1391 from a Makefile.am that gnulib expects to the "recursive". The
1392 tool prefix-gnulib-mk converts such a gnulib.mk to be
1393 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1394
1395 * etc/prefix-gnulib-mk: New.
1396 * bootstrap (slurp): Use it to convert further gnulib.mk.
1397 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1398 are deeper.
1399 * lib/Makefile.am: Rename as...
1400 * lib/local.mk: this.
1401 Adjust to be prefixed.
1402 * Makefile.am, configure.ac: Adjust.
1403 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1404
1405 2008-11-26 Akim Demaille <demaille@gostai.com>
1406
1407 s/_FLAGS/FLAGS/.
1408 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1409 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1410 Reported by Eric Blake.
1411
1412 2008-11-26 Akim Demaille <demaille@gostai.com>
1413
1414 Use b4_parser_tables_define in glr.cc.
1415 * data/glr.c: Use b4_parser_tables_define instead of defining the
1416 (deterministic integral) tables by hand.
1417
1418 2008-11-26 Akim Demaille <demaille@gostai.com>
1419
1420 Use b4_parser_tables_define in Java.
1421 * data/java.m4 (b4_typed_parser_table): Rename as...
1422 (b4_typed_parser_table_define): this, for consistency.
1423 Accept a comment as $4.
1424 Move $2 into yy*_.
1425 (b4_integral_parser_table): Rename as...
1426 (b4_integral_parser_table_define): this.
1427 * data/lalr1.java: Adjust all uses.
1428 Use b4_parser_tables_define instead of generation by hand.
1429
1430 2008-11-26 Akim Demaille <demaille@gostai.com>
1431
1432 Prepare the convergence bw C style and Java table generation.
1433 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1434 (b4_tables_define): Rename as...
1435 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1436 (b4_parser_tables_define): these.
1437 * data/c.m4 (b4_table_define): Rename as...
1438 (b4_integral_parser_table_define): this.
1439 * data/lalr1.cc: Adjust.
1440 (b4_table_define, b4_table_declare): Rename as...
1441 (b4_integral_parser_table_define)
1442 (b4_integral_parser_table_declare): these.
1443 (yyrline_): Move the comment where it is actually used.
1444 * data/yacc.c: Adjust.
1445 (yyrline): Use b4_integral_parser_table_define.
1446
1447 2008-11-26 Akim Demaille <demaille@gostai.com>
1448
1449 Regen.
1450 * src/parse-gram.h, src/parse-gram.c: Regen.
1451
1452 2008-11-26 Akim Demaille <demaille@gostai.com>
1453
1454 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1455 * data/lalr1.cc (b4_tables_map): Move to...
1456 * data/bison.m4: here.
1457 Update the comment for yytable during the flight.
1458 (b4_tables_declare, b4_tables_define): New.
1459 * data/lalr1.cc: Use them.
1460 * data/c.m4 (b4_table_define): New.
1461 * data/yacc.c: Use b4_tables_define instead of output the tables
1462 by hand.
1463 * tests/regression.at (Web2c Actions): Adjust the expected output,
1464 the order of the tables changed.
1465
1466 2008-11-26 Akim Demaille <demaille@gostai.com>
1467
1468 Get rid of (yy)rhs and (yy)prhs.
1469 These tables are no longer needed in the parsers, and they don't seem to
1470 be useful. They are not documented either.
1471
1472 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1473 Adjust the computation of (yy)r2.
1474
1475 2008-11-26 Akim Demaille <demaille@gostai.com>
1476
1477 Rule length is unsigned.
1478 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1479
1480 2008-11-26 Akim Demaille <demaille@gostai.com>
1481
1482 Get rid of lalr1-split.cc.
1483 It was no longer maintainer.
1484
1485 * data/lalr1-split.cc: Remove.
1486 * etc/bench.pl.in (bench_fusion_parser): Remove.
1487 Adjust.
1488
1489 2008-11-26 Akim Demaille <demaille@gostai.com>
1490
1491 Use yy* consistently.
1492 * data/glr.c: Now that yyrhs no longer exists as a global
1493 variable, rename local "rhs" variables into "yyrhs" for
1494 consistency.
1495
1496 2008-11-25 Akim Demaille <demaille@gostai.com>
1497
1498 Get rid of yyrhs and yyprhs in glr.c.
1499 * data/glr.c (yyrhs, yyprhs): Remove.
1500 Instead, use the state stack and yystos.
1501
1502 2008-11-25 Akim Demaille <demaille@gostai.com>
1503
1504 Flag glr tests.
1505 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1506 as an Autotest keyword.
1507
1508 2008-11-25 Akim Demaille <demaille@gostai.com>
1509
1510 Prefer TESTSUITE_FLAGS.
1511 TESTSUITEFLAGS is barely readable.
1512
1513 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1514 for backward compatibility.
1515 Use the former instead of the latter.
1516
1517 2008-11-25 Akim Demaille <demaille@gostai.com>
1518
1519 Get rid of yyrhs and yyprhs in larl1.java.
1520 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1521 (yy_reduce_print): Rather, use yystos_ and the state stack.
1522
1523 2008-11-25 Akim Demaille <demaille@gostai.com>
1524
1525 Formatting changes.
1526
1527 2008-11-25 Akim Demaille <demaille@gostai.com>
1528
1529 Get rid of yyrhs and yyprhs in yacc.c.
1530 They were used to get the symbol types, given a rule number, when
1531 displaying the top of the stack before a reduction. But the
1532 symbol type is available from the state stack. This has two be
1533 benefits: two tables less in the parser (making it smaller), and a
1534 more consistent use of the three stacks which will help to fuse
1535 them.
1536
1537 * data/yacc.c (yyprhs, yyrhs): Remove.
1538 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1539 (yy_reduce_print): Take yyssp as argument.
1540 Use it, together with yystos, to get the symbol type.
1541 * tests/regression.at (Web2c Report): Remove these tables from the
1542 expected output.
1543
1544 2008-11-25 Akim Demaille <demaille@gostai.com>
1545
1546 b4_tables_map.
1547 The point is to factor the generation of the tables across skeletons.
1548 This is language dependant.
1549
1550 * data/c.m4 (b4_comment_): New.
1551 Should be usable to define how to generate tables independently of
1552 the language.
1553 (b4_c_comment): New.
1554 (b4_comment): Bounce to b4_c_comment.
1555 Now support $2 = [PREFIX] for indentation.
1556 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1557 there is no comment.
1558 Indent it properly when there is one.
1559 Output the ending semicolon.
1560 (b4_table_define): Space changes.
1561 Output the ending semicolon.
1562 (b4_tables_map): New.
1563 Use it twice instead of declaring and defining the (integral)
1564 tables by hand.
1565
1566 2008-11-25 Akim Demaille <demaille@gostai.com>
1567
1568 b4_table_declare.
1569 * data/lalr1.cc (b4_table_declare): New.
1570 Use it to declare the tables defined with b4_table_define.
1571 (b4_table_define): Declare a third arg to match b4_table_declare
1572 signature.
1573 Move all the comments around invocations of b4_table_define into
1574 the invocations itselves.
1575 Move things around to have the order for declarations and
1576 definitions.
1577
1578 2008-11-25 Akim Demaille <demaille@gostai.com>
1579
1580 Formatting changes.
1581 * data/lalr1.java: here.
1582
1583 2008-11-25 Akim Demaille <demaille@gostai.com>
1584
1585 b4_args is more general than only C++.
1586 * data/lalr1.cc (b4_args, _b4_args): Move to...
1587 * data/bison.m4: here.
1588
1589 2008-11-21 Di-an Jan <dianj@freeshell.org>
1590
1591 Implement no-XXX arguments for --warnings, --report, --trace.
1592 * src/getargs.c (flags_argmatch): Handles no-XXX.
1593 Fix typo in doxygen comment.
1594
1595 2008-11-21 Akim Demaille <demaille@gostai.com>
1596
1597 Display the changes in cross-options.texi.
1598 * build-aux/cross-options.pl ($sep): New, to separate items.
1599 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1600 changes.
1601
1602 2008-11-20 Di-an Jan <dianj@freeshell.org>
1603
1604 Improves options in the manual.
1605 * doc/bison.texinfo (-g, -x): Add space before argument.
1606 (Option Cross Key): Implement FIXME: listing directives also.
1607 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1608 (Short Option): Special case -d. Put arguments inside @option.
1609 (Bison Directive): Add column, automatically extracted from
1610 src/scan-gram.l (actual name passed as the first argument)
1611 with special case for %define.
1612 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1613 to build-aux/cross-options.pl.
1614 * src/getargs.c (usage): Document limitations of cross-options.pl.
1615 * src/scan-gram.l: Likewise.
1616
1617 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1618
1619 Fix unexpanded macros in GLR defines file.
1620 Reported by Csaba Raduly at
1621 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1622 * THANKS (Csaba Raduly): Add.
1623 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1624 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1625 lexer in a separate module that includes the defines file.
1626 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1627 source.
1628 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1629 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1630 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1631 (AT_DATA_SOURCE_PROLOGUE): New.
1632 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1633 (AT_DATA_SOURCE): New.
1634 (AT_FULL_COMPILE): Extend to support an additional source file.
1635
1636 2008-11-18 Akim Demaille <demaille@gostai.com>
1637
1638 More TODO.
1639 * TODO: More short term issues.
1640
1641 2008-11-18 Akim Demaille <demaille@gostai.com>
1642
1643 Regen.
1644 * src/parse-gram.h, src/parse-gram.c: Regen.
1645
1646 2008-11-18 Akim Demaille <demaille@gostai.com>
1647
1648 Use b4_subtract where possible.
1649 * data/lalr1.cc (b4_subtract): Move to...
1650 * data/bison.m4: here.
1651 * data/glr.c (b4_rhs_data): Use it.
1652 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1653
1654 2008-11-18 Akim Demaille <demaille@gostai.com>
1655
1656 Remove incorrect mode specification.
1657 * data/glr.cc: Don't pretend it's C code.
1658
1659 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1660
1661 Simplify last patch slightly.
1662 * src/getargs.c (getargs): Here.
1663
1664 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1665
1666 Fix last warning from --enable-gcc-warnings.
1667 * src/getargs.c (getargs): Don't assign const address to non-const
1668 pointer.
1669
1670 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1671
1672 Don't let maintainer-*-check targets force a version update.
1673 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1674 handled.
1675
1676 2008-11-17 Di-an Jan <dianj@freeshell.org>
1677
1678 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1679 Align menus. Adjust word wrapping. Use node names for menu names.
1680 (Examples): Don't abbreviate node names.
1681 (LocalWords): Remove abbreviations.
1682 (Copying): Make description a sentence.
1683 (Java Action Features): Remove period to match the rest of menu.
1684
1685 2008-11-17 Di-an Jan <dianj@freeshell.org>
1686
1687 Handles several --enable-gcc-warnings.
1688 * src/getargs.c (command_line_location): Set parameters to void.
1689 * src/output.c (symbol_type_name_cmp): Make static.
1690 (symbols_by_type_name): Set parameters to void.
1691 (symbol_definitions_output): Remove unused parameter. Rename as...
1692 (prepare_symbol_definitions): this.
1693 (muscles_output): Move symbol_definitions_output to...
1694 (output): here as prepare_symbol_definitions.
1695 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1696 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1697
1698 2008-11-17 Di-an Jan <dianj@freeshell.org>
1699
1700 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1701 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1702
1703 2008-11-16 Akim Demaille <demaille@gostai.com>
1704
1705 Add missing $(EXEEXT).
1706 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1707 "src/bison$(EXEEXT)".
1708 Reported by Di-an Jan.
1709
1710 2008-11-15 Akim Demaille <demaille@gostai.com>
1711
1712 * TODO: Update.
1713
1714 2008-11-15 Akim Demaille <demaille@gostai.com>
1715
1716 Formatting changes.
1717 * tests/input.at: here.
1718
1719 2008-11-15 Akim Demaille <demaille@gostai.com>
1720
1721 Remove duplicate header inclusion.
1722 * src/LR0.c: here.
1723
1724 2008-11-15 Akim Demaille <demaille@gostai.com>
1725
1726 * src/parse-gram.h, src/parse-gram.c: Regen.
1727
1728 2008-11-15 Akim Demaille <demaille@gostai.com>
1729
1730 Support parametric types.
1731
1732 There are two issues to handle: first scanning nested angle
1733 bracket pairs to support types such as std::pair< std::string,
1734 std::list<std::string> > >.
1735
1736 Another issue is to address idiosyncracies of C++: do not glue two
1737 closing angle brackets together (otherwise it's operator>>), and
1738 avoid sticking blindly a TYPE to the opening <, as it can result
1739 in '<:' which is a digraph for '['.
1740
1741 * src/scan-gram.l (brace_level): Rename as...
1742 (nesting): this.
1743 (SC_TAG): New.
1744 Implement support for complex tags.
1745 (tag): Accept
1746 , but not <.
1747 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1748 (b4_symbol_variant): Leave space around types as parameters.
1749 * examples/variant.yy: Use nested template types and leading ::.
1750 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1751 Rename as...
1752 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1753 * tests/c++.at: Test parametric types.
1754
1755 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1756
1757 Test token.prefix.
1758 This is not sufficient, but we test at least that the make_SYMBOL
1759 interface is not affected by token.prefix. A more general test
1760 will be implemented when the support of token.prefix is generalized
1761 to more skeletons.
1762
1763 * tests/c++.at: One more variant test, using token.prefix.
1764
1765 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1766
1767 Test the make_TOKEN interface.
1768 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1769 Factor the common code in yylex.
1770 Use it to test "%define lex_symbol".
1771
1772 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1773
1774 Formatting change.
1775
1776 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1777
1778 Simplify code for variants bench marks.
1779 * etc/bench.pl.in (&generate_grammar_list): Define and use
1780 location_type.
1781 Factor the common code in yylex.
1782
1783 2008-11-15 Akim Demaille <demaille@gostai.com>
1784
1785 Better error message.
1786 * bootstrap (find_tool): Fix the error message.
1787
1788 2008-11-15 Akim Demaille <demaille@gostai.com>
1789
1790 Update variant.yy to newest interface.
1791 * examples/variant.yy: Define lex_symbol.
1792 Adjust.
1793
1794 2008-11-15 Akim Demaille <demaille@gostai.com>
1795
1796 Don't use locations in variant.yy.
1797 * examples/variant.yy: Adjust to not using locations.
1798
1799 2008-11-15 Akim Demaille <demaille@gostai.com>
1800
1801 Comment changes.
1802 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1803 comments for the license.
1804
1805 2008-11-15 Akim Demaille <demaille@gostai.com>
1806
1807 Remove tests/Makefile.am.
1808 * tests/Makefile.am: Rename as...
1809 * tests/local.mk: this.
1810 * Makefile.am, configure.ac: Adjust.
1811 * Makefile.am (DISTCLEANFILES): Define.
1812 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1813 Remove, we no longer need to bounce to the real targets.
1814
1815 2008-11-15 Akim Demaille <demaille@gostai.com>
1816
1817 Comment changes.
1818
1819 2008-11-15 Akim Demaille <demaille@gostai.com>
1820
1821 djgpp/local.mk.
1822 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1823 * djgpp/local.mk: this new file.
1824
1825 2008-11-15 Akim Demaille <demaille@gostai.com>
1826
1827 Remove doc/Makefile.am.
1828 * doc/Makefile.am: Rename as...
1829 * doc/local.mk: this.
1830 Adjust paths
1831 * Makefile.am, configure.ac: Adjust.
1832 * Makefile.am (MOSTLYCLEANFILES): New.
1833 * src/local.mk: Adjust.
1834
1835 2008-11-15 Akim Demaille <demaille@gostai.com>
1836
1837 Move sc_tight_scope into maint.mk.
1838 It does not work, and I don't know how it was supposed to work: it
1839 seems to be looking for sources in the build tree. I just moved
1840 it at a better place, fixing it is still required.
1841
1842 * src/local.mk (echo): Remove.
1843 (sc_tight_scope): Move to...
1844 * maint.mk: here.
1845
1846 2008-11-15 Akim Demaille <demaille@gostai.com>
1847
1848 Regen.
1849 * src/parse-gram.h, src/parse-gram.h: Regen.
1850
1851 2008-11-15 Akim Demaille <demaille@gostai.com>
1852
1853 Remove src/Makefile.am.
1854 * src/Makefile.am: Rename as...
1855 * src/local.mk: this.
1856 Prefix all the paths with src/.
1857 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1858 (AM_CPPFLAGS): Find find in builddir/src.
1859 (YACC): Move the flags into...
1860 (AM_YFLAGS): here.
1861 * maint.mk (sc_tight_scope): Disable.
1862 It used to bounce to the version in src/Makefile.am which is now
1863 part of this very Makefile.
1864 * Makefile.am, configure.ac: Adjust.
1865 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1866 include "..." to find files "here": we are no longer in src/, so
1867 qualify the includes with src/.
1868 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1869 prefix.
1870 (.x.1): Adjust to be able to create src/foo from the top level
1871 Makefile, instead of going bounce to src/Makefile the creation of
1872 foo.
1873
1874 2008-11-15 Akim Demaille <demaille@gostai.com>
1875
1876 Remove useless variable.
1877 * doc/Makefile.am (srcsrcdir): Remove.
1878
1879 2008-11-15 Akim Demaille <demaille@gostai.com>
1880
1881 Remove data/Makefile.am.
1882 * data/Makefile.am: Rename as...
1883 * data/local.mk: this.
1884 Adjust paths.
1885 * Makefile.am, configure.ac: Adjust.
1886
1887 2008-11-15 Akim Demaille <demaille@gostai.com>
1888
1889 Remove etc/Makefile.am.
1890 * etc/Makefile.am: Rename as...
1891 * etc/local.mk: this.
1892 Adjust.
1893 * Makefile.am, configure.ac: Adjust.
1894
1895 2008-11-15 Akim Demaille <demaille@gostai.com>
1896
1897 Remove examples/local.mk.
1898 examples/calc++/Makefile.am might be interesting to keep as is, since
1899 it is an example in itself.
1900
1901 * examples/Makefile.am: Rename as...
1902 * examples/local.mk: this.
1903 Adjust.
1904 * Makefile.am, configure.ac: Adjust.
1905
1906 2008-11-15 Akim Demaille <demaille@gostai.com>
1907
1908 Remove build-aux/Makefile.am.
1909 Recursive Makefiles are really way too slow, let's get rid of some of
1910 them.
1911
1912 * build-aux/Makefile.am: Rename as...
1913 * build-aux/local.mk: this.
1914 Adjust paths.
1915 * Makefile.am, configure.ac: Adjust.
1916
1917 2008-11-15 Akim Demaille <demaille@gostai.com>
1918
1919 Provide convenience constructors for locations and positions.
1920 * data/location.cc (position::position): Accept file, line and
1921 column as arguments with default values.
1922 Always qualify initial line and column literals as unsigned.
1923 (location::location): Provide convenience constructors.
1924
1925 2008-11-15 Akim Demaille <demaille@gostai.com>
1926
1927 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1928 token type.
1929 Using template buys us nothing, and makes it uselessly complex to
1930 construct a symbol. Besides, it could not be generalized to other
1931 languages, while make_FOO would work in C/Java etc.
1932
1933 * data/lalr1.cc (b4_symbol_): New.
1934 (b4_symbol): Use it.
1935 (b4_symbol_constructor_declaration_)
1936 (b4_symbol_constructor_definition_): Instead of generating
1937 specializations of an overloaded template function, just generate
1938 several functions whose names are forged from the token names
1939 without the token.prefix.
1940 (b4_symbol_constructor_declarations): Generate them for all the
1941 symbols, not just by class of symbol type, now that instead of
1942 specializing a function template by the token, we generate a
1943 function named after the token.
1944 (b4_symbol_constructor_specialization_)
1945 (b4_symbol_constructor_specializations): Remove.
1946 * etc/bench.pl.in: Adjust to this new API.
1947
1948 2008-11-13 Akim Demaille <demaille@gostai.com>
1949
1950 %define token.prefix.
1951 Provide a means to add a prefix to the name of the tokens as
1952 output in the generated files. Because of name clashes, it is
1953 good to have such a prefix such as TOK_ that protects from names
1954 such as EOF, FILE etc. But it clutters the grammar itself.
1955
1956 * data/bison.m4 (token.prefix): Empty by default.
1957 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1958 * data/lalr1.cc (b4_symbol): Ditto.
1959
1960 2008-11-13 Akim Demaille <demaille@gostai.com>
1961
1962 Compute at M4 time some of the subtractions.
1963 * data/lalr1.cc (b4_subtract): New.
1964 (b4_rhs_data): Use it.
1965
1966 2008-11-13 Akim Demaille <demaille@gostai.com>
1967
1968 symbol::token.
1969 This allows the user to get the type of a token returned by yylex.
1970
1971 * data/lalr1.cc (symbol::token): New.
1972 (yytoknum_): Define when %define lex_symbol, independently of
1973 %debug.
1974 (yytoken_number_): Move into...
1975 (symbol::token): here, since that's the only use.
1976 The other one is YYPRINT which was not officially supported
1977 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1978 array under a different name (yytoknum).
1979
1980 2008-11-13 Akim Demaille <demaille@gostai.com>
1981
1982 YYERRCODE.
1983 * TODO (YYERRCODE): Mention the case of $undef.
1984
1985 2008-11-13 Akim Demaille <demaille@gostai.com>
1986
1987 TODO: YYPRINT.
1988 * TODO (YYPRINT): New.
1989
1990 2008-11-13 Akim Demaille <demaille@gostai.com>
1991
1992 Comment changes.
1993 * data/lalr1.cc, data/yacc.c: Fix the description of the
1994 yytranslate and yytoknum tables.
1995
1996 2008-11-13 Akim Demaille <demaille@gostai.com>
1997
1998 Define make_symbol in the header.
1999 To reach good performances these functions should be inlined (yet
2000 this is to measure precisely). To this end they must be available
2001 to the caller.
2002
2003 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2004 location_type with the class name.
2005 Since will now be output in the header, declare "inline".
2006 No longer use b4_symbol_constructor_specializations, but
2007 b4_symbol_constructor_definitions in the header.
2008 Don't call it in the *.cc file.
2009
2010 2008-11-13 Akim Demaille <demaille@gostai.com>
2011
2012 Define yytranslate in the header for lex_symbol.
2013 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2014 into the header file when using %define lex_symbol.
2015 (yytranslate_): Declare inline.
2016
2017 2008-11-13 Akim Demaille <demaille@gostai.com>
2018
2019 Define the constructors of symbol_type in
2020 b4_symbol_constructor_definitions.
2021 The constructors are called by the make_symbol functions, which a
2022 forthcoming patch will move elsewhere. Hence the interest of
2023 putting them together.
2024
2025 The stack_symbol_type does not need to be moved, it is used only
2026 by the parser.
2027
2028 * data/lalr1.cc: Move symbol_type and symbol_base_type
2029 constructors into...
2030 (b4_symbol_constructor_definitions): here.
2031 Adjust.
2032
2033 2008-11-13 Akim Demaille <demaille@gostai.com>
2034
2035 Make it easier to move the definition of yytranslate_.
2036 Forthcoming changes will make it possible to use yytranslate_
2037 from outside the parser implementation file.
2038
2039 * data/lalr1.cc (b4_yytranslate_definition): New.
2040 Use it.
2041
2042 2008-11-13 Akim Demaille <demaille@gostai.com>
2043
2044 Remove useless class specification.
2045 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2046 to refer to the class name to use a type defined by the class for
2047 arguments of member functions.
2048
2049 2008-11-13 Akim Demaille <demaille@gostai.com>
2050
2051 Finer input type for yytranslate.
2052 This patch is debatable: the tradition expects yylex to return an int
2053 which happens to correspond to token_number (which is an enum). This
2054 allows for instance to return characters (such as '*' etc.). But this
2055 goes against the stronger typing I am trying to have with the new
2056 lex interface which return a symbol_type. So in this case, feed
2057 yytranslate_ with a token_type.
2058
2059 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2060 expect a token_type.
2061
2062 2008-11-13 Akim Demaille <demaille@gostai.com>
2063
2064 Honor lex-params in %define lex_symbol mode.
2065 * data/lalr1.cc: Use b4_lex_param.
2066
2067 2008-11-13 Akim Demaille <demaille@gostai.com>
2068
2069 Simplify names.
2070 * src/output.c (symbol_definitions_output): Rename symbol
2071 attributes type_name and has_type_name as type and has_type.
2072 * data/lalr1.cc: Adjust uses.
2073
2074 2008-11-13 Akim Demaille <demaille@gostai.com>
2075
2076 Use b4_type_names for the union type.
2077 The union used to compute the size of the variant used to iterate
2078 over the type of all the symbols, with a lot of redundancy. Now
2079 iterate over the lists of symbols having the same type-name.
2080
2081 * data/lalr1.cc (b4_char_sizeof_): New.
2082 (b4_char_sizeof): Use it.
2083 Adjust to be called with a list of numbers instead of a single
2084 number.
2085 Adjust its caller for new-line issues.
2086
2087 2008-11-13 Akim Demaille <demaille@gostai.com>
2088
2089 Define the "identifier" of a symbol.
2090 Symbols may have several string representations, for instance if
2091 they have an alias. What I call its "id" is a string that can be
2092 used as an identifier. May not exist.
2093
2094 Currently the symbols which have the "tag_is_id" flag set are
2095 those that don't have an alias. Look harder for the id.
2096
2097 * src/output.c (is_identifier): Move to...
2098 * src/symtab.c (is_identifier): here.
2099 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2100 * src/output.c (symbol_definitions_output): Use it to define "id"
2101 and "has_id".
2102 Remove the definition of "tag_is_id".
2103 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2104 "tag_is_id" were used to produce code.
2105 We still use "tag" for documentation.
2106
2107 2008-11-11 Akim Demaille <demaille@gostai.com>
2108
2109 Locations are no longer required by lalr1.cc.
2110 * data/lalr1.cc (_b4_args, b4_args): New.
2111 Adjust all uses of locations to make them optional.
2112 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2113 (AT_CHECK_NAMESPACE): Check the use of locations.
2114 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2115 without locations with lalr1.cc.
2116 Test these cases.
2117 * tests/output.at: Check lalr1.cc with and without location
2118 support.
2119 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2120 Don't use locations.
2121
2122 2008-11-11 Akim Demaille <demaille@gostai.com>
2123
2124 AT_FULL_COMPILE.
2125 * tests/local.at (AT_FULL_COMPILE): New.
2126 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2127
2128 2008-11-11 Akim Demaille <demaille@gostai.com>
2129
2130 Support parens in calc++.
2131 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2132 * examples/calc++/test (run): Check the expected output.
2133 Adjust callers.
2134 Check parens too.
2135
2136 2008-11-11 Akim Demaille <demaille@gostai.com>
2137
2138 Simplify lalr1.cc since %defines is mandatory.
2139 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2140
2141 2008-11-11 Akim Demaille <demaille@gostai.com>
2142
2143 TODO: yyfmt.
2144 * TODO (yysyntax_error): New item.
2145
2146 2008-11-11 Akim Demaille <demaille@gostai.com>
2147
2148 Prefer M4 to CPP.
2149 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2150 YYERROR_VERBOSE.
2151
2152 2008-11-11 Akim Demaille <demaille@gostai.com>
2153
2154 Support i18n of the parse error messages.
2155 * TODO (lalr1.cc/I18n): Remove.
2156 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2157 error messages, as done in yacc.c.
2158 Stay within the yy* pseudo namespace.
2159
2160 2008-11-11 Akim Demaille <demaille@gostai.com>
2161
2162 More TODO.
2163 * TODO (single stack, yysyntax_error): New.
2164
2165 2008-11-11 Akim Demaille <demaille@gostai.com>
2166
2167 Make it possible to return a symbol_type from yylex.
2168 * data/lalr1.cc (b4_lex_symbol_if): New.
2169 (parse): When lex_symbol is defined, expected yylex to return the
2170 complete lookahead.
2171 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2172 yylex interface.
2173 (bench_variant_parser): Exercise it.
2174
2175 2008-11-11 Akim Demaille <demaille@gostai.com>
2176
2177 Remove useless bench case.
2178 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2179 no longer used.
2180
2181 2008-11-11 Akim Demaille <demaille@gostai.com>
2182
2183 Improve display of directives.
2184 * etc/bench.pl.in (parse_term): Don't add useless eol.
2185
2186 2008-11-11 Akim Demaille <demaille@gostai.com>
2187
2188 Use string_cast in the bench.
2189 * etc/bench.pl.in (generate_grammar_list): Define and use
2190 string_cast.
2191
2192 2008-11-11 Akim Demaille <demaille@gostai.com>
2193
2194 Replace yychar with a Boolean.
2195 * data/lalr1.cc (parse::yychar): Replace by...
2196 (parse::yyempty): this.
2197
2198 2008-11-11 Akim Demaille <demaille@gostai.com>
2199
2200 Factor the tables.
2201 * TODO: New item.
2202
2203 2008-11-11 Akim Demaille <demaille@gostai.com>
2204
2205 Let yytranslate handle the eof case.
2206 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2207 Adjust callers.
2208 No longer expect yychar to be equal to yyeof_, rather, test the
2209 lookahead's (translated) kind.
2210
2211 2008-11-11 Akim Demaille <demaille@gostai.com>
2212
2213 yychar cannot be empty in yyerrlab.
2214 * TODO (yychar == yyempty_): New.
2215 * data/lalr1.cc: Remove the handling of this case.
2216 This eases forthcoming changes related to yychar and yytranslate.
2217
2218 2008-11-11 Akim Demaille <demaille@gostai.com>
2219
2220 Bench: syntactic sugar for %define/#define.
2221 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2222 (&bench_push_parser, bench_variant_parser): Use this feature.
2223 (&eat): New.
2224 Use it.
2225
2226 2008-11-11 Akim Demaille <demaille@gostai.com>
2227
2228 Less memory pressure on the "list" bench.
2229 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2230 the values, to limit memory pressure.
2231
2232 2008-11-11 Akim Demaille <demaille@gostai.com>
2233
2234 Introduce make_symbol.
2235 make_symbol provides a means to construct a full symbol (kind,
2236 value, location) in a single shot. It is meant to be a Symbol
2237 constructor, parameterized by the symbol kind so that overloading
2238 would prevent incorrect kind/value pairs. Unfortunately
2239 parameterized constructors do not work well in C++ (unless the
2240 parameter also appears as an argument, which is not acceptable),
2241 hence the use of a function instead of a constructor.
2242
2243 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2244 (b4_symbol_constructor_declarations)
2245 (b4_symbol_constructor_specialization_)
2246 (b4_symbol_constructor_specializations)
2247 (b4_symbol_constructor_definition_)
2248 (b4_symbol_constructor_definitions): New.
2249 Use them where appropriate to generate declaration, declaration of
2250 the specializations, and implementations of the templated
2251 overloaded function "make_symbol".
2252 (variant::variant): Always define a default ctor.
2253 Also provide a copy ctor.
2254 (symbol_base_type, symbol_type): New ctor overloads for value-less
2255 symbols.
2256 (symbol_type): Now public, so that functions such as yylex can use
2257 it.
2258
2259 2008-11-11 Akim Demaille <demaille@gostai.com>
2260
2261 Inform m4 whether a tag is a valid id.
2262 * src/output.c (is_identifier): New.
2263 (symbol_definitions_output): Use it to define tag_is_id.
2264 But maybe this should be done at m4 level?
2265
2266 2008-11-11 Akim Demaille <demaille@gostai.com>
2267
2268 Test 214 was failing: it greps with a pattern containing [ ]*
2269 which obviously meant to catch spaces and tabs, but contained only
2270 spaces. Tabulations in sources are a nuisance, so to simplify the
2271 matter, get rid of all the tabulations in the Java sources. The
2272 other skeletons will be treated equally later.
2273
2274 * data/java.m4, data/lalr1.java: Untabify.
2275 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2276 tabulations are no longer generated.
2277
2278 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2279
2280 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2281 * configure.ac: Adjust usage.
2282 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2283 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2284 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2285
2286 2008-11-10 Di-an Jan <dianj@freeshell.org>
2287
2288 Workaround Java's ``code too large'' problem for parser tables
2289 in most cases, by using one function per initialization.
2290 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2291 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2292 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2293 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2294 (yytname_): Use b4_typed_parser_table.
2295 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2296 ``code too large'' error.
2297
2298 2008-11-10 Di-an Jan <dianj@freeshell.org>
2299
2300 * NEWS: Document them.
2301
2302 General Java skeleton improvements.
2303 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2304 using gcj < 4.3 in the testsuite, according to comments in
2305 gnulib/m4/javacomp.m4.
2306 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2307 location_type, position_type): Remove extraneous brackets from
2308 b4_percent_define_default.
2309 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2310 m4_define and m4_define_default.
2311 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2312 which marks the end of user code with appropriate syncline, like all
2313 the other skeletons.
2314 (b4_user_post_prologue): Add. Don't silently drop.
2315 (yylex): Remove.
2316 (parse): Inline yylex.
2317 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2318 (%{...%}): Fix typo of %code imports.
2319 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2320
2321 Support annotations on parser class with %define annotations.
2322 * data/lalr1.java (annotations): Add to parser class modifier.
2323 * doc/bison.texinfo (Java Parser Interface): Document
2324 %define annotations.
2325 (Java Declarations Summary): Document %define annotations.
2326 * tests/java.at (Java parser class modifiers): Test annotations.
2327
2328 Do not generate code for %error-verbose unless requested.
2329 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2330 Make private. Make conditional on %error-verbose.
2331 (getErrorVerbose, setErrorVerbose): New.
2332 (yytnamerr_): Make conditional on %error-verbose.
2333 (yysyntax_error): Make some code conditional on %error-verbose.
2334 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2335 about %error-verbose having no effect.
2336 (getErrorVerbose, setErrorVerbose): Document.
2337
2338 Move constants for token names to Lexer interface.
2339 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2340 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2341 (parse): Qualify EOF to Lexer.EOF.
2342 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2343 EOF and token names to Java Lexer Interface.
2344 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2345
2346 Make yyerror public.
2347 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2348 (yyerror): Change to public. Add Javadoc comments. Use longer
2349 parameter names. Make the body rather than the declarator
2350 conditional on %locations.
2351 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2352
2353 Allow user to add code to the constructor with %code init.
2354 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2355 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2356 Add %code init to the front of the constructor body.
2357 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2358 and %define init_throws.
2359 (Java Declarations Summary): Document %code init and
2360 %define init_throws.
2361 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2362 (Java constructor init and init_throws): Add tests.
2363
2364 2008-11-10 Akim Demaille <demaille@gostai.com>
2365
2366 Update TODO.
2367 * TODO (-D): is implemented.
2368 (associativity): Same precedence must have the same associativity.
2369 For instance, how can a * b / c be parsed if * is %left and / is
2370 %right?
2371 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2372
2373 2008-11-10 Akim Demaille <demaille@gostai.com>
2374
2375 Formatting changes.
2376
2377 2008-11-10 Akim Demaille <demaille@gostai.com>
2378
2379 More information about the symbols.
2380 * src/output.c (type_names_output): Document all the symbols,
2381 including those that don't have a type-name.
2382 (symbol_definitions_output): Define "is_token" and
2383 "has_type_name".
2384 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2385 type-name, now that they are defined too in b4_type_names.
2386
2387 2008-11-10 Akim Demaille <demaille@gostai.com>
2388
2389 Regen.
2390
2391 2008-11-10 Akim Demaille <demaille@gostai.com>
2392
2393 Make parser::yytranslate static.
2394 Small speedup (1%) on the list grammar. And makes yytranslate_
2395 available in non member functions.
2396
2397 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2398 function.
2399
2400 2008-11-10 Akim Demaille <demaille@gostai.com>
2401
2402 Avoid trailing spaces.
2403 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2404 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2405 they can be empty, and anyway this incorrectly indents the first
2406 action.
2407
2408 2008-11-10 Akim Demaille <demaille@gostai.com>
2409
2410 Comment changes.
2411
2412 2008-11-10 Akim Demaille <demaille@gostai.com>
2413
2414 Use "enum" for integral constants.
2415 This is just nicer to read, I observed no speedup.
2416
2417 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2418 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2419 (yyuser_token_number_max_, yyundef_token_): Move into...
2420 (yytranslate_): here.
2421
2422 2008-11-10 Akim Demaille <demaille@gostai.com>
2423
2424 Shortcuts in bench directives.
2425 * etc/bench.pl.in (parse_dirs): New.
2426 Use it.
2427 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2428 Create the benches in "benches/".
2429
2430 2008-11-10 Akim Demaille <demaille@gostai.com>
2431
2432 Formatting changes.
2433 * data/lalr1.cc: here.
2434
2435 2008-11-10 Akim Demaille <demaille@gostai.com>
2436
2437 Adjust verbose message to using emacs.
2438 * etc/bench.pl.in: Inform compilation-mode when we change the
2439 directory.
2440 (generate_grammar_list): Recognize %define "variant" in addition
2441 to %define variant.
2442
2443 2008-11-10 Akim Demaille <demaille@gostai.com>
2444
2445 Classify symbols by type-name.
2446 * src/uniqstr.h (UNIQSTR_CMP): New.
2447 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2448 (type_names_output): New.
2449 (muscles_output): Use it.
2450 * data/lalr1.cc (b4_symbol_action_): Remove.
2451 (b4_symbol_case_, b4_type_action_): New.
2452 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2453
2454 2008-11-10 Akim Demaille <demaille@gostai.com>
2455
2456 Change the handling of the symbols in the skeletons.
2457 Before we were using tables which lines were the symbols and which
2458 columns were things like number, tag, type-name etc. It is was
2459 difficult to extend: each time a column was added, all the numbers had
2460 to be updated (you asked for colon $2, not for "tag"). Also, it was
2461 hard to filter these tables when only a subset of the symbols (say the
2462 tokens, or the nterms, or the tokens that have and external number
2463 *and* a type-name) was of interest.
2464
2465 Now instead of monolithic tables, we define one macro per cell. For
2466 instance "b4_symbol(0, tag)" is a macro name which contents is
2467 self-decriptive. The macro "b4_symbol" provides easier access to
2468 these cells.
2469
2470 * src/output.c (type_names_output): Remove.
2471 (symbol_numbers_output, symbol_definitions_output): New.
2472 (muscles_output): Call them.
2473 (prepare_symbols): Define b4_symbols_number.
2474
2475 2008-11-10 Akim Demaille <demaille@gostai.com>
2476
2477 --trace=muscles
2478 * src/getargs.h, src/getargs.c (trace_muscle): New.
2479 (trace_types, trace_args): Support it.
2480 * src/output.c (output_skeleton): Use it.
2481
2482 2008-11-10 Akim Demaille <demaille@gostai.com>
2483
2484 muscles_output.
2485 * src/output.c (muscles_output): New, extracted from...
2486 (output_skeleton): here.
2487 Adjust.
2488
2489 2008-11-10 Akim Demaille <demaille@gostai.com>
2490
2491 Formatting changes.
2492
2493 2008-11-10 Akim Demaille <demaille@gostai.com>
2494
2495 Update the variant example.
2496 * examples/variant.yy: Formatting changes.
2497 One stage build.
2498
2499 2008-11-10 Akim Demaille <demaille@gostai.com>
2500
2501 Support constructor with an argument.
2502 This improves the "list" bench by 2%.
2503
2504 * data/lalr1.cc (variant::build): Add an overloaded version with
2505 an argument.
2506 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2507
2508 2008-11-10 Akim Demaille <demaille@gostai.com>
2509
2510 Test variants.
2511 * tests/c++.at (AT_CHECK_VARIANTS): New.
2512 Use it with and without %define assert.
2513
2514 2008-11-10 Akim Demaille <demaille@gostai.com>
2515
2516 Add %precedence support.
2517 Unfortunately it is not possible to reuse the %prec directive. This
2518 is because to please POSIX, we do not require to end the rules with a
2519 semicolon. As a result,
2520
2521 foo: bar %prec baz
2522
2523 is ambiguous: either a rule which precedence is that of baz, or a rule,
2524 and then a declaration of the precedence of the token baz.
2525
2526 * doc/bison.texinfo: Document %precedence.
2527 (Precedence Only): New.
2528 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2529 * src/conflicts.c (resolve_sr_conflict): Support it.
2530 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2531 Parse it.
2532 * tests/calc.at: Use %precedence for NEG.
2533 * tests/conflicts.at (%precedence does not suffice)
2534 (%precedence suffices): New tests.
2535
2536 2008-11-09 Akim Demaille <demaille@gostai.com>
2537
2538 Make benches in a sub dirs.
2539 * etc/bench.pl.in ($dir): New.
2540 Use it.
2541 Check the use of constructors with an argument.
2542 (bench_variant_parser): Fix.
2543
2544 2008-11-09 Akim Demaille <demaille@gostai.com>
2545
2546 fix eof condition
2547
2548 2008-11-09 Akim Demaille <demaille@gostai.com>
2549
2550 Fix --help.
2551
2552 2008-11-09 Akim Demaille <demaille@gostai.com>
2553
2554 Require the generation of parse-gram.output.
2555 * src/Makefile.am (YACC): Pass --report=all.
2556
2557 2008-11-09 Akim Demaille <demaille@gostai.com>
2558
2559 Formatting changes.
2560
2561 2008-11-09 Akim Demaille <demaille@gostai.com>
2562
2563 Update TODO.
2564 * TODO: Remove obsolete items.
2565 Update others.
2566
2567 2008-11-09 Akim Demaille <demaille@gostai.com>
2568
2569 Enhance bench.pl.
2570 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2571 (@token, $grammar, $bench): New.
2572 (generate_grammar_variant): Rename as...
2573 (generate_grammar_list): this.
2574 (generate_grammar): Adjust.
2575 (bench_grammar): Rename as...
2576 (bench): this.
2577 Use it in the various bench-marking routines.
2578 (-b, -g): New options.
2579
2580 2008-11-09 Akim Demaille <demaille@gostai.com>
2581
2582 Use a static hierarchy for symbols in the C++ parser.
2583 * data/lalr1.cc (symbol_base_type, symbol_type)
2584 (stack_symbol_type): Make it a static hierarchy.
2585 Adjust dependencies.
2586
2587 2008-11-09 Akim Demaille <demaille@gostai.com>
2588
2589 bench.pl -d, --directive.
2590 * etc/bench.pl.in (@directive): New.
2591 (&bench_grammar): Use it.
2592 (&bench_list_grammar): New, to provide access to the "variant"
2593 grammar.
2594 Use it.
2595 (getopts): Support -d, --directive.
2596
2597 2008-11-09 Akim Demaille <demaille@gostai.com>
2598
2599 Use inline for small operations.
2600 * data/lalr1.cc (symbol_base_type, symbol_type)
2601 (stack_symbol_type): Declare constructor and other operations as
2602 inline.
2603 (yy_destroy_): Inline.
2604
2605 2008-11-09 Akim Demaille <demaille@gostai.com>
2606
2607 Introduce a hierarchy for symbols.
2608 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2609 (data_type): Rename as...
2610 (stack_symbol_type): this.
2611 Derive from symbol_base_type.
2612 (yy_symbol_value_print_): Merge into...
2613 (yy_symbol_print_): this.
2614 Rename as...
2615 (yy_print_): this.
2616 (yydestruct_): Rename as...
2617 (yy_destroy_): this.
2618 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2619 (parser::parse): yyla is now of symbol_type.
2620 Use its type member instead of yytoken.
2621
2622 2008-11-09 Akim Demaille <demaille@gostai.com>
2623
2624 Rename data_type and stack_symbol_type.
2625 * data/lalr1.cc (data_type): Rename as...
2626 (stack_symbol_type): this.
2627
2628 2008-11-09 Akim Demaille <demaille@gostai.com>
2629
2630 Handle semantic value and location together.
2631 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2632 yydata.value and yydata.location.
2633 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2634 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2635 single arg.
2636 Adjust all callers.
2637 (yydestruct_): New overload for a stack symbol.
2638
2639 2008-11-09 Akim Demaille <demaille@gostai.com>
2640
2641 Push a complete symbol, not connected parts.
2642 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2643 state, value and location.
2644 Adjust callers.
2645
2646 2008-11-09 Akim Demaille <demaille@gostai.com>
2647
2648 Agregate yylval and yylloc.
2649 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2650 (parser::yyla): this.
2651
2652 2008-11-09 Akim Demaille <demaille@gostai.com>
2653
2654 Rely on the state stack to display reduction traces.
2655 To display rhs symbols before a reduction, we used information
2656 about the rule reduced, which required the tables yyrhs and
2657 yyprhs. Now use rely only on the state stack to get the same
2658 information.
2659
2660 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2661 Use them.
2662 (parser::yyrhs_, parser::yyprhs_): Remove.
2663 (parser::yy_reduce_print_): Use the state stack.
2664
2665 2008-11-09 Akim Demaille <demaille@gostai.com>
2666
2667 Fuse yyval and yyloc into yylhs.
2668 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2669 yylhs.
2670 (parse): Replace yyval and yyloc with yylhs.value and
2671 yylhs.location.
2672 After a user action, compute yylhs.state earlier.
2673 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2674 fresh error_token.
2675
2676 2008-11-09 Di-an Jan <dianj@freeshell.org>
2677
2678 Remove unused variable.
2679 * src/output.c (type_names_output): Remove unused variable sep.
2680
2681 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2682
2683 Change tests/output.at quoting.
2684 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2685 expanding arguments.
2686
2687 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2688
2689 Don't add a semicolon to actions for %skeleton or %language.
2690 It breaks Java test cases as reported by Akim Demaille.
2691 * src/scan-code.l: Implement.
2692
2693 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2694
2695 Clean up %skeleton and %language priority implementation.
2696 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2697 remove static qualifier because others will soon need to see it.
2698 (language_prio): Likewise.
2699 (getargs): Use command_line_prio rather than 0.
2700 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2701 enum fields.
2702 (skeleton_prio): Extern it.
2703 (language_prio): Extern it.
2704 * src/parse-gram.y: Use grammar_prio rather than 1.
2705
2706 2008-11-07 Akim Demaille <demaille@gostai.com>
2707
2708 Moving push traces into yypush_.
2709 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2710 Adjust all uses.
2711
2712 2008-11-07 Akim Demaille <demaille@gostai.com>
2713
2714 The single-stack C++ parser is now the standard one.
2715 * data/lalr1.cc: Rename as...
2716 * data/lalr1-split.cc: this.
2717 * data/lalr1-fusion.cc: Rename as...
2718 * data/lalr1.cc: this.
2719 * etc/bench.pl.in: Adjust.
2720
2721 2008-11-07 Akim Demaille <demaille@gostai.com>
2722
2723 Avoid empty-if warnings.
2724 Reported by Quentin Hocquet.
2725
2726 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2727 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2728
2729 2008-11-07 Akim Demaille <demaille@gostai.com>
2730
2731 Pass command line location to skeleton_arg and language_argmatch.
2732 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2733 The location argument is now mandatory.
2734 Adjust all dependencies.
2735 (getargs): Use command_line_location.
2736
2737 2008-11-07 Akim Demaille <demaille@gostai.com>
2738
2739 -D, --define.
2740 * src/getargs.c (usage): Document -D.
2741 Fix help string for --locations.
2742 (command_line_location): New.
2743 (short_options, long_options, getargs): Support -D, --define.
2744 (getargs): Move -d support at the right place.
2745 * doc/bison.texinfo (Bison Options): Update.
2746 * tests/input.at (%define, --define): New.
2747
2748 2008-11-07 Akim Demaille <demaille@gostai.com>
2749
2750 Initialize the muscle table before parsing the command line.
2751 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2752 (getargs): Define file_name.
2753 * src/main.c (main): Initialize muscle_tab before calling
2754 getargs.
2755 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2756 its value is not available yet.
2757
2758 2008-11-07 Akim Demaille <demaille@gostai.com>
2759
2760 Locations without columns for command line arguments.
2761 * src/location.c (location_print): Don't display negative columns.
2762 * src/location.h: Document this.
2763
2764 2008-11-07 Akim Demaille <demaille@gostai.com>
2765
2766 Fix --help.
2767 * src/getargs.c (usage): Fix help string for -W.
2768
2769 2008-11-07 Akim Demaille <demaille@gostai.com>
2770
2771 Handle more general types of option arguments.
2772 * build-aux/cross-options.pl: The argument ends at the first
2773 space, not the first non-symbol character.
2774 Use @var for each word appearing the argument description.
2775
2776 2008-11-07 Akim Demaille <demaille@gostai.com>
2777
2778 Destroy the variants that remain on the stack in case of error.
2779 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2780 destructor.
2781 Display the value only if yymsg is nonnull.
2782 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2783
2784 2008-11-07 Akim Demaille <demaille@gostai.com>
2785
2786 Add "%define assert" to variants.
2787 This is used to help the user catch cases where some value gets
2788 ovewritten by a new one. This should not happen, as this will
2789 probably leak.
2790
2791 Unfortunately this uncovered a bug in the C++ parser itself: the
2792 lookahead value was not destroyed between two calls to yylex. For
2793 instance if the previous lookahead was a std::string, and then an int,
2794 then the value of the std::string was correctly taken (i.e., the
2795 lookahead was now an empty string), but std::string structure itself
2796 was not reclaimed.
2797
2798 This is now done in variant::build(other&) (which is used to take the
2799 value of the lookahead): other is not only stolen from its value, it
2800 is also destroyed. This incurs a new performance penalty of a few
2801 percent, and union becomes faster again.
2802
2803 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2804 (b4_variant_if): New.
2805 (variant::built): New.
2806 Use it whereever the status of the variant changes.
2807 * etc/bench.pl.in: Check the penalty of %define assert.
2808
2809 2008-11-07 Akim Demaille <demaille@gostai.com>
2810
2811 Use "%define variant" in bench.pl.
2812 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2813 just use %define variants.
2814
2815 2008-11-07 Akim Demaille <demaille@gostai.com>
2816
2817 Regen.
2818 * src/parse-gram.h, src/parse-gram.c: Regen.
2819
2820 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2821
2822 Fix user actions without a trailing semicolon.
2823 Reported by Sergei Steshenko at
2824 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2825 * THANKS (Sergei Steshenko): Add.
2826 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2827 * tests/regression.at (Fix user actions without a trailing semicolon):
2828 New test case.
2829
2830 2008-11-04 Akim Demaille <demaille@gostai.com>
2831
2832 Use b4_copyright_years.
2833 * data/yacc.c (b4_copyright_years): New.
2834 Fix its value according to the comments in the file.
2835 Use it and undefine it.
2836
2837 2008-11-04 Akim Demaille <demaille@gostai.com>
2838
2839 Formatting changes.
2840 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2841
2842 2008-11-04 Akim Demaille <demaille@gostai.com>
2843
2844 Formatting changes.
2845 * data/lalr1-fusion.cc: here.
2846
2847 2008-11-04 Akim Demaille <demaille@gostai.com>
2848
2849 Use strict on bench.pl.
2850 * etc/bench.pl.in (&run, &generate_grammar): New.
2851 Rename the grammar generating functions for consistency.
2852 Change the interface so that the list of benches to run is passed
2853 as (optionless) arguments.
2854 (&compile): Use &run.
2855
2856 2008-11-04 Akim Demaille <demaille@gostai.com>
2857
2858 Remove spurious initial empty lines.
2859 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2860 * data/yacc.c: End the @output lines with an @.
2861
2862 2008-11-04 Akim Demaille <demaille@gostai.com>
2863
2864 Improve the display of sizes.
2865 * etc/bench.p.in: Higher precision.
2866 Sort by decreasing size.
2867
2868 2008-11-04 Akim Demaille <demaille@gostai.com>
2869
2870 Don't memcpy C++ structures.
2871 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2872 arguments.
2873 (variant::build): New overload for
2874 copy-construction-that-destroys.
2875 (variant::swap): New.
2876 (parser::yypush_): Use it in variant mode.
2877
2878 2008-11-04 Akim Demaille <demaille@gostai.com>
2879
2880 Better defaults for bench.pl.
2881 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2882 default values.
2883 Adjust &verbose uses.
2884 (-q, --quiet): New.
2885
2886 2008-11-04 Akim Demaille <demaille@gostai.com>
2887
2888 Make variant.yy more complex.
2889 std::list cannot be copied via memcpy, they are more demanding than
2890 std::string. Use one std::list to strengthen the test.
2891
2892 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2893 Adjust.
2894 Create a list of strings, instead of a single large string.
2895
2896 2008-11-04 Akim Demaille <demaille@gostai.com>
2897
2898 bench.pl --bench.
2899 * etc/bench.pl.in (--bench, $bench): New.
2900
2901 2008-11-04 Akim Demaille <demaille@gostai.com>
2902
2903 Sort methods.
2904 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2905 Define it after as().
2906
2907 2008-11-04 Akim Demaille <demaille@gostai.com>
2908
2909 Useless parens.
2910 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2911
2912 2008-11-04 Akim Demaille <demaille@gostai.com>
2913
2914 Issue missing synclines after user actions.
2915 * data/c.m4 (b4_case): Issue synclines on the output file.
2916
2917 2008-11-04 Akim Demaille <demaille@gostai.com>
2918
2919 Remove trailing empty line.
2920 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2921 epilogue.
2922
2923 2008-11-04 Akim Demaille <demaille@gostai.com>
2924
2925 Fix output of copyright years.
2926 * data/bison.m4 (b4_copyright): Fix the indentation of the
2927 copyright year paragraph.
2928 Use b4_copyright_years when no years are given.
2929 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2930 (b4_copyright_years): New.
2931 Use it.
2932
2933 2008-11-04 Akim Demaille <demaille@gostai.com>
2934
2935 Avoid the spurious initial empty line.
2936 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2937 the end of @output request to suppress the empty line that
2938 results.
2939
2940 2008-11-04 Akim Demaille <demaille@gostai.com>
2941
2942 Remove parser::rhs_number_type.
2943 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2944 (yyrhs_): Use b4_table_define.
2945
2946 2008-11-04 Akim Demaille <demaille@gostai.com>
2947
2948 Fix iteration type.
2949 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2950
2951 2008-11-04 Akim Demaille <demaille@gostai.com>
2952
2953 Factor the declaration of the integer tables.
2954 * data/lalr1-fusion.cc (b4_table_define): New.
2955 Use it.
2956
2957 2008-11-03 Akim Demaille <demaille@gostai.com>
2958
2959 Fix indentation of tables in lalr1.cc
2960 * data/lalr1-fusion.cc: Fix the indentation.
2961
2962 2008-11-03 Akim Demaille <demaille@gostai.com>
2963
2964 Destroy the lhs symbols after reduction.
2965 * data/lalr1-fusion.cc (parse): After the user action, when in
2966 variant mode, destroy the lhs symbols.
2967
2968 2008-11-03 Akim Demaille <demaille@gostai.com>
2969
2970 Simplify yysyntax_error_ use.
2971 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2972 type, but make it unnamed in the declaration when it is not used.
2973
2974 2008-11-03 Akim Demaille <demaille@gostai.com>
2975
2976 Let yy::variant::build return an lvalue.
2977 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2978 object.
2979
2980 2008-11-03 Akim Demaille <demaille@gostai.com>
2981
2982 Define yy::variant only when needed.
2983 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2984 used.
2985
2986 2008-11-03 Akim Demaille <demaille@gostai.com>
2987
2988 Bench the three-stack lalr1.cc.
2989 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2990 one-stack one.
2991
2992 2008-11-03 Akim Demaille <demaille@gostai.com>
2993
2994 Fail on parse error in calc++.
2995 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2996 status.
2997 * examples/calc++/test ($me, $number, $exit, run): New.
2998 Use them to propagate errors to the exit status.
2999
3000 2008-11-03 Akim Demaille <demaille@gostai.com>
3001
3002 Don't specify the skeleton twice in the example.
3003 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3004 file does what is needed.
3005
3006 2008-11-03 Akim Demaille <demaille@gostai.com>
3007
3008 bench: Improve output.
3009 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3010
3011 2008-11-03 Akim Demaille <demaille@gostai.com>
3012
3013 bench: check impact of %debug on variants.
3014 * etc/bench.pl.in (variant_grammar): Fix the computation of
3015 $variant.
3016 Generate a grammar file that can work with or without %debug.
3017 Do use the @directive.
3018 (bench_variant_parser): Check impact of %debug.
3019 (@directives): Rename all the occurrences to...
3020 (@directive): this, for consistency.
3021
3022 2008-11-03 Akim Demaille <demaille@gostai.com>
3023
3024 bench: report the size too.
3025 * etc/bench.pl.in ($iterations): Defaults to -3.
3026 (&bench_grammar): Require hireswallclock.
3027 Compute and display the size of the result.
3028 More comments.
3029
3030 2008-11-03 Akim Demaille <demaille@gostai.com>
3031
3032 bench: More use of the verbosity level.
3033 * etc/bench.pl.in ($verbose, &verbose): New.
3034 Use them.
3035 More POD documentation.
3036
3037 2008-11-03 Akim Demaille <demaille@gostai.com>
3038
3039 bench.pl: a command line interface
3040 * etc/bench.pl.in: More doc.
3041 Some fixes in the documentation.
3042 ($cflags, $iterations, &help, &getopt): New.
3043 Use them.
3044 (&variant_grammar): Let the number of stages be 10 times what is
3045 specified.
3046
3047 2008-11-03 Akim Demaille <demaille@gostai.com>
3048
3049 Bench the use of Boost.Variants.
3050 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3051 New.
3052 (&compile): Be ready to compile C++ parsers.
3053 (&bench_push_parser): Move debug information to the outermost
3054 level.
3055 * THANKS: Add Michiel De Wilde.
3056
3057 2008-11-03 Akim Demaille <demaille@gostai.com>
3058
3059 bench.pl: Pass directives as a list instead of as a string.
3060 * etc/bench.pl.in (&directives): New.
3061 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3062 directives.
3063 (&triangular_grammar): Do use the directives (were ignored).
3064 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3065 directives.
3066
3067 2008-11-03 Akim Demaille <demaille@gostai.com>
3068
3069 Improve genericity of bench.pl.
3070 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3071 argument.
3072 (&bench_push_parser): New.
3073 Call it.
3074
3075 2008-11-03 Akim Demaille <demaille@gostai.com>
3076
3077 Add documentation to bench.pl.
3078 * etc/bench.pl.in: Comment changes.
3079
3080 2008-11-03 Akim Demaille <demaille@gostai.com>
3081
3082 Fuse the three stacks into a single one.
3083
3084 In order to make it easy to perform benchmarks to ensure that
3085 there are no performance loss, lalr1.cc is forked into
3086 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3087 lalr1.cc.
3088
3089 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3090 exercized by the test suite, the user must install a symbolic link
3091 from lalr1.cc to it.
3092
3093 Instead of having three stacks (state, value, location), use a
3094 stack of triples. This considerably simplifies the code (and it
3095 will be easier not to require locations as currently does the C++
3096 parser), and also gives a 10% speedup according to
3097 etc/bench (probably mainly since memory allocation is done once
3098 instead of three times).
3099
3100 Another motivation is to make it easier to destruct properly
3101 semantic values: now that they are bound to their state (hence
3102 symbol type) it will be easier to call the appropriate destructor.
3103
3104 These changes should probably benefit the C parser too.
3105
3106 * data/lalr1.cc: Copy as...
3107 * data/lalr1-fusion.cc: this new file.
3108 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3109 from c++.m4.
3110 (state_stack_type, semantic_stack_type, location_stack_type)
3111 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3112 (data_type, stack_type, yystack_): New.
3113 (YYLLOC_DEFAULT, yypush_): Adjust.
3114 (yyerror_range): Now based on data_type, not location_type.
3115
3116 2008-11-03 Akim Demaille <demaille@gostai.com>
3117
3118 Push the state, value, and location at the same time.
3119 This is needed to prepare a forthcoming patch that fuses the three
3120 stacks into one.
3121
3122 * data/lalr1.cc (parser::yypush_): New.
3123 (parser::yynewstate): Change the semantics: instead of arriving to
3124 this label when value and location have been pushed, but yystate
3125 is to be pushed on the state stack, now the three of them must
3126 have been pushed before. yystate still must be the new state.
3127 This allows to use yypush_ everywhere instead of individual
3128 handling of the stacks.
3129
3130 2008-11-03 Akim Demaille <demaille@gostai.com>
3131
3132 Prefer references to pointers.
3133 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3134 definition to use references instead of pointers.
3135 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3136 Take the value and location as references.
3137 Adjust callers.
3138
3139 2008-11-03 Akim Demaille <demaille@gostai.com>
3140
3141 stack::size instead of stack::height.
3142 * data/lalr1.cc (stack::height): Rename as...
3143 (stack::size): this.
3144 Fix the output type.
3145 Comment changes.
3146
3147 2008-11-03 Akim Demaille <demaille@gostai.com>
3148
3149 Use variants to support objects as semantic values.
3150 This patch was inspired by work by Michiel De Wilde. But he used
3151 Boost variants which (i) requires Boost on the user side, (ii) is
3152 slow, and (iii) has useless overhead (the parser knows the type of
3153 the semantic value there is no reason to duplicate this
3154 information as Boost.Variants do).
3155
3156 This implementation reserves a buffer large enough to store the
3157 largest objects. yy::variant implements this buffer. It was
3158 implemented with Quentin Hocquet.
3159
3160 * src/output.c (type_names_output): New.
3161 (output_skeleton): Invoke it.
3162 * data/c++.m4 (b4_variant_if): New.
3163 (b4_symbol_value): If needed, provide a definition for variants.
3164 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3165 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3166 (b4_char_sizeof, yy::variant): New.
3167 (parser::parse): If variants are requested, define
3168 parser::union_type, parser::variant, change the definition of
3169 semantic_type, construct $$ before running the user action instead
3170 of performing a default $$ = $1.
3171 * examples/variant.yy: New.
3172 Based on an example by Michiel De Wilde.
3173
3174 2008-11-03 Akim Demaille <demaille@gostai.com>
3175
3176 Parameterize the extraction of semantic values.
3177 To make future changes easier, no longer rely on ".TYPE" being the
3178 way to get a semantic value.
3179
3180 * data/c.m4 (b4_symbol_value): New.
3181 Use it.
3182 * data/c++.m4, data/yacc.c: Use it.
3183 * data/glr.c: Use b4_symbol_value.
3184 (b4_rhs_data): New.
3185 Use it.
3186
3187 2008-11-03 Akim Demaille <demaille@gostai.com>
3188
3189 Prepare easier M4 changes.
3190 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3191 future changes.
3192
3193 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3194
3195 Initiate further development.
3196 * NEWS: Create an empty section for new entries.
3197 * gnulib: Update submodule to HEAD.
3198
3199 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3200
3201 * NEWS: Version 2.4.
3202
3203 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3204
3205 Prepare for next release.
3206 * NEWS: Briefly mention changes since 2.3b.
3207 * README: Say GNU m4 1.4.6, which we've been requiring in release
3208 announcements already, not 1.4.3, which breaks the build.
3209
3210 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3211
3212 Say %language is experimental.
3213 We're thinking of extending it's effect on output file naming. See the
3214 thread at
3215 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3216 * NEWS: Say it's experimental.
3217 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3218 recommend it over %skeleton for now.
3219 (Bison Options): Likewise.
3220 (C++ Bison Interface): Use %skeleton not %language.
3221 (Calc++ Parser): Use %skeleton not %language.
3222 * src/getargs.c (usage): Say it's experimental.
3223
3224 2008-11-01 Di-an Jan <dianj@freeshell.org>
3225 Paolo Bonzini <bonzini@gnu.org>
3226
3227 Support all Java parser class modifiers.
3228 * data/java.m4 (b4_percent_define_get3): New.
3229 (b4_final_if, b4_strictfp_if): New.
3230 * data/lalr1.java (final, strictfp, extends, implements): Support.
3231 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3232 documentation.
3233 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3234 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3235 (AT_CHECK_JAVA_GREP): New.
3236 (Java parser class modifiers): New test.
3237 (Java parser class extends and implements): New test.
3238
3239 Model exception propagation better with throws and lex_throws.
3240 * data/java.m4 (b4_list2): New.
3241 (throws): Change default.
3242 * data/lalr1.java (yyaction): Add throws.
3243 (parse): Add lex_throws in addition to throws.
3244 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3245 * tests/java.at (Java throws specifications): New test.
3246
3247 Improve documentation for Java parsers.
3248 * doc/bison.texinfo (Java Parsers): Add subsections.
3249 Don't quote first argument of %define.
3250 (Java Bison Interface): Document output files. Move documentation
3251 of parser class and merge into Java Parser Interface. Document
3252 features that error out. Document directives with no effect.
3253 Move note about Javadoc higher.
3254 (Java Semantic Values): Explicitly mention stype.
3255 Document that generic types cannot be used.
3256 (Java Location Values): Use @deftypeivar. Document constructors.
3257 Correct return value for toString.
3258 (Java Parser Interface): List undocumented constants/fields.
3259 Move documentation of fields added by %parse-param closer to list
3260 of members. Document that token names are added as fields.
3261 Document constructors accurately. Remove error method.
3262 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3263 Interface. Describe %code lexer and yylex accutately.
3264 Remove documentation that does not match the code.
3265 (Java Action Features): New.
3266 (Java Differences): Add reference. Add item on semantic values.
3267 Add note about @{ ... @}. Clarify %% epilogue placement.
3268 (Java Declarations Summary): New.
3269
3270 Fix Java skeleton.
3271 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3272 (b4_remove_comma): Quote test argument.
3273 (b4_identification): Remove "bison" field.
3274 * tests/java.at (Java parser class and package names): New test.
3275 (Java %parse-param and %lex-param): New test.
3276 (Java stype, position_class and location_class): New test.
3277
3278 2008-10-31 Di-an Jan <dianj@freeshell.org>
3279
3280 * data/lalr1.jave: Update copyright years.
3281 (YYParser): Correct name of "generated from" file in Javadoc:
3282 use b4_file_name instead of @ofile@.
3283 (Location constructor): Correct Javadoc parameter name.
3284 (yylloc): Add missing opening m4 quote after b4_location_if.
3285 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3286 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3287 (YYParser constructor): Correct Javadoc parameter name.
3288
3289 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3290
3291 Always put auxiliary code files in the same dir as other output files.
3292 * src/files.c (compute_file_name_parts): When the user specifies
3293 --output but not --file-prefix, extract the directory prefix from the
3294 file prefix not from the grammar file name. This affects the location
3295 of files like location.hh generated by the C++ skeleton. The includes
3296 in the other output files require this fix.
3297 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3298 for expected output files.
3299 (Output files): Add a test for the above.
3300
3301 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3302
3303 * gnulib: Update submodule to HEAD.
3304
3305 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3306
3307 Update copyright year.
3308 * src/files.c: Here.
3309
3310 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3311
3312 Don't overwrite the input file.
3313 * src/files.c (output_file_name_check): Fatal error if using input file
3314 for output.
3315 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3316 argument.
3317 (Conflicting output files): Add test.
3318
3319 2008-10-28 Akim Demaille <demaille@gostai.com>
3320
3321 Space changes.
3322 * data/lalr1.cc: Formatting changes.
3323
3324 2008-10-28 Akim Demaille <demaille@gostai.com>
3325
3326 Don't define debugging functions when !YYDEBUG.
3327 * data/lalr1.cc (debug_stream, set_debug_stream)
3328 (debug_level_type, debug_level, set_debug_level): Don't
3329 declare them when YYDEBUG is not defined.
3330 The implementation are already YYDEBUG-aware.
3331
3332 2008-10-28 Akim Demaille <demaille@gostai.com>
3333
3334 Prefer "continue" for empty loop bodies.
3335 * etc/bench.pl.in: Use "continue" instead of {}.
3336
3337 2008-10-28 Akim Demaille <demaille@gostai.com>
3338
3339 Space and comments changes.
3340 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3341 * data/c.m4, data/lalr1.cc: Space changes.
3342
3343 2008-10-28 Akim Demaille <demaille@gostai.com>
3344
3345 Make gnulib a submodule.
3346 * gnulib: New.
3347 * .gitmodules (gnulib): New.
3348
3349 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3350
3351 Fix yyerror_range for user-defined location type in C++. Reported by
3352 Georg Sauthoff at
3353 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3354 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3355 * THANKS (Georg Sauthoff): Add.
3356
3357 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3358
3359 Update several administrative files mainly to facilitate releasing.
3360 * HACKING (Administrivia): Make the git-merge-changelog notes more
3361 helpful.
3362 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3363 (Release Procedure): Update for git and add numerous details that were
3364 previously missing.
3365 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3366 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3367 that announcements don't claim we bootstrapped with whatever bison
3368 happened to be in PATH. Add flex as a bootstrap tool.
3369 * Makefile.maint: Remove, previously replaced by maint.mk.
3370 * Makefile.cfg: Remove, and migrate settings to...
3371 * cfg.mk: ... here for the sake of `make announcement'.
3372 * bootstrap.conf (gnulib_modules): Add announce-gen.
3373 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3374 Berry.
3375
3376 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3377
3378 Small but important bugfixes for the Java skeleton.
3379 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3380 (yy_symbol_print): Call toString on yyvaluep.
3381
3382 2008-08-29 Akim Demaille <demaille@gostai.com>
3383
3384 Clarify UPDATED use.
3385 * doc/bison.texinfo: It refers to the last edition of this file,
3386 not to the release date of Bison.
3387 Reported by Joel E. Denny.
3388
3389 2008-08-29 Akim Demaille <demaille@gostai.com>
3390
3391 * README: Update FAQ pointer.
3392 Reported by Joel E. Denny.
3393
3394 2008-08-27 Eric Blake <ebb9@byu.net>
3395
3396 Resync m4sugar from autoconf.
3397 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3398 (m4_init): Adjust to latest m4.git changes.
3399 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3400 effects.
3401 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3402 (_m4_list_cmp): Reduce side effects.
3403
3404 2008-08-27 Akim Demaille <demaille@gostai.com>
3405
3406 Check yyerrok in calc.at.
3407 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3408 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3409 expected.
3410
3411 2008-08-27 Akim Demaille <demaille@gostai.com>
3412
3413 Support yyerrok in lalr1.cc.
3414 YYBACKUP is still to import back into lalr1.cc.
3415 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3416
3417 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3418
3419 For maintainer-check*, don't recompile for a $(VERSION) update.
3420 * cfg.mk: New file.
3421 (_is-dist-target): Override the one in GNUmakefile.
3422 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3423
3424 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3425
3426 Update for recent change to gnulib.
3427 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3428 string.h now.
3429
3430 2008-08-15 Eric Blake <ebb9@byu.net>
3431
3432 Remaining m4sugar merge from autoconf.
3433 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3434 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3435 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3436 * src/output.c (output_skeleton): Tell m4 how to find it.
3437
3438 Partial m4sugar merge from autoconf: m4_map.
3439 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3440 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3441 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3442 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3443 for empty list.
3444 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3445 Likewise.
3446 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3447 declares it.
3448
3449 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3450
3451 Keep .version and PACKAGE_VERSION in sync.
3452 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3453 dependency, and add comments justifying this in more detail. Discussed
3454 starting at
3455 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3456
3457 2008-08-06 Eric Blake <ebb9@byu.net>
3458
3459 Partial m4sugar merge from autoconf: m4_shiftn.
3460 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3461 (m4_shift2, m4_shift3): New macros.
3462 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3463 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3464 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3465 * data/java.m4 (b4_remove_comma): Likewise.
3466
3467 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3468 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3469 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3470 (m4_init): Consolidate wrapped text into single m4_wrap.
3471 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3472 in wrapped text.
3473
3474 2008-08-05 Eric Blake <ebb9@byu.net>
3475
3476 Partial m4sugar merge from autoconf: builtins, version.m4.
3477 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3478 (m4_prepend): Remove, as it is unused and inherently quadratic,
3479 whereas m4_append is linear in newer m4.
3480 (m4_mkstemp): New builtin.
3481 (m4_symbols): Make rename conditional.
3482 (m4_version_prereq): Ensure fatal error if used in bison, which
3483 intentionally lacks version.m4.
3484
3485 Fix comments in m4sugar.
3486 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3487
3488 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3489
3490 Update for recent .gitignore fix in Gnulib.
3491 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3492 anchored .gitignore entries.
3493
3494 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3495
3496 Set gnu or gnits strictness.
3497 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3498 development and gnits strictness for releases. Based on Eric Blake's
3499 suggestion at
3500 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3501
3502 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3503
3504 * NEWS: Clarify documentation of %language.
3505
3506 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3507
3508 Support usage of git-merge-changelog.
3509 * .gitattributes: New.
3510 * HACKING: Document usage of git-merge-changelog.
3511 * bootstrap: Install git-merge-changelog entries in .git/config
3512 if appropriate.
3513
3514 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3515
3516 Remove remaining dependence on CVS Id keyword.
3517 * ChangeLog: For the sake of people still using CVS, don't use dollars
3518 when mentioning Id.
3519 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3520 unusual anyway.
3521 * data/xslt/xml2dot.xsl: Likewise.
3522 * data/xslt/xml2text.xsl: Likewise.
3523 * data/xslt/xml2xhtml.xsl: Likewise.
3524 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3525 * doc/Makefile.am (neutralize): Remove, no longer needed.
3526 (.x.1): Don't use neutralize.
3527 (edit): Don't substitute for ID.
3528 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3529
3530 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3531
3532 Fix dependence on computed configure variables.
3533 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3534 $(top_srcdir)/configure.ac so that changes to computed variables, such
3535 as PACKAGE_VERSION, are seen.
3536 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3537
3538 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3539
3540 Update copyright dates for recent changes.
3541 * Makefile.am: Here.
3542 * src/Makefile.am: Here.
3543 * src/reduce.c: Here.
3544 * tests/reduce.at: Here.
3545
3546 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3547
3548 Use git-version-gen for version names between releases.
3549 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3550 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3551 * .prev-version: New.
3552 * .version.in: Remove.
3553 * ChangeLog: Remove the Id previously used for capturing the CVS
3554 revision.
3555 * GNUmakefile: Remove, now copied from Gnulib.
3556 * Makefile.am: Add code suggested by comments in
3557 build-aux/git-version-gen.
3558 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3559 .prev-version, and .version.
3560 * NEWS (2.3b+): Rename to...
3561 (?.?): ... this because we're dropping the "+" version naming scheme,
3562 but, in general, we still can't be sure of our next release name.
3563 * bootstrap: Add a quick hack to remove from .gitignore the
3564 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3565 entry. This should really be fixed in gnulib instead.
3566 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3567 * configure.ac (AC_INIT): Set version name by invoking
3568 build-aux/git-version-gen.
3569 (AC_CONFIG_FILES): Remove .version, now generated by
3570 build-aux/git-version-gen.
3571 * maint.mk: New, copied from coreutils.
3572 * doc/.cvsignore (bison.1): Add.
3573 * doc/.gitignore (/bison.1): Add.
3574 * doc/bison.1: Remove, generated.
3575 * src/.cvsignore (revision.c): Remove.
3576 * src/.gitignore (/revision.c): Remove.
3577 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3578 (BUILT_SOURCES): Remove revision.c.
3579 (revision.c): Remove.
3580 * src/getargs.c (version): Don't print revision after the VERSION.
3581 * src/revision.h: Remove.
3582
3583 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 Fix untranslatable composition of sentences. Reported by Goran
3586 Uddeborg at
3587 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3588 * THANKS (Goran Uddeborg): Add.
3589 * src/reduce.c (reduce_print): Report the number of nonterminals and
3590 rules useless in the grammar in separate sentences.
3591 * tests/reduce.at (Useless Rules): Update output.
3592 (Reduced Automaton): Likewise.
3593 (Underivable Rules): Likewise.
3594 (Empty Language): Likewise.
3595
3596 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3597
3598 Fix some .gitignore and .cvsignore problems.
3599 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3600 (insert_vc_ignore): ... this new function, which prepends `/' to all
3601 .gitignore entries before passing them to insert_sorted_if_absent.
3602 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3603 .cvsignore files are maintained even though Bison developers run
3604 bootstrap while using Git.
3605 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3606 unneeded by Bison.
3607 (gnulib): Add.
3608 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3609 unneeded. Reported by Eric Blake.
3610 * lib/.gitignore (/*~): Add.
3611 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3612 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3613 Blake.
3614 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3615
3616 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3617
3618 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3619 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3620 * bootstrap.conf (gnulib_modules): Add unsetenv.
3621 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3622 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3623 (/setenv.m4): Add.
3624 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3625 the first argument because it may become position-dependent, and unset
3626 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3627 Add comments explaining these issues in more detail.
3628
3629 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3630
3631 Add .gitignore everywhere based on .cvsignore.
3632 * .gitignore: New.
3633 * build-aux/.gitignore: New.
3634 * data/.gitignore: New.
3635 * doc/.gitignore: New.
3636 * etc/.gitignore: New.
3637 * examples/.gitignore: New.
3638 * examples/calc++/.gitignore: New.
3639 * lib/.gitignore: New.
3640 * m4/.gitignore: New.
3641 * po/.gitignore: New.
3642 * runtime-po/.gitignore: New.
3643 * src/.gitignore: New.
3644 * tests/.gitignore: New.
3645
3646 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3647
3648 * NEWS (2.3b+): New section, empty for now.
3649 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3650
3651 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3652
3653 * NEWS (2.3b): Update release date since there has been a delay in
3654 getting the announcements and tarballs out.
3655
3656 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3657
3658 * NEWS: Version 2.3b.
3659 * configure.ac (AC_INIT): Likewise.
3660 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3661
3662 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3663
3664 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3665 been doing it for years.
3666 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3667 (Release Procedure): Add FIXME about make alpha being unmaintained.
3668
3669 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3670
3671 * data/yacc.c: Reformat m4 a little for readability.
3672 * src/lalr.c (build_relations): Correct comment.
3673
3674 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3675
3676 DJGPP specific issue.
3677 * djgpp/config.sed: Fixes required to run configure scripts generated
3678 by autoconf 2.62.
3679
3680 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3681
3682 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3683 coordinator@translationproject.org.
3684
3685 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3686
3687 * THANKS: Add Eric Blake.
3688
3689 2008-04-23 Eric Blake <ebb9@byu.net>
3690
3691 Revert prior patch, by working around autoconf regression.
3692 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3693 ("Output file name: ("): Uncomment test.
3694 ("Output file name: )"): Likewise.
3695 Based on an idea from Noah Misch.
3696
3697 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3698
3699 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3700 2.61. Reported by Juan Manuel Guerrero at
3701 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3702 * tests/output.at ("Output file name: ("): Comment out test case for
3703 now.
3704 ("Output file name: )"): Likewise.
3705
3706 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3707
3708 * GNUmakefile: Update git-version-gen invocation so make dist
3709 succeeds.
3710
3711 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3712
3713 Update to the current gnulib CVS repository, and fix trigraph handling
3714 in Bison.
3715 * bootstrap: Update gnulib CVS repository URL.
3716 (symlink_to_dir): Encapsulate the code that guarantees the destination
3717 directory exists into...
3718 (check_dst_dir): ... this new function, and...
3719 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3720 fail when copying files into lib/uniwidth/.
3721 * src/output.c (prepare_symbols): When writing yytname muscles, where
3722 symbol names will be encoded in C-string literals, tell quotearg to
3723 escape trigraphs. This used to be the default in gnulib.
3724 * tests/regression.at (Token definitions): Because of the change in
3725 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3726 escapes trigraphs in symbol names. Thus, yytname no longer has
3727 trigraphs unnecessarily doubly escaped. Update test case output.
3728 Extend test case to be sure Bison's own error messages will no longer
3729 have trigraphs in symbol names unnecessarily escaped once.
3730
3731 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3732
3733 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3734 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3735 * .cvsignore: Add .version.
3736 * .version.in: New.
3737 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3738 * configure.ac (AC_CONFIG_FILES): Add .version.
3739 * build-aux/.cvsignore: Add git-version-gen.
3740
3741 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3742
3743 * NEWS (2.3a+): Mention that -g now takes an argument.
3744 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3745 consistency. Update the -g and -x entries now that they take
3746 arguments. Use brackets to indicate optional arguments.
3747 * src/getargs.c (usage): Explain the relationship between arguments of
3748 long and short options more completely. Document --defines and -d
3749 separately since the former takes an argument but, for POSIX Yacc, the
3750 latter does not.
3751 (short_options): Let -W take an optional argument like --warnings.
3752 (getargs): Sort cases.
3753
3754 2008-02-28 Akim Demaille <demaille@gostai.com>
3755
3756 * doc/bison.texinfo: Fix a few typos.
3757
3758 2008-02-28 Akim Demaille <akim@epita.fr>
3759
3760 * doc/bison.texinfo (Bison Options): Document -W.
3761 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3762
3763 2008-02-28 Akim Demaille <akim@epita.fr>
3764
3765 * src/getargs.c (short_options): Split and sort for readability.
3766 -g and -x take optional arguments, just like their long options.
3767 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3768 understand.
3769 Fix the handling of $opt which resulted in all the argument to be
3770 considered as optional.
3771
3772 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3773
3774 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3775 say its interface is experimental.
3776 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3777 Java.
3778 (Bison Options): In the -L and --language entry, mention Java.
3779 (Java Bison Interface): Say the interface is experimental.
3780 * src/getargs.c (usage): Mention -L and --language.
3781
3782 * NEWS (2.3a+): Say the push parsing interface is experimental.
3783 * doc/bison.texinfo (Push Decl): Likewise.
3784 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3785 (Push Parser Function): Likewise.
3786 (Pull Parser Function): Likewise.
3787 (Parser Create Function): Likewise.
3788 (Parser Delete Function): Likewise.
3789 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3790 yypull_parse, and yypush_parse entries.
3791
3792 * NEWS (2.3a+): Mention XML support, and say the schema is
3793 experimental.
3794 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3795 * src/getargs.c (usage): Say the XML schema is experimental.
3796
3797 * NEWS (2.3a+): Say option instead of flag.
3798
3799 2008-02-21 Wojciech Polak <polak@gnu.org>
3800
3801 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3802 text.
3803
3804 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3805
3806 Fix impure push parser compile error reported by Bob Rossi at
3807 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3808 * data/yacc.c: Clean up whitespace in the output a little.
3809 (yypstate_allocated): Define for impure push parsers regardless of
3810 whether the pull interface is also requested.
3811 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3812 check impure push parsers without the pull interface.
3813
3814 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3815 yyerror takes arguments specified by %parse-param while yypstate_new
3816 does not.
3817 * doc/bison.texinfo (Parser Create Function): Document that
3818 yypstate_new returns 0 for multiple impure parser instances.
3819 * tests/push.at (Push Parsing: Multiple impure instances): Update
3820 expected stderr output.
3821
3822 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3823
3824 * runtime-po/POTFILES.in (push.c): Remove.
3825
3826 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3827
3828 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3829 * data/push.c: Rename to...
3830 * data/yacc.c: ... this, overwriting it.
3831 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3832 `%push-pull-parser' -> `%define api.push_pull "both"'.
3833 Remove old yacc.c tests, and update push.c tests to yacc.c.
3834
3835 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3836
3837 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3838 `"%code top" blocks' instead of `%code "top" blocks'.
3839 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3840 Clean up whitespace in the output a little.
3841
3842 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3843
3844 Fix documentation problems reported by Tim Josling at
3845 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3846 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3847 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3848 integers. Explain the effect of literal string aliases on error
3849 messages. Copy token 0 documentation from the C++ skeleton
3850 documentation.
3851
3852 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3853
3854 Accept a token number in a %left, %right, or %nonassoc for POSIX
3855 conformance. Reported by Tim Josling at
3856 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3857 * NEWS (2.3a+): Mention.
3858 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3859 and code numbers are treated by precedence declarations.
3860 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3861 of symbols.1.
3862 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3863 of symbol.
3864 (symbol.prec): New, just like symbol but allows INT.
3865 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3866 longer holds.
3867 * tests/regression.at (Token number in precedence declaration): New
3868 test case.
3869
3870 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3871
3872 DJGPP specific issues.
3873 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3874 be changed. Copyright timestamp adjusted.
3875 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3876 be changed. Copyright timestamp adjusted.
3877 * djgpp/config.site: Copyright timestamp adjusted.
3878 * djgpp/config_h.sed: Copyright timestamp adjusted.
3879 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3880 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3881 filename translation list.
3882 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3883 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3884 files shall be created. Before trying to use the temp dir where the
3885 environment variable points to check that the dir really exists. If
3886 not default to the cwd as temp dir. Copyright timestamp adjusted.
3887 * djgpp/subpipe.h: Copyright timestamp adjusted.
3888 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3889
3890 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3891
3892 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3893
3894 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3895
3896 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3897 Problem reported by Claudio Saavedra in
3898 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3899
3900 2008-01-05 Wojciech Polak <polak@gnu.org>
3901
3902 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3903 document's title with the input grammar file name.
3904
3905 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3906
3907 Automate regression testing of the XML/XSLT implementation. Discussed
3908 starting at
3909 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3910 * configure.ac (XSLTPROC): New substitution.
3911 * Makefile.am (maintainer-xml-check): New phony target invoking...
3912 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3913 invoking make maintainer-check with BISON_TEST_XML=1.
3914 * tests/atlocal.in (XSLTPROC): New.
3915 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3916 not to report reachable memory when Bison is expected to have a
3917 non-zero exit status and (2) to compare XML/XSLT output with --graph
3918 and --report=all output for every working grammar when
3919 BISON_TEST_XML=1.
3920 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3921 (AT_BISON_CHECK_XML): New.
3922 (AT_QUELL_VALGRIND): New.
3923 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3924 (AT_CHECK): ... don't redefine this since this was the old way to
3925 quell Valgrind.
3926 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3927 AT_BISON_CHECK invocations.
3928 * tests/c++.at: Likewise.
3929 * tests/calc.at: Likewise.
3930 * tests/conflicts.at: Likewise.
3931 * tests/cxx-type.at: Likewise.
3932 * tests/existing.at: Likewise.
3933 * tests/glr-regression.at: Likewise.
3934 * tests/headers.at: Likewise.
3935 * tests/input.at: Likewise.
3936 * tests/java.at: Likewise.
3937 * tests/output.at: Likewise.
3938 * tests/push.at: Likewise.
3939 * tests/reduce.at: Likewise.
3940 * tests/regression.at: Likewise.
3941 * tests/sets.at: Likewise.
3942 * tests/skeletons.at: Likewise.
3943 * tests/synclines.at: Likewise.
3944 * tests/torture.at: Likewise.
3945 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3946 tends to hang xsltproc.
3947 (Big horizontal): Likewise.
3948
3949 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3950
3951 In XML output, remove redundant class attribute on symbol element.
3952 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3953 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3954 look up a symbol to determine whether it's a nonterminal or terminal.
3955 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3956 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3957
3958 Add prec/assoc information to XML output.
3959 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3960 %prec, add a percent_prec attribute.
3961 * src/print-xml.c (print_grammar): For each terminal that has a
3962 precedence or associativity, add a prec or assoc attribute.
3963 (xml_indent): New.
3964 (xml_puts): Use xml_indent.
3965 (xml_printf): Use xml_indent.
3966 * src/print-xml.h (xml_indent): Prototype.
3967
3968 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3969 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3970
3971 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3972
3973 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3974 (bison:ruleByNumber): ... this for clarity.
3975 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3976 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3977 (xsl:template match="reduction"): Update.
3978 (xsl:template match="item"): Update.
3979 (xsl:template match="reduction"): Update.
3980
3981 In the XML output, don't print the list of rules where symbols appear.
3982 Compute it in XSLT instead. Discussed at
3983 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3984 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3985 (bison:ruleByRhs): New.
3986 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3987 bison:ruleByRhs.
3988 (xsl:template match="terminal/rule"): Remove.
3989 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3990 bison:ruleByRhs.
3991 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3992 Remove.
3993 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3994 bison:ruleByRhs and mode="number-link" for rule template.
3995 (xsl:template match="terminal/rule"): Remove.
3996 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3997 bison:ruleByRhs and mode="number-link" for rule template.
3998 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3999 Rewrite as...
4000 (xsl:template match="rule" mode="number-link"): ... this.
4001 * src/print-xml.c (print_grammar): Don't print the list of rules.
4002
4003 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4004
4005 Don't let --report affect XML output; always print all information.
4006 Discussed at
4007 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4008 * src/conflicts.c (log_resolution): Implement.
4009 * src/print-xml.c (print_core): Implement.
4010 (print_state): Implement.
4011 (print_xml): Implement.
4012
4013 * NEWS (2.3a+): Fix quotes.
4014 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4015 don't let %verbose clear the list specified by --report.
4016
4017 2007-11-26 Akim Demaille <akim@epita.fr>
4018
4019 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4020
4021 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4022
4023 In the XML output, list useless and unused symbols and rules with the
4024 useful ones and add a "usefulness" attribute. Discussed starting at
4025 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4026 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4027 (grammar_rules_print_xml): Print all rules instead of just those
4028 useful in the grammar, and add a "usefulness" attribute.
4029 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4030 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4031 (print_grammar): Print all nonterminals instead of just useful ones,
4032 and add a "usefulness" attribute to nonterminals and terminals.
4033 (print_xml): Don't print a separate "reductions" or
4034 "rules-useless-in-parser" element.
4035 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4036 (reduce_xml): Remove.
4037 (reduce_token_unused_in_grammar): New.
4038 (reduce_nonterminal_useless_in_grammar): New.
4039 * src/reduce.h (reduce_xml): Remove prototype.
4040 (reduce_token_unused_in_grammar): Add prototype.
4041 (reduce_nonterminal_useless_in_grammar): Add prototype.
4042 * data/xslt/xml2text.xsl: Update for XML changes.
4043 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4044 * tests/reduce.at (Useless Terminals): Update output.
4045 (Useless Rules): Update output.
4046 (Reduced Automaton): Update output.
4047
4048 Say "Terminals unused in grammar" instead of "Unused terminals".
4049 * NEWS (2.3a+): Update.
4050 * doc/bison.texinfo (Understanding): Update example output.
4051 * src/reduce.c (reduce_output): Implement.
4052 * data/xslt/xml2text.xsl: Implement.
4053 * data/xslt/xml2xhtml.xsl: Implement.
4054
4055 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4056
4057 Accept --report-file=FILE to override the default `.output' filename.
4058 * NEWS (2.3a+): Mention.
4059 * doc/bison.texinfo (Bison Options): Add an entry.
4060 * src/files.c (compute_output_file_names): Don't override
4061 spec_verbose_file if already set.
4062 * src/getargs.c (usage): Document --report-file.
4063 (REPORT_FILE_OPTION): New anonymous enum member.
4064 (long_options): Add entry for it.
4065 (getargs): Add case for it setting spec_verbose_file.
4066
4067 * build-aux/cross-options.pl: Don't record a short option just because
4068 there's an arg.
4069 * doc/.cvsignore: Add yacc.1.
4070
4071 2007-11-14 Akim Demaille <akim@epita.fr>
4072
4073 * doc/yacc.1.in: New.
4074 * configure.ac, doc/Makefile.am: Adjust.
4075 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4076 config.h symbol.
4077 Use AC_SUBST for assignments too.
4078 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4079
4080 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4081
4082 * src/gram.c: Remove comments that duplicate comments in gram.h.
4083
4084 When reporting useless rules and nonterminals, say "useless in grammar"
4085 instead of "useless", and say "useless in parser" instead of "never
4086 reduced". Discussed starting at
4087 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4088 * NEWS (2.3a+): Mention this change.
4089 * data/xslt/xml2text.xsl: Update output text and expected input XML
4090 element names to match changes below.
4091 * data/xslt/xml2xhtml.xsl: Likewise.
4092 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4093 Contents: "Rules useless in parser due to conflicts".
4094 * doc/bison.texinfo (Decl Summary): Reword a little.
4095 (Understanding): Update example output for changes below.
4096 * src/gram.c: (rule_useful_p): Rename to...
4097 (rule_useful_in_grammar_p): ... this.
4098 (rule_useless_p): Rename to...
4099 (rule_useless_in_grammar_p): ... this.
4100 (rule_never_reduced_p): Rename to...
4101 (rule_useless_in_parser_p): ... this.
4102 (grammar_rules_print): Update for renames.
4103 (grammar_rules_print_xml): Update for renames.
4104 (grammar_rules_never_reduced_report): Rename to...
4105 (grammar_rules_useless_report): ... this since it is used for either
4106 kind of useless rule.
4107 * src/gram.h: Reword comments and update function names in prototypes.
4108 * src/main.c (main): Say "rule useless in parser due to conflicts".
4109 * src/print-xml.c (print_rules_never_reduced): Rename to...
4110 (print_rules_useless_in_parser): ... this, and rename output XML
4111 element "rules-never-reduced" to "rules-useless-in-parser".
4112 (print_xml): Update for rename.
4113 * src/print.c (print_results): Say "Rules useless in parser due to
4114 conflicts".
4115 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4116 (nonterminals_reduce): Say "nonterminal useless in grammar".
4117 (reduce_output): Say "Nonterminals useless in grammar".
4118 Say "Rules useless in grammar".
4119 (reduce_xml): Rename output XML element "useless" to
4120 "useless-in-grammar".
4121 (reduce_print): Don't report the count of grammatically useless rules
4122 as "rules never reduced" just because %yacc is specified.
4123 In the correct report of this count, say nonterminal(s) and rule(s)
4124 "useless in grammar".
4125 * tests/conflicts.at (S/R in initial): Update expected output.
4126 (Defaulted Conflicted Reduction): Likewise.
4127 (Unreachable States After Conflict Resolution): Likewise.
4128 * tests/existing.at (GNU pic Grammar): Likewise.
4129 * tests/reduce.at (Useless Nonterminals): Likewise.
4130 (Useless Rules): Likewise.
4131 (Reduced Automaton): Likewise.
4132 (Underivable Rules): Likewise.
4133 (Empty Language): Likewise.
4134
4135 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4136
4137 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4138 here document and before the EOF so that BSD's implementation of Bourne
4139 shell doesn't parse the delimiter as part of the here document.
4140 * doc/.cvsignore: Add cross-options.texi.
4141 * src/getargs.c (usage): Add a blank line after the warning categories.
4142
4143 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4144
4145 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4146
4147 2007-11-05 Akim Demaille <akim@epita.fr>
4148
4149 Remove Id: from bison.1.
4150 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4151 (perl -0777 -pi -e 's/\.PP\nId): New.
4152 (.x.1): Use it to ignore the version control revision.
4153
4154 2007-11-05 Akim Demaille <demaille@gostai.com>
4155
4156 * build-aux/Makefile.am: Ship cross-options.pl.
4157 * doc/Makefile.am: Always refer to cross-options.texi with
4158 $(srcdir).
4159 (MAINTAINERCLEANFILES): Add it.
4160
4161 2007-11-04 Akim Demaille <demaille@gostai.com>
4162
4163 Generate the long/short option cross-table.
4164 * build-aux/cross-options.pl: New.
4165 * doc/Makefile.am (cross-options.texi): New.
4166 * doc/bison.texinfo: Use it.
4167
4168 2007-11-04 Akim Demaille <demaille@gostai.com>
4169
4170 Generate bison.1 using help2man.
4171 * doc/common.x, doc/bison.x: New.
4172 * doc/Makefile.am (bison.1, .x.1): New.
4173 The code is taken from autoconf-2.61/man/Makefile.am.
4174 * configure.ac: Look for help2man.
4175
4176 2007-11-04 Akim Demaille <demaille@gostai.com>
4177
4178 Complete --help.
4179 * src/getargs.c (usage): Document -W, make it clear that -d,
4180 -g and -x have optional arguments.
4181
4182 2007-11-04 Akim Demaille <demaille@gostai.com>
4183
4184 Find sha1sum when named gsha1sum.
4185 * bootstrap (find_tool): New.
4186 ($SHA1SUM): New.
4187
4188 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4189
4190 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4191 at
4192 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4193 * NEWS (2.3a+): Mention.
4194 * data/bison.m4 (b4_pure_if): Don't define it here.
4195 * data/c.m4 (b4_identification): Depend on individual skeletons to
4196 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4197 values of the %define variables api.pure or api.push_pull. Define
4198 YYPURE, YYPUSH, and YYPULL accordingly.
4199 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4200 glr.cc has already defined b4_pure_flag.
4201 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4202 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4203 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4204 * doc/bison.texinfo (Pure Decl): Update.
4205 (Push Decl): Update.
4206 (Decl Summary): Add api.pure to %define entry.
4207 In %pure-parser entry, say it's deprecated and reference %define.
4208 (Pure Calling): Update.
4209 (Error Reporting): Update.
4210 (C++ Scanner Interface): Update.
4211 (How Can I Reset the Parser): Update.
4212 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4213 reference %define.
4214 * src/getargs.c (pure_parser): Remove global variable.
4215 * src/getargs.h (pure_parser): Remove extern.
4216 * src/output.c (prepare): Don't define pure_flag muscle.
4217 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4218 wrapper around `%define api.pure'.
4219 * tests/calc.at (Simple LALR Calculator): Update.
4220 (Simple GLR Calculator): Update.
4221 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4222 Update.
4223 (GLR: Resolve ambiguity, pure, locations): Update.
4224 (GLR: Merge conflicting parses, pure, no locations): Update.
4225 (GLR: Merge conflicting parses, pure, locations): Update.
4226 * tests/glr-regression.at (Uninitialized location when reporting
4227 ambiguity): Update
4228 * tests/input.at (Unused %define api.pure): New test case.
4229 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4230 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4231 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4232
4233 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4234
4235 %define push_pull -> %define api.push_pull. Discussed starting at
4236 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4237 * data/push.c: Expect the new name.
4238 * data/yacc.c: Likewise.
4239 * doc/bison.texinfo (Push Decl): Update.
4240 (Decl Summary): Update %define entry.
4241 (Push Parser Function): Update.
4242 (Pull Parser Function): Update.
4243 (Parser Create Function): Update.
4244 (Parser Delete Function): Update.
4245 * tests/calc.at (Simple LALR Calculator): Update.
4246 * tests/input.at (%define enum variables): Update.
4247 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4248 (Push Parsing: Multiple impure instances): Update.
4249 (Push Parsing: Unsupported Skeletons): Update.
4250 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4251 (Exploding the Stack Size with Malloc): Update.
4252
4253 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4254 other entries some.
4255
4256 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4257
4258 For the XML output's terminal element, rename @number to @token-number,
4259 and add @symbol-number. In the nonterminal element, rename @number to
4260 @symbol-number. Discussed starting at
4261 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4262 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4263 renames.
4264 (xsl:template match="nonterminal"): Likewise.
4265 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4266 (xsl:template match="nonterminal"): Likewise.
4267 * src/print-xml.c (print_grammar): Implement.
4268
4269 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4270
4271 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4272 2007-10-11 change, the child elements here are items not rules.
4273 (xsl:template match="item"): New.
4274 (xsl:template match="rule"): Update for new reduced itemset.
4275 (xsl:template match="point"): Remove.
4276 (xsl:template match="empty"): For consistency with --graph, don't
4277 output "/* empty */".
4278 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4279 line-wrap, don't pass a negative value as first-line-length since this
4280 won't work with the following changes.
4281 (xsl:template name="line-wrap"): Simplify slightly.
4282 (xsl:template name="ws-search"): Eliminate recursion.
4283 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4284 set next to an item whose dot is not at the end of the RHS even if it
4285 happens to be associated with the same rule.
4286
4287 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4288
4289 Add %define lr.keep_unreachable_states.
4290 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4291 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4292 * src/main.c (main): Implement it.
4293 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4294 Extend to test it, and fix a typo.
4295
4296 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4297
4298 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4299 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4300 the example .output text.
4301 * tests/regression.at (Extra lookahead sets in report): Improve wording
4302 of comments.
4303
4304 2007-10-17 Wojciech Polak <polak@gnu.org>
4305
4306 * src/print-xml.c (print_grammar): Renamed
4307 <terminal> and <nonterminal> attributes:
4308 "type" to "number" and "symbol" to "name".
4309 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4310 Use new attribute names.
4311 (xsl:template match="nonterminal"): Likewise.
4312 * data/xslt/xml2xhtml.xsl: Likewise.
4313
4314 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4315
4316 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4317 (Option Cross Key): Likewise.
4318
4319 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4320 next to an item whose dot is not at the end of the RHS even if it
4321 happens to be associated with the same rule.
4322 * src/print.c (print_core): Likewise.
4323 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4324 (Resolved SR Conflicts): Update output.
4325 * tests/regression.at (Extra lookahead sets in report): New test case.
4326
4327 2007-10-11 Wojciech Polak <polak@gnu.org>
4328
4329 * src/print-xml.c (print_core): Remove item set
4330 redundancy.
4331 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4332 Improve processing time. Suggested by Joel E. Denny.
4333 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4334 Write xsl:param "required" attribute as comment.
4335 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4336 (xsl:template match="rule"): Support new reduced itemset.
4337 (xsl:template match="point"): Remove.
4338 * data/xslt/xml2xhtml.xsl: Likewise.
4339
4340 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4341
4342 * src/getargs.c (version): Update copyright year.
4343
4344 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4345
4346 Make xml2dot.xsl and --graph produce the same output.
4347 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4348 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4349 escaped later.
4350 (xsl:template name="output-node"): Use the new escape template instead
4351 of the string-replace template directly.
4352 (xsl:template name="output-edge"): Likewise.
4353 (xsl:template name="escape"): New, escapes backslashes and newlines in
4354 addition to quotation marks.
4355 * src/graphviz.c (start_graph, output_node, output_edge): Add
4356 whitespace to output for legibility.
4357
4358 Make xml2text.xsl and --report produce the same output, and remove the
4359 XML "conflicts" element since a conflict summary is easily extracted
4360 from the automaton.
4361 * data/xslt/bison.xsl: New.
4362 (xsl:template match="state" mode="bison:count-conflicts): New.
4363 * data/xslt/xml2text.xsl: Import bison.xsl.
4364 (xsl:template match="bison-xml-report"): Instead of styling the
4365 "conflicts" element, style the "automaton" element with mode
4366 "conflicts". Unlike the former, the latter lists S/R and R/R
4367 conflicts for a state on the same line.
4368 (xsl:template match="conflicts"): Remove.
4369 (xsl:template match="conflict"): Remove.
4370 (xsl:template match="terminal"): Line-wrap the list of rules in which
4371 the terminal is used.
4372 (xsl:template match="nonterminal"): Likewise for nonterminals.
4373 (xsl:template match="automaton" mode="conflicts"): New.
4374 (xsl:template match="state" mode="conflicts"): New.
4375 (xsl:template name="line-wrap"): New.
4376 (xsl:template name="ws-search"): New.
4377 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4378 (xsl:template match="bison-xml-report"): Instead of styling the
4379 "conflicts" element, style the "automaton" element with mode
4380 "conflicts."
4381 (xsl:template match="conflicts"): Remove.
4382 (xsl:template match="conflict"): Remove.
4383 (xsl:template match="automaton" mode="conflicts"): New.
4384 (xsl:template match="state" mode="conflicts): New.
4385 * src/conflicts.c (conflicts_output_xml): Remove.
4386 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4387 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4388 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4389 the corresponding XSLT is easier. Also, never wrap between a word and
4390 the comma that follows it.
4391
4392 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4393
4394 Improve C++ namespace support. Discussed starting at
4395 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4396 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4397 b4_namespace_close): New macros that interpret the %define variable
4398 "namespace" so its value can contain "::" to indicate nested
4399 namespaces.
4400 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4401 the above macros.
4402 * data/lalr1.cc (b4_namespace): Likewise.
4403 * data/location.cc (b4_namespace): Likewise.
4404 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4405 inside a new table in the general %define entry. Document `%define
4406 namespace' there as well. Point the %name-prefix entry to it since it
4407 explains it more completely in the case of C++.
4408 (C++ Bison Interface): Mention `%define namespace' instead of
4409 %name-prefix.
4410 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4411 entry suffices.
4412 * tests/c++.at (Relative namespace references): New test case.
4413 (Absolute namespace references): New test case.
4414 (Syntactically invalid namespace references): New test case.
4415 * tests/input.at (C++ namespace reference errors): New test case.
4416
4417 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4418
4419 Add syncline support and location accessor to internal %define
4420 interfaces.
4421 * data/bison.m4 (b4_percent_define_get_loc): New.
4422 (b4_percent_define_get_syncline): New.
4423 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4424 (b4_percent_define_default): Record defining location as line 1 rather
4425 than 0 for the sake of synchronizing #line's, and define
4426 b4_percent_define_syncline(VARIABLE).
4427 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4428 * src/muscle_tab.c (muscle_syncline_grow): New.
4429 (muscle_code_grow): Use muscle_syncline_grow.
4430 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4431 define b4_percent_define_syncline(VARIABLE).
4432 (muscle_percent_define_get_loc): New.
4433 (muscle_percent_define_get_syncline): New.
4434 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4435 remove some unused variables.
4436 (muscle_percent_define_default): Record defining location as line 1
4437 rather than 0 for the sake of synchronizing #line's, and define
4438 b4_percent_define_syncline(VARIABLE).
4439 (muscle_percent_define_check_values): Use
4440 muscle_percent_define_get_loc.
4441 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4442 (muscle_percent_define_get_syncline): Prototype.
4443 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4444 defaults): Update output for location change.
4445 (Complaining during macro argument expansion): Extend to test
4446 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4447
4448 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4449
4450 Fix some error-reporting macro bugs.
4451 * data/bison.m4 (b4_cat): New.
4452 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4453 to stdout so they don't become arguments to other macros. Update
4454 comments and add examples.
4455 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4456 add examples.
4457 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4458 after printing the error directive so that M4 doesn't report subsequent
4459 problems that are induced by this problem.
4460 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4461 instead of just in them. Recognize @\n in both places. Both expand to
4462 the empty string. Needed by b4_cat.
4463 * tests/skeletons.at (Complaining during macro argument expansion):
4464 New test case.
4465 (Fatal errors make M4 exit immediately): New test case.
4466
4467 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 Implement --print-datadir.
4470 * src/getargs.c (usage): Mention.
4471 (PRINT_DATADIR_OPTION): New anonymous enum member.
4472 (long_options): Add entry for it.
4473 (getargs): Add case for it calling compute_pkgdatadir.
4474 * src/output.c (output_skeleton): Encapsulate data directory
4475 computation from here...
4476 (prepare): ... and from here...
4477 (compute_pkgdatadir): ... into this new function.
4478 * src/output.h (compute_pkgdatadir): Prototype.
4479
4480 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4481
4482 * src/print-xml.c (escape_bufs): New static global variable
4483 replacing...
4484 (xml_escape_n): ... the static local variable buf here.
4485 (print_xml): Free memory for escape_bufs.
4486 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4487
4488 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4489
4490 Replace `%push-parser' and `%push-pull-parser' with
4491 `%define push_pull "push"' and `%define push_pull "both"'.
4492 `%define push_pull "pull"' is the default.
4493 * doc/bison.texinfo (Push Decl, Push Parser Function,
4494 Pull Parser Function, Parser Create Function, Parser Delete Function):
4495 Update declarations.
4496 (Decl Summary, Table of Symbols): Replace %push-parser and
4497 %push-pull-parser entries with a %define push_pull entry.
4498 * data/bison.m4 (b4_percent_define_check_values): New macro.
4499 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4500 definitions...
4501 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4502 definitions...
4503 * data/push.c: ... to here and compute them from the value of the
4504 %define variable push_pull.
4505 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4506 parsing requests here...
4507 * data/yacc.c: ... hack this to switch to push.c any time
4508 b4_use_push_pull_flag or the %define variable push_pull is set. This
4509 will go away when we mv push.c yacc.c.
4510 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4511 push parsing is not supported since unused %define variables are
4512 reported anyway.
4513 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4514 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4515 comments for consistency with b4_percent_define_check_values.
4516 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4517 muscles.
4518 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4519 Remove.
4520 (prologue_declaration): Remove %push-parser and %push-pull-parser
4521 rules.
4522 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4523 * tests/calc.at: Update declarations.
4524 * tests/input.at (%define enum variables): New test case.
4525 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4526 declaration.
4527 (Push Parsing: Multiple impure instances): Update declaration.
4528 (Push Parsing: Unsupported Skeletons): New test case.
4529 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4530 declaration.
4531 (Exploding the Stack Size with Malloc): Update declaration.
4532
4533 2007-09-24 Wojciech Polak <polak@gnu.org>
4534
4535 Add XSLT transformations.
4536
4537 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4538 * data/xslt/xml2text.xsl: Transform XML into plain text.
4539 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4540 * data/Makefile.am (xsltdir): New variable.
4541 (dist_xslt_DATA): Add xslt/*.xsl files.
4542
4543 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4544
4545 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4546 Problem reported by Wojciech Polak.
4547 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4548 (xml_printf): Undo change I made on 21 September; that is,
4549 indent 2 spaces, not 1.
4550
4551 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4552
4553 Pacify ./configure --enable-gcc-warnings.
4554 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4555 `char const *' instead of `char *'.
4556 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4557 local variable `sep'.
4558
4559 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4560
4561 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4562 elsewhere.
4563 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4564 (xml_printf): Indent just 1 space for level.
4565 (e_char, xlate_char): Remove.
4566 (xml_escape_string): Rewrite to avoid undefined behavior (used
4567 storage that was freed from the stack).
4568 (xml_escape_n): Don't bother checking for subscript error.
4569
4570 2007-09-21 Wojciech Polak <polak@gnu.org>
4571
4572 Add Bison XML Automaton Report.
4573
4574 Add support for an -x option to generate an XML report.
4575 It is not documented yet.
4576 * src/print-xml.c: New file.
4577 * src/print-xml.h: Likewise.
4578 * lib/timevar.def (TV_XML): New var.
4579 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4580 * src/conflicts.c: Include print-xml.h.
4581 (solved_conflicts_xml_obstack): New var.
4582 (log_resolution, conflicts_solve, conflicts_free):
4583 Add support for XML report.
4584 (conflicts_output_val): New function.
4585 * src/conflicts.h (conflicts_output_val): New decl.
4586 * src/files.c (spec_xml_file): New var.
4587 (compute_output_file_names, output_file_names_free): Add XML support.
4588 * src/files.h (spec_xml_file): New decl.
4589 * src/getargs.c (xml_flag): New var.
4590 (usage, short_options, long_options, getargs): Add XML support.
4591 * src/getargs.h (xml_flag): New decl.
4592 * src/gram.c: Include print-xml.h.
4593 (rule_lhs_print_xml, rule_rhs_print_xml):
4594 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4595 New functions.
4596 * src/gram.h: Declare external ones.
4597 * src/main.c: Include print-xml.h.
4598 (main): Add XML support.
4599 * src/reduce.c: Include print-xml.h.
4600 (reduce_xml): New function.
4601 * src/reduce.h: Declare it.
4602 * src/state.c: Include print-xml.h.
4603 (state_new): Add XML support.
4604 (state_rule_lookahead_tokens_print_xml): New function.
4605 * src/state.h: Declare it.
4606 (struct state): New member solved_conflicts_xml.
4607 * src/symtab.c (symbol_class_get_string): New function.
4608 * src/symtab.h: Declare it.
4609
4610 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4611
4612 * GNUmakefile: Switch to coreutils's version.
4613 * bootstrap: Likewise.
4614 * Makefile.cfg: Adjust to new GNUmakefile.
4615 * README-hacking: Likewise.
4616
4617 Import from gnulib:
4618
4619 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4620 Bruno Haible <bruno@clisp.org>
4621
4622 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4623 and is a script that invokes bison. Tighten the code. Add comments.
4624
4625 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4626
4627 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4628 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4629 * doc/bison.texinfo (Decl Summary): Fix.
4630 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4631 * tests/input.at (Boolean %define variables): Update output.
4632 * tests/skeletons.at (%define boolean variables: invalid skeleton
4633 defaults): Rename to...
4634 (%define Boolean variables: invalid skeleton defaults): ... this and
4635 update output.
4636
4637 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4638
4639 In impure push mode, don't allow more than one yypstate to be allocated
4640 since multiple impure parsers would corrupt yynerrs.
4641 * data/push.c (yypstate_allocated): New static global variable
4642 initialized to 0.
4643 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4644 exhaustion if yypstate_allocated is 1, but still return 2.
4645 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4646 already 1. Otherwise, set it to 1.
4647 (yypstate_delete): Set it to 0.
4648 * tests/push.at (Push Parsing: Multiple impure instances): New test
4649 case.
4650
4651 2007-08-17 Bob Rossi <bob@brasko.net>
4652
4653 * doc/bison.texinfo (Push Decl): Document the push parser.
4654 (Table of Symbols): Ditto.
4655 (Pure Decl): Ditto.
4656 (Decl Summary): Ditto.
4657 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4658 Parser Create Function, Parser Delete Function):
4659 Add new push parser symbols.
4660 (Table of Symbols): Document push-parser, push-pull-parser,
4661 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4662
4663 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4664
4665 Update to GPLv3.
4666 * doc/gpl-3.0.texi: New file.
4667 * doc/gpl.texi: Remove.
4668 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4669 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4670 * README-hacking, TODO, bootstrap, bootstrap.conf:
4671 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4672 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4673 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4674 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4675 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4676 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4677 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4678 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4679 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4680 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4681 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4682 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4683 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4684 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4685 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4686 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4687 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4688 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4689 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4690 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4691 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4692 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4693 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4694 * src/complain.c, src/complain.h, src/conflicts.c:
4695 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4696 * src/files.h, src/flex-scanner.h, src/getargs.c:
4697 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4698 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4699 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4700 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4701 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4702 * src/print.c, src/print.h, src/print_graph.c:
4703 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4704 * src/reduce.h, src/relation.c, src/relation.h:
4705 * src/revision.h, src/scan-code.h, src/scan-code.l:
4706 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4707 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4708 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4709 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4710 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4711 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4712 * tests/existing.at, tests/glr-regression.at:
4713 * tests/headers.at, tests/input.at, tests/java.at:
4714 * tests/local.at, tests/output.at, tests/push.at:
4715 * tests/reduce.at, tests/regression.at, tests/sets.at:
4716 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4717 * tests/torture.at:
4718 Update to GPLv3.
4719
4720 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4721
4722 Get rid of broken %no-parser, -n, and --no-parser implementation and
4723 documentation.
4724 * TODO: Don't mention them.
4725 * doc/bison.1: Likewise.
4726 * doc/bison.texinfo (Decl Summary): Likewise.
4727 (Bison Options): Likewise.
4728 (Option Cross Key): Likewise.
4729 * src/getargs.c (no_parser_flag): Remove global variable.
4730 (usage): Don't print description of -n and --no-parser.
4731 (long_options): Remove --no-parser entry here.
4732 (getargs): Remove -n case in the switch here.
4733 * src/getargs.h (no_parser_flag): Remove extern.
4734 * tests/regression.at (Web2c Actions): Remove comment that mentions
4735 --no-parser.
4736
4737 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4738
4739 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4740 name user variables starting with `yy'. Just pass NULL instead of a
4741 dummy local &yylval to yypush_parse.
4742 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4743 starting with `yy'.
4744
4745 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4746
4747 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4748 true since it's then always used regardless of whether yyoverflow is
4749 defined. Reported by Christian Burger at
4750 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4751 * THANKS: Add Christian Burger.
4752
4753 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4754 node names: say "Decl Summary" not "Bison Declaration Summary".
4755
4756 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4757
4758 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4759 determine whether this function has already complained about an invalid
4760 value for a %define boolean variable, don't check whether Bison has
4761 ever examined the value. As written, the check was a tautology.
4762 Instead, record and check for this complaint using a separate muscle.
4763
4764 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4765
4766 Fix push parsing memory leak reported by Brandon Lucia at
4767 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4768 * THANKS: Add Brandon Lucia.
4769 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4770 but the parse never completed and thus freed it.
4771 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4772 * tests/testsuite.at: Include push.at.
4773 * test/push.at: New.
4774 (Push Parsing: Memory Leak for Early Deletion): New test case.
4775
4776 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4777
4778 Improve handling of multiple S/R conflicts in the same state and of S/R
4779 conflicts involving multiple reductions.
4780 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4781 set for a state here or Bison will abort if it is reassigned on a
4782 later conflicted reduction in the same state.
4783 Similarly, don't finalize and assign the solved conflicts report here
4784 or it will be lost if it is reassigned on a later conflicted reduction
4785 in the same state.
4786 (set_conflicts): Instead, assign them both here after all S/R conflicts
4787 in the state have been fully examined.
4788 * src/print.c (shift_set): Rename to...
4789 (no_reduce_set): ... this.
4790 (print_reductions): Update for rename, and add %nonassoc error action
4791 tokens to no_reduce_set so that, when printing the first remaining
4792 reduction on an error action token, the reduction is enclosed in
4793 brackets.
4794 (print_results): Update for rename.
4795 * tests/conflicts.at (Solved conflicts report for multiple reductions
4796 in a state): New test case.
4797 (%nonassoc error actions for multiple reductions in a state): New test
4798 case.
4799
4800 * src/main.c (main): Don't depend on C99 features.
4801
4802 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4803
4804 * build-aux/.cvsignore: Add compile.
4805 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4806 uniwidth.
4807
4808 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4809
4810 * bootstrap (slurp): Create target directories that don't exist.
4811 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4812
4813 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4816 than item number.
4817 * closure.c (closure): Likewise.
4818 * state.h (reductions): Comment sorting of rules.
4819 (state): Comment sorting of items.
4820
4821 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4822
4823 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4824 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4825 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4826 definition in order to avoid Gnulib headers since we don't use config.h
4827 here.
4828 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4829 rather than AT_DATA so that config.h is included.
4830
4831 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4834 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4835 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4836 and so that YYFPRINTF is guaranteed to be defined here.
4837
4838 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4839
4840 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4841 with...
4842 (muscle_percent_define_check_values): ... this more helpful function.
4843 Again, it's not used yet, but it will be.
4844 * src/muscle_tab.h: Likewise.
4845
4846 Improve some comments in parser table construction.
4847 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4848 (generate_states): Don't mention ruleset, which is internal to closure.
4849 * src/closure.c (closure): Explain sorting of core and itemset, which
4850 is required for this function to behave correctly.
4851 * src/closure.h (closure): Mention sorting.
4852
4853 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4854
4855 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4856 move the check for disabled transitions to an aver since conflict
4857 resolution hasn't happened yet.
4858
4859 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4860 labels a state as inconsistent just because it has error transitions.
4861 The original form of this check appeared in revision 1.1 of lalr.c,
4862 which was committed on 1991-12-21. Now (at least), changing the
4863 consistency label on such a state appears to have no useful effect in
4864 any of the places it is examined, which I enumerate below. The key
4865 point to understanding each item in this enumeration is that a state
4866 with an error transition is labelled consistent in the first place only
4867 if it has no rules, so the check cannot matter for states that have
4868 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4869 to try to identify its conflicts, and a state must have *rules* to have
4870 conflicts. (2) Labelling a state as inconsistent will affect how
4871 action_row sets the default *rule* for the state. (3) Labelling a
4872 state as inconsistent will cause build_relations to add lookback edges
4873 to *rules* in that state.
4874 * src/state.h (struct state): Word the comment for member consistent
4875 more carefully.
4876
4877 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4878
4879 Don't depend on C99 features.
4880 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4881 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4882 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4883 * src/state.c (state_mark_reachable_states): Fix for-loop.
4884 (state_remove_unreachable_states): Fix for-loop.
4885
4886 Don't widen struct state with member reachable just to temporarily
4887 record reachability. Instead, use a local bitset.
4888 * src/state.h (struct state): Remove member.
4889 * src/state.c (state_new): Don't initialize it.
4890 (state_mark_reachable_states): Rename to...
4891 (state_record_reachable_states): ... this, and use bitset.
4892 (state_remove_unreachable_states): Use bitset.
4893
4894 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4895
4896 * src/Makefile.am (yacc): Quote target action commands properly so
4897 that the yacc script isn't corrupt. Reported by Hans Aberg at
4898 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4899
4900 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4901 the case of pure parsers. Reported by Frans Englich at
4902 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4903 * THANKS: Add Frans Englich.
4904
4905 * NEWS (2.3a+): In the %code entry, reference section `Bison
4906 Declaration Summary' from the manual now since the %code summary has
4907 moved there.
4908 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4909 in the rules section must be terminated by semicolons.
4910
4911 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4912
4913 Extend the front-end API for %define variables to more completely
4914 mirror the back-end. This will be useful in the future.
4915 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4916 Update comments to mention the new front-end counterparts of these
4917 macros.
4918 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4919 for muscle_string_decode and muscle_location_decode.
4920 (muscle_string_decode): New static function.
4921 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4922 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4923 functions.
4924 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4925 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4926 implementation more closely.
4927 (muscle_percent_define_invalid_value): New function.
4928 * src/muscle_tab.h (muscle_percent_define_get,
4929 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4930 Prototype.
4931
4932 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4933
4934 * NEWS (2.3a+): Mention yesterday's state-removal change.
4935 (2.3a): Remove the %language entry, which was added after 2.3a.
4936 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4937 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4938 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4939 tests/existing.at: Update copyright date.
4940
4941 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4942
4943 If conflict resolution makes states unreachable, remove those states,
4944 report rules that are then unused, and don't report conflicts in those
4945 states.
4946 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4947 New global function.
4948 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4949 function.
4950 * src/main.c (main): After conflict resolution, remove the unreachable
4951 states and update all data structures that reference states by number.
4952 * src/state.c (state_new): Initialize each state's reachable member to
4953 false.
4954 (state_mark_reachable_states): New static function.
4955 (state_remove_unreachable_states): New global function.
4956 * src/state.h (struct state): Add member bool reachable.
4957 (state_remove_unreachable_states): Prototype.
4958 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4959 New test case.
4960 * tests/existing.at (GNU pic Grammar): Update test case output now that
4961 an unused rule is discovered.
4962
4963 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4964
4965 Minor code cleanup in parser table construction.
4966 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4967 (new_itemsets, save_reductions): Update for rename to nitemset.
4968 * src/closure.c (nritemset): Rename to...
4969 (nitemset): ... this since the "r" appears to meaningless and isn't
4970 used in the comments.
4971 (closure): Update for rename.
4972 * src/closure.h (nritemset): Update extern to...
4973 (nitemset): ... this.
4974 * src/lalr.c (LA): Fix a typo in comments.
4975 * src/print.c (print_core): Update for rename to nitemset.
4976 * src/print_graph.c (print_graph): Likewise.
4977 * src/state.h: Fix some typos in header comments.
4978
4979 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4980
4981 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4982 still sticks to ASCII. Sorry!
4983
4984 * README-hacking: New file, taken mostly from coreutils, with changes
4985 for Bison. Contains much of the contents of:
4986 * README-cvs: Remove.
4987 * bootstrap: Sync from gnulib.
4988 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4989 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4990
4991 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4992
4993 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4994 Setzer.
4995 (Java Differences): Fix some typos.
4996 * THANKS: Add Sebastian Setzer.
4997
4998 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4999
5000 * data/java.m4 (b4_single_class_if): Remove.
5001 (b4_abstract_if): Look at "%define abstract".
5002 (b4_lexer_if): New.
5003 (b4_union_name): Rename...
5004 (b4_yystype): ... to this. Map to "%define stype".
5005 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5006 b4_maybe_throws): Fix quoting.
5007 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5008 * data/lalr1.java (Lexer interface): Always define.
5009 (Lexer interface within parser class): Remove.
5010 (YYLexer class): New, used when "%code lexer" is present.
5011 (constructor): When "%code lexer" is used, pass %lex-param
5012 to the lexer constructor.
5013 (yylex, yyparse): Remove %lex-param from method invocations
5014 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5015
5016 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5017 abstract". Rename "%define union_name" to "%define stype".
5018 Rename method names according to previous patch.
5019 (Java Scanner Interface): Describe "%code lexer" instead of
5020 "%pure-parser" and "%define single_class".
5021 (Java Differences): Mention "%code lexer".
5022
5023 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5024 Include scanner here, using macros from tests/local.at.
5025 (AT_DATA_CALC_Y): Remove final argument.
5026 (_AT_CHECK_JAVA_CALC): Likewise.
5027 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5028 of %locations and %error-verbose.
5029 (main): Test with and without %lex-param.
5030 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5031 (AT_BISON_OPTION_POPDEFS): Pop it.
5032
5033 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5034
5035 DJGPP spefic issue. Inhibit the use of disallowed characters for
5036 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5037 and concern testsuite case 46.
5038 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5039 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5040 * djgpp/config.bat: Inhibit the use of disallowed characters.
5041
5042 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5043
5044 Miscellaneous %define and %code cleanup.
5045 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5046 values are interpreted.
5047 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5048 documentation a little more.
5049 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5050 muscle_percent_define_insert, muscle_percent_code_grow): New
5051 functions/macros.
5052 * src/muscle_tab.h (muscle_percent_define_insert,
5053 muscle_percent_code_grow): Prototype.
5054 * src/parse-gram.y (prologue_declaration): Use
5055 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5056 %define and %code directives.
5057
5058 Make it easy to share %define boolean variables between the front-end
5059 and back-end. Though not used yet, this will be useful in the future.
5060 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5061 Bison uses of names rather than just skeleton uses of names.
5062 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5063 b4_percent_define_skeleton_variables(VARIABLE) to
5064 b4_percent_define_bison_variables(VARIABLE).
5065 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5066 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5067 b4_percent_code_bison_qualifiers(QUALIFIER).
5068 (b4_check_user_names_wrap): Update for renames.
5069 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5070 muscle_percent_define_default): New functions mimicking
5071 b4_percent_define_flag_if and b4_percent_define_default.
5072
5073 For %define variables, report locations for invalid values and
5074 redefinitions.
5075 * data/bison.m4 (b4_percent_define_flag_if): Read
5076 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5077 value for VARIABLE.
5078 (b4_percent_define_default): Save a special location in
5079 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5080 must later be reported as invalid.
5081 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5082 functions.
5083 (muscle_percent_define_insert): Record the location of VARIABLE in
5084 muscle percent_define_loc(VARIABLE), and use it to report the previous
5085 location for a redefinition.
5086 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5087 (muscle_percent_define_default): Update like b4_percent_define_default.
5088 (muscle_grow_user_name_list): Rename to...
5089 (muscle_user_name_list_grow): ... this for consistency and use
5090 muscle_location_grow.
5091 * src/muscle_tab.h (muscle_location_grow): Prototype.
5092 * tests/input.at (%define errors): Update expected output.
5093 * tests/skeletons.at (%define boolean variables: invalid skeleton
5094 defaults): New test case.
5095
5096 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5097
5098 * src/print.c (lookahead_set, state_default_rule): Remove.
5099 (print_reductions): Replace state_default_rule invocation with
5100 equivalent use of yydefact, which was computed in token_actions in
5101 tables.c.
5102 (print_results): Don't allocate lookahead_set.
5103
5104 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5105
5106 * data/lalr1.java: Prefix all private members with yy.
5107
5108 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5109
5110 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5111 Sebastien Fricker at
5112 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5113 * THANKS: Add Sebastien Fricker.
5114 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5115 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5116 accept a variable number of arguments.
5117
5118 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5119
5120 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5121
5122 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5123
5124 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5125 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5126 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5127
5128 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5129
5130 Undo my 2007-02-07 change, switching back to the c-strcase module
5131 introduced in the 2007-02-03 change. Bruno Haible reported that
5132 the 2007-02-07 change would be dangerous in Turkish if we add a
5133 language whose name contains "i", since "i" is not lowercase "I"
5134 in Turkish.
5135 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5136 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5137 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5138 * m4/.cvsignore: Remove strcase.m4.
5139 * src/getargs.c: Revert 2007-02-07 change, as follows.
5140 Include c-strcase.h.
5141 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5142
5143 2007-02-11 Bruno Haible <bruno@clisp.org>
5144
5145 Enable the Java related testsuite tests when the only Java compiler
5146 found is a gcj < 4.3. Discussed at
5147 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5148 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5149
5150 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5151
5152 * data/Makefile.am: Update copyright date.
5153 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5154 yypstate_new returns NULL.
5155 (yypstate_new): Return NULL if malloc does.
5156 * src/reader.c (packgram): Move translation of rule actions from the
5157 beginning of packgram to...
5158 (check_and_convert_grammar): ... here right before packgram is invoked
5159 so it's easier to write more complete comments, and remove redundant
5160 code.
5161
5162 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5163
5164 As in semantic actions, make @$ in %initial-action, %destructor, and
5165 %printer imply %locations.
5166 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5167 scanning @$.
5168 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5169 (@$ in %initial-action implies %locations,
5170 @$ in %destructor implies %locations,
5171 @$ in %printer implies %locations): ... these new test cases.
5172
5173 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5174
5175 Undo most of the 2007-02-03 change, switching to the strcase module
5176 now that gnulib strcase has been fixed.
5177 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5178 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5179 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5180 * m4/.cvsignore: Add strcase.m4.
5181 * src/getargs.c: Revert 2007-02-03 change, as follows.
5182 Don't include c-strcase.h.
5183 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5184 strcasecmp has "unspecified behavior" outside the POSIX locale,
5185 but it works fine in practice if at least one argument is ASCII,
5186 as is the case in Bison.
5187
5188 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5189
5190 * tests/java.at: Skip tests if only one of javac/java is present.
5191 Reported by Joel E. Denny.
5192 * tests/atlocal.in: Adjust copyright years.
5193
5194 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5195
5196 * data/lalr1.java (Stack): Work around old verifiers that disallow
5197 access to the private fields of an inner class, from the outer class.
5198 We can make Stack's fields public because user code doesn't have access
5199 to the instance of Stack used by parse(). Reported by Paul Eggert.
5200
5201 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5202
5203 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5204 the right spot for these files?
5205 * bootstrap.conf (gnulib_modules): Add c-strcase.
5206 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5207 c-strncasecmp.c.
5208 * src/getargs.c: Include c-strcase.h.
5209 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5210 to avoid unspecified behavior.
5211
5212 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5213
5214 * doc/bison.texinfo (Decl Summary): Correct typo.
5215
5216 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5217
5218 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5219 Complain if the value does not match empty, "true" or "false".
5220 * data/c++.m4: Adjust default definitions of %define variables.
5221 * data/java.m4: Adjust default definitions of %define variables.
5222 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5223 to above behavior.
5224 * tests/input.at (Boolean %define variables): Test new behavior.
5225
5226 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5227
5228 * NEWS: Mention java.
5229 * TODO: Remove things that are done.
5230 * bootstrap.conf: Add javacomp-script and javaexec-script.
5231 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5232
5233 * data/Makefile.am: Add new files.
5234 * data/java-skel.m4: New.
5235 * data/java.m4: New.
5236 * data/lalr1.java: New.
5237
5238 * doc/bison.texinfo: Put "A Complete C++ Example" under
5239 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5240 under Other Languages.
5241
5242 * src/getargs.c (valid_languages): Add Java.
5243 * src/getargs.h (struct bison_language): Update size of string fields.
5244
5245 * tests/Makefile.am: Add java.at.
5246 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5247 * tests/java.at: New.
5248 * tests/testsuite.at: Include it.
5249
5250 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5251
5252 Clean up.
5253 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5254 at_directive_argv arguments so these no longer have to be global
5255 variables. Also, update the implementation for the following changes.
5256 (fail_for_at_directive_too_many_args,
5257 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5258 (at_directive_name): Remove as at_directive_argv[0] will be used for
5259 this now.
5260 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5261 for the directive name.
5262 (at_directive_argc, at_directive_argv): Make these local within
5263 skel_lex instead of global.
5264 (INITIAL): Update directive start action for above changes.
5265 (SC_AT_DIRECTIVE_ARG): Rename to...
5266 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5267 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5268 (scan_skel): Move yylex_destroy to...
5269 (skel_scanner_free): ... here.
5270 * tests/skeletons.at (installed skeleton file name): Rename to...
5271 (installed skeleton file names): ... this.
5272
5273 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5274
5275 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5276 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5277 Summary" not "Directives".
5278 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5279 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5280 since the former is now the more complete one.
5281 (Prologue Alternatives): Likewise and do the same for %defines.
5282 (Table of Symbols): Add summary of %code, add summary of %define, and
5283 move full %code documentation to...
5284 (Decl Summary): ... here for consistency with other entries in these
5285 sections.
5286 Move %define entry in order to keep this list alphabetized.
5287 Reword %define entry a little to put less emphasis on the skeleton
5288 concept, which most users shouldn't have to think about.
5289
5290 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5291
5292 Adjust to recent gnulib changes.
5293 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5294 Add string.h, string_.h, unistd_.h, wchar_.h.
5295 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5296 * src/system.h: Don't include <stpcpy.h>; this is now done by
5297 <string.h>.
5298
5299 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5300
5301 Simplify implementation of unqualified %code, implement macros for
5302 uniform treatment of boolean %define flags. Document %define.
5303 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5304 b4_percent_code_ifdef): New.
5305 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5306 * data/c++.m4: Define default value for global_tokens_and_yystype.
5307 * data/glr.cc: Likewise.
5308 * data/location.cc: Use b4_percent_define_flag_if.
5309
5310 * doc/bison.texinfo (Decl Summary): Document %define.
5311
5312 * src/parse-gram.y (Unqualified %code): Change muscle name to
5313 b4_percent_code().
5314 (content.opt): Default to empty.
5315
5316 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5317
5318 Implement support for relative and absolute skeleton file names.
5319 Discussed starting at
5320 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5321 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5322 (Bison Options): Document in --skeleton entry.
5323 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5324 full_skeleton can't necessarily hold all of pkgdatadir.
5325 If the specified skeleton file name contains a `/', don't prepend
5326 pkgdatadir.
5327 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5328 file name contains a `/', prepend the grammar file directory.
5329 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5330 * skeletons.at: New file.
5331 (relative skeleton file names): New test case.
5332 (installed skeleton file names): New test case.
5333 * tests/testsuite.at: Include skeletons.at.
5334
5335 * bootstrap: Update copyright to 2007.
5336
5337 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5338
5339 * bootstrap: Remove occurrences of .#bootmp from the files.
5340
5341 2007-01-17 Akim Demaille <akim@epita.fr>
5342
5343 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5344 nonterminals.
5345 Use per-type %printer.
5346
5347 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5348
5349 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5350 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5351 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5352 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5353 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5354 tests/glr-regression.at, tests/input.at, tests/local.at,
5355 tests/output.at, tests/torture.at: Update copyright to 2007.
5356
5357 2007-01-16 Akim Demaille <akim@epita.fr>
5358
5359 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5360 error code.
5361 (Calc++ Scanner): Exit with failure if we can't open the input
5362 file.
5363 Accept "-" standing for stdin.
5364 (Calc++ Top Level): Print the result only if the parsing was
5365 successful.
5366
5367 2007-01-16 Akim Demaille <akim@epita.fr>
5368
5369 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5370
5371 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5372 and Joel E. Denny <jdenny@ces.clemson.edu>
5373
5374 Clean up %define and %code implementation in M4 some. Most
5375 importantly, rename all related macros to be in the b4_percent_define
5376 and b4_percent_code namespaces. Also, complete support for `.' in
5377 %define variable names and %code qualifiers.
5378 * data/bison.m4 (b4_check_user_names): Check for special
5379 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5380 m4_foreach loops.
5381 (b4_get_percent_define, b4_get_percent_code): Rename to...
5382 (b4_percent_define_get, b4_percent_code_get): ... these.
5383 Extend documentation with examples.
5384 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5385 b4_percent_define_skeleton_variables and
5386 b4_percent_code_skeleton_qualifiers.
5387 Expect any value for the %define variable `foo' to be stored in the
5388 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5389 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5390 expect any unqualified %code blocks to be stored in a macro named
5391 `b4_percent_code_unqualified'.
5392 Use m4_indir so that %define variable names and %code qualifiers can
5393 contain `.', which is allowed by the grammar parser.
5394 (b4_percent_define_default): New macro to set a default value for a
5395 %define variable.
5396 (m4_wrap): Update wrapped code, and fix some underquoting.
5397 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5398 Expect grammar uses of %define variables and %code qualifiers to be
5399 defined in b4_percent_define_user_variables and
5400 b4_percent_code_user_qualifiers.
5401 * data/c++.m4: Use b4_percent_define_default rather than
5402 m4_define_default. Fix some underquoting. Skeleton usage of %define
5403 variable define_location_comparison now implies skeleton usage of
5404 %define variable filename_type.
5405 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5406 data/push.c, data/yacc.c: Update macro names.
5407 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5408 muscle names.
5409
5410 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5411
5412 DJGPP specific issues.
5413
5414 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5415 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5416
5417 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5418
5419 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5420 run parsers in all tests so that Valgrind is invoked during
5421 maintainer-check-valgrind.
5422 (Duplicate representation of merged trees): Free all semantic values.
5423 (Duplicated user destructor for lookahead): Likewise.
5424
5425 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5426
5427 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5428 command-line prefix.
5429 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5430 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5431 miss Valgrind messages.
5432 (Exploding the Stack Size with Malloc): Likewise.
5433
5434 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5435
5436 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5437 locals. Reported by Juan Manuel Guerrero at
5438 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5439 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5440 Fix some indentation also.
5441 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5442 explaining this issue.
5443
5444 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5445 and Joel E. Denny <jdenny@ces.clemson.edu>
5446
5447 Simplify union and prologue handling, and escape union and lex/parse
5448 params with digraphs.
5449 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5450 values to the empty string since these are no longer guaranteed
5451 initialized by the front-end.
5452 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5453 braces around b4_user_stype since this is no longer done by the
5454 front-end.
5455 * src/files.c, src/files.h (pre_prologue_obstack,
5456 post_prologue_obstack): Remove.
5457 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5458 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5459 with digraphs. This fixes lex params and parse params.
5460 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5461 * src/output.c (prepare): Remove muscle insertion of the prologues.
5462 (output): Remove freeing of pre_prologue_obstack and
5463 post_prologue_obstack.
5464 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5465 than prologue_augment for prologue parsing so you don't need prologue
5466 obstacks.
5467 (grammar_declaration): For %union RHS, use `braceless' instead of
5468 "{...}" so that braces are already stripped and code is escaped with
5469 digraphs.
5470 * src/reader.c (prologue_augment): Remove.
5471 (reader): Remove initialization of pre_prologue_obstack and
5472 post_prologue_obstack.
5473 * src/reader.h (prologue_augment): Remove.
5474
5475 * data/c.m4: Remove stray parenthesis.
5476
5477 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5478
5479 Remove quotes from variables names in %define directives and from
5480 qualifiers in %code directives, and restrict the characters that are
5481 allowed in them to M4-friendly ones. For %define, continue to support
5482 the quoted form as a deprecated feature. Discussed starting at
5483 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5484 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5485 %code.
5486 * doc/bison.texinfo (Prologue Alternatives): Update.
5487 (Decl Summary): In %defines entry, update mention of `%code requires'
5488 and `%code provides'.
5489 (C++ Location Values): Update %define uses.
5490 (Calc++ Parser Interface): Likewise.
5491 (Calc++ Parser): Likewise, and update `%code requires' uses.
5492 (Table of Symbols): Update %code documentation.
5493 * src/parse-gram.y (prologue_declaration): For %define variables, use
5494 `variable' instead of `STRING'.
5495 (grammar_declaration): For %code qualifiers, use `ID' instead of
5496 `STRING'.
5497 (variable): New nonterminal that takes an `ID' or a `STRING'.
5498 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5499 and %define uses.
5500 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5501 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5502 (%define errors): Update %define uses.
5503
5504 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5505
5506 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5507 instead of muscle_insert for %define values so that M4-special
5508 characters are replaced with digraphs.
5509 * tests/input.at (%define errors): Extend to check weird values.
5510
5511 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5512
5513 Instead of having skeletons declare all valid %define variables and
5514 %code qualifiers, provide macros that retrieve the associated values
5515 and build these lists automatically. Thus Bison will now warn when a
5516 variable or qualifier is not used by the skeleton in the current
5517 invocation regardless of whether it might sometimes be used by that
5518 skeleton in other invocations. Also, move all %define value macros to
5519 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5520 form, which is replaced by %code.
5521 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5522 (b4_check_user_names): ... this, and change the series of valid name
5523 arguments to a single list argument for names used in the skeleton
5524 similar to the existing list argument for names used in the grammar.
5525 Warn instead of complaining.
5526 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5527 values and %code code, to format %code code properly, and to build
5528 lists of all %define variables and %code qualifiers used in the
5529 skeleton: b4_skeleton_percent_define_variables and
5530 b4_skeleton_percent_code_qualifiers.
5531 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5532 Remove, and...
5533 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5534 the skeleton names lists can finish building first. In place of
5535 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5536 expect the lists b4_user_percent_define_variables and
5537 b4_user_percent_code_qualifiers.
5538 * data/c++.m4: Where setting default values for b4_parser_class_name,
5539 b4_location_type, b4_filename_type, b4_namespace, and
5540 b4_define_location_comparison, update their names to the
5541 b4_percent_define_ namespace.
5542 * data/glr.c: Don't use b4_check_percent_define_variables and
5543 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5544 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5545 (b4_parser_class_name, b4_namespace): Define these using
5546 b4_get_percent_define for parser_class_name and namespace.
5547 * data/location.cc: Use b4_get_percent_define.
5548 * data/push.c: Don't use b4_check_percent_define_variables and
5549 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5550 * data/yacc.c: Likewise, and don't call m4_exit in
5551 b4_use_push_for_pull_if or m4_wrap code will never execute.
5552 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5553 Rename to...
5554 (muscle_grow_user_name_list): ... this for consistency with the
5555 terminology used in bison.m4.
5556 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5557 %define variable names, and rename muscle used_percent_define_variables
5558 to user_percent_define_variables.
5559 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5560 user_percent_code_qualifiers.
5561 (content): Remove.
5562 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5563 {CODE} form is no longer accepted.
5564 * tests/input.at (Reject bad %code qualifiers): Rename to...
5565 (Reject unused %code qualifiers): ... this, and update test output.
5566 (%define error): Update test output.
5567
5568 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5569
5570 Check for unrecognized %define variables similar to checking for
5571 unrecognized %code qualifiers. Check for redefined %define variables.
5572 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5573 generalizes...
5574 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5575 (b4_check_percent_define_variables): New, also wraps it.
5576 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5577 variables using b4_check_percent_define_variables.
5578 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5579 all those exercised in the test suite and all those listed in the
5580 `Default values' section of c++.m4. Are there others?
5581 * data/push.c, data/yacc.c: Declare no valid %define variables.
5582 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5583 similar to muscle_find, but it works even when the muscle stores a
5584 const value.
5585 (muscle_grow_used_name_list): New function for constructing the used
5586 name list muscles that b4_check_for_unrecognized_names requires.
5587 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5588 %define'd more than once. Define the b4_used_percent_define_variables
5589 muscle with muscle_grow_used_name_list.
5590 (grammar_declaration): Abbreviate %code code with
5591 muscle_grow_used_name_list.
5592 * tests/input.at (%define errors): New.
5593
5594 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5595
5596 Provide warn_at, complain_at, and fatal_at function callbacks to the
5597 skeletons, and use this for %code qualifier complaints.
5598 * data/bison.m4 (b4_error_at): New, invoked by...
5599 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5600 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5601 @fatal_at(...@) directives.
5602 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5603 qualifiers in b4_used_percent_code_qualifiers and to use
5604 b4_complain_at.
5605 * src/location.c, src/location.h (boundary_set_from_string): New global
5606 function.
5607 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5608 function.
5609 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5610 to b4_used_percent_code_qualifiers.
5611 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5612 function.
5613 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5614 (lineno): Rename to...
5615 (out_lineno): ... this so I don't misunderstand it again.
5616 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5617 here; these newlines are in the input but not the output file.
5618 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5619 (at_directive_perform): ... this new static function, and add handling
5620 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5621 directives.
5622 * tests/input.at (Reject bad %code qualifiers): Update test output with
5623 locations and extend.
5624
5625 * tests/output.at (Output file name: [, Output file name: ]): Remove
5626 bogus comment about these tests failing.
5627
5628 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5629
5630 Clean up b4_check_percent_code_qualifiers a little.
5631 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5632 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5633 documentation and add examples.
5634 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5635 qualifiers here.
5636
5637 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5638
5639 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5640 unreliable -- especially when they're hidden inside another macro.
5641 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5642 data/c.m4: Remove m4_divert(-1).
5643 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5644 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5645 m4_divert_push(0) and m4_divert_pop(0).
5646 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5647 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5648 pushed and popped by m4sugar, should be first on the stack.
5649
5650 Provide warn, complain, and fatal function callbacks to the skeletons.
5651 This provides more flexibility than m4_fatal, improves the error
5652 message format, and captures messages for translation. Discussed
5653 starting at
5654 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5655 * data/bison.m4 (b4_error): New, invoked by...
5656 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5657 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5658 directives. Because these M4 macros might be called when the current
5659 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5660 the previous removal of uses of m4_divert, which caused trouble.
5661 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5662 m4_fatal to report unrecognized %code qualifiers.
5663 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5664 push parser requests.
5665 * data/glr.c: Use b4_complain instead of m4_fatal to report
5666 non-deterministic push parser requests.
5667 Update @output usage to @output(...@) form.
5668 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5669 report missing %defines. Update @output usage to @output(...@) form.
5670 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5671 @output(...@) form.
5672 * src/main.c (main): Invoke skel_scanner_free.
5673 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5674 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5675 obstack_for_string from flex-scanner.h.
5676 (YY_DECL): Use to declare skel_lex static.
5677 (decode_at_digraphs): Remove; now handled in the new
5678 SC_AT_DIRECTIVE_ARG start condition.
5679 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5680 functions.
5681 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5682 at_directive_argv): New static globals.
5683 (INITIAL): Use fail_for_invalid_at.
5684 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5685 recognize the start of a generalized `@directive(...@)' form and
5686 start...
5687 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5688 directive args (using the new obstack_for_string), to decode the
5689 contained @ diagraphs, and to perform the directive. It recognizes
5690 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5691 @output(...@).
5692 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5693 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5694 `@,'.
5695 (scan_skel): Initialize obstack_for_string on the first call.
5696 (skel_scanner_free): New function to free obstack_for_string.
5697 * tests/input.at (Reject bad %code qualifiers): Update test output.
5698
5699 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5700
5701 Consolidate the 4 prologue alternative directives (%code, %requires,
5702 %provides, and %code-top) into a single %code directive with an
5703 optional qualifier field. Discussed at
5704 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5705 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5706 alternatives.
5707 * doc/bison.texinfo (Prologue Alternatives): Update.
5708 (Decl Summary): Update to %code "requires" and %code "provides".
5709 (Calc++ Parser): Update to %code "requires".
5710 (Table of Symbols): Remove entries for %requires, %provides, and
5711 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5712 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5713 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5714 which are skeleton-specific.
5715 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5716 declare what %code qualifiers it supports and to complain if any other
5717 qualifiers were used in the grammar.
5718 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5719 and b4_user_code([b4_percent_code_provides]) in place of
5720 b4_user_requires and b4_user_provides.
5721 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5722 Add b4_user_code([b4_percent_code_top]) and
5723 b4_user_code([b4_percent_code]).
5724 Invoke b4_check_percent_code_qualifiers.
5725 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5726 PERCENT_REQUIRES): Remove.
5727 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5728 %requires. Rewrite the %code RHS as the unqualified form defining the
5729 muscle b4_percent_code. Add another RHS for the qualified %code form,
5730 which defines muscles of the form b4_percent_code_QUALIFIER and the
5731 b4_used_percent_code_qualifiers muscle.
5732 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5733 PERCENT_REQUIRES): Remove.
5734 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5735 %code "requires" and %code "provides".
5736 * tests/input.at (Reject bad %code qualifiers): New.
5737
5738 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5739
5740 Use the new code_props interface for destructors and printers.
5741 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5742 printer_location members, and change the type of the destructor and
5743 printer members to code_props.
5744 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5745 symbol_printer_get, semantic_type_destructor_set,
5746 semantic_type_printer_set, default_tagged_destructor_set,
5747 default_tagless_destructor_set, default_tagged_printer_set,
5748 default_tagless_printer_set): Use code_props in arguments and return
5749 types in place of char const * and location.
5750 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5751 since the locations are now contained in the return of
5752 symbol_destructor_get and symbol_printer_get.
5753 * src/output.c (symbol_destructors_output, symbol_printers_output):
5754 Replace with...
5755 (symbol_code_props_output): ... this to eliminate duplicate code.
5756 (output_skeleton): Update to use symbol_code_props_output.
5757 * src/reader.c (symbol_should_be_used): Update use of
5758 symbol_destructor_get.
5759 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5760 Update uses of the various _destructor_set and _printer_set functions.
5761 * src/symtab.c: (default_tagged_destructor_location,
5762 default_tagless_destructor_location, default_tagged_printer_location,
5763 default_tagless_printer_location): Remove since we...
5764 (default_tagged_destructor, default_tagless_destructor,
5765 default_tagged_printer, default_tagless_printer): ... change the type
5766 of these to code_props.
5767 (symbol_new, semantic_type_new, symbol_destructor_set,
5768 semantic_type_destructor_set, symbol_destructor_get,
5769 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5770 symbol_check_alias_consistency, default_tagged_destructor_set,
5771 default_tagless_destructor_set, default_tagged_printer_set,
5772 default_tagless_printer_set): Update.
5773 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5774 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5775 code_props members.
5776 (symbol_print): Use SYMBOL_CODE_PRINT.
5777
5778 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5779
5780 Use the new code_props interface for rule actions.
5781 * src/symlist.h (symbol_list): Replace action, action_location, and
5782 used members with a code_props action_props member.
5783 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5784 grammar_midrule_action, grammar_current_rule_merge_set,
5785 grammar_current_rule_symbol_append, packgram): Update.
5786 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5787 * src/scan-code.l (handle_action_dollar): Update.
5788 (translate_rule_action): Remove, no longer used.
5789 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5790
5791 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5792
5793 Use the new code_props interface in parse-gram.y.
5794 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5795 Update all uses of translate_* functions to use the new code_props
5796 interface and to use gram_scanner_last_string_free and
5797 code_scanner_last_string_free where possible.
5798 (grammar_declaration): symbol_list_destructor_set and
5799 symbol_list_printer_set now perform the translation, so don't do it
5800 here. Use gram_scanner_last_string_free where possible.
5801 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5802 translate_code): Remove, no longer used.
5803 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5804 symbol_list_printer_set): Perform code translation here rather than
5805 depending on the caller to do so.
5806
5807 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5808 * src/scan-gram.h (gram_last_string): Remove declaration.
5809 * src/scan-gram.l (last_string): Declare it static.
5810
5811 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5812
5813 Encapsulate code properties and related functionality for the various
5814 destructors, printers, and actions into a code_props structure and
5815 interface. This patch merely implements code_props in scan-code.h and
5816 scan-code.l. Future patches will rewrite other modules to use it.
5817 Discussed starting at
5818 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5819 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5820 consistently initialize const structs that have an empty location
5821 field.
5822 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5823 to ensure consistency.
5824 * src/scan-code.h (code_props): New structure.
5825 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5826 function, macro, and const global variable for initializing a
5827 code_props with no code.
5828 (code_props_plain_init, code_props_symbol_action_init,
5829 code_props_rule_action_init, code_props_translate_code): The rest of
5830 the new code_props functional interface. Among other things, the init
5831 functions set the code_props kind field so that
5832 code_props_translate_code will know whether to behave like
5833 translate_symbol_action, translate_rule_action, or translate_code.
5834 These old translate functions must remain until all other modules are
5835 updated to use the new code_props interface.
5836 (code_scanner_last_string_free): New function similar to
5837 gram_scanner_last_string_free.
5838 (code_scanner_free): Add documentation.
5839 * src/scan-code.l: Implement the new interface.
5840 (code_lex): Make it static, add a code_props* argument, and remove the
5841 rule argument.
5842 (last_string): New static global similar to the one in scan-gram.l.
5843 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5844 instead of rule.
5845 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5846 code_props since Bison may one day use this information for destructors
5847 and printers.
5848 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5849 (handle_action_dollar): Use symbol_list_n_get and set used flag
5850 directly since symbol_list_n_used_set is removed.
5851 (translate_action): Add a code_props* argument and remove the rule,
5852 action, and location arguments. Pass the code_props* on to code_lex.
5853 (translate_rule_action, translate_symbol_action, translate_code):
5854 Rewrite as wrappers around the new code_props interface.
5855 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5856 it would eventually need to break the encapsulation of code_props.
5857
5858 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5859
5860 * etc/.cvsignore: New.
5861
5862 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5863
5864 Add maintainer-push-check to run maintainer-check using push parsing in
5865 place of pull parsing where available.
5866 * Makefile.am (maintainer-push-check): New.
5867 * data/bison.m4 (b4_use_push_for_pull_if): New.
5868 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5869 appropriately based on their existing values.
5870 (yypush_parse): Don't print push-parser-specific diagnostics if push
5871 parsing is being used in place of pull parsing.
5872 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5873 push.c.
5874 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5875 variable, and insert b4_use_push_for_pull_flag into muscles.
5876 * tests/Makefile.am (maintainer-push-check): New.
5877
5878 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5879
5880 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5881 (whether successful or failed) so that yypush_parse can be invoked
5882 again to start a new parse using the same yypstate.
5883 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5884 check multiple yypull_parse invocations on the same yypstate. For pull
5885 mode, extend to check multiple yyparse invocations.
5886 (Exploding the Stack Size with Alloca): Extend to try with
5887 %push-pull-parser.
5888 (Exploding the Stack Size with Malloc): Likewise.
5889
5890 * tests/calc.at (Simple LALR Calculator): Don't specify
5891 %skeleton "push.c" since %push-pull-parser implies that now.
5892 * tests/headers.at (export YYLTYPE): Don't check for the push
5893 declarations. Otherwise, this test case can't be used to see if push
5894 mode can truly emulate pull mode.
5895 * tests/input.at (Torturing the Scanner): Likewise.
5896 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5897 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5898 AT_YACC_IF, which now includes the case of push mode since %skeleton
5899 need not be used for push mode. This will be more intuitive once
5900 push.c is renamed to yacc.c.
5901
5902 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5903
5904 For push mode, convert yyparse from a macro to a function, invoke yylex
5905 instead of passing a yylexp argument to yypull_parse, and don't
5906 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5907 Discussed starting at
5908 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5909 * data/bison.m4 (b4_pull_if): New.
5910 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5911 * data/push.c: Improve M4 quoting a little.
5912 (b4_generate_macro_args, b4_parenthesize): Remove.
5913 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5914 any time a pull parser is requested.
5915 Don't #define this as a wrapper around yypull_parse. Instead, when
5916 both push and pull are requested, make it a function that does that
5917 same thing.
5918 (yypull_parse): If there's a b4_prefix, #define this to
5919 b4_prefix[pull_parse] when both push and pull are requested.
5920 Don't define this as a function unless both push and pull are
5921 requested.
5922 Remove the yylexp argument and hard-code yylex invocation instead.
5923 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5924 %push-parser.
5925 * src/getargs.c (pull_parser): New global initialized to true.
5926 * getargs.h (pull_parser): extern it.
5927 * src/output.c (prepare): Insert pull_flag muscle.
5928 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5929 (prologue_declaration): Set both push_parser and pull_parser = true for
5930 %push-pull-parser. Set push_parser = true and pull_parser = false for
5931 %push-parser.
5932 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5933 %push-parser since there's no backward-compatibility concern here.
5934 Scan %push-pull-parser.
5935 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5936 instead of %push-parser.
5937 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5938 prototype it in the module that calls yyparse.
5939 * tests/input.at (Torturing the Scanner): Likewise.
5940 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5941
5942 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5943
5944 Update etc/bench.pl. Optimize push mode a little (the yyn change
5945 deserves most of the credit).
5946 * Makefile.am (SUBDIRS): Add etc subdirectory.
5947 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5948 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5949 yytoken, yyval, and yyloc declarations to...
5950 (yyparse or yypush_parse): ... here to improve performance. For
5951 yypush_parse invocations after the first, be sure to assign yyn its old
5952 value again.
5953 (yypstate_new): Don't bother initializing the yyresult field since the
5954 initial value isn't used.
5955 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5956 remove the #define that, in push mode, set it to yyps->NAME.
5957 * etc/Makefile.am: New.
5958 * etc/bench.pl: Remove and build it instead from...
5959 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5960 "tests/bison" from the build directory by default rather than just
5961 invoking "bison" from $PATH.
5962 (calc_grammar): Update push parser code: don't declare yylval globally,
5963 don't define yyparse_wrapper, and don't #define yyparse.
5964 (bench_grammar): Update to check all working combinations of yacc.c,
5965 push.c, impure, pure, pull, and push.
5966
5967 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5968
5969 For push mode, add pull wrappers around yypush_parse.
5970 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5971 (yypull_parse): New function wrapping yypush_parse.
5972 (yyparse): New #define wrapping yypull_parse.
5973 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5974 is declared.
5975 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5976 prototype yylex in the module that calls yyparse, and don't prototype
5977 yyparse there. Otherwise, the yyparse expansion won't compile.
5978 * tests/input.at (Torturing the Scanner): Likewise.
5979
5980 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5981
5982 Enable push parsers to operate in impure mode. Thus, %push-parser no
5983 longer implies %pure-parser. The point of this change is to move
5984 towards being able to test the push parser code by running the entire
5985 test suite as if %push-parser had been declared.
5986 * data/push.c (yypush_parse): For impure mode, remove the
5987 yypushed_char, yypushed_val, and yypushed_loc arguments.
5988 Instead, declare these as local variables initialized to the global
5989 yychar, yylval, and yylloc.
5990 For the first yypush_parse invocation only, restore the initial values
5991 of these global variables when it's time to read a token since they
5992 have been overwritten.
5993 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5994 %push-parser.
5995 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5996 %pure-parser along with %push-parser since this test case was designed
5997 for pure push parsers.
5998 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5999 (AT_YACC_OR_PUSH_IF): New.
6000 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6001 add a note that it's still wrong for some cases (as it has been for a
6002 while).
6003 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6004 %push-parser no longer implies %pure-parser.
6005
6006 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6007
6008 Remove some unnecessary differences between the pull parser code and
6009 the push parser code. This patch enables yynerrs in push mode.
6010 * data/push.c: Reformat M4 a little.
6011 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6012 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6013 because push mode is on. Instead, if pure mode is on, move yynerrs
6014 to...
6015 (b4_declare_parser_state_variables): ... here.
6016 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6017 to yyps->NAME so it can be used in yypush_parse.
6018 (yypush_parse): Don't omit uses of yynerrs in push mode.
6019
6020 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6021
6022 Fix bug such that the first pushed token's value and location are
6023 sometimes overwritten (sometimes by %initial-action) before being used.
6024 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6025 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6026 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6027 more closely mimic the pull parser logic.
6028 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6029 time to read a token, which is after any initialization of yylval and
6030 yylloc.
6031 (gottoken): Rename label to...
6032 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6033 user namespace.
6034
6035 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6036
6037 Rearrange initialization of the parser state variables so that the
6038 skeleton doesn't have to have a copy for pull mode and another for push
6039 mode. This patch also fixes at least a bug such that yylloc was not
6040 initialized (with b4_location_initial_line and
6041 b4_location_initial_column) upon calling yypush_parse. However, that
6042 initialization now overwrites the first token's location;
6043 %initial-action assigning @$ already did the same thing, and both bugs
6044 will be fixed in a later patch.
6045 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6046 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6047 yyss, yyvs, yyls, and yystacksize.
6048 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6049 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6050 yylsp.
6051 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6052 yyps->NAME so it can be used in yypush_parse.
6053 (yyparse or yypush_parse): For yypush_parse, don't print the
6054 "Starting parse" diagnostic for invocations after the first.
6055 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6056 yypush_parse, only do it for the first invocation.
6057 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6058 initialization to occur in yypush_parse but only on the first
6059 invocation.
6060
6061 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6062
6063 * data/push.c: Add CPP guards around push parser declarations in both
6064 the header and the code file.
6065 In the code file, move the push parser declarations to the same place
6066 they appear in the header file.
6067 Clean up the M4 some, especially the inconsistent underquoting in
6068 some b4_c_function_def and b4_c_function_decl uses.
6069
6070 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6071
6072 Encapsulate the push parser state variables into an M4 macro so the
6073 push skeleton doesn't have to list them again for pull mode's yyparse.
6074 For push mode, remove yypush_parse's local equivalents of these
6075 variables to eliminate unnecessary copying between the two sets at
6076 run-time. This patch also fixes at least a bug related to multiple
6077 %initial-action invocations in push mode.
6078 * data/push.c (b4_declare_parser_variables): Rename to...
6079 (b4_declare_scanner_communication_variables): ... this for clarity and
6080 update both uses.
6081 (b4_declare_yyparse_variables): Remove and move its contents to the one
6082 spot where it was invoked.
6083 (b4_declare_parser_state_variables): New macro containing the parser
6084 state variables required by push mode.
6085 (struct yypstate): Replace all fields but yynew with
6086 b4_declare_parser_state_variables.
6087 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6088 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6089 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6090 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6091 parser state variable declarations with
6092 b4_declare_parser_state_variables.
6093 Don't initialize parser state variables when calling yypush_parse since
6094 yypstate_new already does that.
6095 Invoke the user's initial action only upon the first yypush_parse
6096 invocation.
6097 Remove all code that copies between the local parser state variables
6098 and the yypstate.
6099
6100 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6101
6102 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6103 prevent a name collision in a future patch where these names will
6104 sometimes be #define'd.
6105 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6106 since it no longer has the same name as the existing argument.
6107 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6108
6109 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6110 and Joel E. Denny <jdenny@ces.clemson.edu>
6111
6112 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6113 that the argument is case-insensitive, and there's no `=' here.
6114 For the %skeleton entry, mention that %language is better.
6115 (Bison Options): Likewise for --language and --skeleton. Move the
6116 --skeleton entry so that the `Tuning the parser' section is sorted
6117 alphabetically on long options.
6118 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6119 %language directive in detail here; cross-reference the %language
6120 documentation instead.
6121 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6122 `%require "2.3b"' so that the example is always up-to-date.
6123 (Table of Symbols): Add entries for %language and %skeleton.
6124 * examples/extexi (normalize): Instead of replacing every %require
6125 argument with the current Bison version, just substitute for
6126 `@value{VERSION}'. This guarantees that we're testing what actually
6127 appears in the documentation.
6128 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6129 rather than `@VERSION@'.
6130
6131 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6132
6133 * NEWS: Reword the %language news a bit, and put it earlier.
6134
6135 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6136 Rewrite to simplify the logic.
6137 (language_argmatch): Likewise.
6138 (program_name): We now own this var.
6139 * src/getargs.h (struct bison_language): Use char[] rather than
6140 const char *.
6141
6142 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6143 Java is supported.
6144 * src/complain.c (program_name): Remove decl; no longer needed.
6145 * src/main.c (program_name): Remove; now belongs to getargs.
6146
6147 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6148
6149 * NEWS: Document %language.
6150
6151 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6152
6153 * data/c-skel.m4, data/c++-skel.m4: New files.
6154 * data/glr.c: Complain on push parsers.
6155
6156 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6157 over %skeleton.
6158 (Decl Summary): Document %language and %skeleton.
6159 (Command line): Document -L.
6160
6161 * examples/extexi: Rewrite %require directive.
6162 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6163
6164 * src/files.c (compute_exts_from_gc): Look in language structure
6165 for .y extension.
6166 (compute_file_name_parts): Check whether .tab should be added.
6167 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6168 (language, skeleton_arg, language_argmatch): New.
6169 (long_options): Add --language.
6170 (getargs): Use skeleton_arg, add -L/--language.
6171 * src/getargs.h: Include location.h.
6172 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6173 * src/output.c (prepare): Pick default skeleton from struct language.
6174 Don't dispatch C skeletons here.
6175 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6176 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6177 * src/scan-gram.l ("%language"): New rule.
6178
6179 * tests/calc.at: Test %skeleton and %language.
6180 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6181 (AT_GLR_IF): Look for %skeleton "glr.cc".
6182 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6183 (AT_YACC_IF): Reject %language.
6184
6185 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6186
6187 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6188 since it wasn't used; only the typedef name 'semantic_type' is needed.
6189 Also, omit trailing white space.
6190
6191 * bootstrap: Sync from coreutils.
6192 (gnulib_extra_files): Add build-aux/announce.gen.
6193 (slurp): Adjust .gitignore files like .cvsignore files.
6194 * build-aux/announce-gen: Remove from CVS, since bootstrap
6195 now creates this.
6196
6197 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6198
6199 Make %push-parser imply %pure-parser. This fixes several bugs; see
6200 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6201 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6202 pure_parser = true.
6203 * data/push.c: Don't bother testing b4_push_if when deciding whether
6204 to expand b4_declare_parser_variables globally.
6205 (yypush_parse): Likewise in here.
6206
6207 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6208 (yy_reduce_print): Reformat M4 for readability.
6209
6210 2006-12-15 Bob Rossi <bob@brasko.net>
6211 and Joel Denny <jdenny@ces.clemson.edu>
6212
6213 * data/push.c (yypstate): Add typedef, and update all uses of
6214 struct yypstate to just yypstate.
6215 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6216
6217 2006-12-14 Bob Rossi <bob@brasko.net>
6218
6219 * data/push.c (yypush_parse): Declare prototype regardless of
6220 %locations option.
6221
6222 2006-12-14 Bob Rossi <bob@brasko.net>
6223
6224 * data/push.c (yyparse): Remove the prototype and the #define when in
6225 push-parser mode.
6226
6227 2006-12-13 Bob Rossi <bob@brasko.net>
6228
6229 * data/push.c (yypstate_init): Rename to...
6230 (yypstate_new): ... this and use b4_c_function_def.
6231 (yypstate_delete): New.
6232 (yypush_parse): Change parameters yynval and yynlloc to be const.
6233 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6234 yypstate_delete functions.
6235
6236 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6237
6238 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6239 strange test case titles. Reported by Bob Rossi.
6240
6241 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6242
6243 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6244 of potential ambiguities in GLR grammers.
6245
6246 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6247
6248 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6249 `bison ', use m4_index instead of m4_substr since chopping up a string
6250 containing M4-special characters causes problems here.
6251
6252 Fix a couple of bugs related to special characters in user-specified
6253 file names, and make it easier for skeletons to compute output file
6254 names with the same file name prefix as Bison-computed output file
6255 names.
6256 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6257 b4_parser_file_name and b4_spec_defines_file instead of
6258 @output_parser_name@ and @output_header_name@, which are now redundant.
6259 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6260 b4_parser_file_name, b4_spec_defines_file, and the new
6261 @basename(FILENAME@) instead of @output_parser_name@ and
6262 @output_header_name@, which inappropriately escaped the file names as
6263 C string literals.
6264 * src/files.c (all_but_ext): Remove static qualifier.
6265 (compute_output_file_names): Move `free (all_but_ext)' to...
6266 (output_file_names_free): ... here since all_but_ext is needed later.
6267 * src/files.h (all_but_ext): Extern.
6268 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6269 exactly what MUSCLE_INSERT_STRING used to do.
6270 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6271 characters are escaped properly.
6272 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6273 all_but_ext.
6274 For pkgdatadir muscle, maintain previous functionality by using
6275 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6276 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6277 digraphs would never be expanded. Hopefully no one has M4-special
6278 characters in his Bison installation path.
6279 * src/scan-skel.l: Don't parse @output_header_name@ and
6280 @output_parser_name@ anymore since they're now redundant.
6281 In @output, use decode_at_digraphs.
6282 Parse a new @basename command that invokes last_component.
6283 (decode_at_digraphs): New.
6284 (BASE_QPUTS): Remove unused.
6285 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6286 (Output file name): New tests.
6287
6288 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6289
6290 Warn about output files that are generated by the skeletons and that
6291 conflict with other output files.
6292 * data/glr.c: Don't generate the header file here when glr.cc does.
6293 * src/files.c (file_names, file_names_count): New static globals.
6294 (compute_output_file_names): Invoke output_file_name_check for files
6295 not generated by the skeletons and remove existing checks.
6296 (output_file_name_check): New function that warns about conflicting
6297 output file names.
6298 (output_file_names_free): Free file_names.
6299 * src/files.h (output_file_name_check): Declare.
6300 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6301 the skeletons.
6302 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6303 (Conflicting output files): New tests.
6304
6305 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6306
6307 * doc/bison.texinfo: Fix a couple of typos.
6308
6309 2006-12-08 Bob Rossi <bob@brasko.net>
6310
6311 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6312 Rename to...
6313 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6314 update all uses.
6315 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6316 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6317 local pv.
6318 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6319 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6320
6321 2006-12-07 Bob Rossi <bob@brasko.net>
6322 and Joel Denny <jdenny@ces.clemson.edu>
6323
6324 * data/push.c (yypvarsinit): Change return type from void* to struct
6325 yypvars*. No longer cast to void* on return.
6326 (struct yypvars): Remove yylen since it need not be remembered between
6327 yypushparse invocations.
6328 (yypushparse): Don't copy between yylen and pv->yylen.
6329
6330 2006-12-05 Bob Rossi <bob@brasko.net>
6331
6332 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6333 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6334 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6335 (struct yypvars): Remove b4_declare_parser_variables.
6336 (yypvarsinit): Remove init code for removed variables.
6337 (global scope): Do not declare b4_declare_parser_variables if
6338 push or pure mode.
6339 (yypushparse): Add b4_declare_parser_variables.
6340 Init new local variables, and remove init code for removed
6341 yypvars variables.
6342 (yyparse): Delete.
6343 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6344 and yyparse for other modes.
6345 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6346 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6347 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6348 (AT_PURE_LEX_IF): True if pure or push parser.
6349
6350 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6351
6352 Document Yacc prologue alternatives and default %destructor's and
6353 %printer's as experimental. Don't mention Java yet. Discussed at
6354 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6355 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6356 (2.3a): Annotate this entry to say the old forms of these features were
6357 also experimental.
6358 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6359 Table of Symbols): Say they're experimental. Comment out any mention
6360 of Java (we'll want this back eventually).
6361
6362 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6363
6364 Support a file name argument to %defines. Deprecate `=' in
6365 %file-prefix, %name-prefix, and %output. Discussed at
6366 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6367 * NEWS (2.3a+): Mention.
6368 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6369 form of %defines, and remove `=' from entries for %file-prefix,
6370 %name-prefix, and %output.
6371 * src/parse-gram.y (prologue_declaration): Implement.
6372 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6373 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6374 all but one occurrence of %name-prefix.
6375 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6376 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6377 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6378 occurrence of each of %file-prefix and %output. Add check for %defines
6379 with argument.
6380 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6381 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6382 Remove the `=' from %output.
6383
6384 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6385
6386 Don't escape $ in test case titles since Autoconf 2.61 now does that
6387 correctly.
6388 * tests/actions.at (Default %printer and %destructor are not for error
6389 or $undefined): Here.
6390 (Default %printer and %destructor are not for $accept): Here.
6391 * tests/input.at (Invalid $n and @n): Here.
6392
6393 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6394
6395 Rename <!> to <>. Discussed starting at
6396 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6397 * NEWS (2.3a+): Update.
6398 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6399 Update.
6400 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6401 * src/scan-gram.l (INITIAL): Implement.
6402 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6403 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6404 comment.
6405 * tests/actions.at (Default tagless %printer and %destructor,
6406 Default tagged and per-type %printer and %destructor,
6407 Default %printer and %destructor are not for error or $undefined,
6408 Default %printer and %destructor are not for $accept,
6409 Default %printer and %destructor for mid-rule values): Update.
6410 * tests/input.at (Default %printer and %destructor redeclared,
6411 Unused values with default %destructor): Update.
6412
6413 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6414
6415 Don't let %prec take a nonterminal.
6416 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6417 token.
6418 * tests/input.at (%prec takes a token): New test checking that %prec
6419 won't take a nonterminal.
6420
6421 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6422
6423 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6424 it was double-quoted.
6425 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6426 grammar is maintained with Bison's highest standards.
6427 * src/getargs.c: Fix some typos in Doxygen comments.
6428
6429 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6430
6431 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6432 later. Reported by Paul Eggert in
6433 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6434 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6435 * src/scan-code.l (translate_action): Don't bother invoking
6436 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6437 (code_scanner_free): Instead of invoking
6438 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6439 which frees more.
6440 * src/scan-gram.l (gram_scanner_free): Likewise.
6441 * src/scan-skel.l (scan_skel): Likewise.
6442
6443 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6444
6445 * src/files.c (tr): Change return type to void.
6446 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6447 has been called previously for the same key.
6448 (muscle_find): Return storage instead of value so that
6449 --enable-gcc-warnings doesn't produce warnings that the return discards
6450 const. aver that the value and storage are the same since storage
6451 could potentially be NULL when value is not.
6452 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6453 same as 0.
6454
6455 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6456
6457 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6458 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6459 us a slightly cleaner distribution, and also works.
6460 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6461 gnulib changes.
6462
6463 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6464 and Paul Eggert <eggert@cs.ucla.edu>
6465
6466 Don't let Bison leak memory except when it complains.
6467 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6468 (spec_defines_file, dir_prefix): Now char *, not const char *,
6469 since they are freed.
6470 * src/files.c: Likewise.
6471 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6472 Likewise.
6473 (tr): Now operates in-place. All uses changed.
6474 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6475 values.
6476 (compute_file_name_parts, compute_output_file_names): Don't store
6477 read-only data in variables that will be freed.
6478 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6479 src_extension, and header_extension.
6480 (output_file_names_free): New public function to free
6481 spec_verbose_file, spec_graph_file, spec_defines_file,
6482 parser_file_name, and dir_prefix.
6483 * src/getargs.c (getargs): Don't store read-only data in variables that
6484 will be freed.
6485 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6486 (which previously existed but was unused), and quotearg_free.
6487 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6488 * src/muscle_tab.c: Likewise.
6489 (muscle_entry): Make the value char const *,
6490 and add a new storage member that is char * and can be freed.
6491 (muscle_entry_free): New private function.
6492 (muscle_init): Use it instead of free.
6493 (muscle_insert, muscle_grow): Update and use new storage member.
6494 (muscle_code_grow): Free the string passed to muscle_grow
6495 since it's not needed anymore.
6496 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6497 add a new `char *code' member.
6498 ("{...}"): Declare semantic type as code.
6499 * src/scan-code.h (translate_rule_action):
6500 (translate_symbol_action, translate_code, translate_action): Return
6501 `char const *' rather than `char *' since external code should not free
6502 these strings.
6503 * src/scan-code.l: Likewise.
6504 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6505 which is "{...}" in the parser.
6506 * tests/Makefile.am (maintainer-check-valgrind): Set
6507 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6508 Valgrind.
6509 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6510 complain.
6511 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6512 expecting a non-zero exit status sets --leak-check=summary and
6513 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6514 this case, and we don't want to hear about it.
6515
6516 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6517
6518 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6519 instead of from the template, to simplify configuration a bit.
6520 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6521 and m4/wint_t.m4, as they are needed with the latest gnulib.
6522
6523 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6524
6525 Disable unset/unused mid-rule value warnings by default, and recognize
6526 --warnings=midrule-values to enable them. Discussed starting at
6527 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6528 * NEWS (2.3a+): Mention.
6529 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6530 warnings): Add entry for midrule-values subargument.
6531 * src/reader.c (symbol_should_be_used): Don't return true just because
6532 the value is a set/used mid-rule value unless
6533 --warnings=midrule-values was specified.
6534 * tests/input.at (Unused values, Unused values before symbol
6535 declarations): Run tests with and without --warnings=midrule-values.
6536
6537 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6538 than LIST_FREE directly.
6539
6540 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6541
6542 Finish implementing --warnings=error, which should not be implied by
6543 --warnings=all (or by its synonyms -W and --warnings without
6544 subarguments).
6545 * src/complain.c (set_warning_issued): New function to report that
6546 warnings are being treated as errors and to record an error if so.
6547 Invoke...
6548 (warn_at, warn): ... here.
6549 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6550 "error - warnings are errors" does not appear above "all - all of the
6551 above".
6552 (getargs): For -W and --warnings without subarguments, don't let
6553 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6554 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6555
6556 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6557
6558 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6559 empty subargument list. For example: `bison --warnings= parser.y'.
6560
6561 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6562
6563 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6564 the parser header file so that gcc doesn't warn.
6565
6566 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6567
6568 Split the default %destructor/%printer into two kinds: <*> and <!>.
6569 Discussed starting at
6570 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6571 * NEWS (2.3a+): Mention.
6572 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6573 previous change today related to mid-rules.
6574 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6575 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6576 (TYPE_TAG_ANY): Add as <*>.
6577 (TYPE_TAG_NONE): Add as <!>.
6578 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6579 for <*> and <!>.
6580 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6581 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6582 * src/symlist.c (symbol_list_default_new): Split into tagged and
6583 tagless versions.
6584 (symbol_list_destructor_set, symbol_list_printer_set): Split
6585 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6586 SYMLIST_DEFAULT_TAGLESS.
6587 * src/symlist.h: Update symbol_list_default*_new prototypes.
6588 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6589 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6590 * src/symtab.c (default_destructor, default_destructor_location,
6591 default_printer, default_printer_location): Split each into tagged and
6592 tagless versions.
6593 (symbol_destructor_get, symbol_destructor_location_get,
6594 symbol_printer_get, symbol_printer_location_get): Implement tagged
6595 default and tagless default cases.
6596 (default_destructor_set, default_printer_set): Split each into tagged
6597 and tagless versions.
6598 * src/symtab.h: Update prototypes.
6599 * tests/actions.at (Default %printer and %destructor): Rename to...
6600 (Default tagless %printer and %destructor): ... this, and extend.
6601 (Per-type %printer and %destructor): Rename to...
6602 (Default tagged and per-type %printer and %destructor): ... this, and
6603 extend.
6604 (Default %printer and %destructor for user-defined end token): Extend.
6605 (Default %printer and %destructor are not for error or $undefined):
6606 Update.
6607 (Default %printer and %destructor are not for $accept): Update.
6608 (Default %printer and %destructor for mid-rule values): Extend.
6609 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6610 (Unused values with default %destructor): Extend.
6611
6612 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6613
6614 Don't apply the default %destructor/%printer to an unreferenced midrule
6615 value. Mentioned at
6616 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6617 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6618 like $@n instead of just @n so that the default %destructor/%printer
6619 logic doesn't see them as user-defined symbols.
6620 (symbol_is_dummy): Check for both forms of the name.
6621 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6622 name for which the midrule value is referenced in any action.
6623 * tests/actions.at (Default %printer and %destructor for mid-rule
6624 values): New test.
6625 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6626 for change to dummy symbol names.
6627
6628 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6629
6630 Warn about unset midrule $$ if the corresponding $n is used.
6631 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6632 $n usage.
6633 (packgram): Before invoking grammar_rule_check on any rule, make sure
6634 all actions have already been scanned in order to set `used' flags.
6635 Otherwise, checking that a midrule's $$ is set will not always work
6636 properly because the midrule check must forward-reference the midrule's
6637 parent rule.
6638 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6639 warning.
6640
6641 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6642
6643 More improvements to the documentation of the prologue alternatives:
6644 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6645 Bison manual.
6646 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6647 some text to clarify the relative importance of the new directives and
6648 to show how these directives may be viewed as code labels.
6649
6650 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6651
6652 Similar to the recently removed %before-header, add %code-top as the
6653 alternative to the pre-prologue. Mentioned at
6654 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6655 Also, let the prologue alternatives appear in the grammar section.
6656 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6657 (prologue_declaration): Move the existing prologue alternatives to...
6658 (grammar_declaration): ... here and add %code-top.
6659 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6660
6661 Clean up and extend documentation for the prologue alternatives.
6662 * NEWS (2.3a+): Describe prologue alternatives.
6663 * doc/bison.texinfo (Prologue): Move discussion of prologue
6664 alternatives to...
6665 (Prologue Alternatives): ... this new section, and extend it to discuss
6666 all 4 directives in detail.
6667 (Table of Symbols): Clean up discussion of prologue alternatives and
6668 add %code-top.
6669
6670 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6671
6672 DJGPP specific issues.
6673
6674 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6675 config.bat accordingly.
6676 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6677 * djgpp/config.site: Likewise.
6678
6679 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6680
6681 Replace %*-header with %provides, %requires, %code. See discussion at
6682 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6683
6684 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6685 (b4_user_start_header): Remove.
6686 * data/glr.c: Use new macros instead of b4_*start_header
6687 and b4_*end_header.
6688 * data/glr.cc: Likewise.
6689 * data/lalr1.cc: Likewise.
6690 * data/push.c: Likewise.
6691 * data/yacc.c: Likewise.
6692
6693 * doc/bison.texinfo: Remove %before-header, rename
6694 %{start,end,after}-header to %requires, %provides, %code.
6695
6696 * src/parse-gram.y: Likewise (also rename token names accordingly).
6697 * src/scan-gram.l: Likewise.
6698 * tests/actions.at: Likewise.
6699
6700 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6701
6702 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6703 Problem reported by Joel E. Denny.
6704
6705 2006-10-14 Jim Meyering <jim@meyering.net>
6706
6707 (Sync from coreutils.)
6708 Work also when the working directory (with e.g. coreutils sources)
6709 is version controlled with git, rather than CVS.
6710 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6711 rather than CVS.
6712 In messages and comments, say e.g., "checked-out sources",
6713 rather than "CVS sources".
6714 (version_controlled_file): New function. Work for git as well as
6715 for CVS. Don't use grep's -q option.
6716 (slurp): Call it here, in place of CVS-specific code.
6717
6718 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6719
6720 Fix testsuite for ./configure --enable-gcc-warnings:
6721 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6722 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6723 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6724 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6725 * test/regression.at (Diagnostic that expects two alternatives):
6726 Likewise.
6727
6728 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6729
6730 * bootstrap.conf (gnulib_modules): Add config-h.
6731 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6732 worry about HAVE_CONFIG_H.
6733 * lib/abitset.c: Likewise.
6734 * lib/bitset.c: Likewise.
6735 * lib/bitset_stats.c: Likewise.
6736 * lib/bitsetv-print.c: Likewise.
6737 * lib/bitsetv.c: Likewise.
6738 * lib/ebitset.c: Likewise.
6739 * lib/get-errno.c: Likewise.
6740 * lib/lbitset.c: Likewise.
6741 * lib/subpipe.c: Likewise.
6742 * lib/timevar.c: Likewise.
6743 * lib/vbitset.c: Likewise.
6744 * lib/bitset.c: Include "bitset.h" first, to test interface.
6745 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6746 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6747 * lib/bitsetv.c: Include "bitsetv.h" first.
6748 * lib/get-errno.c: Include "get-errno.h" first.
6749 * m4/.cvsignore: Add config-h.m4.
6750 * tests/actions.at (Default %printer and %destructor for ...):
6751 Adjust expected line numbers in output to reflect removal of #if
6752 HAVE_CONFIG_H lines.
6753 * tests/glr-regression.at (Missed %merge type warnings when ...):
6754 Likewise.
6755 * tests/regression.at (Braced code in declaration in rules section):
6756 Likewise.
6757 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6758 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6759 Include <config.h> unconditionally.
6760
6761 * bootstrap: Sync from coreutils, as follows:
6762
6763 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6764
6765 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6766 variable was sometimes used without being initialized. This
6767 messed up the installation of the INSTALL file in some cases.
6768
6769 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6770
6771 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6772 --copy. Inspired by a suggestion from Bruno Haible.
6773
6774 2006-10-03 Jim Meyering <jim@meyering.net>
6775
6776 * bootstrap: Undo last change to this file, since now gnulib-tool
6777 sticks with the automake default in generating dependencies.
6778
6779 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6780
6781 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6782 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6783
6784 * doc/bison.1: Add copyright notice.
6785
6786 * data/glr.c: Don't include <stdarg.h>; not used.
6787
6788 * NEWS: The -g and --graph options now output graphs in Graphviz
6789 DOT format, not VCG format.
6790 * doc/bison.1: Likewise.
6791 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6792 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6793 of this change in
6794 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6795 * TODO: Remove Graphviz entry.
6796 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6797 remove vcg.c, vcg.h, vcg_defaults.h.
6798 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6799 * src/graphviz.c, src/graphviz.h: New files.
6800 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6801 * src/files.h: Make comment more generic.
6802 * src/main.c (main): Likewise.
6803 * src/print_graph.h: Likewise.
6804 * src/getargs.c (usage): Make usage description more generic.
6805 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6806 (static_graph, fgraph): Remove. All uses changed to pass
6807 arguments instead of sharing a static var.
6808 (print_core, print_actions, print_state, print_graph):
6809 Output graphviz format rather than VCG format.
6810 * tests/.cvsignore: Remove *.vcg; add *.dot.
6811 * tests/output.at: Expect *.dot files, not *.vcg files.
6812
6813 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6814 accommodates the 2006-10-08 change.
6815
6816 2006-10-11 Bob Rossi <bob@brasko.net>
6817
6818 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6819 (b4_yyssa, b4_yyerror_range): New macros.
6820 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6821 (yypvarsinit): Remove init of removed fields.
6822 (yypushparse): Remove use of removed fields; use new macros instead.
6823
6824 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6825
6826 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6827 in a push parser. Reindent slightly to match yacc.c better.
6828
6829 2006-10-11 Bob Rossi <bob@brasko.net>
6830
6831 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6832 yymsg_alloc fields.
6833 (yypvarsinit, yypushparse): Remove init of removed fields.
6834 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6835
6836 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6837
6838 * THANKS: Add Paolo Bonzini and Bob Rossi.
6839
6840 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6841
6842 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6843 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6844 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6845 b4_define_user_cde and uses): Remove.
6846 (b4_comment, b4_prefix, b4_sync_start): New.
6847 * data/bison.m4: New file, with most of the content removed from c.m4.
6848 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6849 * src/output.c (output_skeleton): Pass bison.m4.
6850 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6851 only if specified.
6852
6853 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6854
6855 Fix test failure reported by Tom Lane in
6856 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6857 and try to make such failures easier to catch in the future.
6858 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6859 that's now the caller's responsibility.
6860 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6861 Set yychar = YYEOF if it's negative.
6862 * tests/actions.at (yylex): Abort if asked to read past EOF.
6863 * tests/conflicts.at (yylex): Likewise.
6864 * tests/cxx-type.at (yylex): Likewise.
6865 * tests/glr-regression.at (yylex): Likewise.
6866 * tests/input.at (yylex): Likewise.
6867 * tests/regression.at (yylex): Likewise.
6868 * tests/torture.at (yylex): Likewise.
6869
6870 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6871
6872 Fix problems with translating English-language diagnostics.
6873 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6874 respect to bison-runtime pot generation. The YY_ stuff
6875 wasn't being captured.
6876 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6877 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6878 * runtime-po/POTFILES.in: Add data/push.c.
6879
6880 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6881
6882 Merge bootstrap changes from coreutils.
6883
6884 2006-09-28 Jim Meyering <jim@meyering.net>
6885
6886 Automatically generated dependencies are important even
6887 when all of the sources in a directory come from gnulib.
6888 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6889 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6890
6891 2006-09-23 Jim Meyering <jim@meyering.net>
6892
6893 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6894
6895 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6896
6897 * bootstrap: Add support for --force.
6898 (usage): New function. Describe usage less tersely.
6899 (CVS_only_file): New var.
6900
6901 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6902
6903 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6904 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6905 Adjust white space and comments to match GNU style better.
6906
6907 2006-09-20 Bob Rossi <bob@brasko.net>
6908
6909 * data/push.c (yyresult_get): Remove function.
6910 (YYPUSH_MORE): Add #define.
6911 (yypushparse): Modify return value.
6912
6913 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6914
6915 * stamp-h.in: Remove; no longer needed.
6916 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6917 Remove config.h, config.hin, intl (no longer created).
6918 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6919 stamp-h1.
6920
6921 Sync bootstrap from coreutils, as follows:
6922
6923 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6924
6925 * bootstrap (symlink_to_gnulib): New function.
6926 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6927 to copies-of-gnulib.
6928 (cp_mark_as_generated, slurp, gnulib_files):
6929 Avoid making a copy if it's the same as the old version.
6930 (gnulib_files): Add support for this variable (used by Bison).
6931
6932 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6933
6934 * src/getargs.c (usage): Rework to use conventions similar to
6935 coreutils, to make translation a bit easier and the code a bit
6936 smaller. Problem reported by Tim Van Holder.
6937
6938 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6939
6940 Use some of gnulib's new modules, taken from coreutils.
6941
6942 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6943 * bootstrap.conf: New file.
6944 (gnulib_modules): Add configmake, inttypes, unistd.
6945 (XGETTEXT_OPTIONS): Add complain, complain_at,
6946 fatal, fatal_at, warn, warn_at, unexpected_end.
6947 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6948 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6949 (gl_EARLY): Add.
6950 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6951 (gl_INIT): Add
6952 (GNULIB_AUTOCONF_SNIPPET): Remove.
6953 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6954 the pickiest.
6955 * lib/.cvsignore: Add inttypes_.h.
6956 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6957 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6958 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6959 no-longer-necessary initializations.
6960 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6961 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6962 use the unistd module.
6963 * src/system.h: Likewise.
6964 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6965 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6966 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6967 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6968 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6969 * src/system.h: Include inttypes.h unconditionally, now that we
6970 use the inttypes module. Don't bother to include stdint.h, since
6971 inttypes.h now does that for us.
6972 (LOCALEDIR): Remove, now that we use the configmake module.
6973 * src/getargs.c: Include configmake.h.
6974 * src/main.c: Likewise.
6975 * src/output.c: Likewise.
6976 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6977 not from $abs_top_builddir, since config.h moved.
6978
6979
6980 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6981 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6982
6983 * src/parse-gram.y (symbol_declaration): Don't put statements
6984 before declarations; it's not portable to C89.
6985 * src/scan-code.l (handle_action_at): Likewise.
6986
6987 * src/scan-code.l: Always initialize braces_level; the old code
6988 left it uninitialized and therefore had undefined behavior.
6989
6990 Don't attempt to redefine 'assert', since it runs afoul of
6991 systems where standard headers (mistakenly) include <assert.h>.
6992 Instead, define and use our own alternative, called 'aver'.
6993 * src/reader.c: Don't include assert.h, since we no longer
6994 use assert.
6995 * src/scan-code.l: Likewise.
6996 * src/system.h (assert): Remove, replacing with....
6997 (aver): New function, taking a bool arg. All uses changed.
6998 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6999 not merely an integer.
7000
7001 2006-09-15 Bob Rossi <bob@brasko.net>
7002
7003 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7004 * data/c.m4 (YYPUSH): New.
7005 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7006 * src/getargs.c (push_parser): New var.
7007 * src/getargs.h (push_parser): New declaration.
7008 * src/output.c (prepare): Add macro insertion of `push_flag'.
7009 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7010 (prologue_declaration): Parse %push-parser.
7011 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7012 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7013 list of removed lines from the traces observed.
7014 (AT_CHECK_CALC_LALR): Added push parser tests.
7015
7016 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7017
7018 * NEWS: Version 2.3a.
7019 * configure.ac (AC_INIT): Likewise.
7020
7021 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7022 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7023 due to header ordering dependencies. I don't know why the #define
7024 was there.
7025
7026 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7027 runtime cost when YYDEBUG is not defined, and so that some tests
7028 that used to fail now work. Problem and initial suggestion by
7029 Paolo Bonzini.
7030 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7031 * data/glr.cc (b4_parser_class_name):
7032 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7033 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7034 (yydebug_) [YYDEBUG]: New member.
7035 (yycdebug_): Now defined only if YYDEBUG.
7036 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7037 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7038 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7039 if YYYDEBUG.
7040 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7041 Define only if YYDEBUG.
7042 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7043 set_debug_level.
7044 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7045 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7046 AT_CHECK_CALC_GLR_CC that are working now.
7047
7048 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7049
7050 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7051 We don't need them in glr.cc, and glr.c defines them.
7052 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7053 assumes that defining it to anything is the same as defining
7054 it to 1. Problem reported by Paolo Bonzini.
7055
7056 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7057
7058 * data/c.m4 (b4_null, b4_case): Define.
7059 * src/output.c (prepare_symbols): Use b4_null.
7060 (user_actions_output): Use b4_case.
7061
7062 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7063
7064 * data/glr.c (b4_shared_declarations): Put start-header first,
7065 before any #includes that we generate, so that feature-test
7066 macros work. Problem reported by Michael Deutschmann in
7067 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7068 * data/lalr1.cc: Likewise.
7069 * doc/bison.texinfo (Prologue): Document that feature-test macros
7070 should be defined before any Bison declarations.
7071 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7072 that depend on location.hh after, not before, Bison decls, since
7073 we now include location.hh after the first user prologue.
7074
7075 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7076 Sander Brandenburg in
7077 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7078 Also, fix minor white space and comment issues.
7079 (Prologue): Mention that it's better to define feature-test macros
7080 before Bison declarations. Problem reported by Michael Deutschmann.
7081
7082 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7083 by Jim Meyering.
7084 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7085 This adjusts to recent gnulib changes.
7086
7087 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7088
7089 Finish implementation of per-type %destructor/%printer. Discussed
7090 starting at
7091 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7092 and
7093 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7094 * NEWS (2.3+): Add a description of this feature to the default
7095 %destructor/%printer description.
7096 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7097 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7098 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7099 list node contains a semantic type.
7100 * src/symtab.c, src/symtab.h: Extend with a table that associates
7101 semantic types with their %destructor's and %printer's.
7102 (semantic_type_from_uniqstr, semantic_type_get,
7103 semantic_type_destructor_set, semantic_type_printer_set): New functions
7104 composing the public interface of that table.
7105 (symbol_destructor_get, symbol_destructor_location_get,
7106 symbol_printer_get, symbol_printer_location_get): If there's no
7107 per-symbol %destructor/%printer, look up the per-type before trying
7108 the default.
7109 * tests/actions.at (Per-type %printer and %destructor): New test case.
7110 * tests/input.at (Default %printer and %destructor redeclared):
7111 Extend to check that multiple occurrences of %symbol-default in a
7112 single %destructor/%printer declaration is an error.
7113 (Per-type %printer and %destructor redeclared, Unused values with
7114 per-type %destructor): New test cases.
7115
7116 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7117
7118 Require default %destructor/%printer to be declared using
7119 %symbol-default instead of an empty symbol list, and start working on
7120 new per-type %destructor/%printer. Discussed at
7121 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7122 * NEWS (2.3+): Add %symbol-default to example.
7123 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7124 (Table of Symbols): Add entry for %symbol-default.
7125 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7126 (generic_symlist, generic_symlist_item): New nonterminals for creating
7127 a list in which each item is a symbol, semantic type, or
7128 %symbol-default.
7129 (grammar_declaration): Use generic_symlist in %destructor and %printer
7130 declarations instead of symbols.1 or an empty list.
7131 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7132 for changes to symbol_list.
7133 * src/reader.c: Update for changes to symbol_list.
7134 * src/scan-code.l: Likewise.
7135 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7136 * src/symlist.c, src/symlist.h: Extend such that a list node may
7137 represent a semantic type or a %symbol-default in addition to just an
7138 ordinary symbol. Add switched functions for setting %destructor's and
7139 %printer's.
7140 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7141 %destructor/%printer declarations.
7142
7143 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7144
7145 Whether the default %destructor/%printer applies to a particular symbol
7146 isn't a question of whether the user *declares* that symbol (in %token,
7147 for example). It's a question of whether the user by any means
7148 *defines* the symbol at all (by simply using a char token, for
7149 example). $end is defined by Bison whereas any other token with token
7150 number 0 is defined by the user. The error token is always defined by
7151 Bison regardless of whether the user declares it with %token, but we
7152 may one day let the user define error as a nonterminal instead.
7153 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7154 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7155 the meaning of "user-defined".
7156 * tests/actions.at (Default %printer and %destructor for user-declared
7157 end token): Rename to...
7158 (Default %printer and %destructor for user-defined end token): ...
7159 this.
7160
7161 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7162 computation of whether to apply the default, don't maintain a list of
7163 every Bison-defined symbol. Instead, just check for a first character
7164 of '$', which a user symbol cannot have, and check for the error token.
7165
7166 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7167
7168 Don't apply the default %destructor or %printer to the error token,
7169 $undefined, or $accept. This change fits the general rule that the
7170 default %destructor and %printer are only for user-declared symbols,
7171 and it solves several difficulties that are described in the new test
7172 cases listed below.
7173 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7174 * tests/actions.at (Default %printer and %destructor are not for error
7175 or $undefined, Default %printer and %destructor are not for $accept):
7176 New test cases.
7177
7178 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7179
7180 Allow %start after the first rule.
7181 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7182 when parsing the first rule.
7183 (check_and_convert_grammar): Search for it here after all grammar
7184 declarations have been parsed. Skip midrules, which have dummy LHS
7185 nonterminals.
7186 * src/symtab.c (symbol_is_dummy): New function.
7187 * src/symtab.h (symbol_is_dummy): Declare it.
7188 * tests/input.at (%start after first rule): New test.
7189
7190 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7191
7192 Redo some of the previous commit: add back the ability to use
7193 non-aliased/undeclared string literals since it might be useful to
7194 those declaring %token-table.
7195 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7196 commit: don't worry about complaints from symbols_pack.
7197 * src/symtab.c (symbol_new, symbol_class_set,
7198 symbol_check_alias_consistency): Undo changes in previous commit: count
7199 each string literal as a new symbol and token, assign it a symbol
7200 number, and don't complain about non-aliased string literals.
7201 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7202 and token counts but does still set aliased tokens to the same number,
7203 symbol_pack_processor now leaves empty slots in the symbols array.
7204 Remove those slots.
7205 * tests/regression.at (Undeclared string literal): Remove test case
7206 added in previous commit since non-aliased string literals are allowed
7207 again.
7208 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7209 remove unnecessary string literal declarations.
7210 * tests/sets.at (Firsts): Likewise.
7211
7212 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7213
7214 Don't allow an undeclared string literal, but allow a string literal to
7215 be used before its declaration.
7216 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7217 symbols_pack complained.
7218 * src/symtab.c (symbol_new): Don't count a string literal as a new
7219 symbol.
7220 (symbol_class_set): Don't count a string literal as a new token, and
7221 don't assign it a symbol number since symbol_make_alias does that.
7222 (symbol_make_alias): It's not necessary to decrement the symbol and
7223 token counts anymore. Don't assume that an alias declaration occurs
7224 before any uses of the identifier or string, and thus don't assert that
7225 one of them has the highest symbol number so far.
7226 (symbol_check_alias_consistency): Complain if there's a string literal
7227 that wasn't declared as an alias.
7228 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7229 symbol_pack asserts that every token has been assigned a symbol number
7230 although undeclared string literals have not.
7231 * tests/regression.at (String alias declared after use, Undeclared
7232 string literal): New test cases.
7233 (Characters Escapes, Web2c Actions): Declare string literals as
7234 aliases.
7235 * tests/sets.at (Firsts): Likewise.
7236
7237 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7238
7239 In the grammar scanner, STRING_FINISH unclosed constructs and return
7240 them to the parser in order to improve error messages.
7241 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7242 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7243 * tests/input.at (Unclosed constructs): New test case.
7244 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7245 seen.
7246
7247 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7248 unused global.
7249
7250 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7251
7252 Handle string aliases for character tokens correctly.
7253 * src/symtab.c (symbol_user_token_number_set): If the token has an
7254 alias, check and set its alias's user token number instead of its own,
7255 which is set to indicate the alias. Previously, every occurrence of
7256 the character token in the grammar overwrote that alias indicator with
7257 the character code.
7258 * tests/input.at (String aliases for character tokens): New test.
7259
7260 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7261
7262 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7263
7264 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7265
7266 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7267 to prevent failures when building on older platforms.
7268 Check for autopoint failure.
7269 Set XGETTEXT_OPTIONS to values that check for C format strings,
7270 so that translators are warned about them (this also helps
7271 prevent core dumps).
7272
7273 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7274 function, since it simplifies our code a bit.
7275
7276 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7277 rather than -W, so we don't get bogus warnings about sign comparisons.
7278 Add -Wpointer-arith, since that warning is useful (it reports code
7279 that does not conform to C89 and that some compilers reject).
7280 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7281 since it's no longer needed.
7282
7283 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7284
7285 Clean up scanners a bit.
7286 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7287 definitions so gcc won't warn when obstack_for_string is unused.
7288 * src/scan-code.l: config.h and system.h are already #include'd by
7289 scan-code-c.c, so get rid of them here.
7290 * src/scan-gram.l: Likewise.
7291 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7292 definitions rather than duplicating the rest of it.
7293 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7294
7295 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7296
7297 Suppress signed/unsigned comparison warnings for yycheck.
7298 * data/c.m4 (b4_safest_int_type): New macro.
7299 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7300 a signed int type, cast it to b4_safest_int_type first.
7301 * data/yacc.c: Likewise.
7302 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7303 also overwritten.
7304
7305 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7306
7307 * doc/bison.texinfo: Fix some typos.
7308
7309 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7310
7311 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7312 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7313
7314 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7315 the latest gnulib does this a different way.
7316 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7317 translation was patched, so stop omitting it.
7318
7319 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7320
7321 Enable declaration of default %printer/%destructor. Make the parser
7322 use these for all user-declared grammar symbols for which the user does
7323 not declare a specific %printer/%destructor. Thus, the parser uses it
7324 for token 0 if the user declares it but not if Bison generates it as
7325 $end. Discussed starting at
7326 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7327 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7328 and
7329 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7330 * NEWS (2.3+): Mention.
7331 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7332 declare a %destructor for a mid-rule's semantic value. It's just
7333 impossible to declare one specific to it.
7334 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7335 code. Describe default %destructor form.
7336 * src/parse-gram.y (grammar_declaration): Parse default
7337 %printer/%destructor declarations.
7338 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7339 and symbol_destructor_location_get rather than accessing the destructor
7340 and destructor_location members of struct symbol.
7341 (symbol_printers_output): Likewise but for %printer's.
7342 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7343 again.
7344 * src/symtab.c (default_destructor, default_destructor_location,
7345 default_printer, default_printer_location): New static global
7346 variables to record the default %destructor and %printer.
7347 (symbol_destructor_get, symbol_destructor_location_get,
7348 symbol_printer_get, symbol_printer_location_get): New functions to
7349 compute the appropriate %destructor and %printer for a symbol.
7350 (default_destructor_set, default_printer_set): New functions to set the
7351 default %destructor and %printer.
7352 * src/symtab.h: Prototype all those new functions.
7353 * tests/actions.at (Default %printer and %destructor): New test to
7354 check that the right %printer and %destructor are called, that they're
7355 not called for $end, and that $$ and @$ work correctly.
7356 (Default %printer and %destructor for user-declared end token): New
7357 test to check that the default %printer and %destructor are called for
7358 a user-declared end token.
7359 * tests/input.at (Default %printer and %destructor redeclared, Unused
7360 values with default %destructor): New tests to check related grammar
7361 warnings and errors.
7362
7363 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7364
7365 Clean up handling of %destructor for the end token (token 0).
7366 Discussed starting at
7367 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7368 and
7369 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7370
7371 Make the skeletons consistent in how they pop the end token and invoke
7372 its %destructor.
7373 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7374 state, which has token number 0, since this would invoke the
7375 %destructor for the end token.
7376 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7377 until after shifting the end token, or else it won't be popped.
7378 * data/yacc.c (yyparse): Likewise.
7379
7380 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7381 it's the end token. Upon termination, destroy an unshifted lookahead
7382 even when it's the end token.
7383 * data/lalr1.cc (yy::parser::parse): Likewise.
7384 * data/yacc.c (yyparse): Likewise.
7385
7386 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7387 value warnings for the end token when the user gives the end token a
7388 %destructor.
7389
7390 * tests/actions.at (Printers and Destructors): Test all the above.
7391
7392 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7393
7394 Update to latest gnulib and gettext versions.
7395 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7396 Add fopen-safer.
7397 (gnulib_files): Add m4/warning.m4. Don't worry about files
7398 overwritten by autopoint.
7399 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7400 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7401 rejects them.
7402 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7403 so that we can remove the intl files at a better time.
7404 (intl_files_to_remove): Remove aclocal.m4, since it gets
7405 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7406 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7407 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7408 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7409 Remove datarootdir hack; no longer needed.
7410 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7411 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7412 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7413 strdup.h.
7414 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7415 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7416
7417 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7418
7419 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7420 it with --assume-autoconf='latest-stable'.
7421
7422 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7423
7424 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7425 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7426 YYSTYPE' and `{'.
7427 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7428 those from muscle_tab.c since the old ones are misleading.
7429
7430 2006-07-13 Akim Demaille <akim@epita.fr>
7431
7432 Support %define "KEY" {VALUE}.
7433 * src/scan-code.h, src/scan-code.l (translate_action)
7434 (translate_rule_action, translate_symbol_action, translate_code):
7435 Return char *, not const char *.
7436 * src/parse-gram.y (declaration): Rename as...
7437 (prologue_declaration): this.
7438 (string_content): Remove this nonterminal, use STRING.
7439 (braceless, content, content.opt): New nonterminal.
7440 Use them.
7441 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7442 as value.
7443 * src/scan-gram.l (getargs.h): Don't include it.
7444
7445 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7446
7447 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7448 rather than a for-loop that declares a local bool variable. This
7449 should work around a compatibility problem with a Cray x1e C++
7450 compiler reported by Hung Nguyen in
7451 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7452 The for-loop was introduced in the 2004-11-17 change but I don't
7453 know why it was needed.
7454
7455 2006-07-12 Akim Demaille <akim@epita.fr>
7456
7457 * data/c.m4: Comment changes.
7458
7459 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7460
7461 * src/complain.c (error_message, ERROR_MESSAGE): New.
7462 To factor...
7463 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7464 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7465
7466 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7467
7468 * NEWS: Instead of %union, you can define and use your own union type
7469 YYSTYPE if your grammar contains at least one <type> tag.
7470 Your YYSTYPE need not be a macro; it can be a typedef.
7471 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7472 (Union Decl, Decl Summary): Document this.
7473 * data/glr.c (YYSTYPE): Implement this.
7474 * data/glr.cc (YYSTYPE): Likewise.
7475 * data/lalr1.cc (YYSTYPE): Likewise.
7476 * data/yacc.c (YYSTYPE): Likewise.
7477 * src/output.c (prepare): Output tag_seen_flag.
7478 * src/parse-gram.y (declaration, grammar_declaration):
7479 Use 'union_seen' rather than 'typed' to determine whether
7480 %union has been seen, since grammars can now be typed without
7481 %union.
7482 (symbol_declaration, type.opt, symbol_def):
7483 Keep track of whether a tag has been seen.
7484 * src/reader.c (union_seen, tag_seen): New vars.
7485 (typed): remove.
7486 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7487 * src/scan-code.l (untyped_var_seen): New variable.
7488 (handle_action_dollar): Adjust to above changes.
7489 (handle_action_dollar, handle_action_at):
7490 Improve overflow checking for outlandish numbers.
7491 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7492 avoid new diagnostics generated by above changes.
7493 * tests/regression.at (YYSTYPE typedef): Add test to check
7494 for type tags without %union.
7495
7496 * src/symlist.c (symbol_list_length): Return int, not unsigned
7497 int, since callers expect int. This may need to get revisited
7498 once we have proper integer overflow checking.
7499
7500 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7501 object is now static.
7502
7503 * src/getargs.c (flags_argmatch): Return void, not int,
7504 to pacify ./configure --enable-gcc-warnings.
7505
7506 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7507 since last_string is already defined to FLEX_PREFIX (last_string).
7508
7509 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7510
7511 Implement --warnings/-W.
7512 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7513 replaced by...
7514 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7515 Adjust callers.
7516 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7517 (warnings_args, warnings_types): New.
7518 (getargs, short_options, long_options): Accept -W/--warnings.
7519 Sort the options by alphabetical order, upper case letter right
7520 before its lower case.
7521
7522 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7523
7524 Change %merge result type clash warnings to errors. Discussed at
7525 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7526 * src/reader.c (record_merge_function_type): Use complain_at.
7527 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7528 declared later): Update test case results.
7529
7530 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7531
7532 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7533 to be in alphabetical order.
7534 (trace_args): Spelling fixes.
7535
7536 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7537
7538 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7539 so they don't collide with user-defined macros.
7540 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7541 this was never guaranteed, and now that we're using gnulib stdint,
7542 which defines int_fast16_t to long int, the problem is exposed.
7543
7544 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7545
7546 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7547 need the full POSIX semantics (and weren't implementing them
7548 anyway).
7549
7550 Adjust to Autoconf 2.60 and today's gnulib.
7551 * bootstrap (gnulib_modules): Add stdint.
7552 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7553 no longer copies it.
7554 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7555 since stdint needs the former and wcwidth (which is now required
7556 by mbswidth) needs the latter.
7557 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7558 work around a compatibility glitch between gettext 0.14.6 and
7559 Autoconf 2.60.
7560 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7561 Do not check for uintptr_t, since new stdint module does the right
7562 thing.
7563 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7564 Add stdint.h, stdint_.h, wcwidth.h.
7565 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7566 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7567 stdint.m4, wchar_t.m4, wcwidth.m4.
7568 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7569 usual order for ../lib/*.h files.
7570 (file_name_split): Use last_component, not base_name, to adjust
7571 to gnulib changes.
7572 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7573 for ../lib/*.h files.
7574 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7575 Define unconditionally, since we now assume the stdint module.
7576 * src/scan-skel.l: Include <dirname.h>.
7577 (BASE_QPUTS): Use last_component, not base_name.
7578 * src/system.h: Include <unlocked-io.h> in the usual order
7579 for ../lib/*.h files. Include <stdint.h> unconditionally,
7580 since we now use the stdint module.
7581 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7582 HAVE_UINTPTR_T, since we now use the stdint module.
7583 (base_name): Remove decl, since files now include <dirname.h>
7584 to get the decl.
7585
7586 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7587
7588 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7589 New, default to 1.
7590 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7591 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7592 default.
7593 * tests/calc.at: Adjust.
7594
7595 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7596
7597 * data/c.m4 (b4_basename): New.
7598 (b4_syncline): Also output the location of its invocation (from
7599 the skeleton).
7600 (b4_user_action, b4_define_user_action, b4_user_actions)
7601 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7602 (b4_user_stype): New.
7603 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7604
7605 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7606
7607 In the grammar file, the first column is 1 not 0 on the first line as
7608 on every other line.
7609 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7610 * tests/input.at (Torturing the Scanner): Update output.
7611
7612 * src/scan-gram.l (scanner_cursor): Declare it static.
7613
7614 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7615
7616 In warnings, say "previous declaration" rather than "first
7617 declaration".
7618 * src/symtab.c (redeclaration): Do that here.
7619 * src/reader.c (record_merge_function_type): In the case of a result
7620 type clash, report the previous declaration rather than the very first
7621 one in the grammar file.
7622 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7623 declared later): Add a third declaration to check this behavior.
7624 * tests/input.at (Incompatible Aliases): Update output.
7625
7626 2006-06-27 Akim Demaille <akim@epita.fr>
7627
7628 * doc/Doxyfile.in: New.
7629 * doc/Makefile.am: Use it.
7630 * src/lalr.h, src/symtab.h: Initial doxygenation.
7631
7632 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7633
7634 Don't miss %merge result type warnings just because the LHS types are
7635 declared after the %merge. This continues the effort of the previous
7636 patch.
7637 * src/reader.c (get_merge_function): Don't set the merger type yet.
7638 (record_merge_function_type): New function for setting the merger type
7639 and checking for clashes.
7640 (grammar_current_rule_merge_set): Set the location of the %merge for
7641 the current rule.
7642 (packgram): Invoke record_merge_function_type for each rule now that
7643 all symbol type declarations have been parsed.
7644 * src/reader.h (merger_list.type_declaration_location): New member
7645 storing the location of the first %merge from which the type for this
7646 merging function was derived.
7647 * src/symlist.h (symbol_list.merger_declaration_location): New member
7648 storing the location of a rule's %merge, if any.
7649 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7650 declared later): New test to catch the error fixed by the above patch.
7651
7652 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7653
7654 Get action warnings (grammar_rule_check) right even when symbol
7655 declarations appear after the rules. Discussed at
7656 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7657 and
7658 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7659 Don't mistake the type of $$ in a midrule to be that of its parent
7660 rule's $$.
7661 * src/reader.c (grammar_current_rule_end): Don't invoke
7662 grammar_rule_check yet since not all symbol declarations may have been
7663 parsed yet.
7664 (grammar_midrule_action): Likewise.
7665 Don't record whether the midrule's $$ has been used yet since actions
7666 haven't been translated yet.
7667 Record the midrule's parent rule and its RHS index within the parent
7668 rule.
7669 (grammar_current_rule_action_append): Don't translate the action yet
7670 since not all symbol declarations may have been parsed yet and, thus,
7671 warnings about types for $$, $n, @$, and @n can't be reported yet.
7672 (packgram): Translate the action and invoke grammar_rule_check now that
7673 all symbol declarations have been parsed.
7674 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7675 after parsing the entire grammar file, the symbol list here in the case
7676 of a midrule is actually the midrule's empty RHS, so reference its
7677 parent rule's RHS where necessary.
7678 On the other hand, now that you can already know it's a midrule, you
7679 aren't forced to think $$ has the same type as its parent rule's $$.
7680 (handle_action_at): In the case of a midrule, reference the parent rule
7681 where necessary.
7682 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7683 members.
7684 (symbol_list_length): Now that this is invoked after all rules have
7685 been parsed, a NULL symbol (rather than a NULL symbol list node)
7686 terminates a rule. symbol_list_print already does this correctly.
7687 * src/symlist.h (symbol_list.midrule_parent_rule,
7688 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7689 remember their relationships with their parents.
7690 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7691 fixed by the above patch.
7692 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7693 implementing...
7694 (Unused values): ... this old test case and...
7695 (Unused values before symbol declarations): ... this new test case.
7696 This one is the same as `Unused values' except that all symbol
7697 declarations appear after the rules in order to catch the rest of the
7698 errors fixed by the above patch.
7699
7700 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7701
7702 More cleanup.
7703 * src/reader.c (current_rule): Declare it static since it's no longer
7704 used outside this file.
7705 (grammar_current_rule_action_append): Remove redundant arguments from
7706 translate_rule_action invocation.
7707 * src/reader.h (current_rule): Remove this unused extern.
7708 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7709 * src/scan-code.l (translate_rule_action): Likewise.
7710
7711 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7712
7713 Clean up yesterday's patch.
7714 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7715 to...
7716 * src/reader.c (grammar_current_rule_action_append): ... here for
7717 consistency with grammar_current_rule_symbol_append.
7718 * tests/regression.at (Braced code in declaration in rules section):
7719 Make yyerror and yylex static as usual.
7720
7721 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7722
7723 Fix bug that mistakes braced code in a declaration in the rules section
7724 to be a rule action. Mentioned at
7725 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7726 * src/scan-gram.l: Move midrule action detection from the start of the
7727 scanning of any braced code to...
7728 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7729 action. For readability, use $2 and @2 rather than the equivalent
7730 global variables.
7731 * tests/regression.at (Braced code in declaration in rules section):
7732 New test to catch the error fixed by the above patch.
7733
7734 Work on code readability some.
7735 * src/scan-code.l (current_rule): Get rid of this misleading and
7736 redundant declaration: it's actually extern'ed in reader.h.
7737 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7738 translate_action): Add a rule argument and use it instead of the global
7739 current_rule.
7740 (translate_rule_action): This already receives current_rule through an
7741 argument, so pass it on to translate_action instead of assigning
7742 current_rule to current_rule.
7743 (translate_symbol_action, translate_code): Pass rule = NULL to
7744 translate_action.
7745
7746 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7747
7748 Rename %before-definitions to %start-header and %after-definitions to
7749 %end-header. Don't use these declarations to separate pre-prologue
7750 blocks from post-prologue blocks. Add new order-independent
7751 declarations %before-header and %after-header as alternatives to the
7752 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7753 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7754 * NEWS (2.3+): Update for these changes.
7755 * data/glr.c (b4_before_definitions): Update to...
7756 (b4_start_header): ... this.
7757 (b4_after_definitions): Update to...
7758 (b4_end_header): ... this.
7759 * data/glr.cc: Likewise.
7760 * data/lalr1.cc: Likewise.
7761 * data/yacc.c: Likewise.
7762 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7763 prologue blocks with %*-header declarations.
7764 (Calc++ Parser): Likewise.
7765 (Decl Summary): Update names.
7766 (Table of Symbols): Update description.
7767 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7768 (PERCENT_END_HEADER): ... this.
7769 (PERCENT_BEFORE_DEFINITIONS): Update to...
7770 (PERCENT_START_HEADER): ... this.
7771 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7772 (declaration): Update token names and m4 macro names.
7773 When parsing %end-header and %start-header, invoke translate_code
7774 before muscle_code_grow, and no longer set global booleans to remember
7775 whether these declarations have been seen.
7776 Parse new %after-header and %before-header.
7777 * src/reader.c (before_definitions, after_definitions): Remove.
7778 (prologue_augment): Accept a new bool argument to specify whether to
7779 augment the pre-prologue or post-prologue.
7780 * src/reader.h (before_definitions, after_definitions): Remove these
7781 extern's.
7782 (prologue_augment): Add new bool argument.
7783 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7784 (PERCENT_END_HEADER): ... this.
7785 (PERCENT_BEFORE_DEFINITIONS): Update to...
7786 (PERCENT_START_HEADER): ... this.
7787 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7788 * tests/actions.at (Printers and Destructors): Update names.
7789
7790 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7791
7792 Add comparison operators for C++ location classes. Discussed at
7793 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7794 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7795 declaration indicating whether filename_type has an operator==. If
7796 filename_type is `std::string', it defaults to `1', `0' otherwise.
7797 * data/location.cc: Iff b4_define_location_comparison is `1', add
7798 operator== and operator!= for class position and for class location.
7799
7800 Some minor fixes.
7801 * src/scan-action.l: Remove unused file.
7802 * src/symtab.c (symbol_printer_set): Use printer_location not
7803 destructor_location.
7804 * src/symtab.h (struct symbol): Replace incorrect source comment for
7805 printer members.
7806 * tests/input.at (Incompatible Aliases): Update output with correct
7807 printer location.
7808
7809 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7810
7811 Don't put the pre-prologue in the header file. For the yacc.c code
7812 file and the glr.c header and code files, move the pre-prologue before
7813 the token definitions. Add new %before-definitions and
7814 %after-definitions to declare code that will go in both the header file
7815 and code file. Discussed at
7816 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7817 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7818 and
7819 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7820 * NEWS (2.3+): Describe these changes.
7821 * data/glr.c (b4_pre_prologue): Move from within to before...
7822 (b4_shared_declarations): ... this.
7823 Add new b4_before_definitions before b4_token_enums.
7824 Add new b4_after_definitions at the end.
7825 * data/glr.cc (b4_pre_prologue): Replace with...
7826 (b4_before_definitions): ... this in the header file.
7827 (b4_after_definitions): New near the end of the header file.
7828 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7829 code file right before including the header file.
7830 (b4_before_definitions): New in the previous position of
7831 b4_pre_prologue in the header file.
7832 (b4_after_definitions): New near the end of the header file.
7833 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7834 (b4_token_enums_defines): In the code file, move to right before
7835 YYSTYPE for consistency with the header file.
7836 (b4_before_definitions): New right before b4_token_enums_defines in
7837 both the header and code file.
7838 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7839 header and code file.
7840 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7841 of prologues for %union dependencies.
7842 (Decl Summary): In %defines description, mention the effect of
7843 %before-definitions and %after-definitions on the header file.
7844 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7845 than in the pre-prologue so that make check succeeds.
7846 (Table of Symbols): Add entries for %before-definitions and
7847 %after-definitions.
7848 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7849 %before-definitions.
7850 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7851 (declaration): Parse those declarations and append to
7852 b4_before_definitions and b4_after_definitions, respectively.
7853 * src/reader.c (before_definitions, after_definitions): New bools to
7854 track whether those declarations have been seen.
7855 (prologue_augment): Add to the post-prologue if %union,
7856 %before-definitions, or %after-definitions has been seen.
7857 * src/reader.h (before_definitions, after_definitions): New extern's.
7858 * src/scan-gram.l: Scan the new declarations.
7859 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7860 prologue block in a %before-definitions or a %after-definitions based
7861 on whether the %union is declared.
7862 * tests/regression.at (Early token definitions with --yacc, Early token
7863 definitions without --yacc): Move tests for token definitions into the
7864 post-prologue since token names are no longer defined in the
7865 pre-prologue.
7866
7867 2006-06-20 Akim Demaille <akim@epita.fr>
7868
7869 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7870 (symbol_get): Use it.
7871 * src/parse-gram.y: Use it.
7872
7873 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7874
7875 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7876 build succeeds when configured with --enable-gcc-warnings.
7877
7878 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7879
7880 * src/parse-gram.y (char_name): New function.
7881 (CHAR, STRING, string_content): For %printer, properly escape.
7882 (ID): Prefer fputs to fprintf.
7883 (id): Reindent to be consistent with other rules.
7884 Properly quote char.
7885
7886 The Translation Project changed its way of publishing translations
7887 to maintainers. I haven't received any responses to my request
7888 for supporting the old way, or for documenting the new way. I
7889 have modified 'bootstrap' to use screen scraping
7890 (in this case, HTML scraping). This is unreliable and inelegant,
7891 but I don't see any better way. Yuck.
7892 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7893 (get_translations): New function, which uses HTML scraping to
7894 deduce locations of latest translations.
7895 Use this function to grab both bison and bison-runtime .po files.
7896 Don't bother priming the pump for the runtime-po domain any more,
7897 as it's now translated better than bison is.
7898
7899 2006-06-19 Akim Demaille <akim@epita.fr>
7900
7901 * src/scan-gram.l: No longer "parse" things after `%union' until
7902 `{'. Rather, return a single "%union" token.
7903 No longer make symbols: return strings, and leave the conversion
7904 to symbols to the parser.
7905 (SC_PRE_CODE, token_type): Remove.
7906 * src/parse-gram.y (%union): New field `character'.
7907 Sort tokens.
7908 (CHAR): New token.
7909 (ID, ID_COLON): Now that the scanner no longer makes them
7910 identifiers, adjust all uses to invoke symbol_get.
7911 (id_colon): New, wraps the conversion from string to symbol.
7912 (%union): Accept a possible union_name.
7913 (symbol): Now can be a char.
7914 * data/c.m4 (b4_union_name): Leave a default value.
7915 * data/glr.c, data/yacc.c: Use it.
7916
7917 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7918
7919 For associating token numbers with token names for "yacc.c", don't use
7920 #define statements unless `--yacc' is specified; always use enum
7921 yytokentype. Most important discussions start at:
7922 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7923 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7924 and
7925 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7926 * NEWS (2.3+): Mention.
7927 * data/c.m4 (b4_yacc_if): New.
7928 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7929 token #define's.
7930 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7931 on token name definitions.
7932 * src/getargs.c (usage): Capitalize `Yacc' in English.
7933 * src/output.c (prepare): Define b4_yacc_flag.
7934 * tests/regression.at (Early token definitions): Test that tokens names
7935 are defined before the pre-prologue not just before the post-prologue.
7936 Remove this test case and copy to...
7937 (Early token definitions with --yacc): ... this to test #define's.
7938 (Early token definitions without --yacc): ... and this to test enums.
7939
7940 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7941
7942 * NEWS: Reword the post-2.3 change to not be so optimistic about
7943 removing the old "look-ahead" spelling.
7944 Update previous look-ahead/lookahead change reports.
7945 * REFERENCES: look-ahead -> lookahead (since that's
7946 what he actually wrote).
7947 * doc/refcard.tex: look ahead -> lookahead,
7948 look-ahead -> lookahead
7949
7950 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7951
7952 For consistency, use `lookahead' instead of `look-ahead' or
7953 `look_ahead'. Discussed starting at
7954 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7955 and then at
7956 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7957 * NEWS: For the next release, note the change to `--report'.
7958 * TODO, doc/bison.1: Update English.
7959 * doc/bison.texinfo: Update English.
7960 (Understanding Your Parser, Bison Options): Document as
7961 `--report=lookahead' rather than `--report=look-ahead'.
7962 * src/conflicts.c: Update English in comments.
7963 (lookahead_set): Rename from look_ahead_set.
7964 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7965 (resolve_sr_conflict): Rename local look_ahead_tokens to
7966 lookahead_tokens, and update other uses.
7967 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7968 count_rr_conflicts, conflicts_free): Update uses.
7969 * src/getargs.c (report_args): Move "lookahead" before alternate
7970 spellings.
7971 (report_types): Update uses.
7972 (usage): For `--report' usage description, state `lookahead' spelling
7973 rather than `look-ahead'.
7974 * src/getargs.h (report.report_lookahead_tokens): Rename from
7975 report_look_ahead_tokens.
7976 * src/lalr.c: Update English in comments.
7977 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7978 (state_lookahead_tokens_count): Rename from
7979 state_look_ahead_tokens_count.
7980 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7981 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7982 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7983 Update other uses.
7984 Update English in output.
7985 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7986 * src/print.c: Update English in comments.
7987 (lookahead_set): Rename from look_ahead_set.
7988 (print_reduction): Rename argument lookahead_token from
7989 look_ahead_token.
7990 (print_core, state_default_rule, print_reductions, print_results):
7991 Update uses.
7992 * src/print_graph.c: Update English in comments.
7993 (print_core): Update uses.
7994 * src/state.c: Update English in comments.
7995 (reductions_new): Update uses.
7996 (state_rule_lookahead_tokens_print): Rename from
7997 state_rule_look_ahead_tokens_print, and update other uses.
7998 * src/state.h: Update English in comments.
7999 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8000 (state_rule_lookahead_tokens_print): Rename from
8001 state_rule_look_ahead_tokens_print.
8002 * src/tables.c: Update English in comments.
8003 (conflict_row, action_row): Update uses.
8004 * tests/glr-regression.at
8005 (Incorrect lookahead during deterministic GLR,
8006 Incorrect lookahead during nondeterministic GLR): Rename
8007 print_look_ahead to print_lookahead.
8008 * tests/torture.at: Update English in comments.
8009 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8010 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8011 (Many lookahead tokens): Update uses.
8012 * data/glr.c: Update English in comments.
8013 * lalr1.cc: Likewise.
8014 * yacc.c: Likewise.
8015 * src/conflicts.h: Likewise.
8016 * src/lalr.h: Likewise.
8017 * src/main.c: Likewise.
8018 * src/output.c: Likewise.
8019 * src/parse-gram.c: Likewise.
8020 * src/tables.h: Likewise.
8021 * tests/calc.at: Likewise.
8022
8023 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8024
8025 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8026
8027 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8028
8029 * TODO: Add request from Nelson H. F. Beebe to be able to install
8030 Bison without installing the yacc script.
8031
8032 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8033
8034 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8035 and yytext if they're already #define'd.
8036 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8037 * src/scan-code-c.c: ... here.
8038 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8039 <config.h>.
8040
8041 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8042
8043 Get Bison to build again when configured with --enable-gcc-warnings.
8044 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8045 missing #include's.
8046 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8047 loc argument as it shadows a global.
8048 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8049 invocation.
8050
8051 * src/.cvsignore: Add scan-code.c.
8052
8053 2006-06-07 Akim Demaille <akim@epita.fr>
8054
8055 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8056 to...
8057 * src/scan-code.l: here.
8058 * tests/input.at (Torturing the Scanner): Fix another location
8059 error.
8060
8061 2006-06-07 Akim Demaille <akim@epita.fr>
8062
8063 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8064
8065 2006-06-06 Akim Demaille <akim@epita.fr>
8066
8067 Extract the parsing of user actions from the grammar scanner.
8068 As a consequence, the relation between the grammar scanner and
8069 parser is much simpler. We can also split "composite tokens" back
8070 into simple tokens.
8071 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8072 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8073 rename as...
8074 * src/location.h, src/location.c (add_column_width)
8075 (location_compute): these.
8076 Fix the column count: the initial column is 0.
8077 (location_print): Be robust to ending column being 0.
8078 * src/location.h (boundary_set): New.
8079 * src/main.c: Adjust to scanner_free being renamed as
8080 gram_scanner_free.
8081 * src/output.c: Include scan-code.h.
8082 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8083 Use boundary_set.
8084 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8085 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8086 which is now, again, a separate token.
8087 Adjust all dependencies.
8088 Whereever actions with $ and @ are used, use translate_code.
8089 (action): Remove this nonterminal which is now useless.
8090 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8091 (grammar_current_rule_action_append): Use translate_code.
8092 (packgram): Bound check ruleno, itemno, and rule_length.
8093 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8094 (last_string, last_braced_code_loc, max_left_semantic_context)
8095 (scanner_initialize, scanner_free, scanner_last_string_free)
8096 (gram_out, gram_lineno, YY_DECL_): Move to...
8097 * src/scan-gram.h: this new file.
8098 (YY_DECL): Rename as...
8099 (GRAM_DECL): this.
8100 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8101 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8102 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8103 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8104 Move these declarations, and...
8105 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8106 these to...
8107 * src/flex-scanner.h: this new file.
8108 * src/scan-gram.l (rule_length, rule_length_overflow)
8109 (increment_rule_length): Remove.
8110 (last_braced_code_loc): Rename as...
8111 (gram_last_braced_code_loc): this.
8112 Adjust to the changes of the parser.
8113 Move all the handling of $ and @ into...
8114 * src/scan-code.l: here.
8115 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8116 (handle_action_dollar, handle_action_at): Move to...
8117 * src/scan-code.l: here.
8118 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8119 scan-code.h, scan-code-c.c, scan-gram.h.
8120 (EXTRA_bison_SOURCES): Add scan-code.l.
8121 (BUILT_SOURCES): Add scan-code.c.
8122 (yacc): Be robust to white spaces.
8123
8124 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8125 * tests/regression.at: Adjust the column numbers.
8126 * tests/regression.at: Adjust the error message.
8127
8128 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8129
8130 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8131 Use Akim's wording from
8132 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8133
8134 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8135
8136 Between Bison releases, manually append `+' to the previous Bison
8137 release number, and use that as a signal to automatically print the
8138 ChangeLog's CVS Id keyword from --version. Discussed starting at
8139 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8140 * ChangeLog: Add Id header.
8141 * configure.ac (AC_INIT): Append `+' to `2.3'.
8142 * src/.cvsignore: Add revision.c.
8143 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8144 (BUILT_SOURCES): Add revision.c.
8145 (revision.c): New target rule. This file defines a new global variable
8146 named revision. It initializes it with either the Id from ChangeLog
8147 or, if VERSION doesn't contain `+', with the empty string.
8148 * src/getargs.c (version): Print the value of revision.
8149 * src/revision.h: Extern revision.
8150
8151 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8152
8153 * NEWS: Version 2.3.
8154 * configure.ac (AC_INIT): Likewise.
8155
8156 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8157
8158 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8159 with no arguments, not as an object-like macro. This is for
8160 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8161 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8162 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8163 Document this.
8164
8165 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8166
8167 * src/getargs.c (usage): Back out yesterday's modification of the
8168 --help output so that we don't have to wait for translation before
8169 releasing 2.3.
8170
8171 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8172
8173 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8174 Problem reported by Akim Demaille.
8175
8176 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8177
8178 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8179
8180 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8181
8182 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8183 generated source code. Problem reported by Frans Englich in
8184 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8185
8186 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8187
8188 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8189 shell, not within 'make', so that 'make' by an ordinary builder
8190 (using GNU make) does not worry about configuring gzip. This also
8191 works around a bug reported independently by Keith Thompson and by
8192 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8193 stderr rather than stdout, messing up the build logs.
8194
8195 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8196
8197 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8198 to make sure that YYID will never be unused. This fixes a 'make
8199 maintainer-check' failure caused by the recent changes to the 'Trivial
8200 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8201 not used.
8202 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8203
8204 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8205
8206 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8207 state before an empty RHS is always resolved here. Only the location
8208 of that state is guaranteed to be resolved, and that's enough. This
8209 fixes the remaining bug reported by Derek M. Jones in
8210 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8211 * tests/glr-regression.at (Uninitialized location when reporting
8212 ambiguity): Test the above case.
8213 Also, the embedded comments in this test case claim it checks the case
8214 of an empty RHS that has inherited the initial location. However, the
8215 corresponding LHS was already resolved, so yyresolveLocations didn't
8216 actually have reason to modify it. Fix this by forcing
8217 nondeterministic operation at the beginning of the parse.
8218
8219 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8220
8221 * data/c.m4 (b4_yy_symbol_print_generate):
8222 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8223 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8224 of the bugs reported today by Derek M Jones in
8225 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8226 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8227 defined to be a type name without parens or brackets.
8228 (Location Type): Similarly for YYLTYPE.
8229 * tests/regression.at (Trivial grammars): Put in a test for this
8230 bug that will be caught by 'make maintainer-check' (though not,
8231 alas, by 'make check' unless your compiler is picky).
8232
8233 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8234
8235 * NEWS: Version 2.2.
8236 * configure.ac (AC_INIT): Likewise.
8237
8238 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8239
8240 * data/glr.c (yyreportTree): Make room in yystates for the state
8241 preceding the RHS. This fixes the segmentation fault reported by Derek
8242 M. Jones in
8243 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8244 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8245 to the user. Reported for yyreportTree by Derek M. Jones later in the
8246 same thread.
8247 * THANKS: Add Derek M. Jones.
8248 Update my email address.
8249 Fix typo in Steve Murphy's name.
8250
8251 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8252
8253 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8254 checking against YYLAST that caused the parser to miss a potential
8255 alternative in its diagnostic.
8256 Problem reported by Maria Jose Moron Fernandez in
8257 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8258 * data/lalr1.cc (yysyntax_error_): Likewise.
8259 * data/yacc.c (yysyntax_error): Likewise.
8260 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8261 tokens, in case we run into an older C compiler.
8262 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8263 Use them to check for the off-by-one error fixed above.
8264
8265 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8266 YYSIZE_T, not size_t.
8267 * tests/regression.at (Trivial grammars): New test, to catch
8268 the error fixed by the above patch.
8269
8270 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8271
8272 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8273 scheme.
8274 Reported by Steve Murphy.
8275
8276 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8277
8278 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8279 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8280
8281 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8282
8283 Implement --trace=m4.
8284 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8285 * src/output.c (output_skeleton): When set, pass -dV to m4.
8286
8287 Factor the handling of flags in m4.
8288 * src/output.c (prepare): Rename the muscle names debug, defines,
8289 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8290 * data/c.m4: Adjust.
8291 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8292 Use b4_define_flag_if to define other b4_FLAG_if macros.
8293 (b4_location_if): As a consequence, rename as...
8294 (b4_locations_if): this, for consistency.
8295 Adjust all the skeletons.
8296
8297 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8298
8299 * etc/bench.pm: Shorten bench names.
8300
8301 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8302
8303 * src/output.h, src/output.c (error_verbose): Move to...
8304 * src/getargs.h, src/getargs.c: here.
8305 Sort the flags.
8306 Adjust dependencies.
8307
8308 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8309
8310 * data/c.m4 (b4_copyright): Put the special exception for Bison
8311 skeletons here, so we don't have to put it in each skeleton. All
8312 uses changed. Suggested by Akim Demaille. Also, wrap the
8313 copyright notice, in case it is longer than 80 columns. Replace
8314 comma by newline after title.
8315
8316 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8317
8318 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8319 incompatibility, not a bug. Mention that it wasn't fixed as of
8320 flex 2.5.33.
8321
8322 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8323
8324 * examples/extexi: Enforce the precedence of concatenation over
8325 >>.
8326 Reported by Tommy Nordgren.
8327
8328 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8329
8330 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8331 with the member "token".
8332 Reported by Martin Nylin.
8333
8334 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8335
8336 * data/glr.c: Switch to Bison 2.2 special-exception language in
8337 the copyright notice. Use more-regular format for titles and
8338 copyright notices.
8339 * data/glr.cc: Likewise.
8340 * data/location.cc: Likewise.
8341 * data/yacc.cc: Likewise.
8342 * doc/bison.texinfo (Conditions): Document this.
8343 * NEWS: likewise. Upgrade version to 2.2.
8344
8345 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8346
8347 * data/glr.cc: Remove dead code.
8348
8349 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8350
8351 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8352 that variable and the line breaks the bootstrap. Problem reported
8353 by Juan M. Guerrero.
8354
8355 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8356
8357 * doc/bison.texinfo (Multiple start-symbols): New.
8358
8359 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8360
8361 * etc/README, etc/bench.pl: New.
8362
8363 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8364
8365 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8366 rule.
8367 Reported by Mickael Labau.
8368 * tests/input.at (Torturing the Scanner): Test it.
8369
8370 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8371
8372 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8373 Problem reported by Bob Rossi.
8374
8375 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8376
8377 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8378 and didn't really work.
8379 For the index, use @ifnotinfo, not @iftex.
8380 Minor cleanups of spacing and terminology.
8381
8382 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8383
8384 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8385 of AT_NAME_PREFIX when %name-prefix is not used.
8386
8387 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8388
8389 Apply --prefix to C++ skeletons too: they change the namespace.
8390 The test suite already exercize these cases.
8391 * data/c++.m4 (b4_namespace): New.
8392 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8393 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8394 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8395 * doc/bison.texinfo: Document it.
8396 (Option Cross Key): Use @multitable in all formats. It looks
8397 nicer, even in TeX outputs.
8398 (Rules): Use the same code whatever the output type is.
8399 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8400 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8401 * tests/calc.at: Use it, instead of hard coding `yy'.
8402
8403 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8404
8405 * TODO: Remove dead items.
8406
8407 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8408
8409 * doc/FAQ: Remove, merged into...
8410 * doc/bison.texinfo (FAQ): this.
8411 * doc/Makefile.am (EXTRA_DIST): Adjust.
8412
8413 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8414
8415 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8416 even if empty.
8417 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8418 * doc/bison.texinfo (Calc++ Scanner): Use it.
8419
8420 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8421
8422 Fix two nits reported by twlevo, plus one more that I discovered.
8423
8424 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8425 this is the usual Bison style.
8426 * src/location.h (location_print): Likewise.
8427
8428 * src/reader.h (token_name): Likewise.
8429
8430 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 Fix some nits reported by twlevo.
8433 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8434 and "POSIX". Use more-modern syntax for URLs. Mention C++
8435 and ask for Java. Don't hardwire OS version numbers. Add
8436 copyright notice.
8437 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8438 * src/conflicts.c (solved_conflicts_obstack): Now static.
8439
8440 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8441
8442 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8443 page. Say "you can use it" not "you may use it" as on the web page;
8444 we're describing capabilities not granting permission.
8445
8446 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8447
8448 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8449 shadowing warnings. Use usual patter for iterating through RHS.
8450 * tests/glr-regression.at
8451 (Uninitialized location when reporting ambiguity):
8452 Modify yylex so that it uses its argument, rather than trying
8453 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8454 const char -> char const.
8455
8456 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8457 Don't use tabs inside commands; it messes up 'ps'.
8458 Problem reported by twlevo.
8459
8460 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8461
8462 * tests/glr-regression.at (Uninitialized location when reporting
8463 ambiguity): New test case.
8464 * data/glr.c (yyresolveLocations): New function, which uses
8465 YYLLOC_DEFAULT.
8466 (yyresolveValue): Invoke yyresolveLocations before reporting an
8467 ambiguity.
8468 * doc/bison.texinfo (Default Action for Locations): Note
8469 YYLLOC_DEFAULT's usage for ambiguity locations.
8470 (GLR Semantic Actions): Cross-reference those notes.
8471
8472 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8473
8474 * tests/glr-regression.at (Leaked semantic values when reporting
8475 ambiguity): Remove unnecessary union and type declarations.
8476 (Leaked lookahead after nondeterministic parse syntax error): New test
8477 case.
8478 * data/glr.c (yyparse): Check for zero stacks remaining before
8479 attempting to shift the lookahead so that you don't lose it.
8480
8481 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8482
8483 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8484 * tests/glr-regression.at (Leaked semantic values when reporting
8485 ambiguity): New test case.
8486 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8487 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8488 now unnecessary yystackp parameter.
8489 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8490 destructors can be called.
8491
8492 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8493 in existing testcases.
8494
8495 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8496
8497 Don't leak semantic values for parent RHS when a user action cuts the
8498 parser, and clean up related code a bit.
8499 * tests/glr-regression.at (Leaked merged semantic value if user action
8500 cuts parse): Rename to...
8501 (Leaked semantic values if user action cuts parse): ... this. Add check
8502 for leaked parent RHS values.
8503 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8504 between an unresolved state (non-empty chain of semantic options) and
8505 an incomplete one (signaled by an empty chain).
8506 (yyresolveStates): Document the interface. Move all manipulation of a
8507 successfully or unsuccessfully resolved yyGLRState to...
8508 (yyresolveValue): ... here so that yyresolveValue always leaves a
8509 yyGLRState with consistent data and thus is easier to understand.
8510 Remove the yyvalp and yylocp parameters since they are always just
8511 taken from the yys parameter. When reporting a discarded merged value
8512 in debugging output, note that it is incompletely merged. Document the
8513 interface.
8514 (yyresolveAction): If resolving any of the RHS states fails, destroy
8515 them all rather than leaking them. Thus, as long as user actions are
8516 written to clean up the RHS correctly, yyresolveAction always cleans up
8517 the RHS of a semantic option. Document the interface.
8518
8519 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8520
8521 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8522 led to a segmentation fault in GNU Pascal. Problem reported
8523 by Waldek Hebisch.
8524
8525 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8526
8527 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8528 mid-rule action inside a nonterminal symbol in order to declare a
8529 destructor for its semantic value.
8530
8531 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8532
8533 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8534 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8535 __cplusplus && ! defined _STDLIB_H && !
8536 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8537 defined free))]: Include <stdlib.h> rather than rolling our own
8538 declarations of malloc and free, to avoid problems with
8539 incompatible declarations (using 'throw') C++'s stdlib.h. This
8540 should fix Debian bug 340012
8541 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8542 reported by Guillaume Melquiond.
8543
8544 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8545
8546 * NEWS: Clarify symbols versus types in unused-value warnings.
8547
8548 * configure.ac (AC_INIT): Bump version number.
8549
8550 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8551
8552 * NEWS: Version 2.1a.
8553 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8554 since C99 requires this.
8555
8556 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8557
8558 * m4/c-working.m4: New file.
8559 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8560
8561 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8562
8563 * Makefile.maint: Merge from coreutils.
8564
8565 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8566
8567 More portability fixes for problems summarized by Nelson H. F. Beebe.
8568
8569 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8570 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8571 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8572 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8573 messes up because C++ code is compiled in 32-bit mode but linked
8574 in 64-bit mode.
8575
8576 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8577
8578 More portability fixes for problems summarized by Nelson H. F. Beebe.
8579
8580 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8581 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8582
8583 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8584 nodist_PROGRAMS, since we don't need to actually compile the
8585 example if we're just doing a plain 'make'. This avoids bothering
8586 the installer unnecessarily about problems due to weird C++
8587 compilers.
8588
8589 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8590
8591 More portability fixes for problems summarized by Nelson H. F. Beebe.
8592
8593 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8594 than #include "...", and compile with -I'.'. The old method was
8595 not portable, according to Posix and the C standard, and it does
8596 not work with Sun C 5.7, where previous #line directives affect
8597 the working directory used in later #include "..." directives.
8598
8599 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8600
8601 Various DJGGP specific issues in /djgpp
8602
8603 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8604
8605 More portability fixes for problems summarized by Nelson H. F. Beebe.
8606
8607 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8608 '#include <map>' works and that you can apply ++ to iterators.
8609
8610 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8611
8612 Work around portability problems summarized by Nelson H. F. Beebe in
8613 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8614
8615 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8616 that '#include <string>' works.
8617
8618 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8619 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8620 "warning: sorry: semantics of inline function static data `const
8621 unsigned char translate_table[262]' are wrong (you'll wind up with
8622 multiple copies)".
8623
8624 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8625 or, xor to not_, and_, or_, and xor_, respectively. This works
8626 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8627 random system header somewhere that includes the equivalent of
8628 <iso646.h>.
8629
8630 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8631 -E" works; it apparently doesn't work with PathScale EKO Compiler
8632 Suite Version 2.0.
8633
8634 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8635
8636 During deterministic GLR operation, user actions should be able to
8637 influence the parse by changing yychar. To make this easier to fix and
8638 to make glr.c easier to evolve in general, don't maintain yytoken in
8639 parallel with yychar; just compute yytoken when needed.
8640 * tests/glr-regression.at (Incorrect lookahead during deterministic
8641 GLR): Check that setting yychar in a user action has the intended
8642 effect.
8643 * data/glr.c (yyGLRStack): Remove yytokenp member.
8644 (yyclearin): Don't set *yytokenp.
8645 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8646 yychar rather than *yytokenp to determine the current lookahead.
8647 Compute yytoken locally when needed.
8648 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8649 point to.
8650
8651 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8652 after `--report' documentation.
8653
8654 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8655
8656 * src/parse-gram.y (grammar_declaration): Location of printer
8657 symbol is @1, not list->location. Bug reported by twlevo.
8658 * tests/input.at (Incompatible Aliases): Adjust to above change.
8659
8660 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8661
8662 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8663 all the test at once. This makes the output easier to read in the
8664 normal case.
8665
8666 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8667 got from <http://bro-ids.org/download.html>. The bug is that
8668 when two actions appeared in succession, the second one was
8669 scanned before the first one was added to the grammar rule
8670 as a midrule action. Bison then output the incorrect warning
8671 "parse.y:905.17-906.36: warning: unused value: $3".
8672 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8673 associated with a value.
8674 (rhs): Don't invoke grammar_current_rule_action_append.
8675 (action): Invoke it here instead.
8676 * src/reader.c (grammar_midrule_action): Now extern.
8677 (grammar_current_rule_action_append): Don't invoke
8678 grammar_midrule_action; that is now the scanner's job.
8679 * src/reader.h (last_string, last_braced_code_loc):
8680 (grammar_midrule_action): New decls.
8681 * src/scan-gram.l (last_string): Now extern, sigh.
8682 (last_braced_code_loc): New extern variable.
8683 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8684 rule already has an action.
8685 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8686 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8687 Add some tests to check that the above changes fixed the bug.
8688
8689 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8690
8691 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8692 All used changed. Check whether the symbol has a destructor,
8693 not whether it is typed.
8694 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8695 that the values are still reported as unused. All line numbers
8696 adjusted.
8697
8698 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8699
8700 Work around a bug in bro 0.8, which underparenthesizes its
8701 definition of YYLLOC_DEFAULT.
8702 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8703 their arguments.
8704 * data/lalr1.cc: Likewise.
8705 * data/yacc.cc: Likewise.
8706
8707 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8708
8709 Work around a bug in Pike 7.0, and give the Pike folks a
8710 better way to override the usual int widths.
8711 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8712 user can override the types.
8713 (short): #undef, to work around a bug in Pike 7.0.
8714 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8715 (union yyalloc.yyss): Use yytype_int16 rather than short.
8716 All uses changed.
8717 (yysigned_char): Remove.
8718 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8719 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8720 * tests/regression.at (Web2c Actions): Adjust to above changes.
8721
8722 * src/reader.c (check_and_convert_grammar): New function.
8723 (reader): Close the input file even if something went wrong during
8724 parsing. Minor file descriptor leak reported by twlevo.
8725
8726 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8727 to pacify gcc -Wswitch-default.
8728 * src/scan-gram.l (adjust_location): Use a default: break; case
8729 to pacify gcc -Wswitch-default.
8730 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8731 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8732 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8733 Move these decls to scan-skel.l, since they don't need to be
8734 visible elsewhere.
8735 * src/scan-skel.l: Accept the above decls.
8736 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8737 is used.
8738
8739 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8740
8741 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8742 since we don't want to insist on a version number at the start
8743 of the changelog every time.
8744 * Makefile.maint: Sync from coreutils a bit better.
8745 (sc_trailing_blank): Renamed from sc_trailing_space.
8746 All uses changed.
8747 (sc_no_if_have_config_h, sc_require_config_h):
8748 (sc_prohibit_assert_without_use): New rules.
8749 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8750 (sc_dd_max_sym_length): Fix leading spaces in rule.
8751 (sc_system_h_headers): Prefix with @.
8752 (sc_useless_cpp_parens, m4-check): Output line numbers.
8753 (changelog-check): Allow version only in head.
8754 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8755 satisfy new Makefile.maint rule.
8756 * data/glr.c: Likewise.
8757 * data/glr.cc: Likewise.
8758 * data/lalr1.cc: Likewise.
8759 * data/yacc.c: Likewise.
8760 * lib/ebitsetv.c: Likewise.
8761 * lib/lbitset.c: Likewise.
8762 * lib/subpipe.c: Likewise.
8763 * lib/timevar.c: Likewise.
8764 * src/system.h: Likewise.
8765 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8766 * djgpp/Makefile.maint: Add copyright notice.
8767 * djgpp/README.in: Likewise.
8768 * djgpp/config.bat: Likewise.
8769 * djgpp/config.site: Likewise.
8770 * djgpp/config_h.sed: Likewise.
8771 * djgpp/djunpack.bat: Likewise.
8772 * djgpp/config.sed: Fix copyright notice to match standard format.
8773 * djgpp/subpipe.h: Likewise.
8774 * lib/bitsetv-print.c: Likewise.
8775 * lib/bitsetv.c: Likewise.
8776 * lib/subpipe.h: Likewise.
8777 * lib/timevar.c: Likewise.
8778 * lib/timevar.h: Likewise.
8779 * djgpp/subpipe.c: Use standard recipe for config.h.
8780 * lib/abitset.c: Likewise.
8781 * lib/bitset.c: Likewise.
8782 * lib/bitset_stats.c: Likewise.
8783 * lib/bitsetv-print.c: Likewise.
8784 * lib/bitsetv.c: Likewise.
8785 * lib/ebitsetv.c: Likewise.
8786 * lib/get-errno.c: Likewise.
8787 * lib/lbitset.c: Likewise.
8788 * lib/subpipe.c: Likewise.
8789 * lib/timevar.c: Likewise.
8790 * lib/vbitset.c: Likewise.
8791 * tests/local.at: Likewise.
8792 * src/scan-gram.l: Don't include verify.h, since system.h does
8793 that for us.
8794 * .x-sc_require_config_h: New file.
8795 * .x-sc_unmarked_diagnostics: New file.
8796
8797 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8798
8799 Be a bit more systematic about using 'abort'.
8800 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8801 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8802 Put 'default: abort ();' before some other case, to satisfy older
8803 pedantic compilers.
8804 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8805 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8806 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8807 * src/conflicts.c (resolve_sr_conflict): Likewise.
8808 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8809 (get_decision_str, get_orientation_str, get_node_alignment_str):
8810 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8811 (get_linestyle_str, get_arrowstyle_str): Likewise.
8812 * src/conflicts.c (resolve_sr_conflict):
8813 Use a default case rather than one for the one remaining enum
8814 value, to catch invalid enum values as well.
8815 * src/lalr.c (set_goto_map, map_goto):
8816 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8817 * src/nullable.c (nullable_compute, token_definitions_output):
8818 Likewise.
8819 * src/reader.c (packgram, reader): Likewise.
8820 * src/state.c (transitions_to, state_new, state_reduction_find):
8821 Likewise.
8822 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8823 (symbol_pack): Likewise.
8824 * src/tables.c (conflict_row, pack_vector): Likewise.
8825 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8826 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8827 * src/system.h: Don't include <assert.h>.
8828 (assert): New macro.
8829
8830 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8831 (Destructor Decl, Parser Function, Pure Calling):
8832 Describe rules for braces inside C code more carefully.
8833
8834 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8835
8836 Fix some porting glitches found by Nelson H. F. Beebe.
8837 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8838 compilers that don't understand that abort () does not return.
8839 * src/state.c (transitions_to): Likewise.
8840 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8841 that '#include <cstdlib>' works.
8842 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8843 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8844 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8845 for the benefit of some pre-C99 compilers.
8846
8847 * bootstrap: Undo changes to gnulib files that autoreconf made.
8848
8849 Minor fixups to get 'make maintainer-check' to work.
8850 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8851 with the new verify.h implementation.
8852 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8853 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8854 * data/yacc.c (YYUSE): Likewise.
8855 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8856 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8857 * src/parse-gram.y (declaration): Don't pass a string constant
8858 to a function that expects char *, since GCC might complain
8859 about the constant value.
8860 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8861 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8862 before #defining them.
8863 * tests/glr-regression.at
8864 (Incorrectly initialized location for empty right-hand side in GLR):
8865 In yyerror, use the msg arg.
8866 (Corrupted semantic options if user action cuts parse):
8867 (Incorrect lookahead during deterministic GLR):
8868 (Incorrect lookahead during nondeterministic GLR):
8869 Don't name a local var 'index'; it shadows string.h's 'index'.
8870
8871 2006-01-19 Akim Demaille <akim@epita.fr>
8872
8873 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8874 location, not just parts of it.
8875
8876 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8877
8878 * NEWS: Document the fact that multiple %unions are now allowed.
8879 * doc/bison.texinfo (Union Decl): Likewise.
8880 * TODO: This feature is now implemented, so remove it from
8881 the wishlist.
8882
8883 * Makefile.maint: Merge with coreutils Makefile.maint.
8884 (CVS_LIST): Use build-aux version if available.
8885 (VERSION_REGEXP): New macro.
8886 (syntax-check-rules): Add sc_no_if_have_config_h,
8887 sc_prohibit_assert_without_use, sc_require_config_h,
8888 sc_useless_cpp_parens.
8889 (sc_obsolete_symbols): Check for O_NDELAY.
8890 (sc_dd_max_sym_length): Track coreutils.
8891 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8892 (sc_useless_cpp_parens): New rule.
8893 (news-date-check): Look for version or today's date.
8894 (changelog-check): Don't require version number near head.
8895 (copyright-check): Use current year instead of hardwiring 2005.
8896 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8897 (announcement): Add --gpg-key-ID.
8898
8899 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8900 with "file system".
8901
8902 Avoid undefined behavior that addressed just before the start of an
8903 array. Problem reported by twlevo.
8904 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8905 * src/lalr.c (build_relations): Rely on new sentinel.
8906 * src/gram.c (gram_free): Adjust to new sentinel.
8907
8908 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8909
8910 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8911 yylookaheadNeeds. All uses updated.
8912 (yysplitStack): Rename local yynewLookaheadStatuses to
8913 yynewLookaheadNeeds.
8914 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8915 GLR): In comments, change `lookahead status' to `lookahead need'.
8916
8917 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8918
8919 * data/glr.c (yysplitStack): A little stylistic rewrite.
8920
8921 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8922
8923 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8924
8925 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8926
8927 * doc/bison.texinfo: Fix some typos.
8928 (GLR Semantic Actions): New subsection discussing special
8929 considerations because GLR semantic actions might be deferred.
8930 (Actions): Mention look-ahead usage of yylval.
8931 (Actions and Locations): Mention look-ahead usage of yylloc.
8932 (Special Features for Use in Actions): Add YYEOF entry and mention it
8933 in the yychar entry.
8934 In the yychar entry, remove mention of the local yychar case (pure
8935 parser) since this is irrelevant information when writing semantic
8936 actions and since it's already discussed in `Table of Symbols' where
8937 yychar is otherwise described as an external variable.
8938 In the yychar entry, don't call it the `current' look-ahead since it
8939 isn't when semantic actions are deferred.
8940 In the yychar and yyclearin entries, add note about deferred semantic
8941 actions.
8942 Add yylloc and yylval entries discussing look-ahead usage.
8943 (Look-Ahead Tokens): When discussing yychar, don't call it the
8944 `current' look-ahead, and do mention yylval and yylloc.
8945 (Error Recovery): Cross-reference `Action Features' when mentioning
8946 yyclearin.
8947 (Table of Symbols): In the yychar entry, don't call it the `current'
8948 look-ahead.
8949 In the yylloc and yylval entries, mention look-ahead usage.
8950
8951 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8952
8953 * tests/glr-regression.at: Update copyright year to 2006.
8954
8955 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8956
8957 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8958 use during nondeterministic operation to track which stacks have
8959 actually needed the current lookahead.
8960 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8961 Allocate, deallocate, resize, and otherwise shuffle space for
8962 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8963 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8964 appropriately during nondeterministic operation.
8965 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8966 members to store the current lookahead to be used by the deferred
8967 user action.
8968 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8969 from which the RHS is taken. Set the lookahead members of the new
8970 yySemanticOption according to the lookahead status for stack yyk.
8971 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8972 yyaddDeferredAction.
8973 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8974 members of yySemanticOption before invoking yyuserAction, and then set
8975 them back to their current values afterward.
8976 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8977 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8978 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8979 titles for consistency.
8980 (Leaked merged semantic value if user action cuts parse): In order to
8981 suppress lint warnings, use arguments in merge function, and assign
8982 char value < 128 in main.
8983 (Incorrect lookahead during deterministic GLR): New test case.
8984 (Incorrect lookahead during nondeterministic GLR): New test case.
8985
8986 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8987
8988 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8989 !yyvaluep as signal that no semantic value is available to print.
8990 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8991 to print a semantic value.
8992
8993 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8994
8995 * tests/glr-regression.at: For consistency with my newer test cases,
8996 don't thank myself.
8997
8998 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8999
9000 * data/glr.c (yyresolveValue): When merging semantic options, if at
9001 least one user action succeeds but a later one cuts the parse, then
9002 destroy the semantic value before returning rather than leaking it.
9003 (yyresolveStates): If a user action cuts the parse and thus
9004 yyresolveValue fails, ignore the (unset) semantic value rather than
9005 corrupting the yyGLRState, and empty the semantic options list since
9006 the user actions should have called all necessary destructors.
9007 Simplify code with YYCHK.
9008 * tests/glr-regression.at (Corrupted semantic options if user action
9009 cuts parse): New test case.
9010 (Undesirable destructors if user action cuts parse): New test case.
9011 Before applying any of this patch, this test case never actually failed
9012 for me... but only because the corrupted semantic options usually
9013 masked this bug.
9014 (Leaked merged semantic value if user action cuts parse): New test
9015 case.
9016
9017 2006-01-05 Akim Demaille <akim@epita.fr>
9018
9019 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9020
9021 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9024 _MSC_VER. Problem reported by Cenzato Marco.
9025 (b4_c_function_def): Use it.
9026 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9027 b4_c_modern.
9028 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9029 than rolling our own.
9030
9031 2006-01-04 Akim Demaille <akim@epita.fr>
9032
9033 Also warn about non-used mid-rule values.
9034 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9035 member.
9036 (symbol_list_new): Adjust.
9037 * src/reader.c (symbol_typed_p): New.
9038 (grammar_rule_check): Use it.
9039 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9040 Check its rule.
9041 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9042 Use it.
9043 * tests/actions.at (Exotic Dollars): Adjust.
9044
9045 2006-01-04 Akim Demaille <akim@epita.fr>
9046
9047 * src/reader.c (grammar_midrule_action): If $$ is set in a
9048 mid-rule, move the `used' bit to its lhs.
9049 * tests/input.at (Unused values): New.
9050 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9051
9052 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9053
9054 * doc/bison.texinfo (Bison Options): Say more accurately what
9055 --yacc does.
9056 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9057 about declarations in the grammar when in Yacc mode, as POSIX does
9058 not require a diagnostic when the grammar uses extensions.
9059
9060 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9061
9062 Warn about dubious constructions like "%token T T".
9063 Reported by twlevo.
9064 * src/symtab.h (struct symbol.declared): New member.
9065 * src/symtab.c (symbol_new): Initialize it to false.
9066 (symbol_class_set): New arg DECLARING, specifying whether
9067 this is a declaration that we want to warn about, if there
9068 is more than one of them. All uses changed.
9069
9070 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9071 Allow multiple %union directives, whose contents concatenate.
9072 * src/parse-gram.y (grammar_declaration): Likewise.
9073 Use muscle_code_grow, so that we don't need stype_line any more.
9074 All uses changed.
9075
9076 * src/muscle_tab.c (muscle_grow): Fix comment.
9077
9078 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9079 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9080 Update copyright year to 2006.
9081
9082 2006-01-03 Akim Demaille <akim@epita.fr>
9083
9084 Have glr.cc pass (some of) the calc.at tests.
9085 * data/glr.cc (b4_parse_param_orig): New.
9086 (b4_parse_param): Improve its definition, and bound it more
9087 clearly in the skeleton.
9088 (b4_epilogue): Append, instead of prepending, in order to keep
9089 #line consistency.
9090 Simplify the generation of auxiliary functions: locations and
9091 purity are mandated.
9092 (b4_global_tokens_and_yystype): Honor it.
9093 * data/location.cc (c++.m4): Don't include it.
9094 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9095 and AT_SKEL_CC_IF.
9096 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9097 AT_LALR1_CC_IF.
9098 Be sure to initialize the first position's filename.
9099 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9100 mandated anyway.
9101 (AT_CHECK_CALC_GLR_CC): New.
9102 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9103
9104 2006-01-02 Akim Demaille <akim@epita.fr>
9105
9106 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9107 c.m4.
9108 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9109 * data/glr.cc: Do not include stack.hh.
9110
9111 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9112
9113 * data/glr.c: Reformat whitespace with tabs.
9114 (b4_lpure_formals): Remove this unused m4 macro.
9115 * tests/cxx-type.at: Reformat whitespace with tabs.
9116 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9117 since it's a member. Rename type to isNterm for clarity.
9118
9119 2005-12-29 Akim <akim@sulaco.local>
9120
9121 Let glr.cc catch up with symbol_value_print.
9122 * data/glr.cc (b4_yysymprint_generate): Replace by...
9123 (b4_yy_symbol_print_generate): this.
9124 (yy_symbol_print, yy_symbol_value_print): Declare them.
9125
9126 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9127
9128 * src/location.h (boundary): Note that a line or column equal
9129 to INT_MAX indicates an overflow.
9130 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9131 (rule_length_overflow, increment_rule_length, add_column_width):
9132 New functions.
9133 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9134 (<SC_BRACED_CODE>"}"):
9135 Use increment_rule_length rather than incrementing it by hand.
9136 (adjust_location, handle_syncline): Diagnose overflow.
9137 (handle_action_dollar, handle_action_at):
9138 Fix bug with monstrosities like $-2147483648.
9139 Remove now-unnecessary checks.
9140 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9141 (convert_ucn_to_byte): Verify assumptions.
9142 (handle_syncline): New arg LOC. All callers changed.
9143 Don't store through a value derived from char const * pointer.
9144
9145 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9146 GCC warnings.
9147
9148 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9149
9150 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9151 Remove unnecessary forward static decls.
9152
9153 2005-12-27 Akim Demaille <akim@epita.fr>
9154
9155 * src/reader.c (grammar_current_rule_check): Also check that $$
9156 is used.
9157 Take the rule to check as argument, hence rename as...
9158 (grammar_rule_check): this.
9159 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9160 Rename as...
9161 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9162 (grammar_midrule_action, grammar_symbol_append): Now static.
9163 * tests/torture.at (input): Don't rely on the default action
9164 being always performed.
9165 * tests/calc.at: "Set" $$ even when the action is "cut" with
9166 YYERROR or other.
9167 * tests/actions.at (Exotic Dollars): Instead of using unused
9168 values, check that the warning is issued.
9169
9170 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9171
9172 * NEWS: Improve wording for unused-value warnings.
9173
9174 2005-12-22 Akim Demaille <akim@epita.fr>
9175
9176 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9177 (b4_yysymprint_generate): Rename as...
9178 (b4_yy_symbol_print_generate): this.
9179 Generate yy_symbol_print instead of yysymprint.
9180 Generate also yy_symbol_value_print, and use it.
9181
9182 2005-12-22 Akim Demaille <akim@epita.fr>
9183
9184 * NEWS: Warn about unused values.
9185 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9186 a `used' member.
9187 (symbol_list_n_get, symbol_list_n_used_set): New.
9188 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9189 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9190 * src/reader.c (grammar_current_rule_check): Check that values are
9191 used.
9192 * src/symtab.c (symbol_print): Accept 0.
9193 * tests/existing.at: Remove the type information.
9194 Empty the actions.
9195 Remove useless actions (beware of mid-rule actions: perl -000
9196 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9197 * tests/actions.at (Exotic Dollars): Use unused values.
9198 * tests/calc.at: Likewise.
9199 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9200 Likewise.
9201
9202 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9203 rule_useful_p.
9204
9205 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9206
9207 Undo 2005-12-01 tentative license wording change. The wording is
9208 still being reviewed by the lawyers, and we don't want to wait for
9209 them before publishing a test release. For now, revert to the
9210 previous wording.
9211 * NEWS: Undo 2005-12-01 change.
9212 * data/glr.c: Revert to previous license wording.
9213 * data/glr.cc: Likewise.
9214 * data/lalr1.cc: Likewise.
9215 * data/location.cc: Likewise.
9216 * data/yacc.c: Likewise.
9217
9218 * NEWS: Reword %destructor vs YYABORT etc.
9219 * data/glr.c: Use American spacing, for consistency.
9220 * data/glr.cc: Likewise.
9221 * data/lalr1.cc: Likewise.
9222 * data/yacc.c: Likewise.
9223 * data/yacc.c: Reformat comments slightly.
9224 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9225 for consistency. Fix some spelling errors and reword recently-included
9226 text slightly.
9227 * tests/cxx-type.at: Cast results of malloc, for C++.
9228
9229 2005-12-21 Joel E. Denny <address@hidden>
9230
9231 * tests/cxx-type.at: Construct a tree, count the parents of shared
9232 nodes, and free each node once and only once. Previously, the memory
9233 for semantic values was leaked instead.
9234
9235 2005-12-21 Joel E. Denny <address@hidden>
9236
9237 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9238 (yylval, yylloc): If pure, #define to yystackp->yyval and
9239 yystackp->yyloc similar to yychar and yynerrs.
9240 (yyparse): If pure, remove local yylval and yylloc. Add local
9241 yystackp to accommodate pure definitions of yylval and yylloc.
9242 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9243 yylvalp and yyllocp to &yylval and &yylloc.
9244 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9245 namespace. Previously, nerrs and char were missing, but lval and lloc
9246 weren't necessary.
9247 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9248 yylvalp and yyllocp parameters since, if pure, these are now always
9249 accessible through yystackp. If not pure, they are still accessible
9250 globally.
9251 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9252 `if (YYID (N))' to pacify lint.
9253
9254 2005-12-21 Akim Demaille <akim@epita.fr>
9255
9256 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9257 destroy the RHS symbols of a rule.
9258 * data/yacc.c (yylen): Initialize to 0.
9259 Keep its value to the number of items to possibly shift.
9260 In particular, a regular successful parse that ends on YYFINAL by
9261 a (internal) YYACCEPT must not have yylen != 0.
9262 (yyerrorlab, yyreturn): Pop the RHS.
9263 Reorder a bit to emphasize the `shifting' bits of code.
9264 (YYPOPSTACK): Now accept a number of items to pop.
9265 * data/lalr1.cc: Likewise.
9266 * data/glr.c: Formatting changes.
9267 Use goto instead of fall through.
9268 * doc/bison.texinfo (Destructor Decl): Complete.
9269
9270 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9271
9272 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9273 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9274 * djgpp/config.bat: Replace every occurence of the file name
9275 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9276 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9277 * djgpp/config.sed: Replace every occurence of the file name
9278 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9279 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9280 * djgpp/djunpack.bat: DJGPP specific file.
9281 * djgpp/fnchange.lst: DJGPP specific file.
9282 * djgpp/README.in: Add new information about how to unpack the bison
9283 source on MSDOS and other systems which have 8.3 file name restrictions
9284 using djunpack.bat and fnchange.lst.
9285
9286 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9287
9288 * bootstrap (build_cvs_prefix): Remove; unused.
9289 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9290 when getting gnulib.
9291
9292 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9293
9294 * data/glr.c: Reorder typedef declarations for structs to match order
9295 of struct declarations.
9296 Rename yystack everywhere to yystackp except in yyparse where it's not
9297 a pointer.
9298 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9299 consistency.
9300 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9301 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9302 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9303 lint.
9304
9305 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9306
9307 * tests/sets.at (Accept): Fix typos in regular expression used to
9308 sed out the final state number.
9309
9310 Work around portability problem on Solaris 10: flex-generated
9311 files include <stdio.h> before <config.h>, which messes up
9312 because the latter defines __EXTENSIONS__. Address the problem
9313 by creating two new little files that include <config.h> first,
9314 then include the flex-generated files. Rewrite everyone else
9315 to include <config.h> first, as well.
9316 * lib/timevar.c: Always include "config.h".
9317 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9318 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9319 (EXTRA_bison_SOURCES): New macro.
9320 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9321 * src/system.h: Don't include config.h.
9322 * src/LR0.c: Include <config.h> first.
9323 * src/assoc.c: Likewise.
9324 * src/closure.c: Likewise.
9325 * src/complain.c: Likewise.
9326 * src/conflicts.c: Likewise.
9327 * src/derives.c: Likewise.
9328 * src/files.c: Likewise.
9329 * src/getargs.c: Likewise.
9330 * src/gram.c: Likewise.
9331 * src/lalr.c: Likewise.
9332 * src/location.c: Likewise.
9333 * src/main.c: Likewise.
9334 * src/muscle_tab.c: Likewise.
9335 * src/nullable.c: Likewise.
9336 * src/output.c: Likewise.
9337 * src/parse-gram.y: Likewise.
9338 * src/print.c: Likewise.
9339 * src/print_graph.c: Likewise.
9340 * src/reader.c: Likewise.
9341 * src/reduce.c: Likewise.
9342 * src/relation.c: Likewise.
9343 * src/state.c: Likewise.
9344 * src/symlist.c: Likewise.
9345 * src/symtab.c: Likewise.
9346 * src/tables.c: Likewise.
9347 * src/uniqstr.c: Likewise.
9348 * src/vcg.c: Likewise.
9349
9350 * src/parse-gram.y: Fix minor problems uncovered by lint.
9351 (current_lhs, current_lhs_location): Now static.
9352 (current_assoc): Remove unused variable.
9353
9354 Cleanups so that Bison-generated parsers have less lint.
9355 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9356 Prepend /*ARGSUSED*/, for lint's sake.
9357 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9358 definition if 'lint' is defined.
9359 (YYID): New macro (or function, if lint).
9360 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9361 * data/yacc.c: Likewise.
9362 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9363 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9364 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9365 is C++ only.
9366 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9367 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9368 Use YYID(0) rather than 0, for lint.
9369 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9370 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9371
9372 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9373
9374 * tests/glr-regression.at
9375 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9376 Close memory leak reported by twlevo.
9377
9378 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9379
9380 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9381 all stacks.
9382 (yyparse): Iterate another stack in order to call user destructors.
9383 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9384 New test case.
9385 (Duplicated user destructor for lookahead): This test now is expected
9386 to succeed.
9387
9388 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9389
9390 * NEWS: Document the following change.
9391 * data/yacc.c: Say "parser skeleton" rather than "file", since
9392 it's no longer just a file.
9393 * data/glr.c: Grant a special exception for C GLR parsers, that
9394 reads like the already-existing exception for C LALR(1) parsers.
9395 * data/glr.cc: Likewise.
9396 * data/lalr1.cc: Likewise.
9397 * data/location.cc: Likewise.
9398 * data/yacc.c: Reword the "written by" statement to clarify that
9399 it was the parser skeleton, not the entire output file.
9400 * data/glr.c: Written by Paul Hilfinger.
9401 * data/glr.cc: Written by Akim Demaille.
9402 * data/lalr1.cc: Likewise.
9403
9404 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9405
9406 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9407 Fix typos in previous change that broke 'make check'.
9408 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9409 supported in C.
9410 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9411 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9412 We can revert this once things settle down.
9413
9414 * src/conflicts.c (conflicts_print): Don't print file name twice
9415 when %expect fails because there were no conflicts.
9416 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9417 change.
9418 * tests/conflicts.at (%expect not enough, %expect too much):
9419 (%expect with reduce conflicts): Adjust to new behavior.
9420
9421 2005-11-18 Akim Demaille <akim@epita.fr>
9422
9423 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9424 errors.
9425 * NEWS: Document this.
9426 * doc/bison.texinfo (Expect Decl): Likewise.
9427
9428 2005-11-16 Akim Demaille <akim@epita.fr>
9429
9430 Generalize the display of semantic values and locations in traces.
9431 * data/glr.c (yy_reduce_print): Fix indices (again).
9432 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9433 literal integers.
9434 * data/lalr1.cc (yyreduce_print): Rename as...
9435 (yy_reduce_print): this.
9436 Display values and locations.
9437 * data/yacc.c (yy_reduce_print): Likewise.
9438 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9439 (yysymprint): Move higher to be visible from yy_reduce_print).
9440 (yyparse): Adjust.
9441 * tests/calc.at: Adjust the expected length of the traces.
9442
9443 2005-11-14 Akim Demaille <akim@epita.fr>
9444
9445 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9446 from 1 to N, while values and location start at 0.
9447 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9448
9449 2005-11-14 Akim Demaille <akim@epita.fr>
9450
9451 * data/glr.c (yy_reduce_print): Fix the $ number.
9452
9453 2005-11-14 Akim Demaille <akim@epita.fr>
9454
9455 "Use" parse parameters.
9456 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9457 * data/glr.c, data/glr.cc: Use them.
9458 * data/glr.c (YYUSE): Have a C++ definition that supports
9459 non-pointer types.
9460
9461 2005-11-14 Akim Demaille <akim@epita.fr>
9462
9463 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9464
9465 2005-11-14 Akim Demaille <akim@epita.fr>
9466
9467 * data/glr.cc: New.
9468 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9469
9470 2005-11-12 Akim Demaille <akim@epita.fr>
9471
9472 Let position and location be PODs.
9473 * data/location.cc (position::initialize, location::initialize): New.
9474 (position::position, location::location): Define only if
9475 b4_location_constructors is defined.
9476 * data/lalr1.cc (b4_location_constructors): Define it for backward
9477 compatibility.
9478 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9479
9480 2005-11-12 Akim Demaille <akim@epita.fr>
9481
9482 * data/lalr1.cc: Move the body of the ctor and dtor into the
9483 parser file (instead of the header).
9484 Wrap the implementations in a "namespace yy".
9485
9486 2005-11-12 Akim Demaille <akim@epita.fr>
9487
9488 Have glr.c include its header file when created.
9489 * data/glr.c (b4_shared_declarations): New.
9490 Output them verbatim in the parser if !%defines, otherwise
9491 output then in the header file, and include it instead.
9492
9493 2005-11-11 Akim Demaille <akim@epita.fr>
9494
9495 * data/glr.c: Comment changes.
9496
9497 2005-11-11 Akim Demaille <akim@epita.fr>
9498
9499 When yydebug, report semantic and location values for reductions.
9500 * data/glr.c (yy_reduce_print): Report the semantic values and the
9501 locations.
9502 (YY_REDUCE_PRINT): Adjust.
9503 (yyglrReduce): Use them.
9504 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9505 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9506 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9507 traces.
9508
9509 2005-11-10 Akim Demaille <akim@epita.fr>
9510
9511 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9512 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9513 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9514
9515 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9516
9517 * m4/cxx.m4, examples/Makefile.am: Don't build
9518 examples/calc++ if no C++ compiler is available. (trivial change)
9519
9520 2005-11-09 Akim Demaille <akim@epita.fr>
9521
9522 * src/scan-skel.l: Use a couple of asserts.
9523
9524 2005-11-03 Akim Demaille <akim@epita.fr>
9525
9526 In some (weird) cases, the final state number is incorrect.
9527 Reported by Alexandre Duret-Lutz.
9528 * src/LR0.c (state_list_append): Remove the computation of
9529 final_state.
9530 (save_reductions): Do it here.
9531 (get_state): Alpha conversion.
9532 (generate_states): Use a for loop.
9533 * src/gram.h (item_number_is_rule_number)
9534 (item_number_is_symbol_number): New.
9535 * src/state.c: Use assert.
9536 * src/system.h: Include assert.h.
9537 * tests/sets.at (Accept): New.
9538
9539 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9540
9541 * data/glr.c (yyfill): Adjust comment.
9542 (yyresolveAction): Initialize default location properly
9543 for empty right-hand sides.
9544 (yydoAction): Ditto.
9545 Add comment explaining apparently dead code.
9546 * tests/glr-regression.at
9547 (Incorrectly initialized location for empty right-hand side in GLR):
9548 New test.
9549
9550 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9551
9552 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9553 gnulib when interrupted. This fixes some race conditions and
9554 works around some portability problems (one noted by Paul
9555 Hilfinger).
9556
9557 2005-10-22 Akim <akim@epita.fr>
9558
9559 * Makefile.cfg: Adjust to config -> build-aux.
9560 Reported by twledo.
9561
9562 2005-10-21 Akim Demaille <akim@epita.fr>
9563
9564 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9565 the %parse-params.
9566 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9567 * data/yacc.c (b4_Pure_if): Rename as...
9568 (b4_yacc_pure_if): this.
9569 (YY_SYMBOL_PRINT, yyparse): Adjust.
9570 * doc/bison.texinfo: Formatting changes.
9571
9572 2005-10-21 Akim Demaille <akim@epita.fr>
9573
9574 Finish the transition config -> build-aux.
9575 * configure.ac, Makefile.am: Use build-aux.
9576 * config/prev-version, config/announce-gen, config/Makefile.am:
9577 Move to...
9578 * build-aux/prev-version, build-aux/announce-gen,
9579 * build-aux/Makefile.am: here.
9580
9581 2005-10-14 Akim Demaille <akim@epita.fr>
9582
9583 * examples/calc++/test: Use set -x only when VERBOSE.
9584
9585 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9586
9587 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9588 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9589
9590 2005-10-13 Akim Demaille <akim@epita.fr>
9591
9592 * src/scan-skel.l: Output the base name parts of the parser and
9593 header file names.
9594 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9595 additional checks.
9596 Use this to exercise C++ outputs in subdirs.
9597 Reported by Oleg Smolsky.
9598
9599 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9600
9601 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9602 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9603 Problem reported by John P. Hartmann.
9604 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9605 already defined it.
9606
9607 2005-10-12 Akim Demaille <akim@epita.fr>
9608
9609 * src/parse-gram.y (version_check): Exit 63 to please missing
9610 (stands for "version mismatch).
9611 * tests/input.at, doc/bison.texinfo: Adjust.
9612
9613 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9614
9615 Work around portability problems with Visual Age C compiler
9616 (xlc and xlC_r) reported by John P. Hartmann.
9617 * data/location.cc (initial_column, initial_line): Remove.
9618 All uses replaced by 0 and 1.
9619 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9620 that xlc complains about.
9621 * src/scan-skel.l (skel_wrap): Likewise.
9622 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9623 as __STDC__.
9624 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9625 __STDC_VERSION__. Use it everywhere instead of looking at
9626 __STDC__ and __cplusplus.
9627
9628 2005-10-10 Akim Demaille <akim@epita.fr>
9629
9630 * examples/calc++/test: Be quiet unless VERBOSE.
9631
9632 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9633
9634 * data/c.m4 (yydestruct, yysymprint):
9635 Use YYUSE instead of casting to void.
9636 * data/glr.c (YYUSE): New macro.
9637 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9638 Use it instead of rolling our own.
9639 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9640 (YYCHK1):
9641 Use /*CONSTCOND*/ to suppress lint warnings.
9642 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9643 (YY_STACK_PRINT): Use 'false' not '0'.
9644 (YYUSE): New macro.
9645 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9646 * data/yacc.c (YYUSE): New macro.
9647 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9648 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9649 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9650
9651
9652 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9653 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9654
9655 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9656
9657 Undo the parts of the unlocked-I/O change that substituted
9658 putc or puts for printf. This might hurt performance a bit,
9659 but some people prefer the printf style.
9660 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9661 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9662 All uses replaced by YYFPRINTF and YYDPRINTF.
9663 * data/yacc.c: Likewise.
9664 * lib/bitset.c (bitset_print): Likewise.
9665 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9666 putc and puts.
9667 * lib/lbitset.c (debug_lbitset): Likewise.
9668 * src/closure.c (print_firsts, print_fderives): Likewise.
9669 * src/gram.c (grammar_dump): Likewise.
9670 * src/lalr.c (look_ahead_tokens_print): Likewise.
9671 * src/output.c (escaped_output): Likewise.
9672 (user_actions_output): Break apart two printfs.
9673 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9674 * src/reduce.c (reduce_print): Likewise.
9675 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9676 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9677
9678 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9679 Use assignments rather than casts-to-void to suppress
9680 unused-variable warnings. This pacifies 'lint'.
9681 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9682 unused-variable warnings.
9683
9684 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9685
9686 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9687
9688 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9689
9690 Use unlocked I/O for a minor performance improvement on hosts like
9691 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9692 is to use the gnlib unlocked-io module, and to prefer putc and
9693 puts to printf when either will work (since the latter doesn't
9694 come in an unlocked flavor).
9695 * bootstrap (gnulib_modules): Add unlocked-io.
9696 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9697 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9698 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9699 and similarly for puts and putc and printf.
9700 * data/yacc.c: Likewise.
9701 * lib/bitset.c (bitset_print): Likewise.
9702 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9703 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9704 to printf.
9705 * lib/lbitset.c (debug_lbitset): Likewise.
9706 * src/closure.c (print_firsts, print_fderives): Likewise.
9707 * src/gram.c (grammar_dump): Likewise.
9708 * src/lalr.c (look_ahead_tokens_print): Likewise.
9709 * src/output.c (escaped_output): Likewise.
9710 (user_actions_output): Coalesce two printfs.
9711 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9712 * src/reduce.c (reduce_print): Likewise.
9713 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9714 * src/system.h: Include unlocked-io.h rather than stdio.h.
9715
9716 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9717 this confuses xgettext.
9718
9719 2005-10-02 Akim Demaille <akim@epita.fr>
9720
9721 * bootstrap (gnulib_modules): Add strverscmp.
9722 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9723 * m4/.cvsignore: Add strverscmp.m4.
9724 * src/parse-gram.y (%require): New token, new rule.
9725 (version_check): New.
9726 * src/scan-gram.l (%require): Adjust.
9727 * tests/input.at (AT_REQUIRE): New.
9728 Use it.
9729 * doc/bison.texinfo (Require Decl): New.
9730 (Calc++ Parser): Use %require.
9731
9732 2005-10-02 Akim Demaille <akim@epita.fr>
9733
9734 * data/location.cc: New.
9735
9736 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9737 Akim Demaille <akim@epita.fr>
9738
9739 Make sure -odir/foo.cc creates dir/location.hh etc.
9740 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9741 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9742 (spec_defines_file): Now const.
9743 (dir_prefix): New.
9744 (short_base_name): Remove.
9745 * src/files.c: Adjust.
9746 (dirname.h): Include.
9747 (base_name): Don't prototype it.
9748 (finput): Remove, duplicates gram_in.
9749 (full_base_name, short_base_name): Replace by...
9750 (all_but_ext, all_but_tab_ext): these.
9751 (compute_base_names): Rename as...
9752 (compute_file_name_parts): this.
9753 Update to compute the new variables, including dir_prefix.
9754 Adjust dependencies.
9755 * src/output.c (prepare): Output them.
9756 * src/reader.c: Adjust to use gram_in, not finput.
9757 * src/scan-skel.l (@dir_prefix@): New.
9758
9759 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9760
9761 * lib/subpipe.c: New function end_of_output_subpipe() added
9762 to allow support for non-posix systems. This is a no-op function
9763 for posix systems.
9764
9765 * lib/subpipe.h: New function end_of_output_subpipe() added
9766 to allow support for non-posix systems. This is a no-op function
9767 for posix systems.
9768
9769 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9770 handle the lack of pipe/fork functionality on non-posix systems.
9771
9772 * djgpp/Makefile.maint: DJGPP specific file.
9773
9774 * djgpp/README.in: DJGPP specific file.
9775
9776 * djgpp/config.bat: DJGPP specific configuration file.
9777
9778 * djgpp/config.sed: DJGPP specific configuration file.
9779
9780 * djgpp/config.site: DJGPP specific configuration file.
9781
9782 * djgpp/config_h.sed: DJGPP specific configuration file.
9783
9784 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9785
9786 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9787
9788 2005-10-02 Akim Demaille <akim@epita.fr>
9789
9790 * data/location.cc: New, extract from...
9791 * data/lalr1.cc: here.
9792 (location.hh): Include it after the user prologue, in case the
9793 filename type is defined by the user.
9794 Forward declation location and position before the pre-prologue.
9795 (yyresult_): Rename as...
9796 (yyresult): this, it's a local variable, not an attribute.
9797 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9798
9799 2005-10-01 Akim Demaille <akim@epita.fr>
9800
9801 * examples/extexi: Restore the #line generation.
9802
9803 2005-09-30 Akim Demaille <akim@epita.fr>,
9804 Alexandre Duret-Lutz <adl@gnu.org>
9805
9806 Move the token type and YYSTYPE in the parser class.
9807 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9808 (parser::token): New, from the moved free definition of tokens.
9809 (parser::semantic_value): Now a full definition instead of an
9810 indirection to YYSTYPE.
9811 (b4_post_prologue): No longer included in the header file, but
9812 in the implementation file.
9813 * doc/bison.texi (C+ Language Interface): Update.
9814 * src/parse-gram.y: Support unary %define.
9815 * tests/actions.at: Define global_tokens_and_yystype for backward
9816 compatibility until we update the tests.
9817 * tests/calc.at: Idem.
9818 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9819 to simplify the code.
9820
9821 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9822
9823 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9824 Ah, the good old days! Problem reported by Peter Klein.
9825 * bootstrap (gnulib_modules): Add strerror, strtoul.
9826 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9827 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9828
9829 2005-09-29 Akim Demaille <akim@epita.fr>
9830
9831 * data/c.m4 (b4_error_verbose_if): New.
9832 * data/lalr1.cc: Use it.
9833 (YYERROR_VERBOSE_IF): Remove.
9834 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9835 parser members, replaced by...
9836 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9837 local variables.
9838 (yysyntax_error_): Takes the state number as argument.
9839 (yyreduce_print_): Use the argument yyrule, not the former
9840 attribute yyn_.
9841
9842 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9843
9844 * bootstrap (gnulib_modules): Add verify.
9845 * lib/.cvsignore: Add verify.h.
9846 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9847 * src/system.h (verify): Remove.
9848 Include verify.h instead.
9849 * src/tables.c (tables_generate): Use new API for 'verify'.
9850
9851 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9852
9853 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9854 local variables whose names begin with 'yy'.
9855 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9856 Trivial changes from Joel E. Denny.
9857
9858 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9859 it itself.
9860 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9861 don't use alloca any more.
9862
9863 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9864 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9865 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9866 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9867 to match yacc.c, to test more hosts.
9868
9869 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9870
9871 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9872 doesn't affect behavior.
9873 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9874 Solaris, AIX, MSC.
9875 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9876 This works a bit better with glibc, if user code has already included
9877 stdlib.h.
9878 * doc/bison.texinfo (Bison Parser): Document that users can't
9879 arbitrarily use malloc and free for other purposes. Document
9880 that <alloca.h> and <malloc.h> might be included.
9881 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9882 user must declare alloca.
9883
9884 * HACKING (release): Forwarn the Translation Project about
9885 stable releses.
9886
9887 2005-09-20 Akim Demaille <akim@epita.fr>
9888
9889 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9890
9891 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9892
9893 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9894 (YYSTACK_ALLOC_MAXIMUM): Use it.
9895 (yysyntax_error): New function.
9896 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9897 multiple syntax errors are reported, and alloca is being used.
9898 Instead, reallocate buffers twice as big each time, so that
9899 we waste at most half the allocated memory. Start with a small
9900 (128-byte) buffer that will suffice in most cases anyway.
9901 Use yysyntax_error to do most of the work.
9902
9903 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9904 yynerrs is the number of errors reported, not the number of
9905 errors encountered.
9906
9907 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9908 Mark it as expected to fail.
9909 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9910 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9911 Don't start user-code symbols with "yy", to avoid name space problems.
9912
9913 2005-09-19 Akim Demaille <akim@epita.fr>
9914
9915 Remove the traits, failed experiment.
9916 It never proved useful, and anyway because of the current
9917 definition, it was not possible to have several specialization of
9918 this traits, making it useless.
9919 * data/lalr1.cc (yy:traits): Remove.
9920 Inline its definitions in the parser class.
9921
9922 2005-09-19 Akim Demaille <akim@epita.fr>
9923
9924 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9925 least Mac OSX with a /usr/local install of gettext.
9926
9927 2005-09-19 Akim Demaille <akim@epita.fr>
9928
9929 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9930 and yytoken for similarity with the other skeletons.
9931
9932 2005-09-19 Akim Demaille <akim@epita.fr>
9933
9934 * NEWS, configure.ac: update version number to 2.1a.
9935
9936 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9937
9938 * NEWS: Version 2.1.
9939
9940 * NEWS: Remove notice of yytname change, since it was never in an
9941 official release.
9942 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9943 diagnostic.
9944 * src/output.c (prepare): Likewise.
9945 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9946 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9947 is not defined. This is an awful hack, but it's enough for now.
9948 All callers changed.
9949 * tests/glr-regression-at (make_value): Args are const pointers now,
9950 to avoid GCC warning.
9951 (Duplicated user destructor for lookahead): New test. Currently
9952 skipped. It fails on my host but I'm not sure it'll always fail.
9953
9954 2005-09-16 Akim Demaille <akim@epita.fr>
9955
9956 * src/symtab.h (struct symbol): Declare the printer and destructor
9957 as const, to avoid accidental calls to free.
9958 (symbol_destructor_set, symbol_printer_set): Adjust.
9959 * src/symtab.c: Adjust.
9960
9961 2005-09-16 Akim Demaille <akim@epita.fr>
9962
9963 * data/c.m4 (b4_token_enums): New.
9964 (b4_token_defines): Rename as...
9965 (b4_token_enums_defines): this.
9966 (b4_token_defines): New, output only the #defines.
9967 * data/yacc.c, data/glr.c: Adjust.
9968 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9969 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9970 as default values.
9971
9972 2005-09-16 Akim Demaille <akim@epita.fr>
9973
9974 * data/lalr1.cc (yylex_): Remove, inline its code.
9975 (yyreport_syntax_error_): Remove, replaced by...
9976 (yysyntax_error_): this which returns a string and leaves to the
9977 caller the call to the users' error function.
9978 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9979 Move from members of the parser object...
9980 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9981 to local variables of the parse function.
9982
9983 2005-09-16 Akim Demaille <akim@epita.fr>
9984
9985 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9986 since it's in Bison's name space.
9987
9988 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9989
9990 * data/glr.c (yyresolveValue): Add default case to pacify
9991 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9992
9993 * NEWS: Document when yyparse started to return 2.
9994 * doc/bison.texinfo (Parser Function): Document when yyparse
9995 returns 2.
9996
9997 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9998 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9999 changed.
10000 (class position): file_name -> filename (reverting). All uses changed.
10001
10002 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10003
10004 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10005 do anything if $@ exists. This reverts part of the 2005-07-07
10006 patch.
10007
10008 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10009
10010 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10011 contains obsolete information and isn't worth distributing as a
10012 separate file anyway.
10013 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10014 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10015 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10016 (yyparse): Abort if user code uses longjmp to throw an unexpected
10017 value.
10018
10019 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10020
10021 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10022 Suggested by twlevo@xs4all.nl.
10023
10024 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10025 This avoids a diagnostic from gcc -Wswitch-enum.
10026 Problem reported by twlevo@xs4all.nl.
10027
10028 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10029 standards. Use "file name" or "file" or "name", depending on
10030 the context.
10031 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10032 not to hack/foo.tab.c.
10033 (Calc++ Top Level): 2nd arg of main is not const.
10034 * data/glr.c: b4_filename -> b4_file_name.
10035 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10036 All uses changed.
10037 (class position): filename -> file_name. All uses changed.
10038 * data/yacc.c: b4_filename -> b4_file_name.
10039 * lib/bitset.h: filename -> file_name in local vars.
10040 * lib/bitset_stats.c: Likewise.
10041 * src/files.c: Likewise.
10042 * src/scan-skel.l ("@output ".*\n): Likewise.
10043 * src/files.c (file_name_split): Renamed from filename_split.
10044 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10045
10046 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10047
10048 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10049 to accommodate latest gnulib.
10050
10051 * tests/glr-regression.at (Duplicate representation of merged trees):
10052 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10053
10054 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10055 needed.
10056
10057 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10058
10059 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10060 All uses changed. Invoke user destructor after an error during a
10061 split parse (trivial change from Joel E. Denny).
10062
10063 * tests/glr-regression.at
10064 (User destructor after an error during a split parse): New test case.
10065 Problem reported by Joel E. Denny in:
10066 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10067
10068 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10069
10070 * README-cvs: Give URLs for recommended tools.
10071 Mention Gzip version problem, and bootstrapping issues.
10072 Remove troubleshooting section, as it's somewhat obsolete.
10073
10074 * bootstrap (no_cache): New var, to accommodate different wget
10075 variants. Use it instead of '-C off'. Problem reported by
10076 twlevo@xs4all.nl.
10077
10078 * data/glr.c (yydestroyStackItem): New function.
10079 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10080 debugging information. Problem reported by Joel E. Denny.
10081
10082 2005-08-25 Akim Demaille <akim@epita.fr>
10083
10084 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10085
10086 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10087
10088 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10089 Don't invoke destructor on unresolved entries.
10090 * tests/glr-regression.at
10091 (User destructor for unresolved GLR semantic value): New test case.
10092 Problem reported by Joel E. Denny in:
10093 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10094
10095 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10096
10097 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10098 Add strnlen.c.
10099 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10100 lib-prefix.m4, po.m4.
10101
10102 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10103 in yydestruct diagnostic, since it might not be an error.
10104 Problem reported by Joel Denny near end of
10105 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10106 * data/lalr1.cc (yyerturn): Likewise.
10107 * data/yacc.c (yyreturn): Likewise.
10108 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10109
10110 * src/files.c: Remove obsolete FIXME comment.
10111
10112 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10113 with the other templates, and to fix bogus run-on messages such
10114 as the one reported at the end of
10115 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10116 All callers changed to avoid the newline.
10117 (yyprocessOneStack): Output two lines rather than one, to accommodate
10118 the above change. This changes the debug output format slightly.
10119
10120 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10121 reported by Joel E. Denny in
10122 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10123 (trivial change).
10124 * tests/glr-regression.at (Duplicate representation of merged trees):
10125 New test, from Joel E. Denny in:
10126 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10127 * THANKS: Add Joel E. Denny.
10128
10129 * configure.ac (AC_INIT): Bump to 2.0c.
10130
10131 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10132
10133 * NEWS: Version 2.0b.
10134
10135 * Makefile.am (SUBDIRS): Put examples before tests, so that
10136 "make check" doesn't finish with "All 1 tests passed".
10137
10138 * tests/regression.at (Token definitions): Don't rely on
10139 AT_PARSER_CHECK for data that contains backslashes. It currently
10140 uses 'echo', and 'echo' isn't portable if its argument contains
10141 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10142 that the byte '\0xff' is not printable in the C locale; it is,
10143 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10144 not printable, so use '\0x81' to test.
10145
10146 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10147 version of GCC, since the macro is used with non-GCC compilers.
10148
10149 Fix core dump reported by Pablo De Napoli in
10150 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10151 * tests/regression.at (Invalid inputs with {}): New test.
10152 * src/parse-gram.y (token_name): Translate type before using
10153 it as an index.
10154
10155 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10156 the user's name space. All uses changed to __attribute__
10157 ((__unused__)).
10158 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10159 Add __attribute__ ((__noreturn__)).
10160
10161 * etc/clcommit: Remove. We weren't using it, and it failed
10162 "make maintainer-distcheck".
10163 * Makefile.maint: Merge from coreutils.
10164 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10165 (syntax-check-rules): Change list of rules as described below.
10166 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10167 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10168 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10169 (sc_trailing_space): New rules.
10170 (sc_xalloc_h_in_src): Remove.
10171 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10172 (sc_space_tab, sc_error_exit_success, sc_changelog):
10173 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10174 (makefile-check, po-check, author_mark_check):
10175 (makefile_path_separator_check, copyright-check):
10176 Use grep -n, to make it easier to find violations.
10177 Use CVS_LIST and CVS_LIST_EXCEPT.
10178 (header_regexp, h_re): Remove.
10179 (dd_c): New macro.
10180 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10181 (my-distcheck): Use more-modern GCC flags.
10182 (signatures, %.asc): Remove.
10183 (rel-files, announcement): Remove signatures.
10184 Restore old updating code, even though we don't use it, so
10185 that we're the same as coreutils.
10186 (alpha, beta, major): Depend on news-date-check.
10187 Make the upload commands.
10188
10189 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10190 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10191 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10192 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10193 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10194 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10195 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10196 * tests/sets.at: Likewise.
10197
10198 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10199 we comment out the Autoconf version number.
10200 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10201 it's error-prone and "make maintainer-distcheck" rejects it.
10202
10203 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10204 Indent calls to "error" to pacify "make maintainer-distcheck",
10205 when the calls are not intended to be translated.
10206 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10207
10208 * src/Makefile.am (DEFS): Use +=, to pacify
10209 "make maintainer-distcheck".
10210 (bison_SOURCES): Add scan-skel.h.
10211 (sc_tight_scope): New rule, from coreutils.
10212
10213 * src/files.c (src_extension, header_extension):
10214 Now static, not extern.
10215 * src/getargs.c (short_options): Likewise.
10216 * src/muscle_tab.c (muscle_table): Likewise.
10217 * src/parse-gram.y (current_class, current_type, current_prec):
10218 Likewise.
10219 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10220 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10221 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10222 void, to avoid warning when NLS is disabled.
10223 * src/output.c: Include scan-skel.h.
10224 (scan_skel): Remove decl, since scan-skel.h does this.
10225 (output_skeleton):
10226 Indent calls to "error" to pacify "make maintainer-distcheck".
10227 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10228 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10229 "make maintainer-distcheck".
10230 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10231 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10232 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10233 (skel_lex_destroy, scan_skel): Move these decls to...
10234 * src/scan-skel.h: New file.
10235 * src/uniqstr.c (uniqstr_assert):
10236 Indent calls to "error" to pacify "make maintainer-distcheck".
10237
10238 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10239 not @VAR@.
10240
10241 * tests/torture.at: Revamp to avoid misuse of atoi that
10242 "make maintainer-distcheck" complained about.
10243
10244 * examples/extexi (message): Don't print a message more than once,
10245 and omit line-number decoration that makes Emacs compile think
10246 that informative messages are worth worrying about.
10247
10248 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10249
10250 * configure.ac: Update version number.
10251
10252 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10253 accidentally.
10254 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10255 autogenerated by the maintainer.
10256 * examples/calc++/.cvsignore: Add *.yy.
10257
10258 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10259 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10260 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10261
10262 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10263
10264 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10265 from maintainer-distcheck about casting the argument of 'free'.
10266
10267 * NEWS: Mention recent yytname changes.
10268 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10269
10270 * bootstrap: For translations that have not yet been upgraded to
10271 the new runtime-po domain, prime the pump by extracting the
10272 relevant strings from the obsolete translations. This code can be
10273 removed once the bison-runtime domain has been translated by each
10274 team.
10275
10276 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10277 now that token names are already quoted.
10278
10279 Fix problem reported by Anthony Heading.
10280 * data/glr.c (YYTOKEN_TABLE): New macro.
10281 (yytname): Define if YYTOKEN_TABLE.
10282 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10283 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10284 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10285 * src/output.c (prepare_symbols): Output token_table_flag.
10286
10287 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10288
10289 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10290 again if the first call fails.
10291
10292 * data/glr.c (yytnamerr): New function.
10293 (yyreportSyntaxError): Use it to dequote most string literals.
10294 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10295 with other skeletons. All uses changed.
10296 (yytnameerr_): New function.
10297 (yyreport_syntax_error): Use it to dequote most string literals.
10298 * data/yacc.c (yytnamerr): New function.
10299 (yyerrlab): Use it to decode most string literals.
10300 * doc/bison.texinfo (Decl Summary, Calling Convention):
10301 Clarify quoting convention of yytname.
10302 * src/output.c (prepare_symbols): Quote all names. This undoes
10303 the 2005-04-17 change, which is now accomplished (mostly) via
10304 changes in the parsers as described above.
10305 * tests/regression.at (Token definitions, Web2c Actions):
10306 Undo most 2005-04-17 change here, too.
10307
10308 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10309
10310 Fix more problems reported by twlevo@xs4all.nl.
10311 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10312 remove trailing spaces. This loses the exit status of ./types,
10313 and isn't needed since ./types shouldn't be emitting trailing
10314 spaces.
10315 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10316 as the stack isn't valid in that case.
10317
10318 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10319 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10320 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10321 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10322 is used.
10323 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10324 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10325 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10326 Likewise.
10327
10328 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10329 overly-picky compilers that reject 'char *foo = "bar";'.
10330
10331 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10332 to FILE * parameter, not to stderr. This fixes a typo introduced
10333 in the 2005-07-12 change.
10334
10335 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10336 warnings from GCC 4.
10337
10338 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10339 (yyglrShiftDefer, yysplitStack):
10340 Remove unused parameters b4_pure_formals. All uses changed.
10341 (yyglrShift): Remove unused parameters b4_user_formals.
10342 All uses changed.
10343 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10344
10345 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10346
10347 Destructor cleanups and regularization among the three skeletons.
10348 * NEWS: Document the behavior changes.
10349 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10350 stack before failing, as the cleanup code will do it for us now.
10351 * data/lalr1.cc (yyerrlab): Likewise.
10352 * data/glr.c (yyparse): Pop everything off the stack before
10353 freeing it, so that destructors get called properly.
10354 * data/lalr1.cc (yyreturn): Likewise.
10355 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10356 This is more consistent.
10357 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10358 why destructors might be called. 1.875 -> 2.1.
10359 (Destructor Decl, Decl Summary, Table of Symbols):
10360 Some English-language cleanups for %destructor.
10361 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10362 Add output line for destructor of start symbol.
10363 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10364 because of that same extra output line.
10365
10366 * NEWS: Document minor wording changes in diagnostics of
10367 Bison-generated parsers.
10368 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10369 Remove unused formals. All uses changed.
10370 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10371 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10372 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10373 Rename yyoverflowab to yyexhaustedlab.
10374 When memory exhaustion occurs during syntax-error reporting,
10375 report it separately rather than in a single diagnostic; this
10376 eases translation.
10377 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10378 (Memory Exhausted): Renamed from Parser Stack Overflow.
10379 Revamp wording slightly to prefer "memory exhaustion".
10380 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10381
10382 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10383
10384 Add i18n support to the GLR skeleton. Partially fix the C++
10385 skeleton; a C++ expert needs to finish this. Remove debugging
10386 msgids; there's little point to having them translated, since they
10387 can be understood only by someone who can read the
10388 (English-language) source code.
10389
10390 Generate runtime-po/bison-runtime.pot automatically, so that we
10391 don't have to worry about garbage getting in that file. We'll
10392 make sure after the next official release that old msgids don't
10393 get lost. See
10394 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10395
10396 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10397 Now auto-generated.
10398 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10399 Fix typos in explanations of the runtime file.
10400 * bootstrap: Change gettext keyword from YYI18N to YY_.
10401 Use standard Makefile.in.in in runtime-po, since we'll arrange
10402 for backward-compatible bison-runtime.po files in a different way.
10403 * data/glr.c (YY_): New macro, from yacc.c.
10404 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10405 Translate messages intended for users.
10406 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10407 the wording in the other skeletons. We don't know that the memory
10408 is virtual.
10409 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10410 Use same method that yacc.c uses.
10411 Don't translate debugging messages.
10412 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10413 it doesn't work (yet), and requires C++ expertise to fix.
10414 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10415 Move defn to a more logical place, to be consistent with other
10416 skeletons.
10417 Don't translate debugging messages.
10418 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10419 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10420 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10421 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10422
10423 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10424 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10425 void, not int.
10426 * tests/glr-regression.at (Badly Collapsed GLR States):
10427 Likewise.
10428 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10429 yylex should return 0 at EOF rather than aborting.
10430
10431 Improve tests for stack overflow in GLR parser.
10432 Problem reported by twlevo@xs4all.nl.
10433 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10434 All uses removed.
10435 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10436 can handle the problem.
10437 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10438 (yyparse): New local variable yyresult to record the result.
10439 Use result of setjmp to set it, rather than storing itinto
10440 struct.
10441 (yyDone): Remove label.
10442 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10443 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10444 if YYABORT is used).
10445 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10446 yyparse status; put status > 1 into diagnostic.
10447 Check that status==2 works.
10448 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10449 Use exit status 3 for failure to open (which shouldn't happen).
10450
10451 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10452
10453 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10454 1 on syntax error; just let yyparse do its thing.
10455 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10456 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10457 (Exploding the Stack Size with Alloca):
10458 (Exploding the Stack Size with Malloc):
10459 Expect exit status 2, not 1, since the parser is supposed to blow
10460 its stack. Problem reported by twlevo@xs4all.nl.
10461
10462 * data/glr.c (yyparse): Don't assume that the initial calls
10463 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10464 Print a stack-overflow message and fail instead.
10465 Initialize the line-number information before creating the stack,
10466 so that the stack-overflow message can report line zero safely.
10467
10468 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10469
10470 Fix problems reported by twlevo@xs4all.nl.
10471 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10472 (yyuserMerge): Provide a default case if b4_mergers is empty.
10473 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10474 * tests/glr-regression.at
10475 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10476 Add casts to pacify C++ compilers.
10477 * tests/glr-regression.at (Improper merging of GLR delayed action
10478 sets): Declare yylex before using it.
10479 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10480 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10481 test for valgrind; valgrind is independent of g++.
10482 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10483 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10484 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10485 Use a destructor, so that we can expand the stack. Change
10486 YYSTYPE to char * so that we can free it. Cast result of malloc.
10487
10488 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10489
10490 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10491 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10492
10493 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10494
10495 * PACKAGING: New file, suggested by Bruno Haible and taken from
10496 similar wording in gettext's PACKAGING file.
10497 * NEWS: Mention PACKAGING.
10498 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10499
10500 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10501
10502 * NEWS: Document recent i18n improvements.
10503 * bootstrap: Get runtime translations into runtime-po.
10504 Create runtime-po files automatically, if possible.
10505 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10506 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10507 does not infringe on the user's name space.
10508 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10509 * doc/bison.texinfo (Internationalization): Revamp the English
10510 and Texinfo syntax a bit, to try to make it clearer.
10511 (Bison Options, Option Cross Key): Mention --print-localedir.
10512 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10513 YYENABLE_NLS. Quote a bit more.
10514 * runtime-po/.cvsignore: New file.
10515 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10516 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10517 * runtime-po/quot.sed: Likewise.
10518 * runtime-po/boldquot.sed: Likewise.
10519 * runtime-po/en@quot.header: Likewise.
10520 * runtime-po/en@boldquot.header: Likewise.
10521 * runtime-po/insert-header.sin: Likewise.
10522 * runtime-po/remove-potcdate.sin: Likewise.
10523 * runtime-po/Makevars: Likewise.
10524 * runtime-po/LINGUAS: Likewise.
10525 * runtime-po/de.po: Likewise; we will rely on the translation project
10526 to maintain this, so "bootstrap" should get it.
10527 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10528 its value.
10529 * src/main.c (main): Bind the bison-runtime domain, too.
10530
10531 2005-07-12 Bruno Haible <bruno@clisp.org>
10532
10533 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10534 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10535 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10536 * runtime-po: New directory.
10537 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10538 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10539 * runtime-po/Rules-quot: New file, copied from po/.
10540 * runtime-po/quot.sed: Likewise.
10541 * runtime-po/boldquot.sed: Likewise.
10542 * runtime-po/en@quot.header: Likewise.
10543 * runtime-po/en@boldquot.header: Likewise.
10544 * runtime-po/insert-header.sin: Likewise.
10545 * runtime-po/remove-potcdate.sin: Likewise.
10546 * runtime-po/Makevars: New file.
10547 * runtime-po/POTFILES.in: New file.
10548 * runtime-po/LINGUAS: New file.
10549 * runtime-po/bison-runtime.pot: New file.
10550 * runtime-po/de.po: New file.
10551 * m4/bison.m4: New file.
10552 * Makefile.am (SUBDIRS): Add runtime-po.
10553 (aclocaldir, aclocal_DATA): New variables.
10554 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10555 Define aclocaldir.
10556 * src/getargs.c (usage): Document --print-localedir option.
10557 (PRINT_LOCALEDIR_OPTION): New enum item.
10558 (long_options): Add --print-localedir option.
10559 (getargs): Handle --print-localedir option.
10560 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10561 (Internationalization): New section.
10562
10563 2005-07-12 Akim Demaille <akim@epita.fr>
10564
10565 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10566 for consistency with the rest of the code.
10567 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10568 Add separators.
10569
10570 2005-07-12 Akim Demaille <akim@epita.fr>
10571
10572 * src/parse-gram.y: Use %printer instead of YYPRINT.
10573
10574 2005-07-12 Akim Demaille <akim@epita.fr>
10575
10576 * src/symtab.h, src/symtab.c (symbol_print): New.
10577 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10578 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10579
10580 2005-07-12 Akim Demaille <akim@epita.fr>
10581
10582 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10583 b4_at_dollar and b4_dollar_dollar.
10584
10585 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10586
10587 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10588 and Pennello's paper.
10589
10590 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10591
10592 * data/yacc.c (yyparse): Undo previous patch. Instead,
10593 set yylsp[0] and yyvsp[0] only if the initial action
10594 sets yylloc and yylval, respectively.
10595
10596 * data/yacc.c (yyparse): In the initial action, set
10597 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10598 This avoids the use of undefined variables if the initial
10599 action does not set yylloc and/or yylval.
10600
10601 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10602
10603 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10604 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10605 Remove from CVS. These files are automatically generated.
10606 * examples/extexi: Clarify that this file is now part of Bison,
10607 not GNU M4, and that it works with any POSIX-compatible Awk.
10608 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10609 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10610 so that we also get calc++-parser.yy. Geneate it.
10611 Use $(AWK), not gawk, since any conforming Awk will do.
10612 Put comment before action, since older 'make' can't handle comment
10613 in action.
10614 $(BUILT_SOURCES): List all built sources, not just some of them.
10615 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10616 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10617 $($(calc_sources_generated)): Remove unnecessary test for existence
10618 of target. (This had a shell syntax error anyway; a stray "x".)
10619 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10620 calc++-parser.yy.
10621 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10622
10623 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10624 implied by the other modules.
10625
10626 2005-07-06 Akim Demaille <akim@epita.fr>
10627
10628 Bind examples/calc++ to the package.
10629 * examples/calc++/Makefile: Remove, replaced by...
10630 * examples/calc++/Makefile.am: ... this new file.
10631 * examples/calc++/test: Remove input.
10632 * examples/calc++/compile: Remove.
10633 * examples/Makefile.am: New.
10634 * configure.ac, Makefile.am: Adjust.
10635 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10636
10637 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10638
10639 * data/glr.c (yyFail): Drastically simplify; since the format argument
10640 never had any % directives, we can simply pass it to yyerror.
10641 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10642 be modified later, as that is the usual style in glr.c.
10643 Problems reported by Paul Hilfinger.
10644
10645 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10646 and size overflow errors.
10647 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10648 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10649 (YYSIZEMAX): New macro.
10650 (yystpcpy): New function, taken from yacc.c.
10651 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10652 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10653 so that we don't have to maintain their signatures.
10654 (yyFail): Check for buffer overflow, by using vsnprintf rather
10655 than vsprintf. Allocate a bigger buffer if possible.
10656 Report an error if buffer allocation fails.
10657 (yyStackOverflow): New function.
10658 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10659 the initialization was successful. It might fail if storage was
10660 exhausted.
10661 (yyexpandGLRStack): Add more checks for storage allocation failure.
10662 Use yyStackOverflow to report failures.
10663 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10664 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10665 Don't assume stack number fits in int.
10666 (yysplitStack): Check for storage allocation failure.
10667 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10668 can print diagnostics on storage allocation failure. All callers
10669 changed.
10670 (yyresolveValue): Use yybool for boolean.
10671 (yyreportSyntaxError): Check for size-calculation overflow.
10672 This code is taken from yacc.c.
10673 (yyparse): Check for storage allocation errors when allocating
10674 the initial stack.
10675
10676 2005-07-05 Akim Demaille <akim@epita.fr>
10677
10678 Extract calc++ from the documentation.
10679 * doc/bison.texinfo (Calc++): Add the extraction marks.
10680 * examples/extexi: New, from the aborted GNU Programming 2E.
10681 Separate the different paragraph of a file with empty lines.
10682 * examples/Makefile: Use it to extract the whole calc++ example.
10683
10684 2005-06-24 Akim Demaille <akim@epita.fr>
10685
10686 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10687 class typedefs.
10688
10689 2005-06-22 Akim Demaille <akim@epita.fr>
10690
10691 * doc/bison.texinfo (C++ Language Interface): First stab.
10692 (C++ Parsers): Remove.
10693
10694 2005-06-22 Akim Demaille <akim@epita.fr>
10695
10696 * data/lalr1.cc (yylex_): Honor %lex-param.
10697
10698 2005-06-22 Akim Demaille <akim@epita.fr>
10699
10700 Start a set of simple examples.
10701 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10702 * examples/calc++/calc++-driver.hh,
10703 * examples/calc++/calc++-parser.yy,
10704 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10705 * examples/calc++/compile, examples/calc++/test: New.
10706
10707 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10708
10709 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10710 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10711 which stems from the 2005-05-27 patch.
10712
10713 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10714
10715 * data/glr.c: Modify treatment of unused parameters to permit use
10716 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10717
10718 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10719
10720 Fix infringement on user name space reported by Janos Zoltan Szabo.
10721 * data/yacc.c (yyparse): strlen -> yystrlen.
10722
10723 2005-05-30 Akim Demaille <akim@epita.fr>
10724
10725 * data/lalr1.cc (_): New.
10726 Translate the various messages.
10727
10728 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10729
10730 Fix infringement on user name space reported by Bruno Haible.
10731 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10732 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10733 the user's name space.
10734 (alloca): Include <stdlib.h> to get it, if it's not built in.
10735 (YYMALLOC, YYFREE): Define only if needed.
10736 (malloc, free): Declare, but only if needed, as this infringes on
10737 the user name space.
10738
10739 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10740
10741 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10742 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10743 with %d format.
10744 * lib/ebitset.c (min, max): Undef before defining.
10745 * lib/vbitset.c (min, max): Likewise.
10746 * lib/subpipe.c (create_subpipe): Save local variables in case
10747 vfork clobbers them.
10748
10749 2005-05-24 Bruno Haible <bruno@clisp.org>
10750
10751 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10752 error message syntax used by gcc-4.0.
10753
10754 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10755
10756 * README: Mention m4 1.4.3. Remove obsolete advice about
10757 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10758
10759 * bootstrap: Remove workaround for problem I encountered with
10760 gettext 0.14.1; it seems to be fixed now.
10761
10762 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10763
10764 * NEWS: Version 2.0a.
10765
10766 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10767 the previous change.
10768
10769 Various maintainer cleanups.
10770 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10771 conftest*, for benefit of CVS commands run at the same time as
10772 "configure". Add build-aux, since "bootstrap" now creates it and
10773 its subfiles.
10774 * Makefile.cfg (move_if_change): Remove.
10775 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10776 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10777 (po_repo, do-po-update, po-update, wget_files, get-targets):
10778 (config.guess-url_prefix, config.sub-url_prefix):
10779 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10780 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10781 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10782 Remove.
10783 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10784 this is now the recommended name.
10785 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10786 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10787 ylwrap. These files now go into build-aux.
10788 * config/move-if-change: Remove.
10789 * config/prev-version.txt: Bump from 1.75 to 2.0.
10790
10791 * bootstrap: Add stdio-safer, unistd-safer modules.
10792 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10793 we don't need it).
10794 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10795 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10796 * lib/subpipe.c: Include "unistd-safer.h".
10797 (create_subpipe): Make sure all the newly-created
10798 file descriptors are > 2, so that diagnostics don't
10799 get sent down them (which might cause Bison to hang, in theory).
10800 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10801 * src/files.c (xfopen): Use fopen_safer, not fopen.
10802
10803 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10804 yesterday's yacc.c fix.
10805
10806 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10807
10808 * data/glr.c, data/lalr1.cc: Update copyright date.
10809
10810 Fix a destructor bug reported by Wolfgang Spraul in
10811 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10812 * data/yacc.c (yyabortlab): Don't call destructor, and
10813 don't set yychar to EMPTY.
10814 (yyoverflowlab): Don't call destructor.
10815 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10816 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10817 since we no longer output the message "discarding lookahead token
10818 end of input ()".
10819
10820 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10821
10822 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10823 fix a small glitch in debugging output.
10824 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10825 after YY_SYMBOL_PRINT where needed.
10826
10827 (struct yyGLRState): Add some comments.
10828 (struct yySemanticOption): Add some comments.
10829 (union yyGLRStackItem): Add comment.
10830
10831 (yymergeOptionSets): Correct this to properly perform the union,
10832 avoiding infinite reported by Michael Rosien.
10833 Update comment.
10834
10835 * tests/glr-regression.at: Add test for GLR merging error reported
10836 by M. Rosien.
10837
10838 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10839
10840 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10841 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10842 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10843 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10844 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10845 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10846 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10847 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10848 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10849 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10850 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10851 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10852 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10853 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10854 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10855 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10856 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10857 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10858 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10859 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10860 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10861 src/output.h, src/parse-gram.c, src/parse-gram.h,
10862 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10863 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10864 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10865 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10866 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10867 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10868 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10869 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10870 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10871 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10872 tests/reduce.at, tests/regression.at, tests/sets.at,
10873 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10874 Update FSF postal mail address.
10875
10876 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10877
10878 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10879 Problem reported by Ralf Menzel.
10880
10881 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10882
10883 * tests/actions.at: Test that stack overflow invokes destructors.
10884 From Marcus Holland-Moritz.
10885 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10886 from here....
10887 (yyreturn): to here. That way, destructors are called properly
10888 even if the stack overflows, or the user calls YYACCEPT or
10889 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10890 (yyoverflowlab): Destroy the lookahead.
10891
10892 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10893
10894 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10895
10896 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10897
10898 * NEWS: Bison-generated C parsers no longer quote literal strings
10899 associated with tokens.
10900 * src/output.c (prepare_symbols): Don't escape strings,
10901 since users don't want to see C escapes.
10902 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10903 in diagnostics.
10904 * tests/input.at (Torturing the Scanner): Likewise.
10905 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10906
10907 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10908
10909 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10910 the data size is known to be too small and we can't increase it.
10911 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10912
10913 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10914
10915 * src/parse-gram.y: Include quotearg.h.
10916 (string_as_id): Quote $1 before using it as a key, since the
10917 lexer no longer quotes it for us.
10918 (string_content): Don't strip quotes, since lexer no longer
10919 quotes it for us.
10920 * src/scan-gram.l: Include quotearg.h.
10921 ("\""): Omit quote.
10922 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10923 a key, since the rest of the lexer doesn't quote it.
10924 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10925 * tests/regression.at (Token definitions): Check for backslashes
10926 in token strings.
10927
10928 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10929 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10930 (yyparse): Revamp code to generate long syntax error message, to
10931 make it easier to translate, and to avoid problems with arithmetic
10932 overflow. Change "virtual memory" to "memory" in diagnostic, since
10933 we don't know whether the memory is virtual.
10934
10935 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10936
10937 * NEWS: Bison-generated C parsers now use the _ macro to
10938 translate strings.
10939 * data/yacc.c (_) [!defined _]: New macro.
10940 All English strings wrapped inside this macro.
10941 * doc/bison.texinfo (Bison Parser): Document _.
10942 * po/POTFILES.in: Include src/parse-gram.c, since it now
10943 includes translateable strings that parse-gram.y doesn't.
10944
10945 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10946
10947 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10948 reverting the 2004-10-11 change to this function.
10949 (symbol_check_alias_consistency): Don't call symbol_type_set
10950 if the type name is already correct.
10951 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10952
10953 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10954
10955 * tests/regression.at (Token definitions): Don't use a token named
10956 c, as that generates a "#define c ..." that runs afoul of buggy
10957 stdlib.h that uses the identifier c as a member of struct
10958 drand48_data. Problem reported by Horst Wente.
10959
10960 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * bootstrap: Change translation URL from
10963 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10964 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10965 redirection glitches. Problem reported by twlevo@xs4all.nl.
10966
10967 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10968
10969 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10970 after operands; POSIX says this isn't portable for the c99 command.
10971
10972 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10973
10974 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10975 immediately if a data overrun has occurred; this may help us track
10976 down what may be a spurious failure on MacOS.
10977
10978 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10979
10980 Respond to problems reported by twlevo@xs4all.nl.
10981
10982 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10983
10984 * src/vcg.h: Comment fix.
10985 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10986 (G_CMAX): Change to -1 instead of INT_MAX.
10987
10988 * data/yacc.c (yyparse): Omit spaces before #line.
10989
10990 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10991
10992 * src/tables.c (state_number_to_vector_number): Put it inside an
10993 "#if 0", since it's not currently used. Problem reported by
10994 Roland McGrath.
10995
10996 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10997
10998 * src/output.c (escaped_output): Renamed from
10999 escaped_file_name_output, since we now use it for symbol tags as
11000 well. All uses changed.
11001 (symbol_destructors_output, symbol_printers_output):
11002 Escape symbol tags too.
11003 Problem reported by Matyas Forstner in
11004 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11005
11006 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11007 not needed.
11008 * src/output.c (user_actions_output, token_definitions_output,
11009 symbol_destructors_output, symbol_printers_output): Likewise.
11010 * src/reader.c (prologue_augment): Likewise.
11011 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11012
11013 * src/vcg.c (output_edge): Don't quote linestyle arg.
11014 Problem reported by twlevo@xs4all.nl.
11015
11016 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11019 example, reported by Derek M Jones. Also, make the example even
11020 more outrageous, to better illustrate how bad the problem is.
11021
11022 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11023
11024 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11025 putsym. Typo reported by Sebastian Piping.
11026
11027 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11028
11029 * doc/bison.texinfo (Language and Grammar): some -> same
11030 (Epilogue): int he -> in the
11031 Typos reported by Sebastian Piping via Justin Pence.
11032
11033 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11034
11035 * tests/glr-regression.at (Improper handling of embedded actions
11036 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11037 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11038 with dollar signs in test names.
11039 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11040 for a similar reason.
11041
11042 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11043
11044 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11045 wants to redefine G_VIEW.
11046
11047 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11048
11049 * src/vcg.c (get_view_str): Remove case for normal_view.
11050 Problem reported by twlevo@xs4all.nl.
11051
11052 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11053
11054 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11055 Problem reported by twlevo@xs4all.nl.
11056
11057 * doc/bison.texinfo: Change @dircategory from "GNU programming
11058 tools" to "Software development". Requested by Richard Stallman
11059 via Karl Berry.
11060
11061 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11062
11063 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11064 Problem reported by twlevo@xs4all.nl.
11065
11066 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11067
11068 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11069 keyword; it's not needed with modern compilers, and it doesn't
11070 affect correctness with older compilers. Suggested by
11071 twlevo@xs4all.nl.
11072
11073 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11074
11075 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11076 gcc -Wswitch-default.
11077 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11078 * data/yacc.c (yyparse): Likewise.
11079
11080 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11081
11082 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11083 already. Let config.h define any nonstandard values.
11084
11085 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11086
11087 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11088 for the benefit of slower hosts. Problem reported by
11089 Nelson H. F. Beebe.
11090
11091 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11092
11093 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11094 being defined and not used.
11095 * data/lalr1.cc (yyparse): Likewise.
11096 Use "if (false)" rather than "if (0)".
11097
11098 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11099
11100 * TODO: Mention that we should allow NUL bytes in tokens.
11101
11102 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11103
11104 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11105 Problem reported by Hans Aberg.
11106
11107 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11108
11109 * src/getargs.c (version): Happy new year; update overall
11110 program copyright date from 2004 to 2005.
11111
11112 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11113 Problem reported by Hans Aberg.
11114 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11115 (Output file names.): Add a test for the case when standard output
11116 is closed.
11117
11118 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11119
11120 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11121 to fix an oversight in the Bison 2.0 manual.
11122
11123 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11124
11125 * NEWS: Version 2.0. Reformat the existing news items since
11126 1.875, so that related items are grouped together.
11127 * configure.ac (AC_INIT): Bump version to 2.0.
11128 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11129
11130 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11131 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11132 otherwise, we're not testing alloca. Unfortunately there's no
11133 simple way to consult HAVE_ALLOCA here.
11134
11135 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11136 for yymsg, too.
11137
11138 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11139 hand. This avoids a warning about comparing int to size_t when
11140 GCC warnings are enabled.
11141
11142 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11143
11144 * NEWS: Bison-generated parsers no longer default to using the
11145 alloca function (when available) to extend the parser stack, due
11146 to widespread problems in unchecked stack-overflow detection.
11147 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11148 responsibility to set it to a positive value. This lets the user
11149 specify a value that is not a preprocessor constant.
11150 * data/yacc.c (YYMAXDEPTH): Likewise.
11151 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11152 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11153 to be a compile-time constant. However, explain the constraints on it.
11154 Also, explain the constraints on YYINITDEPTH.
11155 (Table of Symbols): Explain that alloca is no longer the default.
11156 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11157 to 1.
11158
11159 * doc/bison.texinfo (Location Default Action): Mention that n must
11160 be zero when k is zero. Suggested by Frank Heckenbach.
11161
11162 2004-12-22 Akim Demaille <akim@epita.fr>
11163
11164 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11165 (parser::state_type, parser::semantic_type, parser::location_type):
11166 Private, not public.
11167 (parser::parse): Return ints, not bool.
11168 Returning a bool introduces a problem: 0 corresponds to false, and
11169 it seems weird to return false on success. Returning true changes
11170 the conventions for yyparse.
11171 Alternatively we could return void and send an exception.
11172 There is no clear consensus (yet?).
11173 (state_stack, semantic_stack, location_stack): Rename as...
11174 (state_stack_type, semantic_stack_type, location_stack_type): these.
11175 Private, not public.
11176 * tests/c++.at: New.
11177 * tests/testsuite.at, tests/Makefile.am: Adjust.
11178
11179 2004-12-21 Akim Demaille <akim@epita.fr>
11180
11181 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11182
11183 2004-12-21 Akim Demaille <akim@epita.fr>
11184
11185 Don't impose std::string for filenames.
11186
11187 * data/lalr1.cc (b4_filename_type): New.
11188 (position::filename): Use it.
11189 (parser.hh): Move the inclusion of stack.hh and location.hh below
11190 the user code, so that needed headers for the filename type can be
11191 included first.
11192 Forward declare them before the user code.
11193 * tests/Makefile.am (check-local, installcheck-local): Pass
11194 TESTSUITEFLAGS to the TESTSUITE.
11195
11196 2004-12-20 Akim Demaille <akim@epita.fr>
11197
11198 Use more STL like names: my_class instead of MyClass.
11199
11200 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11201 (SemanticStack, SemanticType, StateStack, StateType)
11202 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11203 (Parser::value): Rename as...
11204 (location_stack, location_type, rhs_number_type, semantic_stack)
11205 (semantic_type, state_stack, state_type, token_number_type, stack)
11206 (slice, traits, parser::yylloc, parser::yylval): these.
11207
11208 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11209
11210 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11211
11212 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11213 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11214
11215 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11216
11217 Remove uses of 'short int' and 'unsigned short int'. This raises
11218 some arbitrary limits. It uses more memory but nowadays that's
11219 not much of an issue.
11220
11221 This change does not affect the generated parsers; that's a different
11222 task, as some users will want to conserve memory there.
11223
11224 Ideally we should use size_t to represent all object counts, and
11225 something like ptrdiff_t to represent signed differences of object
11226 counts; but that will require more code-cleanup than I have the
11227 time to do right now.
11228
11229 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11230 Use size_t, not int or short int, to count objects.
11231 * src/closure.c (nritemset, closure): Likewise.
11232 * src/closure.h (nritemset, closure): Likewise.
11233 * src/nullable.c (nullable_compute): Likewise.
11234 * src/print.c (print_core): Likewise.
11235 * src/print_graph.c (print_core): Likewise.
11236 * src/state.c (state_compare, state_hash): Likewise.
11237 * src/state.h (struct state): Likewise.
11238 * src/tables.c (default_goto, goto_actions): Likewise.
11239
11240 * src/gram.h (rule_number, rule): Use int, not short int.
11241 * src/output.c (prepare_rules): Likewise.
11242 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11243 errs, reductions): Likewise.
11244 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11245 Likewise.
11246 * src/tables.c (vector_number, tally, action_number,
11247 ACTION_NUMBER_MINIMUM): Likewise.
11248 * src/output.c (muscle_insert_short_int_table): Remove.
11249
11250 2004-12-17 Akim Demaille <akim@epita.fr>
11251
11252 * data/lalr1.cc: Extensive Doxygenation.
11253 (error_): Rename as...
11254 (error): this, since it is visible to the user.
11255 Adjust callers.
11256 (Parser::message): Now an automatic variable from...
11257 (Parser::yyreport_syntax_error_): here.
11258 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11259 Parser::error.
11260 * tests/input.at: Escape $.
11261
11262 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11263
11264 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11265 Parenthesize rhs to avoid obscure problems with mistakes like
11266 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11267 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11268 b4_rhs_location): Likewise.
11269 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11270 b4_rhs_location): Likewise.
11271
11272 2004-12-16 Akim Demaille <akim@epita.fr>
11273
11274 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11275 yacc.c: be sure to stay within yycheck_.
11276 * tests/actions.at: Re-enable C++ tests.
11277
11278 2004-12-16 Akim Demaille <akim@epita.fr>
11279
11280 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11281 real.
11282
11283 2004-12-16 Akim Demaille <akim@epita.fr>
11284
11285 Use #define to handle the %name-prefix.
11286
11287 * data/glr.c, data/yacc.c: Comment changes.
11288 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11289 so that one can refer to yylex in the parser file, and have it
11290 renamed, as is the case with other skeletons.
11291
11292 2004-12-16 Akim Demaille <akim@epita.fr>
11293
11294 Move lalr1.cc internals into yy*.
11295
11296 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11297 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11298 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11299 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11300 (empty_, final_, terror_, errcode_, ntokens_)
11301 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11302 (looka_, ilooka_, error_range_, nerrs_):
11303 Rename as...
11304 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11305 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11306 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11307 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11308 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11309 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11310 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11311 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11312 these.
11313
11314 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11315
11316 Fix some problems reported by twlevo at xs4all.
11317 * src/symtab.c (symbol_new): Report an error if the input grammar
11318 contains too many symbols. This is better than calling abort() later.
11319 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11320 (struct node, struct graph):
11321 Rename member expand to stretch. All uses changed.
11322 (struct graph): Remove member layoutalgorithm. All uses removed.
11323 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11324 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11325 All uses changed.
11326 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11327
11328 2004-12-15 Akim Demaille <akim@epita.fr>
11329
11330 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11331 Add more Doxygen comments.
11332 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11333 (report_syntax_error_, translate_): Rename as...
11334 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11335 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11336
11337 2004-12-15 Akim Demaille <akim@epita.fr>
11338
11339 * data/lalr1.cc (lex_): Rename as...
11340 (yylex_): this.
11341 Move the trace here.
11342 Take the %name-prefix into account.
11343 Reported by Alexandre Duret-Lutz.
11344
11345 2004-12-15 Akim Demaille <akim@epita.fr>
11346
11347 Simplify the C++ parser constructor.
11348
11349 * data/lalr1.cc (debug_): Rename as...
11350 (yydebug_): so that the parser's internals are always in the yy*
11351 pseudo namespace.
11352 Adjust uses.
11353 (b4_parse_param_decl): Remove the leading comma as it is now only
11354 called as unique argument list.
11355 (Parser::Parser): Remove the constructor accepting a location and
11356 an initial debugging level.
11357 Remove from the other ctor the argument for the debugging level.
11358 (debug_level_type, debug_level, set_debug_level): New.
11359
11360 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11361 constructor calls.
11362
11363 2004-12-15 Akim Demaille <akim@epita.fr>
11364
11365 Remove b4_root related material: failure experiment
11366 (which goal was to allow to derive from a class).
11367
11368 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11369 definitions and uses.
11370
11371 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11372
11373 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11374 not 2, since it's not portable to subtract 1 from the start of an
11375 array. The new item 0 is never set or used. All uses changed.
11376
11377 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11378 the default definition of YYLLOC_DEFAULT. Problem reported
11379 by Frank Heckenbach.
11380
11381 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11382
11383 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11384 the normal case and one for the error case. Just use the
11385 first one uniformly. Problem reported by Frank Heckenbach.
11386 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11387 use exactly the same macro in both places.
11388 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11389 so that the normal-case YYRHSLOC works for the error case too.
11390 All uses changed.
11391 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11392 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11393 * doc/bison.texinfo (Location Default Action): Don't claim that
11394 we have an array of locations. Use the same macro for both glr
11395 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11396 the index is 0.
11397
11398 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11399
11400 * HACKING: Update email addresses to send announcements to.
11401
11402 * configure.ac (AC_INIT): Bump version to 1.875f.
11403
11404 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11405
11406 * NEWS: Version 1.875e.
11407 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11408
11409 * src/scan-skel.l: Include "complain.h", for "fatal".
11410
11411 * src/relation.h (relation_print, relation_digraph):
11412 Relation sizes are of type relation_node, not size_t (this is
11413 merely a doc fix, since the two types are equivalent).
11414 (relation_transpose): Relation sizes are of type relation_node,
11415 not int.
11416 * src/relation.c: Likewise.
11417 (top, infinity): Now of type relation_node, not int.
11418 (traverse, relation_transpose): Use relation_node, not int.
11419
11420 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11421 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11422 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11423
11424 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11425 specifying whether the test should be skipped. Use it tp
11426 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11427 fail on some hosts, and should be skipped.
11428
11429 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11430
11431 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11432 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11433 unless otherwise specified below.
11434
11435 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11436 to allocate kernel_base, kernel_items, kernel_size, since
11437 they needn't be initialized to 0.
11438 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11439 * src/closure.c (new_closure): Likewise, for itemset.
11440 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11441 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11442 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11443 (build_relations): Likewise for edge, states1, includes.
11444 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11445 * src/reader.c (packgram): Likewise, for ritem, rules.
11446 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11447 * src/relation.c (relation_digraph): Likewise for VERTICES.
11448 (relation_transpose): Likewise for new_R, end_R.
11449 * src/symtab.c (symbols_token_translations_init): Likewise for
11450 token_translations.
11451 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11452 (token_actions): Likewise for yydefact, actrow, conflrow,
11453 conflict_list.
11454 (save_column): Likewise for froms[symno], tos[symno].
11455 (goto_actions): Likewise for state_count.
11456 (pack_table): Likewise for base, pos, check.
11457 (tables_generate): Likewise for width.
11458
11459 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11460 for initial core. Just have a separate core, so we needn't worry
11461 about whether kernel_size and kernel_base are initialized.
11462
11463 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11464 kernel_size, kernel_items): Remove unnecessary initialization.
11465 * src/conflicts.c (conflicts): Likewise.
11466 * src/derives.c (derives): Likewise.
11467 * src/muscle_tablc (muscle_insert): Likewise.
11468 * src/relation.c (relation_digraph): Likewise.
11469 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11470 conflrow, conflict_table, conflict_list, table, check):
11471 Likewise.
11472
11473 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11474 This is because all callers pass unsigned int.
11475 * src/closure.h (new_closure): Likewise.
11476
11477 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11478 (build_relations): Initialize includes[i] in all cases.
11479 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11480 and rules[ruleno].precsym. Initialize members in order.
11481 * src/relation.c (relation_transpose): Always initialize new_R[i]
11482 and end_R[i].
11483 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11484
11485 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11486 conflict_list[0] was always 0, but now it isn't initialized.
11487
11488 * src/table.c (table_grow): When conflict_table grew, the grown
11489 area wasn't cleared. Fix this.
11490
11491 * lib/.cvsignore: Add strdup.c, strdup.h.
11492 * m4/.cvsignore: Add strdup.m4.
11493
11494 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11495
11496 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11497 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11498 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11499 ngotos + 1 without checking for overflow.
11500 (build_relations): Use END_NODE, not -1, to denote end of edges.
11501 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11502 build_relations): Use goto_number, not int, for goto numbers.
11503 * src/tables.c (save_column, default_goto): Likewise.
11504
11505 2004-11-23 Akim Demaille <akim@epita.fr>
11506
11507 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11508 of #defining from yystype.
11509 Don't typedef yystype, C++ does not need it.
11510 This lets it possible to forward declare it as union.
11511
11512 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11513
11514 * bootstrap (gnulib_modules): Add extensions.
11515 Problem reported by Jim Meyering.
11516
11517 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11518
11519 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11520 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11521 src/system.h, src/tables.c: XFREE -> free, to accommodate
11522 recent change to gnulib xalloc.h.
11523 Problem reported by Jim Meyering.
11524
11525 2004-11-17 Akim Demaille <akim@epita.fr>
11526
11527 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11528
11529 2004-11-17 Akim Demaille <akim@epita.fr>,
11530 Alexandre Duret-Lutz <adl@gnu.org>
11531
11532 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11533 changes.
11534 (YYCDEBUG): Adjust.
11535 Use it instead of cdebug_.
11536 (Parser::debug_stream, Parser::set_debug_stream): New.
11537 (Parser::symprint_): Define cdebug_ for temporary backward
11538 compatibility.
11539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11540 debug_stream ().
11541
11542 2004-11-17 Akim Demaille <akim@epita.fr>
11543
11544 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11545 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11546 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11547 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11548
11549 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11550
11551 * data/glr.c (yyloc_default): Remove; not used.
11552 Problem reported by Frank Heckenbach.
11553
11554 2004-10-25 Akim Demaille <akim@epita.fr>
11555
11556 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11557 Introduce another definition to address simple location arrays.
11558 (yyGLRStack): New member: yyerror_range.
11559 (yyrecoverSyntaxError, yyparse): Update it.
11560 (yyrecoverSyntaxError): Use it when shifting the error token to
11561 have an accurate range, equivalent to the one computed by both
11562 yacc.c and lalr1.cc.
11563 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11564 that column numbers start at column 0, as per GNU Coding
11565 Standards, the others tests, and the doc.
11566 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11567 Adjust to the above change (first column is 0).
11568 And adjust the location of the "<error>", now covering the whole
11569 line.
11570
11571 2004-10-22 Akim Demaille <akim@epita.fr>
11572 and Paul Eggert <eggert@cs.ucla.edu>
11573
11574 Remove some arbitrary limits on goto numbers and relations.
11575 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11576 initial values, since they're never used.
11577 (set_goto_map): ngotos is now unsigned, so test for overflow
11578 by seeing whether it wraps around to zero.
11579 * src/lalr.h (goto_number): Now size_t, not short int.
11580 (GOTO_NUMBER_MAXIMUM): Remove.
11581 * src/relation.c (relation_print, traverse, relation_transpose):
11582 Check for END_NODE rather than looking at sign.
11583 * src/relation.h (END_NODE): New macro.
11584 (relation_node): Now size_t, not short int.
11585
11586 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11587
11588 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11589 keyword, not an identifier. Problem reported by Baron Schwartz in
11590 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11591
11592 2004-10-11 Akim Demaille <akim@epita.fr>
11593
11594 * src/symtab.c (symbol_check_alias_consistency): Also check
11595 type names, destructors, and printers.
11596 Reported by Alexandre Duret-Lutz.
11597 Recode the handling of associativity and precedence in terms
11598 of symbol_precedence_set.
11599 Accept no redeclaration at all, not even equal to the previous
11600 value.
11601 (redeclaration): New.
11602 Use it to factor redeclaration complaints.
11603 (symbol_make_alias): Don't set the type of the alias, let
11604 symbol_check_alias_consistency do it as for other features.
11605 * src/symtab.h (symbol): Add new member prec_location, and
11606 type_location.
11607 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11608 * tests/input.at (Incompatible Aliases): New.
11609
11610 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11611
11612 .cvsignore fixes to accommodate gnulib changes,
11613 and the practice of naming build directories "_build".
11614 * .cvsignore: Add "_*". Sort.
11615 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11616 * m4/.cvsignore: Add "*_gl.m4".
11617
11618 2004-10-06 Akim Demaille <akim@epita.fr>
11619
11620 * src/parse-gram.y (add_param): Fix the truncation of trailing
11621 spaces.
11622
11623 2004-10-05 Akim Demaille <akim@epita.fr>
11624
11625 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11626 whether the reducion was empty or not. This leaves room to
11627 improve the use of YYLLOC_DEFAULT in such a case.
11628 lalr1.cc is still experimental, so changing this is acceptable.
11629 And finally, there are probably not many users who changed the
11630 handling of locations in GLR, so changing is admissible too.
11631
11632 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11633 empty reduction, set @$ to an empty location ending the previously
11634 stacked symbol.
11635 Adjust uses to make sure the code is triggered on empty
11636 reductions.
11637 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11638 expected output: empty reductions have empty locations.
11639
11640 2004-09-29 Akim Demaille <akim@epita.fr>
11641
11642 * data/lalr1.cc: Move towards a more standard C++ coding style
11643 for templates: Class < T > -> Class<T>.
11644
11645 2004-09-29 Akim Demaille <akim@epita.fr>
11646
11647 * data/lalr1.cc: Reinstall the former ctor, for sake of
11648 compatibility, but warn it will be removed.
11649 Move towards a more standard C++ coding style (i.e., type *var ->
11650 type* var).
11651
11652 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11653
11654 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11655 since it's less likely to work if NULs are involved in the future.
11656
11657 2004-09-27 Akim Demaille <akim@epita.fr>
11658
11659 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11660
11661 2004-09-27 Akim Demaille <akim@epita.fr>
11662
11663 * data/lalr1.cc (b4_parse_param_decl_1): New.
11664 (b4_parse_param_decl): Use it to have different names between attribute
11665 and argument names.
11666 (b4_cc_constructor_call): Likewise.
11667
11668 2004-09-24 Akim Demaille <akim@epita.fr>
11669
11670 * src/parse-gram.y (add_param): Strip the leading and trailing
11671 blanks from a formal argument declaration.
11672 (YY_LOCATION_PRINT): New.
11673
11674 2004-09-24 Akim Demaille <akim@epita.fr>
11675
11676 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11677 after the location.
11678
11679 2004-09-24 Akim Demaille <akim@epita.fr>
11680
11681 * doc/bison.texinfo (Table of Symbols): Sort.
11682
11683 2004-09-21 Akim Demaille <akim@epita.fr>
11684
11685 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11686 the useless parentheses.
11687 Suggested by Paul Eggert.
11688
11689 2004-09-20 Akim Demaille <akim@epita.fr>
11690
11691 Let the initial-action act on the look-ahead, and use it for the
11692 "initial push" (corresponding to an hypothetical beginning-of-file).
11693 And let lalr1.cc honor %initial-action.
11694
11695 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11696 example.
11697 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11698 (Parser::Parser): Remove the ctor that used to initialize it.
11699 (Parser::parse): Like in the other skeletons, issue the "starting
11700 parse" message before any action.
11701 Honor %initial-action.
11702 Initialize the stacks with the lookahead.
11703 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11704 look-ahead.
11705 Push them in the stacks.
11706 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11707
11708 2004-09-20 Akim Demaille <akim@epita.fr>
11709
11710 * doc/bison.texinfo (Initial Action Decl): New.
11711
11712 2004-09-20 Akim Demaille <akim@epita.fr>
11713
11714 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11715 clearer criterion to define it.
11716 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11717 When reducing on an empty RHS, use the latest stacked location as
11718 location.
11719 yylloc is not always available.
11720 * data/glr.c: Likewise.
11721 Also, honor initial-actions.
11722
11723 2004-09-20 Akim Demaille <akim@epita.fr>
11724
11725 * data/yacc.c (YY_LOCATION_PRINT): New.
11726 Define when we know YYLTYPE's structure, i.e., when the default
11727 YYLLOC_DEFAULT is used.
11728 * data/c.m4 (b4_yysymprint_generate): Use it.
11729 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11730 value of the result.
11731 (error_start_): Replace with...
11732 (error_range_): this location array.
11733 This allows to replace code relying on the implementation of
11734 locations by portable code.
11735 * data/yacc.c (yylerrsp): Replace with...
11736 (yyerror_range): this.
11737 Every time a token is popped, update yyerror_range[0], to have an
11738 accurate location for the error token.
11739 * data/glr.c (YY_LOCATION_PRINT): New.
11740 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11741 deference a pointer.
11742 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11743 report the location in %printers.
11744
11745 * src/scan-skel.l: Instead of abort, report error messages to ease
11746 understanding skeleton scanning failures.
11747
11748 2004-09-16 Akim Demaille <akim@epita.fr>
11749
11750 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11751 (iterator, const_iterator): these, to be more in the C++ spirit.
11752 Also, return reverse iterators so that when displaying the stack
11753 we display its bottom first.
11754 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11755 from yacc.c.
11756 We should probably use vector here though.
11757
11758 2004-09-16 Akim Demaille <akim@epita.fr>
11759
11760 Have more complete shift traces.
11761
11762 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11763 to report Shifts instead of ad hoc YYDPRINTF invocations,
11764 including for the error token.
11765 * data/lalr1.cc (symprint_): Output the location.
11766 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11767 output the location within the %printer.
11768 Activate GLR tests, at least to make sure they compile properly.
11769 They still don't pass though.
11770 * tests/calc.at: Adjust expect verbose output, since now "Entering
11771 state..." is on a different line than the "Shifting" message.
11772
11773 2004-09-08 Akim Demaille <akim@epita.fr>
11774
11775 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11776 Bison directive from the Bison file to the invocation of this
11777 macro, so that these directives are passed to
11778 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11779 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11780 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11781 the extra Bison directives instead of the whole series.
11782 Change the grammar so that there are recoverable errors, and
11783 unrecoverable errors. Now we can have the parser give up before
11784 consuming the whole input. As a result we now can observe that
11785 the lookahead is freed when needed.
11786 Change the parser source to parse argv[1] instead of a hard coded
11787 string.
11788 Simplify yylex, and give a value and location to EOF.
11789 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11790 passed directives already coded in the file.
11791 Add some tests to check the location of "error".
11792 For some tests, the C++ parser is correct, and not yacc.c.
11793 For other tests, they provide different, but unsatisfying, values,
11794 so keep the C++ value so that at least one parser is "correct"
11795 according to the test suite.
11796 (Actions after errors): Remove, this is subsumed by the
11797 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11798
11799 2004-09-06 Akim Demaille <akim@epita.fr>
11800
11801 * data/lalr1.cc: Adjust the indentation of the labels.
11802 (Parser::pop): New.
11803 Use it.
11804
11805 2004-09-06 Akim Demaille <akim@epita.fr>
11806
11807 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11808 argument, an informative message.
11809 Call YY_SYMBOL_PRINT.
11810 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11811 * data/lalr1.cc (destruct_): Likewise.
11812 In addition, no longer depend on b4_yysymprint_generate and
11813 b4_yydestruct_generate to generate these functions, do it "by
11814 hand".
11815
11816 2004-09-03 Akim Demaille <akim@epita.fr>
11817
11818 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11819 invoked, yydestruct the lookahead.
11820 * tests/calc.at (Calculator $1): Update the expected lengths of
11821 traces: there is an added line for the discarded lookahead.
11822 * doc/bison.texinfo (Destructor Decl): Some rewording.
11823 Define "discarded" symbols.
11824
11825 2004-09-02 Akim Demaille <akim@epita.fr>
11826
11827 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11828
11829 2004-09-02 Akim Demaille <akim@epita.fr>
11830
11831 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11832 (YYDSYMPRINTF): Rename as...
11833 (YY_SYMBOL_PRINT): this.
11834 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11835 two.
11836 Use it instead of direct symprint_ calls.
11837 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11838 one.
11839
11840 2004-09-02 Akim Demaille <akim@epita.fr>
11841
11842 * data/lalr1.cc (b4_yysymprint_generate): New.
11843 (symprint_): New member function, defined when YYDEBUG.
11844 Use it consistently instead of token/nterm debugging output by
11845 hand.
11846 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11847 %printer calls to use cdebug_ when using lalr1.cc.
11848
11849 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11850
11851 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11852 with #ifdef YYDEBUG.
11853
11854 2004-08-26 Akim Demaille <akim@epita.fr>
11855
11856 * doc/bison.texinfo (Implementing Loops): Rename as...
11857 (Implementing Gotos/Loops): this.
11858
11859 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11860
11861 Adjust to latest gnulib.
11862 * bootstrap (gnulib_modules): Add xalloc-die.
11863 Set LC_ALL=C so that file names sort consistently.
11864 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11865 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11866 uintmax_t.m4, ulonglong.m4.
11867 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11868 po.m4 since we are now using _gl.m4 instead.
11869
11870 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11871
11872 * src/scan-action.l: Remove. Scanning of semantic actions is
11873 handled in scan-gram.l.
11874
11875 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11876
11877 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11878
11879 * src/location.h (struct): The file member is a uniqstr.
11880 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11881
11882 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11883
11884 Fix bug with non-%union parsers that have printers or destructors,
11885 which led to a Bison core dump. Reported by Peter Fales in
11886 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11887
11888 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11889 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11890 not to our own type.
11891 * src/output.c (symbol_destructors_output, symbol_printers_output):
11892 Don't assume %union.
11893 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11894 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11895 UNION-FLAG. All callers changed.
11896 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11897 Use type char, not unsigned int, when declaring an array of char;
11898 this lets us remove a cast.
11899 (Printers and Destructors): Add non-%union test cases.
11900
11901 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11902
11903 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11904 GLR writeups. E.g., avoid frenchspacing and the future tense,
11905 change "lookahead" to "look-ahead", and change "wrt" to "with
11906 respect to".
11907
11908 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11909
11910 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11911 New sections, split off from the GLR Parsers section. Put the new
11912 Simple GLR Parser near the start of the GLR section, for clarity.
11913 Rewrite connective text.
11914
11915 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11916
11917 * doc/bison.texinfo (Simple GLR Parsers): New section.
11918
11919 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11920
11921 * NEWS, TODO, doc/bison.texinfo:
11922 Use "look-ahead" instead of "lookahead", to be consistent.
11923 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11924 while we're fixing "look-ahead".
11925 * src/conflicts.c (shift_set): Renamed from shiftset.
11926 (look_ahead_set): Renamed from lookaheadset.
11927 * src/print.c: Likewise.
11928 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11929 name for "lookahead".
11930 (report_types, usage): Likewise.
11931 * src/getargs.h (report_look_ahead_tokens): Renamed from
11932 report_lookaheads.
11933 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11934 compute_lookaheads.
11935 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11936 (look_ahead_tokens_print): Renamed from lookaheads_print.
11937 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11938 state_rule_lookaheads_print.
11939 * src/state.h: Likewise.
11940 (reductions.look_ahead_tokens): Renamed from lookaheads.
11941 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11942 AT_DATA_LOOKAHEADS_GRAMMAR.
11943
11944 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11945
11946 * README: Update location of patched M4 distribution.
11947
11948 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11949
11950 Don't assume the C++ compiler takes the same arguments as the C compiler
11951 (trivial change).
11952 * configure.ac (O0CXXFLAGS): New var.
11953 * tests/atlocal.in (CXXFLAGS): Use it.
11954
11955 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11956
11957 Fix some "make check" problems with C++ reported by
11958 Albert Chin-A-Young for Tru64 C++ in this thread:
11959 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11960
11961 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11962 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11963 Output to a .cc file for C++, not to a .c file.
11964 * tests/calc.at (AT_CHECK_CALC): Likewise.
11965 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11966 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11967
11968 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11969
11970 * tests/calc.at, tests/actions.at: Workaround for SGI
11971 C++ compiler. (trivial change)
11972
11973 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11974
11975 Spent a few hours checking out which prerequisite versions the
11976 current sources actually require. I went all the way back to
11977 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11978 a seemingly endless set of combinations of versions more recent
11979 than that. The bottom line is that the current sources require
11980 fairly recent versions of the build tools, and it'll be some work
11981 to change this.
11982 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11983 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11984 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11985 Add comments explaining why those particular versions are
11986 currently needed.
11987
11988 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11989 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11990 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11991
11992 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11993 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11994
11995 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11996
11997 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11998 0.11.5. Suggested by Bruno Haible.
11999 * bootstrap: Remove gettext version checking.
12000
12001 * doc/bison.texinfo (Decl Summary): Also mention that %union
12002 can depend on prerequisite types. Problem reported by Tim
12003 Van Holder.
12004
12005 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12006
12007 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12008 * README-alpha: Don't tell people not to package this.
12009
12010 * bootstrap: Don't assume $(...) works; use `...` instead.
12011 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12012 gettext better.
12013
12014 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12015 put into the -d output file, and mention what to do if YYSTYPE is
12016 defined as a macro.
12017
12018 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12019
12020 Undo change made earlier today: it caused autopoint to not bring
12021 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12022 autopoint's.
12023
12024 * bootstrap: Check that gettext version matches what's in
12025 configure.ac. Warn users to ignore robots.txt ERROR 404.
12026 * bootstrap: Undo today's earlier change (logged below).
12027 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12028
12029 The gettext version checking is causing more trouble than it's
12030 curing; remove it. Problem reported by Paul Hilfinger.
12031
12032 * bootstrap: Issue a warning that one can expect a message
12033 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12034 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12035
12036 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12037
12038 Ensure that the C++ compiler used for testing actually works on a
12039 simple test program; if not, skip the C++-related tests. Problem
12040 reported by Vin Shelton in:
12041 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12042
12043 * m4/cxx.m4: New file.
12044 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12045 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12046 * tests/local.at (AT_COMPILE_CXX): Use it.
12047
12048 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12049
12050 * data/glr.c (yylloc): Output this macro even if locations are not
12051 being generated, as the GLR parser needs it even in that case.
12052 Problem reported by Troy A. Johnson
12053 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12054
12055 * configure.ac (AC_INIT): Update to 1.875e.
12056
12057 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12058
12059 * NEWS: Version 1.875d.
12060 * configure.ac (AC_INIT): Likewise.
12061 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12062
12063 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12064 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12065 lalr1.cc runs afoul of the first, and the last two are no longer
12066 supported by GCC 3.4.0.
12067 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12068 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12069
12070 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12071
12072 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12073 unsigned int, for compatibility with latest gnulib hash module.
12074 * src/state.c (state_hash, state_hasher): Likewise.
12075 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12076 * src/uniqstr.c (hash_uniqstr): Likewise.
12077
12078 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12079
12080 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12081
12082 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12083 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12084 character and string literals.
12085 (unexpected_end): New function.
12086 (unexpected_eof): Use it.
12087 (unexpected_newline): New function.
12088 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12089 actions.
12090
12091 * NEWS: Document %expect-rr.
12092
12093 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12094 Fix typo by replacing $1 with $option.
12095 Remove more 'intl'-related files.
12096 Don't DEFUN AM_INTL_SUBDIR twice.
12097
12098 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12099 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12100 strtoul.c.
12101 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12102 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12103 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12104 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12105 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12106 * src/.cvsignore: Add *.output.
12107
12108 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12109 gets copied to the output file.
12110
12111 2004-04-28 Paul Eggert <eggert@twinsun.com>
12112
12113 Get files from the gnulib and po repositories, instead of relying
12114 on them being in our CVS. Upgrade to latest versions of gnulib
12115 and Automake.
12116
12117 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12118 * bootstrap: Bootstrap from gnulib and po repositories.
12119 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12120 * README-cvs: Document these changes. Remove version numbers from
12121 mentions of build tools, since they change so often. Mention Flex.
12122
12123 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12124 (gl_USE_SYSTEM_EXTENSIONS): Add.
12125 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12126 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12127 does this for us.
12128 (AC_ISC_POSIX): Remove; we no longer support this
12129 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12130 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12131 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12132 Do not check for C89 headers, except for locale.h which is used
12133 by the Yacc library and must port to K&R hosts.
12134 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12135 Do not check for C89 functions, except for setlocale which is
12136 used by the Yacc library.
12137 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12138 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12139 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12140 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12141 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12142 AM_GNU_GETTEXT): Remove; now done by:
12143 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12144 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12145 for us.
12146
12147 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12148 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12149 Define to empty, as gnulib.mk will do the rest for us.
12150 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12151 for us.
12152 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12153 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12154
12155 * src/files.c: Include gnulib's xstrndup.h.
12156
12157 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12158 (REALLOC): Use xnrealloc, for likewise.
12159 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12160 (strnlen, memrchr): Remove decls; functions no longer used.
12161 Include <stpcpy.h>.
12162
12163 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12164 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12165 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12166 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12167 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12168 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12169 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12170 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12171 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12172 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12173 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12174 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12175 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12176 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12177 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12178 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12179 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12180 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12181 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12182 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12183 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12184 Remove, as these files are now generated automatically
12185 by bootstrap or automake.
12186
12187 * po/ChangeLog: Remove: all but one entry was a duplicate
12188 of this file, and I moved that 2000-11-02 entry here.
12189
12190 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12191 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12192 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12193 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12194 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12195 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12196 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12197 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12198 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12199 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12200 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12201 xstrndup.h.
12202 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12203 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12204 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12205 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12206 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12207 * src/.cvsignore: Remove *_.c.
12208
12209
12210 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12211 support it. (The latest stable gzip doesn't.)
12212
12213 2004-04-27 Paul Eggert <eggert@twinsun.com>
12214
12215 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12216 case, as stos_ is now used by destructors due to the 2004-02-09
12217 change.
12218
12219 Remove more K&R C support.
12220 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12221 * lib/subpipe.c (errno): Remove decl.
12222 Include <stdlib.h> unconditionally.
12223 (EXIT_FAILURE): Remove macro.
12224 * src/complain.c (vfprintf, strerror): Remove.
12225 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12226 unconditionally.
12227 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12228 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12229 (strchr, strspn, memchr): Remove decls.
12230 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12231 unconditionally. Do not declare perror.
12232 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12233 unconditionally.
12234
12235 * src/complain.c (_): Remove useless defn, as system.h defines this.
12236
12237 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12238 with latest obstack.h.
12239 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12240 to procedure types, as obstack.h now does that for us.
12241 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12242
12243 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12244 so that this include file can stand alone.
12245 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12246 does this now. Include subpipe.h first after config.h, to
12247 test whether it can stand alone.
12248
12249 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12250 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12251 unused declaration.
12252
12253 * tests/synclines.at (%union synch line): Put a dummy member in
12254 the union, because empty unions aren't allowed in C. Caught
12255 by GCC 3.4.0.
12256
12257 2004-04-13 Jim Meyering <jim@meyering.net>
12258
12259 * src/conflicts.c (conflicts_print): Correct format string typo:
12260 use `%%' to produce literal `%'. (trivial change)
12261
12262 2004-03-30 Paul Eggert <eggert@twinsun.com>
12263
12264 * src/getargs.c (version): Update copyright year to 2004.
12265
12266 * data/c.m4 (b4_int_type): Use 'short int' rather than
12267 'short', and similarly for 'long', 'unsigned', etc.
12268 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12269 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12270 yy_yypstack, yydumpstack): Likewise.
12271 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12272 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12273 Likewise.
12274 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12275 yy_stack_print, yyparse): Likewise.
12276 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12277 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12278 * lib/bitset.c (bitset_print): Likewise.
12279 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12280 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12281 * lib/bitsetv.c (bitsetv_dump): Likewise.
12282 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12283 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12284 Likewise.
12285 * src/LR0.c (allocate_itemsets): Likewise.
12286 * src/gram.h (rule_number, rule): Likewise.
12287 * src/lalr.h (goto_number): Likewise.
12288 * src/nullable.c (nullable_compute): Likewise.
12289 * src/output.c (prepare_rules): Likewise.
12290 * src/relation.c (relation_print, relation_digraph): Likewise.
12291 * src/relation.h (relation_node): Likewise.
12292 * src/state.h (state_number, transitions, errs, reductions,
12293 struct state): Likewise.
12294 * src/symtab.h (symbol_number, struct symbol): Likewise.
12295 * src/tables.c (vector_number, tally, action_number,
12296 default_goto, goto_actions): Likewise.
12297 * tests/existing.at (GNU Cim Grammar): Likewise.
12298 * tests/regression.at (Web2c Actions): Likewise.
12299
12300 * src/output.c (muscle_insert_short_int_table): Renamed from
12301 muscle_insert_short_table. All uses changed.
12302
12303 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12304
12305 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12306 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12307 Add %expect-rr rule.
12308
12309 * src/scan-gram.l: Recognize %expect-rr.
12310
12311 * src/conflicts.h (expected_sr_conflicts): Rename from
12312 expected_conflicts.
12313 (expected_rr_conflicts): Declare.
12314
12315 * src/conflicts.c (expected_sr_conflicts): Rename from
12316 expected_conflicts.
12317 (expected_rr_conflicts): Define.
12318 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12319 for GLR parsers.
12320 Use expected_sr_conflicts in place of expected_conflicts.
12321 Warn if expected_rr_conflicts used in non-GLR parser.
12322
12323 * doc/bison.texinfo: Add documentation for %expect-rr.
12324
12325 2004-03-08 Paul Eggert <eggert@gnu.org>
12326
12327 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12328 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12329
12330 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12331 in lalr1.cc.
12332 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12333 * src/scan-gram.l (scan_integer): New function.
12334 ({int}): Use it.
12335 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12336 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12337 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12338 Say "long int", not "long", for uniformity with GNU style.
12339
12340 2004-02-25 Paul Eggert <eggert@twinsun.com>
12341
12342 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12343 compilers. This fixes a problem with Intel's C++ compiler being
12344 chatty, reported by Guido Trentalancia in
12345 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12346
12347 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12348
12349 Support %destructor and merge error locations in lalr1.cc.
12350
12351 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12352 (Parser::stos_): Define unconditionally.
12353 (Parser::destruct_): New method. Generate its body with
12354 b4_yydestruct_generate.
12355 (Parser::error_start_): New attribute.
12356 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12357 token which are discarded.
12358 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12359 error_start_ when erroneous token are discarded.
12360 (Parser::parse) <yyerrlab1>: Compute the location of the error
12361 token so that it covers all the discarded tokens.
12362 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12363 it can be called with `%skeleton "lalr1.cc"', and do that.
12364
12365 2004-02-02 Paul Eggert <eggert@twinsun.com>
12366
12367 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12368 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12369 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12370 There's no need to mention top_builddir since Automake does that
12371 for us.
12372 (INCLUDES): Remove, as Automake says it's obsolescent.
12373 Contents migrated into AM_CPPFLAGS as described above.
12374 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12375
12376 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12377
12378 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12379 (yyreportSyntaxError): Handle case where lookahead token is
12380 YYEMPTY.
12381
12382 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12383
12384 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12385 resulting parsers are compilable with C++.
12386
12387 2003-12-23 Paul Eggert <eggert@twinsun.com>
12388
12389 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12390 * src/output.c (output_skeleton): Rename local var.
12391 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12392 Bison tokens, as this runs afoul of the 2003-10-07 change that
12393 disallowed NUL bytes in character constants or string literals.
12394
12395 * tests/local.at: Require Autoconf 2.59's Autotest.
12396 * tests/testsuite.at: Don't include local.at, since we now assume
12397 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12398 including it.
12399 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12400 multiple inclusion warnings.
12401
12402 2003-12-02 Akim Demaille <akim@epita.fr>
12403
12404 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12405 conditions.
12406 From Bruno Haible.
12407
12408 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12409
12410 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12411
12412 2003-10-07 Paul Eggert <eggert@twinsun.com>
12413
12414 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12415 if testsuite doesn't exist.
12416
12417 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12418 literals, unfortunately.
12419 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12420 Complain about NUL bytes in character constants or string literals.
12421
12422 2003-10-05 Paul Eggert <eggert@twinsun.com>
12423
12424 * NEWS: Don't document %no-default-prec, as it's still
12425 too experimental.
12426 * doc/bison.texinfo: Document %no-default-prec only if
12427 the defaultprec flag is set. Normally it's not.
12428
12429 2003-10-04 Paul Eggert <eggert@twinsun.com>
12430
12431 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12432 non-modifiable lvalue, instead of a modifiable one.
12433 * doc/bison.texinfo (Actions): Document that $$ can
12434 be assigned to. Do not claim that $$ and $N are
12435 array element references: user code should not rely on this.
12436
12437 2003-10-01 Paul Eggert <eggert@twinsun.com>
12438
12439 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12440 (grammar_declaration): Use it.
12441 * src/scan-gram.l: New token %no-default-prec.
12442 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12443 * NEWS, doc/bison.texinfo: Document the above.
12444
12445 2003-10-01 Akim Demaille <akim@epita.fr>
12446
12447 VCG no longer supports long_straight_phase.
12448
12449 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12450 * src/print_graph.c (print_graph): Adjust.
12451
12452 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12453 and Paul Eggert <eggert@twinsun.com>
12454
12455 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12456 Table of Symbols): Document %default-prec.
12457 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12458 (grammar_declaration): Set default_prec on %default-prec.
12459 * src/scan-gram.l (%default-prec): New token.
12460 * src/reader.h (default_prec): New flag.
12461 * src/reader.c: Likewise.
12462 (packgram): Handle it.
12463 * tests/conflicts.at (%default-prec without %prec,
12464 %default-prec with %prec, %default-prec 1): New tests.
12465
12466 2003-09-30 Paul Eggert <eggert@twinsun.com>
12467
12468 * tests/testsuite.at: Include local.at, not input.at, fixing
12469 a typo in the 2003-08-25 patch.
12470
12471 2003-08-27 Akim Demaille <akim@epita.fr>
12472
12473 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12474 GCC warnings.
12475
12476 2003-08-26 Akim Demaille <akim@epita.fr>
12477
12478 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12479 "<\#" to avoid magic from Gnus when posting parts of this script.
12480
12481 2003-08-26 Akim Demaille <akim@epita.fr>
12482
12483 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12484 (Parser::parse): here.
12485 Adjust: nerrs and errstatus is now replaced by...
12486 (Parser::nerrs_, Parser::errstatus_): New.
12487
12488 2003-08-25 Akim Demaille <akim@epita.fr>
12489
12490 * config/announce-gen, Makefile.cfg: New.
12491 * Makefile.am: Adjust.
12492 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12493 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12494
12495 2003-08-25 Akim Demaille <akim@epita.fr>
12496
12497 When reducing initial empty rules, Bison parser read an initial
12498 location that is not defined. This results in garbage, and that
12499 affects Bison's own parser. Therefore we need (i) to extend Bison
12500 to support a means to initialize this location, and (ii) to use
12501 this CVS Bison to fix CVS Bison's parser.
12502
12503 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12504 with...
12505 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12506 * src/parse-gram.y: Adjust.
12507 (%initial-action): New.
12508 (%error-verbose): Since we require CVS Bison, there is no reason
12509 not to use it.
12510 * src/scan-gram.l: Adjust.
12511 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12512 * data/yacc.c (yyparse): Use b4_initial_action.
12513
12514 2003-08-25 Akim Demaille <akim@epita.fr>
12515
12516 * doc/bison.texinfo: Don't promote stdout for error messages.
12517
12518 2003-08-25 Akim Demaille <akim@epita.fr>
12519
12520 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12521 From Alexandre Duret-Lutz.
12522
12523 2003-08-25 Akim Demaille <akim@epita.fr>
12524
12525 Version 1.875c.
12526
12527 2003-08-25 Akim Demaille <akim@epita.fr>
12528
12529 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12530 Use them.
12531
12532 2003-08-25 Akim Demaille <akim@epita.fr>
12533
12534 * data/lalr1.cc (Parser::reduce_print_): New.
12535 Use it.
12536
12537 2003-08-25 Akim Demaille <akim@epita.fr>
12538
12539 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12540 error recovery loops. This patch is based on
12541 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12542 Also, augment the similarity between lalr1.cc and yacc.c.
12543 Note: the locations of error recovery rules are not correct yet.
12544
12545 * data/lalr1.cc: Comment changes to augment the similarity between
12546 lalr1.cc and yacc.c.
12547 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12548 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12549 yyerrlab), when hitting EOF, pop the whole stack here instead of
12550 merely falling thru the default error handling mechanism.
12551 (yyerrorlab): New label, with the old contents of YYERROR,
12552 plus the following change: pop the stack of rhs corresponding
12553 to the production that invoked YYERROR. That is how Yacc
12554 behaves (required by POSIX).
12555 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12556 fail.
12557
12558 2003-08-25 Akim Demaille <akim@epita.fr>
12559
12560 Tune local.at so that people can "autom4te -l autotest calc.at -o
12561 calc" for instance, to extract a sub test suite.
12562
12563 * tests/testsuite.at: Move the initialization, Autotest version
12564 requirement, and AT_TESTED invocation into...
12565 * tests/local.at: here.
12566 * tests/testsuite.at: Include it for compatibility with Autoconf
12567 2.57.
12568 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12569 be ignore.
12570
12571 2003-08-04 Paul Eggert <eggert@twinsun.com>
12572
12573 Rework code slightly to avoid gcc -Wtraditional warnings.
12574 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12575 The returned value is now stored in *YY0. All callers changed.
12576 * src/output.c (merge_output): Adjust to the above change.
12577
12578 2003-07-26 Paul Eggert <eggert@twinsun.com>
12579
12580 * data/glr.c (YYASSERT): New macro.
12581 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12582 yyresolveStates, yyprocessOneStack):
12583 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12584 Derived from a suggestion by Frank Heckenbach.
12585
12586 2003-07-25 Paul Eggert <eggert@twinsun.com>
12587
12588 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12589 for portability to K&R C (after ansi2knr, presumably). See
12590 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12591 by Frank Heckenbach, though I have omitted the structure-initialization
12592 part of his glr-knr.diff patch since I recall that the Portable
12593 C Compiler didn't require that change.
12594
12595 Let the user specify how to allocate and free memory.
12596 Derived from a suggestion by Frank Heckenbach in
12597 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12598 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12599 All uses of free, malloc, realloc changed to use these macros,
12600 and unnecessary casts removed.
12601 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12602
12603 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12604
12605 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12606 use s.empty() rather than s == "" to test for empty string; see
12607 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12608 (trivial change)
12609
12610 2003-06-25 Akim Demaille <akim@epita.fr>
12611
12612 * config/depcomp, config/install-sh: Update from masters.
12613
12614 2003-06-20 Paul Eggert <eggert@twinsun.com>
12615
12616 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12617 and return properly parenthesized result.
12618 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12619 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12620 Remove unnecessary parentheses from uses.
12621 * doc/bison.texinfo (Location Default Action): Describe the
12622 conventions for parentheses.
12623
12624 2003-06-19 Paul Eggert <eggert@twinsun.com>
12625
12626 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12627 yyreportTree): Do not assume that size_t is the same width as int,
12628 when printing sizes. Print sizes using an unsigned format.
12629 Problem reported by Frank Heckenbach in
12630 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12631
12632 Port to Forte Developer 7 C compiler.
12633 * data/glr.c (struct YYLTYPE): If locations are not being used,
12634 declare a single dummy member, as empty structs do not conform
12635 to the C standard.
12636 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12637 the Forte Developer 7 C compiler complains that end-of-loop
12638 code is not reached.
12639
12640 2003-06-17 Paul Eggert <eggert@twinsun.com>
12641
12642 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12643 avoid warnings from picky compilers about redefinition of PARAMS.
12644
12645 2003-06-17 Paul Eggert <eggert@twinsun.com>
12646
12647 Version 1.875b.
12648
12649 * NEWS: Document 1.875b.
12650
12651 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12652 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12653 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12654 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12655 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12656 per recent gettext manual's suggestion.
12657 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12658 Use prototypes, not old-style definitions.
12659 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12660 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12661 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12662 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12663 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12664 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12665 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12666 vbitset_or_and_cmp, vbitset_copy): Likewise.
12667
12668 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12669 Do not include <stdlib.h>.
12670 (PARAMS): Define unconditionally for C89.
12671 (ATTRIBUTE_NORETURN): Remove.
12672 (ATTRIBUTE_UNUSED): Define unconditionally.
12673
12674 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12675 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12676 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12677 * lib/vbitset.c, lib/vbitset.h: New files.
12678 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12679 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12680 from libbitset.
12681
12682 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12683 `How Can I Reset @code{yyparse}', since texinfo does not allow
12684 arbitrary @ in node names.
12685
12686 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12687 shouldn't be needed according to the gettext 0.12.1 documentation
12688 but which seem to be needed anyway: codeset.m4 glibc21.m4
12689 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12690 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12691 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12692
12693 * lib/.cvsignore: Add stdbool.h.
12694 * m4/.cvsignore: Add nls.m4, po.m4.
12695
12696 Upgrade to CVS gnulib.
12697 * stdbool_.h: File renamed from stdbool.h.in.
12698 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12699 AC_HEADER_STDBOOL.
12700 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12701 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12702 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12703 (MOSTLYCLEANFILES): New var.
12704 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12705 (stdbool.h): New rule.
12706 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12707 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12708 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12709 m4/quote.m4: Upgrade to today's gnulib.
12710
12711 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12712 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12713 the tests right now.
12714 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12715 yyerror are declared before use; C99 requires this.
12716
12717 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12718
12719 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12720 first.
12721 (yyrecoverSyntaxError): Correct the logic for setting and testing
12722 yyerrState.
12723 Correct comment on handling EOF.
12724 Allow states with only a default reduction, rather than failing
12725 (I can't quite reconstruct why these were not allowed before).
12726
12727 Fixes to avoid problem that $-N rules in GLR parsers can cause
12728 buffer overruns, corrupting state.
12729
12730 * src/output.c (prepare_rules): Output max_left_semantic_context
12731 definition.
12732 * src/reader.h (max_left_semantic_context): New variable declaration.
12733 * src/scan-gram.l (max_left_semantic_context): Define.
12734 (handle_action_dollar): Update max_left_semantic_context.
12735 * data/glr.c (YYMAXLEFT): New definition.
12736 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12737 (yyresolveAction): Ditto.
12738
12739 Fixes to problems with location handling in GLR parsers reported by
12740 Frank Heckenbach (2003/06/05).
12741
12742 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12743 (YYRHSLOC): Add parentheses, and define only if locations used.
12744 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12745 locations not used.
12746 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12747 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12748
12749 * tests/cxx-type.at: Exercise location information; update tests
12750 to differentiate output with and without locations.
12751 Remove forward declarations of yylex and yyerror---caused errors
12752 because default YYLTYPE not yet defined.
12753 Change semantic actions to compute strings, rather than printing
12754 them directly (to test proper passing of semantics values). Change
12755 output to prefix notation and update test data and expected results.
12756 (yylex): Track locations.
12757 (stmtMerge): Return value rather than printing, and include arguments
12758 in value.
12759
12760 2003-06-03 Paul Eggert <eggert@twinsun.com>
12761
12762 Avoid warnings generated by GCC 2.95.4 when Bison is
12763 configured with --enable-gcc-warnings.
12764 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12765 yy::]b4_parser_class_name[::translate_,
12766 yy::Stack::operator[] (unsigned),
12767 yy::Stack::operator[] (unsigned) const,
12768 yy::Slice::operator[] (unsigned),
12769 yy::Slice::operator[] (unsigned) const):
12770 Rename local vars to avoid warnings.
12771 * tests/glr-regression.at (Improper handling of embedded actions
12772 and $-N in GLR parsers): Remove unused local variable from yylex.
12773 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12774 (void) as arg when not pure, since we now assume C89 when building
12775 Bison. Pacify GCC by using parameter.
12776
12777 2003-06-02 Paul Eggert <eggert@twinsun.com>
12778
12779 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12780 yy::Location::lines, yy::Location::columns): Rename arguments
12781 to avoid shadowing; this removes a warning generated by GCC 3.3.
12782
12783 2003-06-01 Paul Eggert <eggert@twinsun.com>
12784
12785 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12786 to g++, as GCC 3.3 complains if you do it.
12787 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12788 everything that WARNING_CFLAGS has, except omit warnings
12789 not suitable for C++.
12790 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12791 * tests/atlocal.in (CXXFLAGS): New var.
12792 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12793
12794 Fix a GLR parser bug I reported in February; see
12795 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12796 The problem was that GLR parsers did not conform to the C standard,
12797 because actions like { $1 = $2 + $3; } expanded to expressions
12798 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12799 to a local variable. The C standard says that expressions
12800 like (var = f ()) + (var = f ()) have undefined behavior.
12801 Another problem was that GCC sometimes issues warnings that
12802 yyfill and its parameters are unused.
12803
12804 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12805 as possibly unused.
12806 (yyfill): New function.
12807 (YYFILL): Use it.
12808 (yyuserAction): Change type of yynormal to bool, so that it matches
12809 the new yyfill signature. Mark it as possibly unused.
12810
12811
12812 Follow up on a bug I reported in February, where a Bison-generated
12813 parser can loop. Provide a test case and a fix for yacc.c. I
12814 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12815 The original bug report is in:
12816 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12817
12818 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12819 macro's size was becoming unwieldy.
12820 (yyerrlab): Do not discard an empty lookahead symbol, as this
12821 might destroy garbage.
12822 (yyerrorlab): New label, with the old contents of YYERROR,
12823 plus the following change: pop the stack of rhs corresponding
12824 to the production that invoked YYERROR. That is how Yacc
12825 behaves, and POSIX requires this behavior.
12826 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12827 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12828 Define 'alarm' to do nothing if unistd.h is not available.
12829 Add a new rule "exp: '-' error;" to test the above change to
12830 data/yacc.c. Use 'alarm' to abort any test taking longer than
12831 10 seconds, as it's probably looping.
12832 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12833 Also, the new yacc.c generates two fewer diagnostics for an
12834 existing test.
12835
12836 2003-05-24 Paul Eggert <eggert@twinsun.com>
12837
12838 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12839 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12840 This fixes a problem reported by John Bowman when the Compaq/HP
12841 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12842 -ansi -Wall -gall).
12843 * data/yacc.c (union yyalloc): Likewise.
12844 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12845
12846 Switch from 'int' to 'bool' where that makes sense.
12847
12848 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12849 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12850 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12851 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12852 Return or accept bool, not int. All callers changed.
12853 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12854 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12855 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12856 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12857 bitset_or_and_cmp_): Likewise.
12858 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12859 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12860 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12861 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12862 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12863 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12864 bitset_stats_or_and_cmp): Likewise.
12865 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12866 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12867 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12868 ebitset_xor_cmp): Likewise.
12869 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12870 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12871 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12872 lbitset_xor_cmp): Likewise.
12873 * lib/bbitset.h: Include <stdbool.h>.
12874 (struct bitset_vtable): The following members now return bool, not
12875 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12876 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12877 or_and_cmp).
12878 * src/conflicts.c (count_rr_conflicts): Likewise.
12879 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12880 All uses changed.
12881 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12882 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12883 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12884 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12885 graph_flag): Likewise.
12886 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12887 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12888 graph_flag): Likewise.
12889 * src/output.c (error_verbose): Likewise.
12890 * src/output.h (error_verbose): Likewise.
12891 * src/reader.c (start_flag, typed): Likewise.
12892 * src/reader.h (typed): Likewise.
12893 * src/getargs.c (LOCATIONS_OPTION): New constant.
12894 (long_options, getargs): Use it.
12895 * src/lalr.c (build_relations): Use bool, not int.
12896 * src/nullable.c (nullable_compute): Likewise.
12897 * src/print.c (print_reductions): Likewise.
12898 * src/tables.c (action_row, pack_vector): Likewise.
12899 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12900 * src/output.c (prepare): Use it.
12901 * src/output.c (token_definitions_output,
12902 symbol_destructors_output, symbol_destructors_output): Use string,
12903 not boolean integer, to keep track of whether to output separator.
12904 * src/print_graph.c (print_core): Likewise.
12905 * src/state.c (state_rule_lookaheads_print): Likewise.
12906
12907 * config/install-sh: Sync from automake 1.7.5.
12908
12909 2003-05-14 Paul Eggert <eggert@twinsun.com>
12910
12911 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12912 semicolon after a grammar declaration, in the interest of possible
12913 future changes to the Bison input language.
12914 Do not allow a stray semicolon at the start of the grammar.
12915 (rhses.1): Allow one or more semicolons after any rule, including
12916 just before "|" as required by POSIX.
12917 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12918 grammar.
12919
12920 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12921
12922 %parse-param support for lalr1.cc.
12923
12924 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12925 b4_cc_constructor_calls, b4_cc_constructor_call,
12926 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12927 definitions.
12928 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12929 parse-param arguments.
12930 (yy::b4_parser_class_name): Declare instance variables to
12931 hold parse-param arguments.
12932 * tests/calc.at: s/value/semantic_value/ because value clashes
12933 with a member of yy::b4_parser_class_name. Adjust C++ code
12934 to handle %parse-param. Enable %parse-param test in C++.
12935
12936 2003-05-12 Paul Eggert <eggert@twinsun.com>
12937
12938 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12939 English a bit. Fix fclose typo. Change "const char" to "char
12940 const", and use ANSI C rather than K&R for "main". Suggest
12941 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12942 and suggest yy_switch_to_buffer.
12943
12944 2003-05-05 Paul Eggert <eggert@twinsun.com>
12945
12946 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12947 C89. This avoids a diagnostic on compilers that define __STDC__
12948 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12949 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12950
12951 2003-05-03 Paul Eggert <eggert@twinsun.com>
12952
12953 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12954 Do not overrun array bounds.
12955 This should fix a bug reported today by Olatunji Oluwabukunmi in
12956 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12957
12958 2003-04-29 Akim Demaille <akim@epita.fr>
12959
12960 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12961 * src/getargs.c, src/getargs.h: here, as bool, not int.
12962 (nondeterministic_parser): New.
12963 * src/parse-gram.y, src/scan-gram.l: Support
12964 %nondeterministic-parser.
12965 * src/output.c (prepare): Use nondeterministic_parser instead
12966 of glr_parser where appropriate.
12967 * src/tables.c (conflict_row, action_row, save_row)
12968 (token_actions, token_actions, pack_vector): Ditto.
12969
12970 2003-04-29 Akim Demaille <akim@epita.fr>
12971
12972 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12973
12974 2003-04-29 Akim Demaille <akim@epita.fr>
12975
12976 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12977 with %pure-parser and %locations to exercise the patch from Yakov
12978 Markovitch below.
12979
12980 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12981
12982 * data/yacc.c: (b4_lex_param): Corrected for the case where
12983 %lex-param is provided and %pure-parser isn't.
12984
12985 2003-04-27 Paul Eggert <eggert@twinsun.com>
12986
12987 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12988 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12989 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12990 if it is not defined.
12991 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12992
12993 2003-04-26 Paul Eggert <eggert@twinsun.com>
12994
12995 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12996 Declare to be of type suitable for the ninf value itself, not of
12997 type suitable for the corresponding table, since the latter might
12998 be unsigned but the ninf value might be negative. This fixes a
12999 bug reported by Alexandre Duret-Lutz in
13000 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13001
13002 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13003 invokes it. We shouldn't invoke it twice because it will attempt
13004 to put error.o in the archive twice. This fixes a glitch reported
13005 by Martin Mokrejs in
13006 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13007
13008 2003-04-21 Paul Eggert <eggert@twinsun.com>
13009
13010 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13011 to gnulib.
13012
13013 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13014
13015 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13016 Fix obvious typo that results in uncompilable GLR parsers
13017 when both %pure-parser and %locations are used. (trivial change)
13018
13019 2003-04-17 Paul Eggert <eggert@twinsun.com>
13020
13021 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13022 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13023 Do not insert the expected token via unput, as this runs afoul
13024 of a POSIX-compatibility bug in flex 2.5.31.
13025 All uses changed to BEGIN the parent state,
13026 since we no longer insert the expected token via unput.
13027 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13028 that is no longer emitted after the above change.
13029
13030 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13031 the first one. This change is from Paul Hilfinger, and it fixes
13032 regression reported by Werner Lemberg in
13033 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13034
13035 (resolve_sr_conflict): Don't invoke state_errs_set
13036 unless one or more tokens have been explicitly made errors.
13037 Otherwise, the above change causes Bison to abort.
13038
13039 * tests/existing.at (GNU pic Grammar): New test case, taken from
13040 Lemberg's email.
13041
13042 2003-03-31 Akim Demaille <akim@epita.fr>
13043
13044 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13045
13046 2003-03-31 Akim Demaille <akim@epita.fr>
13047
13048 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13049 output.
13050
13051 2003-03-31 Akim Demaille <akim@epita.fr>
13052
13053 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13054 From Paul Hilfinger.
13055
13056 2003-03-29 Akim Demaille <akim@epita.fr>
13057
13058 * m4/error.m4: Do not put under dynamic conditions some code which
13059 expansion is under static control.
13060
13061 2003-03-29 Akim Demaille <akim@epita.fr>
13062
13063 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13064
13065 2003-03-29 Akim Demaille <akim@epita.fr>
13066
13067 * doc/bison.texinfo (Strings are Destroyed): New.
13068
13069 2003-03-13 Paul Eggert <eggert@twinsun.com>
13070
13071 * .cvsignore: Add configure.lineno.
13072 * src/.cvsignore: Add yacc.
13073 * tests/.cvsignore: Add testsuite.log.
13074 * doc/fdl.texi: Sync with latest FSF version.
13075
13076 2003-03-12 Paul Eggert <eggert@twinsun.com>
13077
13078 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13079 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13080 cursor, instead of leaving it undefined. This fixes a bug
13081 reported by Tim Van Holder in
13082 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13083 * tests/input.at (Torturing the Scanner): Test the scanner on
13084 an empty input file, which was Tim Van Holder's test case.
13085
13086 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13087 <sys/resource.h> can be included, include sys/time.h and
13088 sys/times.h first, if available. This works around the SunOS
13089 4.1.4 porting bug reported by Bruce Becker in
13090 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13091
13092 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13093 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13094 AC_HEADER_SYS_WAIT.
13095
13096 Merge changes from gnulib. This was prompted because the CVS
13097 snapshot didn't build on Solaris 7 due to strnlen problems.
13098
13099 These changes need to be merged back into gnulib:
13100 * lib/hash.c: Include <stdbool.h> unconditionally.
13101 * m4/onceonly.m4 (m4_quote): New macro.
13102 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13103 Quote AC_FOREACH variable-expansions properly.
13104 The 2003-01-03 obstack.h change also needs merging.
13105 {end of changes requiring merging}
13106
13107 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13108 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13109 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13110 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13111 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13112 New files, imported from gnulib.
13113 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13114 above.
13115
13116 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13117 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13118 gnulib sources.
13119
13120 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13121 Add.
13122 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13123 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13124 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13125 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13126 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13127 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13128 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13129 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13130 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13131 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13132 (jm_PREREQ_ARGMATCH): Remove.
13133 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13134 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13135
13136 * src/system.h: Include <stdbool.h> unconditionally.
13137
13138 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13139 assuming at least C89 in the bitset code for some time now.
13140
13141 2003-03-03 Akim Demaille <akim@epita.fr>
13142
13143 * ro.po: New.
13144
13145 2003-03-02 Akim Demaille <akim@epita.fr>
13146
13147 * doc/bison.texinfo (Table of Symbols): Reactivate the
13148 documentation for %lex-param, and %parse-param.
13149
13150 2003-03-02 Akim Demaille <akim@epita.fr>
13151
13152 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13153 generate verbose error messages.
13154 Use the number of tokens as an upper bound in yytname, as it
13155 cannot be a non terminal.
13156
13157 2003-03-02 Akim Demaille <akim@epita.fr>
13158
13159 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13160 message.
13161
13162 2003-03-02 Akim Demaille <akim@epita.fr>
13163
13164 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13165 Use them to exercise yycheck overrun.
13166 Based on Andrew Suffield's grammar.
13167
13168 2003-03-02 Akim Demaille <akim@epita.fr>
13169
13170 Create tests/local.at for Bison generic testing macros.
13171
13172 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13173 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13174 This new file.
13175 * tests/calc.at (AT_CHECK_CALC): Adjust.
13176 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13177 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13178 * tests/local.at: here.
13179 (AT_COMPILE_CXX): Tags the tests using it as c++.
13180 Ignore the test if CXX is not functional.
13181
13182 2003-03-01 Paul Eggert <eggert@twinsun.com>
13183
13184 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13185 not loc->end, since loc->end might contain garbage and this leads
13186 to undefined behavior on some platforms.
13187 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13188 depend on *loc, so that the reader doesn't give the the false
13189 impression that *loc is initialized.
13190 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13191 does not survive the return.
13192
13193 2003-03-01 Akim Demaille <akim@epita.fr>
13194
13195 * src/scan-gram.l (code_start): Always initialize it when entering
13196 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13197 yylex invocation. An alternative would be making it static, but
13198 then it starts with the second %%'s beginning, instead of its end.
13199
13200 2003-02-28 Paul Eggert <eggert@twinsun.com>
13201
13202 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13203 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13204 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13205
13206 2003-02-26 Paul Eggert <eggert@twinsun.com>
13207
13208 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13209 Remove Sequent/Pyramid discussion (nobody uses them any more).
13210 Merge VMS and MS-DOS discussion; these ports may well be dead
13211 but let's keep mentioning them for now. Put <> around email
13212 addresses. Add copyright notice.
13213
13214 2003-02-24 Paul Eggert <eggert@twinsun.com>
13215
13216 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13217 to avoid collision with flex use of yylineno.
13218 Problem reported by Bruce Lilly in
13219 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13220 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13221 * data/yacc.c (yy_reduce_print): Likewise.
13222
13223 * config/depcomp: Sync with Automake 1.7.3.
13224
13225 2003-02-21 Akim Demaille <akim@epita.fr>
13226
13227 * data/lalr1.cc: Use temporary variables instead of casts to
13228 change integer types.
13229 Suggested by Paul Eggert.
13230
13231 2003-02-21 Akim Demaille <akim@epita.fr>
13232
13233 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13234 to avoid confusions with lalr1.cc's notion of Position.
13235 Suggested by Paul Eggert.
13236
13237 2003-02-20 Akim Demaille <akim@epita.fr>
13238
13239 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13240 before initial_columns.
13241 (location.hh): Use consistent variable names when defining the
13242 operator<<.
13243 Use "last" so that we subtract from Positions, not from unsigned.
13244
13245 2003-02-20 Akim Demaille <akim@epita.fr>
13246
13247 * data/lalr1.cc (position.hh): New subfile, including the extended
13248 and Doxygen'ed documentation of class Position.
13249 (location.hh): Use it.
13250 Document a` la Doxygen.
13251 With the help of Benoit Perrot.
13252
13253 2003-02-20 Akim Demaille <akim@epita.fr>
13254
13255 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13256 AT_YACC_IF.
13257 Redefine AT_YYERROR_SEES_LOC_IF using it.
13258 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13259 not defined.
13260 Don't use the location in yy::Parser::error_ and
13261 yy::Parser::print_ when not %locations.
13262 Activate more lalr1.cc tests.
13263
13264 2003-02-19 Akim Demaille <akim@epita.fr>
13265
13266 * data/lalr1.cc: When displaying a line number, be sure to make it
13267 an int.
13268
13269 2003-02-19 Akim Demaille <akim@epita.fr>
13270
13271 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13272 Remove, useless.
13273 (YYABORT, YYACCEPT, YYERROR): New.
13274 * tests/calc.at: Renable the lalr1.cc test.
13275
13276 2003-02-19 Akim Demaille <akim@epita.fr>
13277
13278 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13279 error recovery, mixing with/without pops and discarding of the
13280 lookahead.
13281 Exercise YYERROR.
13282 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13283
13284 2003-02-17 Paul Eggert <eggert@twinsun.com>
13285
13286 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13287 * tests/testsuite.at (AT_COMPILE): Use them.
13288 This fixes the testsuite problem reported by Robert Lentz in
13289 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13290
13291 2003-02-12 Paul Eggert <eggert@twinsun.com>
13292
13293 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13294 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13295 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13296 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13297 Check for malloc failure, for consistency with yacc.c.
13298 (yytname_size): Remove, for consistency with yacc.c.
13299
13300 The bug still remains in data/lalr1.cc, as I didn't have time
13301 to fix it there.
13302
13303 2003-02-06 Akim Demaille <akim@epita.fr>
13304
13305 * configure.ac (GXX): Rename as...
13306 (CXX): this, to keep the original Autoconf semantics.
13307 Require 2.57.
13308 * data/lalr1.cc: Fix b4_copyright invocations.
13309 If YYDEBUG is not defined, don't depend upon name_ being defined.
13310 (location.hh): Include string and iostream.
13311 (Position::filename): New member.
13312 (Position::Position ()): New.
13313 (operator<< (Position)): New.
13314 (operator- (Position, int)): New.
13315 (Location::first, Location::last): Rename as...
13316 (Location::begin, Location::end): these, to mock the conventional
13317 iterator names.
13318 (operator<< (Location)): New.
13319 * tests/atlocal.in (CXX): New.
13320 * tests/testsuite.at (AT_COMPILE_CXX): New.
13321 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13322 locations in a more synthetic way.
13323 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13324 lalr1.cc is used.
13325 Adjust the C locations to match those from Emacs: first column is
13326 column 0.
13327 Change all the expected results.
13328 Conform to the GCS: simplify the locations when applicable.
13329 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13330 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13331 these CPP macros with the m4 macros new defined by...
13332 (AT_CHECK_PUSHDEFS): this, i.e.:
13333 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13334 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13335 New macros.
13336 (AT_CHECK_POPDEFS): Undefine them.
13337 (AT_CHECK_CALC_LALR1_CC): New.
13338 Use it for the first lalr1.cc test.
13339
13340 2003-02-04 Akim Demaille <akim@epita.fr>
13341
13342 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13343 Location as is defined.
13344
13345 2003-02-04 Akim Demaille <akim@epita.fr>
13346
13347 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13348 name_ being defined.
13349
13350 2003-02-03 Paul Eggert <eggert@twinsun.com>
13351
13352 * src/gram.h (start_symbol): Remove unused decl.
13353
13354 Use more-consistent naming conventions for local vars.
13355
13356 * src/derives.c (derives_compute): Change type of local var from
13357 int to rule_number.
13358 * src/gram.c (grammar_rules_partial_print): Likewise.
13359 * src/print.c (print_core): Likewise.
13360 * src/reduce.c (reduce_grammar_tables): Likewise.
13361
13362 * src/gram.c (grammar_dump): Change name of item_number *
13363 local var from r to rp.
13364 * src/nullable.c (nullable_compute): Likewise.
13365
13366 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13367
13368 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13369 for symbol or symbol_number var.
13370 * src/reader.c (grammar_start_symbol_set): Likewise.
13371 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13372 Likewise.
13373 * src/state.c (transitions_to): Likewise.
13374 * src/state.h: Likewise.
13375 * src/tables.c (symbol_number_to_vector_number): Likewise.
13376
13377 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13378 char * var.
13379
13380 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13381 var.
13382
13383 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13384 var.
13385
13386 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13387 Use str, not s, for char * var. Use ch, not c, for character var.
13388 Use size for size var.
13389
13390 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13391 char * var.
13392 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13393 uniqstr var.
13394 * src/uniqstr.h: Likewise.
13395
13396 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13397 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13398 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13399 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13400 param to have same name as that of enum, so that we don't use
13401 "s" to stand for a non-state.
13402
13403 2003-02-02 Akim Demaille <akim@epita.fr>
13404
13405 * src/scan-skel.l: Scan more than one inert character per yylex
13406 invocation.
13407
13408 2003-02-01 Paul Eggert <eggert@twinsun.com>
13409
13410 Version 1.875a.
13411
13412 * po/LINGUAS: Add ms.
13413
13414 2003-01-30 Akim Demaille <akim@epita.fr>
13415
13416 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13417
13418 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13419
13420 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13421 of $1.
13422
13423 Changes in response to error report by S. Eken: GLR mode does not
13424 handle negative $ indices or $ indices in embedded rules correctly.
13425 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13426
13427 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13428 (b4_rhs_location): Ditto.
13429 (yyfill): New function to copy from stack tree into array
13430 incrementally.
13431 (yyuserAction): Modify to allow incremental move of semantic values
13432 to rhs array when in GLR mode.
13433 Define YYFILL to use in user-defined actions to fill semantic array
13434 as needed.
13435 Remove dummy use of yystack, as there is now a guaranteed use.
13436 (yydoAction): Modify to allow incremental move of semantic values
13437 to rhs array when in GLR mode.
13438 (yyresolveAction): Ditto.
13439 (yyglrShiftDefer): Update comment.
13440 (yyresolveStates): Use X == NULL for pointers, not !X.
13441 (yyglrReduce): Ditto.
13442 (yydoAction): Ditto
13443
13444 * tests/glr-regr1.at: Rename to ...
13445 * tests/glr-regression.at: Add new regression test for the problems
13446 described above (adapted from S. Eken).
13447 Update copyright notice.
13448 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13449 * tests/Makefile.am: Ditto.
13450
13451 2003-01-28 Paul Eggert <eggert@twinsun.com>
13452
13453 * data/lalr1.cc: Do not use @output_header_name@ unless
13454 b4_defines_flag is set. This fixes two bugs reported by
13455 Tim Van Holder in
13456 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13457 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13458
13459 2003-01-21 Paul Eggert <eggert@twinsun.com>
13460
13461 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13462 we don't need to worry about yyerrlab1 being reported as an
13463 "unused label" by non-GCC C compilers. The downside is that if
13464 locations are used then a couple of statements are duplicated each
13465 time YYERROR is invoked, but the upside is that the warnings
13466 should vanish.
13467 (yyerrlab1): Move code to YERROR.
13468 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13469 This reverts some of the 2002-12-27 change.
13470
13471 2003-01-17 Paul Eggert <eggert@twinsun.com>
13472
13473 * src/output.c (symbol_printers_output): Fix typo that led
13474 to core dump. Problem reported by Antonio Rus in
13475 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13476
13477 2003-01-13 Akim Demaille <akim@epita.fr>,
13478 Quoc Peyrot <chojin@lrde.epita.fr>,
13479 Robert Anisko <anisko_r@lrde.epita.fr>
13480
13481 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13482 when the stacks contain one element, as the loop would otherwise
13483 free the last state, and then use the top state (the one we just
13484 popped). This means that the initial elements will not be freed
13485 explicitly, as is the case in yacc.c; it is not a problem, as
13486 these elements have fake values.
13487
13488 2003-01-11 Paul Eggert <eggert@twinsun.com>
13489
13490 * NEWS: %expect-violations are now just warnings, reverting
13491 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13492 bootstrapping problem reported by Matthias Klose; see
13493 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13494 * src/conflicts.c (conflicts_print): Likewise.
13495 * tests/conflicts.at (%expect not enough, %expect too much,
13496 %expect with reduce conflicts): Likewise.
13497 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13498 that the warning is enabled if the number of conflicts changes
13499 (not necessarily increases).
13500
13501 * src/getargs.c (version): Update copyright year.
13502
13503 2003-01-09 Akim Demaille <akim@epita.fr>
13504
13505 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13506
13507 2003-01-08 Paul Eggert <eggert@twinsun.com>
13508
13509 * Makefile.maint (WGETFLAGS):
13510 New macro, containing "-C off" to disable proxy caches.
13511 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13512 (rel-check): Use $(WGET) instead of wget.
13513
13514 2003-01-06 Paul Eggert <eggert@twinsun.com>
13515
13516 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13517 the GLR paper of Scott, Johnstone and Hussain.
13518
13519 2003-01-04 Paul Eggert <eggert@twinsun.com>
13520
13521 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13522 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13523 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13524 (EXTRA_LIBRARIES): New var, for liby.a.
13525 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13526 (EXTRA_SCRIPTS): New var, for yacc.
13527
13528 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13529 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13530 Problem reported by Nelson H. F. Beebe.
13531
13532 2003-01-03 Paul Eggert <eggert@twinsun.com>
13533
13534 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13535 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13536 when compiling Bison 1.875's `bitset bset = obstack_alloc
13537 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13538
13539 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13540 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13541 grow to a huge size with typical invocation.
13542
13543 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13544 Use the pattern recommended by Autoconf 2.57, except also protect
13545 against double-definition.
13546 * src/system.h: Likewise.
13547 Portability issues reported by Nelson H. F. Beebe.
13548
13549 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13550 All uses changed. Provide a definition in both C and C++.
13551 (yytrue, yyfalse): Define even if defined (__cplusplus).
13552
13553 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13554 Reported by Nelson H. F. Beebe.
13555
13556 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13557
13558 2003-01-02 Paul Eggert <eggert@twinsun.com>
13559
13560 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13561 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13562 Bug reported by Nelson H. F. Beebe.
13563
13564 2003-01-01 Paul Eggert <eggert@twinsun.com>
13565
13566 * Version 1.875.
13567
13568 2002-12-30 Paul Eggert <eggert@twinsun.com>
13569
13570 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13571 Moved here from...
13572 (<INITIAL>","): Here. This causes stray "," to be treated
13573 more uniformly.
13574
13575 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13576 last brace in braced code when not in Yacc mode, for compatibility
13577 with Bison 1.35. This resurrects the 2001-12-15 patch to
13578 src/reader.c.
13579
13580 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13581 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13582
13583 2002-12-28 Paul Eggert <eggert@twinsun.com>
13584
13585 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13586 that of SYM's type. This fixes Debian bug 168069, reported by
13587 Thomas Olsson.
13588
13589 2002-12-28 Paul Eggert <eggert@twinsun.com>
13590
13591 Version 1.75f.
13592
13593 Switch back to the Yacc style of conflict reports, undoing some
13594 of the 2002-07-30 change.
13595 * doc/bison.texinfo (Understanding): Use Yacc style for
13596 conflict reports. Also, use new way of locating rules.
13597 * src/conflicts.c (conflict_report):
13598 Renamed from conflict_report_yacc, removing the old
13599 'conflict_report'. Translate the entire conflict report at once,
13600 so that we don't assume that "," has the same interpretation in
13601 all languages.
13602 (conflicts_output): Use Yacc-style conflict report for each state,
13603 instead of our more-complicated style.
13604 (conflicts_print): Use Yacc-style conflict report, except print
13605 the input file name when not emulating Yacc.
13606 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13607 Conflicted Reduction, %expect not enough, %expect too much,
13608 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13609 * tests/existing.at (GNU Cim Grammar): Likewise.
13610 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13611
13612 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13613 fatal): Don't invoke fflush; it's not needed and it might even be
13614 harmful for stdout, as stdout might not be open.
13615 * src/reduce.c (reduce_print): Likewise.
13616
13617 2002-12-27 Paul Eggert <eggert@twinsun.com>
13618
13619 Fix a bug where error locations were not being recorded correctly.
13620 This problem was originally reported by Paul Hilfinger in
13621 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13622
13623 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13624 top of the location stack's error locations.
13625 (yyerrlab): Set it. When discarding a token, push its location
13626 onto yylerrsp so that we don't lose track of the error's end.
13627 (yyerrlab1): Now is only the target of YYERROR, so that we can
13628 properly record the location of the action that failed. For GCC
13629 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13630 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13631 (yyerrlab2): New label, which yyerrlab now falls through to.
13632 Compute the error's location by applying YYLLOC_DEFAULT to
13633 the locations of all the symbols that went into the error.
13634 * doc/bison.texinfo (Location Default Action): Mention that
13635 YYLLOC_DEFAULT is also invoked for syntax errors.
13636 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13637 Error locations include the locations of all the tokens that were
13638 discarded, not just the last token.
13639
13640 2002-12-26 Paul Eggert <eggert@twinsun.com>
13641
13642 * src/files.c: Include quote.h.
13643 (compute_output_file_names): Warn if we detect conflicting
13644 outputs to the same file. This should catch the misunderstanding
13645 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13646
13647 * src/conflicts.c (conflicts_print): If the user specifies
13648 "%expect N", report an error if there are any reduce/reduce
13649 conflicts. This is what the manual says should happen.
13650 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13651 * tests/conflicts.at (%expect with reduce conflicts): New test.
13652
13653 Don't use m4_include on relative file names, as it doesn't work as
13654 desired if there happens to be a file with that name under ".".
13655
13656 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13657 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13658 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13659 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13660 * src/output.c (output_skeleton): Use full path names when
13661 specifying a file to include; don't rely on include path, as
13662 it's unreliable when the working file contains a file with
13663 that name.
13664
13665 2002-12-25 Paul Eggert <eggert@twinsun.com>
13666
13667 Remove obsolete references to bison.simple and bison.hairy.
13668 Problem mentioned by Aubin Mahe in
13669 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13670 * data/glr.c: Comment fix.
13671 * doc/bison.1: Remove references. Also, mention "yacc".
13672
13673 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13674 with -g option.
13675
13676 * src/parse-gram.y (declaration): Use enum "report_states" rather
13677 than its numeric value 1.
13678
13679 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13680 opening a new one. This fixes Debian bug 165349, reported by
13681 Bruce Stephens.
13682
13683 2002-12-24 Paul Eggert <eggert@twinsun.com>
13684
13685 Version 1.75e.
13686
13687 * Makefile.maint (cvs-update): Don't assume that the shell
13688 supports $(...), as Solaris sh doesn't.
13689
13690 * src/parse-gram.y (lloc_default): Remove test for empty
13691 nonterminals at the end, since it didn't change the result.
13692
13693 2002-12-24 Paul Eggert <eggert@twinsun.com>
13694
13695 If the user does not define YYSTYPE as a macro, Bison now declares it
13696 using typedef instead of defining it as a macro. POSIX requires this.
13697 For consistency, YYLTYPE is also declared instead of defined.
13698
13699 %union directives can now have a tag before the `{', e.g., the
13700 directive `%union foo {...}' now generates the C code
13701 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13702 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13703 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13704 instead of `yyltype'.
13705
13706 `yystype' and `yyltype' are now obsolescent macros instead of being
13707 typedefs or tags; they are no longer documented and will be
13708 withdrawn in a future release.
13709
13710 * data/glr.c (b4_location_type): Remove.
13711 (YYSTYPE): Renamed from yystype.
13712 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13713 (struct YYLTYPE): Renamed from struct yyltype.
13714 (YYLTYPE): Renamed from yyltype.
13715 (yyltype, yystype): New (and obsolescent) macros,
13716 for backward compatibility.
13717 * data/yacc.c: Likewise.
13718
13719 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13720 does not specify a union tag. This is for compatibility with
13721 Solaris 9 yacc.
13722
13723 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13724 const *, since it is now modified by stripping surrounding { }.
13725 (current_braced_code): Remove.
13726 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13727 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13728 trailing " {...}". Now of type <chars>.
13729 (grammar_declaration): Adjust to bundled tokens.
13730 (code_content): Remove; stripping is now done by add_param.
13731 (print_token_value): Print contents of bundled tokens.
13732 (token_name): New function.
13733
13734 * src/reader.h (braced_code, current_braced_code): Remove.
13735 (token_name): New decl.
13736
13737 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13738 token_type, not braced_code code_kind. All uses changed.
13739 (SC_PRE_CODE): New state, for scanning after a keyword that
13740 has (or usually has) an immediately-following braced code.
13741 (token_type): New local var, to keep track of which token type
13742 to return when scanning braced code.
13743 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13744 <INITIAL>"%parse-param", <INITIAL>"%printer",
13745 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13746 instead of returning a token type immediately.
13747 (<INITIAL>"{"): Set token type.
13748 (<SC_BRACED_CODE>"}"): Use it.
13749 (handle_action_dollar, handle_action_at): Now returns bool
13750 indicating success. Fail if ! current_rule; this prevents a core dump.
13751 (handle_symbol_code_dollar, handle_symbol_code_at):
13752 Remove; merge body into caller.
13753 (handle_dollar, handle_at): Complain in invalid contexts.
13754
13755 * NEWS, doc/bison.texinfo: Document the above.
13756 * NEWS: Fix years and program names in copyright notice.
13757
13758 2002-12-17 Paul Eggert <eggert@twinsun.com>
13759
13760 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13761 Reporting, Table of Symbols): Omit mentions of %lex-param and
13762 %parse-param from the documentation for now.
13763
13764 2002-12-15 Paul Eggert <eggert@twinsun.com>
13765
13766 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13767 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13768 lookahead symbol, and which sets yychar in parser actions) and it
13769 disagreed with the Bison documentation. Bug
13770 reported by Andrew Walrond.
13771
13772 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13773 as the caller now does that.
13774 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13775 (YYEMPTY): Parenthesize right hand side, since others use it.
13776 (yyparse): Don't assume that our generated code is the only code
13777 that sets yychar.
13778
13779 2002-12-13 Paul Eggert <eggert@twinsun.com>
13780
13781 Version 1.75d.
13782
13783 POSIX requires a "yacc" command.
13784 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13785 (MOSTLYCLEANFILES): Add yacc.
13786 (yacc): New rule.
13787 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13788 as an alias for bison y.
13789
13790 * po/LINGUAS: Add da.
13791
13792 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13793 problem with latest <getopt.h>.
13794 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13795
13796 * doc/fdl.texi: Upgrade to 1.2.
13797 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13798 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13799 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13800 gnulib.
13801 * config/install-sh: Sync with autotools.
13802
13803 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13804 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13805 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13806 locations are requested.
13807 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13808 locations are requested.
13809
13810 2002-12-12 Paul Eggert <eggert@twinsun.com>
13811
13812 Remove unportable casts and storage allocation tricks.
13813 While we're at it, remove almost all casts, since they
13814 usually aren't needed and are a sign of trouble.
13815
13816 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13817
13818 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13819 the pointer DSET returned by malloc; this isn't portable.
13820 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13821 Similarly for DERIVES.
13822 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13823 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13824 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13825
13826 * src/derives.c (derives_compute): Do not bother invoking
13827 int_of_rule_number, since rule numbers are integers.
13828
13829 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13830 rather than XMALLOC (char, N).
13831
13832 * src/files.c (filename_split): Rewrite to avoid cast.
13833
13834 * src/gram.h (symbol_number_as_item_number,
13835 item_number_as_symbol_number, rule_number_as_item_number,
13836 item_number_as_rule_number):
13837 Now inline functions rather than macros, to avoid casts.
13838 * src/state.h (state_number_as_int): Likewise.
13839 * src/tables.c (state_number_to_vector_number,
13840 symbol_number_to_vector_number): Likewise.
13841
13842 * src/gram.h (int_of_rule_number): Remove; no longer used.
13843
13844 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13845 since the resulting storage is always stored into.
13846
13847 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13848 where it's needed.
13849
13850 * src/muscle_tab.c (muscle_m4_output):
13851 Now inline. Return bool, not int.
13852 * src/state.c (state_compare): Likewise.
13853 * src/symtab.c (symbol_check_defined,
13854 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13855 hash_compare_symbol, hash_symbol):
13856 Likewise.
13857 * src/uniqstr.c (uniqstr_print): Likewise.
13858 * src/muscle_tab.c (muscle_m4_output_processor):
13859 New function, to avoid casts.
13860 * src/state.c (state_comparator, stage_hasher): Likewise.
13861 * src/symtab.c (symbol_check_defined_processor,
13862 symbol_check_alias_consistency_processor, symbol_pack_processor,
13863 symbol_translation_processor, hash_symbol_comparator,
13864 hash_symbol_hasher): Likewise.
13865 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13866 * src/muscle_tab.c (muscles_m4_output):
13867 Use new functions instead of casting old functions unportably.
13868 * src/state.c (state_hash_new): Likewise.
13869 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13870 symbols_token_translations_init):
13871 Likewise.
13872 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13873
13874 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13875 var instead of casting to long, to avoid casts.
13876 (prepare_states): Use MALLOC rather than alloca, so that we don't
13877 have to worry about alloca.
13878 * src/state.c (state_hash_lookup): Likewise.
13879
13880 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13881 local var instead of casting to unsigned char, to avoid casts.
13882
13883 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13884 STATE_ALLOC): Remove.
13885 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13886 rather than calloc, and use offsetof to avoid allocating slightly
13887 too much storage.
13888 (state_new): Initialize all members.
13889
13890 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13891
13892 * src/symtab.c (symbol_free): Remove; unused.
13893 (symbol_get): Remove cast in lhs of assignment.
13894 (symbols_do): Now static. Accept generic arguments, not
13895 hashing-related ones.
13896
13897 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13898 (symbol_processor): Remove.
13899 (symbols_do): Remove decl; now static.
13900
13901 * src/system.h (alloca): Remove; decl no longer needed.
13902 (<stddef.h>): Include, for offsetof.
13903 (<inttypes.>, <stdint.h>): Include if available.
13904 (uintptr_t): New type, if system lacks it.
13905 (CALLOC, MALLOC, REALLOC): New macros.
13906 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13907 new macros.
13908
13909 * src/tables.c (table_size): Now int, to pacify GCC.
13910 (table_grow, table_ninf_remap): Use signed table size.
13911 (save_row): Don't bother initializing locals when not needed.
13912 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13913 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13914
13915 * src/vcg.h: Correct misspellings.
13916
13917 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13918
13919
13920 * src/getargs.c (getargs): Don't assume EOF == -1.
13921
13922 2002-12-09 Paul Eggert <eggert@twinsun.com>
13923
13924 Change identifier spellings to avoid collisions with names
13925 that are reserved by POSIX.
13926
13927 Don't use names ending in _t, since POSIX reserves them.
13928 For consistency, remove _e and _s endings -- they're weren't
13929 needed to remove ambiguity. All uses changed.
13930 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13931 turn was just renamed from struniq_t.
13932 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13933 which in turn was just renamed from struniq_processor_t.
13934 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13935 in turn was renamed from hash_compare_struniq_t.
13936 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13937 (state_list): Renamed from state_list_t.
13938 * src/assoc.h (assoc): Renamed from assoc_t.
13939 * src/conflicts.c (enum conflict_resolution): Renamed from
13940 enum conflict_resolution_e.
13941 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13942 (rule_list): Renamed from rule_list_t.
13943 * src/getargs.h (enum trace): Renamed from enum trace_e.
13944 (enum report): Renamed from enum report_e.
13945 * src/gram.h (item_number): Renamed from item_number_t.
13946 (rule_number): Renamed from rule_number_t.
13947 (struct rule_s): Remove the "rule_s" part; not used.
13948 (rule): Renamed from rule_t.
13949 (rule_filter): Renamed from rule_filter_t.
13950 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13951 (goto_list): Renamed from goto_list_t.
13952 * src/lalr.h (goto_number): Renamed from goto_number_t.
13953 * src/location.h (location): Renamed from location_t.
13954 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13955 and moved here from:
13956 * src/muscle_tab.h (muscle_entry_t): here.
13957 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13958 (rule_list): Renamed from rule_list_t.
13959 * src/print_graph.c (static_graph): Renamed from graph.
13960 * src/reader.h (braced_code): Renamed from braced_code_t.
13961 Remove brace_code_e tag.
13962 * src/relation.h (relation_node): Renamed from relation_node_t.
13963 (relation_nodes): Renamed from relation_nodes_t.
13964 (relation): Renamed from relation_t.
13965 * src/state.h (state_number): Renamed from state_number_t.
13966 (struct state): Renamed from struct state_s.
13967 (state): Renamed from state_t.
13968 (transitions): Renamed from transitions_t. Unused (and
13969 misspelled) transtion_s tag removed.
13970 (errs): Renamed from errs_t. Unused errs_s tag removed.
13971 (reductions): Renamed from reductions_t. Unused tag
13972 reductions_s removed.
13973 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13974 (struct symbol_list): Renamed from struct symbol_list_s.
13975 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13976 (struct symbol): Renamed from struct symbol_s.
13977 (symbol): Renamed from symbol_t.
13978 * src/tables.c (vector_number): Renamed from vector_number_t.
13979 (action_number): Renamed from action_t.
13980 * src/tables.h (base_number): Renamed from base_t.
13981 * src/vcg.h (enum color): Renamed from enum color_e.
13982 (enum textmode): Renamed from enum textmode_e.
13983 (enum shape): Renamed from enum shape_e.
13984 (struct colorentry): Renamed from struct colorentry_s.
13985 (struct classname): Renamed from struct classname_s.
13986 (struct infoname): Renamed from struct infoname_s.
13987 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13988 (enum decision): Renamed from enum decision_e.
13989 (enum orientation): Renamed from enum orientation_e.
13990 (enum alignment): Renamed from enum alignment_e.
13991 (enum arrow_mode): Renamed from enum arrow_mode_e.
13992 (enum crossing_type): Renamed from enum crossing_type_e.
13993 (enum view): Renamed from enum view_e.
13994 (struct node): Renamed from struct node_s.
13995 (node): Renamed from node_t.
13996 (enum linestyle): Renamed from enum linestyle_e.
13997 (enum arrowstyle): Renamed from enum arrowstyle_e.
13998 (struct edge): Renamed from struct edge.
13999 (edge): Renamed from edge_t.
14000 (struct graph): Renamed from struct graph_s.
14001 (graph): Renamed from graph_t.
14002 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14003 Rename value_t -> value.
14004 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14005 value_t_as_yystype -> value_as_yystype.
14006
14007 Don't include <errno.h> in the mainstream code, since it
14008 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14009 * lib/get-errno.c, lib/get-errno.h: New files.
14010 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14011 get-errno.c.
14012 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14013 * src/output.c (output_skeleton): Likewise.
14014 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14015 instead of errno.
14016 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14017 Likewise.
14018 (handle_action_dollar, handle_action_at): Likewise.
14019 * src/system.h: Do not include <errno.h>.
14020 (TAB_EXT): Renamed from EXT_TAB.
14021 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14022
14023 Avoid str[a-z]*, since <string.h> reserves that name space.
14024 Change all instances of "struniq" in names to "uniqstr", and
14025 likewise for "STRUNIQ" and "UNIQSTR".
14026 * src/uniqstr.c: Renamed from src/struniq.c.
14027 * src/uniqstr.h: Renamed from src/struniq.h.
14028 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14029 * src/files.c (strsuffix): Remove; unused.
14030 (concat2): Renamed from stringappend. Now static.
14031 * src/files.h (strsuffix, stringappend): Remove; unused.
14032 * src/parse-gram.y (<chars>): Renamed from <string>.
14033 (<uniqstr>): Renamed from <struniq>.
14034 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14035 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14036 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14037 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14038 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14039 (N_EXPAND): Renamed from N_STRETCH.
14040
14041 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14042 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14043 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14044 Remove; unused.
14045 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14046 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14047 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14048 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14049 (BASE_MAXIMUM): Renamed from BASE_MAX.
14050 (BASE_MINIMUM): Renamed from BASE_MIN.
14051 (ACTION_MAX): Remove; unused.
14052 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14053 Unnecessary casts removed from above defines.
14054
14055
14056 Fix misspelling in names.
14057 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14058 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14059 G_NODE_ALIGNEMENT.
14060
14061
14062 * lib/timevar.c (timevar_report): Renamed from time_report,
14063 for consistency with other names.
14064 * lib/timevar.h (timevar_report): New decl.
14065 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14066
14067
14068 Sort include-file uses.
14069
14070 Reorder all include files under src to be in the order "system.h".
14071 then the ../lib include files in angle brackets (alphabetized),
14072 then the . include files in double-quotes (alphabetized). Fix
14073 dependency breakages encountered in this process, as follows:
14074 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14075 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14076 * src/state.h: Include "symtab.h".
14077
14078 2002-12-08 Paul Eggert <eggert@twinsun.com>
14079
14080 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14081 since this causes problems when __file__ contains character
14082 sequences like "@" that are treated specially by src/scan-skel.l.
14083 Instead, just use the file's basename. This fixes the bug
14084 reported by Martin Mokrejs in
14085 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14086
14087 2002-12-06 Paul Eggert <eggert@twinsun.com>
14088
14089 Add support for rules that do not have trailing semicolons, as
14090 POSIX requires. Improve the quality of locations in Bison
14091 diagnostics.
14092
14093 * src/location.c: Include <quotearg.h>.
14094 (empty_location): Now const.
14095 (location_print): New function. Follow the recommendation of the
14096 GNU Coding Standards for locations that span file boundaries.
14097 * src/location.h: Do not include <quotearg.h>; no longer needed.
14098 (boundary): New type.
14099 (location_t): Use it. This allows locations to span file boundaries.
14100 All member uses changed: file -> start.file or end.file (as needed),
14101 first_line -> start.line, first_column -> start.column,
14102 last_line -> end.line, last_column -> end.column.
14103 (equal_boundaries): New function.
14104 (LOCATION_RESET, LOCATION_STEP): Remove.
14105 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14106 (empty_location): Now const.
14107 (location_print): New decl.
14108 * src/parse-gram.y (lloc_default): New function, which handles
14109 empty locations more accurately.
14110 (YYLLOC_DEFAULT): Use it.
14111 (%token COLON): Remove.
14112 (%token ID_COLON): New token.
14113 (rules): Use it.
14114 (declarations, rules): Remove trailing semicolon.
14115 (declaration, rules_or_grammar_declaration):
14116 Allow empty (";") declaration.
14117 (symbol_def): Remove empty actions; no longer needed.
14118 (rules_or_grammar_declaration): Remove trailing semicolon.
14119 (semi_colon.opt): Remove.
14120 * src/reader.h: Include location.h.
14121 (scanner_cursor): New decl.
14122 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14123 rolling our own.
14124 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14125 of *loc.
14126 (STEP): Remove. No longer needed, now that adjust_location does
14127 the work. All uses removed.
14128 (scanner_cursor): New var.
14129 (adjust_location): Renamed from extend_location. It now sets
14130 *loc and adjusts the scanner cursor. All uses changed.
14131 Don't bother testing for CR.
14132 (handle_syncline): Remove location arg; now updates scanner cursor.
14133 All callers changed.
14134 (unexpected_end_of_file): Now accepts start boundary of token or
14135 comment, not location. All callers changed. Update scanner cursor,
14136 not the location.
14137 (SC_AFTER_IDENTIFIER): New state.
14138 (context_state): Renamed from c_context. All uses changed.
14139 (id_loc, code_start, token_start): New local vars.
14140 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14141 processing of Yacc white space and equivalents here.
14142 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14143 instead of returning ID immediately, since we need to search for
14144 a subsequent colon.
14145 (<INITIAL>"'", "\""): Save token_start.
14146 (<INITIAL>"%{", "{", "%%"): Save code_start.
14147 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14148 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14149 BEGIN context_state at end, not INITIAL.
14150 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14151 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14152 Return correct token start.
14153 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14154 the start of a character, string or multiline comment is found.
14155 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14156 Reduction): Adjust reported locations to match the more-precise
14157 results now expected.
14158 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14159 * tests/reduce.at (Useless Rules, Reduced Automaton,
14160 Underivable Rules): Likewise.
14161 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14162 or "|"' now that so many other tokens are allowed by the new grammar.
14163
14164 * src/complain.h (current_file): Remove duplicate decl;
14165 current_file is now owned by files.h.
14166 * src/complain.c, src/scan-gram.l: Include files.h.
14167
14168 2002-12-06 Paul Eggert <eggert@twinsun.com>
14169
14170 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14171 promotes to int; it might be unsigned int.
14172 * data/yacc.c (yy_reduce_print): Likewise.
14173
14174 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14175 be #defined in the prologue, not in the Bison declarations.
14176 This fixes Debian Bug 102878, reported by Shaul Karl.
14177
14178 2002-12-02 Paul Eggert <eggert@twinsun.com>
14179
14180 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14181 * lib/strtoul.c: New file, from gnulib.
14182 This fixes a porting bug reported by Peter Klein in
14183 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14184
14185 2002-11-30 Paul Eggert <eggert@twinsun.com>
14186
14187 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14188 and put only a forward declaration in the prologue. This is for
14189 consistency with the other scanner helper functions.
14190
14191 Type clashes now generate warnings, not errors, since it
14192 appears that POSIX may allow some grammars with type clashes.
14193 * src/reader.c (grammar_current_rule_check): Warn about
14194 type clashes instead of complaining.
14195 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14196
14197 Add Yacc library, since POSIX requires it.
14198 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14199 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14200 * lib/main.c, lib/yyerror.c: New files.
14201
14202 gram_error can be static; it need not be extern.
14203 * src/reader.h (gram_error): Remove decl.
14204 * src/parse-gram.y (gram_error): Now static. Add static decl.
14205 (print_token_value): Omit parameter names from forward decl,
14206 for consistency.
14207
14208 2002-11-29 Paul Eggert <eggert@twinsun.com>
14209
14210 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14211 be declared before being used. E.g., one should typically
14212 declare them in the prologue. Use GNU coding style in examples.
14213 Put "const" consistently after the type it modifies. Mention
14214 that C99 supports "inline". Mention that yyerror traditionally
14215 returns "int".
14216
14217 %parse-param and %lex-param now take just one argument, the
14218 declaration; the argument name is deduced from the declaration.
14219
14220 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14221 Reporting, Table of Symbols): Document this.
14222 * src/parse-gram.y (add_param): New function.
14223 (COMMA): Remove.
14224 (declaration): Implement new rule for %parse-param and %lex-param.
14225 * src/scan-gram.l: "," now elicits a warning, rather than being
14226 a token; this is more compatible with byacc.
14227 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14228
14229 2002-11-27 Paul Eggert <eggert@twinsun.com>
14230
14231 Rename identifiers to avoid real and potential collisions.
14232
14233 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14234 to avoid collision with lex macro described by Bruce Lilly in
14235 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14236 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14237 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14238 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14239 All uses changed.
14240 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14241 The name "yycontrol" violates the name space rules, and this stuff
14242 wasn't being used anyway.
14243 (input): Remove action; this stuff wasn't being used.
14244 (gram_error): Rename local variable yylloc -> loc.
14245 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14246 (YY_DECL): Don't use "yy" at start of local variables.
14247 All uses changed, e.g., yylloc -> loc.
14248 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14249 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14250 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14251 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14252
14253 * src/parse-gram.y (gram_error): loc is now const *.
14254 * src/reader.h (gram_error): Likewise.
14255
14256 2002-11-24 Paul Eggert <eggert@twinsun.com>
14257
14258 Version 1.75c.
14259
14260 * tests/actions.at (Actions after errors): Use an output format
14261 more similar to that of the Printers and Destructors test.
14262 Test the position of the ';' token too.
14263 (Printers and Destructors): Likewise.
14264 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14265 unnecessarily alarming people when the test fails.
14266
14267 * data/yacc.c (yyerrlab1): Move this label down, so that the
14268 parser does not discard the lookahead token if the user code
14269 invokes YYERROR. This change is required for POSIX conformance.
14270
14271 * lib/error.c: Sync with gnulib.
14272
14273 2002-11-22 Paul Eggert <eggert@twinsun.com>
14274
14275 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14276 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14277 * lib/xmalloc.c: Likewise.
14278
14279 2002-11-20 Paul Eggert <eggert@twinsun.com>
14280
14281 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14282
14283 2002-11-20 Paul Eggert <eggert@twinsun.com>
14284
14285 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14286 should use `if (! x) abort ();' rather than `assert (x);', and
14287 anyway it's one less thing to worry about configuring.
14288
14289 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14290 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14291 and replace all instances of assert with abort.
14292 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14293 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14294
14295 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14296 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14297 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14298 hash_find_entry, hash_rehash, hash_insert): Likewise.
14299 * src/conflicts.c (resolve_sr_conflict): Likewise.
14300 * src/lalr.c (set_goto_map, map_goto): Likewise.
14301 * src/nullable.c (nullable_compute): Likewise.
14302 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14303 * src/reader.c (packgram, reader): Likewise.
14304 * src/state.c (state_new, state_free, state_transitions_set,
14305 state_reduction_find): Likewise.
14306 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14307 symbol_pack): Likewise.
14308 * src/tables.c (conflict_row, pack_vector): Likewise.
14309 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14310 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14311 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14312 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14313
14314 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14315 (ARGMATCH_CONSTRAINT): New macro.
14316 (ARGMATCH_ASSERT): Use it.
14317
14318 * src/system.h (verify): New macro.
14319 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14320 rather than assert.
14321 * src/tables.c (tables_generate): Likewise.
14322
14323 * src/struniq.c (struniq_assert): Now returns void, and aborts
14324 if the assertion is false.
14325 (struniq_assert_p): Remove.
14326 * src/struniq.h: Likewise.
14327
14328 2002-11-18 Paul Eggert <eggert@twinsun.com>
14329
14330 * data/glr.c (yygetLRActions): Replace `yyindex' with
14331 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14332 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14333 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14334
14335 2002-11-18 Akim Demaille <akim@epita.fr>
14336
14337 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14338 space.
14339 From Tim Van Holder.
14340
14341 2002-11-17 Paul Eggert <eggert@twinsun.com>
14342
14343 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14344 to "SyntaxError" for consistency with my 2002-11-15 change.
14345
14346 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14347 not define to {}, since this breaks the common use of `YYDPRINTF
14348 ((...));' if a single statement is desired (e.g. before `else').
14349 Work around GCC warnings by surrounding corresponding calls with
14350 {} if needed.
14351 (yyhasResolvedValue): Remove unused function.
14352 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14353 loop body.
14354 (yyreportSyntaxError): Renamed from yyreportParseError.
14355 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14356 All uses changed.
14357 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14358 extern when possible. Remove unused initializations.
14359
14360 2002-11-16 Akim Demaille <akim@epita.fr>
14361
14362 Augment the similarity between GLR and LALR traces.
14363
14364 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14365 (YY_REDUCE_PRINT): New.
14366 (yyparse): Use them.
14367 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14368 YYDPRINT here.
14369 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14370 state reached after the reduction/recovery, since...
14371 (yyparse, yyprocessOneStack): Report the state we are entering in.
14372
14373 2002-11-16 Akim Demaille <akim@epita.fr>
14374
14375 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14376 Add support for --trace=skeleton.
14377 * src/scan-skel.l: %option debug.
14378 Scan strings of non-@ or \n instead of character by character.
14379 (scan_skel): Handle trace_skeleton.
14380 (QPUTS): New.
14381 (@output_parser_name@, @output_header_name@): ``Restore'' their
14382 support (used to be M4 macros).
14383 * data/yacc.c: Quote larger chunks, a la glr.c.
14384 * data/lalr1.cc: Likewise.
14385 The header guards are no longer available, so use some other
14386 string than `YYLSP_NEEDED'.
14387
14388 2002-11-16 Akim Demaille <akim@epita.fr>
14389
14390 Make the ``Printers and Destructors'' test more verbose, taking
14391 `yacc.c''s behavior as (possibly wrong) reference.
14392
14393 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14394 instead of fprint on stdout.
14395 Set and report the last_line of the symbols.
14396 Consistently display values and locations.
14397
14398 2002-11-16 Paul Eggert <eggert@twinsun.com>
14399
14400 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14401
14402 2002-11-15 Paul Eggert <eggert@twinsun.com>
14403
14404 * tests/actions.at (Actions after errors): New test case.
14405
14406 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14407 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14408 tests/action.at, tests/calc.at, tests/conflicts.at,
14409 tests/cxx-type.at, tests/regression.at:
14410 "parse error" -> "syntax error" for POSIX compatibility.
14411 "parsing stack overflow..." -> "parser stack overflow" so
14412 that code matches Bison documentation.
14413
14414 2002-11-15 Akim Demaille <akim@epita.fr>
14415
14416 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14417 take two BRACED_CODE, not two string_content.
14418 Free the scanner's obstack when we are done.
14419 (code_content): New.
14420 * tests/calc.at: Adjust.
14421 * doc/bison.texinfo: Adjust.
14422 Also, make sure to include the `,' for these declarations.
14423
14424 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14425
14426 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14427 definition; avoids potential autoreconf problems.
14428
14429 2002-11-15 Akim Demaille <akim@epita.fr>
14430
14431 Always check the value returned by yyparse.
14432
14433 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14434 returned by yyparse.
14435 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14436 Adjust calls.
14437 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14438 returned by yyparse.
14439
14440 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14441
14442 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14443 on input.at test.
14444
14445 2002-11-14 Paul Eggert <eggert@twinsun.com>
14446
14447 * src/output.c (output_skeleton): Call xfopen instead of
14448 duplicating xfopen's body.
14449
14450 Fix bugs reported by Nelson H. F. Beebe in
14451 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14452
14453 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14454 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14455 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14456 file twice in the grammar, as an extra check.
14457
14458 * tests/input.at (Torturing the Scanner): Surround the
14459 backslash-newline tests with "#if 0", to make it less likely that
14460 we'll run into compiler bugs. Bring back solitary \ inside
14461 comment, but add a closing comment to work around HP C bug. Don't
14462 test backslash-newline in C character constant.
14463
14464 2002-11-14 Akim Demaille <akim@epita.fr>
14465
14466 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14467 status of the compiler.
14468 Calling `exit 1' is no longer needed.
14469 Reported by Nelson H. F. Beebe.
14470
14471 2002-11-14 Akim Demaille <akim@epita.fr>
14472
14473 * tests/atlocal.in (CPPFLAGS): We have config.h.
14474 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14475 New.
14476 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14477 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14478 * tests/regression.at, tests/torture.at: Use them for all the
14479 grammars that are to be compiled.
14480 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14481 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14482 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14483
14484 2002-11-14 Akim Demaille <akim@epita.fr>
14485
14486 * doc/bison.texinfo: Various formatting changes (alignments in
14487 samples, additional @group/@end group, GCS in samples.
14488 Use @deffn instead of simple @table to define the directives,
14489 macros, variables etc.
14490
14491 2002-11-13 Paul Eggert <eggert@twinsun.com>
14492
14493 Fix some bugs reported by Albert Chin-A-Young in
14494 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14495
14496 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14497 -o c"; the HP C compiler chatters during compilation.
14498 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14499 * tests/headers.at (export YYLTYPE): Likewise.
14500
14501 * tests/input.at (Torturing the Scanner): Remove lines containing
14502 solitary backslashes, as they tickle a bug in the HP C compiler.
14503
14504 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14505 comments, since they're not portable. Use GNU coding style.
14506
14507 2002-11-13 Akim Demaille <akim@epita.fr>
14508
14509 * data/yacc.c: Leave bigger chunks of quoted text.
14510 (YYDSYMPRINTF): New.
14511 Use it to report symbol activities.
14512 * data/glr.c (YYDSYMPRINTF): New.
14513 Use it.
14514
14515 2002-11-12 Paul Eggert <eggert@twinsun.com>
14516
14517 Version 1.75b.
14518
14519 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14520 (yyglrReduce): Return yyok, not 0.
14521 This should avoid the enumerated-type warnings reported
14522 by Nelson H. F. Beebe in
14523 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14524
14525 * lib/bbitset.h (BITSET_INLINE): Remove.
14526 * lib/bitset.h [! BITSET_INLINE]: Remove.
14527 (bitset_set, bitset_reset, bitset_test): Rename local vars
14528 to avoid shadowing warnings by GCC.
14529
14530 * data/glr.c (inline): Remove #define. It's the user's
14531 responsibility to #define it away, just like 'const'.
14532 This fixes one of the bugs reported by Nelson H. F. Beebe in
14533 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14534
14535 * Makefile.maint (po-check): Scan .l and .y files instead of the
14536 .c and the .h files that they generate. This fixes the bug
14537 reported by Tim Van Holder in:
14538 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14539 Look for N_ as well as for _. Try to avoid matching #define for
14540 N_ and _.
14541 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14542 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14543 * src/scan-gram.l: Revamp regular expressions so that " and '
14544 do not confuse xgettext.
14545
14546 * src/struniq.h (struniq_new): Do not declare the return type
14547 to be 'const'; this violates the C standard.
14548 * src/struniq.c (struniq_new): Likewise.
14549
14550 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14551
14552 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14553 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14554 linker.
14555
14556 2002-11-12 Akim Demaille <akim@epita.fr>
14557
14558 * Makefile.maint: Sync with Autoconf:
14559 (local_updates): New.
14560
14561 2002-11-12 Akim Demaille <akim@epita.fr>
14562
14563 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14564
14565 2002-11-12 Akim Demaille <akim@epita.fr>
14566
14567 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14568 locations.
14569
14570 2002-11-12 Akim Demaille <akim@epita.fr>
14571
14572 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14573 not yyvalue.
14574
14575 2002-11-12 Akim Demaille <akim@epita.fr>
14576
14577 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14578 Use it to test the GLR parser.
14579
14580 2002-11-12 Akim Demaille <akim@epita.fr>
14581
14582 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14583 defines it.
14584 * data/glr.c (yystos): New.
14585 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14586 (YYDSYMPRINT): New.
14587 (yyval): Don't define it, it is handled via M4.
14588 (yyrecoverParseError): Free verbosely the discarded symbols.
14589 * data/yacc.c (yysymprint): Remove, rather...
14590 (b4_yysymprint_generate): invoke.
14591 * data/c.m4 (b4_yysymprint_generate): New.
14592 Accept pointers as arguments, as opposed to the version from
14593 yacc.c.
14594 (b4_yydestruct_generate): Likewise.
14595 * tests/cations.at (Printers and Destructors): Use Bison directives
14596 instead of CPP macros.
14597 Don't rely on internal details.
14598
14599 2002-11-12 Akim Demaille <akim@epita.fr>
14600
14601 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14602 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14603 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14604 it against YYEMPTY and so forth), work on yytoken (i.e., set
14605 it to YYEMPTY etc.).
14606 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14607 (b4_symbol_actions): Remove.
14608 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14609 for 0, end-of-input.
14610
14611 2002-11-12 Akim Demaille <akim@epita.fr>
14612
14613 * doc/bison.texinfo (Destructor Decl): New.
14614
14615 2002-11-12 Akim Demaille <akim@epita.fr>
14616
14617 * src/tables.c (tables_generate): Use free for pointers that
14618 cannot be NULL, not XFREE.
14619 (pack_vector): Use assert, not fatal, for bound violations.
14620 * src/state.c (state_new): Likewise.
14621 * src/reader.c (reader): Likewise.
14622 * src/lalr.c (set_goto_map): Likewise.
14623 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14624 the file name.
14625
14626 2002-11-12 Akim Demaille <akim@epita.fr>
14627
14628 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14629 Restore.
14630 * src/scan-gram.l (last_string): Is global to the file, not to
14631 yylex.
14632 * src/parse-gram.y (input): Don't append the epilogue here,
14633 (epilogue.opt): do it here, and free the scanner's obstack.
14634 * src/reader.c (epilogue_set): Rename as...
14635 (epilogue_augment): this.
14636 * data/c.m4 (b4_epilogue): Defaults to empty.
14637
14638 2002-11-12 Akim Demaille <akim@epita.fr>
14639
14640 * src/getargs.c (long_options): Remove duplicates.
14641 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14642 Remove.
14643 * doc/bison.rnh: Remove.
14644 * doc/bison.texinfo (VMS Invocation): Remove.
14645
14646 2002-11-12 Akim Demaille <akim@epita.fr>
14647
14648 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14649 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14650
14651 Use struniq for symbols.
14652
14653 * src/symtab.h (symbol_t): The tag member is a struniq.
14654 (symbol_type_set): Adjust.
14655 * src/symtab.c (symbol_new): Takes a struniq.
14656 (symbol_free): Don't free the tag member.
14657 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14658 (hash_compare_symbol, hash_symbol): these.
14659 Use the fact that tags as struniqs.
14660 (symbol_get): Use struniq_new.
14661 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14662 Returns a strniq.
14663 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14664 and type members are struniqs.
14665 * src/reader.c (get_merge_function)
14666 (grammar_current_rule_merge_set): Adjust.
14667 (TYPE, current_type): Are struniq.
14668
14669 Use struniq for file names.
14670
14671 * src/files.h, src/files.c (infile): Split into...
14672 (grammar_file, current_file): these.
14673 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14674 * src/reduce.c (reduce_print): Likewise.
14675 * src/getargs.c (getargs): Likewise.
14676 * src/complain.h, src/complain.c: Likewise.
14677 * src/main.c (main): Call struniqs_new early enough to use it for
14678 file names.
14679 Don't free the input file name.
14680
14681 2002-11-12 Akim Demaille <akim@epita.fr>
14682
14683 * src/symtab.c (symbol_free): Remove dead deactivated code:
14684 type_name are properly removed.
14685 Don't use XFREE to free items that cannot be NULL.
14686 * src/struniq.h, src/struniq.c: New.
14687 * src/main.c (main): Initialize/free struniqs.
14688 * src/parse-gram.y (%union): Add astruniq member.
14689 (yyprint): Adjust.
14690 * src/scan-gram.l (<{tag}>): Return a struniq.
14691 Free the obstack bit that used to store it.
14692 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14693
14694 2002-11-11 Paul Eggert <eggert@twinsun.com>
14695
14696 Revamp to fix many (but not all) of the C- and M4-related quoting
14697 problems. Among other things, this fixes the Bison bug reported
14698 by Jan Hubicka when processing the Bash grammar; see:
14699 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14700
14701 Use new @ escapes consistently. Represent brackets with @{ and @}
14702 rather than @<:@ and @:>@, since this works a bit better with dumb
14703 editors like vi. Represent @ with @@, since @ is now consistently
14704 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14705 __ofile__, to avoid unexpected expansions. Similarly, use @output
14706 rather than #output.
14707
14708 * data/c.m4 (b4_copyright): Omit file name from comment, since
14709 the file name could contain "*/".
14710 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14711 be quoted. All uses changed.
14712
14713 * data/glr.c: Use new @ escapes consistently.
14714 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14715 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14716 Remove, since they couldn't handle arbitrary characters in file
14717 names.
14718 * data/lalr1.cc: Likewise.
14719 * data/yacc.c: Likewise.
14720
14721 * src/files.c (output_infix): Remove; all uses removed.
14722 * src/files.h: Likewise.
14723
14724 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14725 mishandled funny characters in file names, and anyway it isn't
14726 needed any more.
14727 * data/yacc.c: Likewise.
14728 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14729
14730 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14731 * data/yacc.c: Likewise.
14732
14733 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14734 strings now.
14735 (muscle_init): Quote filename as a C string.
14736 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14737 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14738 * src/output.c (escaped_file_name_output): New function.
14739 (prepare_symbols): Quote tokens for M4.
14740 (prepare): Don't insert output_infix, output_prefix,
14741 output_parser_name, output_header_name; this is now down by scan-skel.
14742 Insert skeleton as a C string.
14743
14744 * src/output.c (user_actions_output, symbol_destructors_output,
14745 symbol_printers_output): Quote filenames for C and M4.
14746 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14747
14748 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14749 escapes other than \\ and \'; this simplifies the code.
14750 (<SC_STRING>): Likewise, for \\ and \".
14751 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14752 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14753 Use new escapes @{ and @} for [ and ].
14754
14755 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14756 them with auto vars.
14757 Switch to new escape scheme, where @ is the escape character uniformly.
14758 Abort if a stray escape character is found. Avoid unbounded input
14759 buffer when parsing non-escaped text.
14760
14761 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14762 __oline__, #output, $@, and @{ do not have unintended meanings.
14763
14764 2002-11-09 Paul Eggert <eggert@twinsun.com>
14765
14766 Fix the test failure due to GCC warnings described in
14767 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14768 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14769 evaluate to 0 if it's impossible for NINF to be in the respective
14770 table.
14771 (yygetLRActions, yyrecoverParseError): Use them.
14772
14773 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14774 counted in the token inserted at end of file. Now takes
14775 location_t *, not location_t, so that the location can be
14776 adjusted. All uses changed.
14777
14778 * tests/regression.at (Invalid inputs): Adjust wording in
14779 diagnostic to match the new behavior.
14780
14781 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14782 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14783 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14784 abort ();'. This reduces the runtime of the "Many lookaheads"
14785 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14786 GCC 3.2.
14787
14788 2002-11-07 Paul Eggert <eggert@twinsun.com>
14789
14790 * src/parse-gram.y (CHARACTER): Remove unused token.
14791 All uses removed.
14792
14793 * src/scan-gram.l: Remove stack option. We no longer use the
14794 stack, since the stack was never deeper than 1; instead, use the
14795 new auto var c_context to record the stacked value.
14796
14797 Remove nounput option. At an unexpected end of file, we now unput
14798 the minimal input necessary to end cleanly; this simplifies the
14799 code.
14800
14801 Avoid unbounded token sizes where this is easy.
14802
14803 (unexpected_end_of_file): New function.
14804 Use it to systematize the error message on unexpected EOF.
14805 (last-string): Now auto, not static.
14806 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14807 (scanner_last_string_free): Remove; not used.
14808 (percent_percent_count): Move decl to just before use.
14809 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14810 not the (never otherwised-used) CHARACTER.
14811
14812 2002-11-07 Akim Demaille <akim@epita.fr>
14813
14814 Let yyerror always receive the msg as last argument, so that
14815 yyerror can be variadic.
14816
14817 * data/yacc.c (b4_yyerror_args): New.
14818 Use it when calling yyerror.
14819 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14820 Use it when calling yyerror.
14821 * doc/bison.texinfo (Error Reporting): Adjust.
14822 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14823 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14824
14825 2002-11-06 Akim Demaille <akim@epita.fr>
14826
14827 #line should have quoted strings.
14828 Ideally, this should be done by m4_quotearg.
14829
14830 * src/scan-skel.l: Include quotearg.h.
14831 Quote __ofile__.
14832 * src/output.c (symbol_printers_output)
14833 (symbol_destructors_output): Quote the file name.
14834
14835 2002-11-06 Akim Demaille <akim@epita.fr>
14836
14837 * tests/regression.at (Invalid inputs): Adjust to the recent
14838 messages.
14839
14840 2002-11-06 Akim Demaille <akim@epita.fr>
14841
14842 Restore --no-lines.
14843 Reported by Jim Kent.
14844
14845 * data/c.m4 (b4_syncline): New.
14846 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14847 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14848 * src/output.c (user_actions_output): Likewise.
14849 (prepare): Define 'b4_synclines_flag'.
14850 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14851
14852 2002-11-06 Akim Demaille <akim@epita.fr>
14853
14854 * src/main.c (main): Free `infile'.
14855 * src/scan-gram.l (handle_syncline): New.
14856 Recognize `#line'.
14857 * src/output.c (user_actions_output, symbol_destructors_output)
14858 (symbol_printers_output): Use the location's file name, not
14859 infile.
14860 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14861
14862 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14863
14864 * src/tables.c (matching_state): Don't allow states to match if
14865 either has GLR conflict entries.
14866
14867 2002-11-05 Paul Eggert <eggert@twinsun.com>
14868
14869 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14870 "integer out of range" rather than "invalid value".
14871 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14872 accordingly.
14873
14874 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14875 Also, remove one static variable in the scanner.
14876
14877 * src/scan-gram.l (braces_level): Now auto, not static.
14878 Initialize to zero if the compiler is being picky.
14879 (INITIAL): Clear braces_level instead of incrementing it.
14880 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14881 as POSIX 1003.1-2001 requires.
14882 * src/system.h (IF_LINT): New macro, taken from coreutils.
14883 * configure.ac: Define "lint" if --enable-gcc-warnings.
14884
14885 2002-11-05 Akim Demaille <akim@epita.fr>
14886
14887 * src/scan-gram.l: When it starts with `%', complain about the
14888 whole directive, not just that `invalid character: %'.
14889
14890 2002-11-04 Akim Demaille <akim@epita.fr>
14891
14892 * Makefile.maint: Update from Autoconf.
14893 (update, cvs-update, po-update, do-po-update): New.
14894
14895 2002-11-04 Akim Demaille <akim@epita.fr>
14896
14897 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14898 and yyerror.
14899 Have yyerror `use' its arguments.
14900 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14901 returns true when location & yacc & pure & parse-param.
14902 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14903
14904 2002-11-04 Akim Demaille <akim@epita.fr>
14905
14906 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14907 clashes.
14908 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14909 font-lock-mode.
14910 Use complain_at.
14911 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14912 slot 0.
14913
14914 2002-11-03 Paul Eggert <eggert@twinsun.com>
14915
14916 * src/reader.c (get_merge_function, grammar_current_rule_check):
14917 Use consistent diagnostics for reporting type name clashes.
14918 Quote the types with <>, for consistency with Yacc.
14919 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14920
14921 2002-11-03 Akim Demaille <akim@epita.fr>
14922
14923 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14924 New.
14925 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14926 (b4_parse_param): Remove.
14927 Use b4_identification.
14928 Propagate b4_pure_args where needed to pass them to yyerror.
14929 * data/glr.m4 (b4_parse_param): Remove.
14930 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14931 (b4_lpure_formals): New.
14932 Use b4_identification.
14933 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14934 b4_user_formals and b4_user_args.
14935 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14936 (yyreportAmbiguity): When using a pure parser, also need
14937 the location, and the parse-params.
14938 Adjust callers.
14939 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14940 When using a pure parser, also need the parse-params.
14941 Adjust callers.
14942 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14943 (%pure-parser + %parse-param) LALR and GLR parsers.
14944 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14945 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14946 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14947 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14948 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14949 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14950 * doc/bison.texinfo: Untabify the whole file.
14951 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14952 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14953 (Error Reporting): Adjust to these new directives.
14954 Document %error-verbose, deprecate YYERROR_VERBOSE.
14955
14956 2002-11-03 Akim Demaille <akim@epita.fr>
14957
14958 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14959 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14960 command line options.
14961 * tests/cxx-type.at: Formatting changes.
14962
14963 2002-11-03 Paul Eggert <eggert@twinsun.com>
14964
14965 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14966 to count columns correctly, and to check for invalid inputs.
14967
14968 Use mbsnwidth to count columns correctly. Account for tabs, too.
14969 Include mbswidth.h.
14970 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14971 (extend_location): New function.
14972 (YY_LINES): Remove.
14973
14974 Handle CRLF in C code rather than in Lex code.
14975 (YY_INPUT): New macro.
14976 (no_cr_read): New function.
14977
14978 Scan UCNs, even though we don't fully handle them yet.
14979 (convert_ucn_to_byte): New function.
14980
14981 Handle backslash-newline correctly in C code.
14982 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14983 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14984 all uses changed.
14985 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14986 Use {splice} wherever C allows backslash-newline.
14987 YY_STEP after space, newline, vertical-tab.
14988 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14989
14990 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14991
14992 ({int}, handle_action_dollar, handle_action_at): Check for integer
14993 overflow.
14994
14995 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14996
14997 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14998 as well as \000. Check for UCHAR_MAX, not 255.
14999 Allow \x with an arbitrary positive number of digits, as in C.
15000 Check for overflow here.
15001 Allow \? and UCNs, for compatibility with C.
15002
15003 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15004 with quote slot used by complain_at.
15005
15006 * tests/input.at: Add tests for backslash-newline, m4 quotes
15007 in symbols, long literals, and funny escapes in strings.
15008
15009 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15010 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15011 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15012 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15013 * m4/mbswidth.m4: New file, from GNU coreutils.
15014
15015 * doc/bison.texinfo (Grammar Outline): Document // comments.
15016 (Symbols): Document that trigraphs have no special meaning in Bison,
15017 nor is backslash-newline allowed.
15018 (Actions): Document that trigraphs have no special meaning.
15019
15020 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15021 no longer used.
15022
15023 2002-11-02 Paul Eggert <eggert@twinsun.com>
15024
15025 * src/reader.c: Don't include quote.h; not needed.
15026 (get_merge_function): Reword warning to be consistent with
15027 type clash diagnostic in grammar_current_rule_check.
15028
15029 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15030 bug in trigraph handling.
15031
15032 * src/output.c (prepare_symbols): When printing token names,
15033 escape "[" as "@<:@" and likewise for "]".
15034
15035 * src/system.h (errno): Remove declaration, as we are now
15036 assuming C89 or better, and C89 guarantees errno.
15037
15038 2002-10-30 Paul Eggert <eggert@twinsun.com>
15039
15040 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15041 Check for close failures.
15042 * src/files.h (xfclose): Return void, not int, since it always
15043 returned zero.
15044 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15045 indicates one.
15046 * src/output.c (output_skeleton): Use xfclose rather than fclose
15047 and ferror. xfclose now checks ferror.
15048
15049 * data/glr.c (YYLEFTMOST_STATE): Remove.
15050 (yyreportTree): Use a stack-based leftmost state. This avoids
15051 our continuing battles with bogus warnings about initializers.
15052
15053 2002-10-30 Akim Demaille <akim@epita.fr>
15054
15055 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15056 #if.
15057
15058 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15059
15060 * tests/glr-regr1.at: New test for reported regressions.
15061 * tests/testsuite.at: Add glr-regr1.at test.
15062 * tests/Makefile.am: Add glr-regr1.at test.
15063
15064 2002-10-24 Paul Eggert <eggert@twinsun.com>
15065
15066 Version 1.75a.
15067
15068 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15069 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15070 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15071 Don't assume strdup exists; POSIX says its an XSI extension.
15072 Check for buffer overflow on input.
15073
15074 2002-10-24 Akim Demaille <akim@epita.fr>
15075
15076 * src/output.c (output_skeleton): Don't disable M4sugar comments
15077 too soon: it results in comments being expanded.
15078 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15079 first output.
15080
15081 2002-10-24 Akim Demaille <akim@epita.fr>
15082
15083 * data/yacc.c (m4_int_type): New.
15084 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15085 char' as only yacc.c wants K&R portability.
15086 * data/glr.c (yysigned_char): Remove.
15087 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15088 Reported by Quoc Peyrot.
15089
15090 2002-10-23 Paul Eggert <eggert@twinsun.com>
15091
15092 * src/main.c (main): With --trace=time, report times even if a
15093 non-fatal error occurs. Formerly, the times were reported in some
15094 such cases but not in others.
15095 * src/reader.c (reader): Just return if a complaint has been issued,
15096 instead of exiting, so that 'main' can report times.
15097
15098 2002-10-22 Akim Demaille <akim@epita.fr>
15099
15100 * src/system.h: Include sys/types.
15101 Reported by Bert Deknuydt.
15102
15103 2002-10-23 Paul Eggert <eggert@twinsun.com>
15104
15105 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15106 Suggested by Art Haas.
15107
15108 2002-10-22 Paul Eggert <eggert@twinsun.com>
15109
15110 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15111 decl; not needed any more.
15112 * src/main.c (main): Use return to exit, undoing yesterday's change.
15113 The last OS that we could find where this wouldn't work is
15114 SunOS 3.5, and that's too old to worry about now.
15115
15116 * data/glr.c (struct yyltype): Define members even when not
15117 doing locations. This is more consistent with yacc.c, and it
15118 works around the following bug reports:
15119 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15120 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15121
15122 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15123 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15124 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15125
15126 2002-10-22 Akim Demaille <akim@epita.fr>
15127
15128 * data/README: New.
15129
15130 2002-10-21 Paul Eggert <eggert@twinsun.com>
15131
15132 Be consistent about 'bool'; the old code used an enum in one
15133 module and an int in another, and this violates the C standard.
15134 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15135 * configure.ac (AC_HEADER_STDBOOL): Add.
15136 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15137 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15138 * src/symtab.c (hash_compare_symbol_t): Likewise.
15139 * src/system.h (bool, false, true): Use a definition consistent
15140 with ../lib/hash.c. All uses changed.
15141
15142 * src/complain.c (warning_issued): Renamed from warn_message_count,
15143 so that we needn't worry about integer overflow (!).
15144 Now of type bool. All uses changed.
15145 (complaint_issued): Renamed from complain_message_count; likewise.
15146
15147 * src/main.c (main): Use exit to exit with failure.
15148
15149 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15150 rather than 1 and 0.
15151 * src/main.c (main): Likewise.
15152 * src/getargs.c (getargs): Likewise.
15153 * src/reader.c (reader): Likewise.
15154
15155 * src/getarg.c (getargs): Remove duplicate code for
15156 "Try `bison --help'".
15157
15158 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15159 What was that "2" for?
15160
15161 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15162 * src/getargs.c (usage): Likewise.
15163
15164 * src/getargs.c (getargs): When there are too few operands, report
15165 the last one. When there are too many, report the first extra
15166 one. This is how diffutils does it.
15167
15168 2002-10-20 Paul Eggert <eggert@twinsun.com>
15169
15170 Remove K&R vestiges.
15171 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15172 * src/complain.c (VA_START): Remove. Assume prototypes.
15173 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15174 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15175 fatal): Assume prototypes.
15176 * src/complain.h: Assume prototypes.
15177 * src/system.h (PARAMS): Remove.
15178 Include <limits.h> unconditionally, since it's guaranteeed even
15179 for a freestanding C89 compiler.
15180 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15181 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15182
15183 2002-10-20 Akim Demaille <akim@epita.fr>
15184
15185 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15186 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15187 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15188 (yyresolveStates, yyresolveAction, yyresolveStack)
15189 (yyprocessOneStack): Use them.
15190 (yy_reduce_print): New.
15191 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15192
15193 2002-10-20 Akim Demaille <akim@epita.fr>
15194
15195 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15196 arguments and output `void'.
15197 (b4_c_function): Rename as...
15198 (b4_c_function_def): this.
15199 (b4_c_function_decl, b4_c_ansi_function_def)
15200 (b4_c_ansi_function_decl): New.
15201 Change the interpretation of the arguments: before `int, foo', now
15202 `int foo, foo'.
15203 * data/yacc.c (yyparse): Prototype and define thanks to these.
15204 Adjust b4_c_function_def uses.
15205 * data/glr.c (yyparse): Likewise, but ANSI only.
15206
15207 2002-10-20 Akim Demaille <akim@epita.fr>
15208
15209 * src/output.c (prepare): Move the definition of `tokens_number',
15210 `nterms_number', `undef_token_number', `user_token_number_max'
15211 to...
15212 (prepare_tokens): Here.
15213 (prepare_tokens): Rename as...
15214 (prepare_symbols): this.
15215 (prepare): Move the definition of `rules_number' to...
15216 (prepare_rules): here.
15217 (prepare): Move the definition of `last', `final_state_number',
15218 `states_number' to...
15219 (prepare_states): here.
15220 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15221
15222 2002-10-20 Akim Demaille <akim@epita.fr>
15223
15224 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15225
15226 2002-10-20 Akim Demaille <akim@epita.fr>
15227
15228 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15229 * data/c.m4: here.
15230
15231 2002-10-20 Akim Demaille <akim@epita.fr>
15232
15233 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15234 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15235 `pair'.
15236 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15237 `name' to...
15238 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15239 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15240 These.
15241
15242 2002-10-19 Paul Eggert <eggert@twinsun.com>
15243
15244 Do not create a temporary file, as that involves security and
15245 cleanup headaches. Instead, use a pair of pipes.
15246 Derived from a suggestion by Florian Krohm.
15247 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15248 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15249 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15250 (BISON_PREREQ_SUBPIPE): Add.
15251 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15252 Add subpipe.h, subpipe.c.
15253 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15254 * po/POTFILES.in: Add lib/subpipe.c.
15255 * src/output.c: Include "subpipe.h".
15256 (m4_invoke): Remove decl.
15257 (scan_skel): New decl.
15258 (output_skeleton): Use pipe rather than temporary file for m4 input.
15259 Check that m4sugar.m4 is readable, to avoid deadlock.
15260 Check for pipe I/O error.
15261 * src/scan-skel.l (readpipe): Remove decl.
15262 (scan_skel): New function, to be used in place of m4_invoke.
15263 Read from stream rather than file.
15264
15265 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15266 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15267 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15268 this generates a more-accurate value anyway.
15269
15270 * lib/timevar.c (timervar_accumulate): Rename locals to
15271 avoid confusion with similarly-named more-global.
15272 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15273
15274 * src/output.c (prepare): Use xstrdup to convert char const *
15275 to char *, to avoid GCC warning.
15276
15277 2002-10-19 Akim Demaille <akim@epita.fr>
15278
15279 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15280 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15281 Use them to have `calc.y' ready for %pure-parser.
15282 * data/yacc.c (YYLEX): Pass a yylex return type to
15283 b4_c_function_call.
15284
15285 2002-10-19 Akim Demaille <akim@epita.fr>
15286
15287 Prototype support of %lex-param and %parse-param.
15288
15289 * src/parse-gram.y: Add the definition of the %lex-param and
15290 %parse-param tokens, plus their rules.
15291 Drop the `_' version of %glr-parser.
15292 Add the "," token.
15293 * src/scan-gram.l (INITIAL): Scan them.
15294 * src/muscle_tab.c: Comment changes.
15295 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15296 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15297 (muscle_entry_s): The `value' member is no longer const.
15298 Adjust all dependencies.
15299 * src/muscle_tab.c (muscle_init): Adjust: use
15300 MUSCLE_INSERT_STRING.
15301 Initialize the obstack earlier.
15302 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15303 (muscle_pair_list_grow): New.
15304 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15305 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15306 * tests/calc.at: Use %locations, not --locations.
15307 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15308
15309 2002-10-19 Akim Demaille <akim@epita.fr>
15310
15311 * src/getargs.c (usage): Take status as argument and exit
15312 accordingly.
15313 Report the traditional `Try ... --help' message when status != 0.
15314 (usage, version): Don't take a FILE * as arg, it is pointless.
15315 (getargs): When there is an incorrect number of arguments, make it
15316 an error, and report it GNUlically thanks to `usage ()'.
15317
15318 2002-10-18 Paul Eggert <eggert@twinsun.com>
15319
15320 * data/glr.c (yyreportParseError): Don't assume that sprintf
15321 yields the length of the printed string, as this is not true
15322 on SunOS 4.1.4. Reported by Peter Klein.
15323
15324 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15325 * tests/conflicts.at (%nonassoc and eof): Likewise.
15326 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15327
15328 2002-10-17 Akim Demaille <akim@epita.fr>
15329
15330 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15331 * src/getargs.c (trace_types, trace_args): Adjust.
15332 * src/reader.c (grammar_current_rule_prec_set)
15333 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15334 Standardize error messages.
15335 And s/@prec/%prec/!
15336 (reader): Use trace_flag to enable scanner/parser debugging,
15337 instead of an adhoc scheme.
15338 * src/scan-gram.l: Remove trailing debugging code.
15339
15340 2002-10-16 Paul Eggert <eggert@twinsun.com>
15341
15342 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15343 MUSCLE_TAB_H.
15344
15345 * NEWS: Officially drop support for building Bison with K&R C,
15346 since it didn't work anyway and it's not worth worrying about.
15347 * Makefile.maint (wget_files): Remove ansi2knr.c.
15348 (ansi2knr.c-url_prefix): Remove.
15349 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15350 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15351 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15352
15353 2002-10-15 Paul Eggert <eggert@twinsun.com>
15354
15355 Stop using the "enum_" trick for K&R-style function definitions;
15356 it confused me, and I was the author! Instead, assume that people
15357 who want to use K&R C compilers (when using these modules in GCC,
15358 perhaps?) will run ansi2knr.
15359
15360 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15361 All uses of "enum_" changed to "enum ".
15362 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15363 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15364
15365 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15366 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15367 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15368 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15369 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15370 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15371 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15372 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15373 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15374 Use function prototypes; this removes the need for declaring
15375 static functions simply to provide their prototypes.
15376 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15377 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15378 bitset_count_, bitset_create, bitset_dump, bitset_first,
15379 bitset_free, bitset_init, bitset_last, bitset_next,
15380 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15381 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15382 bitset_print, bitset_release_memory, bitset_toggle_,
15383 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15384 debug_bitset): Likewise.
15385 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15386 * lib/bitset_stats.c (bitset_log_histogram_print,
15387 bitset_percent_histogram_print, bitset_stats_and,
15388 bitset_stats_and_cmp, bitset_stats_and_or,
15389 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15390 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15391 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15392 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15393 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15394 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15395 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15396 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15397 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15398 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15399 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15400 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15401 bitset_stats_zero): Likewise.
15402 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15403 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15404 bitsetv_dump, debug_bitsetv): Likewise.
15405 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15406 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15407 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15408 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15409 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15410 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15411 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15412 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15413 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15414 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15415 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15416 Likewise.
15417 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15418 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15419 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15420 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15421 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15422 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15423 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15424 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15425 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15426 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15427 lbitset_xor_cmp, lbitset_zero): Likewise.
15428
15429 2002-10-14 Akim Demaille <akim@epita.fr>
15430
15431 Version 1.75.
15432
15433 2002-10-14 Akim Demaille <akim@epita.fr>
15434
15435 * tests/Makefile.am (maintainer-check-posix): New.
15436
15437 2002-10-14 Akim Demaille <akim@epita.fr>
15438
15439 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15440 member.
15441
15442 2002-10-14 Akim Demaille <akim@epita.fr>
15443
15444 * src/tables.c (table_ninf_remap): base -> tab.
15445 Reported by Matt Rosing.
15446
15447 2002-10-14 Paul Eggert <eggert@twinsun.com>
15448
15449 * tests/action.at, tests/calc.at, tests/conflicts.at,
15450 tests/cxx-type.at, tests/headers.at, tests/input.at,
15451 tests/regression.at, tests/synclines.at, tests/torture.at:
15452 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15453 so that the tests still work even if POSIXLY_CORRECT is set.
15454 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15455
15456 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15457 for portability to K&R hosts. Fix typo: signed char is guaranteed
15458 only to 127, not to 128.
15459 * data/glr.c (yysigned_char): New type.
15460 * data/yacc.c (yysigned_char): Likewise.
15461 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15462
15463 2002-10-13 Paul Eggert <eggert@twinsun.com>
15464
15465 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15466 true due to limited range of data type" warning from GCC.
15467
15468 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15469 by wrapping enum yytokentype's definition inside #ifndef
15470 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15471
15472 2002-10-13 Akim Demaille <akim@epita.fr>
15473
15474 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15475 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15476
15477 2002-10-13 Akim Demaille <akim@epita.fr>
15478
15479 * Makefile.maint: Update from Autoconf 2.54.
15480 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15481
15482 2002-10-13 Akim Demaille <akim@epita.fr>
15483
15484 * src/print.c (print_state): Separate the list of solved conflicts
15485 from the other items.
15486 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15487
15488 2002-10-13 Akim Demaille <akim@epita.fr>
15489
15490 Let nondeterministic skeletons be usable with deterministic
15491 tables.
15492
15493 With the patch, GAWK compiled by GCC without -O2 passes its test
15494 suite using a GLR parser driven by LALR tables. It fails with -O2
15495 because `struct stat' gives two different answers on my machine:
15496 88 (definition of an auto var) and later 96 (memset on this var).
15497 Hence the stack is badly corrumpted. The headers inclusion is to
15498 blame: if I move the awk.h inclusion before GLR's system header
15499 inclusion, the two struct stat have the same size.
15500
15501 * src/tables.c (pack_table): Always create conflict_table.
15502 (token_actions): Always create conflict_list.
15503 * data/glr.c (YYFLAG): Remove, unused.
15504
15505 2002-10-13 Akim Demaille <akim@epita.fr>
15506
15507 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15508 (O0FLAGS): New.
15509 (VALGRIND, GXX): New.
15510 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15511 * tests/bison.in: Run $PREBISON a pre-command.
15512 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15513 (maintainer-check-g++): New.
15514 * Makefile.am (maintainer-check): New.
15515
15516 2002-10-13 Akim Demaille <akim@epita.fr>
15517
15518 * data/glr.c: Formatting changes.
15519 Tweak some trace messages to match yacc.c's.
15520
15521 2002-10-13 Akim Demaille <akim@epita.fr>
15522
15523 GLR parsers sometimes raise parse errors instead of performing the
15524 default reduction.
15525 Reported by Charles-Henry de Boysson.
15526
15527 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15528 check the length of the traces when %glr.
15529 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15530 GLR's traces.
15531 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15532 Test GLR parsers.
15533 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15534 (yyltype): Remove the yy prefix from the member names.
15535 (yytable): Complete its comment.
15536 (yygetLRActions): Map error action number from YYTABLE from
15537 YYTABLE_NINF to 0.
15538 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15539 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15540 not satisfying as we could compare an YYACTION computed from
15541 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15542 only value for error actions.
15543 (yyreportParseError): In verbose parse error messages, don't issue
15544 `error' in the list of expected tokens.
15545 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15546 next action to perform to match glr.c's decoding.
15547 (yytable): Complete its comment.
15548
15549 2002-10-13 Paul Eggert <eggert@twinsun.com>
15550
15551 Fix problem reported by Henrik Grubbstroem in
15552 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15553 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15554 because the Bison parser reads the second action before reducing
15555 the first one.
15556 * src/scan-gram.l (rule_length): New static var.
15557 Use it to keep track of the rule length in the scanner, since
15558 we can't expect the parser to be in lock-step sync with the scanner.
15559 (handle_action_dollar, handle_action_at): Use this var.
15560 * tests/actions.at (Exotic Dollars): Test for the problem.
15561
15562 2002-10-12 Paul Eggert <eggert@twinsun.com>
15563
15564 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15565 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15566 Include <sys/time.h> when checking for clock_t and struct tms.
15567 Use same include order as source.
15568 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15569 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15570
15571 * lib/timevar.c: Update copyright date and clarify comments.
15572 (get_time) [IN_GCC]: Keep the GCC version for reference.
15573
15574 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15575 GCC version as of today, then merge Bison's changes.
15576 Change "GCC" to "Bison" in copyright notice. timevar.def's
15577 author is Akim, so change that too.
15578
15579 * src/reader.c (grammar_current_rule_check):
15580 Don't worry about the default action if $$ is untyped.
15581 Prevents bogus warnings reported by Jim Gifford in
15582 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15583
15584 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15585 * data/glr.c, data/lalr1.cc, data/yacc.c:
15586 Output token definitions before the first part of user declarations.
15587 Fixes compatibility problem reported by Jim Gifford for kbd in
15588 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15589
15590 2002-10-11 Paul Eggert <eggert@twinsun.com>
15591
15592 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15593 (yyparse): here. This undoes some of the 2002-07-25 change.
15594 Compatibility problem reported by Ralf S. Engelschall with
15595 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15596
15597 2002-10-11 Akim Demaille <akim@epita.fr>
15598
15599 * tests/regression.at Characters Escapes): New.
15600 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15601 characters.
15602 Reported by Jan Nieuwenhuizen.
15603
15604 2002-10-11 Akim Demaille <akim@epita.fr>
15605
15606 * po/id.po: New.
15607
15608 2002-10-10 Paul Eggert <eggert@twinsun.com>
15609
15610 Portability fixes for bitsets; this also avoids several GCC
15611 warnings.
15612
15613 * lib/abitset.c: Include <stddef.h>, for offsetof.
15614 * lib/lbitset.c: Likewise.
15615
15616 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15617 properly for vectors of objects. Do not assume that adding a
15618 header size to a multiple of a word size yields a value that is
15619 properly aligned for the whole union.
15620 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15621
15622 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15623 unique names for structures.
15624 * lib/ebitset.c (ebitset_bytes): Likewise.
15625 * lib/lbitset.c (lbitset_bytes): Likewise.
15626
15627 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15628 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15629 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15630 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15631 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15632 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15633 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15634 to improve the type-checking that GCC can do.
15635 * lib/bitset.c (bitset_op4_cmp): Likewise.
15636 * lib/bitset_stats.c (bitset_stats_count,
15637 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15638 bitset_stats_copy, bitset_stats_disjoint_p,
15639 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15640 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15641 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15642 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15643 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15644 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15645 bitset_stats_or_and_cmp): Likewise.
15646 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15647 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15648 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15649 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15650
15651 * lib/abitset.h: Include bitset.h, not bbitset.h.
15652 * lib/ebitset.h: Likewise.
15653 * lib/lbitset.h: Likewise.
15654
15655 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15656 All instances of parameters of type enum bitset_opts are now of
15657 type enum_bitset_opts, to conform to the C Standard, and similarly
15658 for enum_bitset_type.
15659 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15660 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15661
15662 Do not use "struct bitset_struct" to mean different things in
15663 different modules. Not only is this confusing, it violates
15664 the C Standard, which requires that structure types in different
15665 modules must be compatible if one is to be passed to the other.
15666 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15667 All instances of "struct bitset_struct *" replaced with "bitset".
15668 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15669 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15670 struct lbitset_struct, struct bitset_stats_struct): New types.
15671 All uses of struct bitset_struct changed to union bitset_union,
15672 etc.
15673 * lib/abitset.c (struct abitset_struct, abitset,
15674 struct bitset_struct): Remove.
15675 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15676 struct bitset_struct): Remove.
15677 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15678 bitset_struct): Remove.
15679 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15680 Likewise.
15681
15682 Do not call a function of type T using a call that assumes the
15683 function is of a different type U. Standard C requires that a
15684 function must be called with a type that is compatible with its
15685 definition.
15686 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15687 New decls.
15688 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15689 New functions.
15690 * lib/ebitset.c (PFV): Remove.
15691 * lib/lbitset.c (PFV): Likewise.
15692 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15693 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15694 decls.
15695 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15696 (ebitset_vtable): Use them.
15697 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15698 lbitset_xor): New functions.
15699 (lbitset_vtable): Use them.
15700
15701 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15702 Declare.
15703
15704 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15705 GCC warning.
15706 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15707 Use offsetof, for simplicity.
15708
15709 2002-10-06 Paul Eggert <eggert@twinsun.com>
15710
15711 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15712 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15713 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15714 which was inadvertently undone by the 2002-09-30 patch.
15715 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15716 the same width as int.
15717
15718 2002-10-04 Paul Eggert <eggert@twinsun.com>
15719
15720 Version 1.50.
15721
15722 * configure.ac (AC_INIT), NEWS: Increment version number.
15723
15724 * doc/bison.texinfo: Minor spelling, grammar, and white space
15725 fixes.
15726 (Symbols): Mention that any negative value returned from yylex
15727 signifies end-of-input. Warn about negative chars. Mention
15728 the portable Standard C character set.
15729
15730 The GNU coding standard says CFLAGS and YFLAGS are reserved
15731 for the installer to set.
15732 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15733 * src/Makefile.am (AM_CFLAGS): Likewise.
15734 (AM_YFLAGS): Renamed from YFLAGS.
15735
15736 Fix some MAX and MIN problems.
15737 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15738 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15739 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15740 * src/reader.c (reader): Use it.
15741
15742 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15743 POSIX 1003.1-2001 has removed fgrep.
15744
15745 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15746
15747 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15748 interpreted as signed.
15749 * lib/ebitset.c (ebitset_list): Fix bug.
15750
15751 2002-10-01 Paul Eggert <eggert@twinsun.com>
15752
15753 More fixes for 64-bit hosts and large bitsets.
15754
15755 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15756 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15757 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15758 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15759 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15760 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15761 bitset_count_): Likewise.
15762 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15763 bitset_first, bitset_last): Likewise.
15764 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15765 bitset_stats_list_reverse, bitset_stats_size,
15766 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15767 Likewise.
15768 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15769 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15770 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15771 bitsetv_reflexive_transitive_closure): Likewise.
15772 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15773 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15774 Likewise.
15775 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15776 Likewise.
15777
15778 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15779 Use size_t, not unsigned int, to count bytes.
15780 * lib/abitset.h (abitset_bytes): Likewise.
15781 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15782 Likewise.
15783 * lib/bitset.h (bitset_bytes): Likewise.
15784 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15785 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15786 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15787 * lib/ebitset.c (ebitset_bytes): Likewise.
15788 * lib/ebitset.h (ebitset_bytes): Likewise.
15789 * lib/lbitset.c (lbitset_bytes): Likewise.
15790 * lib/lbitset.h (lbitset_bytes): Likewise.
15791
15792 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15793 abitset_subset_p, abitset_disjoint_p, abitset_and,
15794 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15795 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15796 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15797 abitset_or_and, abitset_or_and_cmp):
15798 Use bitset_windex instead of unsigned int.
15799 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15800 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15801 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15802 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15803 Likewise.
15804 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15805
15806 * lib/bitset.c (bitset_print):
15807 Use proper printf formats for widths of integer types.
15808 * lib/bitset_stats.c (bitset_percent_histogram_print,
15809 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15810 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15811 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15812 * lib/lbitset.c (lbitset_bytes): Likewise.
15813
15814 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15815 BITSET_SIZE_MAX): New macros.
15816 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15817 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15818 to BITSET_WINDEX_MAX.
15819
15820 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15821 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15822 since we now return the bitset_bindex type (not int).
15823
15824 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15825 when computing sizes.
15826 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15827
15828 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15829 and avoid cast to unsigned.
15830
15831 2002-09-30 Akim Demaille <akim@epita.fr>
15832
15833 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15834 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15835 Updates from Michael Hayes.
15836
15837 2002-09-30 Art Haas <ahaas@neosoft.com>
15838
15839 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15840 invocations.
15841 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15842 defined.
15843
15844 2002-09-27 Akim Demaille <akim@epita.fr>
15845
15846 Version 1.49c.
15847
15848 2002-09-27 Akim Demaille <akim@epita.fr>
15849
15850 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15851 (Because of AC_LIBSOURCE).
15852
15853 2002-09-27 Akim Demaille <akim@epita.fr>
15854
15855 Playing with Autoscan.
15856
15857 * configure.ac: Remove the old LIBOBJ tweaks.
15858 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15859 * lib/strrchr.c: New.
15860 * lib/strtol.c: New, from the Coreutils 4.5.1.
15861
15862 2002-09-27 Akim Demaille <akim@epita.fr>
15863
15864 Playing with Autoscan.
15865
15866 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15867 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15868 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15869 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15870 Coreutils 4.5.1.
15871
15872 2002-09-24 Akim Demaille <akim@epita.fr>
15873
15874 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15875 (Frequently Asked Questions, Parser Stack Overflow): New.
15876
15877 2002-09-13 Akim Demaille <akim@epita.fr>
15878
15879 Playing with autoscan.
15880
15881 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15882 * src/files.c (skeleton_find): Remove, unused.
15883 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15884 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15885
15886 2002-09-13 Akim Demaille <akim@epita.fr>
15887
15888 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15889 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15890
15891 2002-09-13 Akim Demaille <akim@epita.fr>
15892
15893 * configure.ac: Require 2.54.
15894 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15895 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15896 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15897 Remove, provided by Autoconf macros.
15898
15899 2002-09-12 Akim Demaille <akim@epita.fr>
15900
15901 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15902
15903 2002-09-12 Akim Demaille <akim@epita.fr>
15904
15905 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15906 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15907 Reported by Martin Mokrejs.
15908
15909 2002-09-10 Akim Demaille <akim@epita.fr>
15910
15911 * src/parse-gram.y: Associate a human readable string to each
15912 token type.
15913 * tests/regression.at (Invalid inputs): Adjust.
15914
15915 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15916
15917 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15918 with an Autoconf-2.5x style configure.ac.
15919
15920 2002-09-06 Paul Eggert <eggert@twinsun.com>
15921
15922 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15923 exception applies only to yacc.c. This is a modification of a
15924 patch originally suggested by Akim Demaille.
15925
15926 2002-09-06 Akim Demaille <akim@epita.fr>
15927
15928 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15929 here to...
15930 * data/yacc.c: here.
15931
15932 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15933 LocationType.
15934 (b4_ltype): Default to yy::Location from location.hh.
15935
15936 2002-09-04 Jim Meyering <jim@meyering.net>
15937
15938 * data/yacc.c: Guard the declaration of yytoknum also with
15939 `#ifdef YYPRINT', so it is declared only when used.
15940
15941 2002-09-04 Akim Demaille <akim@epita.fr>
15942
15943 * configure.in: Rename as...
15944 * configure.ac: this.
15945 Bump to 1.49c.
15946
15947 2002-09-04 Akim Demaille <akim@epita.fr>
15948
15949 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15950 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15951 translate maintainer only messages.
15952
15953 2002-08-12 Paul Eggert <eggert@twinsun.com>
15954
15955 Version 1.49b.
15956
15957 * Makefile.am (SUBDIRS): Remove intl.
15958 (DISTCLEANFILES): Remove.
15959 * NEWS: Mention that GNU M4 is now required. Clarify what is
15960 meant by "larger grammars". Mention the pt_BR translation.
15961 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15962 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15963 Bump version from 0.11.2 to 0.11.5.
15964 (BISON_PREREQ_STAGE): Remove.
15965 (AM_GNU_GETTEXT): Use external gettext.
15966 (AC_OUTPUT): Remove intl/Makefile.
15967
15968 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15969
15970 * data/glr.c: Include string.h, for strlen.
15971 (yyreportParseError): Use size_t for yysize.
15972 (yy_yypstack): No longer nested inside yypstates, as nested
15973 functions are not portable. Do not assume size_t is the
15974 same width as int.
15975 (yypstates): Do not assume that ptrdiff_t is the same width
15976 as int, and similarly for yyposn and YYINDEX.
15977
15978 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15979
15980 * lib/Makefile.am (INCLUDES): Do not include from the intl
15981 directory, which has been removed.
15982 * src/Makefile.am (INCLUDES): Likewise.
15983
15984 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15985 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15986 New vars.
15987
15988 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15989 * tests/Makefile.am (EXTRA_DIST): Likewise.
15990
15991 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15992 Do not assume that bitset_windex is the same width as unsigned.
15993
15994 * lib/abitset.c (abitset_unused_clear): Do not assume that
15995 bitset_word is the same width as int.
15996 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15997 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15998 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15999 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16000 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16001
16002 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16003 portability to one's complement hosts!).
16004 * lib/ebitset.c (ebitset_op1): Likewise.
16005 * lib/lbitset.c (lbitset_op1): Likewise.
16006
16007 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16008 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16009 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16010 Sync with fileutils.
16011 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16012 lib/gettext.h: Sync with diffutils.
16013
16014 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16015 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16016
16017 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16018 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16019 check for void *.
16020
16021 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16022 size_t; the old version tried to do this but casted improperly.
16023 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16024 (bitset_test): Now returns int, not unsigned long.
16025
16026 * lib/bitset_stats.c: Include "gettext.h".
16027 (_): New macro.
16028 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16029 name locals "index", as it generates unnecessary warnings on some
16030 hosts that have an "index" function.
16031
16032 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16033 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16034 they need translation.
16035 * src/LR0.c (state_list_append, new_itemsets, get_state,
16036 append_states, generate_states): Likewise.
16037 * src/assoc.c (assoc_to_string): Likewise.
16038 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16039 * src/gram.c (grammar_dump): Likewise.
16040 * src/injections.c (injections_compute): Likewise.
16041 * src/lalr.c (lookaheads_print): Likewise.
16042 * src/relation.c (relation_transpose): Likewise.
16043 * src/scan-gram.l: Likewise.
16044 * src/tables.c (table_grow, pack_vector): Likewise.
16045
16046 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16047 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16048 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16049 * m4/mbstate_t.m4: Sync with fileutils.
16050 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16051
16052 * po/LINGUAS: Add pt_BR.
16053 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16054 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16055 lib/timevar.c.
16056 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16057 manual recommends.
16058 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16059
16060 * src/complain.c (strerror_r): Remove decl; not needed.
16061 (strerror): Use same pattern as ../lib/error.c.
16062
16063 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16064
16065 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16066
16067 * src/main.c (main): Cast result of bindtextdomain and textdomain
16068 to void, to avoid a GCC warning when --disable-nls is in effect.
16069
16070 * src/scan-gram.l: Use strings rather than escapes when possible,
16071 to minimize the number of warnings from xgettext.
16072 (handle_action_dollar, handle_action_at): Don't use isdigit,
16073 as it mishandles negative chars and it may not work as expected
16074 outside the C locale.
16075
16076 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16077 this is a GCC extension and is not portable to other compilers.
16078
16079 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16080 Do not include <ctype.h>; no longer needed.
16081 Do not include <malloc.h>; no longer needed (and generates
16082 warnings on OpenBSD 3.0).
16083
16084 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16085 it's not portable.
16086
16087 * tests/regression.at: Do not use 'cc -c input.c -o input';
16088 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16089
16090 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16091 exit status as failure, not just exit status 1. Sun C exits
16092 with status 2 sometimes.
16093
16094 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16095 Use it for the two large tests.
16096
16097 2002-08-02 Akim Demaille <akim@epita.fr>
16098
16099 * src/conflicts.c (conflicts_output): Don't output rules never
16100 reduced here, since anyway that computation doesn't work.
16101 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16102 (rule_useless_p, rule_never_reduced_p): New.
16103 (grammar_rules_partial_print): Use a filter instead of a range.
16104 Display the title only if needed.
16105 (grammar_rules_print): Adjust.
16106 (grammar_rules_never_reduced_report): New.
16107 * src/tables.c (action_row): Move the computation of rules never
16108 reduced to...
16109 (token_actions): here.
16110 * src/main.c (main): Make the parser before making the report, so
16111 that rules never reduced are computed.
16112 Call grammar_rules_never_reduced_report.
16113 * src/print.c (print_results): Report rules never reduced.
16114 * tests/conflicts.at, tests/reduce.at: Adjust.
16115
16116 2002-08-01 Akim Demaille <akim@epita.fr>
16117
16118 Instead of attaching lookaheads and duplicating the rules being
16119 reduced by a state, attach the lookaheads to the reductions.
16120
16121 * src/state.h (state_t): Remove the `lookaheads',
16122 `lookaheads_rule' member.
16123 (reductions_t): Add a `lookaheads' member.
16124 Use a regular array for the `rules'.
16125 * src/state.c (reductions_new): Initialize the lookaheads member
16126 to 0.
16127 (state_rule_lookaheads_print): Adjust.
16128 * src/state.h, src/state.c (state_reductions_find): New.
16129 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16130 (count_rr_conflicts): Adjust.
16131 * src/lalr.c (LArule): Remove.
16132 (add_lookback_edge): Adjust.
16133 (state_lookaheads_count): New.
16134 (states_lookaheads_initialize): Merge into...
16135 (initialize_LA): this.
16136 (lalr_free): Adjust.
16137 * src/main.c (main): Don't free nullable and derives too early: it
16138 is used by --verbose.
16139 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16140
16141 2002-08-01 Akim Demaille <akim@epita.fr>
16142
16143 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16144 `rule_number_t**'.
16145 (set_derives, free_derives): Rename as...
16146 (derives_compute, derives_free): this.
16147 Adjust all dependencies.
16148 * src/nullable.c (set_nullable, free_nullable): Rename as...
16149 (nullable_compute, nullable_free): these.
16150 (rule_list_t): Store rule_t *, not rule_number_t.
16151 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16152 pointers, instead of their numbers.
16153 * src/main.c (main): Call nullable_free, and derives_free earlier,
16154 as they were lo longer used.
16155
16156 2002-08-01 Akim Demaille <akim@epita.fr>
16157
16158 * lib/timevar.c (get_time): Include children time.
16159 * src/lalr.h (LA, LArule): Don't export them: used with the
16160 state_t.
16161 * src/lalr.c (LA, LArule): Static.
16162 * src/lalr.h, src/lalr.c (lalr_free): New.
16163 * src/main.c (main): Call it.
16164 * src/tables.c (pack_vector): Check whether loc is >= to the
16165 table_size, not >.
16166 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16167 (tables_generate): do it, since that's also it which allocates
16168 them.
16169 Don't free LA and LArule, main does.
16170
16171 2002-07-31 Akim Demaille <akim@epita.fr>
16172
16173 Separate parser tables computation and output.
16174
16175 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16176 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16177 (yydefgoto, yydefact, high): Move to...
16178 * src/tables.h, src/tables.c: here.
16179 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16180 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16181 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16182 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16183 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16184 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16185 (action_row, save_row, token_actions, save_column, default_goto)
16186 (goto_actions, sort_actions, matching_state, pack_vector)
16187 (table_ninf_remap, pack_table, prepare_actions): Move to...
16188 * src/tables.c: here.
16189 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16190 * src/output.c (token_actions, output_base, output_conflicts)
16191 (output_check): Merge into...
16192 (prepare_actions): this.
16193 (actions_output): Rename as...
16194 (user_actions_output): this.
16195 * src/main.c (main): Call tables_generate and tables_free.
16196
16197 2002-07-31 Akim Demaille <akim@epita.fr>
16198
16199 Steal GCC's --time-report support.
16200
16201 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16202 stolen/adjusted from GCC.
16203 * m4/stage.m4: Remove time related checks.
16204 * m4/timevar.m4: New.
16205 * configure.in: Adjust.
16206 * src/system.h: Adjust to using timevar.h.
16207 * src/getargs.h, src/getargs.c: Support trace_time for
16208 --trace=time.
16209 * src/main.c (stage): Remove.
16210 (main): Replace `stage' invocations with timevar calls.
16211 * src/output.c: Insert pertinent timevar calls.
16212
16213 2002-07-31 Akim Demaille <akim@epita.fr>
16214
16215 Let --trace have arguments.
16216
16217 * src/getargs.h (enum trace_e): New.
16218 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16219 (long_options, short_options): --trace/-T takes an optional
16220 argument.
16221 Change all the uses of trace_flag to reflect the new flags.
16222 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16223
16224 Strengthen `stage' portability.
16225
16226 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16227 * configure.in: Use it.
16228 Don't check for malloc.h and sys/times.h.
16229 * src/system.h: Include them when appropriate.
16230 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16231 times and struct tms are available.
16232
16233 2002-07-30 Akim Demaille <akim@epita.fr>
16234
16235 In verbose parse error message, don't report `error' as an
16236 expected token.
16237 * tests/actions.at (Printers and Destructors): Adjust.
16238 * tests/calc.at (Calculator $1): Adjust.
16239 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16240 error message, do not report the parser accepts the error token in
16241 that state.
16242
16243 2002-07-30 Akim Demaille <akim@epita.fr>
16244
16245 Normalize conflict related messages.
16246
16247 * src/complain.h, src/complain.c (warn, complain): New.
16248 * src/conflicts.c (conflicts_print): Use them.
16249 (conflict_report_yacc): New, extracted from...
16250 (conflicts_print): here.
16251 * tests/conflicts.at, tests/existing.at: Adjust.
16252
16253 2002-07-30 Akim Demaille <akim@epita.fr>
16254
16255 Report rules which are never reduced by the parser: those hidden
16256 by conflicts.
16257
16258 * src/LR0.c (save_reductions): Don't make the final state too
16259 different: save its reduction (accept) instead of having a state
16260 without any action (no shift or goto, no reduce).
16261 Note: the final state is now a ``regular'' state, i.e., the
16262 parsers now contain `reduce 0' as default reduction.
16263 Nevertheless, since they decide to `accept' when yystate =
16264 final_state, they still will not reduce rule 0.
16265 * src/print.c (print_actions, print_reduction): Adjust.
16266 * src/output.c (action_row): Track reduced rules.
16267 (token_actions): Report rules never reduced.
16268 * tests/conflicts.at, tests/regression.at: Adjust.
16269
16270 2002-07-30 Akim Demaille <akim@epita.fr>
16271
16272 `stage' was accidently included in a previous patch.
16273 Initiate its autoconfiscation.
16274
16275 * configure.in: Look for malloc.h and sys/times.h.
16276 * src/main.c (stage): Adjust.
16277 Report only when trace_flag.
16278
16279 2002-07-29 Akim Demaille <akim@epita.fr>
16280
16281 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16282 state_number_t.
16283 (errs_t): symbol_t*, not symbol_number_t.
16284 (reductions_t): rule_t*, not rule_number_t.
16285 (FOR_EACH_SHIFT): New.
16286 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16287 * src/print.c, src/print_graph.c: Adjust.
16288
16289 2002-07-29 Akim Demaille <akim@epita.fr>
16290
16291 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16292
16293 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16294 (endtoken, accept): these.
16295 * src/reader.c (reader): Set endtoken's default tag to "$end".
16296 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16297 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16298 Adjust.
16299
16300 2002-07-29 Akim Demaille <akim@epita.fr>
16301
16302 * src/reduce.c (reduce_grammar): When the language is empty,
16303 complain about the start symbol, not the axiom.
16304 Use its location.
16305 * tests/reduce.at (Empty Language): New.
16306
16307 2002-07-26 Akim Demaille <akim@epita.fr>
16308
16309 * src/reader.h, src/reader.c (gram_error): ... can't get
16310 yycontrol without making too strong assumptions on the parser
16311 itself.
16312 * src/output.c (prepare_tokens): Use the real 0th value of
16313 token_translations instead of `0'.
16314 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16315 visible here.
16316 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16317 for the time being: %locations ought to provide it to yyerror.
16318
16319 2002-07-25 Akim Demaille <akim@epita.fr>
16320
16321 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16322 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16323 * tests/regression.at (Web2c Actions): Adjust.
16324
16325 2002-07-25 Akim Demaille <akim@epita.fr>
16326
16327 Stop storing rules from 1 to nrules + 1.
16328
16329 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16330 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16331 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16332 Iterate from 0 to nrules.
16333 Use rule_number_as_item_number and item_number_as_rule_number.
16334 Adjust to `derive' now containing possibly 0.
16335 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16336 Handle the `- 1' part in rule numbers from/to item numbers.
16337 * src/conflicts.c (log_resolution): Fix the message which reversed
16338 shift and reduce.
16339 * src/output.c (action_row): Initialize default_rule to -1.
16340 (token_actions): Adjust.
16341 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16342 expected output.
16343 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16344
16345 2002-07-25 Akim Demaille <akim@epita.fr>
16346
16347 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16348 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16349 (b4_c_knr_arg_decl): New.
16350 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16351 yyreport_parse_error.
16352
16353 2002-07-25 Akim Demaille <akim@epita.fr>
16354
16355 * data/yacc.c (yyreport_parse_error): New, extracted from...
16356 (yyparse): here.
16357 (yydestruct, yysymprint): Move above yyparse.
16358 Be K&R compliant.
16359
16360 2002-07-25 Akim Demaille <akim@epita.fr>
16361
16362 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16363 replace...
16364 (b4_sint_type, b4_uint_type): these.
16365 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16366 * tests/regression.at (Web2c Actions): Adjust.
16367
16368 2002-07-25 Akim Demaille <akim@epita.fr>
16369
16370 * src/gram.h (TIEM_NUMBER_MAX): New.
16371 (item_number_of_rule_number, rule_number_of_item_number): Rename
16372 as...
16373 (rule_number_as_item_number, item_number_as_rule_number): these.
16374 Adjust dependencies.
16375 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16376 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16377 (symbol_number_to_vector_number): New.
16378 (order): Of vector_number_t* type.
16379 (base_t, BASE_MAX, BASE_MIN): New.
16380 (froms, tos, width, pos, check): Of base_t type.
16381 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16382 (actrow): Of action_number_t type.
16383 (conflrow): Of unsigned int type.
16384 (table_ninf, base_ninf): New.
16385 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16386 (muscle_insert_int_table, muscle_insert_base_table)
16387 (muscle_insert_rule_number_table): New.
16388 (prepare_tokens): Output `toknum' as int_table.
16389 (action_row): Returns a rule_number_t.
16390 Use ACTION_MIN, not SHRT_MIN.
16391 (token_actions): yydefact is rule_number_t*.
16392 (table_ninf_remap): New.
16393 (pack_table): Use it for `base' and `table'.
16394 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16395 replaced with...
16396 (YYPACT_NINF, YYTABLE_NINF): these.
16397 (yypact, yytable): Compute their types instead of hard-coded
16398 `short'.
16399 * tests/regression.at (Web2c Actions): Adjust.
16400
16401 2002-07-19 Akim Demaille <akim@epita.fr>
16402
16403 * src/scan-gram.l (id): Can start with an underscore.
16404
16405 2002-07-16 Akim Demaille <akim@epita.fr>
16406
16407 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16408 Adjust all former `associativity' dependencies.
16409 * src/symtab.c (symbol_new): Default associativity is `undef', not
16410 `right'.
16411 (symbol_check_alias_consistence): Adjust.
16412
16413 2002-07-09 Akim Demaille <akim@epita.fr>
16414
16415 * doc/bison.texinfo: Properly set the ``header'' part.
16416 Use @dircategory ``GNU programming tools'' as per Texinfo's
16417 documentation.
16418 Use @copying.
16419
16420 2002-07-09 Akim Demaille <akim@epita.fr>
16421
16422 * lib/quotearg.h: Protect against multiple inclusions.
16423 * src/location.h (location_t): Add a `file' member.
16424 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16425 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16426 `error_one_per_line' support.
16427
16428 2002-07-09 Akim Demaille <akim@epita.fr>
16429
16430 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16431 * src/reader.c (lineno): Remove.
16432 Adjust all dependencies.
16433 (get_merge_function): Take a location and use complain_at.
16434 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16435 * tests/regression.at (Invalid inputs, Mixing %token styles):
16436 Adjust.
16437
16438 2002-07-09 Akim Demaille <akim@epita.fr>
16439
16440 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16441 recovery rule, and forbid extensions when --yacc.
16442 (gram_error): Use complain_at.
16443 * src/reader.c (reader): Exit if there were parse errors.
16444
16445 2002-07-09 Akim Demaille <akim@epita.fr>
16446
16447 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16448 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16449 Reported by R Blake <blakers@mac.com>.
16450
16451 2002-07-09 Akim Demaille <akim@epita.fr>
16452
16453 * data/yacc.c: Output the copyright notive in the header.
16454
16455 2002-07-03 Akim Demaille <akim@epita.fr>
16456
16457 * src/output.c (froms, tos): Are state_number_t.
16458 (save_column): sp, sp1, and sp2 are state_number_t.
16459 (prepare): Rename `final' as `final_state_number', `nnts' as
16460 `nterms_number', `nrules' as `rules_number', `nstates' as
16461 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16462 unused.
16463 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16464 * data/lalr1.cc (nsym_): Remove, unused.
16465
16466 2002-07-03 Akim Demaille <akim@epita.fr>
16467
16468 * src/lalr.h, src/lalr.c (goto_number_t): New.
16469 * src/lalr.c (goto_list_t): New.
16470 Propagate them.
16471 * src/nullable.c (rule_list_t): New.
16472 Propagate.
16473 * src/types.h: Remove.
16474
16475 2002-07-03 Akim Demaille <akim@epita.fr>
16476
16477 * src/closure.c (print_fderives): Use rule_rhs_print.
16478 * src/derives.c (print_derives): Use rule_rhs_print.
16479 (rule_list_t): New, replaces `shorts'.
16480 (set_derives): Add comments.
16481 * tests/sets.at (Nullable, Firsts): Adjust.
16482
16483 2002-07-03 Akim Demaille <akim@epita.fr>
16484
16485 * src/output.c (prepare_actions): Free `tally' and `width'.
16486 (prepare_actions): Allocate and free `order'.
16487 * src/symtab.c (symbols_free): Free `symbols'.
16488 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16489 * src/output.c (m4_invoke): Move to...
16490 * src/scan-skel.l: here.
16491 (<<EOF>>): Close yyout, and free its name.
16492
16493 2002-07-03 Akim Demaille <akim@epita.fr>
16494
16495 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16496
16497 * src/LR0.c (new_state): Merge into...
16498 (state_list_append): this.
16499 (new_states): Merge into...
16500 (generate_states): here.
16501 (set_states): Don't ensure a proper `errs' state member here, do it...
16502 * src/conflicts.c (conflicts_solve): here.
16503 * src/state.h, src/state.c: Comment changes.
16504 (state_t): Rename member `shifts' as `transitions'.
16505 Adjust all dependencies.
16506 (errs_new): For consistency, also take the values as argument.
16507 (errs_dup): Remove.
16508 (state_errs_set): New.
16509 (state_reductions_set, state_transitions_set): Assert that no
16510 previous value was assigned.
16511 (state_free): New.
16512 (states_free): Use it.
16513 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16514 temporary storage: use `errs' and `nerrs' as elsewhere.
16515 (set_conflicts): Allocate and free this `errs'.
16516
16517 2002-07-02 Akim Demaille <akim@epita.fr>
16518
16519 * lib/libiberty.h: New.
16520 * lib: Update the bitset implementation from upstream.
16521 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16522 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16523 * src/main.c: Adjust bitset stats calls.
16524
16525 2002-07-01 Paul Eggert <eggert@twinsun.com>
16526
16527 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16528 char, so that negative chars don't collide with $.
16529
16530 2002-06-30 Akim Demaille <akim@epita.fr>
16531
16532 Have the GLR tests be `warning' checked, and fix the warnings.
16533
16534 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16535 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16536 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16537 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16538 (yyaddDeferredAction): static.
16539 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16540 (yyreportParseError): yyprefix is const.
16541 yytokenp is used only when verbose.
16542 (yy__GNUC__): Replace with __GNUC__.
16543 (yypdumpstack): yyi is size_t.
16544 (yypreference): Un-yy local variables and arguments, to avoid
16545 clashes with `yyr1'. Anyway, we are not in the user name space.
16546 (yytname_size): be an int, as is compared with ints.
16547 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16548 Use them.
16549 * tests/cxx-gram.at: Use quotation to protect $1.
16550 Use AT_COMPILE to enable warnings hunts.
16551 Prototype yylex and yyerror.
16552 `Use' argc.
16553 Include `string.h', not `strings.h'.
16554 Produce and prototype stmtMerge only when used.
16555 yylex takes a location.
16556
16557 2002-06-30 Akim Demaille <akim@epita.fr>
16558
16559 We spend a lot of time in quotearg, in particular when --verbose.
16560
16561 * src/symtab.c (symbol_get): Store a quoted version of the key.
16562 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16563 Adjust all callers.
16564
16565 2002-06-30 Akim Demaille <akim@epita.fr>
16566
16567 * src/state.h (reductions_t): Rename member `nreds' as num.
16568 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16569 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16570
16571 2002-06-30 Akim Demaille <akim@epita.fr>
16572
16573 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16574 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16575 (shifts_to): Rename as...
16576 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16577 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16578 (TRANSITION_IS_DISABLED, transitions_to): these.
16579
16580 2002-06-30 Akim Demaille <akim@epita.fr>
16581
16582 * src/print.c (print_shifts, print_gotos): Merge into...
16583 (print_transitions): this.
16584 (print_transitions, print_errs, print_reductions): Align the
16585 lookaheads columns.
16586 (print_core, print_transitions, print_errs, print_state,
16587 print_grammar): Output empty lines separator before, not after.
16588 (state_default_rule_compute): Rename as...
16589 (state_default_rule): this.
16590 * tests/conflicts.at (Defaulted Conflicted Reduction),
16591 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16592 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16593
16594 2002-06-30 Akim Demaille <akim@epita.fr>
16595
16596 Display items as we display rules.
16597
16598 * src/gram.h, src/gram.c (rule_lhs_print): New.
16599 * src/gram.c (grammar_rules_partial_print): Use it.
16600 * src/print.c (print_core): Likewise.
16601 * tests/conflicts.at (Defaulted Conflicted Reduction),
16602 (Unresolved SR Conflicts): Adjust.
16603 (Unresolved SR Conflicts): Adjust and rename as...
16604 (Resolved SR Conflicts): this, as was meant.
16605 * tests/regression.at (Web2c Report): Adjust.
16606
16607 2002-06-30 Akim Demaille <akim@epita.fr>
16608
16609 * src/print.c (state_default_rule_compute): New, extracted from...
16610 (print_reductions): here.
16611 Pessimize, but clarify the code.
16612 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16613
16614 2002-06-30 Akim Demaille <akim@epita.fr>
16615
16616 * src/output.c (action_row): Let default_rule be always a rule
16617 number.
16618
16619 2002-06-30 Akim Demaille <akim@epita.fr>
16620
16621 * src/closure.c (print_firsts, print_fderives, closure):
16622 Use BITSET_EXECUTE.
16623 * src/lalr.c (lookaheads_print): Likewise.
16624 * src/state.c (state_rule_lookaheads_print): Likewise.
16625 * src/print_graph.c (print_core): Likewise.
16626 * src/print.c (print_reductions): Likewise.
16627 * src/output.c (action_row): Likewise.
16628 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16629
16630 2002-06-30 Akim Demaille <akim@epita.fr>
16631
16632 * src/print_graph.c: Use report_flag.
16633
16634 2002-06-30 Akim Demaille <akim@epita.fr>
16635
16636 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16637 to...
16638 * src/relation.h, src/relation.c (traverse, relation_digraph)
16639 (relation_print, relation_transpose): New.
16640
16641 2002-06-30 Akim Demaille <akim@epita.fr>
16642
16643 * src/state.h, src/state.c (shifts_to): New.
16644 * src/lalr.c (build_relations): Use it.
16645
16646 2002-06-30 Akim Demaille <akim@epita.fr>
16647
16648 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16649 (item_number_of_rule_number, rule_number_of_item_number): New.
16650 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16651 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16652 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16653 Propagate their use.
16654 Much remains to be done, in particular wrt `shorts' from types.h.
16655
16656 2002-06-30 Akim Demaille <akim@epita.fr>
16657
16658 * src/symtab.c (symbol_new): Initialize the `printer' member.
16659
16660 2002-06-30 Akim Demaille <akim@epita.fr>
16661
16662 * src/LR0.c (save_reductions): Remove, replaced by...
16663 * src/state.h, src/state.c (state_reductions_set): New.
16664 (reductions, errs): Rename as...
16665 (reductions_t, errs_t): these.
16666 Adjust all dependencies.
16667
16668 2002-06-30 Akim Demaille <akim@epita.fr>
16669
16670 * src/LR0.c (state_list_t, state_list_append): New.
16671 (first_state, last_state): Now symbol_list_t.
16672 (this_state): Remove.
16673 (new_itemsets, append_states, save_reductions): Take a state_t as
16674 argument.
16675 (set_states, generate_states): Adjust.
16676 (save_shifts): Remove, replaced by...
16677 * src/state.h, src/state.c (state_shifts_set): New.
16678 (shifts): Rename as...
16679 (shifts_t): this.
16680 Adjust all dependencies.
16681 * src/state.h (state_t): Remove the `next' member.
16682
16683 2002-06-30 Akim Demaille <akim@epita.fr>
16684
16685 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16686 escaped in slot 0.
16687
16688 2002-06-30 Akim Demaille <akim@epita.fr>
16689
16690 Use hash.h for the state hash table.
16691
16692 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16693 (allocate_storage): Use state_hash_new.
16694 (free_storage): Use state_hash_free.
16695 (new_state, get_state): Adjust.
16696 * src/lalr.h, src/lalr.c (states): Move to...
16697 * src/states.h (state_t): Remove the `link' member, no longer
16698 used.
16699 * src/states.h, src/states.c: here.
16700 (state_hash_new, state_hash_free, state_hash_lookup)
16701 (state_hash_insert, states_free): New.
16702 * src/states.c (state_table, state_compare, state_hash): New.
16703 * src/output.c (output_actions): Do not free states now, since we
16704 still need to know the final_state number in `prepare', called
16705 afterwards. Do it...
16706 * src/main.c (main): here: call states_free after `output'.
16707
16708 2002-06-30 Akim Demaille <akim@epita.fr>
16709
16710 * src/state.h, src/state.c (state_new): New, extracted from...
16711 * src/LR0.c (new_state): here.
16712 * src/state.h (STATE_ALLOC): Move to...
16713 * src/state.c: here.
16714 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16715 * src/state.h, src/state.c: here.
16716
16717 2002-06-30 Akim Demaille <akim@epita.fr>
16718
16719 * src/reader.c (gensym): Rename as...
16720 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16721 (getsym): Rename as...
16722 (symbol_get): this.
16723
16724 2002-06-30 Akim Demaille <akim@epita.fr>
16725
16726 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16727 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16728 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16729 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16730
16731 2002-06-30 Akim Demaille <akim@epita.fr>
16732
16733 Make the test suite pass with warnings checked.
16734
16735 * tests/actions.at (Printers and Destructors): Improve.
16736 Avoid unsigned vs. signed issues.
16737 * tests/calc.at: Don't exercise the scanner here, do it...
16738 * tests/input.at (Torturing the Scanner): here.
16739
16740 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16741
16742 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16743 reorganize first lines parallel to yacc.c.
16744
16745 2002-06-28 Akim Demaille <akim@epita.fr>
16746
16747 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16748 (b4_token_enum, b4_token_defines): New, factored from...
16749 * data/lalr1.cc, data/yacc.c, glr.c: here.
16750
16751 2002-06-28 Akim Demaille <akim@epita.fr>
16752
16753 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16754 unused variables.
16755 * src/output.c (merger_output): static.
16756
16757 2002-06-28 Akim Demaille <akim@epita.fr>
16758
16759 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16760 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16761 pacify GCC.
16762 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16763
16764 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16765
16766 Accumulated changelog for new GLR parsing features.
16767
16768 * src/conflicts.c (count_total_conflicts): Change name to
16769 conflicts_total_count.
16770 * src/conflicts.h: Ditto.
16771 * src/output.c (token_actions): Use the new name.
16772 (output_conflicts): Change conflp => conflict_list_heads, and
16773 confl => conflict_list for better readability.
16774 * data/glr.c: Use the new names.
16775 * NEWS: Add self to GLR announcement.
16776
16777 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16778
16779 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16780 Akim Demaille.
16781
16782 * data/bison.glr: Change name to glr.c
16783 * data/glr.c: Renamed from bison.glr.
16784 * data/Makefile.am: Add glr.c
16785
16786 * src/getargs.c:
16787
16788 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16789 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16790
16791 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16792
16793 * data/bison.glr: Be sure to restore the
16794 current #line when returning to the skeleton contents after having
16795 exposed the input file's #line.
16796
16797 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16798
16799 * data/bison.glr: Bring up to date with changes to bison.simple.
16800
16801 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16802
16803 * data/bison.glr: Correct definitions that use b4_prefix.
16804 Various reformatting.
16805 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16806 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16807 yytokenp argument; now part of stack.
16808 (yychar): Define to behave as documented.
16809 (yyclearin): Ditto.
16810
16811 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16812
16813 * src/reader.h: Add declaration for free_merger_functions.
16814
16815 * src/reader.c (merge_functions): New variable.
16816 (get_merge_function): New function.
16817 (free_merger_functions): New function.
16818 (readgram): Check for %prec that is not followed by a symbol.
16819 Handle %dprec and %merge declarations.
16820 (packgram): Initialize dprec and merger fields in rules array.
16821
16822 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16823 conflict_list_cnt, conflict_list_free): New variables.
16824 (table_grow): Also grow conflict_table.
16825 (prepare_rules): Output dprec and merger tables.
16826 (conflict_row): New function.
16827 (action_row): Output conflict lists for GLR parser. Don't use
16828 default reduction in conflicted states for GLR parser so that there
16829 are spaces for the conflict lists.
16830 (save_row): Also save conflict information.
16831 (token_actions): Allocate conflict list.
16832 (merger_output): New function.
16833 (pack_vector): Pack conflict table, too.
16834 (output_conflicts): New function to output yyconflp and yyconfl.
16835 (output_check): Allocate conflict_tos.
16836 (output_actions): Output conflict tables, also.
16837 (output_skeleton): Output b4_mergers definition.
16838 (prepare): Output b4_max_rhs_length definition.
16839 Use 'bison.glr' as default skeleton for GLR parsers.
16840
16841 * src/gram.c (glr_parser): New flag.
16842 (grammar_free): Call free_merger_functions.
16843
16844 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16845 all pairs of conflicting reductions, rather than just all tokens
16846 causing conflicts. Needed to size conflict tables.
16847 (conflicts_output): Modify call to count_rr_conflicts for new
16848 interface.
16849 (conflicts_print): Ditto.
16850 (count_total_conflicts): New function.
16851
16852 * src/reader.h (merger_list): New type.
16853 (merge_functions): New variable.
16854
16855 * src/lex.h (tok_dprec, tok_merge): New token types.
16856
16857 * src/gram.h (rule_s): Add dprec and merger fields.
16858 (glr_parser): New flag.
16859
16860 * src/conflicts.h (count_total_conflicts): New function.
16861
16862 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16863
16864 * doc/bison.texinfo (Generalized LR Parsing): New section.
16865 (GLR Parsers): New section.
16866 (Language and Grammar): Mention GLR parsing.
16867 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16868 Correct typo ("tge" -> "the").
16869
16870 * data/bison.glr: New skeleton for GLR parsing.
16871
16872 * tests/cxx-gram.at: New tests for GLR parsing.
16873
16874 * tests/testsuite.at: Include cxx-gram.at.
16875
16876 * tests/Makefile.am: Add cxx-gram.at.
16877
16878 * src/parse-gram.y:
16879
16880 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16881
16882 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16883
16884 2002-06-27 Akim Demaille <akim@epita.fr>
16885
16886 * src/options.h, src/options.c: Remove.
16887 * src/getargs.c (short_options, long_options): New.
16888
16889 2002-06-27 Akim Demaille <akim@epita.fr>
16890
16891 * data/bison.simple, data/bison.c++: Rename as...
16892 * data/yacc.c, data/lalr1.cc: these.
16893 * doc/bison.texinfo (Environment Variables): Remove.
16894
16895 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16896
16897 * src/getargs.c (report_argmatch): Initialize strtok().
16898
16899 2002-06-20 Akim Demaille <akim@epita.fr>
16900
16901 * data/bison.simple (b4_symbol_actions): New, replaces...
16902 (b4_symbol_destructor, b4_symbol_printer): these.
16903 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16904 user token numbers.
16905
16906 2002-06-20 Akim Demaille <akim@epita.fr>
16907
16908 * data/bison.simple (yydestructor): Rename as...
16909 (yydestruct): this.
16910
16911 2002-06-20 Akim Demaille <akim@epita.fr>
16912
16913 * src/symtab.h, src/symtab.c (symbol_type_set)
16914 (symbol_destructor_set, symbol_precedence_set): The location is
16915 the last argument.
16916 Adjust all callers.
16917
16918 2002-06-20 Akim Demaille <akim@epita.fr>
16919
16920 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16921 internals.
16922 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16923 Takes a location.
16924 * src/symtab.h, src/symtab.c (symbol_class_set)
16925 (symbol_user_token_number_set): Likewise.
16926 Adjust all callers.
16927 Promote complain_at.
16928 * tests/input.at (Type Clashes): Adjust.
16929
16930 2002-06-20 Akim Demaille <akim@epita.fr>
16931
16932 * data/bison.simple (YYLEX): Fix the declaration when
16933 %pure-parser.
16934
16935 2002-06-20 Akim Demaille <akim@epita.fr>
16936
16937 * data/bison.simple (yysymprint): Don't print the token number,
16938 just its name.
16939 * tests/actions.at (Destructors): Rename as...
16940 (Printers and Destructors): this.
16941 Also exercise %printer.
16942
16943 2002-06-20 Akim Demaille <akim@epita.fr>
16944
16945 * data/bison.simple (YYDSYMPRINT): New.
16946 Use it to remove many of the #if YYDEBUG/if (yydebug).
16947
16948 2002-06-20 Akim Demaille <akim@epita.fr>
16949
16950 * src/symtab.h, src/symtab.c (symbol_t): printer and
16951 printer_location are new members.
16952 (symbol_printer_set): New.
16953 * src/parse-gram.y (PERCENT_PRINTER): New token.
16954 Handle its associated rule.
16955 * src/scan-gram.l: Adjust.
16956 (handle_destructor_at, handle_destructor_dollar): Rename as...
16957 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16958 * src/output.c (symbol_printers_output): New.
16959 (output_skeleton): Call it.
16960 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16961 since there are already many grammar files with a user `yyprint'.
16962 Replace the calls to YYPRINT to calls to yysymprint.
16963 * tests/calc.at: Adjust.
16964 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16965 taking advantage of parser very internal details (stack size!).
16966
16967 2002-06-20 Akim Demaille <akim@epita.fr>
16968
16969 * src/scan-gram.l: Complete the scanner with the missing patterns
16970 to pacify Flex.
16971 Use `quote' and `symbol_tag_get' where appropriate.
16972
16973 2002-06-19 Akim Demaille <akim@epita.fr>
16974
16975 * tests/actions.at (Destructors): Augment to test locations.
16976 * data/bison.simple (yydestructor): Pass it the current location
16977 if locations are enabled.
16978 Prototype only when __STDC__ or C++.
16979 Change the argument names to move into the yy name space: there is
16980 user code here.
16981
16982 2002-06-19 Akim Demaille <akim@epita.fr>
16983
16984 * data/bison.simple (b4_pure_if): New.
16985 Use it instead of #ifdef YYPURE.
16986
16987 2002-06-19 Akim Demaille <akim@epita.fr>
16988
16989 * data/bison.simple (b4_location_if): New.
16990 Use it instead of #ifdef YYLSP_NEEDED.
16991
16992 2002-06-19 Akim Demaille <akim@epita.fr>
16993
16994 Prepare @$ in %destructor, but currently don't bind it in the
16995 skeleton, as %location use is not cleaned up yet.
16996
16997 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16998 (handle_action_at): New.
16999 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17000 a braced_code_t and a location as additional arguments.
17001 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17002 unquote one when outputting `b4_dollar_dollar'.
17003 Adjust callers.
17004 * data/bison.simple (b4_eval): Remove.
17005 (b4_symbol_destructor): Adjust.
17006 * tests/input.at (Invalid @n): Adjust.
17007
17008 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17009
17010 * doc/bison.texinfo: Document ability to have multiple
17011 prologue sections.
17012
17013 2002-06-18 Akim Demaille <akim@epita.fr>
17014
17015 * src/files.c (compute_base_names): When computing the output file
17016 names from the input file name, strip the directory part.
17017
17018 2002-06-18 Akim Demaille <akim@epita.fr>
17019
17020 * data/bison.simple.new: Comment changes.
17021 Reported by Andreas Schwab.
17022
17023 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17024
17025 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17026 there are no `label `yyoverflowlab' defined but not used' warnings
17027 when yyoverflow is defined.
17028
17029 2002-06-18 Akim Demaille <akim@epita.fr>
17030
17031 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17032 new member.
17033 (symbol_destructor_set): Adjust.
17034 * src/output.c (symbol_destructors_output): Output the destructor
17035 locations.
17036 Output the symbol name.
17037 * data/bison.simple (b4_symbol_destructor): Adjust.
17038
17039 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17040 and Akim Demaille <akim@epita.fr>
17041
17042 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17043 what's left on the stack when the error recovery hits EOF.
17044 * tests/actions.at (Destructors): Complete to exercise this case.
17045
17046 2002-06-17 Akim Demaille <akim@epita.fr>
17047
17048 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17049 arguments is really empty, not only equal to `[]'.
17050 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17051 member.
17052 (symbol_destructor_set): New.
17053 * src/output.c (symbol_destructors_output): New.
17054 * src/reader.h (brace_code_t, current_braced_code): New.
17055 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17056 (handle_dollar): Rename as...
17057 (handle_action_dollar): this.
17058 (handle_destructor_dollar): New.
17059 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17060 (grammar_declaration): Use it.
17061 * data/bison.simple (yystos): Is always defined.
17062 (yydestructor): New.
17063 * tests/actions.at (Destructors): New.
17064 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17065
17066 2002-06-17 Akim Demaille <akim@epita.fr>
17067
17068 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17069 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17070 rule_length only when needed.
17071 * src/output.c (actions_output, token_definitions_output): Output
17072 the full M4 block.
17073 * src/symtab.c: Don't access directly to the symbol tag, use
17074 symbol_tag_get.
17075 * src/parse-gram.y: Use symbol_list_free.
17076
17077 2002-06-17 Akim Demaille <akim@epita.fr>
17078
17079 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17080 (symbol_list_prepend, get_type_name): Move to...
17081 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17082 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17083 Adjust all callers.
17084 (symbol_list_free): New.
17085 * src/scan-gram.l (handle_dollar): Takes a location.
17086 * tests/input.at (Invalid $n): Adjust.
17087
17088 2002-06-17 Akim Demaille <akim@epita.fr>
17089
17090 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17091 (symbol_list_prepend): New.
17092 * src/parse-gram.y (%union): `list' is a new member.
17093 (symbols.1): New, replaces...
17094 (terms_to_prec.1, nterms_to_type.1): these.
17095 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17096 Take a location as additional argument.
17097 Adjust all callers.
17098
17099 2002-06-15 Akim Demaille <akim@epita.fr>
17100
17101 * src/parse-gram.y: Move %token in the declaration section so that
17102 we don't depend upon CVS Bison.
17103
17104 2002-06-15 Akim Demaille <akim@epita.fr>
17105
17106 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17107 * src/print.c (print_core): Use it.
17108
17109 2002-06-15 Akim Demaille <akim@epita.fr>
17110
17111 * src/conflicts.c (log_resolution): Accept the rule involved in
17112 the sr conflicts instead of the lookahead number that points to
17113 that rule.
17114 (flush_reduce): Accept the current lookahead vector as argument,
17115 instead of the index in LA.
17116 (resolve_sr_conflict): Accept the current number of lookahead
17117 bitset to consider for the STATE, instead of the index in LA.
17118 (set_conflicts): Adjust.
17119 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17120
17121 2002-06-15 Akim Demaille <akim@epita.fr>
17122
17123 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17124 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17125 Adjust all dependencies.
17126 * src/lalr.c (initialize_lookaheads): Split into...
17127 (states_lookaheads_count, states_lookaheads_initialize): these.
17128 (lalr): Adjust.
17129
17130 2002-06-15 Akim Demaille <akim@epita.fr>
17131
17132 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17133 out of...
17134 (grammar_rules_print): here.
17135 * src/reduce.c (reduce_output): Use it.
17136 * tests/reduce.at (Useless Rules, Reduced Automaton)
17137 (Underivable Rules): Adjust.
17138
17139 2002-06-15 Akim Demaille <akim@epita.fr>
17140
17141 Copy BYacc's nice way to report the grammar.
17142
17143 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17144 New.
17145 Don't print the rules' location, it is confusing and useless.
17146 (rule_print): Use grammar_rhs_print.
17147 * src/print.c (print_grammar): Use grammar_rules_print.
17148
17149 2002-06-15 Akim Demaille <akim@epita.fr>
17150
17151 Complete and rationalize `useless thing' warnings.
17152
17153 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17154 (symbol_tag_print): New.
17155 Use them everywhere in place of accessing directly the tag member.
17156 * src/gram.h, src/gram.c (rule_print): New.
17157 Use it where a rule used to be printed `by hand'.
17158 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17159 (reduce_grammar_tables): Report the useless rules.
17160 (reduce_print): Useless things are a warning, not an error.
17161 Report it as such.
17162 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17163 (Reduced Automaton, Underivable Rules): Adjust.
17164 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17165 * tests/conflicts.at (Unresolved SR Conflicts)
17166 (Solved SR Conflicts): Adjust.
17167
17168 2002-06-15 Akim Demaille <akim@epita.fr>
17169
17170 Let symbols have a location.
17171
17172 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17173 (getsym): Adjust.
17174 Adjust all callers.
17175 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17176 Use location_t, not int.
17177 * src/symtab.c (symbol_check_defined): Take advantage of the
17178 location.
17179 * tests/regression.at (Invalid inputs): Adjust.
17180
17181 2002-06-15 Akim Demaille <akim@epita.fr>
17182
17183 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17184 (input): Don't try to initialize yylloc here, do it in the
17185 scanner.
17186 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17187 * src/gram.h (rule_t): Change line and action_line into location
17188 and action_location, of location_t type.
17189 Adjust all dependencies.
17190 * src/location.h, src/location.c (empty_location): New.
17191 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17192 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17193 (grammar_current_rule_symbol_append)
17194 (grammar_current_rule_action_append): Expect a location as argument.
17195 * src/reader.c (grammar_midrule_action): Adjust to attach an
17196 action's location as dummy symbol location.
17197 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17198 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17199 the line numbers.
17200
17201 2002-06-14 Akim Demaille <akim@epita.fr>
17202
17203 Grammar declarations may be found in the grammar section.
17204
17205 * src/parse-gram.y (rules_or_grammar_declaration): New.
17206 (declarations): Each declaration may end with a semicolon, not
17207 just...
17208 (grammar_declaration): `"%union"'.
17209 (grammar): Branch to rules_or_grammar_declaration.
17210
17211 2002-06-14 Akim Demaille <akim@epita.fr>
17212
17213 * src/main.c (main): Invoke scanner_free.
17214
17215 2002-06-14 Akim Demaille <akim@epita.fr>
17216
17217 * src/output.c (m4_invoke): Extracted from...
17218 (output_skeleton): here.
17219 Free tempfile.
17220
17221 2002-06-14 Akim Demaille <akim@epita.fr>
17222
17223 * src/parse-gram.y (directives, directive, gram)
17224 (grammar_directives, precedence_directives, precedence_directive):
17225 Rename as...
17226 (declarations, declaration, grammar, grammar_declaration)
17227 (precedence_declaration, precedence_declarator): these.
17228 (symbol_declaration): New.
17229
17230 2002-06-14 Akim Demaille <akim@epita.fr>
17231
17232 * src/files.c (action_obstack): Remove, unused.
17233 (output_obstack): Remove it, and all its dependencies, as it is no
17234 longer needed.
17235 * src/reader.c (epilogue_set): Build the epilogue in the
17236 muscle_obstack.
17237 * src/output.h, src/output.c (muscle_obstack): Move to...
17238 * src/muscle_tab.h, src/muscle_tab.h: here.
17239 (muscle_init): Initialize muscle_obstack.
17240 (muscle_free): New.
17241 * src/main.c (main): Call it.
17242
17243 2002-06-14 Akim Demaille <akim@epita.fr>
17244
17245 * src/location.h: New, extracted from...
17246 * src/reader.h: here.
17247 * src/Makefile.am (noinst_HEADERS): Merge into
17248 (bison_SOURCES): this.
17249 Add location.h.
17250 * src/parse-gram.y: Use location_t instead of Bison's.
17251 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17252 Use location_t instead of ints.
17253
17254 2002-06-14 Akim Demaille <akim@epita.fr>
17255
17256 * data/bison.simple, data/bison.c++: Be sure to restore the
17257 current #line when returning to the skeleton contents after having
17258 exposed the input file's #line.
17259
17260 2002-06-12 Akim Demaille <akim@epita.fr>
17261
17262 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17263 eager.
17264 * tests/actions.at (Exotic Dollars): New.
17265
17266 2002-06-12 Akim Demaille <akim@epita.fr>
17267
17268 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17269 ['"/] too eagerly.
17270 * tests/input.at (Torturing the Scanner): New.
17271
17272 2002-06-11 Akim Demaille <akim@epita.fr>
17273
17274 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17275 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17276 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17277 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17278 * src/reader.c (reader): Use it.
17279
17280 2002-06-11 Akim Demaille <akim@epita.fr>
17281
17282 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17283 Adjust all callers.
17284 (scanner_last_string_free): New.
17285
17286 2002-06-11 Akim Demaille <akim@epita.fr>
17287
17288 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17289 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17290 (last_string, YY_OBS_FREE): New.
17291 Use them when returning an ID.
17292
17293 2002-06-11 Akim Demaille <akim@epita.fr>
17294
17295 Have Bison grammars parsed by a Bison grammar.
17296
17297 * src/reader.c, src/reader.h (prologue_augment): New.
17298 * src/reader.c (copy_definition): Remove.
17299
17300 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17301 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17302 (grammar_current_rule_prec_set, grammar_current_rule_check)
17303 (grammar_current_rule_symbol_append)
17304 (grammar_current_rule_action_append): Export.
17305 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17306 (symbol_list_action_append): Remove.
17307 Hook the routines from reader.
17308 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17309 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17310
17311 * src/reader.c (read_declarations): Remove, unused.
17312
17313 * src/parse-gram.y: Handle the epilogue.
17314 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17315 (grammar_start_symbol_set): this.
17316 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17317 * src/reader.c (readgram): Remove, unused.
17318 (reader): Adjust to insert eoftoken and axiom where appropriate.
17319
17320 * src/reader.c (copy_dollar): Replace with...
17321 * src/scan-gram.h (handle_dollar): this.
17322 * src/parse-gram.y: Remove `%thong'.
17323
17324 * src/reader.c (copy_at): Replace with...
17325 * src/scan-gram.h (handle_at): this.
17326
17327 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17328 New.
17329
17330 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17331 time being.
17332
17333 * src/reader.h, src/reader.c (grammar_rule_end): New.
17334
17335 * src/parse.y (current_type, current_class): New.
17336 Implement `%nterm', `%token' support.
17337 Merge `%term' into `%token'.
17338 (string_as_id): New.
17339 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17340 type name.
17341
17342 * src/parse-gram.y: Be sure to handle properly the beginning of
17343 rules.
17344
17345 * src/parse-gram.y: Handle %type.
17346 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17347
17348 * src/parse-gram.y: More directives support.
17349 * src/options.c: No longer handle source directives.
17350
17351 * src/parse-gram.y: Fix %output.
17352
17353 * src/parse-gram.y: Handle %union.
17354 Use the prologue locations.
17355 * src/reader.c (parse_union_decl): Remove.
17356
17357 * src/reader.h, src/reader.c (epilogue_set): New.
17358 * src/parse-gram.y: Use it.
17359
17360 * data/bison.simple, data/bison.c++: b4_stype is now either not
17361 defined, then default to int, or to the contents of %union,
17362 without `union' itself.
17363 Adjust.
17364 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17365
17366 * src/output.c (actions_output): Don't output braces, as they are
17367 already handled by the scanner.
17368
17369 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17370 characters to themselves.
17371
17372 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17373 that the epilogue has a proper #line.
17374
17375 * src/parse-gram.y: Handle precedence/associativity.
17376
17377 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17378 a terminal.
17379 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17380 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17381 at all to define terminals that cannot be emitted.
17382
17383 * src/scan-gram.l: Escape M4 characters.
17384
17385 * src/scan-gram.l: Working properly with escapes in user
17386 strings/characters.
17387
17388 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17389 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17390 grammar.
17391 Use more modest sizes, as for the time being the parser does not
17392 release memory, and therefore the process swallows a huge amount
17393 of memory.
17394
17395 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17396 stricter %token grammar.
17397
17398 * src/symtab.h (associativity): Add `undef_assoc'.
17399 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17400 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17401
17402 * tests/regression.at (Invalid %directive): Remove, as it is now
17403 meaningless.
17404 (Invalid inputs): Adjust to the new error messages.
17405 (Token definitions): The new grammar doesn't allow too many
17406 eccentricities.
17407
17408 * src/lex.h, src/lex.c: Remove.
17409 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17410 (copy_character, copy_string2, copy_string, copy_identifier)
17411 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17412 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17413 (parse_action): Remove.
17414 * po/POTFILES.in: Adjust.
17415
17416 2002-06-11 Akim Demaille <akim@epita.fr>
17417
17418 * src/reader.c (parse_action): Don't store directly into the
17419 rule's action member: return the action as a string.
17420 Don't require `rule_length' as an argument: compute it.
17421 (grammar_current_rule_symbol_append)
17422 (grammar_current_rule_action_append): New, eved out from
17423 (readgram): here.
17424 Remove `action_flag', `rulelength', unused now.
17425
17426 2002-06-11 Akim Demaille <akim@epita.fr>
17427
17428 * src/reader.c (grammar_current_rule_prec_set).
17429 (grammar_current_rule_check): New, eved out from...
17430 (readgram): here.
17431 Remove `xaction', `first_rhs': useless.
17432 * tests/input.at (Type clashes): New.
17433 * tests/existing.at (GNU Cim Grammar): Adjust.
17434
17435 2002-06-11 Akim Demaille <akim@epita.fr>
17436
17437 * src/reader.c (grammar_midrule_action): New, Eved out from
17438 (readgram): here.
17439
17440 2002-06-11 Akim Demaille <akim@epita.fr>
17441
17442 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17443 New.
17444 (readgram): Use them as replacement of inlined code, crule and
17445 crule1.
17446
17447 2002-06-11 Akim Demaille <akim@epita.fr>
17448
17449 * src/reader.c (grammar_end, grammar_symbol_append): New.
17450 (readgram): Use them.
17451 Make the use of `p' as local as possible.
17452
17453 2002-06-10 Akim Demaille <akim@epita.fr>
17454
17455 GCJ's parser requires the tokens to be defined before the prologue.
17456
17457 * data/bison.simple: Output the token definition before the user's
17458 prologue.
17459 * tests/regression.at (Braces parsing, Duplicate string)
17460 (Mixing %token styles): Check the output from bison.
17461 (Early token definitions): New.
17462
17463 2002-06-10 Akim Demaille <akim@epita.fr>
17464
17465 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17466 assigning twice the same user number to a token, so that we can
17467 use it in...
17468 * src/lex.c (lex): here.
17469 Also use `symbol_class_set' instead of hand written code.
17470 * src/reader.c (parse_assoc_decl): Likewise.
17471
17472 2002-06-10 Akim Demaille <akim@epita.fr>
17473
17474 * src/symtab.c, src/symtab.c (symbol_class_set)
17475 (symbol_user_token_number_set): New.
17476 * src/reader.c (parse_token_decl): Use them.
17477 Use a switch instead of ifs.
17478 Use a single argument.
17479
17480 2002-06-10 Akim Demaille <akim@epita.fr>
17481
17482 Remove `%thong' support as it is undocumented, unused, duplicates
17483 `%token's job, and creates useless e-mail traffic with people who
17484 want to know what it is, why it is undocumented, unused, and
17485 duplicates `%token's job.
17486
17487 * src/reader.c (parse_thong_decl): Remove.
17488 * src/options.c (option_table): Remove "thong".
17489 * src/lex.h (tok_thong): Remove.
17490
17491 2002-06-10 Akim Demaille <akim@epita.fr>
17492
17493 * src/symtab.c, src/symtab.c (symbol_type_set)
17494 (symbol_precedence_set): New.
17495 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17496 (value_components_used): Remove, unused.
17497
17498 2002-06-09 Akim Demaille <akim@epita.fr>
17499
17500 Move symbols handling code out of the reader.
17501
17502 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17503 (axiom): Move to...
17504 * src/symtab.h, src/symtab.c: here.
17505
17506 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17507 * src/reader.c (startval): Rename as...
17508 * src/symtab.h, src/symtab.c (startsymbol): this.
17509 * src/reader.c: Adjust.
17510
17511 * src/reader.c (symbol_check_defined, symbol_make_alias)
17512 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17513 (token_translations_init)
17514 Move to...
17515 * src/symtab.c: here.
17516 * src/reader.c (packsymbols): Move to...
17517 * src/symtab.h, src/symtab.c (symbols_pack): here.
17518 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17519 argument.
17520
17521 2002-06-03 Akim Demaille <akim@epita.fr>
17522
17523 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17524 then statements.
17525
17526 2002-06-03 Akim Demaille <akim@epita.fr>
17527
17528 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17529 structs with non literals.
17530 * src/scan-skel.l: never-interactive.
17531 * src/conflicts.c (enum conflict_resolution_e): No trailing
17532 comma.
17533 * src/getargs.c (usage): Split long literal strings.
17534 Reported by Hans Aberg.
17535
17536 2002-05-28 Akim Demaille <akim@epita.fr>
17537
17538 * data/bison.c++: Use C++ ostreams.
17539 (cdebug_): New member.
17540
17541 2002-05-28 Akim Demaille <akim@epita.fr>
17542
17543 * src/output.c (output_skeleton): Be sure to allocate enough room
17544 for `/' _and_ for `\0' in full_skeleton.
17545
17546 2002-05-28 Akim Demaille <akim@epita.fr>
17547
17548 * data/bison.c++: Catch up with bison.simple:
17549 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17550 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17551 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17552 and popping traces.
17553
17554 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17555
17556 * src/output.c (output_skeleton): Put an explicit path in front of
17557 the skeleton file name, rather than relying on the -I directory,
17558 to partially alleviate effects of having a skeleton file lying around
17559 in the current directory.
17560
17561 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17562
17563 * src/conflicts.c (log_resolution): Correct typo:
17564 obstack_printf should be obstack_fgrow1.
17565
17566 2002-05-26 Akim Demaille <akim@epita.fr>
17567
17568 * src/state.h (state_t): `solved_conflicts' is a new member.
17569 * src/LR0.c (new_state): Set it to 0.
17570 * src/conflicts.h, src/conflicts.c (print_conflicts)
17571 (free_conflicts, solve_conflicts): Rename as...
17572 (conflicts_print, conflicts_free, conflicts_solve): these.
17573 Adjust callers.
17574 * src/conflicts.c (enum conflict_resolution_e)
17575 (solved_conflicts_obstack): New, used by...
17576 (log_resolution): this.
17577 Adjust to attach the conflict resolution to each state.
17578 Complete the description with the precedence/associativity
17579 information.
17580 (resolve_sr_conflict): Adjust.
17581 * src/print.c (print_state): Output its solved_conflicts.
17582 * tests/conflicts.at (Unresolved SR Conflicts)
17583 (Solved SR Conflicts): Exercise --report=all.
17584
17585 2002-05-26 Akim Demaille <akim@epita.fr>
17586
17587 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17588 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17589 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17590 (token_number_t, item_number_as_token_number)
17591 (token_number_as_item_number, muscle_insert_token_number_table):
17592 Rename as...
17593 (symbol_number_t, item_number_as_symbol_number)
17594 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17595 these, since it is more appropriate.
17596
17597 2002-05-26 Akim Demaille <akim@epita.fr>
17598
17599 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17600 `Error:' lines.
17601 * data/bison.simple (yystos) [YYDEBUG]: New.
17602 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17603 error recovery.
17604 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17605
17606 2002-05-25 Akim Demaille <akim@epita.fr>
17607
17608 * doc/bison.texinfo (Debugging): Split into...
17609 (Tracing): this new section, its former contents, and...
17610 (Understanding): this new section.
17611 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17612 by...
17613 (report_flag): this.
17614 Adjust all dependencies.
17615 (report_args, report_types, report_argmatch): New.
17616 (usage, getargs): Report/support -r, --report.
17617 * src/options.h
17618 (struct option_table_struct): Rename as..,
17619 (struct option_table_s): this.
17620 Rename the `set_flag' member to `flag' to match with getopt_long's
17621 struct.
17622 * src/options.c (option_table): Split verbose into an entry for
17623 %verbose, and another for --verbose.
17624 Support --report/-r, so remove -r from the obsolete --raw.
17625 * src/print.c: Attach full item sets and lookaheads reports to
17626 report_flag instead of trace_flag.
17627 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17628
17629 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17630 and Paul Eggert <eggert@twinsun.com>
17631
17632 * data/bison.simple (yyparse): Correct error handling to conform to
17633 POSIX and yacc. Specifically, after syntax error is discovered,
17634 do not reduce further before shifting the error token.
17635 Clean up the code a bit by removing the labels yyerrdefault,
17636 yyerrhandle, yyerrpop.
17637 * NEWS: Document the above.
17638
17639 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17640
17641 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17642 type; it isn't always big enough, since it doesn't necessarily
17643 include non-terminals.
17644 (yytranslate): Expand definition of yy_token_number_type, so that
17645 the latter can be removed.
17646 (yy_token_number_type): Remove, only one use.
17647 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17648 don't use TokenNumberType as element type.
17649
17650 * tests/regression.at: Modify expected output to agree with change
17651 to yyr1 and yytranslate.
17652
17653 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17654
17655 * src/reader.c (parse_action): Use copy_character instead of
17656 obstack_1grow.
17657
17658 2002-05-13 Akim Demaille <akim@epita.fr>
17659
17660 * tests/regression.at (Token definitions): Prototype yylex and
17661 yyerror.
17662
17663 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17664
17665 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17666 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17667 32-bit arithmetic.
17668 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17669
17670 2002-05-07 Akim Demaille <akim@epita.fr>
17671
17672 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17673 avoid GCC warnings.
17674
17675 2002-05-07 Akim Demaille <akim@epita.fr>
17676
17677 Kill GCC warnings.
17678
17679 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17680 over the RHS of each rule.
17681 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17682 * src/state.h (state_t): Member `nitems' is unsigned short.
17683 * src/LR0.c (get_state): Adjust.
17684 * src/reader.c (packgram): Likewise.
17685 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17686 `Type'.
17687 (muscle_insert_int_table): Remove, unused.
17688 (prepare_rules): Remove `max'.
17689
17690 2002-05-06 Akim Demaille <akim@epita.fr>
17691
17692 * src/closure.c (print_firsts): Display of the symbol tags.
17693 (bitmatrix_print): Move to...
17694 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17695 here.
17696 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17697
17698 2002-05-06 Akim Demaille <akim@epita.fr>
17699
17700 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17701 hash_do_for_each.
17702
17703 2002-05-06 Akim Demaille <akim@epita.fr>
17704
17705 * src/LR0.c (new_state, get_state): Instead of using the global
17706 `kernel_size' and `kernel_base', have two new arguments:
17707 `core_size' and `core'.
17708 Adjust callers.
17709
17710 2002-05-06 Akim Demaille <akim@epita.fr>
17711
17712 * src/reader.c (packgram): No longer end `ritem' with a 0
17713 sentinel: it is not used.
17714
17715 2002-05-05 Akim Demaille <akim@epita.fr>
17716
17717 New experimental feature: display the lookaheads in the report and
17718 graph.
17719
17720 * src/print (print_core): When --trace-flag, display the rules
17721 lookaheads.
17722 * src/print_graph.c (print_core): Likewise.
17723 Swap the arguments.
17724 Adjust caller.
17725
17726 2002-05-05 Akim Demaille <akim@epita.fr>
17727
17728 * tests/torture.at (Many lookaheads): New test.
17729
17730 2002-05-05 Akim Demaille <akim@epita.fr>
17731
17732 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17733 (GENERATE_MUSCLE_INSERT_TABLE): this.
17734 (output_int_table, output_unsigned_int_table, output_short_table)
17735 (output_token_number_table, output_item_number_table): Replace with...
17736 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17737 (muscle_insert_short_table, muscle_insert_token_number_table)
17738 (muscle_insert_item_number_table): these.
17739 Adjust all callers.
17740 (prepare_tokens): Don't free `translations', since...
17741 * src/reader.h, src/reader.c (grammar_free): do it.
17742 Move to...
17743 * src/gram.h, src/gram.c (grammar_free): here.
17744 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17745 b4_translate_max.
17746
17747 2002-05-05 Akim Demaille <akim@epita.fr>
17748
17749 * src/output.c (output_unsigned_int_table): New.
17750 (prepare_rules): `i' is unsigned.
17751 `prhs', `rline', `r2' are unsigned int.
17752 Rename muscle `rhs_number_max' as `rhs_max'.
17753 Output muscles `prhs_max', `rline_max', and `r2_max'.
17754 Free rline and r1.
17755 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17756 to compute types instead of constant types.
17757 * tests/regression.at (Web2c Actions): Adjust.
17758
17759 2002-05-04 Akim Demaille <akim@epita.fr>
17760
17761 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17762 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17763 Adjust dependencies.
17764 * src/output.c (token_definitions_output): Be sure not to output a
17765 `#define 'a'' when fed with `%token 'a' "a"'.
17766 * tests/regression.at (Token definitions): New.
17767
17768 2002-05-03 Paul Eggert <eggert@twinsun.com>
17769
17770 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17771 for K&R C.
17772
17773 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17774
17775 * Makefile.am (SUBDIRS): Remove intl.
17776 (EXTRA_DIST): Add config/config.rpath.
17777
17778 2002-05-03 Akim Demaille <akim@epita.fr>
17779
17780 * data/bison.simple (m4_if): Don't output empty enums.
17781 And actually, output valid enum definitions :(.
17782
17783 2002-05-03 Akim Demaille <akim@epita.fr>
17784
17785 * configure.bat: Remove, completely obsolete.
17786 * Makefile.am (EXTRA_DIST): Adjust.
17787 Don't distribute config.rpath...
17788 * config/Makefile.am (EXTRA_DIST): Do it.
17789
17790 2002-05-03 Akim Demaille <akim@epita.fr>
17791
17792 * configure.in (GETTEXT_VERSION): New.
17793 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17794
17795 2002-05-03 Akim Demaille <akim@epita.fr>
17796
17797 * data/bison.simple (b4_token_enum): New.
17798 (b4_token_defines): Use it to output tokens both as #define and
17799 enums.
17800 Suggested by Paul Eggert.
17801 * src/output.c (token_definitions_output): Don't output spurious
17802 white spaces.
17803
17804 2002-05-03 Akim Demaille <akim@epita.fr>
17805
17806 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17807
17808 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17809
17810 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17811 Update the stack class, give a try to deque as the default container.
17812
17813 2002-05-02 Akim Demaille <akim@epita.fr>
17814
17815 * data/bison.simple (yyparse): Do not implement @$ = @1.
17816 (YYLLOC_DEFAULT): Adjust to do it.
17817 * doc/bison.texinfo (Location Default Action): Fix.
17818
17819 2002-05-02 Akim Demaille <akim@epita.fr>
17820
17821 * src/reader.c (parse_braces): Merge into...
17822 (parse_action): this.
17823
17824 2002-05-02 Akim Demaille <akim@epita.fr>
17825
17826 * configure.in (ALL_LINGUAS): Remove.
17827 * po/LINGUAS, hr.po: New.
17828
17829 2002-05-02 Akim Demaille <akim@epita.fr>
17830
17831 Remove the so called hairy (semantic) parsers.
17832
17833 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17834 * src/gram.h, src/gram.c (semantic_parser): Remove.
17835 (rule_t): Remove the guard and guard_line members.
17836 * src/lex.h (token_t): remove tok_guard.
17837 * src/options.c (option_table): Remove %guard and %semantic_parser
17838 support.
17839 * src/output.c, src/output.h (guards_output): Remove.
17840 (prepare): Adjust.
17841 (token_definitions_output): Don't output the `T'
17842 tokens (???).
17843 (output_skeleton): Don't output the guards.
17844 * src/files.c, src/files.c (attrsfile): Remove.
17845 * src/reader.c (symbol_list): Remove the guard and guard_line
17846 members.
17847 Adjust dependencies.
17848 (parse_guard): Remove.
17849 * data/bison.hairy: Remove.
17850 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17851 BISON_HAIRY.
17852
17853 2002-05-02 Akim Demaille <akim@epita.fr>
17854
17855 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17856 (parse_guard): Rename the formal argument `stack_offset' as
17857 `rule_length', which is more readable.
17858 Adjust callers.
17859 (copy_at, copy_dollar): Instead of outputting the hard coded
17860 values of $$, $n and so forth, output invocation to b4_lhs_value,
17861 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17862 Note: this patch partially drops `semantic-parser' support: it
17863 always does `rule_length - n', where semantic parsers ought to
17864 always use `-n'.
17865 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17866 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17867
17868 2002-05-02 Akim Demaille <akim@epita.fr>
17869
17870 * configure.in (AC_INIT): Bump to 1.49b.
17871 (AM_INIT_AUTOMAKE): Short invocation.
17872
17873 2002-05-02 Akim Demaille <akim@epita.fr>
17874
17875 Version 1.49a.
17876
17877 2002-05-01 Akim Demaille <akim@epita.fr>
17878
17879 * src/skeleton.h: Remove.
17880
17881 2002-05-01 Akim Demaille <akim@epita.fr>
17882
17883 * src/skeleton.h: Fix the #endif.
17884 Reported by Magnus Fromreide.
17885
17886 2002-04-26 Paul Eggert <eggert@twinsun.com>
17887
17888 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17889 Define if we define YYSTYPE and YYLTYPE, respectively.
17890 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17891
17892 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17893
17894 * src/scan-skel.l: Postprocess quadrigraphs.
17895
17896 * src/reader.c (copy_character): New function, used to output
17897 single characters while replacing `[' and `]' with quadrigraphs, to
17898 avoid troubles with M4 quotes.
17899 (copy_comment): Output characters with copy_character.
17900 (read_additionnal_code): Likewise.
17901 (copy_string2): Likewise.
17902 (copy_definition): Likewise.
17903
17904 * tests/calc.at: Exercise M4 quoting.
17905
17906 2002-04-25 Akim Demaille <akim@epita.fr>
17907
17908 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17909 between `!' and the command.
17910 Reported by Paul Eggert.
17911
17912 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17913
17914 * tests/calc.at: Exercise prologue splitting.
17915
17916 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17917 `b4_post_prologue' instead of `b4_prologue'.
17918
17919 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17920 muscles.
17921 (output): Free pre_prologue_obstack and post_prologue_obstack.
17922 * src/files.h, src/files.c (attrs_obstack): Remove.
17923 (pre_prologue_obstack, post_prologue_obstack): New.
17924 * src/reader.c (copy_definition): Add a parameter to specify the
17925 obstack to fill, instead of using attrs_obstack unconditionally.
17926 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17927 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17928
17929 2002-04-23 Paul Eggert <eggert@twinsun.com>
17930
17931 * data/bison.simple: Remove unnecessary commentary and white
17932 space differences from 1_29-branch.
17933 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17934
17935 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17936 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17937 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17938 constructors or destructors.
17939
17940 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17941
17942 2002-04-23 Akim Demaille <akim@epita.fr>
17943
17944 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17945 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17946 location with columns.
17947 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17948 All reported by Paul Eggert.
17949
17950 2002-04-22 Akim Demaille <akim@epita.fr>
17951
17952 * src/reduce.c (dump_grammar): Move to...
17953 * src/gram.h, src/gram.c (grammar_dump): here.
17954 Be sure to separate long item numbers.
17955 Don't read the members of a rule's prec if its nil.
17956
17957 2002-04-22 Akim Demaille <akim@epita.fr>
17958
17959 * src/output.c (table_size, table_grow): New.
17960 (MAXTABLE): Remove, replace uses with table_size.
17961 (pack_vector): Instead of dying when the table is too big, grow it.
17962
17963 2002-04-22 Akim Demaille <akim@epita.fr>
17964
17965 * data/bison.simple (yyr1): Its type is that of a token number.
17966 * data/bison.c++ (r1_): Likewise.
17967 * tests/regression.at (Web2c Actions): Adjust.
17968
17969 2002-04-22 Akim Demaille <akim@epita.fr>
17970
17971 * src/reader.c (token_translations_init): 256 is now the default
17972 value for the error token, i.e., it will be assigned another
17973 number if the user assigned 256 to one of her tokens.
17974 (reader): Don't force 256 to error.
17975 * doc/bison.texinfo (Symbols): Adjust.
17976 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17977 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17978 etc. instead of 10, 20, 30 (which was used to `jump' over error
17979 (256) and undefined (2)).
17980
17981 2002-04-22 Akim Demaille <akim@epita.fr>
17982
17983 Propagate more token_number_t.
17984
17985 * src/gram.h (token_number_as_item_number)
17986 (item_number_as_token_number): New.
17987 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17988 Use it to create output_item_number_table and
17989 output_token_number_table.
17990 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17991 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17992 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17993 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17994
17995 2002-04-22 Akim Demaille <akim@epita.fr>
17996
17997 * src/output.h, src/output.c (get_lines_number): Remove.
17998
17999 2002-04-19 Akim Demaille <akim@epita.fr>
18000
18001 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18002 as Lex/Flex'.
18003 (Debugging): More details about enabling the debugging features.
18004 (Table of Symbols): Describe $$, $n, @$, and @n.
18005 Suggested by Tim Josling.
18006
18007 2002-04-19 Akim Demaille <akim@epita.fr>
18008
18009 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18010
18011 2002-04-10 Akim Demaille <akim@epita.fr>
18012
18013 * src/system.h: Rely on HAVE_LIMITS_H.
18014 Suggested by Paul Eggert.
18015
18016 2002-04-09 Akim Demaille <akim@epita.fr>
18017
18018 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18019 full stderr, and strip it according to the bison options, instead
18020 of composing the error message from different bits.
18021 This makes it easier to check for several error messages.
18022 Adjust all the invocations.
18023 Add an invocation exercising the error token.
18024 Add an invocation demonstrating a stupid error message.
18025 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18026 Adjust the tests.
18027 Error message are for stderr, not stdout.
18028
18029 2002-04-09 Akim Demaille <akim@epita.fr>
18030
18031 * src/gram.h, src/gram.c (error_token_number): Remove, use
18032 errtoken->number.
18033 * src/reader.c (reader): Don't specify the user token number (2)
18034 for $undefined, as it uselessly prevents using it.
18035 * src/gram.h (token_number_t): Move to...
18036 * src/symtab.h: here.
18037 (state_t.number): Is a token_number_t.
18038 * src/print.c, src/reader.c: Use undeftoken->number instead of
18039 hard coded 2.
18040 (Even though this 2 is not the same as above: the number of the
18041 undeftoken remains being 2, it is its user token number which
18042 might not be 2).
18043 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18044 `user_token_number_max'.
18045 Output `undef_token_number'.
18046 * data/bison.simple, data/bison.c++: Use them.
18047 Be sure to map invalid yylex return values to
18048 `undef_token_number'. This saves us from gratuitous SEGV.
18049
18050 * tests/conflicts.at (Solved SR Conflicts)
18051 (Unresolved SR Conflicts): Adjust.
18052 * tests/regression.at (Web2c Actions): Adjust.
18053
18054 2002-04-08 Akim Demaille <akim@epita.fr>
18055
18056 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18057 Adding #line.
18058 Remove the duplicate `typedefs'.
18059 (RhsNumberType): Fix the declaration and various other typos.
18060 Use __ofile__.
18061 * data/bison.simple: Use __ofile__.
18062 * src/scan-skel.l: Handle __ofile__.
18063
18064 2002-04-08 Akim Demaille <akim@epita.fr>
18065
18066 * src/gram.h (item_number_t): New, the type of item numbers in
18067 RITEM. Note that it must be able to code symbol numbers as
18068 positive number, and the negation of rule numbers as negative
18069 numbers.
18070 Adjust all dependencies (pretty many).
18071 * src/reduce.c (rule): Remove this `short *' pointer: use
18072 item_number_t.
18073 * src/system.h (MINSHORT, MAXSHORT): Remove.
18074 Include `limits.h'.
18075 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18076 (shortcpy): Remove.
18077 (MAXTABLE): Move to...
18078 * src/output.c (MAXTABLE): here.
18079 (prepare_rules): Use output_int_table to output rhs.
18080 * data/bison.simple, data/bison.c++: Adjust.
18081 * tests/torture.at (Big triangle): Move the limit from 254 to
18082 500.
18083 * tests/regression.at (Web2c Actions): Ajust.
18084
18085 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18086 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18087 passes, but produces negative #line number, once fixed, GCC is
18088 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18089 C), it passes.
18090 * src/state.h (state_h): Code input lines on ints, not shorts.
18091
18092 2002-04-08 Akim Demaille <akim@epita.fr>
18093
18094 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18095 and then the grammar.
18096
18097 2002-04-08 Akim Demaille <akim@epita.fr>
18098
18099 * src/system.h: No longer using strndup.
18100
18101 2002-04-07 Akim Demaille <akim@epita.fr>
18102
18103 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18104 * src/output.c (output_table_data): Return the longest number.
18105 (prepare_tokens): Output `token_number_max').
18106 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18107 New.
18108 Use them to define yy_token_number_type/TokenNumberType.
18109 Use this type for yytranslate.
18110 * tests/torture.at (Big triangle): Push the limit from 124 to
18111 253.
18112 * tests/regression.at (Web2c Actions): Adjust.
18113
18114 2002-04-07 Akim Demaille <akim@epita.fr>
18115
18116 * tests/torture.at (Big triangle): New.
18117 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18118 * tests/existing.at: here.
18119
18120 2002-04-07 Akim Demaille <akim@epita.fr>
18121
18122 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18123 nritems.
18124 Adjust dependencies.
18125
18126 2002-04-07 Akim Demaille <akim@epita.fr>
18127
18128 * src/reader.c: Normalize increments to prefix form.
18129
18130 2002-04-07 Akim Demaille <akim@epita.fr>
18131
18132 * src/reader.c, symtab.c: Remove debugging code.
18133
18134 2002-04-07 Akim Demaille <akim@epita.fr>
18135
18136 Rename all the `bucket's as `symbol_t'.
18137
18138 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18139 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18140 * src/symtab.c, src/symtab.h (bucket): Rename as...
18141 (symbol_t): this.
18142 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18143 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18144 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18145 (buckets_new, buckets_free, buckets_do): Rename as...
18146 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18147 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18148 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18149 (symbols_new, symbols_free, symbols_do): these.
18150
18151 2002-04-07 Akim Demaille <akim@epita.fr>
18152
18153 Use lib/hash for the symbol table.
18154
18155 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18156 EOF.
18157 * src/lex.c (lex): Set the `number' member of new terminals.
18158 * src/reader.c (bucket_check_defined, bucket_make_alias)
18159 (bucket_check_alias_consistence, bucket_translation): New.
18160 (reader, grammar_free, readgram, token_translations_init)
18161 (packsymbols): Adjust.
18162 (reader): Number the predefined tokens.
18163 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18164 for predefined tokens.
18165 * src/symtab.h (bucket): Remove all the hash table related
18166 members.
18167 * src/symtab.c (symtab): Replace by...
18168 (bucket_table): this.
18169 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18170 (buckets_new, buckets_do): New.
18171
18172 2002-04-07 Akim Demaille <akim@epita.fr>
18173
18174 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18175 (start_symbol, max_user_token_number, semantic_parser)
18176 (error_token_number): Initialize.
18177 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18178 Initialize.
18179 (reader): Don't.
18180 (errtoken, eoftoken, undeftoken, axiom): Extern.
18181
18182 2002-04-07 Akim Demaille <akim@epita.fr>
18183
18184 * src/gram.h (rule_s): prec and precsym are now pointers
18185 to the bucket giving the priority/associativity.
18186 Member `associativity' removed: useless.
18187 * src/reduce.c, src/conflicts.c: Adjust.
18188
18189 2002-04-07 Akim Demaille <akim@epita.fr>
18190
18191 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18192 Properly escape the symbols' TAG when outputting them.
18193
18194 2002-04-07 Akim Demaille <akim@epita.fr>
18195
18196 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18197
18198 2002-04-07 Akim Demaille <akim@epita.fr>
18199
18200 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18201 (LArule): this, which is an array to rule_t*.
18202 * src/print.c, src/conflicts.c: Adjust.
18203
18204 2002-04-07 Akim Demaille <akim@epita.fr>
18205
18206 * src/gram.h (rule_t): Rename `number' as `user_number'.
18207 `number' is a new member.
18208 Adjust dependencies.
18209 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18210
18211 2002-04-07 Akim Demaille <akim@epita.fr>
18212
18213 As a result of the previous patch, it is no longer needed
18214 to reorder ritem itself.
18215
18216 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18217
18218 2002-04-07 Akim Demaille <akim@epita.fr>
18219
18220 Be sure never to walk through RITEMS, but use only data related to
18221 the rules themselves. RITEMS should be banished.
18222
18223 * src/output.c (output_token_translations): Rename as...
18224 (prepare_tokens): this.
18225 In addition to `translate', prepare the muscles `tname' and
18226 `toknum', which were handled by...
18227 (output_rule_data): this.
18228 Remove, and move the remainder of its outputs into...
18229 (prepare_rules): this new routines, which also merges content from
18230 (output_gram): this.
18231 (prepare_rules): Be sure never to walk through RITEMS.
18232 (output_stos): Rename as...
18233 (prepare_stos): this.
18234 (output): Always invoke prepare_states, after all, just don't use it
18235 in the output if you don't need it.
18236
18237 2002-04-07 Akim Demaille <akim@epita.fr>
18238
18239 * src/LR0.c (new_state): Display `nstates' as the name of the
18240 newly created state.
18241 Adjust to initialize first_state and last_state if needed.
18242 Be sure to distinguish the initial from the final state.
18243 (new_states): Create the itemset of the initial state, and use
18244 new_state.
18245 * src/closure.c (closure): Now that the initial state has its
18246 items properly set, there is no need for a special case when
18247 creating `ruleset'.
18248
18249 As a result, now the rule 0, reducing to $axiom, is visible in the
18250 outputs. Adjust the test suite.
18251
18252 * tests/conflicts.at (Solved SR Conflicts)
18253 (Unresolved SR Conflicts): Adjust.
18254 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18255 * tests/conflicts.at (S/R in initial): New.
18256
18257 2002-04-07 Akim Demaille <akim@epita.fr>
18258
18259 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18260 the RHS of the rules.
18261 * src/output.c (output_gram): Likewise.
18262
18263 2002-04-07 Akim Demaille <akim@epita.fr>
18264
18265 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18266 bucket.
18267 Adjust all dependencies.
18268 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18269 `number' of the buckets too.
18270 * src/gram.h: Include `symtab.h'.
18271 (associativity): Move to...
18272 * src/symtab.h: here.
18273 No longer include `gram.h'.
18274
18275 2002-04-07 Akim Demaille <akim@epita.fr>
18276
18277 * src/gram.h, src/gram.c (rules_rhs_length): New.
18278 (ritem_longest_rhs): Use it.
18279 * src/gram.h (rule_t): `number' is a new member.
18280 * src/reader.c (packgram): Set it.
18281 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18282 the end of `rules', and count them out of `nrules'.
18283 (reduce_output, dump_grammar): Adjust.
18284 * src/print.c (print_grammar): It is no longer needed to check for
18285 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18286 * tests/reduce.at (Reduced Automaton): New test.
18287
18288 2002-04-07 Akim Demaille <akim@epita.fr>
18289
18290 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18291 lacking `+ 1' to nrules, Bison reported as useless a token if it
18292 was used solely to set the precedence of the last rule...
18293
18294 2002-04-07 Akim Demaille <akim@epita.fr>
18295
18296 * data/bison.c++, data/bison.simple: Don't output the current file
18297 name in #line, to avoid useless diffs between two identical
18298 outputs under different names.
18299
18300 2002-04-07 Akim Demaille <akim@epita.fr>
18301
18302 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18303 Normalize loops to using `< nrules + 1', not `<= nrules'.
18304
18305 2002-04-07 Akim Demaille <akim@epita.fr>
18306
18307 * TODO: Update.
18308
18309 2002-04-07 Akim Demaille <akim@epita.fr>
18310
18311 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18312 bucket.value as bucket.number.
18313
18314 2002-04-07 Akim Demaille <akim@epita.fr>
18315
18316 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18317 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18318 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18319 RHS, instead of being an index in RITEMS.
18320
18321 2002-04-04 Paul Eggert <eggert@twinsun.com>
18322
18323 * doc/bison.texinfo: Update copyright date.
18324 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18325 (Symbols): Warn about running Bison in one character set,
18326 but compiling and/or running in an incompatible one.
18327 Warn about character code 256, too.
18328
18329 2002-04-03 Paul Eggert <eggert@twinsun.com>
18330
18331 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18332 YYERROR_VERBOSE is nonzero, not whether it is defined.
18333
18334 Merge changes from bison-1_29-branch.
18335
18336 2002-03-20 Paul Eggert <eggert@twinsun.com>
18337
18338 Merge fixes from Debian bison_1.34-1.diff.
18339
18340 * configure.in (AC_PREREQ): 2.53.
18341
18342 2002-03-20 Akim Demaille <akim@epita.fr>
18343
18344 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18345
18346 2002-03-19 Paul Eggert <eggert@twinsun.com>
18347
18348 * src/bison.simple (YYCOPY): New macro.
18349 (YYSTACK_RELOCATE): Use it.
18350 Remove Type arg; no longer needed. All callers changed.
18351 (yymemcpy): Remove; no longer needed.
18352
18353 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18354 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18355
18356 2002-03-19 Akim Demaille <akim@epita.fr>
18357
18358 Test and fix the #line outputs.
18359
18360 * tests/atlocal.at (GCC): New.
18361 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18362 (Prologue synch line, %union synch line, Postprologue synch line)
18363 (Action synch line, Epilogue synch line): New tests.
18364 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18365 * data/bison.simple, data/bison.c++: Use it.
18366
18367 2002-03-19 Akim Demaille <akim@epita.fr>
18368
18369 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18370 (Solved SR Conflicts, %expect not enough, %expect right)
18371 (%expect too much): Move to...
18372 * tests/conflicts.at: this new file.
18373
18374 2002-03-19 Akim Demaille <akim@epita.fr>
18375
18376 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18377 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18378 that we can move to enums for instance.
18379 * src/output.c (token_definitions_output): Output a list of
18380 `token-name, token-number' instead of the #define.
18381 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18382
18383 2002-03-14 Akim Demaille <akim@epita.fr>
18384
18385 Use Gettext 0.11.1.
18386
18387 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18388
18389 * data/bison.c++: Make the user able to add members to the generated
18390 parser by subclassing.
18391
18392 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18393
18394 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18395 a character.
18396 Reported by Nicolas Tisserand and Nicolas Burrus.
18397
18398 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18399
18400 * src/reader.c: Warn about lacking semi-colons, do not complain.
18401
18402 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18403
18404 * data/bison.c++: Remove a debug line.
18405
18406 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18407
18408 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18409 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18410 provide a default implementation.
18411
18412 2002-03-04 Akim Demaille <akim@epita.fr>
18413
18414 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18415 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18416 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18417 * tests/semantic.at (Parsing Guards): Similarly.
18418 * src/reader.at (readgram): Complain if the last rule is not ended
18419 with a semi-colon.
18420
18421 2002-03-04 Akim Demaille <akim@epita.fr>
18422
18423 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18424 * src/closure.c: here.
18425 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18426 RTC.
18427 * src/warshall.h, src/warshall.c: Remove.
18428 * tests/sets.at (Broken Closure): Adjust.
18429
18430 2002-03-04 Akim Demaille <akim@epita.fr>
18431
18432 * src/output.c (output_skeleton): tempdir is const.
18433 bytes_read is unused.
18434
18435 2002-03-04 Akim Demaille <akim@epita.fr>
18436
18437 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18438 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18439 Update.
18440 From Michael Hayes.
18441
18442 2002-03-04 Akim Demaille <akim@epita.fr>
18443
18444 * src/closure.c (closure): `r' is unused.
18445
18446 2002-03-04 Akim Demaille <akim@epita.fr>
18447
18448 * tests/sets.at (Broken Closure): Add the ending `;'.
18449 * src/reader.at (readgram): Complain if a rule is not ended with a
18450 semi-colon.
18451
18452 2002-03-04 Akim Demaille <akim@epita.fr>
18453
18454 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18455 (count_sr_conflicts): Use bitset_count.
18456 * src/reduce.c (inaccessable_symbols): Ditto.
18457 (bits_size): Remove.
18458 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18459
18460 2002-03-04 Akim Demaille <akim@epita.fr>
18461
18462 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18463 * src/reduce.c: Remove the `bitset_zero's following the
18464 `bitset_create's, as now it is performed by the latter.
18465
18466 2002-03-04 Akim Demaille <akim@epita.fr>
18467
18468 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18469 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18470 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18471 latest sources from Michael.
18472
18473 2002-03-04 Akim Demaille <akim@epita.fr>
18474
18475 * src/output.c (output): Don't free the grammar.
18476 * src/reader.c (grammar_free): New.
18477 * src/main.c (main): Call it and don't free symtab here.
18478
18479 2002-03-04 Akim Demaille <akim@epita.fr>
18480
18481 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18482 before returning.
18483 Reported by Benoit Perrot.
18484
18485 2002-03-04 Akim Demaille <akim@epita.fr>
18486
18487 Use bitset operations when possible, not loops over bits.
18488
18489 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18490 bitset_or.
18491 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18492 * src/reduce.c (useless_nonterminals): Formatting changes.
18493 * src/warshall.c (TC): Use bitset_or.
18494
18495 2002-03-04 Akim Demaille <akim@epita.fr>
18496
18497 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18498 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18499 Ditto.
18500
18501 2002-03-04 Akim Demaille <akim@epita.fr>
18502
18503 * src/lalr.c (F): Now a bitset*.
18504 Adjust all dependencies.
18505
18506 2002-03-04 Akim Demaille <akim@epita.fr>
18507
18508 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18509 Adjust all dependencies.
18510
18511 2002-03-04 Akim Demaille <akim@epita.fr>
18512
18513 * src/L0.c, src/LR0.h (nstates): Be size_t.
18514 Adjust comparisons (signed vs unsigned).
18515 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18516 bitset*.
18517 Adjust all dependencies.
18518
18519 2002-03-04 Akim Demaille <akim@epita.fr>
18520
18521 * src/closure.c (firsts): Now, also a bitset.
18522 Adjust all dependencies.
18523 (varsetsize): Remove, now unused.
18524 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18525
18526 2002-03-04 Akim Demaille <akim@epita.fr>
18527
18528 * src/print.c: Convert to use bitset.h, not hand coded iterations
18529 over ints.
18530
18531 2002-03-04 Akim Demaille <akim@epita.fr>
18532
18533 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18534
18535 2002-03-04 Akim Demaille <akim@epita.fr>
18536
18537 * src/closure.c (ruleset): Be a bitset.
18538 (rulesetsize): Remove.
18539
18540 2002-03-04 Akim Demaille <akim@epita.fr>
18541
18542 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18543 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18544 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18545 * src/closure.c (fderives): Be an array of bitsets.
18546
18547 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18548
18549 * data/bison.c++: Merge the two generated headers. Insert a copyright
18550 notice in each output file.
18551
18552 2002-02-28 Akim Demaille <akim@epita.fr>
18553
18554 * data/bison.c++: Copy the prologue of bison.simple to fetch
18555 useful M4 definitions, such as b4_header_guard.
18556
18557 2002-02-25 Akim Demaille <akim@epita.fr>
18558
18559 * src/getargs.c (version): Give the name of the authors, and use a
18560 translator friendly scheme for the bgr
18561 copyright notice.
18562
18563 2002-02-25 Akim Demaille <akim@epita.fr>
18564
18565 * src/output.c (header_output): Remove, now handled completely via
18566 M4.
18567
18568 2002-02-25 Akim Demaille <akim@epita.fr>
18569
18570 * m4/m4.m4: New, from CVS Autoconf.
18571 * configure.in: Invoke it.
18572 * src/output.c (output_skeleton): Use its result instead of the
18573 hard coded name.
18574
18575 2002-02-25 Akim Demaille <akim@epita.fr>
18576
18577 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18578 Fileutils 4.1.5.
18579 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18580 * src/output.c (output_skeleton): Use mkstemp to create a real
18581 temporary file.
18582 Move the filling of `skeleton' and its muscle to...
18583 (prepare): here.
18584 (output): Move the definition of the prologue muscle to...
18585 (prepare): here.
18586 * src/system.h (DEFAULT_TMPDIR): New.
18587
18588 2002-02-14 Paul Eggert <eggert@twinsun.com>
18589
18590 Remove the support for C++ namespace cleanliness; it was
18591 causing more problems than it was curing, since it didn't work
18592 properly on some nonstandard C++ compilers. This can wait
18593 for a proper C++ parser.
18594
18595 * NEWS: Document this.
18596 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18597 of C++, as it's treated like C now.
18598 * src/bison.simple (YYSTD): Remove.
18599 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18600 Treat C++ just like Standard C instead of trying to support
18601 namespace cleanliness.
18602
18603 2002-02-14 Akim Demaille <akim@epita.fr>
18604
18605 * tests/regression.at (else): Adjust to Andreas' change.
18606
18607 2002-02-14 Akim Demaille <akim@epita.fr>
18608
18609 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18610
18611 2002-02-13 Andreas Schwab <schwab@suse.de>
18612
18613 * src/output.c (output_rule_data): Don't output NULL, it might
18614 not be defined yet.
18615
18616 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18617
18618 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18619 (Copyright notice): Update.
18620
18621 2002-02-11 Akim Demaille <akim@epita.fr>
18622
18623 * tests/regression.at (%nonassoc and eof): Don't include
18624 nonportable headers.
18625
18626 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18627
18628 * data/bison.c++: Correct error recovery. Make the user able to
18629 initialize the starting location.
18630
18631 2002-02-07 Akim Demaille <akim@epita.fr>
18632
18633 * tests/input.at: New.
18634
18635 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18636
18637 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18638 more consistent when naming methods and variables. Put preprocessor
18639 directives around tables only needed for debugging.
18640
18641 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18642
18643 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18644 C++ parsers.
18645 (yy::b4_name::parse): Use print_.
18646
18647 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18648
18649 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18650
18651 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18652
18653 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18654 C++ parsers.
18655 (yy::b4_name::parse): Build verbose error messages, and use error_.
18656
18657 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18658
18659 * data/bison.c++: Fix m4 quoting in comments.
18660
18661 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18662
18663 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18664 not expanded by m4.
18665
18666 2002-02-05 Akim Demaille <akim@epita.fr>
18667
18668 * data/bison.c++: Adjust to the M4 back end.
18669 More is certainly needed.
18670
18671 2002-02-05 Akim Demaille <akim@epita.fr>
18672
18673 Give a try to M4 as a back end.
18674
18675 * lib/readpipe.c: New, from wdiff.
18676 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18677 BISON_HAIRY.
18678 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18679 specific values. Now it is m4 that performs the lookup.
18680 * src/parse-skel.y: Remove.
18681 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18682 * src/output.c (actions_output, guards_output)
18683 (token_definitions_output): No longer keeps track of the output
18684 line number, hence remove the second argument.
18685 (guards_output): Check against the guard member of a rule, not the
18686 action member.
18687 Adjust callers.
18688 (output_skeleton): Don't look for the skeleton location, let m4 do
18689 that.
18690 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18691 file will be used.
18692 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18693 (prepare): Given that for the time being changesyntax is not
18694 usable in M4, rename the muscles using `-' to `_'.
18695 Define `defines_flag', `output_parser_name' and `output_header_name'.
18696 * src/output.h (actions_output, guards_output)
18697 (token_definitions_output): Adjust prototypes.
18698 * src/scan-skel.l: Instead of scanning the skeletons, it now
18699 processes the output of m4: `__oline__' and `#output'.
18700 * data/bison.simple: Adjust to be used by M4(sugar).
18701 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18702 to date.
18703 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18704 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18705 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18706 shamelessly stolen from CVS Autoconf.
18707
18708 2002-02-05 Akim Demaille <akim@epita.fr>
18709
18710 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18711 * configure.in: Check for the declarations of free and malloc.
18712 * src/muscle_tab.c: Adjust.
18713
18714 2002-02-05 Akim Demaille <akim@epita.fr>
18715
18716 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18717 which have no values.
18718
18719 2002-02-05 Akim Demaille <akim@epita.fr>
18720
18721 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18722 * data/: here.
18723
18724 2002-01-29 Paul Eggert <eggert@twinsun.com>
18725
18726 * src/bison.simple (YYSIZE_T): Do not define merely because
18727 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18728 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18729
18730 2002-01-27 Akim Demaille <akim@epita.fr>
18731
18732 Fix `%nonassoc and eof'.
18733
18734 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18735 which were not properly copied! Replace
18736 memcpy (res->errs, src->errs, src->nerrs);
18737 with
18738 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18739 !!!
18740 * tests/regression.at (%nonassoc and eof): Adjust to newest
18741 Autotest: `.' is not in the PATH.
18742
18743 2002-01-27 Akim Demaille <akim@epita.fr>
18744
18745 * tests/sets.at (AT_EXTRACT_SETS): New.
18746 (Nullable): Use it.
18747 (Firsts): New.
18748
18749 2002-01-26 Akim Demaille <akim@epita.fr>
18750
18751 * tests/actions.at, tests/calc.at, tests/headers.at,
18752 * tests/torture.at: Adjust to the newest Autotest which no longer
18753 forces `.' in the PATH.
18754
18755 2002-01-25 Akim Demaille <akim@epita.fr>
18756
18757 * tests/regression.at (%nonassoc and eof): New.
18758 Suggested by Robert Anisko.
18759
18760 2002-01-24 Akim Demaille <akim@epita.fr>
18761
18762 Bison dumps core when trying to complain about broken input files.
18763 Reported by Cris van Pelt.
18764
18765 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18766 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18767 into...
18768 (Invalid inputs): Strengthen: exercise parse_percent_token.
18769
18770 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18771
18772 * src/Makefile.am: Add bison.c++.
18773 * src/bison.c++: New skeleton.
18774
18775 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18776
18777 * po/it.po: New.
18778
18779 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18780
18781 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18782
18783 2002-01-20 Marc Autret <marc@gnu.org>
18784
18785 * src/files.c (compute_output_file_names): Fix
18786
18787 2002-01-20 Marc Autret <marc@gnu.org>
18788
18789 * tests/output.at: New test.
18790 * src/files.c (compute_base_names): Don't map extensions when
18791 the YACC flag is set, use defaults.
18792 Reported by Evgeny Stambulchik.
18793
18794 2002-01-20 Marc Autret <marc@gnu.org>
18795
18796 * src/system.h: Need to define __attribute__ away for non-GCC
18797 compilers as well (i.e., the vendor C compiler).
18798 Suggested by Albert Chin-A-Young.
18799
18800 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18801
18802 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18803 canonical definition.
18804 * src/system.h: Use the canonical definition for PARAMS (avoids
18805 a conflict with the macro from lib/hash.h).
18806
18807 2002-01-11 Akim Demaille <akim@epita.fr>
18808
18809 * configure.in: Use AC_FUNC_STRNLEN.
18810 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18811
18812 2002-01-09 Akim Demaille <akim@epita.fr>
18813
18814 * src/files.c, src/files.h (output_infix): New.
18815 (tab_extension): Remove.
18816 (compute_base_names): Compute the former, drop the latter.
18817 * src/output.c (prepare): Insert the muscles `output-infix', and
18818 `output-suffix'.
18819 * src/parse-skel.y (string, string.1): New.
18820 (section.header): Use it.
18821 (section.yacc): Remove.
18822 (prefix): Remove too.
18823 * src/scan-skel.l: Adjust.
18824 * src/bison.simple, src/bison.hairy: Adjust.
18825
18826 2002-01-09 Akim Demaille <akim@epita.fr>
18827
18828 * configure.in (WERROR_CFLAGS): Compute it.
18829 * src/Makefile.am (CFLAGS): Pass it.
18830 * tests/atlocal.in (CFLAGS): Idem.
18831 * src/files.c: Fix a few warnings.
18832 (get_extension_index): Remove, unused.
18833
18834 2002-01-08 Akim Demaille <akim@epita.fr>
18835
18836 * src/getargs.c (AS_FILE_NAME): New.
18837 (getargs): Use it to convert DOSish file names.
18838 * src/files.c (base_name): Rename as full_base_name to avoid
18839 clashes with `base_name ()'.
18840 (filename_split): New.
18841 (compute_base_names): N-th rewrite, using filename_split.
18842
18843 2002-01-08 Akim Demaille <akim@epita.fr>
18844
18845 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18846 New, stolen from the Fileutils 4.1.
18847 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18848 * configure.in: Check for the presence of memrchr, and of its
18849 prototype.
18850
18851 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18852
18853 * lib/hash.h (__P): Added definition for this macro.
18854 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18855 BUILT_SOURCES, to ensure they are generated first.
18856 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18857 %error-verbose to allow bootstrapping with bison 1.30x.
18858
18859 2002-01-06 Akim Demaille <akim@epita.fr>
18860
18861 * src/reader.c (parse_braces): Don't fetch the next char, the
18862 convention is to fetch on entry.
18863 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18864 'switch' without a following semicolon.
18865 * tests/regression.at (braces parsing): New.
18866
18867 2002-01-06 Akim Demaille <akim@epita.fr>
18868
18869 Bison is dead wrong in its RR conflict reports.
18870
18871 * tests/torture.at (GNU Cim Grammar): New.
18872 * src/conflicts.c (count_rr_conflicts): Fix.
18873
18874 2002-01-06 Akim Demaille <akim@epita.fr>
18875
18876 Creating package.m4 from configure.ac causes too many problems.
18877
18878 * tests/Makefile.am (package.m4): Create it by hand,
18879 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18880
18881 2002-01-06 Akim Demaille <akim@epita.fr>
18882
18883 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18884 skeleton.h.
18885
18886 2002-01-04 Paul Eggert <eggert@twinsun.com>
18887
18888 * doc/bison.texinfo (Debugging):
18889 Remove YYSTDERR; it's no longer defined or used.
18890 Also, s/cstdio.h/cstdio/.
18891
18892 2002-01-03 Akim Demaille <akim@epita.fr>
18893
18894 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18895
18896 2002-01-03 Akim Demaille <akim@epita.fr>
18897
18898 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18899 tracing code to --trace, wait for a better --trace option, with
18900 args.
18901
18902 2002-01-03 Akim Demaille <akim@epita.fr>
18903
18904 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18905 The ISO C++ standard is extremely clear about it: stderr is
18906 considered a macro, not a regular symbol (see table 94 `Header
18907 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18908 Therefore std:: does not apply to it. It still does with fprintf.
18909 Also, s/cstdio.h/cstdio/.
18910
18911 2002-01-03 Akim Demaille <akim@epita.fr>
18912
18913 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18914 for non system headers.
18915
18916 2002-01-02 Akim Demaille <akim@epita.fr>
18917
18918 Equip the skeleton chain with location tracking, runtime trace,
18919 pure parser and scanner.
18920
18921 * src/parse-skel.y: Request a pure parser, locations, and prefix
18922 renaming.
18923 (%union): Having several members with the same type does not help
18924 type mismatches, simplify.
18925 (YYPRINT, yyprint): New.
18926 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18927 (skel_error): this.
18928 Handle locations.
18929 * src/scan-skel.l: Adjust to these changes.
18930 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18931 (LOCATION_PRINT, skel_control_t): New.
18932
18933 2001-12-30 Akim Demaille <akim@epita.fr>
18934
18935 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18936 replace `gb' with BLANKS.
18937 * src/scan-skel.l: Adjust.
18938
18939 2001-12-30 Akim Demaille <akim@epita.fr>
18940
18941 * src/system.h: We don't need nor want bcopy.
18942 Throw away MS-DOS crap: we don't need getpid.
18943 * configure.in: We don't need strndup. It was even causing
18944 problems: because Flex includes the headers *before* us,
18945 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18946 not visible.
18947 * lib/xstrndup.c: New.
18948 * src/scan-skel.l: Use it.
18949 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18950 * src/parse-skel.y: Use %directives instead of #defines.
18951
18952 2001-12-30 Akim Demaille <akim@epita.fr>
18953
18954 * src/skeleton.h: New.
18955 * src/output.c (output_parser, output_master_parser): Remove, dead
18956 code.
18957 * src/output.h (get_lines_number, actions_output, guards_output)
18958 (token_definitions_output): Prototype them.
18959 * src/parse-skel.y: Add the license notice.
18960 Include output.h and skeleton.h.
18961 (process_skeleton): Returns void, and takes a single parameter.
18962 * src/scan-skel.l: Add the license notice.
18963 Include skeleton.h.
18964 Don't use %option yylineno: it seems that then Flex imagines
18965 REJECT has been used, and therefore it won't reallocate its
18966 buffers (which makes no other sense to me than a bug). It results
18967 in warnings for `unused: yy_flex_realloc'.
18968
18969 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18970
18971 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18972 (MUSCLE_INSERT_PREFIX): ...to there.
18973 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18974 (MUSCLE_INSERT_PREFIX): Move from here...
18975
18976 * src/bison.hairy: Add a section directive. Put braces around muscle
18977 names. This parser skeleton is still broken, but Bison should not
18978 choke on a bad muscle 'syntax'.
18979 * src/bison.simple: Add a section directive. Put braces around muscle
18980 names.
18981
18982 * src/files.h (strsuffix, stringappend): Add declarations.
18983 (tab_extension): Add declaration.
18984 (short_base_name): Add declaration.
18985
18986 * src/files.c (strsuffix, stringappend): No longer static. These
18987 functions are used in the skeleton parser.
18988 (tab_extension): New.
18989 (compute_base_names): Use the computations done in this function
18990 to guess if the generated parsers should have '.tab' in their
18991 names.
18992 (short_base_name): No longer static.
18993
18994 * src/output.c (output_skeleton): New.
18995 (output): Disable call to output_master_parser, and give a try to
18996 a new skeleton handling system.
18997 (guards_output, actions_output): No longer static.
18998 (token_definitions_output, get_lines_number): No longer static.
18999
19000 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19001
19002 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19003 parse-skel.y.
19004
19005 * src/parse-skel.y: New file.
19006 * src/scan-skel.l: New file.
19007
19008 2001-12-29 Akim Demaille <akim@epita.fr>
19009
19010 %name-prefix is broken.
19011
19012 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19013 Adjust all dependencies.
19014 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19015 %name-prefix.
19016
19017 Renaming yylval but not yylloc is not consistent. Now we do.
19018
19019 * src/bison.simple: Prefix yylloc if used.
19020 * doc/bison.texinfo (Decl Summary): Document that.
19021
19022 2001-12-29 Akim Demaille <akim@epita.fr>
19023
19024 * doc/bison.texinfo: Promote `%long-directive' over
19025 `%long_directive'.
19026 Remove all references to fixed-output-files, yacc is enough.
19027
19028 2001-12-29 Akim Demaille <akim@epita.fr>
19029
19030 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19031 user prologue. These are defaults.
19032 * tests/actions.at (Mid-rule actions): Make sure the user can
19033 define YYDEBUG and YYERROR_VERBOSE.
19034
19035 2001-12-29 Akim Demaille <akim@epita.fr>
19036
19037 * src/output.c (header_output): Don't forget to export YYLTYPE and
19038 yylloc.
19039 * tests/headers.at (export YYLTYPE): New, make sure it does.
19040 * tests/regression.at (%union and --defines, Invalid CPP headers):
19041 Move to...
19042 * tests/headers.at: here.
19043
19044 2001-12-29 Akim Demaille <akim@epita.fr>
19045
19046 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19047
19048 2001-12-29 Akim Demaille <akim@epita.fr>
19049
19050 * tests/actions.at (Mid-rule actions): Output on a single line
19051 instead of several.
19052
19053 2001-12-29 Akim Demaille <akim@epita.fr>
19054
19055 * doc/bison.texinfo: Formatting changes.
19056
19057 2001-12-29 Akim Demaille <akim@epita.fr>
19058
19059 Don't store the token defs in a muscle, just be ready to output it
19060 on command. Now possible via `symbols'. Fixes a memory leak.
19061
19062 * src/output.c (token_definitions_output): New.
19063 (output_parser, header_output): Use it.
19064 * src/reader.c (symbols_save): Remove.
19065
19066 2001-12-29 Akim Demaille <akim@epita.fr>
19067
19068 * src/bison.simple: Do not provide a default for YYSTYPE and
19069 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19070 default.
19071
19072 2001-12-29 Akim Demaille <akim@epita.fr>
19073
19074 Mid-rule actions are simply... ignored!
19075
19076 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19077 the empty-rule associated to the dummy symbol, not to the host
19078 rule.
19079 * tests/actions.at (Mid-rule actions): New.
19080
19081 2001-12-29 Akim Demaille <akim@epita.fr>
19082
19083 Memory leak.
19084
19085 * src/reader.c (reader): Free grammar.
19086
19087 2001-12-29 Akim Demaille <akim@epita.fr>
19088
19089 Memory leak.
19090
19091 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19092 since it allocates it for each state, although only one is needed.
19093 (allocate_storage): Do it here.
19094
19095 2001-12-29 Akim Demaille <akim@epita.fr>
19096
19097 * src/options.h, src/options.c (create_long_option_table): Rename
19098 as...
19099 (long_option_table_new): this, with a clearer prototype.
19100 (percent_table): Remove, unused,
19101 * src/getargs.c (getargs): Adjust.
19102
19103 2001-12-29 Akim Demaille <akim@epita.fr>
19104
19105 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19106 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19107 as states.
19108
19109 2001-12-29 Akim Demaille <akim@epita.fr>
19110
19111 * src/lalr.c (build_relations): Rename `states' as `states1'.
19112 Sorry, I don't understand exactly what it is, no better name...
19113
19114 2001-12-29 Akim Demaille <akim@epita.fr>
19115
19116 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19117 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19118 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19119 as rules.
19120
19121 2001-12-29 Akim Demaille <akim@epita.fr>
19122
19123 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19124 ago.
19125
19126 2001-12-29 Akim Demaille <akim@epita.fr>
19127
19128 * src/reader.c, src/reader.h (user_toknums): Remove.
19129 Adjust all users to use symbols[i]->user_token_number.
19130
19131 2001-12-29 Akim Demaille <akim@epita.fr>
19132
19133 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19134 Adjust all users to use symbols[i]->prec or ->assoc.
19135
19136 2001-12-29 Akim Demaille <akim@epita.fr>
19137
19138 * src/reader.c, src/reader.h (tags): Remove.
19139 Adjust all users to use symbols[i]->tag.
19140
19141 2001-12-29 Akim Demaille <akim@epita.fr>
19142
19143 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19144 and rule_table.
19145 * src/reader.c (packsymbols): Fill this table.
19146 Drop sprec.
19147 * src/conflicts.c (resolve_sr_conflict): Adjust.
19148 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19149 single table.
19150 Use symbols[i]->tag instead of tags[i].
19151
19152 2001-12-29 Akim Demaille <akim@epita.fr>
19153
19154 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19155 In addition, put a comment in there, to replace...
19156 * tests/regression.at (%union and C comments): Remove.
19157
19158 2001-12-29 Akim Demaille <akim@epita.fr>
19159
19160 * tests/regression.at (Web2c Actions): Blindly move the actual
19161 output as expected output. The contents *seem* right to me, but I
19162 can't pretend reading perfectly parser tables... Nonetheless, all
19163 the other tests pass correctly, the table look OK, even though the
19164 presence of `$axiom' is to be noted: AFAICS it is useless (but
19165 harmless).
19166
19167 2001-12-29 Akim Demaille <akim@epita.fr>
19168
19169 * src/reader.c (readgram): Don't add the rule 0 if there were no
19170 rules read. In other words, add it _after_ having performed
19171 grammar sanity checks.
19172 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19173
19174 2001-12-29 Akim Demaille <akim@epita.fr>
19175
19176 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19177 visible, and some states have now a different number.
19178
19179 2001-12-29 Akim Demaille <akim@epita.fr>
19180
19181 * src/reader.c (readgram): Bind the initial rule's lineno to that
19182 of the first rule.
19183 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19184 (Solved SR Conflicts): Adjust rule 0's line number.
19185
19186 2001-12-29 Akim Demaille <akim@epita.fr>
19187
19188 Fix the `GAWK Grammar' failure.
19189
19190 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19191 the reductions of the first state which was mistakenly confused
19192 with the final state because precisely final_state was initialized
19193 to 0.
19194 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19195 now noticed by Bison.
19196 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19197 have a reduction on $default.
19198
19199 2001-12-29 Akim Demaille <akim@epita.fr>
19200
19201 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19202 rule line numbers.
19203 * src/closure.c (print_closure): Likewise.
19204 * src/derives.c (print_derives): Likewise.
19205 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19206 now.
19207
19208 2001-12-29 Akim Demaille <akim@epita.fr>
19209
19210 * src/lalr.c (lookaheads_print): New.
19211 (lalr): Call it when --trace-flag.
19212 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19213 are dumped.
19214
19215 2001-12-29 Akim Demaille <akim@epita.fr>
19216
19217 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19218 when walking through ritem, even via rule->rhs.
19219 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19220 (useful_production, useless_nonterminals): Likewise.
19221 (reduce_grammar_tables): Likewise, plus update nritems.
19222 * src/nullable.c (set_nullable): Likewise.
19223 * src/lalr.c (build_relations): Likewise.
19224 * tests/sets.at (Nullable): Adjust.
19225 Fortunately, now, the $axiom is no longer nullable.
19226
19227 2001-12-29 Akim Demaille <akim@epita.fr>
19228
19229 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19230 the 0-sentinel.
19231 * src/gram.c (ritem_longest_rhs): Likewise.
19232 * src/reduce.c (nonterminals_reduce): Likewise.
19233 * src/print_graph.c (print_graph): Likewise.
19234 * src/output.c (output_rule_data): Likewise.
19235 * src/nullable.c (set_nullable): Likewise.
19236
19237 2001-12-29 Akim Demaille <akim@epita.fr>
19238
19239 * src/output.c: Comment changes.
19240
19241 2001-12-27 Paul Eggert <eggert@twinsun.com>
19242
19243 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19244 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19245 Sparc, as they were causing more porting problems than the
19246 (minor) performance improvement was worth.
19247
19248 Also, catch up with 1.31's YYSTD.
19249
19250 2001-12-27 Akim Demaille <akim@epita.fr>
19251
19252 * src/output.c (output_gram): Rely on nritems, not the
19253 0-sentinel. See below.
19254 Use -1 as separator, not 0.
19255 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19256 Rely on -1 as separator in yyrhs, instead of 0.
19257 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19258 twice `Now at end of input', therefore there are two lines less to
19259 expect.
19260
19261 2001-12-27 Akim Demaille <akim@epita.fr>
19262
19263 * tests/regression.at (Unresolved SR Conflicts):
19264 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19265 below.
19266
19267 2001-12-27 Akim Demaille <akim@epita.fr>
19268
19269 * src/LR0.c (new_state): Recognize the final state by the fact it
19270 is reached by eoftoken.
19271 (insert_start_shifting_state, insert_eof_shifting_state)
19272 (insert_accepting_state, augment_automaton): Remove, since now
19273 these states are automatically computed from the initial state.
19274 (generate_states): Adjust.
19275 * src/print.c: When reporting a rule number to the user, substract
19276 1, so that the axiom rule is rule 0, and the first user rule is 1.
19277 * src/reduce.c: Likewise.
19278 * src/print_graph.c (print_core): For the time being, just as for
19279 the report, depend upon --trace-flags to dump the full set of
19280 items.
19281 * src/reader.c (readgram): Once the grammar read, insert the rule
19282 0: `$axiom: START-SYMBOL $'.
19283 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19284 number of the states has changed (the final state is no longer
19285 necessarily the last), catch up.
19286
19287 2001-12-27 Akim Demaille <akim@epita.fr>
19288
19289 Try to make the use of the eoftoken valid. Given that its value
19290 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19291 is used instead of > 0 where appropriate, (ii), depend upon nritems
19292 instead of the 0-sentinel.
19293
19294 * src/gram.h, src/gram.c (nritems): New.
19295 Expected to be duplication of nitems, but for the time being...
19296 * src/reader.c (packgram): Assert nritems and nitems are equal.
19297 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19298 * src/closure.c (print_closure, print_fderives): Likewise.
19299 * src/gram.c (ritem_print): Likewise.
19300 * src/print.c (print_core, print_grammar): Likewise.
19301 * src/print_graph.c: Likewise.
19302
19303 2001-12-27 Akim Demaille <akim@epita.fr>
19304
19305 * src/main.c (main): If there are complains after grammar
19306 reductions, then output the report anyway if requested, then die.
19307 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19308 * src/reader.c (eoftoken): New.
19309 (parse_token_decl): If the token being defined has value `0', it
19310 is the eoftoken.
19311 (packsymbols): No longer hack `tags' to insert `$' by hand.
19312 Be sure to preserve the value of the eoftoken.
19313 (reader): Make sure eoftoken is defined.
19314 Initialize nsyms to 0: now eoftoken is created just like the others.
19315 * src/print.c (print_grammar): Don't special case the eof token.
19316 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19317 lie anyway, albeit pleasant.
19318 * tests/calc.at: Exercise error messages with eoftoken.
19319 Change the grammar so that empty input is invalid.
19320 Adjust expectations.
19321 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19322
19323 2001-12-27 Akim Demaille <akim@epita.fr>
19324
19325 * configure.in: Check the protos of strchr ans strspn.
19326 Replace strchr if needed.
19327 * src/system.h: Provide the protos of strchr, strspn and memchr if
19328 missing.
19329 * lib/strchr.c: New.
19330 * src/reader.c (symbols_save): Use strchr.
19331
19332 2001-12-27 Akim Demaille <akim@epita.fr>
19333
19334 * src/print.c, src/print_graph.c (escape): New.
19335 Use it to quote the TAGS outputs.
19336 * src/print_graph.c (print_state): Now errors are in red, and
19337 reductions in green.
19338 Prefer high to wide: output the state number on a line of its own.
19339
19340 2001-12-27 Akim Demaille <akim@epita.fr>
19341
19342 * src/state.h, src/state.c (reductions_new): New.
19343 * src/LR0.c (set_state_table): Let all the states have a
19344 `reductions', even if reduced to 0.
19345 (save_reductions): Adjust.
19346 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19347 * src/print.c (print_reductions, print_actions): Adjust.
19348 * src/output.c (action_row): Adjust.
19349
19350 2001-12-27 Akim Demaille <akim@epita.fr>
19351
19352 * src/state.h, src/state.c (errs_new, errs_dup): New.
19353 * src/LR0.c (set_state_table): Let all the states have an errs,
19354 even if reduced to 0.
19355 * src/print.c (print_errs, print_reductions): Adjust.
19356 * src/output.c (output_actions, action_row): Adjust.
19357 * src/conflicts.c (resolve_sr_conflict): Adjust.
19358
19359 2001-12-27 Akim Demaille <akim@epita.fr>
19360
19361 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19362
19363 2001-12-27 Akim Demaille <akim@epita.fr>
19364
19365 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19366 * src/print.c: here.
19367 (lookaheadset, shiftset): New, used as additional storage by
19368 print_reductions.
19369 (print_results): Adjust.
19370 (print_shifts, print_gotos, print_errs): New, extracted from...
19371 (print_actions): here.
19372 * src/print_graph.c (print_actions): Remove dead code.
19373
19374 2001-12-27 Akim Demaille <akim@epita.fr>
19375
19376 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19377 `$n' and `@n'.
19378
19379 2001-12-27 Akim Demaille <akim@epita.fr>
19380
19381 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19382 (build_relations): Adjust.
19383
19384 2001-12-27 Akim Demaille <akim@epita.fr>
19385
19386 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19387 duplication.
19388
19389 2001-12-27 Akim Demaille <akim@epita.fr>
19390
19391 * src/reader.c (packgram): Catch nitems overflows.
19392
19393 2001-12-27 Akim Demaille <akim@epita.fr>
19394
19395 * src/files.c, src/files.h (guard_obstack): Remove.
19396 * src/output.c (output): Adjust.
19397 * src/reader.c (parse_braces): New, factoring...
19398 (copy_action, copy_guard): these two which are renamed as...
19399 (parse_action, parse_guard): these.
19400 As a voluntary consequence, using braces around guards is now
19401 mandatory.
19402
19403 2001-12-27 Akim Demaille <akim@epita.fr>
19404
19405 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19406 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19407 members.
19408 (symbol_list_new): Adjust.
19409 (copy_action): action_line is the first line, not the last.
19410 (copy_guard): Just as for actions, store the `action' only, not
19411 the switch/case/break flesh.
19412 Don't parse the user action that might follow the guard, let...
19413 (readgram): do it, i.e., now, there can be an action after a
19414 guard.
19415 In other words the guard is just explicitly optional.
19416 (packgram): Adjust.
19417 * src/output.c (guards_output): New.
19418 (output_parser): Call it when needed.
19419 (output): Also free the guard and attrs obstacks.
19420 * src/files.c, src/files.h (obstack_save): Remove.
19421 (output_files): Remove.
19422 As a result, if one needs the former `.act' file, using an
19423 appropriate skeleton which requires actions and guards is now
19424 required.
19425 * src/main.c (main): Adjust.
19426 * tests/semantic.at: New.
19427 * tests/regression.at: Use `input.y' as input file name.
19428 Avoid 8+3 problems by requiring input.c when the test needs the
19429 parser.
19430
19431 2001-12-27 Akim Demaille <akim@epita.fr>
19432
19433 * src/reader.c (symbol_list_new): Be sure to initialize all the
19434 fields.
19435
19436 2001-12-27 Akim Demaille <akim@epita.fr>
19437
19438 All the hacks using a final pseudo state are now useless.
19439
19440 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19441 * src/lalr.c (nLA): New.
19442 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19443 instead of lookaheadsp from the pseudo state (nstate + 1).
19444
19445 2001-12-27 Akim Demaille <akim@epita.fr>
19446
19447 * src/output.c (action_row, token_actions): Use a state_t instead
19448 of a integer, and nlookaheads instead of the following state's
19449 lookaheadsp.
19450
19451 2001-12-27 Akim Demaille <akim@epita.fr>
19452
19453 * src/conflicts.c (log_resolution, flush_shift)
19454 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19455 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19456 (conflicts_print, print_reductions): Use a state_t instead of an
19457 integer when referring to a state.
19458 As much as possible, depend upon nlookaheads, instead of the
19459 `lookaheadsp' member of the following state (since lookaheads of
19460 successive states are successive, the difference between state n + 1
19461 and n served as the number of lookaheads for state n).
19462 * src/lalr.c (add_lookback_edge): Likewise.
19463 * src/print.c (print_core, print_actions, print_state)
19464 (print_results): Likewise.
19465 * src/print_graph.c (print_core, print_actions, print_state)
19466 (print_graph): Likewise.
19467 * src/conflicts.h: Adjust.
19468
19469 2001-12-27 Akim Demaille <akim@epita.fr>
19470
19471 * src/bison.hairy: Formatting/comment changes.
19472 ANSIfy.
19473 Remove `register' indications.
19474 Add plenty of `static'.
19475
19476 2001-12-27 Akim Demaille <akim@epita.fr>
19477
19478 * src/output.c (prepare): Drop the muscle `ntbase' which
19479 duplicates ntokens.
19480 * src/bison.simple: Formatting/comment changes.
19481 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19482 is an undocumented synonym.
19483
19484 2001-12-22 Akim Demaille <akim@epita.fr>
19485
19486 * src/output.c (output_table_data): Change the prototype to use
19487 `int' for array ranges: some invocations do pass an int, not a
19488 short.
19489 Reported by Wayne Green.
19490
19491 2001-12-22 Akim Demaille <akim@epita.fr>
19492
19493 Some actions of web2c.y are improperly triggered.
19494 Reported by Mike Castle.
19495
19496 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19497 * tests/regression.at (Web2c): Rename as...
19498 (Web2c Report): this.
19499 (Web2c Actions): New.
19500
19501 2001-12-22 Akim Demaille <akim@epita.fr>
19502
19503 Reductions in web2c.y are improperly reported.
19504 Reported by Mike Castle.
19505
19506 * src/conflicts.c (print_reductions): Fix.
19507 * tests/regression.at (Web2c): New.
19508
19509 2001-12-18 Akim Demaille <akim@epita.fr>
19510
19511 Some host fail on `assert (!"foo")', which expands to
19512 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19513 Reported by Nelson Beebee.
19514
19515 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19516 `#define it_succeeded 0' and `assert (it_succeeded)'.
19517
19518 2001-12-17 Marc Autret <autret_m@epita.fr>
19519
19520 * src/bison.simple: Don't hard code the skeleton line and filename.
19521 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19522 New line counter 'skeleton_line' (skeleton-line muscle).
19523
19524 2001-12-17 Paul Eggert <eggert@twinsun.com>
19525
19526 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19527 YYDEBUG must be defined to a nonzero value.
19528
19529 * src/bison.simple (yytname): Do not assume that the user defines
19530 YYDEBUG to a properly parenthesized expression.
19531
19532 2001-12-17 Akim Demaille <akim@epita.fr>
19533
19534 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19535 nlookaheads is a new member.
19536 Adjust all users.
19537 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19538 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19539 state.
19540
19541 2001-12-17 Akim Demaille <akim@epita.fr>
19542
19543 * src/files.h, src/files.c (open_files, close_files): Remove.
19544 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19545 let...
19546 * src/reader.c (reader): Do it.
19547
19548 2001-12-17 Akim Demaille <akim@epita.fr>
19549
19550 * src/conflicts.c (print_reductions): Formatting changes.
19551
19552 2001-12-17 Akim Demaille <akim@epita.fr>
19553
19554 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19555 (flush_reduce): New.
19556 (resolve_sr_conflict): Adjust.
19557
19558 2001-12-17 Akim Demaille <akim@epita.fr>
19559
19560 * src/output.c (output_obstack): Be static and rename as...
19561 (format_obstack): this, to avoid any confusion with files.c's
19562 output_obstack.
19563 * src/reader.h (muscle_obstack): Move to...
19564 * src/output.h: here, since it's defined in output.c.
19565
19566 2001-12-17 Akim Demaille <akim@epita.fr>
19567
19568 * src/output.c (action_row, save_column, default_goto)
19569 (sort_actions, matching_state, pack_vector): Better variable
19570 locality.
19571
19572 2001-12-17 Akim Demaille <akim@epita.fr>
19573
19574 * src/output.c: Various formatting changes.
19575
19576 2001-12-17 Akim Demaille <akim@epita.fr>
19577
19578 * src/files.c (output_files): Free the output_obstack.
19579 * src/main.c (main): Call print and print_graph conditionally.
19580 * src/print.c (print): Work unconditionally.
19581 * src/print_graph.c (print_graph): Work unconditionally.
19582 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19583
19584 2001-12-16 Marc Autret <autret_m@epita.fr>
19585
19586 * src/output.c (actions_output): Fix. When we use %no-lines,
19587 there is one less line per action.
19588
19589 2001-12-16 Marc Autret <autret_m@epita.fr>
19590
19591 * src/bison.simple: Remove a useless #line directive.
19592 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19593 * src/output.c (get_lines_number): New.
19594 (output_parser): Adjust, now takes care about the lines of a
19595 output muscles.
19596 Fix line numbering.
19597 (actions_output): Computes the number of lines taken by actions.
19598 (output_master_parser): Insert new skeleton which is the name of
19599 the output parser file name.
19600
19601 2001-12-15 Marc Autret <autret_m@epita.fr>
19602
19603 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19604
19605 2001-12-15 Marc Autret <autret_m@epita.fr>
19606
19607 * src/output.c (output_gram): Keep track of the hairy one.
19608
19609 2001-12-15 Akim Demaille <akim@epita.fr>
19610
19611 Make `make distcheck' work.
19612
19613 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19614 system.h which uses libgettext.h.
19615
19616 2001-12-15 Akim Demaille <akim@epita.fr>
19617
19618 * src/nullable.c (set_nullable): Useless rules must be skipped,
19619 otherwise, since we range over their symbols, we might look at a
19620 nonterminal which no longer ``exists'', i.e., it is not counted in
19621 `nvars', hence we overflow our arrays.
19622
19623 2001-12-15 Akim Demaille <akim@epita.fr>
19624
19625 The header can also be produced directly, without any obstack!
19626 Yahoo!
19627
19628 * src/files.c, src/files.h (defines_obstack): Remove.
19629 (compute_header_macro): Global.
19630 (defines_obstack_save): Remove.
19631 * src/reader.c (parse_union_decl): No longer output to
19632 defines_obstack: its content can be found in the `stype' muscle
19633 anyway.
19634 (output_token_translations): Merge into...
19635 (symbols_output): this.
19636 Rename as...
19637 (symbols_save): this.
19638 (reader): Adjust.
19639 * src/output.c (header_output): New.
19640 (output): Call it.
19641
19642 2001-12-15 Akim Demaille <akim@epita.fr>
19643
19644 * src/reader.c (parse_union_decl): Instead of handling two obstack
19645 simultaneously, use one to define the `stype' muscle, and use the
19646 value of the latter to fill defines_obstack.
19647 (copy_comment): Remove.
19648 (copy_comment2): Work for a single obstack.
19649 Rename as...
19650 (copy_comment): this.
19651
19652 2001-12-15 Akim Demaille <akim@epita.fr>
19653
19654 * src/lex.c, src/lex.h (xgetc): No longer static.
19655 * src/reader.c (parse_union_decl): Revamp.
19656
19657 2001-12-15 Akim Demaille <akim@epita.fr>
19658
19659 Still making progress in separating Bison into (i) input, (ii)
19660 process, (iii) output: now we can directly output the parser file
19661 without using table_obstack at all.
19662
19663 * src/files.c, src/files.h (table_obstack): Bye bye.
19664 (parser_file_name): New.
19665 * src/files.c (compute_output_file_names): Compute it.
19666 * src/output.c (actions_output, output_parser)
19667 (output_master_parser): To a file instead of an obstack.
19668
19669 2001-12-15 Akim Demaille <akim@epita.fr>
19670
19671 Attach actions to rules, instead of pre-outputting them to
19672 actions_obstack.
19673
19674 * src/gram.h (rule_t): action and action_line are new members.
19675 * src/reader.c (symbol_list): Likewise.
19676 (copy_action): Save the actions within the rule.
19677 (packgram): Save them in rule_table.
19678 * src/output.c (actions_output): New.
19679 (output_parser): Use it on `%%actions'.
19680 (output_rule_data): Don't free rule_table.
19681 (output): Do it.
19682 (prepare): Don't save the `action' muscle.
19683 * src/bison.simple: s/%%action/%%actions/.
19684
19685 2001-12-15 Akim Demaille <akim@epita.fr>
19686
19687 * src/reader.c (copy_action): When --yacc, don't append a `;'
19688 to the user action: let it fail if lacking.
19689 Suggested by Arnold Robbins and Tom Tromey.
19690
19691 2001-12-14 Akim Demaille <akim@epita.fr>
19692
19693 * src/lex.c (literalchar): Simply return the char you decoded, non
19694 longer mess around with obstacks and int pointers.
19695 Adjust all callers.
19696
19697 2001-12-14 Akim Demaille <akim@epita.fr>
19698
19699 * src/lex.c (literalchar): Don't escape the special characters,
19700 just decode them, and keep them as char (before, eol was output as
19701 the 2 char string `\n' etc.).
19702 * src/output.c (output_rule_data): Use quotearg to output the
19703 token strings.
19704
19705 2001-12-13 Paul Eggert <eggert@twinsun.com>
19706
19707 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19708 Do not infringe on the global user namespace when using C++.
19709 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19710 All uses of `fprintf' and `stderr' changed.
19711
19712 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19713
19714 2001-12-13 Akim Demaille <akim@epita.fr>
19715
19716 The computation of nullable is broken: it doesn't handle empty
19717 RHS's properly.
19718
19719 * tests/torture.at (GNU AWK Grammar): New.
19720 * tests/sets.at (Nullable): New.
19721 * src/nullable.c (set_nullable): Instead of blindly looping over
19722 `ritems', loop over the rules, and then over their rhs's.
19723
19724 Work around Autotest bugs.
19725
19726 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19727 frame, because Autotest understand lines starting with a `+' as
19728 traces from the shell. Then, they are not processed properly.
19729 Admittedly an Autotest bug, but we don't have time to wait for
19730 Autotest to catch up.
19731 * tests/regression.at (Broken Closure): Adjust to the new table
19732 frames.
19733 Move to...
19734 * tests/sets.at: here.
19735
19736 2001-12-13 Akim Demaille <akim@epita.fr>
19737
19738 * src/closure.c (closure): Use nrules instead of playing tricks
19739 with BITS_PER_WORD.
19740
19741 2001-12-13 Akim Demaille <akim@epita.fr>
19742
19743 * src/print.c (print_actions): Output the handling of `$' as the
19744 traces do: shifting the token EOF. Before EOF was treated as a
19745 nonterminal.
19746 * tests/regression.at: Adjust some tests.
19747 * src/print_graph.c (print_core): Complete the set of items via
19748 closure. The next-to-final and final states are still unsatisfying,
19749 but that's to be addressed elsewhere.
19750 No longer output the rule numbers, but do output the state number.
19751 A single loop for the shifts + gotos is enough, but picked a
19752 distinct color for each.
19753 (print_graph): Initialize and finalize closure.
19754
19755 2001-12-13 Akim Demaille <akim@epita.fr>
19756
19757 * src/reader.c (readgram): Remove dead code, an strip useless
19758 braces.
19759 (get_type): Remove, unused.
19760
19761 2001-12-12 Akim Demaille <akim@epita.fr>
19762
19763 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19764 on that of lib/error.c.
19765
19766 2001-12-12 Akim Demaille <akim@epita.fr>
19767
19768 Some hosts don't like `/' in includes.
19769
19770 * src/system.h: Include libgettext.h without qualifying the path.
19771 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19772 $(top_srcdir).
19773
19774 2001-12-11 Marc Autret <autret_m@epita.fr>
19775
19776 * src/output.c (output_parser): Remove useless muscle.
19777
19778 2001-12-11 Marc Autret <autret_m@epita.fr>
19779
19780 * src/bison.simple: Remove #line just before %%epilogue. It
19781 is now handled in ...
19782 * src/reader.c (read_additionnal_code): Add the output of a
19783 #line for the epilogue.
19784
19785 2001-12-10 Marc Autret <autret_m@epita.fr>
19786
19787 * src/reader.c (copy_definition): Re-use CPP-outed code which
19788 replace precedent remove.
19789 * src/bison.simple: Remove #line before %%prologue because
19790 %%input-line is wrong at this time.
19791
19792 2001-12-10 Marc Autret <autret_m@epita.fr>
19793
19794 * src/reader.c (symbols_output): Clean up.
19795 * src/output.c (output_gram, output): Clean up.
19796
19797 2001-12-10 Akim Demaille <akim@epita.fr>
19798
19799 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19800 * src/LR0.c (set_state_table): here.
19801 * src/lalr.c (lalr): Call it.
19802
19803 2001-12-10 Akim Demaille <akim@epita.fr>
19804
19805 * src/state.h (shifts): Remove the `number' member: shifts are
19806 attached to state, hence no longer need to be labelled with a
19807 state number.
19808
19809 2001-12-10 Akim Demaille <akim@epita.fr>
19810
19811 Now that states have a complete set of members, the linked list of
19812 shifts is useless: just fill directly the state's shifts member.
19813
19814 * src/state.h (shifts): Remove the `next' member.
19815 * src/LR0.c (first_state, last_state): Remove.
19816 Adjust the callers.
19817 (augment_automaton): Don't look for the shifts that must be added
19818 a shift on EOF: it is those of the state we looked for! But now,
19819 since shifts are attached, it is no longer needed to looking
19820 merely by its id: its number.
19821
19822 2001-12-10 Akim Demaille <akim@epita.fr>
19823
19824 * src/LR0.c (augment_automaton): Better variable locality.
19825 Remove an impossible branch: if there is a state corresponding to
19826 the start symbol being shifted, then there is shift for the start
19827 symbol from the initial state.
19828
19829 2001-12-10 Akim Demaille <akim@epita.fr>
19830
19831 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19832 only when appropriate: when insert_start_shifting_state' is not
19833 invoked.
19834 * tests/regression.at (Rule Line Numbers): Adjust.
19835
19836 2001-12-10 Akim Demaille <akim@epita.fr>
19837
19838 * src/LR0.c (augment_automaton): Now that all states have shifts,
19839 merge the two cases addition shifts to the initial state.
19840
19841 2001-12-10 Akim Demaille <akim@epita.fr>
19842
19843 * src/lalr.c (set_state_table): Move to...
19844 * src/LR0.c: here.
19845 * src/lalr.c (lalr): Don't call it...
19846 * src/LR0.c (generate_states): do it.
19847 * src/LR0.h (first_state): Remove, only the table is used.
19848
19849 2001-12-10 Akim Demaille <akim@epita.fr>
19850
19851 * src/LR0.h (first_shift, first_reduction): Remove.
19852 * src/lalr.c: Don't use first_shift: find shifts through the
19853 states.
19854
19855 2001-12-10 Akim Demaille <akim@epita.fr>
19856
19857 * src/LR0.c: Attach shifts to states as soon as they are
19858 computed.
19859 * src/lalr.c (set_state_table): Instead of assigning shifts to
19860 state, just assert that the mapping was properly done.
19861
19862 2001-12-10 Akim Demaille <akim@epita.fr>
19863
19864 * src/LR0.c (insert_start_shift): Rename as...
19865 (insert_start_shifting_state): this.
19866 (insert_eof_shifting_state, insert_accepting_state): New.
19867 (augment_automaton): Adjust.
19868 Better locality of the variables.
19869 When looking if the start_symbol is shifted from the initial
19870 state, using `while (... symbol != start_symbol ...)' sounds
19871 better than `while (... symbol < start_symbol ...)': If fail
19872 to see how the order between symbols could be relevant!
19873
19874 2001-12-10 Akim Demaille <akim@epita.fr>
19875
19876 * src/getargs.h: Don't declare `spec_name_prefix' and
19877 `spec_file_prefix', declared by src/files.h.
19878 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19879 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19880 * src/output.c (prepare): Adjust.
19881 * src/reader.c (symbols_output): Likewise.
19882 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19883
19884 2001-12-10 Akim Demaille <akim@epita.fr>
19885
19886 * src/muscle_tab.c (muscle_init): NULL is a better default than
19887 `"0"'.
19888
19889 2001-12-10 Akim Demaille <akim@epita.fr>
19890
19891 * src/reader.c (reader): Calling symbols_output once is enough.
19892
19893 2001-12-10 Akim Demaille <akim@epita.fr>
19894
19895 Now that states have a complete set of members, the linked list of
19896 reductions is useless: just fill directly the state's reductions
19897 member.
19898
19899 * src/state.h (struct reductions): Remove member `number' and
19900 `next'.
19901 * src/LR0.c (first_reduction, last_reduction): Remove.
19902 (save_reductions): Don't link the new reductions, store them in
19903 this_state.
19904 * src/lalr.c (set_state_table): No need to attach reductions to
19905 states, it's already done.
19906 * src/output.c (output_actions): No longer free the shifts, then
19907 the reductions, then the states: free all the states and their
19908 members.
19909
19910 2001-12-10 Akim Demaille <akim@epita.fr>
19911
19912 * src/options.c (OPTN, DRTV, BOTH): New.
19913 (option_table): Use them.
19914
19915 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19916 the job of system.h.
19917 * src/options.c: Don't include stdio.h and xalloc.h for the same
19918 reasons.
19919
19920 2001-12-10 Akim Demaille <akim@epita.fr>
19921
19922 * src/output.c (output, prepare): Make sure the values of the
19923 muscles `action' and `prologue' are 0-terminated.
19924
19925 2001-12-10 Akim Demaille <akim@epita.fr>
19926
19927 Clean up GCC warnings.
19928
19929 * src/reader.c (copy_action): `buf' is not used.
19930 (parse_skel_decl): Be static.
19931 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19932 * src/options.h (create_long_option_table): Have a real prototype.
19933 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19934 (hash_delete_at): Return const void *.
19935 Adjust casts to preserve the const.
19936
19937 2001-12-10 Akim Demaille <akim@epita.fr>
19938
19939 * configure.in: Require 2.52g.
19940 M4 is not needed, but AUTOM4TE is.
19941 * m4/m4.m4: Remove.
19942 * tests/Makefile.am: Adjust.
19943
19944 2001-12-10 Akim Demaille <akim@epita.fr>
19945
19946 One structure for states is enough, even though theoretically
19947 there are LR(0) states and LALR(1) states.
19948
19949 * src/lalr.h (state_t): Remove.
19950 (state_table): Be state_t **, not state_t *.
19951 * src/state.h (core, CORE_ALLOC): Rename as...
19952 (state_t, STATE_ALLOC): this.
19953 Add the LALR(1) members: shifts, reductions, errs.
19954 * src/LR0.c (state_table): Rename as...
19955 (state_hash): this, to avoid name clashes with the global
19956 `state_table'.
19957 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19958 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19959
19960 2001-12-10 Akim Demaille <akim@epita.fr>
19961
19962 Bison dumps core on bash.y.
19963 Reported by Pascal Bart.
19964
19965 * src/warshall.c (bitmatrix_print): New.
19966 (TC): Use it.
19967 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19968 j must be the outer loop.
19969 * tests/regression.at (Broken Closure): New.
19970
19971 2001-12-05 Akim Demaille <akim@epita.fr>
19972
19973 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19974 its argument.
19975 Reported by Peter Hamorsky.
19976
19977 2001-12-05 Akim Demaille <akim@epita.fr>
19978
19979 * src/conflicts.c (err_table): Remove.
19980 (resolve_sr_conflict): Adjust.
19981 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19982 Rename as...
19983 (state_t.reductions, state_t.shifts): this.
19984
19985 2001-12-05 Akim Demaille <akim@epita.fr>
19986
19987 * src/reduce.c (reduce_grammar_tables): No longer disable the
19988 removal of useless rules via CPP but via `if (0)', so that the
19989 compiler still check the code is valid.
19990 For instance, it should have noticed `rline' no longer exists: use
19991 the `line' member of rule_t.
19992 * src/gram.c (dummy, rline): Remove, unused.
19993
19994 2001-12-05 Akim Demaille <akim@epita.fr>
19995
19996 * src/output.c (pack_vector): Use assert, not berror.
19997 * src/main.c (berror): Remove, unused.
19998
19999 2001-12-05 Akim Demaille <akim@epita.fr>
20000
20001 New experimental feature: if --verbose --trace output all the
20002 items of a state, not only its kernel.
20003
20004 * src/print.c (print_core): If `trace_flag', then invoke closure
20005 before outputting the items of the state (print_core is no longer
20006 a correct name them).
20007 (print_results): Invoke new_closure/free_closure if needed.
20008
20009 2001-12-05 Akim Demaille <akim@epita.fr>
20010
20011 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20012 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20013 (nitemset): for consistency with the rest of the project.
20014
20015 2001-12-05 Akim Demaille <akim@epita.fr>
20016
20017 * src/closure.c (print_closure): Improve.
20018 (closure): Use it for printing input and output.
20019
20020 2001-12-05 Akim Demaille <akim@epita.fr>
20021
20022 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20023 indexed by nonterminals.
20024
20025 2001-12-05 Akim Demaille <akim@epita.fr>
20026
20027 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20028 what it was!).
20029 * src/warshall.h: Remove accidental duplication of the content.
20030
20031 2001-12-05 Akim Demaille <akim@epita.fr>
20032
20033 * src/closure.c (set_fderives): De-obfuscate.
20034
20035 2001-12-05 Akim Demaille <akim@epita.fr>
20036
20037 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20038
20039 2001-12-05 Akim Demaille <akim@epita.fr>
20040
20041 * src/closure.c (set_firsts): De-obfuscate.
20042
20043 2001-12-05 Akim Demaille <akim@epita.fr>
20044
20045 * src/output.c (action_row): De-obfuscate
20046 using the good o' techniques: arrays not pointers, variable
20047 locality, BITISSET, RESETBIT etc.
20048
20049 2001-12-05 Akim Demaille <akim@epita.fr>
20050
20051 Pessimize the code to simplify it: from now on, all the states
20052 have a valid SHIFTS, which NSHIFTS is possibly 0.
20053
20054 * src/LR0.c (shifts_new): Be global and move to..
20055 * src/state.c, src/state.h: here.
20056 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20057 * src/print_graph: Adjust.
20058
20059 2001-12-05 Akim Demaille <akim@epita.fr>
20060
20061 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20062 * src/conflicts.c: Use it.
20063 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20064 incorrectly ``simplified''.
20065
20066 2001-12-05 Akim Demaille <akim@epita.fr>
20067
20068 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20069 using the good o' techniques: arrays not pointers, variable
20070 locality, BITISSET, RESETBIT etc.
20071
20072 2001-12-05 Akim Demaille <akim@epita.fr>
20073
20074 * src/state.h (SHIFT_SYMBOL): New.
20075 * src/conflicts.c: Use it to deobfuscate.
20076
20077 2001-12-05 Akim Demaille <akim@epita.fr>
20078
20079 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20080 (print_reductions): De-obfuscate using the good o' techniques:
20081 arrays not pointers, variable locality, BITISSET.
20082
20083 2001-12-05 Akim Demaille <akim@epita.fr>
20084
20085 * src/conflicts.c (print_reductions): Arrays, not pointers.
20086 Use BITISSET.
20087
20088 2001-12-05 Akim Demaille <akim@epita.fr>
20089
20090 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20091
20092 2001-12-05 Akim Demaille <akim@epita.fr>
20093
20094 * src/conflicts.c (print_reductions): Improve variable locality.
20095
20096 2001-12-05 Akim Demaille <akim@epita.fr>
20097
20098 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20099
20100 2001-12-05 Akim Demaille <akim@epita.fr>
20101
20102 * src/conflicts.c (print_reductions): Improve variable locality.
20103
20104 2001-12-05 Akim Demaille <akim@epita.fr>
20105
20106 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20107 * src/lalr.c: Use them.
20108
20109 2001-12-05 Akim Demaille <akim@epita.fr>
20110
20111 * src/LR0.c (augment_automaton): Formatting changes.
20112 Better variable locality.
20113
20114 2001-12-05 Akim Demaille <akim@epita.fr>
20115
20116 * src/lalr.c (matrix_print): New.
20117 (transpose): Use it.
20118 Use arrays instead of pointers.
20119
20120 2001-12-05 Akim Demaille <akim@epita.fr>
20121
20122 * src/lalr.c (maxrhs): Move to...
20123 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20124 * src/lalr.c (build_relations): Adjust.
20125
20126 2001-12-05 Akim Demaille <akim@epita.fr>
20127
20128 * src/lalr.c (transpose): Free the memory allocated to the
20129 argument, as it is replaced by the results by the unique caller.
20130 (build_relations): Merely invoke transpose: it handles the memory
20131 deallocation.
20132 Improve variable locality.
20133 Avoid variables used as mere abbreviations.
20134 (compute_lookaheads): Use arrays instead of pointers.
20135
20136 2001-12-05 Akim Demaille <akim@epita.fr>
20137
20138 * src/lalr.c (initialize_F): Improve variable locality.
20139 Avoid variables used as mere abbreviations.
20140
20141 2001-12-05 Akim Demaille <akim@epita.fr>
20142
20143 * src/derives.c (print_derives): Display the ruleno.
20144 * src/lalr.c (initialize_F, transpose): Better variable locality
20145 to improve readability.
20146 Avoid variables used as mere abbreviations.
20147
20148 2001-12-05 Akim Demaille <akim@epita.fr>
20149
20150 * src/lalr.c (traverse): Use arrays instead of pointers.
20151
20152 2001-12-05 Akim Demaille <akim@epita.fr>
20153
20154 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20155 the handling of squeue.
20156 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20157
20158 2001-12-05 Akim Demaille <akim@epita.fr>
20159
20160 Because useless nonterminals are now kept alive (instead of being
20161 `destroyed'), we now sometimes examine them, and store information
20162 related to them. Hence we need to know their number, and adjust
20163 memory allocations.
20164
20165 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20166 static.
20167 * src/LR0.c (allocate_itemsets): The memory allocated to
20168 `symbol_count' was used for two different purpose: once to count
20169 the number of occurrences of each symbol, and later reassigned to
20170 `shift_symbol', containing the symbol that can be shifted from a
20171 given state.
20172 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20173 only, and...
20174 (new_itemsets): Allocate `shift_symbol' here.
20175 (allocate_itemsets): symbol_count includes useless nonterminals.
20176 Make room for them.
20177 (free_storage): Use `free', not `XFREE', for pointers that cannot
20178 be null.
20179
20180 2001-12-05 Akim Demaille <akim@epita.fr>
20181
20182 * src/nullable.c (set_nullable): Deobfuscate the handling of
20183 ritem.
20184 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20185
20186 2001-12-05 Akim Demaille <akim@epita.fr>
20187
20188 * src/gram.c, src/gram.h (ritem_print): New.
20189 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20190 (This useless function was defined only to work around VMS linkers
20191 that can't handle compilation units with variables only).
20192 * src/reduce.c (dump_grammar): Use it to trace the construction of
20193 ritem.
20194
20195 2001-12-04 Paul Eggert <eggert@twinsun.com>
20196
20197 * src/bison.simple (union yyalloc): Change member names
20198 to be the same as the stack names.
20199 (yyparse): yyptr is now union yyalloc *, not char *.
20200 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20201 and may generate better code on some machines.
20202 (yystpcpy): Use prototype if __STDC__ is defined, not just
20203 if __cplusplus is defined.
20204
20205 2001-11-30 Akim Demaille <akim@epita.fr>
20206
20207 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20208 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20209 Gettext doesn't compile cleanly, and dies with -Werror.
20210 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20211 Include WARNING_CFLAGS here.
20212 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20213 before being defined.
20214
20215 2001-11-27 Paul Eggert <eggert@twinsun.com>
20216
20217 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20218 First arg is int, not unsigned.
20219 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20220 (SIZE_MAX, UINT_MAX): New macros.
20221 (quotearg_n_options): Abort if N is negative.
20222 Avoid overflow check on hosts where size_t is 64 bits and int
20223 is 32 bits, as overflow is impossible there.
20224 Fix off-by-one typo that caused unnecessary reallocation.
20225
20226 2001-11-29 Paul Eggert <eggert@twinsun.com>
20227
20228 Name space cleanup in generated parser.
20229
20230 * doc/bison.texinfo (Bison Parser): Discuss system headers
20231 and their effect on the user name space.
20232
20233 * src/bison.simple:
20234 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20235 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20236 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20237
20238 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20239 on user names when possible.
20240
20241 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20242 Simplify test for whather <alloca.h> exists.
20243
20244 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20245
20246 (<stdio.h>): Include if YYDEBUG.
20247
20248 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20249 ! defined (yyoverflow) && ! defined (yymemcpy).
20250
20251 (yymemcpy, yyparse): Rename local variables as needed so that
20252 they all begin with 'yy'.
20253
20254 (yystrlen, yystpcpy): New functions.
20255
20256 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20257 All uses changed.
20258
20259 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20260 instead of relying on string.h functions. Use YYSTACK_ALLOC
20261 and YYSTACK_FREE instead of malloc and free.
20262
20263 2001-11-30 Akim Demaille <akim@epita.fr>
20264
20265 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20266 before their first uses.
20267 (YYBISON, YYPURE): Move to the top of the output.
20268
20269 2001-11-30 Akim Demaille <akim@epita.fr>
20270
20271 * tests/reduce.at (Useless Nonterminals): Fix.
20272
20273 2001-11-30 Akim Demaille <akim@epita.fr>
20274
20275 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20276 if body instead of `;' to pacify GCC's warnings.
20277
20278 2001-11-30 Akim Demaille <akim@epita.fr>
20279
20280 Instead of mapping the LHS of unused rules to -1, keep the LHS
20281 valid, but flag the rules as invalid.
20282
20283 * src/gram.h (rule_t): `useful' is a new member.
20284 * src/print.c (print_grammar): Adjust.
20285 * src/derives.c (set_derives): Likewise.
20286 * src/reader.c (packgram, reduce_output): Likewise.
20287 * src/reduce.c (reduce_grammar_tables): Likewise.
20288 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20289
20290 2001-11-30 Akim Demaille <akim@epita.fr>
20291
20292 * src/reduce.c (reduce_output): Formatting changes.
20293 * src/print.c (print_results, print_grammar): Likewise.
20294 * tests/regression.at (Rule Line Numbers)
20295 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20296
20297 2001-11-30 Akim Demaille <akim@epita.fr>
20298
20299 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20300 useless nonterminals, move them at the end of the symbol arrays.
20301 (reduce_output): Adjust.
20302 * tests/reduce.at (Useless Nonterminals): Adjust.
20303
20304 2001-11-30 Akim Demaille <akim@epita.fr>
20305
20306 * src/reduce.c: Various comment/formatting changes.
20307 (nonterminals_reduce): New, extracted from...
20308 (reduce_grammar_tables): here.
20309 (reduce_grammar): Call nonterminals_reduce.
20310
20311 2001-11-29 Paul Eggert <eggert@twinsun.com>
20312
20313 * src/bison.simple (YYSTACK_REALLOC): Remove.
20314 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20315 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20316 New macros.
20317 (union yyalloc): New type.
20318 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20319 an arbitrary restriction on hosts where size_t is wider than int.
20320
20321 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20322 a parser stack overflow. Allocate just one block of memory for all
20323 three stacks, instead of allocating three blocks; this typically is
20324 faster and reduces fragmentation.
20325
20326 Do not limit the number of items in the stack to a value that fits
20327 in 'int', as this is an arbitrary limit on hosts with 64-bit
20328 size_t and 32-bit int.
20329
20330 2001-11-29 Marc Autret <autret_m@epita.fr>
20331
20332 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20333 of defining YYERROR_VERBOSE.
20334 [AT_DATA]: $4 is now out of C declarations in the prologue.
20335
20336 2001-11-28 Marc Autret <autret_m@epita.fr>
20337
20338 * src/reader.c (parse_dquoted_param): New.
20339 (parse_skel_decl): Use it.
20340 * src/lex.h: Add its prototype.
20341 * src/lex.c (literalchar): Become not static.
20342
20343 2001-11-28 Marc Autret <autret_m@epita.fr>
20344
20345 * src/output.h: And put its extern declaration here.
20346 * src/output.c (error_verbose): Define here.
20347 (prepare): Echo name modification.
20348 * src/getargs.h: Clean its extern declaration.
20349 * src/getargs.c (error_verbose_flag): Remove.
20350 (getargs): Remove case 'e'.
20351 * src/options.c (option_table): 'error-verbose' is now seen as simple
20352 percent option.
20353 Include output.h.
20354
20355 * src/reader.c (read_declarations): Remove case tok_include.
20356 (parse_include_decl): Remove.
20357 * src/lex.h (token_t): Remove tok_include.
20358 * src/options.c (option_table): 'include' is now a simple command line
20359 option.
20360
20361 2001-11-28 Marc Autret <autret_m@epita.fr>
20362
20363 * src/bison.simple: Adjust muscle names.
20364 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20365 * src/output.c (prepare): s/_/-/ for the muscles names.
20366 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20367
20368 2001-11-28 Marc Autret <autret_m@epita.fr>
20369
20370 * src/bison.simple: Fix debug.
20371 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20372
20373 2001-11-28 Akim Demaille <akim@epita.fr>
20374
20375 * src/LR0.c (shifts_new): New.
20376 (save_shifts, insert_start_shift, augment_automaton): Use it.
20377
20378 2001-11-28 Akim Demaille <akim@epita.fr>
20379
20380 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20381 keep ruleno only.
20382
20383 2001-11-28 Akim Demaille <akim@epita.fr>
20384
20385 * src/closure.c (closure): Instead of looping over word in array
20386 then bits in words, loop over bits in array.
20387
20388 2001-11-28 Akim Demaille <akim@epita.fr>
20389
20390 * src/closure.c (closure): No longer optimize the special case
20391 where all the bits of `ruleset[r]' are set to 0, to make the code
20392 clearer.
20393
20394 2001-11-28 Akim Demaille <akim@epita.fr>
20395
20396 * src/closure.c (closure): `r' and `c' are new variables, used to
20397 de-obfuscate accesses to RULESET and CORE.
20398
20399 2001-11-28 Akim Demaille <akim@epita.fr>
20400
20401 * src/reduce.c (reduce_print): Use ngettext.
20402 (dump_grammar): Improve the trace accuracy.
20403
20404 2001-11-28 Akim Demaille <akim@epita.fr>
20405
20406 * src/reduce.c (dump_grammar): Don't translate trace messages.
20407
20408 2001-11-28 Akim Demaille <akim@epita.fr>
20409
20410 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20411 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20412 as all tags are free'ed afterwards.
20413 From Enrico Scholz.
20414
20415 2001-11-27 Paul Eggert <eggert@twinsun.com>
20416
20417 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20418 use alloca when we didn't want to, and vice versa.
20419
20420 2001-11-27 Marc Autret <autret_m@epita.fr>
20421
20422 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20423 initialization.
20424 * src/output.c (prepare): Remove its update.
20425
20426 2001-11-27 Marc Autret <autret_m@epita.fr>
20427
20428 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20429 Use %error-verbose.
20430
20431 2001-11-27 Marc Autret <autret_m@epita.fr>
20432
20433 * src/bison.simple: Remove YYERROR_VERBOSE using.
20434 Use %%error_verbose.
20435 (yyparse): Likewise.
20436 * src/output.c (prepare): Give its final value.
20437 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20438 * src/getargs.h: Add its extern declaration.
20439 * src/getargs.c (error_verbose_flag): New int.
20440 (getargs): Update to catch new case.
20441 * src/options.c (option_table): 'error-verbose' is a new option.
20442 (shortopts): Update.
20443
20444 2001-11-27 Akim Demaille <akim@epita.fr>
20445
20446 * src/system.h: Use intl/libgettext.h.
20447 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20448
20449 2001-11-27 Akim Demaille <akim@epita.fr>
20450
20451 * tests/torture.at (Exploding the Stack Size with Malloc):
20452 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20453
20454 2001-11-27 Akim Demaille <akim@epita.fr>
20455
20456 * src/files.c: Include error.h.
20457 Reported by Hans Aberg.
20458
20459 2001-11-26 Marc Autret <autret_m@epita.fr>
20460
20461 * src/reader.c (parse_include_decl): New, not yet implemented.
20462 (read_declarations): Add case tok_include.
20463 * src/getargs.h (include): Add its extern definition.
20464 * src/getargs.c (include): New const char *.
20465 (getargs): Add case '-I'.
20466 * src/options.c (option_table): Add include as command line and
20467 percent option.
20468 * src/lex.h (token_t): Add tok_include.
20469
20470 2001-11-26 Akim Demaille <akim@epita.fr>
20471
20472 * src/reader.c (readgram): Make sure rules for mid-rule actions
20473 have a lineno equal to that of their host rule.
20474 Reported by Hans Aberg.
20475 * tests/regression.at (Rule Line Numbers): New.
20476
20477 2001-11-26 Akim Demaille <akim@epita.fr>
20478
20479 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20480 size_ts.
20481
20482 2001-11-26 Akim Demaille <akim@epita.fr>
20483
20484 * src/complain.c, src/complain.h (error): Remove, provided by
20485 lib/error.[ch].
20486
20487 2001-11-26 Akim Demaille <akim@epita.fr>
20488
20489 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20490 issue an error message.
20491 * tests/regression.at (Invalid %directive): New.
20492 Reported by Hans Aberg.
20493
20494 2001-11-26 Akim Demaille <akim@epita.fr>
20495
20496 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20497 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20498
20499 2001-11-26 Akim Demaille <akim@epita.fr>
20500
20501 * src/conflicts.c (conflicts_print): Don't complain at all when
20502 there are no reduce/reduce conflicts, and as many shift/reduce
20503 conflicts as expected.
20504 * tests/regression.at (%expect right): Adjust.
20505
20506 2001-11-23 Akim Demaille <akim@epita.fr>
20507
20508 * lib/alloca.c: Update, from fileutils.
20509
20510 2001-11-23 Akim Demaille <akim@epita.fr>
20511
20512 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20513
20514 2001-11-23 Akim Demaille <akim@epita.fr>
20515
20516 * src/system.h: Include alloca.h.
20517 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20518
20519 2001-11-23 Akim Demaille <akim@epita.fr>
20520
20521 * src/print_graph.c (print_actions): Remove `rule', unused.
20522 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20523 pacify GCC's signed < unsigned warnings.
20524 * src/closure.c (itemsetsize): Likewise.
20525 * src/reader.c (symbol_list_new): Static.
20526
20527 2001-11-23 Akim Demaille <akim@epita.fr>
20528
20529 Attaching lineno to buckets is stupid, since only one copy of each
20530 symbol is kept, only the line of the first occurrence is kept too.
20531
20532 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20533 * src/reader.c (rline_allocated): Remove, unused.
20534 (symbol_list): Have a `line' member.
20535 (symbol_list_new): New.
20536 (readgram): Use it.
20537 * src/print.c (print_grammar): Output the rule line numbers.
20538 * tests/regression.at (Solved SR Conflicts)
20539 (Unresolved SR Conflicts): Adjust.
20540 Reported by Hans Aberg.
20541
20542 2001-11-22 Marc Autret <autret_m@epita.fr>
20543
20544 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20545
20546 2001-11-22 Marc Autret <autret_m@epita.fr>
20547
20548 * src/muscle_tab.c (muscle_init): Remove initialization of
20549 skeleton muscle.
20550 * src/output.c (output_master_parser): Do it here.
20551
20552 2001-11-20 Akim Demaille <akim@epita.fr>
20553
20554 * po/sv.po: New.
20555 * configure.in (ALL_LINGUAS): Adjust.
20556 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20557 longer contains strings to translate.
20558
20559 2001-11-19 Akim Demaille <akim@epita.fr>
20560
20561 * src/conflicts.c (conflicts_print): Add a missing \n.
20562
20563 2001-11-19 Akim Demaille <akim@epita.fr>
20564
20565 * src/nullable.c (nullable_print): New.
20566 (set_nullable): Call it when tracing.
20567 Better locality of variables.
20568
20569 2001-11-19 Akim Demaille <akim@epita.fr>
20570
20571 * src/print.c (print_actions): Better locality of variables.
20572
20573 2001-11-19 Akim Demaille <akim@epita.fr>
20574
20575 * src/derives.c (print_derives): Fix and enrich.
20576 * src/closure.c (print_fderives): Likewise.
20577
20578 2001-11-19 Akim Demaille <akim@epita.fr>
20579
20580 * src/closure.c (itemsetend): Remove, replaced with...
20581 (itemsetsize): new.
20582
20583 2001-11-19 Akim Demaille <akim@epita.fr>
20584
20585 * src/LR0.c (kernel_end): Remove, replaced with...
20586 (kernel_size): new.
20587
20588 2001-11-19 Akim Demaille <akim@epita.fr>
20589
20590 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20591 to clarify.
20592
20593 2001-11-19 Akim Demaille <akim@epita.fr>
20594
20595 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20596
20597 2001-11-19 Akim Demaille <akim@epita.fr>
20598
20599 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20600 trace messages.
20601 * src/LR0.c: Likewise.
20602 (allocate_itemsets): Use arrays instead of pointers to clarify.
20603
20604 2001-11-19 Akim Demaille <akim@epita.fr>
20605
20606 * src/getargs.c (statistics_flag): Replace with...
20607 (trace_flag): New.
20608 (longopts): Accept --trace instead of --statistics.
20609 * src/getargs.h, src/options.c: Adjust.
20610 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20611 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20612
20613 2001-11-19 Akim Demaille <akim@epita.fr>
20614
20615 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20616 pointers to clarify the code.
20617 (save_reductions, save_shifts): Factor common parts of alternatives.
20618
20619 2001-11-19 Akim Demaille <akim@epita.fr>
20620
20621 * src/LR0.c (new_state, get_state): Complete TRACE code.
20622 * src/closure.c: Include `reader.h' to get `tags', needed by the
20623 trace code.
20624 Rename the conditional DEBUG as TRACE.
20625 Output consistently TRACEs to stderr, not stdout.
20626 * src/derives.c: Likewise.
20627 * src/reduce.c: (inaccessable_symbols): Using if is better style
20628 than goto.
20629 Use `#if TRACE' instead of `#if 0' for tracing code.
20630
20631 2001-11-19 Akim Demaille <akim@epita.fr>
20632
20633 * src/system.h (LIST_FREE, shortcpy): New.
20634 * src/LR0.c: Use them.
20635 * src/output.c (free_itemsets, free_reductions, free_shifts):
20636 Remove, replaced by LIST_FREE.
20637
20638 2001-11-19 Akim Demaille <akim@epita.fr>
20639
20640 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20641 (REDUCTIONS_ALLOC): New.
20642 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20643 allocation.
20644
20645 2001-11-19 Akim Demaille <akim@epita.fr>
20646
20647 * src/LR0.c (new_state): Complete trace code.
20648 * src/nullable.c (set_nullable): Don't translate traces.
20649
20650 2001-11-19 Akim Demaille <akim@epita.fr>
20651
20652 * src/print_graph.c (print_core): Better locality of variables.
20653 * src/print.c (print_core): Likewise.
20654
20655 2001-11-19 Akim Demaille <akim@epita.fr>
20656
20657 * src/vcg.c: You do the output, so you are responsible of the
20658 handling of VCG syntax, in particular: use quotearg.
20659 * src/print_graph.c: Don't.
20660 (print_actions): Don't output the actions as part of the nodes,
20661 since that's the job of the edges.
20662 (print_state): Don't output by hand: fill the node description,
20663 and ask for its output.
20664
20665 2001-11-19 Akim Demaille <akim@epita.fr>
20666
20667 * src/bison.simple (yyparse): When verbosely reporting an error,
20668 no longer put additional quotes around token names.
20669 * tests/calc.at: Adjust.
20670
20671 2001-11-19 Akim Demaille <akim@epita.fr>
20672
20673 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20674 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20675 * src/output.c: Adjust.
20676
20677 2001-11-19 Akim Demaille <akim@epita.fr>
20678
20679 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20680 (rule_t): this.
20681 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20682
20683 2001-11-19 Akim Demaille <akim@epita.fr>
20684
20685 * src/gram.h (rule_t): New.
20686 (rule_table): New.
20687 (rrhs, rlhs): Remove, part of state_t.
20688 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20689 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20690 * src/reader.c, src/reduce.c: Adjust.
20691
20692 2001-11-19 Akim Demaille <akim@epita.fr>
20693
20694 * src/reader.c (symbols_output): New, extracted from...
20695 (packsymbols): Here.
20696 (reader): Call it.
20697
20698 2001-11-19 Akim Demaille <akim@epita.fr>
20699
20700 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20701 (maxrhs): this new function.
20702
20703 2001-11-19 Akim Demaille <akim@epita.fr>
20704
20705 * src/lalr.c (F): New macro to access the variable F.
20706 Adjust.
20707
20708 2001-11-19 Akim Demaille <akim@epita.fr>
20709
20710 * src/lalr.h (LA): New macro to access the variable LA.
20711 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20712 * src/lalr.c: Adjust.
20713
20714 2001-11-19 Akim Demaille <akim@epita.fr>
20715
20716 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20717 (set_state_table): handle the `lookaheads' members.
20718
20719 2001-11-19 Akim Demaille <akim@epita.fr>
20720
20721 * src/lalr.h (lookaheads): Removed array, whose contents is now
20722 a member of...
20723 (state_t): this structure.
20724 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20725 Adjust.
20726
20727 2001-11-19 Akim Demaille <akim@epita.fr>
20728
20729 * src/lalr.h (consistent): Removed array, whose contents is now
20730 a member of...
20731 (state_t): this structure.
20732 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20733 Adjust.
20734
20735 2001-11-19 Akim Demaille <akim@epita.fr>
20736
20737 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20738 contents are now members of...
20739 (state_t): this structure.
20740 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20741 Adjust.
20742
20743 2001-11-19 Akim Demaille <akim@epita.fr>
20744
20745 * src/lalr.h (state_t): New.
20746 (state_table): Be a state_t * instead of a core **.
20747 (accessing_symbol): Remove, part of state_t.
20748 * src/lalr.c: Adjust.
20749 (set_accessing_symbol): Merge into...
20750 (set_state_table): this.
20751 * src/print_graph.c, src/conflicts.c: Adjust.
20752
20753 2001-11-14 Akim Demaille <akim@epita.fr>
20754
20755 * tests/calc.at, tests/output.at, tests/regression.at,
20756 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20757 now the tests are run in private dirs, therefore AC_CLEANUP and
20758 family can be simplified to 0-ary.
20759 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20760 use abs. path to find config.h.
20761 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20762 stderr, there can be way too much random noise.
20763 Instead pass -Werror to GCC and rely on the exit status.
20764 Reported by Wolfram Wagner.
20765
20766 2001-11-14 Akim Demaille <akim@epita.fr>
20767
20768 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20769 defined only if yyoverflow is defined, to avoid `warning: unused
20770 variable `yyvs1''.
20771 Reported by The Test Suite.
20772
20773 2001-11-14 Akim Demaille <akim@epita.fr>
20774
20775 * src/print.c: Include reduce.h.
20776 Reported by Hans Aberg.
20777
20778 2001-11-14 Akim Demaille <akim@epita.fr>
20779
20780 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20781 Revert a previous patch: these are really const.
20782 * src/conflicts.c (conflict_report): Additional useless pair of
20783 braces to pacify GCC's warnings for `if () if () {} else {}'.
20784 * src/lex.c (parse_percent_token): Replace equal_offset with
20785 arg_offset.
20786 arg is const.
20787 Be sure to strdup `arg' when used, since there is no reason for
20788 token_buffer not to change.
20789
20790 2001-11-14 Akim Demaille <akim@epita.fr>
20791
20792 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20793 definition.
20794 * src/main.c (main): Use them.
20795 Suggested by Hans Aberg.
20796
20797 2001-11-12 Akim Demaille <akim@epita.fr>
20798
20799 * src/system.h (ngettext): Now that we use ngettext, be sure to
20800 provide a default definition when NLS are not used.
20801
20802 2001-11-12 Akim Demaille <akim@epita.fr>
20803
20804 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20805 Use @kbd to denote user input.
20806 (Language and Grammar): ANSIfy the example.
20807 Adjust its layout for info/notinfo.
20808 (Location Tracking Calc): Output error messages to stderr.
20809 Output locations in a more GNUtically correct way.
20810 Fix a couple of Englishos.
20811 Adjust @group/@end group pairs.
20812
20813 2001-11-12 Akim Demaille <akim@epita.fr>
20814
20815 %expect was not functioning at all.
20816
20817 * src/conflicts.c (expected_conflicts): Set to -1.
20818 (conflict_report): Use ngettext.
20819 (conflicts_print): Check %expect and make its violation an error.
20820 * doc/bison.texinfo (Expect Decl): Adjust.
20821 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20822 * tests/regression.at (%expect not enough, %expect right)
20823 (%expect too much): New.
20824
20825 2001-11-12 Akim Demaille <akim@epita.fr>
20826
20827 * tests/regression.at (Conflicts): Rename as...
20828 (Unresolved SR Conflicts): this.
20829 (Solved SR Conflicts): New.
20830
20831 2001-11-12 Akim Demaille <akim@epita.fr>
20832
20833 * src/reduce.c (print_results): Rename as...
20834 (reduce_output): This.
20835 Output to OUT, passed as argument, instead of output_obstack.
20836 (dump_grammar): Likewise.
20837 (reduce_free): New.
20838 Also free V1.
20839 (reduce_grammar): No longer call reduce_output, since...
20840 * src/print.c (print_results): do it.
20841 * src/main.c (main): Call reduce_free;
20842
20843 2001-11-12 Akim Demaille <akim@epita.fr>
20844
20845 * src/conflicts.c (print_reductions): Accept OUT as argument.
20846 Output to it, not to output_obstack.
20847 * src/print.c (print_actions): Adjust.
20848
20849 2001-11-12 Akim Demaille <akim@epita.fr>
20850
20851 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20852 the result instead of using...
20853 (src_total, rrc_total, src_count, rrc_count): Remove.
20854 (any_conflicts): Remove.
20855 (print_conflicts): Split into...
20856 (conflicts_print, conflicts_output): New.
20857 * src/conflicts.h: Adjust.
20858 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20859 * src/print.c (print_grammar): Issue `\n' between two rules.
20860 * tests/regression.at (Conflicts): New.
20861 Reported by Tom Lane.
20862
20863 2001-11-12 Akim Demaille <akim@epita.fr>
20864
20865 * tests/regression.at (Invalid input): Remove, duplicate with
20866 ``Invalid input: 1''.
20867
20868 2001-11-12 Akim Demaille <akim@epita.fr>
20869
20870 * tests/torture.at (AT_DATA_STACK_TORTURE)
20871 (Exploding the Stack Size with Alloca)
20872 (Exploding the Stack Size with Malloc): New.
20873
20874 2001-11-12 Akim Demaille <akim@epita.fr>
20875
20876 * src/bison.simple (YYSTACK_REALLOC): New.
20877 (yyparse) [!yyoverflow]: Use it and free the old stack.
20878 Reported by Per Allansson.
20879
20880 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20881
20882 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20883 define CPP macro, which substitute YYSTYPE by yystype.
20884 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20885 with yyltype/YYLTYPE. This allows inclusion of the generated
20886 header within the parser if the compiler, such as GGC, accepts
20887 multiple equivalent #defines.
20888 From Akim.
20889
20890 2001-11-05 Akim Demaille <akim@epita.fr>
20891
20892 * src/reader.c (symbols_output): New, extracted from...
20893 (packsymbols): here.
20894 (reader): Adjust.
20895
20896 2001-11-05 Akim Demaille <akim@epita.fr>
20897
20898 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20899
20900 2001-11-05 Akim Demaille <akim@epita.fr>
20901
20902 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20903 pattern.
20904
20905 2001-11-05 Akim Demaille <akim@epita.fr>
20906
20907 * src/options.h (struct option_table_struct): set_flags is void*.
20908 * src/options.c (longopts): Support `--output' and `%output'.
20909 (usage): Adjust.
20910 * src/lex.h (tok_setopt): Remove, replaced with...
20911 (tok_intopt, tok_stropt): these new guys.
20912 * src/lex.c (getopt.h): Not needed.
20913 (token_buffer, unlexed_token_buffer): Not const.
20914 (percent_table): Promote `-' over `_' in directive names.
20915 Active `%name-prefix', `file-prefix', and `output'.
20916 (parse_percent_token): Accept possible arguments to directives.
20917 Promote `-' over `_' in directive names.
20918
20919 2001-11-04 Akim Demaille <akim@epita.fr>
20920
20921 * doc/bison.texinfo (Decl Summary): Split the list into
20922 `directives for grammars' and `directives for bison'.
20923 Sort'em.
20924 Add description of `%name-prefix', `file-prefix', and `output'.
20925 Promote `-' over `_' in directive names.
20926 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20927 Simplify the description of `--name-prefix'.
20928 Promote `-' over `_' in directive names.
20929 Promote `--output' over `--output-file'.
20930 Fix the description of `--defines'.
20931 * tests/output.at: Exercise %file-prefix and %output.
20932
20933 2001-11-02 Akim Demaille <akim@epita.fr>
20934
20935 * doc/refcard.tex: Update.
20936
20937 2001-11-02 Akim Demaille <akim@epita.fr>
20938
20939 * src/symtab.h (SUNDEF): New.
20940 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20941 stand for `uninitialized', instead of 0.
20942 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20943 * src/lex.c (lex): Adjust.
20944
20945 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20946 Number it 0.
20947 Let yylex return it instead of a plain 0.
20948 Reported by Dick Streefland.
20949
20950 2001-11-02 Akim Demaille <akim@epita.fr>
20951
20952 * tests/regression.at (Mixing %token styles): New test.
20953
20954 2001-11-02 Akim Demaille <akim@epita.fr>
20955
20956 * src/reader.c (parse_thong_decl): Formatting changes.
20957 (token_translations_init): New, extracted from...
20958 (packsymbols): Here.
20959 Adjust.
20960
20961 2001-11-01 Akim Demaille <akim@epita.fr>
20962
20963 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20964 Check that `9foo.y' produces correct cpp guards.
20965 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20966 guards.
20967 Reported by Wwp.
20968
20969 2001-11-01 Akim Demaille <akim@epita.fr>
20970
20971 * tests/regression.at (Invalid input: 2): New.
20972 * src/lex.c (unlexed_token_buffer): New.
20973 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20974 too.
20975 Reported by Wwp.
20976
20977 2001-11-01 Akim Demaille <akim@epita.fr>
20978
20979 * tests/calc.at: Catch up with 1.30.
20980 * configure.in: Bump to 1.49a.
20981 Adjust to newer Autotest.
20982
20983 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20984
20985 * src/conflicts.c: Move global variables rrc_total and src_total ...
20986 (print_conflicts): here.
20987 * src/output.c (output): Free global variable user_toknums.
20988 * src/lex.c (token_obstack): Become static.
20989
20990 2001-10-18 Akim Demaille <akim@epita.fr>
20991
20992 * tests/atlocal.in (GCC): Add.
20993 * tests/calc.at: s/m4_match/m4_bmatch/.
20994 s/m4_patsubst/m4_bpatsubst/.
20995 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20996 * configure.in: AC_SUBST(GCC).
20997
20998 2001-10-14 Marc Autret <autret_m@epita.fr>
20999
21000 * src/options.c (create_long_option_table): Fix.
21001
21002 2001-10-10 Akim Demaille <akim@epita.fr>
21003
21004 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21005
21006 2001-10-04 Akim Demaille <akim@epita.fr>
21007
21008 * src/reader.c (parse_union_decl): Push the caracters in
21009 union_obstack, not attrs_obstack.
21010
21011 2001-10-04 Akim Demaille <akim@epita.fr>
21012
21013 Merge in the branch 1.29.
21014
21015 * src/reader.c (packsymbols): Use a temporary obstack for
21016 `%%tokendef', since output_stack is already used elsewhere.
21017
21018 2001-10-02 Akim Demaille <akim@epita.fr>
21019
21020 Bump 1.29d.
21021
21022 2001-10-02 Akim Demaille <akim@epita.fr>
21023
21024 Version 1.29c.
21025
21026 2001-10-02 Akim Demaille <akim@epita.fr>
21027
21028 * tests/regression.at (Invalid CPP headers): New.
21029 From Alexander Belopolsky.
21030 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21031
21032 2001-10-02 Akim Demaille <akim@epita.fr>
21033
21034 * tests/regression.at (Invalid input): New.
21035 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21036 Reported by Shura.
21037
21038 2001-10-02 Akim Demaille <akim@epita.fr>
21039
21040 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21041
21042 2001-10-02 Akim Demaille <akim@epita.fr>
21043
21044 * src/output.c (output_parser): Assert `skeleton'.
21045 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21046 systems.
21047 From Shura.
21048
21049 2001-10-01 Marc Autret <autret_m@epita.fr>
21050
21051 * src/lex.h: Echo modifications.
21052 * src/lex.c (unlex): Parameter is now token_t.
21053 From Hans Aberg.
21054
21055 2001-10-01 Marc Autret <autret_m@epita.fr>
21056
21057 * src/main.c: Include lex.h.
21058 From Hans Aberg.
21059
21060 2001-09-29 Akim Demaille <akim@epita.fr>
21061
21062 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21063
21064 2001-09-28 Akim Demaille <akim@epita.fr>
21065
21066 * tests/testsuite.at: Update to newer Autotest.
21067 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21068
21069 2001-09-27 Akim Demaille <akim@epita.fr>
21070
21071 Position independent wrapper.
21072
21073 * tests/bison: Remove.
21074 * tests/bison.in: New.
21075 * configure.in: Adjust.
21076
21077 2001-09-27 Paul Eggert <eggert@twinsun.com>
21078
21079 Port quotearg fixes from tar 1.13.24.
21080
21081 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21082 tm to be declared.
21083 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21084 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21085
21086 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21087 * m4/mbrtowc.m4: New file.
21088 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21089 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21090
21091 2001-09-27 Akim Demaille <akim@epita.fr>
21092
21093 Bump to 1.29c.
21094
21095 2001-09-27 Akim Demaille <akim@epita.fr>
21096
21097 Version 1.29b.
21098
21099 2001-09-25 Akim Demaille <akim@epita.fr>
21100
21101 * src/system.h: Include `xalloc.h'.
21102 Remove it from the C files.
21103 * src/files.c (output_files): Free the obstacks.
21104 * src/lex.c (init_lex): Rename as...
21105 (lex_init): this.
21106 (lex_free): New.
21107 * src/main.c (main): Use it.
21108
21109 2001-09-24 Marc Autret <autret_m@epita.fr>
21110
21111 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21112 to output informations in fout (FILE*).
21113 (open_graph, close_graph): Likewise.
21114 (output_graph, output_edge, output_node): Likewise.
21115 * src/vcg.h: Update function prototypes.
21116 * src/print_graph.c (print_graph): Open output graph file.
21117 (print_actions): Adjust.
21118 * src/files.h: Remove extern declaration.
21119 * src/files.c: Remove graph_obstack declaration.
21120 (open_files): Remove graph_obstack initialization.
21121 (output_files): Remove graph_obstack saving.
21122
21123 2001-09-24 Marc Autret <autret_m@epita.fr>
21124
21125 * src/files.c (compute_output_file_names): Fix.
21126
21127 2001-09-24 Marc Autret <autret_m@epita.fr>,
21128 Akim Demaille <akim@epita.fr>
21129
21130 * src/reader.c (reader): Remove call to free_symtab ().
21131 * src/main.c (main): Call it here.
21132 Include symtab.h.
21133 * src/conflicts.c (initialize_conflicts): Rename as...
21134 (solve_conflicts): this.
21135 * src/print.c (print_core, print_actions, print_state)
21136 (print_grammar): Dump to a file instead a `output_obstack'.
21137 (print_results): Dump `output_obstack', and then proceed with the
21138 FILE *.
21139 * src/files.c (compute_output_file_names, close_files): New.
21140 (output_files): Adjust.
21141 * src/main.c (main): Adjust.
21142
21143 2001-09-23 Marc Autret <autret_m@epita.fr>
21144
21145 * src/files.c (compute_header_macro): Computes header macro name
21146 from spec_defines_file when given.
21147
21148 2001-09-23 Marc Autret <autret_m@epita.fr>
21149
21150 * src/files.c (output_files): Add default extensions.
21151
21152 2001-09-22 Akim Demaille <akim@epita.fr>
21153
21154 * src/conflicts.c (finalize_conflicts): Rename as...
21155 (free_conflicts): this.
21156
21157 2001-09-22 Akim Demaille <akim@epita.fr>
21158
21159 * src/gram.c (gram_free): Rename back as...
21160 (dummy): this.
21161 (output_token_translations): Free `token_translations'.
21162 * src/symtab.c (free_symtab): Free the tag field.
21163
21164 2001-09-22 Akim Demaille <akim@epita.fr>
21165
21166 Remove `translations' as it is always set to true.
21167
21168 * src/gram.h: Adjust.
21169 * src/reader.c (packsymbols, parse_token_decl): Adjust
21170 * src/print.c (print_grammar): Adjust.
21171 * src/output.c (output_token_translations): Adjust.
21172 * src/lex.c (lex): Adjust.
21173 * src/gram.c: Be sure the set pointers to NULL.
21174 (dummy): Rename as...
21175 (gram_free): this.
21176
21177 2001-09-22 Akim Demaille <akim@epita.fr>
21178
21179 * configure.in: Invoke AM_LIB_DMALLOC.
21180 * src/system.h: Use dmalloc.
21181 * src/LR0.c: Be sure to have pointers initialized to NULL.
21182 (allocate_itemsets): Allocate kernel_items only if needed.
21183
21184 2001-09-22 Akim Demaille <akim@epita.fr>
21185
21186 * configure.in: Bump to 1.29b.
21187 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21188 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21189 need xmalloc.c in calc.y.
21190 From Pascal Bart.
21191
21192 2001-09-21 Akim Demaille <akim@epita.fr>
21193
21194 Version 1.29a.
21195 * Makefile.maint, config/config.guess, config/config.sub,
21196 * config/missing: Update from masters.
21197 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21198 upon package.m4.
21199 * configure.in (ALL_LINGUAS): Add `tr'.
21200
21201 2001-09-21 Akim Demaille <akim@epita.fr>
21202
21203 * tests/Makefile.am (package.m4): Move to...
21204 ($(srcdir)/$(TESTSUITE)): here.
21205
21206 2001-09-20 Akim Demaille <akim@epita.fr>
21207
21208 * src/complain.c: No longer try to be standalone: use system.h.
21209 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21210 * src/complain.h: Likewise.
21211 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21212 Remove the unused variable `n'.
21213 From Albert Chin-A-Young.
21214
21215 2001-09-18 Marc Autret <autret_m@epita.fr>
21216
21217 * doc/bison.1: Update.
21218 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21219 descriptions.
21220 (Option Cross Key): Update.
21221 Add --graph.
21222
21223 2001-09-18 Marc Autret <autret_m@epita.fr>
21224
21225 * tests/regression.at: New test (comment in %union).
21226
21227 2001-09-18 Marc Autret <autret_m@epita.fr>
21228
21229 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21230 do that.
21231 Reported by Keith Browne.
21232
21233 2001-09-18 Marc Autret <autret_m@epita.fr>
21234
21235 * tests/output.at: Add tests for --defines and --graph.
21236
21237 2001-09-18 Marc Autret <autret_m@epita.fr>
21238
21239 * tests/output.at: Removes tests of %{header,src}_extension features.
21240
21241 2001-09-18 Akim Demaille <akim@epita.fr>
21242
21243 * tests/Makefile.am (package.m4): New.
21244 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21245 (_AT_CHECK_CALC_ERROR): Likewise.
21246 Factor the `, ' part of verbose error messages.
21247
21248 2001-09-18 Marc Autret <autret_m@epita.fr>
21249
21250 * src/getargs.c (longopts): Declare --defines and --graph as options
21251 with optional arguments.
21252 * src/files.h: Add extern declarations.
21253 * src/files.c (spec_graph_file, spec_defines_file): New.
21254 (output_files): Update.
21255 Remove CPP-outed code.
21256
21257 2001-09-18 Marc Autret <autret_m@epita.fr>
21258
21259 Turn off %{source,header}_extension feature.
21260
21261 * src/files.c (compute_exts_from_gf): Update.
21262 (compute_exts_from_src): Update.
21263 (output_files): CPP-out useless code.
21264 * src/files.h: Remove {header,source}_extension extern declarations.
21265 * src/reader.c (parse_dquoted_param): CPP-out.
21266 (parse_header_extension_decl): Remove.
21267 (parse_source_extension_decl): Remove.
21268 (read_declarations): Remove cases tok_{hdrext,srcext}.
21269 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21270 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21271
21272 2001-09-10 Akim Demaille <akim@epita.fr>
21273
21274 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21275 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21276 (AT_CHECK_OUTPUT): this.
21277 Merely check ls' exit status, its output is useless.
21278
21279 2001-09-10 Akim Demaille <akim@epita.fr>
21280
21281 * tests/calc.at: Use m4_match.
21282 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21283
21284 2001-09-10 Marc Autret <autret_m@epita.fr>,
21285 Akim Demaille <akim@epita.fr>
21286
21287 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21288 enum color_e.
21289 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21290 to `normal'.
21291 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21292 * src/lex.h: Adjust prototype.
21293 (token_t): Add `tok_undef'.
21294 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21295 (parse_percent_token): Now returns token_t.
21296 Add default statement in switch.
21297 (lex): Separate `c' as an input variable, from the token_t result
21298 part.
21299 (unlexed): Is a token_t.
21300
21301 2001-09-10 Akim Demaille <akim@epita.fr>
21302
21303 * configure.in: Bump to 1.29a.
21304
21305 2001-09-07 Akim Demaille <akim@epita.fr>
21306
21307 Version 1.29.
21308
21309 2001-08-30 Akim Demaille <akim@epita.fr>
21310
21311 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21312 * m4/atconfig.m4: Remove.
21313 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21314 * tests/bison: New.
21315 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21316 m4_if, m4_patsubst, and m4_regexp.
21317 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21318 `input' file instead of echo.
21319
21320 2001-08-29 Akim Demaille <akim@epita.fr>
21321
21322 Bump to 1.28e.
21323
21324 2001-08-29 Akim Demaille <akim@epita.fr>
21325
21326 Version 1.28d.
21327
21328 2001-08-29 Paul Eggert <eggert@twinsun.com>
21329
21330 * src/bison.simple (yyparse): Don't take the address of an
21331 item before the start of an array, as that doesn't conform to
21332 the C Standard.
21333
21334 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21335
21336 * doc/bison.texinfo (Location Tracking Calc): New node.
21337
21338 2001-08-29 Paul Eggert <eggert@twinsun.com>
21339
21340 * src/output.c (output): Do not define const, as this now
21341 causes more problems than it cures.
21342
21343 2001-08-29 Akim Demaille <akim@epita.fr>
21344
21345 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21346 the nodes.
21347 Be sure to tag the `detailmenu'.
21348
21349 2001-08-29 Akim Demaille <akim@epita.fr>
21350
21351 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21352 download in a tmp dir.
21353
21354 2001-08-28 Marc Autret <autret_m@epita.fr>
21355
21356 * config/depcomp: New file.
21357
21358 2001-08-28 Marc Autret <autret_m@epita.fr>
21359
21360 * doc/bison.1 (mandoc): Adjust.
21361 From Juan Manuel Guerrero.
21362
21363 2001-08-28 Marc Autret <autret_m@epita.fr>
21364
21365 * src/print_graph.c (print_state): Fix.
21366
21367 2001-08-27 Marc Autret <autret_m@epita.fr>
21368
21369 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21370 char * members.
21371 Echo modifications to the functions prototypes.
21372 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21373
21374 2001-08-27 Marc Autret <autret_m@epita.fr>
21375
21376 * src/vcg.c: Include `xalloc.h'.
21377 (add_colorentry): New.
21378 (add_classname): New.
21379 (add_infoname): New.
21380 * src/vcg.h: Add new prototypes.
21381
21382 2001-08-27 Akim Demaille <akim@epita.fr>
21383
21384 * Makefile.maint: Sync. again with CVS Autoconf.
21385
21386 2001-08-27 Akim Demaille <akim@epita.fr>
21387
21388 * Makefile.maint: Formatting changes.
21389 (po-update, cvs-update, update): New targets.
21390 (AMTAR): Remove.
21391
21392 2001-08-27 Akim Demaille <akim@epita.fr>
21393
21394 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21395 * Makefile.maint: Sync. with CVS Autoconf.
21396
21397 2001-08-27 Marc Autret <autret_m@epita.fr>
21398
21399 * src/vcg.h (struct infoname_s): New.
21400 (struct colorentry_s): New.
21401 (graph_s): New fields {vertical,horizontal}_order in structure.
21402 Add `infoname' field.
21403 Add `colorentry' field;
21404 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21405 (G_HORIZONTAL_ORDER): New.
21406 (G_INFONAME): New.
21407 (G_COLORENTRY): New.
21408 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21409 Add output of `infoname'.
21410 Add output of `colorentry'.
21411
21412 2001-08-27 Marc Autret <autret_m@epita.fr>
21413
21414 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21415 This one shadowed a global parameter.
21416
21417 2001-08-24 Marc Autret <autret_m@epita.fr>
21418
21419 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21420 instead of `unsigned'.
21421 (print_state): Do not call obstack_object_size () in obstack_grow ()
21422 to avoid macro variables shadowing.
21423
21424 2001-08-23 Marc Autret <autret_m@epita.fr>
21425
21426 * src/lex.c (percent_table): Typo: s/naem/name/.
21427 Add graph option.
21428 Normalize new options declarations.
21429
21430 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21431
21432 * tests/suite.at: Exercise %header_extension and %source_extension.
21433
21434 2001-08-16 Marc Autret <autret_m@epita.fr>
21435
21436 * src/reader.c (parse_dquoted_param): New.
21437 (parse_header_extension_decl): Use it.
21438 (parse_source_extension_decl): Likewise.
21439
21440 2001-08-16 Marc Autret <autret_m@epita.fr>
21441
21442 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21443 (get_xxxx_str): Use assert () instead of complain ().
21444 Remove return invokations in default cases.
21445 (get_decision_str): Modify default behaviour. Remove second argument.
21446 Echo modifications on calls.
21447 (output_graph): Fix.
21448
21449 2001-08-16 Marc Autret <autret_m@epita.fr>
21450
21451 * src/getargs.c (usage): Update with ``-g, --graph''.
21452
21453 2001-08-16 Marc Autret <autret_m@epita.fr>
21454
21455 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21456 (Option Cross Key): Likewise.
21457 * doc/bison.1: Update.
21458
21459 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21460
21461 * src/output.c (output_master_parser): Don't finish action_obstack.
21462 (output_parser): Don't care about the muscle action, here.
21463 (prepare): Copy the action_obstack in the action muscle.
21464 (output): Free action_obstack.
21465
21466 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21467
21468 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21469 will contain `%union' declaration.
21470 (parse_union_decl): Delete #line directive output.
21471 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21472 informations about %union.
21473 (parse_union_decl): Copy the union_obstack in the muscle stype.
21474 * src/bison.simple: Add new #line directive.
21475 Add typdef %%stype YYSTYPE.
21476
21477 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21478
21479 * src/bison.simple: Add new `#line' directive.
21480
21481 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21482
21483 * src/bison.simple: New `#line' directive.
21484 * src/output.c (output_parser): Support new dynamic muscle input_line.
21485
21486 2001-09-22 Marc Autret <autret_m@epita.fr>
21487
21488 * src/output.c (output_master_parser): New.
21489 (output_parser): Be more re-entrant.
21490
21491 2001-09-21 Marc Autret <autret_m@epita.fr>
21492
21493 * src/reader.c (copy_definition, parse_union_decl): Update and use
21494 `linef' muscle.
21495 (copy_action): Likewise.
21496 Use obstack_1grow ().
21497 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21498
21499 2001-09-21 Marc Autret <autret_m@epita.fr>
21500
21501 * src/options.c (option_table): Adjust.
21502 * src/lex.c (parse_percent_token): Fix.
21503
21504 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21505
21506 * src/options.c (symtab.h): Include it, need by lex.h.
21507
21508 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21509
21510 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21511 is now an option_table_struct*.
21512 (option_strcmp): New function option_strcmp.
21513 (parse_percent_token): Call option_strcmp.
21514 * src/getargs.c (xalloc.h, options.h): Include it.
21515 (getargs): Call create_long_option_table.
21516 (getargs): Free longopts at the end of the function.
21517 (shortopts): Move in options.c.
21518 * src/options.c (create_long_option_table): New function. Convert
21519 information from option_table to option structure.
21520 * src/reader.c (options.h): Include it.
21521
21522 * src/Makefile.am: Adjust.
21523 * src/options.c (option_table): Create from longopts and percent_table.
21524 * src/getargs.c (longopts): Delete.
21525 * src/lex.c (struct percent_table_struct): Delete.
21526 (percent_table): Delete.
21527 (options.h): Include it.
21528 * src/options.c: Create.
21529 * src/options.h: Create.
21530 Declare enum opt_access_e.
21531 Define struct option_table_struct.
21532
21533 2001-09-20 Marc Autret <autret_m@epita.fr>
21534
21535 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21536 sections of Bison.
21537
21538 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21539
21540 * src/bison.simple: s/%%filename/%%skeleton.
21541 * src/muscle_tab.c (getargs.h): Include it.
21542 (muscle_init): Insert new muscle skeleton.
21543
21544 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21545
21546 * src/output.c (output_parser): Delete unused variable actions_dumped.
21547
21548 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21549
21550 * src/output.c (output): Delete call to reader_output_yylsp.
21551 * src/reader.c (reader): Likewise.
21552 * src/reader.h: Delete declaration of reader_output_yylsp.
21553
21554 2001-09-02 Marc Autret <autret_m@epita.fr>
21555
21556 * src/reader.c: Include muscle_tab.h.
21557 (parse_union_decl): Update.
21558 (parse_macro_decl): Rename parse_muscle_decl.
21559 Update to use renamed functions and variable.
21560 (read_declarations, copy_action, read_additionnal_code, : Updated
21561 with correct variables and functions names.
21562 (packsymbols, reader): Likewise.
21563
21564 * src/reader.h (muscle_obstack): Extern declaration update.
21565
21566 * src/output.c: Include muscle_tab.h
21567 In all functions using macro_insert, change by using muscle_insert ().
21568 (macro_obstack): Rename muscle_obstack.
21569 Echo modifications in the whole file.
21570 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21571 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21572 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21573
21574 * src/muscle_tab.h: Update double inclusion macros.
21575 (macro_entry_s): Rename muscle_entry_s.
21576 Update prototypes.
21577
21578 * src/muscle_tab.c: Include muscle_tab.h.
21579 Rename macro_tabble to muscle_table.
21580 (mhash1, mhash2, mcmp): Use muscle_entry.
21581 (macro_init): Rename muscle_init. Update.
21582 (macro_insert): Rename muscle_insert. Update.
21583 (macro_find): Rename muscle_find. Update.
21584
21585 * src/main.c: Include muscle_tab.h.
21586 (main): Call muscle_init ().
21587 * src/Makefile.am (bison_SOURCES): Echo modifications.
21588
21589 2001-09-02 Marc Autret <autret_m@epita.fr>
21590
21591 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21592
21593 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21594
21595 2001-09-02 Marc Autret <autret_m@epita.fr>
21596
21597 * src/macrotab.c, src/macrotab.h: Remove.
21598
21599 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21600
21601 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21602 filename.
21603
21604 2001-09-01 Marc Autret <autret_m@epita.fr>
21605
21606 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21607 to an explicit value to activate the feature. We do it here.
21608
21609 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21610
21611 * src/output.c (prepare): Delete the `filename' muscule insertion.
21612 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21613 (parse_union_decl): Likewise.
21614 * src/macrotab.c (macro_init): Initialize filename by infile.
21615
21616 2001-08-31 Marc Autret <autret_m@epita.fr>
21617
21618 * src/bison.simple (YYLSP_NEEDED): New definition.
21619 * src/output.c (prepare): Add macro insertion of `locations_flag'
21620
21621 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21622
21623 * src/output.c (prepare): Delete insertion of previous muscles,
21624 and insert the `prefix' muscles.
21625 * src/macrotab.c (macro_init): Likewise.
21626 (macro_init): Initialization prefix directive by `yy'.
21627 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21628 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21629 yylval, yydebug, yyerror, yynerrs and yyparse.
21630 New directive `#define' to substitute yydebug, ... with option
21631 name_prefix.
21632
21633 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21634
21635 * src/main.c (main): Standardize.
21636 * src/output.c (output_table_data, output_parser): Likewise.
21637 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21638
21639 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21640
21641 * src/reader.c (read_additionnal_code): Rename %%user_code to
21642 %%epilogue.
21643 * src/output.c (output): Rename %%declarations to %%prologue.
21644 * src/bison.simple: Echo modifications.
21645
21646 2001-08-31 Marc Autret <autret_m@epita.fr>
21647
21648 * src/reader.c (readgram): CleanUp.
21649 (output_token_defines): Likewise.
21650 (packsymbols): Likewise.
21651 (reader): Likewise.
21652 * src/output.c (output): CPP-out useless code.
21653
21654 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21655
21656 * src/reader.c (reader): Delete obsolete call to function
21657 output_trailers and output_headers.
21658 * src/output.h: Remove obsolete functions prototypes of output_headers
21659 and output_trailers.
21660
21661 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21662
21663 * src/main.c: Include macrotab.h.
21664 * src/macrotab.h (macro_entry_s): Constify fields.
21665 Adjust functions prototypes.
21666 * src/macrotab.c (macro_insert): Constify key and value.
21667 (macro_find): Constify key.
21668 (macro_insert): Include 'xalloc.h'
21669 (macro_insert): Use XMALLOC.
21670 (macro_find): Constify return value.
21671 * src/output.c (output_table_data): Rename table to table_data.
21672 (output_parser): Constify macro_key, macro_value.
21673
21674 2001-08-30 Marc Autret <autret_m@epita.fr>
21675
21676 * src/reader.c (parse_skel_decl): New.
21677 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21678 * src/lex.h (token_t): New token `tok_skel'.
21679 * src/lex.c (percent_table): Add skeleton option entry.
21680 Standardize.
21681
21682 2001-08-29 Marc Autret <autret_m@epita.fr>
21683
21684 * src/bison.simple: Add %%user_code directive at the end.
21685 * src/reader.c (read_additionnal_code): New.
21686 (reader): Use it.
21687 * src/output.c (output_program): Remove.
21688 (output): Update.
21689
21690 2001-08-28 Marc Autret <autret_m@epita.fr>
21691
21692 * src/output.c (output_actions): Clean up.
21693 (output_gram): CPP-out useless code.
21694 * src/reader.c (reader): Clean up, CPP-out useless code.
21695
21696 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21697
21698 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21699 directive.
21700 * src/bison.simple: Add `%%definitions'.
21701
21702 2001-08-28 Marc Autret <autret_m@epita.fr>
21703
21704 * config/depcomp: New file.
21705
21706 2001-08-27 Paul Eggert <eggert@twinsun.com>
21707
21708 * src/bison.simple (yyparse): Don't take the address of an
21709 item before the start of an array, as that doesn't conform to
21710 the C Standard.
21711
21712 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21713
21714 * src/output.c (output): Remove the initialization of the macro
21715 obstack. It was done too late here.
21716
21717 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21718 completely wrong.
21719 (reader): Initialize the macro obstack here, since we need it to grow
21720 '%define' directives.
21721
21722 * src/reader.h: Declare the macro obstack as extern.
21723
21724 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21725
21726 * src/output.c (output_parser): Fix. Store single '%' characters in
21727 the output obstack instead of throwing them away.
21728
21729 2001-08-27 Akim Demaille <akim@epita.fr>
21730
21731 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21732
21733 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21734
21735 * lib/Makefile.am: Adjust.
21736
21737 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21738
21739 * src/bison.simple: Update and add '%%' directives.
21740
21741 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21742
21743 * src/reader.c (reader): Remove calls to 'output_headers' and
21744 'output_trailers'. Remove some C output.
21745 (readgram): Disable a piece of code that was writing a default
21746 definition for 'YYSTYPE'.
21747 (reader_output_yylsp): Remove.
21748 (packsymbols): Output token defintions to a macro.
21749 (copy_definition): Disable C output.
21750
21751 * src/reader.c (parse_macro_decl): New function used to parse macro
21752 declarations.
21753 (copy_string2): Put the body of copy_string into this new function.
21754 Add a parameter to let the caller choose whether he wants to copy the
21755 string delimiters or not.
21756 (copy_string): Be a simple call to copy_string2 with the last argument
21757 bound to true.
21758 (read_declarations): Add case for macro definition.
21759 (copy_identifier): New.
21760 (parse_macro_decl): Read macro identifiers using copy_identifier
21761 rather than lex.
21762
21763 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21764
21765 * src/output.c (prepare): Add prefixed names.
21766 (output_parser): Output semantic actions.
21767 (output_parser): Fix bug on '%%line' directives.
21768
21769 * src/output.c (output_headers): Remove. The C code printed by this
21770 function should now be in the skeletons.
21771 (output_trailers): Remove.
21772 (output): Disable call to 'reader_output_yylsp'.
21773 (output_rule_data): Do not output tables to the table obstack.
21774
21775 * src/output.c: Remove some C dedicated output.
21776 Improve the use of macro and output obstacks.
21777 (output_defines): Remove.
21778
21779 * src/output.c (output_token_translations): Associate 'translate'
21780 table with a macro. No output to the table obstack.
21781 (output_gram): Same for 'rhs' and 'prhs'.
21782 (output_stos): Same for 'stos'.
21783 (output_rule_data): Same for 'r1' and 'r2'.
21784 (token_actions): Same for 'defact'.
21785 (goto_actions): Same for 'defgoto'.
21786 (output_base): Same for 'pact' and 'pgoto'.
21787 (output_table): Same for 'table'.
21788 (output_check): Same for 'check'.
21789
21790 * src/output.c (output_table_data): New function.
21791 (output_short_table): Remove.
21792 (output_short_or_char_table): Remove.
21793
21794 * src/output.c (output_parser): Replace most of the skeleton copy code
21795 with something new. Skeletons are now processed character by character
21796 rather than line by line, and Bison looks for '%%' macros. This is the
21797 first step in making Bison's output process (a lot) more flexible.
21798 (output_parser): Use the macro table.
21799
21800 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21801
21802 * src/main.c (main): Initialize the macro table.
21803
21804 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21805
21806 * src/lex.c (percent_table): Add tok_define.
21807 * src/lex.h: Add tok_define.
21808
21809 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21810
21811 * src/macrotab.c: New file.
21812 * src/macrotab.h: New file.
21813 * src/Makefile.am: Update.
21814
21815 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21816
21817 * lib/hash.c: New file.
21818 * lib/hash.h: New file.
21819 * lib/Makefile.am: Update.
21820
21821 2001-08-15 Akim Demaille <akim@epita.fr>
21822
21823 Version 1.28c.
21824
21825 2001-08-15 Marc Autret <autret_m@epita.fr>
21826
21827 * src/reader.c (readgram): Indent output macro YYSTYPE.
21828 (packsymbols): Likewise.
21829 (output_token_defines): Likewise.
21830 * src/files.c: Standardize.
21831 (compute_header_macro): New.
21832 (defines_obstack_save): New. Use compute_header_macro.
21833 (output_files): Update. Use defines_obstack_save.
21834
21835 2001-08-15 Akim Demaille <akim@epita.fr>
21836
21837 * doc/bison.texinfo (Table of Symbols): Document
21838 YYSTACK_USE_ALLOCA.
21839
21840 2001-08-15 Akim Demaille <akim@epita.fr>
21841
21842 * missing: Update from CVS Automake.
21843 * config/config.guess, config/config.sub, config/texinfo.tex:
21844 Update from gnu.org.
21845
21846 2001-08-15 Akim Demaille <akim@epita.fr>
21847
21848 * Makefile.maint: Sync with CVS Autoconf.
21849
21850 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21851
21852 * doc/bison.texinfo: Include GNU Free Documentation License from
21853 `fdl.texi'.
21854 * doc/fdl.texi: Add to package.
21855
21856 2001-08-14 Marc Autret <autret_m@epita.fr>
21857
21858 Turn on %{source,header}_extension features.
21859
21860 * src/lex.c (percent_table): Un-CPP out header_extension and
21861 source_extension.
21862 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21863 (compute_exts_from_src): Remove conditions. It restores priorities
21864 between options.
21865
21866 2001-08-14 Marc Autret <autret_m@epita.fr>
21867
21868 * src/files.c (compute_base_names): Add extensions computing when
21869 `--file-prefix' used.
21870 Standardize function calls.
21871
21872 2001-08-13 Marc Autret <autret_m@epita.fr>
21873
21874 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21875 defining it (defined but null disables alloca).
21876
21877 2001-08-13 Marc Autret <autret_m@epita.fr>
21878
21879 * src/bison.simple (_yy_memcpy): CPP reformat.
21880
21881 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21882
21883 * tests/atconfig.in (CPPFLAGS): Fix.
21884
21885 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21886
21887 * doc/bison.texinfo: Include GNU General Public License from
21888 `gpl.texi'.
21889 * doc/gpl.texi: Add to package.
21890
21891 2001-08-10 Marc Autret <autret_m@epita.fr>
21892
21893 * src/print_graph.h: Fix.
21894 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21895
21896 2001-08-10 Akim Demaille <akim@epita.fr>
21897
21898 * src/system.h: Provide default declarations for stpcpy, strndup,
21899 and strnlen.
21900
21901 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21902
21903 * doc/bison.texinfo (Locations): Update @$ stuff.
21904
21905 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21906
21907 * src/bison.simple (YYLLOC_DEFAULT): Update.
21908 (yyparse): Adjust.
21909
21910 2001-08-08 Marc Autret <autret_m@epita.fr>
21911
21912 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21913 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21914 Reported by Fabrice Bauzac.
21915
21916 2001-08-08 Marc Autret <autret_m@epita.fr>
21917
21918 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21919 * src/vcg.c (output_node): Fix.
21920 * src/vcg.h: Cleanup.
21921 * src/print_graph.c: Add comments.
21922 (node_output_size): New global variable. Simplify the formatting of
21923 the VCG graph output.
21924 (print_actions): Unused code is now used. It notifies the final state
21925 and no action states in the VCG graph. It also give the reduce actions.
21926 The `shift and goto' edges are red and the `go to state' edges are
21927 blue.
21928 Get the current node name and node_obstack by argument.
21929 (node_obstack): New variable.
21930 (print_state): Manage node_obstack.
21931 (print_core): Use node_obstack given by argument.
21932 A node is not only computed here but in print_actions also.
21933 (print_graph): CPP out useless code instead of commenting it.
21934
21935 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21936
21937 * tests/atconfig.in (CPPFLAGS): Fix.
21938
21939 2001-08-07 Akim Demaille <akim@epita.fr>
21940
21941 * src/print_graph.c (quote): New.
21942 (print_core): Use it.
21943
21944 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21945
21946 * src/vcg.c (complain.h): Include it.
21947 Unepitaize `return' invocations.
21948 [NDEBUG] (main): Remove.
21949 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21950 * src/files.c (open_files): Initialize graph_obstack.
21951 * src/print_graph.c (print_actions): CPP out useless code.
21952 (print_core): Don't output the last `\n' in labels.
21953 Use `quote'.
21954 * src/files.c (output_files): Output the VCG file.
21955 * src/main.c (main): Invoke print_graph ();
21956
21957 2001-08-06 Marc Autret <autret_m@epita.fr>
21958
21959 Automaton VCG graph output.
21960 Using option ``-g'' or long option ``--graph'', you can generate
21961 a gram_filename.vcg file containing a VCG description of the LALR (1)
21962 automaton of your grammar.
21963
21964 * src/main.c: Call to print_graph() function.
21965 * src/getargs.h: Update.
21966 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21967 (graph_flag): New flag.
21968 (longopts): Update.
21969 (getargs): Add case `g'.
21970 * src/files.c (graph_obstack): New obstack struct.
21971 (open_files): Initialize new obstack.
21972 (output_files): Saves graph_obstack if required.
21973 * src/files.h (graph_obstack): New extern declaration.
21974 * src/Makefile.am: Add new source files.
21975
21976 2001-08-06 Marc Autret <autret_m@epita.fr>
21977
21978 * src/print_graph.c, src/print_graph.h (graph): New.
21979 * src/vcg.h: New file.
21980 * src/vcg.c: New file, VCG graph handling.
21981
21982 2001-08-06 Marc Autret <autret_m@epita.fr>
21983
21984 Add of %source_extension and %header_extension which specify
21985 the source or/and the header output file extension.
21986
21987 * src/files.c (compute_base_names): Remove initialisation of
21988 src_extension and header_extension.
21989 (compute_exts_from_gf): Update.
21990 (compute_exts_from_src): Update.
21991 (output_files): Update.
21992 * src/reader.c (parse_header_extension_decl): New.
21993 (parse_source_extension_decl): New.
21994 (read_declarations): New case statements for the new tokens.
21995 * src/lex.c (percent_table): Add entries for %source_extension
21996 and %header_extension.
21997 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21998
21999 2001-08-06 Marc Autret <autret_m@epita.fr>
22000
22001 * configure.in: Bump to 1.28c.
22002 * doc/bison.texinfo: Texinfo thingies.
22003
22004 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22005
22006 * tests/atconfig.in (CPPFLAGS): Add.
22007 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22008
22009 2001-08-03 Akim Demaille <akim@epita.fr>
22010
22011 Version 1.28b.
22012
22013 2001-08-03 Akim Demaille <akim@epita.fr>
22014
22015 * tests/Makefile.am (check-local): Ship testsuite.
22016 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22017 Include `string.h'.
22018
22019 2001-08-03 Akim Demaille <akim@epita.fr>
22020
22021 * configure.in: Try using -Wformat when compiling.
22022
22023 2001-08-03 Akim Demaille <akim@epita.fr>
22024
22025 * configure.in: Bump to 1.28b.
22026
22027 2001-08-03 Akim Demaille <akim@epita.fr>
22028
22029 * src/complain.c: Adjust strerror_r portability issues.
22030
22031 2001-08-03 Akim Demaille <akim@epita.fr>
22032
22033 Version 1.28a.
22034
22035 2001-08-03 Akim Demaille <akim@epita.fr>
22036
22037 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22038 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22039 * src/getargs.c: Include complain.h.
22040 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22041 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22042
22043 2001-08-03 Akim Demaille <akim@epita.fr>
22044
22045 * src/reader.c (readgram): Display hidden chars in error messages.
22046
22047 2001-08-03 Akim Demaille <akim@epita.fr>
22048
22049 Update to gettext 0.10.39.
22050
22051 2001-08-03 Akim Demaille <akim@epita.fr>
22052
22053 * lib/strspn.c: New.
22054
22055 2001-08-01 Marc Autret <autret_m@epita.fr>
22056
22057 * doc/bison.texinfo: Update.
22058 * doc/bison.1 (mandoc): Update.
22059 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22060 * src/files.c: Support output files extensions computing.
22061 (src_extension): New static variable.
22062 (header_extension): New static variable.
22063 (tr): New function.
22064 (get_extension_index): New function, gets the index of an extension
22065 filename in a string.
22066 (compute_exts_from_gf): New function, computes extensions from the
22067 grammar file extension.
22068 (compute_exts_from_src): New functions, computes extensions from the
22069 C source file extension, file given by ``-o'' option.
22070 (compute_base_names): Update.
22071 (output_files): Update.
22072
22073 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22074
22075 * doc/bison.texi: Document @$.
22076 (Locations): New section.
22077
22078 2001-07-18 Akim Demaille <akim@epita.fr>
22079
22080 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22081 * config/prev-version.txt, config/move-if-change: New.
22082 * Makefile.am: Adjust.
22083
22084 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22085
22086 * src/bison.simple (yyparse): Suppress warning `comparaison
22087 between signed and unsigned'.
22088
22089 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22090
22091 * src/getargs.h (raw_flag): Remove.
22092 * src/getargs.c: Die on `-r'/`--raw'.
22093 * src/lex.c (parse_percent_token): Die on `%raw'.
22094 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22095 * tests/calc.at: Suppress test with option `--raw'.
22096
22097 2001-07-14 Akim Demaille <akim@epita.fr>
22098
22099 * config/: New.
22100 * configure.in: Require Autoconf 2.50.
22101 Update to gettext 0.10.38.
22102
22103 2001-03-16 Akim Demaille <akim@epita.fr>
22104
22105 * doc/bison.texinfo: ANSIfy the examples.
22106
22107 2001-03-16 Akim Demaille <akim@epita.fr>
22108
22109 * getargs.c (skeleton): New variable.
22110 (longopts): --skeleton is a new option.
22111 (shortopts, getargs): -S is a new option.
22112 * getargs.h: Declare skeleton.
22113 * output.c (output_parser): Use it.
22114
22115 2001-03-16 Akim Demaille <akim@epita.fr>
22116
22117 * m4/strerror_r.m4: New.
22118 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22119 * lib/error.h, lib/error.c: Update.
22120
22121 2001-03-16 Akim Demaille <akim@epita.fr>
22122
22123 * src/getargs.c (longopts): Clean up.
22124
22125 2001-02-21 Akim Demaille <akim@epita.fr>
22126
22127 * src/reader.c (gensym): `gensym_count' is your own.
22128 Use a static buf to create the symbol name, as token_buffer is no
22129 longer a buffer.
22130
22131 2001-02-08 Akim Demaille <akim@epita.fr>
22132
22133 * src/conflicts.c (conflict_report): Be sure not to append to res
22134 between two calls, which could happen if both first sprintf were
22135 skipped, but not the first cp += strlen.
22136
22137 2001-02-08 Akim Demaille <akim@epita.fr>
22138
22139 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22140 New, from fileutils 4.0.37.
22141 * configure.in: Require Autoconf 2.49c. I took some time before
22142 making this decision. This is the only way out for portability
22143 issues in Bison, it would mean way too much duplicate effort to
22144 import in Bison features implemented in 2.49c since 2.13.
22145 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22146
22147 2001-02-02 Akim Demaille <akim@epita.fr>
22148
22149 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22150 * lib/xalloc.h, lib/xmalloc.c: Update.
22151
22152 2001-01-19 Akim Demaille <akim@epita.fr>
22153
22154 Get rid of the ad hoc handling of token_buffer in the scanner: use
22155 the obstacks.
22156
22157 * src/lex.c (token_obstack): New.
22158 (init_lex): Initialize it. No longer call...
22159 (grow_token_buffer): this. Remove it.
22160 Adjust all the places which used it to use the obstack.
22161
22162 2001-01-19 Akim Demaille <akim@epita.fr>
22163
22164 * src/lex.h: Rename all the tokens:
22165 s/\bENDFILE\b/tok_eof/g;
22166 s/\bIDENTIFIER\b/tok_identifier/g;
22167 etc.
22168 Let them be enums, not #define, to ease debugging.
22169 Adjust all the code.
22170
22171 2001-01-18 Akim Demaille <akim@epita.fr>
22172
22173 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22174 * src/lex.c (maxtoken, grow_token_buffer): Static.
22175
22176 2001-01-18 Akim Demaille <akim@epita.fr>
22177
22178 Since we now use obstacks, more % directives can be enabled.
22179
22180 * src/lex.c (percent_table): Also accept `%yacc',
22181 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22182 `%debug'.
22183 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22184 instead of returning a token.
22185 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22186 * src/reader.c (read_declarations): Adjust.
22187 * src/files.c (open_files): Don't call `compute_base_names', don't
22188 compute `attrsfile' since they depend upon data which might be
22189 *in* the input file now.
22190 (output_files): Do it here.
22191 * src/output.c (output_headers): Document the fact that this patch
22192 introduces a guaranteed SEGV for semantic parsers.
22193 * doc/bison.texinfo: Document them.
22194 * tests/suite.at: Exercise these %options.
22195
22196 2000-12-20 Akim Demaille <akim@epita.fr>
22197
22198 Also handle the output file (--verbose) with obstacks.
22199
22200 * files.c (foutput): Remove.
22201 (output_obstack): New.
22202 Adjust all dependencies.
22203 * src/conflicts.c: Return a string.
22204 * src/system.h (obstack_grow_string): Rename as...
22205 (obstack_sgrow): this. Be ready to work with non literals.
22206 (obstack_fgrow4): New.
22207
22208 2000-12-20 Akim Demaille <akim@epita.fr>
22209
22210 * src/files.c (open_files): Fix the computation of short_base_name
22211 in the case of `-o foo.tab.c'.
22212
22213 2000-12-20 Akim Demaille <akim@epita.fr>
22214
22215 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22216 (copy_dollar): Now that everything uses obstacks, get rid of the
22217 FILE * parameters.
22218
22219 2000-12-20 Akim Demaille <akim@epita.fr>
22220
22221 * src/files.c (open_files): Actually the `.output' file is based
22222 on the short_base_name, not base_name.
22223 * tests/suite.at (Checking output file names): Adjust.
22224
22225 2000-12-20 Akim Demaille <akim@epita.fr>
22226
22227 * src/bison.s1: Remove, we now use directly...
22228 * src/bison.simple: this.
22229 * src/Makefile.am: Use pkgdata instead of data.
22230
22231 2000-12-20 Akim Demaille <akim@epita.fr>
22232
22233 * src/files.c (guard_obstack): New.
22234 (open_files): Initialize it.
22235 (output_files): Dump it...
22236 * src/files.h: Export it.
22237 * src/reader.c (copy_guard): Use it.
22238
22239 2000-12-19 Akim Demaille <akim@epita.fr>
22240
22241 * src/files.c (outfile, defsfile, actfile): Removed as global
22242 vars.
22243 (open_files): Don't compute them.
22244 (output_files): Adjust.
22245 (base_name, short_base_name): Be global.
22246 Adjust dependencies.
22247
22248 2000-12-19 Akim Demaille <akim@epita.fr>
22249
22250 * src/files.c (strsuffix): New.
22251 (stringappend): Be just like strcat but allocate.
22252 (base_names): Eve out from open_files.
22253 Try to simplify the rather hairy computation of base_name and
22254 short_base_name.
22255 (open_files): Use it.
22256 * tests/suite.at (Checking output file names): New test.
22257
22258 2000-12-19 Akim Demaille <akim@epita.fr>
22259
22260 * src/system.h (obstack_grow_literal_string): Rename as...
22261 (obstack_grow_string): this.
22262 * src/output.c (output_parser): Recognize `%% actions' instead of
22263 `$'.
22264 * src/bison.s1: s/$/%% actions/.
22265 * src/bison.hairy: Likewise.
22266
22267 2000-12-19 Akim Demaille <akim@epita.fr>
22268
22269 * src/output.c (output_parser): Compute the `#line' lines when
22270 there are.
22271 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22272 Suggested by Hans Aberg.
22273
22274 2000-12-19 Akim Demaille <akim@epita.fr>
22275
22276 Let the handling of the skeleton files be local to the procedures
22277 that use it.
22278
22279 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22280 longer static.
22281 (fparser, open_extra_files): Remove.
22282 (open_files, output_files): Don't take care of fparser.
22283 * src/files.h: Adjust.
22284 * src/output.c (output_parser): Open and close the file to the
22285 skeleton.
22286 * src/reader.c (read_declarations): When %semantic_parser, open
22287 fguard.
22288
22289 2000-12-19 Akim Demaille <akim@epita.fr>
22290
22291 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22292 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22293
22294 2000-12-19 Akim Demaille <akim@epita.fr>
22295
22296 * src/files.c (open_files): Yipee! We no longer need all the code
22297 looking for `/tmp' since we have no tmp file.
22298
22299 2000-12-19 Akim Demaille <akim@epita.fr>
22300
22301 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22302 New macros.
22303 * src/files.c (open_files): Less dependency on MSDOS etc.
22304
22305 2000-12-14 Akim Demaille <akim@epita.fr>
22306
22307 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22308 Provide a default definition.
22309 Use it when executing the default @ action.
22310 * src/reader.c (reader_output_yylsp): No longer include
22311 `timestamp' and `text' in the default YYLTYPE.
22312
22313 2000-12-12 Akim Demaille <akim@epita.fr>
22314
22315 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22316 (copy_guard): Quote the file names.
22317 Reported by Laurent Mascherpa.
22318
22319 2000-12-12 Akim Demaille <akim@epita.fr>
22320
22321 * src/output.c (output_headers, output_program, output): Be sure
22322 to escape special characters when outputting filenames.
22323 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22324 (output_headers): Don't depend on them, Use ACTSTR.
22325
22326 2000-11-17 Akim Demaille <akim@epita.fr>
22327
22328 * lib/obstack.h: Formatting changes.
22329 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22330 prevents type checking.
22331 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22332 cast the value to (void *): assigning a `foo *' to a `void *'
22333 variable is valid.
22334 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22335 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22336 append characters.
22337
22338 2000-11-17 Akim Demaille <akim@epita.fr>
22339
22340 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22341 as...
22342 (suite.m4, regression.m4, calc.m4): these.
22343 * tests/atgeneral.m4: Update from CVS Autoconf.
22344
22345 2000-11-17 Akim Demaille <akim@epita.fr>
22346
22347 * tests/regression.m4 (%union and --defines): New test,
22348 demonstrating a current bug in the obstack implementation.
22349
22350 2000-11-17 Akim Demaille <akim@epita.fr>
22351
22352 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22353 macros.
22354 Use them to declare the variables which are global or local to
22355 `yyparse'.
22356
22357 2000-11-17 Akim Demaille <akim@epita.fr>
22358
22359 * acconfig.h: Remove, no longer used.
22360
22361 2000-11-07 Akim Demaille <akim@epita.fr>
22362
22363 * src: s/Copyright (C)/Copyright/g.
22364
22365 2000-11-07 Akim Demaille <akim@epita.fr>
22366
22367 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22368 defining.
22369 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22370
22371 2000-11-07 Akim Demaille <akim@epita.fr>
22372
22373 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22374 Merge in a single CPP if/else.
22375
22376 2000-11-07 Akim Demaille <akim@epita.fr>
22377
22378 * src/output.c (output): Remove useless variables.
22379 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22380 argument `data' for consistency with the prototypes.
22381 Qualify it `const'.
22382 (obstack_copy, obstack_copy0): Rename the second argument as
22383 `address' for consistency. Qualify it `const'.
22384 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22385 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22386 `const' their input argument (`data' or `address').
22387 Adjust the corresponding macros to include `const' in casts.
22388
22389 2000-11-03 Akim Demaille <akim@epita.fr>
22390
22391 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22392 s/PFILE1/BISON_HAIRY/.
22393 Adjust dependencies.
22394
22395 2000-11-03 Akim Demaille <akim@epita.fr>
22396
22397 For some reason, this was not applied.
22398
22399 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22400 `unlink': it's no longer used.
22401
22402 2000-11-03 Akim Demaille <akim@epita.fr>
22403
22404 * src/files.c (skeleton_find): New function, eved out of...
22405 (open_files, open_extra_files): here.
22406
22407 2000-11-03 Akim Demaille <akim@epita.fr>
22408
22409 Don't use `atexit'.
22410
22411 * src/files.c (obstack_save): New function.
22412 (done): Rename as...
22413 (output_files): this.
22414 Use `obstack_save'.
22415 * src/main.c (main): Don't use `atexit' to register `done', since
22416 it no longer has to remove tmp files, just call `output_files'
22417 when there are no errors.
22418
22419 2000-11-02 Akim Demaille <akim@epita.fr>
22420
22421 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22422 `unlink': it's no longer used.
22423 * src/files.h: Formatting changes.
22424
22425 2000-11-02 Akim Demaille <akim@epita.fr>
22426
22427 Remove the last uses of mktemp and unlink/delete.
22428
22429 * src/files.c (fdefines, ftable): Removed.
22430 (defines_ostack, table_obstack): New.
22431 Adjust dependencies of the former into uses of the latter.
22432 * src/output.c (output_short_or_char_table, output_short_table):
22433 Convert to using obstacks.
22434 * src/reader.c (copy_comment2): Accept one FILE * and two
22435 obstacks.
22436 (output_token_defines, reader_output_yylsp): Use obstacks.
22437 * src/system.h (obstack_fgrow3): New.
22438 * po/POTFILES.in: Adjust.
22439
22440 2000-11-01 Akim Demaille <akim@epita.fr>
22441
22442 Change each use of `fattrs' into a use of `attrs_obstack'.
22443
22444 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22445 * src/files.c (fattrs): Remove.
22446 (attrs_obstack): New.
22447 Adjust all dependencies.
22448 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22449
22450 2000-11-01 Akim Demaille <akim@epita.fr>
22451
22452 Introduce obstacks.
22453 Change each use of `faction' into a use of `action_obstack'.
22454
22455 * lib/obstack.h, lib/obstack.c: New files.
22456 * src/files.c (faction): Remove.
22457 (action_obstack): New.
22458 Adjust all dependencies.
22459
22460 2000-10-20 Akim Demaille <akim@epita.fr>
22461
22462 * lib/quote.h (PARAMS): New macro. Use it.
22463
22464 2000-10-16 Akim Demaille <akim@epita.fr>
22465
22466 * src/output.c (output_short_or_char_table): New function.
22467 (output_short_table, output_token_translations): Use it.
22468 (goto_actions): Use output_short_table.
22469
22470 2000-10-16 Akim Demaille <akim@epita.fr>
22471
22472 * src/symtab.c (bucket_new): New function.
22473 (getsym): Use it.
22474
22475 * src/output.c (output_short_table): New argument to display the
22476 comment associated with the table.
22477 Adjust dependencies.
22478 (output_gram): Use it.
22479 (output_rule_data): Nicer output layout for YYTNAME.
22480
22481 2000-10-16 Akim Demaille <akim@epita.fr>
22482
22483 * src/lex.c (read_typename): New function.
22484 (lex): Use it.
22485 * src/reader.c (copy_dollar): Likewise.
22486
22487 2000-10-16 Akim Demaille <akim@epita.fr>
22488
22489 * src/reader.c (copy_comment2): Expect the input stream to be on
22490 the `/' which is suspected to open a comment, instead of being
22491 called after `//' or `/*' was read.
22492 (copy_comment, copy_definition, parse_union_decl, copy_action)
22493 (copy_guard): Adjust.
22494
22495 2000-10-16 Akim Demaille <akim@epita.fr>
22496
22497 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22498 `read_signed_integer'.
22499
22500 2000-10-16 Akim Demaille <akim@epita.fr>
22501
22502 * src/reader.c (copy_dollar): New function.
22503 (copy_guard, copy_action): Use it.
22504
22505 2000-10-16 Akim Demaille <akim@epita.fr>
22506
22507 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22508 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22509 New files, from Fileutils 4.0.27.
22510 * src/main.c (printable_version): Remove.
22511 * src/lex.c, src/reader.c: Use `quote'.
22512
22513 2000-10-04 Akim Demaille <akim@epita.fr>
22514
22515 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22516
22517 2000-10-04 Akim Demaille <akim@epita.fr>
22518
22519 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22520
22521 2000-10-04 Akim Demaille <akim@epita.fr>
22522
22523 When a literal string is used to define two different tokens,
22524 `bison -v' segfaults.
22525 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22526
22527 * tests/regression.m4: New file.
22528 Include the core of the sample provided by Piotr Gackiewicz.
22529 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22530 properly.
22531
22532 2000-10-04 Akim Demaille <akim@epita.fr>
22533
22534 * src/reader.c (parse_expect_decl): Keep `count' within the size
22535 of `buffer'.
22536 From Neil Booth.
22537
22538 2000-10-02 Paul Eggert <eggert@twinsun.com>
22539
22540 * bison.s1 (yyparse): Assign the default value
22541 unconditionally, to avoid a GCC warning and make the parser a
22542 tad smaller.
22543
22544 2000-10-02 Akim Demaille <akim@epita.fr>
22545
22546 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22547 options.
22548
22549 2000-10-02 Akim Demaille <akim@epita.fr>
22550
22551 * src/derives.c, src/print.c, src/reduce.c: To ease the
22552 translation, move some `\n' out of the translated strings.
22553
22554 2000-10-02 Akim Demaille <akim@epita.fr>
22555
22556 The location tracking mechanism is precious for parse error
22557 messages. Nevertheless, it is enabled only when `@n' is used in
22558 the grammar, which is a different issue (you can use it in error
22559 message, but not in the grammar per se). Therefore, there should
22560 be another means to enable it.
22561
22562 * src/getargs.c (getargs): Support `--locations'.
22563 (usage): Report it.
22564 * src/getargs.h (locationsflag): Export it.
22565 * src/lex.c (percent_table): Support `%locations'.
22566 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22567 with `locationsflag'.
22568 * doc/bison.texinfo: Document `--locations' and `%locations'.
22569 Sort the options.
22570 * tests/calc.m4: Test it.
22571
22572 For regularity of the names, replace each
22573 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22574 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22575 In addition replace each `flag' with `_flag'.
22576
22577 2000-10-02 Akim Demaille <akim@epita.fr>
22578
22579 Also test parse error messages, including with YYERROR_VERBOSE.
22580
22581 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22582 associative).
22583 Use it to check the computations.
22584 Use it to check `nonassoc' is honored.
22585 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22586 `--yyerror-verbose'.
22587 (_AT_CHECK_CALC): Adjust to this option.
22588 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22589
22590 2000-10-02 Akim Demaille <akim@epita.fr>
22591
22592 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22593 the latter demonstrates a flaw in the handling of non debugging
22594 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22595 was used in order to simplify:
22596
22597 #if YYDEBUG
22598 if (yydebug)
22599 {
22600 ...
22601 }
22602 #endif
22603
22604 into
22605
22606 if (yydebug)
22607 {
22608 ...
22609 }
22610
22611 unfortunately this leads to a CPP conflict when
22612 `--name-prefix=foo' is used since it produces `#define yydebug
22613 foodebug'.
22614
22615 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22616 (YYDPRINTF): New macro.
22617 Spread its use.
22618 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22619 the bison options.
22620 Also test `--verbose', `--defines' and `--name-prefix'.
22621
22622 2000-10-02 Akim Demaille <akim@epita.fr>
22623
22624 Improve the readability of the produced parsers.
22625
22626 * src/bison.s1: Formatting changes.
22627 Improve the comment related to the `$' mark.
22628 (yydefault): Don't fall through to `yyresume': `goto' there.
22629 * src/output.c (output_parser): When the `$' is met, skip the end
22630 of its line.
22631 New variable, `number_of_dollar_signs', to check there's exactly
22632 one `$' in the parser skeleton.
22633
22634 2000-10-02 Akim Demaille <akim@epita.fr>
22635
22636 * lib/xstrdup.c: New file, from the fileutils.
22637 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22638 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22639 instead of strlen + xmalloc + strcpy.
22640 * src/symtab.c (copys): Remove, use xstrdup instead.
22641
22642 2000-10-02 Akim Demaille <akim@epita.fr>
22643
22644 * src/gram.h (associativity): New enum type which replaces the
22645 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22646 `right_assoc', `left_assoc' and `non_assoc'.
22647 Adjust all dependencies.
22648 * src/reader.c: Formatting changes.
22649 (LTYPESTR): Don't define it, use it as a literal in
22650 `reader_output_yylsp'.
22651 * src/symtab.h (symbol_class): New enum type which replaces the
22652 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22653 `sunknown', `stoken and `snterm'.
22654
22655 2000-10-02 Akim Demaille <akim@epita.fr>
22656
22657 * src/getargs.c (fixed_outfiles): Rename as...
22658 (yaccflag): for consistency and accuracy.
22659 Adjust dependencies.
22660
22661 2000-10-02 Akim Demaille <akim@epita.fr>
22662
22663 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22664 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22665 difficult and introduced a lot of core dump. It turns out that
22666 Bison used an implementation of `xmalloc' based on `calloc', and
22667 at various places it does depend upon the initialization to 0. I
22668 have not tried to isolate the pertinent places, and all the former
22669 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22670 someone should address this issue.
22671
22672 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22673 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22674 files.
22675 Adjust dependencies.
22676 * src/warshall.h: New file.
22677 Propagate.
22678
22679 2000-10-02 Akim Demaille <akim@epita.fr>
22680
22681 Various anti-`extern in *.c' changes.
22682
22683 * src/system.h: Include `assert.h'.
22684
22685 2000-10-02 Akim Demaille <akim@epita.fr>
22686
22687 * src/state.h (nstates, final_state, first_state, first_shift)
22688 (first_reduction): Move their exportation from here...
22689 * src/LR0.h: to here.
22690 Adjust dependencies.
22691 * src/getargs.c (statisticsflag): New variable.
22692 Add support for `--statistics'.
22693 Adjust dependencies.
22694
22695 Remove a lot of now useless `extern' statements in most files.
22696
22697 2000-10-02 Akim Demaille <akim@epita.fr>
22698
22699 * src/LR0.h: New file.
22700 Propagate its use.
22701
22702 2000-10-02 Akim Demaille <akim@epita.fr>
22703
22704 * src/print.h: New file.
22705 Propagate its use.
22706 * src/print.c: Formatting and ordering changes.
22707 (verbose, terse): Replace with...
22708 (print_results): this new function.
22709 Adjust dependencies.
22710
22711 2000-10-02 Akim Demaille <akim@epita.fr>
22712
22713 * src/conflicts.c (conflict_report): New function.
22714 (conflict_log, verbose_conflict_log): Replace with...
22715 (print_conflicts): this function.
22716 Adjust dependencies.
22717 * src/conflicts.h: New file.
22718 Propagate its inclusion.
22719
22720 2000-10-02 Akim Demaille <akim@epita.fr>
22721
22722 * src/nullable.h: New file.
22723 Propagate its inclusion.
22724 * src/nullable.c: Formatting changes.
22725
22726 2000-10-02 Akim Demaille <akim@epita.fr>
22727
22728 * src/reduce.h: New file.
22729 Propagate its inclusion.
22730 * src/reduce.c: Topological sort and other formatting changes.
22731 (bool, TRUE, FALSE): Move their definition to...
22732 * src/system.h: here.
22733
22734 2000-10-02 Akim Demaille <akim@epita.fr>
22735
22736 * src/files.c: Formatting changes.
22737 (tryopen, tryclose, openfiles): Rename as...
22738 (xfopen, xfclose, open_files): this.
22739 (stringappend): static.
22740 * src/files.h: Complete the list of exported symbols.
22741 Propagate its use.
22742
22743 2000-10-02 Akim Demaille <akim@epita.fr>
22744
22745 * src/reader.h: New file.
22746 Propagate its use instead of tedious list of `extern' and
22747 prototypes.
22748 * src/reader.c: Formatting changes, topological sort,
22749 s/register//.
22750
22751 2000-10-02 Akim Demaille <akim@epita.fr>
22752
22753 * src/lex.h: Prototype `lex.c' exported functions.
22754 * src/reader.c: Adjust.
22755 * src/lex.c: Formatting changes.
22756 (safegetc): Rename as...
22757 (xgetc): this.
22758
22759 2000-10-02 Akim Demaille <akim@epita.fr>
22760
22761 * src/lalr.h: New file.
22762 Propagate its inclusion instead of prototypes and `extern'.
22763 * src/lalr.c: Formatting changes, topological sorting etc.
22764
22765 2000-10-02 Akim Demaille <akim@epita.fr>
22766
22767 * src/output.c (token_actions): Introduce a temporary array,
22768 YYDEFACT, that makes it possible for this function to use
22769 output_short_table.
22770
22771 2000-10-02 Akim Demaille <akim@epita.fr>
22772
22773 `user_toknums' is output as a `short[]' in `output.c', while it is
22774 defined as a `int[]' in `reader.c'. For consistency with the
22775 other output tables, `user_toknums' is now defined as a table of
22776 shorts.
22777
22778 * src/reader.c (user_toknums): Be a short table instead of an int
22779 table.
22780 Adjust dependencies.
22781
22782 Factor the short table outputs.
22783
22784 * src/output.c (output_short_table): New function.
22785 * src/output.c (output_gram, output_stos, output_rule_data)
22786 (output_base, output_table, output_check): Use it.
22787
22788 2000-10-02 Akim Demaille <akim@epita.fr>
22789
22790 * src/output.c (output): Topological sort of the functions, in
22791 order to get rid of the `static' prototypes.
22792 No longer use `register'.
22793 * src/output.h: New file.
22794 Propagate its inclusion in files explicitly prototyping functions
22795 from output.c.
22796
22797 2000-09-21 Akim Demaille <akim@epita.fr>
22798
22799 * src/atgeneral.m4: Update from Autoconf.
22800
22801 2000-09-21 Akim Demaille <akim@epita.fr>
22802
22803 * src/closure.h: New file.
22804 * src/closure.c: Formatting changes, topological sort over the
22805 functions, use of closure.h.
22806 (initialize_closure, finalize_closure): Rename as...
22807 (new_closure, free_closure): these. Adjust dependencies.
22808 * src/LR0.c: Formatting changes, topological sort, use of
22809 cloture.h.
22810 (initialize_states): Rename as...
22811 (new_states): this.
22812 * src/Makefile.am (noinst_HEADERS): Adjust.
22813
22814 2000-09-20 Akim Demaille <akim@epita.fr>
22815
22816 * src/acconfig.h: Don't protect config.h against multiple
22817 inclusion.
22818 Don't define PARAMS.
22819 * src/system.h: Define PARAMS.
22820 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22821 purpose of config.h. system.h must not try to fix wrong
22822 definitions in config.h.
22823
22824 2000-09-20 Akim Demaille <akim@epita.fr>
22825
22826 * src/derives.h: New file.
22827 * src/main.c, src/derives.h: Use it.
22828 Formatting changes.
22829 * src/Makefile.am (noinst_HEADERS): Adjust.
22830
22831 2000-09-20 Akim Demaille <akim@epita.fr>
22832
22833 * tests/atgeneral.m4: Update from Autoconf.
22834 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22835 (AT_CHECK_CALC): New macros.
22836 Use these macros to test bison with options `', `--raw',
22837 `--debug', `--yacc', `--yacc --debug'.
22838
22839 2000-09-19 Akim Demaille <akim@epita.fr>
22840
22841 * src/output.c: Formatting changes.
22842 * src/machine.h: Remove, leaving its contents in...
22843 * src/system.h: here.
22844 Include stdio.h.
22845 Adjust all dependencies on stdio.h and machine.h.
22846 * src/getargs.h: New file.
22847 Let all `extern' declarations about getargs.c be replaced with
22848 inclusion of `getargs.h'.
22849 * src/Makefile.am (noinst_HEADERS): Adjust.
22850
22851 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22852 scope.
22853 (yyerror): Returns void, not int.
22854 * doc/bison.texinfo: Formatting changes.
22855
22856 2000-09-19 Akim Demaille <akim@epita.fr>
22857
22858 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22859 portable.
22860
22861 2000-09-18 Akim Demaille <akim@epita.fr>
22862
22863 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22864 * src/Makefile.am (INCLUDES): Don't.
22865 Be ready to fetch headers in lib/.
22866
22867 2000-09-18 Akim Demaille <akim@epita.fr>
22868
22869 * doc/bison.texinfo: Update the copyright.
22870 ANSIfy and GNUify the examples.
22871 Remove the old menu.
22872
22873 2000-09-18 Akim Demaille <akim@epita.fr>
22874
22875 First set of tests: use the `calc' example from the documentation.
22876
22877 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22878 is defined only when YYDEBUG is.
22879 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22880 * src/files.c (tryopen, tryclose): Formatting changes.
22881 Move to the top and be static.
22882 * src/reader.c (read_signed_integer): Likewise.
22883 * tests/calc.m4: New file.
22884 * Makefile.am, suite.m4: Adjust.
22885 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22886
22887 2000-09-18 Akim Demaille <akim@epita.fr>
22888
22889 Add support for an Autotest test suite for Bison.
22890
22891 * m4/m4.m4, m4/atconfig.m4: New files.
22892 * m4/Makefile.am (EXTRA_DIST): Adjust.
22893 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22894 files.
22895 * src/getargs.c: Display a more standard --version message.
22896 * src/reader.c (reader): Formatting changes.
22897 No longer depend upon VERSION_STRING.
22898 * configure.in: No longer use `dnl'.
22899 Set up the test suite and the new directory `tests/.
22900 (VERSION_STRING): Remove.
22901
22902 2000-04-14 Akim Demaille <akim@epita.fr>
22903
22904 * src/reader.c (copy_comment2): New function, same as former
22905 `copy_comment', but outputs into two FILE *.
22906 (copy_comment): Use it.
22907 (parse_union_decl): Use it.
22908 (get_type, parse_start_decl): Use the same `invalid' message.
22909 (parse_start_decl, parse_union_decl): Use the same `multiple'
22910 message.
22911 (parse_union_decl, copy_guard, copy_action): Use the same
22912 `unmatched' message.
22913 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22914
22915 2000-03-31 Akim Demaille <akim@epita.fr>
22916
22917 * src/files.c (tryopen, tryclose): Move to the top.
22918 Be static.
22919
22920 2000-03-31 Akim Demaille <akim@epita.fr>
22921
22922 * src/main.c (main): Don't call `done', exit does it.
22923
22924 2000-03-31 Akim Demaille <akim@epita.fr>
22925
22926 * allocate.c: s/return (foo)/return foo/.
22927 * lalr.c: Likewise.
22928 * LR0.c: Likewise.
22929 * output.c: Likewise.
22930 * reader.c: Likewise.
22931 * symtab.c: Likewise.
22932 * vmsgetargs.c: Likewise.
22933
22934 2000-03-31 Akim Demaille <akim@epita.fr>
22935
22936 Clean up the error reporting functions.
22937
22938 * src/report.c: New file.
22939 * src/report.h: Likewise.
22940 * src/Makefile.am: Adjust.
22941 * m4/error.m4: New file.
22942 * m4/Makefile.am: Adjust.
22943 * configure.in (jm_PREREQ_ERROR): Call it.
22944 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22945 Remove.
22946 (fatal, fatals): Remove. All callers use complain.c::fatal.
22947 (warn, warni, warns, warnss, warnss): Remove. All callers use
22948 complain.c::complain.
22949 (toomany): Remove, use fatal instead.
22950 * src/files.c (done): No argument, use complain_message_count.
22951 * src/main.c (main): Register `done' to `atexit'.
22952
22953 * src/getargs.c (usage): More `fputs', less `fprintf'.
22954
22955 2000-03-28 Akim Demaille <akim@epita.fr>
22956
22957 * lib/: New directory.
22958 * Makefile.am (SUBDIRS): Adjust.
22959 * configure.in: Adjust.
22960 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22961 useless.
22962 * src/alloca.c: Moved to lib/.
22963 * src/getopt.c: Likewise.
22964 * src/getopt1.c: Likewise.
22965 * src/getopt.h: Likewise.
22966 * src/ansi2knr.c: Likewise.
22967 * src/ansi2knr.1: Likewise.
22968 * src/Makefile.am: Adjust.
22969 * lib/Makefile.am: New file.
22970
22971 2000-03-28 Akim Demaille <akim@epita.fr>
22972
22973 * src/getargs.c (usage): Refresh the help message.
22974
22975 2000-03-17 Akim Demaille <akim@epita.fr>
22976
22977 * src/getopt1.c: Updated from textutils 2.0e
22978 * src/getopt.c: Likewise.
22979 * src/getopt.h: Likewise.
22980
22981 2000-03-17 Akim Demaille <akim@epita.fr>
22982
22983 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22984 the file name, not the whole `#line LINE FILE'.
22985
22986 2000-03-17 Akim Demaille <akim@epita.fr>
22987
22988 On syntax errors, report the token on which we choked.
22989
22990 * src/bison.s1 (yyparse): In the label yyerrlab, when
22991 YYERROR_VERBOSE, add yychar in msg.
22992
22993 2000-03-17 Akim Demaille <akim@epita.fr>
22994
22995 * src/reader.c (copy_at): New function.
22996 (copy_guard): Use it.
22997 (copy_action): Use it.
22998
22999 2000-03-17 Akim Demaille <akim@epita.fr>
23000
23001 Be kind to translators, save some useless translations.
23002
23003 * src/main.c (banner): New function.
23004 (fatal_banner): Use it.
23005 (warn_banner): Use it.
23006
23007 2000-03-17 Akim Demaille <akim@epita.fr>
23008
23009 * src/reader.c (copy_definition): Use copy_string and
23010 copy_comment. Removed now unused `match', `ended',
23011 `cplus_comment'.
23012 (copy_comment, copy_string): Moved, to be visible from
23013 copy_definition.
23014
23015 2000-03-17 Akim Demaille <akim@epita.fr>
23016
23017 * src/reader.c (copy_string): Declare `static inline'. No
23018 problems with inline, since it is checked by configure.
23019 (copy_comment): Likewise.
23020
23021 2000-03-17 Akim Demaille <akim@epita.fr>
23022
23023 * src/reader.c (packsymbols): Formatting changes.
23024
23025 2000-03-17 Akim Demaille <akim@epita.fr>
23026
23027 * src/reader.c (copy_comment): New function, factored out from:
23028 (copy_action): Use it. Removed now unused `match', `ended',
23029 `cplus_comment'.
23030 (copy_guard): Likewise.
23031
23032 2000-03-17 Akim Demaille <akim@epita.fr>
23033
23034 * src/reader.c (copy_string): New function, factored out from:
23035 (copy_action): Use it.
23036 (copy_guard): Likewise.
23037
23038 2000-03-17 Akim Demaille <akim@epita.fr>
23039
23040 Change the handling of @s so that they behave exactly like $s.
23041 There is now a pseudo variable @$ (readble and writable), location
23042 of the lhs of the rule (by default ranging from the location of
23043 the first symbol of the rhs, to the location of the last symbol,
23044 or, if the rhs is empty, YYLLOC).
23045
23046 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23047 yyval.
23048 (yyparse): When providing a default semantic action, provide a
23049 default location action.
23050 (after the $): No longer change `*YYLSP', just stack YYLOC the
23051 same way you stack YYVAL.
23052 * src/reader.c (read_declarations): Use warns.
23053 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23054 (copy_action, case '@'): Likewise.
23055 Use a standard error message, to save useless work from
23056 translators.
23057
23058 2000-03-17 Akim Demaille <akim@epita.fr>
23059
23060 * src/bison.s1: Formatting and cosmetics changes.
23061 * src/reader.c: Likewise.
23062 Update the Copyright notice.
23063
23064 2000-03-17 Akim Demaille <akim@epita.fr>
23065
23066 * src/bison.s1 (#line): All set to `#line' only, since the
23067 Makefile now handles them.
23068
23069 2000-03-16 Akim Demaille <akim@epita.fr>
23070
23071 * src/output.c (output_rule_data): Output the documentation of
23072 some of the tables.
23073 (Copyright notice): Update.
23074 Formatting changes.
23075
23076 2000-03-16 Akim Demaille <akim@epita.fr>
23077
23078 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23079 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23080 One `#if YYDEBUG' remains, since it uses variables which are
23081 defined only if `YYDEBUG != 0'.
23082
23083 2000-03-16 Akim Demaille <akim@epita.fr>
23084
23085 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23086 and related variables so that the similarities are highlighted.
23087
23088 2000-03-16 Akim Demaille <akim@epita.fr>
23089
23090 * src/bison.s1: Properly indent CPP directives.
23091
23092 2000-03-16 Akim Demaille <akim@epita.fr>
23093
23094 * src/bison.s1: Properly indent the `alloca' CPP section.
23095
23096 2000-03-16 Akim Demaille <akim@epita.fr>
23097
23098 Do not hard code values of directories in `configure.in'.
23099 Update the `configure' tool chain.
23100
23101 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23102 src/makefile.am.
23103 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23104 (AC_OUTPUT): Add m4/Makefile.
23105 Bump to bison 1.28a, 1.29 has never been released.
23106 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23107 handled via src/Makefile.am.
23108 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23109 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23110 autoheader.
23111 * Makefile.am (SUBDIRS): Add m4.
23112 (ACLOCAL_AM_FLAGS): New variable.
23113 (AUTOMAKE_OPTIONS): Add check-news.
23114 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23115 the proper line number and file name.
23116 (DEFS): Propagate the location of bison library files and of the
23117 locale files.
23118 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23119 builddir.
23120 * acinclude.m4: Remove, replaced by the directory m4.
23121 * m4/Makefile.am (EXTRA_DIST): New variable.
23122 * m4/gettext.m4: New file, from the fileutils.
23123 * m4/lcmessage.m4: Likewise
23124 * m4/progtest.m4: Likewise.
23125 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23126
23127 2000-03-10 Akim Demaille <akim@epita.fr>
23128
23129 * src/closure.c:
23130 Formatting changes of various comments.
23131 Respect the GNU coding standards at various places.
23132 Don't use `_()' when no translation is needed.
23133
23134 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23135
23136 * src/files.c:
23137 OS/2 honors TMPDIR environment variable.
23138
23139 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23140
23141 * doc/bison.texinfo: Tweaked spelling and grammar.
23142 Updated ISBN.
23143 Removed reference to price of printed copy.
23144 Mention BISON_SIMPLE and BISON_HAIRY.
23145
23146 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23147
23148 * configure.in, NEWS:
23149 Bison 1.29 released.
23150
23151 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23152
23153 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23154 Added reference card.
23155
23156 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23157
23158 * po/ru.po: Added Russian translation.
23159
23160 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23161
23162 * configure.in: Added Russian translation.
23163
23164 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23165
23166 * configure.in, NEWS, README:
23167 Released version 1.28.
23168
23169 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23170
23171 * src/system.h:
23172 Squashed redefinition warning on some systems.
23173
23174 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23175 Have configure build version string instead of relying on ANSI string
23176 concatentation.
23177
23178 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23179
23180 * po/POTFILES.in: Got rid of version.c.
23181
23182 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23183
23184 * acconfig.h, configure.in:
23185 Have configure build version string instead of relying on ANSI string
23186 concatentation.
23187
23188 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23189
23190 * doc/bison.1:
23191 Dropped mention of `+' for long-named options.
23192
23193 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23194
23195 * src/files.c: Added <unistd.h> for unlink().
23196
23197 * src/Makefile.am, src/system.h:
23198 I18n fixes.
23199
23200 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23201
23202 * README: Added a FAQ list.
23203
23204 * configure.in, acconfig.h:
23205 I18n fixes.
23206
23207 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23208
23209 * doc/FAQ, doc/Makefile.am:
23210 Added a FAQ list.
23211
23212 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23213
23214 * src/alloc.h, src/symtab.h, src/version.c:
23215 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23216
23217 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23218
23219 * src/.cvsignore, src/Makefile.am:
23220 Reorganized: sources in `src', documentation in `doc'.
23221
23222 * src/lex.c (literalchar):
23223 fixed the code for escaping double quotes (thanks
23224 Jonathan Czisny.)
23225
23226 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23227
23228 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23229 Adjusted paths to reflect directory reorganization.
23230
23231 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23232
23233 * doc/.cvsignore, doc/Makefile.am:
23234 Reorganized: sources in `src', documentation in `doc'.
23235
23236 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23237
23238 * configure.in:
23239 Updated AC_INIT file to reflect directory reorganization.
23240
23241 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23242 Reorganized: sources in `src', documentation in `doc'.
23243
23244 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23245
23246 * src/allocate.c:
23247 Don't declare calloc() and realloc() if not necessary.
23248
23249 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23250
23251 * configure.in, acconfig.h, acinclude.m4:
23252 Don't declare calloc() and realloc() if not necessary.
23253
23254 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23255
23256 * po/.cvsignore: Added i18n support.
23257
23258 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23259
23260 * acconfig.h, configure.in, Makefile.am:
23261 Added i18n support.
23262
23263 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23264
23265 * src/bison.s1: Fixed #line numbers.
23266
23267 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23268
23269 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23270 Added PO files from Translation Project.
23271
23272 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23273
23274 * Makefile.am:
23275 Added support for non-ANSI compilers (ansi2knr).
23276
23277 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23278
23279 * configure.in: Bumped version number to 1.27.
23280
23281 * Makefile.am:
23282 Added `bison.simple' to list of files removed by `make distclean'.
23283
23284 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23285
23286 * src/files.c, src/files.h:
23287 Defined locations of parser files in config.h instead of Makefile.
23288
23289 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23290
23291 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23292 Defined locations of parser files in config.h instead of Makefile.
23293
23294 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23295
23296 * Makefile.am:
23297 Removed inappropriate use of $< macro.
23298
23299 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23300
23301 * po/Makefile.in.in, po/POTFILES.in:
23302 Add `po' directory skeleton.
23303
23304 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23305
23306 * README: Document help-bison list.
23307
23308 * configure.in: Add check for mkstemp().
23309
23310 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23311
23312 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23313 Hush a few compiler warnings.
23314
23315 * src/files.c:
23316 Add tryclose(), which verifies that fclose was successful.
23317 Hush a couple of compiler warnings.
23318
23319 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23320
23321 * Makefile.am, OChangeLog:
23322 ChangeLog is now automatically generated. Include the old version as
23323 OChangeLog.
23324
23325 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23326
23327 * 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:
23328 Update FSF address.
23329
23330 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23331
23332 * doc/bison.texinfo: Fix formatting glitch.
23333
23334 * doc/bison.texinfo: Update FSF address.
23335
23336 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23337
23338 * acconfig.h: Update FSF address.
23339
23340 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23341
23342 * src/system.h:
23343 Don't define PACKAGE here, since config.h defines it.
23344
23345 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23346
23347 * src/reader.c: Update copyright date.
23348
23349 * src/main.c:
23350 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23351 favor of output directly to stderr (avoids buffer overruns).
23352
23353 * src/reader.c: Some checks for premature EOF.
23354
23355 * 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:
23356 Use prototypes if the compiler understands them.
23357
23358 * src/files.c: Honor TMPDIR on Unix hosts.
23359 Use prototypes if the compiler understands them.
23360
23361 * src/reader.c:
23362 Fix a couple of buffer overrun bugs.
23363 Use prototypes if the compiler understands them.
23364
23365 * src/system.h: Include unistd.h and ctype.h.
23366 Use #ifdef instead of #if for NLS symbols.
23367
23368 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23369
23370 * doc/bison.texinfo:
23371 Delete comment "consider using @set for edition number, etc..." since
23372 we now are doing so.
23373
23374 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23375
23376 * configure.in:
23377 Use prototypes if the compiler understands them.
23378
23379 * NEWS: Document 1.26 highlights.
23380
23381 * Makefile.am: Require Automake 1.3 or later.
23382
23383 * acconfig.h:
23384 Use prototypes if the compiler understands them.
23385
23386 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23387
23388 * src/version.c:
23389 Use VERSION symbol from automake for version number.
23390
23391 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23392
23393 * acconfig.h, configure.in, version.cin:
23394 Use VERSION symbol from automake for version number.
23395
23396 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23397
23398 * Makefile.am:
23399 Distribute original version of simple parser (bison.s1), not built
23400 version (bison.simple).
23401
23402 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23403
23404 * doc/bison.texinfo: Add info dir entry.
23405
23406 * doc/bison.texinfo:
23407 Let automake put version number into documentation.
23408
23409 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23410
23411 * src/bison.cld, src/build.com, src/vmshlp.mar:
23412 Add non-RCS files from /gd/gnu/bison.
23413
23414 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23415
23416 * doc/bison.1:
23417 Document the BISON_HAIRY and BISON_SIMPLE variables.
23418
23419 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23420
23421 * src/version.c: Build version.c automatically.
23422
23423 * src/reader.c:
23424 Fix token numbering (used to start at 258, not 257).
23425
23426 * src/system.h: Include config.h.
23427
23428 * src/getargs.c: Update bug report address.
23429
23430 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23431 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23432
23433 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23434
23435 * Makefile.am:
23436 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23437
23438 * configure.in, version.cin:
23439 Build version.c automatically.
23440
23441 * AUTHORS: Add AUTHORS file.
23442
23443 * README: Update bug report address.
23444
23445 * bison.simple:
23446 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23447
23448 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23449 Add automake stuff.
23450
23451 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23452
23453 * doc/bison.texinfo: Clean up some formatting.
23454
23455 1998-05-05 Richard Stallman <rms@gnu.org>
23456
23457 * doc/bison.texinfo:
23458 Explain better why to make a pure parser.
23459
23460 1998-01-05 Richard Stallman <rms@gnu.org>
23461
23462 * src/files.c (openfiles):
23463 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23464 find a temporary directory, if possible. Do not unlink files while
23465 they are open.
23466
23467 1997-08-25 Richard Stallman <rms@gnu.org>
23468
23469 * src/reader.c (stack_offset;):
23470 Change some warni to warns.
23471
23472 * src/lex.c (literalchar): Use warns, not warni.
23473
23474 1997-06-28 Richard Stallman <rms@gnu.org>
23475
23476 * src/bison.s1: Add a Bison version comment.
23477
23478 * src/main.c (fatal, warn, berror):
23479 Use program_name.
23480
23481 1997-06-28 Richard Stallman <rms@gnu.org>
23482
23483 * Makefile.in (bison_version): New variable.
23484 (dist): Use that variable.
23485 (bison.s1): Substitute the Bison version into bison.simple.
23486
23487 * bison.simple: Add a Bison version comment.
23488
23489 1997-06-18 Richard Stallman <rms@gnu.org>
23490
23491 * src/main.c (fatal, warn, berror):
23492 Make error messages standard.
23493 (toomany): Improve error message text.
23494
23495 * 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:
23496 new.h renamed to alloc.h.
23497
23498 1997-06-18 Richard Stallman <rms@gnu.org>
23499
23500 * Makefile.in: new.h renamed to alloc.h.
23501
23502 1997-05-24 Richard Stallman <rms@gnu.org>
23503
23504 * src/lex.c (literalchar):
23505 Fix the code for escaping \, " and '.
23506
23507 (lex): Avoid trouble when there are many chars
23508 to discard in a char literal with just several chars in it.
23509
23510 1997-05-17 Richard Stallman <rms@gnu.org>
23511
23512 * src/bison.s1:
23513 Use malloc, if using alloca is troublesome.
23514 (YYSTACK_USE_ALLOCA): New flag macro.
23515 Define it for some systems and compilers.
23516 (YYSTACK_ALLOC): New macro.
23517 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23518 If it was malloc'd, free it.
23519
23520 1997-05-17 Richard Stallman <rms@gnu.org>
23521
23522 * bison.simple:
23523 Use malloc, if using alloca is troublesome.
23524 (YYSTACK_USE_ALLOCA): New flag macro.
23525 Define it for some systems and compilers.
23526 (YYSTACK_ALLOC): New macro.
23527 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23528 If it was malloc'd, free it.
23529
23530 1997-04-23 Richard Stallman <rms@gnu.org>
23531
23532 * src/bison.s1:
23533 (alloca) [__hpux]: Always define as __builtin_alloca.
23534
23535 1997-04-23 Richard Stallman <rms@gnu.org>
23536
23537 * bison.simple:
23538 (alloca) [__hpux]: Always define as __builtin_alloca.
23539
23540 1997-04-22 Richard Stallman <rms@gnu.org>
23541
23542 * src/bison.s1:
23543 [__hpux]: Include alloca.h (right for HPUX 10)
23544 instead of declaring alloca (right for HPUX 9).
23545
23546 * src/bison.s1 (__yy_memcpy):
23547 Declare arg `count' as unsigned int.
23548 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23549
23550 1997-04-22 Richard Stallman <rms@gnu.org>
23551
23552 * bison.simple:
23553 [__hpux]: Include alloca.h (right for HPUX 10)
23554 instead of declaring alloca (right for HPUX 9).
23555
23556 * bison.simple (__yy_memcpy):
23557 Declare arg `count' as unsigned int.
23558 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23559
23560 1997-01-03 Richard Stallman <rms@gnu.org>
23561
23562 * src/allocate.c: [__STDC__ or _MSC_VER]:
23563 Declare calloc and realloc to return void *.
23564
23565 1997-01-02 Richard Stallman <rms@gnu.org>
23566
23567 * src/system.h:
23568 [_MSC_VER]: Include stdlib.h and process.h.
23569 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23570
23571 * src/main.c (main): Return FAILURE as a value.
23572 (printable_version): Declare arg as int, not char.
23573
23574 1997-01-02 Richard Stallman <rms@gnu.org>
23575
23576 * Makefile.in (dist):
23577 Explicitly check for symlinks, and copy them.
23578
23579 1996-12-19 Richard Stallman <rms@gnu.org>
23580
23581 * src/files.c:
23582 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23583
23584 1996-12-18 Paul Eggert <eggert@gnu.org>
23585
23586 * src/bison.s1 (yyparse):
23587 If __GNUC__ and YYPARSE_PARAM are both defined,
23588 declare yyparse to have a void * argument.
23589
23590 1996-12-18 Paul Eggert <eggert@gnu.org>
23591
23592 * bison.simple (yyparse):
23593 If __GNUC__ and YYPARSE_PARAM are both defined,
23594 declare yyparse to have a void * argument.
23595
23596 1996-12-17 Richard Stallman <rms@gnu.org>
23597
23598 * src/reduce.c (nbits): Add some casts.
23599
23600 1996-08-12 Richard Stallman <rms@gnu.org>
23601
23602 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23603
23604 1996-08-12 Richard Stallman <rms@gnu.org>
23605
23606 * bison.simple: Test _MSDOS as well as _MSDOS_.
23607
23608 1996-07-31 Richard Stallman <rms@gnu.org>
23609
23610 * src/bison.s1:
23611 [__sun && __i386]: Include alloca.h.
23612
23613 1996-07-31 Richard Stallman <rms@gnu.org>
23614
23615 * bison.simple:
23616 [__sun && __i386]: Include alloca.h.
23617
23618 1996-07-30 Richard Stallman <rms@gnu.org>
23619
23620 * src/bison.s1: Comment change.
23621
23622 * src/bison.s1: Test _MSDOS_, not MSDOS.
23623
23624 1996-07-30 Richard Stallman <rms@gnu.org>
23625
23626 * bison.simple: Comment change.
23627
23628 * bison.simple: Test _MSDOS_, not MSDOS.
23629
23630 1996-06-01 Richard Stallman <rms@gnu.org>
23631
23632 * 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:
23633 Insert `_' macro around many string constants.
23634
23635 * src/main.c:
23636 Insert `_' macro around many string constants.
23637
23638 (main): Call setlocale, bindtextdomain and textdomain.
23639
23640 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23641 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23642 [ENABLE_NLS]: Include libintl.h.
23643 [ENABLE_NLS] (gettext): Define.
23644 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23645 (N_, PACKAGE, LOCALEDIR): New macros.
23646
23647 1996-06-01 Richard Stallman <rms@gnu.org>
23648
23649 * POTFILES.in: New file.
23650
23651 * Makefile.in (allocate.o):
23652 Define target explicitly.
23653
23654 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23655 (LDFLAGS): Set to @LDFLAGS@.
23656 (configure): Run autoconf only if preceding `cd' succeeds.
23657 (bison.s1): Redirect output to temporary file then move the
23658 temporary to the target, rather than redirecting directly to bison.s1.
23659 (clean): Remove config.status and config.log.
23660 (distclean): Don't remove config.status here.
23661
23662 1996-05-12 Richard Stallman <rms@gnu.org>
23663
23664 * src/bison.s1:
23665 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23666
23667 1996-05-12 Richard Stallman <rms@gnu.org>
23668
23669 * bison.simple:
23670 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23671
23672 1996-05-11 Richard Stallman <rms@gnu.org>
23673
23674 * src/bison.s1 (__yy_memcpy):
23675 Really reorder the args, as was supposedly done on Feb 14 1995.
23676 (yyparse): Calls changed accordingly.
23677
23678 1996-05-11 Richard Stallman <rms@gnu.org>
23679
23680 * Makefile.in (dist): Don't use $(srcdir).
23681
23682 * bison.simple (__yy_memcpy):
23683 Really reorder the args, as was supposedly done on Feb 14 1995.
23684 (yyparse): Calls changed accordingly.
23685
23686 1996-01-27 Richard Stallman <rms@gnu.org>
23687
23688 * src/output.c (output_rule_data):
23689 Test YYERROR_VERBOSE in the conditional
23690 around the definition of ttyname.
23691
23692 1995-12-29 Richard Stallman <rms@gnu.org>
23693
23694 * src/bison.s1:
23695 Fix line numbers in #line commands.
23696
23697 1995-12-29 Richard Stallman <rms@gnu.org>
23698
23699 * bison.simple:
23700 Fix line numbers in #line commands.
23701
23702 1995-12-27 Richard Stallman <rms@gnu.org>
23703
23704 * src/bison.s1 (YYPARSE_PARAM_DECL):
23705 In C++, make it always null.
23706 (YYPARSE_PARAM_ARG): New macro.
23707 (yyparse): Use YYPARSE_PARAM_ARG.
23708
23709 1995-12-27 Richard Stallman <rms@gnu.org>
23710
23711 * bison.simple (YYPARSE_PARAM_DECL):
23712 In C++, make it always null.
23713 (YYPARSE_PARAM_ARG): New macro.
23714 (yyparse): Use YYPARSE_PARAM_ARG.
23715
23716 1995-11-29 Richard Stallman <rms@gnu.org>
23717
23718 * doc/bison.texinfo:
23719 Describe literal string tokens, %raw, %no_lines, %token_table.
23720
23721 1995-11-29 Daniel Hagerty <hag@gnu.org>
23722
23723 * doc/bison.texinfo: Fixed update date
23724
23725 1995-10-16 Richard Stallman <rms@gnu.org>
23726
23727 * src/version.c: Version 1.25.
23728
23729 1995-10-16 Richard Stallman <rms@gnu.org>
23730
23731 * NEWS: *** empty log message ***
23732
23733 1995-10-16 Richard Stallman <rms@gnu.org>
23734
23735 * doc/bison.1, doc/bison.rnh:
23736 Add new options.
23737
23738 1995-10-15 Richard Stallman <rms@gnu.org>
23739
23740 * src/vmsgetargs.c, src/getargs.c:
23741 Added -n, -k, and -raw switches.
23742 (noparserflag, toknumflag, rawtoknumflag): New variables.
23743
23744 * src/symtab.h (SALIAS):
23745 New #define for adding aliases to %token.
23746 (struct bucket): Added `alias' field.
23747
23748 * src/reduce.c (reduce_grammar):
23749 Revise error message.
23750 (print_notices): Remove final `.' from error message.
23751
23752 * src/reader.c (reader_output_yylsp):
23753 New function.
23754 (readgram): Use `#if 0' around code that accepted %command
23755 inside grammar rules: The documentation doesn't allow it,
23756 and it will fail since the %command processors scan for the next %.
23757 (parse_token_decl): Extended the %token
23758 declaration to allow a multi-character symbol as an alias.
23759 (parse_thong_decl): New function.
23760 (read_declarations): Added %thong declarations.
23761 (read_declarations): Handle NOOP to deal with allowing
23762 % declarations as another means to specify the flags.
23763 (readgram): Allow %prec prior to semantics embedded in a rule.
23764 (skip_to_char, read_declarations, copy_definition)
23765 (parse_token_decl, parse_start_decl, parse_type_decl)
23766 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23767 (get_type_name, copy_guard, copy_action, readgram)
23768 (get_type, packsymbols): Revised most error messages.
23769 Changed `fatal' to `warnxxx' to avoid aborting for error.
23770 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23771 (read_declarations): Improve the error message for
23772 an invalid character. Do not abort.
23773 (read_declarations, copy_guard, copy_action): Use
23774 printable_version to avoid unprintable characters in printed output.
23775 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23776 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23777 Allow the type of a non-terminal can be given
23778 more than once, as long as all specifications give the same type.
23779
23780 * src/output.c:
23781 (output_headers, output_trailers, output, output_gram)
23782 (output_rule_data): Implement noparserflag variable.
23783 Implement toknumflag variable.
23784 (output): Call reader_output_yylsp to output LTYPESTR.
23785
23786 * src/main.c (main):
23787 If reader sees an error, don't process the grammar.
23788 (fatals): Updated to not use VARARGS1.
23789 (printable_version, int_to_string, warn, warni, warns, warnss)
23790 (warnsss): New error reporting functions. Avoid abort for error.
23791
23792 * src/lex.h:
23793 Added THONG and NOOP for alias processing.
23794 Added SETOPT for the new code that allows setting options with %flags.
23795
23796 * src/lex.c:
23797 Include getopt.h. Add some extern decls.
23798 (safegetc): New function to deal with EOF gracefully.
23799 (literalchar); new function to deal with reading \ escapes.
23800 (lex): Use literalchar.
23801 (lex): Implemented "..." tokens.
23802 (literalchar, lex, parse_percent_token): Made tokenbuffer
23803 always contain the token. This includes growing the token
23804 buffer while reading an integer.
23805 (parse_percent_token): Replaced if-else statement with percent_table.
23806 (parse_percent_token): Added % declarations as another
23807 way to specify the flags -n, -l, and -r. Also added hooks for
23808 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23809 major changes to files.c.
23810 (lex) Retain in the incoming stream a character following
23811 an incorrect '/'.
23812 (skip_white_space, lex): Revised most error messages
23813 and changed fatal to warn to avoid aborting.
23814 (percent_table): Added %thong declarations.
23815
23816 * src/gram.h: Comment changes.
23817
23818 * src/files.c (openfiles, open_extra_files, done):
23819 Add faction flag
23820 and actfile file. Handle noparserflag. Both for -n switch.
23821
23822 * src/conflicts.c (resolve_sr_conflict):
23823 Remove use of alloca.
23824
23825 1995-06-01 Jim Meyering <meyering@gnu.org>
23826
23827 * doc/bison.texinfo: *** empty log message ***
23828
23829 1995-05-06 Richard Stallman <rms@gnu.org>
23830
23831 * src/bison.s1: Comment change.
23832
23833 1995-05-06 Richard Stallman <rms@gnu.org>
23834
23835 * bison.simple: Comment change.
23836
23837 1995-05-03 Richard Stallman <rms@gnu.org>
23838
23839 * src/version.c: Version now 1.24.
23840
23841 * src/bison.s1: Change distribution terms.
23842
23843 * src/version.c: Version now 1.23.
23844
23845 1995-05-03 Richard Stallman <rms@gnu.org>
23846
23847 * doc/bison.texinfo:
23848 Rewrite "Conditions for Using Bison".
23849 Update version to 1.24.
23850
23851 1995-05-03 Richard Stallman <rms@gnu.org>
23852
23853 * bison.simple: Change distribution terms.
23854
23855 1995-02-23 Richard Stallman <rms@gnu.org>
23856
23857 * src/files.c: Test __VMS_POSIX as well as VMS.
23858
23859 1995-02-14 Jim Meyering <meyering@gnu.org>
23860
23861 * src/bison.s1 (__yy_memcpy):
23862 Renamed from __yy_bcopy to avoid
23863 confusion. Reverse FROM and TO arguments to be consistent with
23864 those of memcpy.
23865
23866 1995-02-14 Jim Meyering <meyering@gnu.org>
23867
23868 * bison.simple (__yy_memcpy):
23869 Renamed from __yy_bcopy to avoid
23870 confusion. Reverse FROM and TO arguments to be consistent with
23871 those of memcpy.
23872
23873 1994-11-10 David J. MacKenzie <djm@gnu.org>
23874
23875 * NEWS: reformat
23876
23877 * NEWS: New file.
23878
23879 * Makefile.in (DISTFILES): Include NEWS.
23880
23881 * Makefile.in (DISTFILES):
23882 Include install-sh, not install.sh.
23883
23884 * configure.in: Update to Autoconf v2 macro names.
23885
23886 1994-10-05 David J. MacKenzie <djm@gnu.org>
23887
23888 * Makefile.in: fix typo
23889
23890 * Makefile.in (prefix, exec_prefix):
23891 Let configure set them.
23892
23893 1994-09-28 David J. MacKenzie <djm@gnu.org>
23894
23895 * Makefile.in: Set datadir to $(prefix)/share.
23896
23897 1994-09-15 Richard Stallman <rms@gnu.org>
23898
23899 * src/bison.s1:
23900 Update copyright notice and GPL version.
23901
23902 1994-09-15 Richard Stallman <rms@gnu.org>
23903
23904 * bison.simple:
23905 Update copyright notice and GPL version.
23906
23907 1994-07-12 Richard Stallman <rms@gnu.org>
23908
23909 * src/reduce.c, src/reader.c:
23910 entered into RCS
23911
23912 1994-05-05 David J. MacKenzie <djm@gnu.org>
23913
23914 * Makefile.in: entered into RCS
23915
23916 1994-03-26 Richard Stallman <rms@gnu.org>
23917
23918 * src/bison.s1: entered into RCS
23919
23920 1994-03-26 Richard Stallman <rms@gnu.org>
23921
23922 * bison.simple: entered into RCS
23923
23924 1994-03-25 Richard Stallman <rms@gnu.org>
23925
23926 * src/main.c: entered into RCS
23927
23928 1994-03-24 Richard Stallman <rms@gnu.org>
23929
23930 * src/conflicts.c: entered into RCS
23931
23932 1994-01-02 Richard Stallman <rms@gnu.org>
23933
23934 * Makefile.in: *** empty log message ***
23935
23936 1993-11-21 Richard Stallman <rms@gnu.org>
23937
23938 * src/bison.s1: *** empty log message ***
23939
23940 1993-11-21 Richard Stallman <rms@gnu.org>
23941
23942 * doc/bison.texinfo: entered into RCS
23943
23944 * doc/bison.texinfo: *** empty log message ***
23945
23946 1993-11-21 Richard Stallman <rms@gnu.org>
23947
23948 * bison.simple: *** empty log message ***
23949
23950 1993-10-25 David J. MacKenzie <djm@gnu.org>
23951
23952 * doc/bison.texinfo: *** empty log message ***
23953
23954 1993-10-19 Richard Stallman <rms@gnu.org>
23955
23956 * src/bison.s1: *** empty log message ***
23957
23958 1993-10-19 Richard Stallman <rms@gnu.org>
23959
23960 * bison.simple: *** empty log message ***
23961
23962 1993-10-14 Richard Stallman <rms@gnu.org>
23963
23964 * src/bison.s1: *** empty log message ***
23965
23966 1993-10-14 Richard Stallman <rms@gnu.org>
23967
23968 * bison.simple: *** empty log message ***
23969
23970 1993-09-14 David J. MacKenzie <djm@gnu.org>
23971
23972 * doc/bison.texinfo: *** empty log message ***
23973
23974 1993-09-13 Noah Friedman <friedman@gnu.org>
23975
23976 * Makefile.in: *** empty log message ***
23977
23978 1993-09-10 Richard Stallman <rms@gnu.org>
23979
23980 * src/conflicts.c: *** empty log message ***
23981
23982 * src/system.h: entered into RCS
23983
23984 1993-09-10 Richard Stallman <rms@gnu.org>
23985
23986 * doc/bison.1: entered into RCS
23987
23988 1993-09-06 Noah Friedman <friedman@gnu.org>
23989
23990 * src/version.c: entered into RCS
23991
23992 1993-09-06 Noah Friedman <friedman@gnu.org>
23993
23994 * Makefile.in: *** empty log message ***
23995
23996 1993-07-30 David J. MacKenzie <djm@gnu.org>
23997
23998 * Makefile.in: *** empty log message ***
23999
24000 1993-07-24 Richard Stallman <rms@gnu.org>
24001
24002 * src/bison.s1: *** empty log message ***
24003
24004 1993-07-24 Richard Stallman <rms@gnu.org>
24005
24006 * bison.simple: *** empty log message ***
24007
24008 1993-07-08 David J. MacKenzie <djm@gnu.org>
24009
24010 * Makefile.in: *** empty log message ***
24011
24012 1993-07-04 Richard Stallman <rms@gnu.org>
24013
24014 * src/bison.s1: *** empty log message ***
24015
24016 1993-07-04 Richard Stallman <rms@gnu.org>
24017
24018 * bison.simple: *** empty log message ***
24019
24020 1993-06-26 David J. MacKenzie <djm@gnu.org>
24021
24022 * src/getargs.c: entered into RCS
24023
24024 1993-06-26 David J. MacKenzie <djm@gnu.org>
24025
24026 * doc/bison.texinfo: *** empty log message ***
24027
24028 * doc/bison.1: New file.
24029
24030 1993-06-25 Richard Stallman <rms@gnu.org>
24031
24032 * src/getargs.c: New file.
24033
24034 1993-06-16 Richard Stallman <rms@gnu.org>
24035
24036 * src/bison.s1: *** empty log message ***
24037
24038 1993-06-16 Richard Stallman <rms@gnu.org>
24039
24040 * bison.simple: *** empty log message ***
24041
24042 1993-06-03 Richard Stallman <rms@gnu.org>
24043
24044 * src/bison.s1: New file.
24045
24046 1993-06-03 Richard Stallman <rms@gnu.org>
24047
24048 * doc/bison.texinfo: *** empty log message ***
24049
24050 1993-06-03 Richard Stallman <rms@gnu.org>
24051
24052 * bison.simple: New file.
24053
24054 1993-05-19 Richard Stallman <rms@gnu.org>
24055
24056 * doc/bison.texinfo: New file.
24057
24058 1993-05-07 Noah Friedman <friedman@gnu.org>
24059
24060 * Makefile.in: *** empty log message ***
24061
24062 1993-04-28 Noah Friedman <friedman@gnu.org>
24063
24064 * src/reader.c: *** empty log message ***
24065
24066 1993-04-23 Noah Friedman <friedman@gnu.org>
24067
24068 * src/alloc.h: entered into RCS
24069
24070 1993-04-20 David J. MacKenzie <djm@gnu.org>
24071
24072 * src/version.c: *** empty log message ***
24073
24074 * src/files.c, src/allocate.c:
24075 entered into RCS
24076
24077 * src/reader.c: *** empty log message ***
24078
24079 * src/lex.c: entered into RCS
24080
24081 * src/conflicts.c: New file.
24082
24083 * src/symtab.c: entered into RCS
24084
24085 * src/alloc.h: New file.
24086
24087 * src/LR0.c: entered into RCS
24088
24089 1993-04-18 Noah Friedman <friedman@gnu.org>
24090
24091 * src/reader.c: New file.
24092
24093 * src/version.c: *** empty log message ***
24094
24095 1993-04-18 Noah Friedman <friedman@gnu.org>
24096
24097 * Makefile.in: *** empty log message ***
24098
24099 1993-04-17 Noah Friedman <friedman@gnu.org>
24100
24101 * Makefile.in: *** empty log message ***
24102
24103 1993-04-15 Richard Stallman <rms@gnu.org>
24104
24105 * src/main.c, src/files.c:
24106 New file.
24107
24108 1993-04-15 Noah Friedman <friedman@gnu.org>
24109
24110 * configure.in: entered into RCS
24111
24112 * configure.in: *** empty log message ***
24113
24114 * configure.in: New file.
24115
24116 1993-04-14 Richard Stallman <rms@gnu.org>
24117
24118 * Makefile.in: New file.
24119
24120 1993-04-13 Richard Stallman <rms@gnu.org>
24121
24122 * src/version.c: New file.
24123
24124 1993-03-25 Richard Stallman <rms@gnu.org>
24125
24126 * src/output.c: entered into RCS
24127
24128 1992-09-25 Richard Stallman <rms@gnu.org>
24129
24130 * configure.bat: entered into RCS
24131
24132 1992-06-22 Richard Stallman <rms@gnu.org>
24133
24134 * src/vmsgetargs.c: entered into RCS
24135
24136 1992-06-22 Richard Stallman <rms@gnu.org>
24137
24138 * doc/bison.rnh: entered into RCS
24139
24140 1992-04-20 David J. MacKenzie <djm@gnu.org>
24141
24142 * README: entered into RCS
24143
24144 1992-01-22 Richard Stallman <rms@gnu.org>
24145
24146 * src/machine.h: entered into RCS
24147
24148 1991-12-21 Richard Stallman <rms@gnu.org>
24149
24150 * src/lalr.c, src/closure.c:
24151 entered into RCS
24152
24153 1991-12-20 Richard Stallman <rms@gnu.org>
24154
24155 * src/state.h: entered into RCS
24156
24157 1991-12-18 Richard Stallman <rms@gnu.org>
24158
24159 * src/print.c, src/nullable.c, src/derives.c:
24160 entered into RCS
24161
24162 1991-11-03 David J. MacKenzie <djm@gnu.org>
24163
24164 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24165 entered into RCS
24166
24167 1988-09-09 Richard Stallman <rms@gnu.org>
24168
24169 * src/bison.hairy: entered into RCS
24170
24171 1987-12-16 Richard Stallman <rms@gnu.org>
24172
24173 * REFERENCES: entered into RCS
24174
24175
24176 -----
24177
24178 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24179 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24180 2008, 2009 Free Software Foundation, Inc.
24181
24182 Copying and distribution of this file, with or without
24183 modification, are permitted provided the copyright notice and this
24184 notice are preserved.